ERC-20 development flow
Closed this issue · 1 comments
0mkara commented
Currently, the development flow is very confusing. It goes like following.
ERC-20 deploy steps
- compile
token.sol
- advanced deploy -> pass parameters -> get gas estimate -> build transaction -> sign & deploy
- check transaction hash on etherscan
ERC20 token - 0xf0735248cfb39b8429d9cb17c1151bd4cfb5937e
ERC-20 manager deploy steps
- compile
erc-20-manager.sol
- advanced deploy -> get gas estimate -> build transaction -> sign & deploy
- check transaction hash on etherscan
ERC20 Token manager - 0x23cc4a1258b4506ed621735dfa3eab62fa0140c4
- config
[
{
"internalType": "address",
"name": "_tokenContract",
"type": "address",
"value": "0xf0735248cfb39b8429d9cb17c1151bd4cfb5937e"
}
]
- call function -> sign & deploy
- check transaction hash on etherscan
- after confirmation ->
getTokenName
"Ethcode"
- compile
token.sol
- advanced deploy
- paste contract address before call button
- approve
[
{
"internalType": "address",
"name": "spender",
"type": "address",
"value": "0x23cc4a1258b4506ed621735dfa3eab62fa0140c4"
},
{
"internalType": "uint256",
"name": "amount",
"type": "uint256",
"value": "30"
}
]
- call function -> sign & deploy
- wait for confirmation
- allowance
[
{
"internalType": "address",
"name": "owner",
"type": "address",
"value": "0x540383a0B935997425DFedc214A8B26130C50718"
},
{
"internalType": "address",
"name": "spender",
"type": "address",
"value": "0x23cc4a1258b4506ed621735dfa3eab62fa0140c4"
}
]
30
- compile
erc-20-manager.sol
- advance deploy
- paste contract address before call button
- buy
[
{
"internalType": "address",
"name": "ref",
"type": "address",
"value": "0x540383a0B935997425DFedc214A8B26130C50718"
}
]
- value - 7000000000000000
- gas - 952111 # we need to explicitly supply gas here as this transaction fails to estimate gas
- call function -> sign & deploy
- check transaction hash on etherscan
- we should have token transfer in etherscan
Aniket6990 commented
this issue is now fixed, after v2 merge ethcode use etherjs for this type of work