Skip to main content

New answers tagged

3 votes
Accepted

Is it possible to emit generic events using assembly?

This works for me: function emitGenericEvent(bytes32[] calldata topics, bytes calldata logData) external onlyController { require(topics.length <= 4, "Too many topics"); assembly {...
0xSanson's user avatar
  • 3,364
0 votes

How to work with foundry anvil custom rpc methods?

I can not tell you if you can run custom RPC Methods from libraries like Web3 or Ethers, however, I can tell you how I run these locally. I just do a request to the node directly: curl -H "...
Marxian's user avatar
  • 66
0 votes

Between writing fuzzing tests with echidna vs writing fuzzing tests with foundry, are there any advantages one has over the other?

For seeing the quick difference between both foundry and echidna, I prefer cloning this repo and testing it yourself: https://github.com/skpkss/Unhackable_Contracts . Now, let's deep dive into some ...
Saurabh Kaplas's user avatar
2 votes
Accepted

How to batch multiple calls through a single function?

Yes. It is entirely possible to batch multiple calls into a single without relying on external delegatecall. There are two similar implementations that you can use: Boring Batchable: source code ↗ ...
smol-ninja's user avatar
1 vote

Question about SLOAD and JUMP/JUMPI in EVM Bytecode

Yes it can, this is how it could work in EVM bytecode pc opcode 0x00 PUSH1 0x0a 0x02 PUSH0 0x03 SSTORE <- store "0x0a" at "0x00" 0x04 PUSH0 0x05 SLOAD <- read "...
Franfran's user avatar
  • 623
1 vote
Accepted

Interact with Deployed Contract

Yes you can do that. There is a call opcode: OPCODE : 0xF1 Name : CALL Gas : AA (will depend on the call) Stack : Gas to pass with the call, Address to call on, Value ...
Maka's user avatar
  • 1,230
2 votes
Accepted

abi.decode throwing error, panic: out of memory

Update: Got the solution The struct payload parameter must be encoded first and then encoded along with other values. function encodeSpecificReqPayload (SpecificRequestPayload memory _payload) public ...
Nilesh Gupta's user avatar
1 vote
Accepted

Foundry tests fail with `[NotActivated] EvmError: NotActivated` while fork test

This is likely happening because you did not set your evm_version in your foundry.toml. Update the evm_version in your foundry.toml as shown below and it should fix it. [profile.default] evm_version =...
Mayowa Tudonu's user avatar
0 votes
Accepted

How to monitor new pairs and liquidity pools in mempool pending transactions?

'id': 1, 'method': 'debug_traceCall', 'jsonrpc': '2.0', 'params': [ tx, 'pending', {'tracer': 'callTracer', "tracerConfig": {"withLog": true}} ]
sirjay's user avatar
  • 93

Top 50 recent answers are included