EZChain-core / ezchain-cchain-explorer

Blockchain explorer for Ethereum based network and a tool for inspecting and analyzing EVM based blockchains.
GNU General Public License v3.0
0 stars 0 forks source link

manual verify contract source #6

Open Zergity opened 2 years ago

Zergity commented 2 years ago

manually put the ERC20 contract source to address 0x0000...

contract code:

pragma solidity ^0.8.0;
contract EZC {
    event Transfer(address indexed from, address indexed to, uint256 value);
}
enixdark commented 2 years ago

this feature 'll be updated https://github.com/EZChain-core/blockscout/pull/8 @nguyenduybinh please review it

for manual contract source to address 0x0000 we 'll need to update into database to 3 tables tokens, addresses and smart_contracts

First step, we need to update name & token symbol in table tokens

move to table tokens and find the row that value of name and symbol are NULL and update like note: there is a field contract_address_hash with format binary so if possible use some tools can extract binary/blob data to file and update.

Screen Shot 2022-03-25 at 13 49 52

Next step, back to table addresses, find address 0x00 and update note: we also need to update data contract_code with format binary.

Screen Shot 2022-03-25 at 14 01 15

Finally, lets create new row for EZC and link/relation to 0x0000 address in table addresses

Screen Shot 2022-03-25 at 13 50 05

suggest: in this follow, I have deployed smart contract above and verify source code, then use this source for 0x00