Skip to main content

Questions tagged [abiencoderv2]

The new ABI encoder is able to encode and decode arbitrarily nested arrays and structs. It produces less optimal code (the optimizer for this part of the code is still under development).

2 votes
0 answers
40 views

EIP 712 defines typed structured data hashing and signing. It is very well documented and also supplies basic test cases. I implemented it in Ruby. Now, here is a question. It seems the specification ...
q9f's user avatar
  • 33.1k
1 vote
0 answers
73 views

I want to call it a smart contract function. I am signing the transaction using Metamask so I need to create call data for the transaction. I want to use Nethereum for creating the call data of the ...
Shubhankar Banerjee's user avatar
2 votes
0 answers
116 views

I need to use the Multiplex Feature of 0x in order to perform a specific trade that perform a UniswapV3 call followed by a _FillOTCorder using the SelfBalance feature of the the Multiplex Feature. As ...
user2284570's user avatar
  • 1,063
1 vote
1 answer
45 views

function myStatic() public returns (uint256[] memory, address payable[] memory, bytes32, string memory) { bytes memory encodedResult; bool success; (success, encodedResult) = address(...
user130657's user avatar
0 votes
0 answers
68 views

So I have two contracts. the firt one is a contract that imports a token import {testToken} from "./testToken.sol"; testToken public token; and has this functionality AddressUpgradeable....
Non Fungible Person's user avatar
1 vote
1 answer
118 views

This question has two parts. I would like to return a list of items from my smart contract in a simple way, ideally a one-liner solution, something that I consume on the front-end. I tried some of the ...
Mars Robertson's user avatar
1 vote
1 answer
1k views

I have in solidity: struct MyStruct { string data; address issuer; } function getHash(MyStruct calldata myStruct) public pure returns (bytes32) { return keccak256(abi.encode(myStruct)); } ...
J3STER's user avatar
  • 125
1 vote
1 answer
805 views

Currently my implementations of abi decode gets only token amount and not the From, To, address and token amount is without decimal point value = decode(['uint256'],log['data']) ouptput Token ...
Matt's user avatar
  • 11
3 votes
3 answers
527 views

The structure of the encoding is abi.encodePacked( abi.encodePacked( address, uint256, uint256, address, uint256, address, ...
Ryan Sea's user avatar
  • 668
2 votes
4 answers
615 views

Let's say I have a string list of parameters ["Example String", "vitalikbuterin", "1000"] How can I encode this list into a bytes object, and then decode the bytes to get ...
MuellerSachs's user avatar
1 vote
0 answers
304 views

I have a custom struct defined in solidity. When calling the decode-function of the contract, I want to decode an encoded MyStruct (in bytes). This works perfectly as long as a previous defined ...
Alexander Schmidt's user avatar
0 votes
1 answer
13 views

In the examples section of the SDK documentation, there are encoders for a bunch of common DAO operations. However I can't see an encoding for an arbitrary contract call in the examples. Does the SDK ...
juliette_chevalier's user avatar
2 votes
1 answer
2k views

I'm using calldata of abi.encode(123 , arrayOfStructs) and abi.decode(data[:32], (uint256)) to get 123. But I'm unable to get the array of structs with abi.decode(data[32:], (myStruct[])) On the other ...
Ryan Sea's user avatar
  • 668
1 vote
1 answer
99 views

I have to bitpack two uint128 values into a uint256, then get back the two original uint128s. To encode the values I'm using: function encode256(uint128 a, uint128 b) pure public returns (uint256) { ...
Alexis's user avatar
  • 149
1 vote
1 answer
1k views

I've been messing around with the abi.encode... functions and I think I have a good grasp of the differences, except abi.encode and abi.encodeWithSelector. Because, they give similar but slightly ...
Pedro's user avatar
  • 55

15 30 50 per page