Research
Recent Trends in Malicious Packages Targeting Discord
The Socket research team breaks down a sampling of malicious packages that download and execute files, among other suspicious behaviors, targeting the popular Discord platform.
@defi-wonderland/lopt
Advanced tools
Readme
lopt
is a utility package that can generate mock Solidity contracts in the form of fakes
and mocks
.
lopt
is based in @eth-optimism/smock, sinon and sinon-chai.
Some benefits of using lopt
:
sinon-chai
expect
and should
syntaxtypechain
(highly recommended)fakes
mock
and start asserting calls or changing behaviourDocumentation is available here.
You can easily install lopt
via npm:
npm install --save-dev @defi-wonderland/lopt
Or via yarn:
yarn add --dev @defi-wonderland/lopt
...
import { FakeContract, lopt } from '@defi-wonderland/lopt';
chai.should(); // if you like should syntax
chai.use(lopt.matchers);
describe('MyContract', () => {
let myContractFake: FakeContract<MyContract>;
beforeEach(async () => {
...
myContractFake = await lopt.fake<MyContract>('MyContract');
});
it('some test', () => {
...
myContractFake.bark.atCall(0).should.be.calledWith('Hello World');
});
});
lopt
?Loki's alternative name is Lopt, and Loki was obviously taken.
Loki is the God of Mischief, a trickster, and the purpose of mocking libraries is basically to trick the tests.
FAQs
Mocking framework for Solidity contracts
The npm package @defi-wonderland/lopt receives a total of 0 weekly downloads. As such, @defi-wonderland/lopt popularity was classified as not popular.
We found that @defi-wonderland/lopt demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
The Socket research team breaks down a sampling of malicious packages that download and execute files, among other suspicious behaviors, targeting the popular Discord platform.
Security News
Socket CEO Feross Aboukhadijeh joins a16z partners to discuss how modern, sophisticated supply chain attacks require AI-driven defenses and explore the challenges and solutions in leveraging AI for threat detection early in the development life cycle.
Security News
NIST's new AI Risk Management Framework aims to enhance the security and reliability of generative AI systems and address the unique challenges of malicious AI exploits.