Contracts
Get Contract ABI for Verified contract source code
GET https://testnetapi.metadium.com/v1/contracts/{contract_hash}/abi
api-key: Your API Key//Response Sample Result
{
"status": "200",
"message": "success",
"results": {
"data": [
{
"name": "withdraw",
"type": "function",
"inputs": [
{
"name": "value",
"type": "uint256"
}
],
"outputs": [
{
"name": "",
"type": "bool"
}
],
"payable": false,
"constant": false,
"stateMutability": "nonpayable"
},
...
]
}
}Get Contract Source Code for Verified Contract Source Code
GET https://testnetapi.metadium.com/v1/contracts/0x9afffe2525f25515c127c42ca18dacc5b331995a/code
api-key: Your API Key//Response Sample Result
{
"status": "200",
"message": "success",
"results": {
"data": {
"address": "0x9afffe2525f25515c127c42ca18dacc5b331995a",
"logo": null,
"compiler": "v0.5.2+commit.1df8f40c",
"libraries": "[]",
"verify_date": "2019-03-19T07:39:19Z",
"contract_name": "MetaCoin",
"runs_optimizer": "200",
"optimization_enabled": "0",
"contract_code": "0x60806040526 ...,
"contract_abi": [
{
"name": "allowance",
"type": "function",
"inputs": [
{
"name": "owner",
"type": "address"
},
{
"name": "spender",
"type": "address"
}
],
"outputs": [
{
"name": "",
"type": "uint256"
}
],
"payable": false,
"constant": true,
"stateMutability": "view"
}
],
"contract_source": "pragma solidity ^0.5.2; ...,
"constructor_arguments": "",
"swam_source": "bzzr://cb0f24b7c4ce26be17e04ba507a83092072124a305bb7b18926e5eb7b78f73a70029",
"verify_status": "1",
"verify_message": null
}
}
}Verify Contract Source Code
Last updated