NEWTON
Asked
4 months ago
73
views
2
Is it possible to use Solidity's abi.encode and abi.decode in Cairo? Our periphery contract uses these 2 functions in EVM to send a tx to the core contracts, and then if a condition is met the core contract calls back the router like so:
router -> core -> router
An example of this can be found here:
router: https://github.com/CygnusDAO/periphery/blob/main/contracts/cygnus-periphery/CygnusAltairX.sol#L758
core: https://github.com/CygnusDAO/core/blob/main/contracts/cygnus-core/CygnusBorrow.sol#L145
Thanks!
Anubis
asked
4 months ago
0
Accepted answer
The one answer I found was from 0xEvolve [if you read this, feel free to add more details]:
I guess you don’t have a similar approach Just pass felt or felt packs and that should do the trick For now there is not a real typing system in Cairo
Will come in 1.0 tho
answered
4 months ago
Why abi of warp compiled contract does not match original solidity abi?
Is there any way to abi-encode calldata to pass to `account.execute`?
Is there a Cairo equivalent to Keccak256(abi.encode(parameters))?
Are transpiled contracts only interactable with the warp cli?
Has anyone implemented a minimal proxy in Cairo lang?
What if my solidity contract contains Assembly or special EVM calls ?
How to get the contract ABI?
What resources are required to run a Pathfinder node?
Is it possible to use ArgentX to sign in user to a off-chain api/db?
Problem with transfering USDC via Starkgate. Can anyone help?
Creating Elements via a function
How can I use start_prank with deploy_contract?
Can tempvar be of a different type, say U256?
What is the proxy pattern and how it can help make my smart contracts upgradable in Cairo Language?