Skip to content

acravenho/contract-verification

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Smart Contract Verification

This api compiles source code into bytecode and matches the bytecode to the getCode method.

Example Request

https://localhost:3333/api/verify

curl --request POST --data 
{
    "address": "0x37536bc1088010081691eec2ea6ae5c93533ed24",
    "version": "v0.4.21+commit.dfe3193c",
    "name": "HelloWorld",
    "provider": "https://core.poa.network:443",
    "optimization": 0
    "sourceCode": "example"
}

Example Response

{
    "verified":"no",
    "error":"Contract does not exist or name does not match",
    "address":"0x37536bc1088010081691eec2ea6ae5c93533ed24",
    "compilerVersion":"v0.4.21+commit.dfe3193c",
    "optimization":0,
    "contractName":"HelloWorld",
    "sourceCode":"dafdf",
    "swarm":"bzzr://89146f24e98139d5b297863135275efced13ba2f76f9d9802951341a560b6873",
    "bytecode":"606060405260043610610062576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff168063045bd69f146100675780632f8662b41461007c5780638da5cb5b1461009f578063954ab4b2146100f4575b600080fd5b341561007257600080fd5b61007a61011d565b005b341561008757600080fd5b61009d6004808035906020019091905050610131565b005b34156100aa57600080fd5b6100b26101cd565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34156100ff57600080fd5b6101076101f2565b6040518082815260200191505060405180910390f35b600160008154809291906001019190505550565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561018c57600080fd5b806001819055507f59b266112eaeec833418c35f5b6aebb0b185b0c5b62b9b3ecc311bc9d397e028426040518082815260200191505060405180910390a150565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600154815600a165627a7a7230582089146f24e98139d5b297863135275efced13ba2f76f9d9802951341a560b68730029",
    "comparableBytecode":"606060405260043610610062576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff168063045bd69f146100675780632f8662b41461007c5780638da5cb5b1461009f578063954ab4b2146100f4575b600080fd5b341561007257600080fd5b61007a61011d565b005b341561008757600080fd5b61009d6004808035906020019091905050610131565b005b34156100aa57600080fd5b6100b26101cd565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34156100ff57600080fd5b6101076101f2565b6040518082815260200191505060405180910390f35b600160008154809291906001019190505550565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561018c57600080fd5b806001819055507f59b266112eaeec833418c35f5b6aebb0b185b0c5b62b9b3ecc311bc9d397e028426040518082815260200191505060405180910390a150565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600154815600a165627a7a72305820",
    "last":"0029"
}

About

Smart contract verification api. Compare contract source code to bytecode in this simple to use API.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published