NEWTON

NEWTON


Popular tags

    How can I define two functions with the same name but not the same arguments?

    Asked

    2 months ago

    53

    views


    0

    This question has a bounty of $0.00 in testnet ETH. Answers to this question are eligible to win that bounty.

    These are testnet contracts. Not real ETH.

    $0.00

    Ahoy Caironauts,

    How can I define two functions with the same name but not the same arguments, e.g,

    • func test()
    • func test(param: Uint256)

    It is possible in Solidity and I'm trying to find the Cairo equivalent.


    This question is participating in Newton Bounties | Incentivized Test Program Every verified valid question gets $10 USDC (mainnet)

      functionselectorparameterscairo

    0xDE8D

    asked

    2 months ago


    1 answers

    0

    Accepted answer

    This is not possible at the moment (and not sure it will ever be possible) :)

    0x5EF2...46c5dd

    answered

    1 month ago

    Answer is not submitted on chain

    Your answer

    NEWTON

    NEWTON