Timeline for The state of the called contract has not updated!
Current License: CC BY-SA 4.0
4 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
May 17 at 8:18 | comment | added | SYED ASAD KAZMI |
Actually, none of the encoding methods recognise custom types of other contracts. However, you can easily convert the types or get the function selectors from the contract whose function you’re calling, like if you’re importing that contract and creating its instance, then you can use encodeWithSelector by passing (new A()).addDev.selector as first param followed by the params required by addDev() function like: abi.encodeWithSelector((new A()).addDev.selector, n,uint8(t),s)) . But still, for the params you still have to use values typecasted in primitive types.
|
|
May 17 at 6:35 | comment | added | Alireza |
Yes, that worked! Thanks. If encodeWithSignature method can't recognize custom types, what abi 's methods can I try so that it can recognize custom types?
|
|
May 17 at 6:33 | vote | accept | Alireza | ||
May 16 at 17:02 | history | answered | SYED ASAD KAZMI | CC BY-SA 4.0 |