NEWTON

NEWTON


Popular tags

    Abi.encode and Abi.decode in Cairo?

    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!

      cairoabi.encodeabi.decode

    Anubis

    asked

    4 months ago


    1 answers

    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

    Your answer

    NEWTON

    NEWTON