Jump to content

'Wrong number of arguments' when deploying ERC20_c on test network


Recommended Posts

Hello,

I'm new to this network and I'm trying to find out whether it's worth the trouble developing contracts on the Elrond network and I must say that I'm impressed about/by the tooling offered by Elrond. But right now, I'm stuck in something: I was  trying to deploy the example ERC20_c on the test network, but the procedure fails with the message 'wrong number of arguments' as displayed in transaction hash 970fbb8cd5e6567c245d468663deed87119c51f8d7923d5d2cd1199eb8b6d70c on the test network. Does anyone know what that message signifies. The command I executed was : 

erdpy --verbose contract deploy --project=myerc20-c --pem="alice.pem" --gas-limit=30000000 --proxy="https://testnet-api.elrond.com" --outfile="erc20-c.json" --recall-nonce --send.

 

If anyone could help me, I 'd be much obliged

Link to post
Share on other sites
  • Elrond Team

Hello @trictrac,

 

According to the source code of the contract,

https://github.com/ElrondNetwork/sc-examples/blob/master/erc20-c/erc20.c#L85

it seems that it requires an argument (the total supply) at deploy-time (the init function is executed at deploy-time).

You can fix this by providing the argument in the erdpy command, as follows:

... your command ... --arguments 0x0002540be400

Let us know how it goes.

  • Thanks 1
Link to post
Share on other sites
  • Elrond Team
5 minutes ago, Andrei Bancioiu said:

Hello @trictrac,

 

According to the source code of the contract,

https://github.com/ElrondNetwork/sc-examples/blob/master/erc20-c/erc20.c#L85

it seems that it requires an argument (the total supply) at deploy-time (the init function is executed at deploy-time).

You can fix this by providing the argument in the erdpy command, as follows:


... your command ... --arguments 0x0002540be400

Let us know how it goes.

the argument there:

0x0002540be400

represents the supply = 10 000 000 000 in hex.

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...