post https://api.infstones.com/theta/mainnet/
This API returns the complied smart contract code.
Parameters
Object Name | Required | Type | Detail |
---|---|---|---|
address | ✅ | String | address of smart contract |
height | ❌ | String | block height |
"params":[
{
"address":"0xa89c744db76266eca60e2b0f62afcd1f8581b7ed"
}
]
Result
Result Fields
Key | Type | Detail |
---|---|---|
address | String | address of smart contract |
code | String | complied smart contract code |
Example
Request
curl <your-endpoint> \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","method":"theta.GetCode","params":[{"address":"0xa89c744db76266eca60e2b0f62afcd1f8581b7ed"}],"id":1}'
Return
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"address": "0xa89c744db76266eca60e2b0f62afcd1f8581b7ed",
"code": "608060405234801561001057600080fd5b506004361061018e5760003560e01c80636fcfff45116100de5780638456cb5911610097578063c3cda52011610071578063c3cda5201461032d578063e7a324dc14610340578063f1127ed814610348578063f851a440146103695761018e565b80638456cb59146102ff578063a694fc3a14610307578063b4b5ea571461031a5761018e565b80636fcfff451461027e578063704b6c021461029e57806370a08231146102b1578063782d6fe1146102c45780637c28cf88146102e45780637ecebe00146102ec5761018e565b80633f4ba83a1161014b5780635c19a95c116101255780635c19a95c1461023b5780635c975abb1461024e5780635e6046a7146102635780636b7590f91461026b5761018e565b80633f4ba83a1461020b57806357e4df5514610213578063587cde1e146102285761018e565b806306fdde031461019357806315700052146101b157806320606b70146101c657806329575f6a146101db5780632e17de78146101f05780633a98ef3914610203575b600080fd5b61019b610371565b6040516101a89190612167565b60405180910390f35b6101c46101bf366004611930565b61039a565b005b6101ce610436565b6040516101a891906120bd565b6101e361044d565b6040516101a89190612028565b6101ce6101fe366004611a65565b61045c565b6101ce6106c3565b6101c46106c9565b61021b61072b565b6040516101a89190612159565b6101e3610236366004611930565b61073a565b6101c4610249366004611930565b610755565b610256610762565b6040516101a891906120af565b61021b610772565b6101ce610279366004611930565b610781565b61029161028c366004611930565b6108fb565b6040516101a89190612238565b6101c46102ac366004611930565b610913565b6101ce6102bf366004611930565b6109a6565b6102d76102d2366004611956565b6109ca565b6040516101a89190612261565b6101ce610bd9565b6101ce6102fa366004611930565b610bdf565b6101c4610bf1565b6101ce610315366004611a65565b610c59565b6102d7610328366004611930565b610e85565b6101c461033b366004611990565b610ef6565b6101ce6110e5565b61035b610356366004611a17565b6110f1565b6040516101a8929190612246565b6101e3611126565b6040518060400160405280600d81526020016c5444726f70205374616b696e6760981b81525081565b6002546001600160a01b031633146103cd5760405162461bcd60e51b81526004016103c490612228565b60405180910390fd5b6002546040517f6a7fb6694616d75391385b86c21a1cc2628072753f9c7da9731e7b1b083a55e49161040c916001600160a01b03909116908490612079565b60405180910390a1600280546001600160a01b0319166001600160a01b0392909216919091179055565b60405161044290612012565b604051809103902081565b6002546001600160a01b031681565b600354600090600160a01b900460ff16156104895760405162461bcd60e51b81526004016103c490612198565b336000908152600660205260409020546001600160601b03168211156104c15760405162461bcd60e51b81526004016103c4906121c8565b600082116104e15760405162461bcd60e51b81526004016103c490612218565b6104e9611135565b600061050d836040518060600160405280602b81526020016123dc602b9139611268565b90506000610557610539610531610522611297565b856001600160601b031661131d565b600554611357565b6040518060600160405280602c81526020016123b0602c9139611268565b336000908152600660205260409020546001600160601b0391821692506105a491610586918116908516611399565b6040518060600160405280602c81526020016124b4602c9139611268565b33600090815260066020526040902080546bffffffffffffffffffffffff19166001600160601b03928316179055600554610603916105e591908516611399565b6040518060600160405280602b8152602001612553602b9139611268565b6001600160601b031660055533600090815260076020526040812054610635916001600160a01b0390911690846113db565b60005460405163a9059cbb60e01b81526001600160a01b039091169063a9059cbb90610667903390859060040161205e565b602060405180830381600087803b15801561068157600080fd5b505af1158015610695573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052506106b99190810190611a47565b509150505b919050565b60055481565b6003546001600160a01b031633146106f35760405162461bcd60e51b81526004016103c4906121d8565b6003805460ff60a01b191690556040517fa45f47fdea8a1efdd9029a5691c7f759c32b7c698632b563573e155625d1693390600090a1565b6001546001600160a01b031681565b6007602052600090815260409020546001600160a01b031681565b61075f3382611572565b50565b600354600160a01b900460ff1681565b6000546001600160a01b031681565b600060055460001415610796575060006106be565b6001600160a01b0382166000908152600660205260408120546004546001600160601b03909116914391821061088457610881610863600160009054906101000a90046001600160a01b03166001600160a01b0316637f639c566040518163ffffffff1660e01b815260040160206040518083038186803b15801561081a57600080fd5b505afa15801561082e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052506108529190810190611a83565b61085e85600454611399565b61131d565b60405180608001604052806042815260200161240760429139611268565b90505b60006108a3610863610894611297565b846001600160601b03166115fc565b905060006108e76108c9610531846001600160601b0316886001600160601b031661131d565b60405180608001604052806041815260200161251260419139611268565b6001600160601b0316979650505050505050565b60096020526000908152604090205463ffffffff1681565b6002546001600160a01b0316331461093d5760405162461bcd60e51b81526004016103c490612228565b6003546040517f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f9161097c916001600160a01b03909116908490612079565b60405180910390a1600380546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b03166000908152600660205260409020546001600160601b031690565b60004382106109eb5760405162461bcd60e51b81526004016103c4906121f8565b6001600160a01b03831660009081526009602052604090205463ffffffff1680610a19576000915050610bd3565b6001600160a01b038416600090815260086020908152604080832063ffffffff600019860181168552925290912054168310610a95576001600160a01b03841660009081526008602090815260408083206000199490940163ffffffff1683529290522054600160201b90046001600160601b03169050610bd3565b6001600160a01b038416600090815260086020908152604080832083805290915290205463ffffffff16831015610ad0576000915050610bd3565b600060001982015b8163ffffffff168163ffffffff161115610b9357600282820363ffffffff16048103610b026118d7565b506001600160a01b038716600090815260086020908152604080832063ffffffff858116855290835292819020815180830190925254928316808252600160201b9093046001600160601b03169181019190915290871415610b6e57602001519450610bd39350505050565b805163ffffffff16871115610b8557819350610b8c565b6001820392505b5050610ad8565b506001600160a01b038516600090815260086020908152604080832063ffffffff909416835292905220546001600160601b03600160201b909104169150505b92915050565b60045481565b600a6020526000908152604090205481565b6003546001600160a01b03163314610c1b5760405162461bcd60e51b81526004016103c4906121d8565b6003805460ff60a01b1916600160a01b1790556040517f9e87fac88ff661f02d44f95383c817fece4bce600a3dab7a54406878b965e75290600090a1565b600354600090600160a01b900460ff1615610c865760405162461bcd60e51b81526004016103c490612198565b60008211610ca65760405162461bcd60e51b81526004016103c490612188565b6000610cca836040518060600160405280602b81526020016123dc602b9139611268565b9050610cd4611135565b6000610cde611297565b6000546040516323b872dd60e01b81529192506001600160a01b0316906323b872dd90610d1390339030908790600401612036565b602060405180830381600087803b158015610d2d57600080fd5b505af1158015610d41573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250610d659190810190611a47565b50600060055460001415610d7a575081610dbc565b610db9610d9b610d95600554866001600160601b031661131d565b84611357565b60405180606001604052806030815260200161235060309139611268565b90505b610dd4610d9b600554836001600160601b03166115fc565b6001600160601b0390811660055533600090815260066020526040902054610e2291610e049181169084166115fc565b6040518060600160405280602b81526020016123dc602b9139611268565b33600090815260066020908152604080832080546bffffffffffffffffffffffff19166001600160601b0395909516949094179093556007905290812054610e7491906001600160a01b0316836113db565b6001600160601b0316949350505050565b6001600160a01b03811660009081526009602052604081205463ffffffff1680610eb0576000610eef565b6001600160a01b0383166000908152600860209081526040808320600019850163ffffffff168452909152902054600160201b90046001600160601b03165b9392505050565b6000604051610f0490612012565b60408051918290038220828201909152600d82526c5444726f70205374616b696e6760981b6020909201919091527f7abeabc2e130641b4dd1dd69bc4c5685f0065a8f0ad30f1362a90838acf34b7d610f5b611621565b30604051602001610f6f9493929190612109565b6040516020818303038152906040528051906020012090506000604051610f959061201d565b604051908190038120610fb0918a908a908a906020016120cb565b60405160208183030381529060405280519060200120905060008282604051602001610fdd929190611fe1565b60405160208183030381529060405280519060200120905060006001828888886040516000815260200160405260405161101a949392919061213e565b6020604051602081039080840390855afa15801561103c573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b03811661106f5760405162461bcd60e51b81526004016103c490612208565b6001600160a01b0381166000908152600a6020526040902080546001810190915589146110ae5760405162461bcd60e51b81526004016103c4906121b8565b874211156110ce5760405162461bcd60e51b81526004016103c4906121a8565b6110d8818b611572565b505050505b505050505050565b6040516104429061201d565b600860209081526000928352604080842090915290825290205463ffffffff811690600160201b90046001600160601b031682565b6003546001600160a01b031681565b436004541061114357611266565b60006111fb6111dd600160009054906101000a90046001600160a01b03166001600160a01b0316637f639c566040518163ffffffff1660e01b815260040160206040518083038186803b15801561119957600080fd5b505afa1580156111ad573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052506111d19190810190611a83565b61085e43600454611399565b6040518060600160405280603281526020016124e060329139611268565b436004908155600054604051630192f3e560e11b81529293506001600160a01b031691630325e7ca91611232913091869101612094565b600060405180830381600087803b15801561124c57600080fd5b505af1158015611260573d6000803e3d6000fd5b50505050505b565b600081600160601b841061128f5760405162461bcd60e51b81526004016103c49190612167565b509192915050565b600080546040516370a0823160e01b81526001600160a01b03909116906370a08231906112c8903090600401612028565b60206040518083038186803b1580156112e057600080fd5b505afa1580156112f4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052506113189190810190611a83565b905090565b60008261132c57506000610bd3565b8282028284828161133957fe5b0414610eef5760405162461bcd60e51b81526004016103c4906121e8565b6000610eef83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250611625565b6000610eef83836040518060400160405280601f81526020017f536166654d6174683a207375627472616374696f6e20756e646572666c6f770081525061165c565b816001600160a01b0316836001600160a01b03161415801561140657506000816001600160601b0316115b1561156d576001600160a01b038316156114be576001600160a01b03831660009081526009602052604081205463ffffffff169081611446576000611485565b6001600160a01b0385166000908152600860209081526040808320600019860163ffffffff168452909152902054600160201b90046001600160601b03165b905060006114ac828560405180606001604052806030815260200161238060309139611688565b90506114ba868484846116bf565b5050505b6001600160a01b0382161561156d576001600160a01b03821660009081526009602052604081205463ffffffff1690816114f9576000611538565b6001600160a01b0384166000908152600860209081526040808320600019860163ffffffff168452909152902054600160201b90046001600160601b03165b9050600061155f82856040518060600160405280602f8152602001612485602f9139611874565b90506110dd858484846116bf565b505050565b6001600160a01b03808316600081815260076020818152604080842080546006845282862054949093528787166001600160a01b031984168117909155905191909516946001600160601b039092169391928592917f3134e8a2e6d97e929a7e54011ea5485d7d196dd5f0ba4d4ef95803e8e3fc257f9190a46115f68284836113db565b50505050565b600082820183811015610eef5760405162461bcd60e51b81526004016103c490612178565b4690565b600081836116465760405162461bcd60e51b81526004016103c49190612167565b50600083858161165257fe5b0495945050505050565b600081848411156116805760405162461bcd60e51b81526004016103c49190612167565b505050900390565b6000836001600160601b0316836001600160601b0316111582906116805760405162461bcd60e51b81526004016103c49190612167565b60006116e3436040518060600160405280603c8152602001612449603c91396118b0565b905060008463ffffffff1611801561172c57506001600160a01b038516600090815260086020908152604080832063ffffffff6000198901811685529252909120548282169116145b1561178b576001600160a01b0385166000908152600860209081526040808320600019880163ffffffff168452909152902080546fffffffffffffffffffffffff000000001916600160201b6001600160601b0385160217905561182a565b60408051808201825263ffffffff80841682526001600160601b0380861660208085019182526001600160a01b038b166000818152600883528781208c871682528352878120965187549451909516600160201b026fffffffffffffffffffffffff000000001995871663ffffffff19958616179590951694909417909555938252600990935292909220805460018801909316929091169190911790555b846001600160a01b03167fdec2bacdd2f05b59de34da9b523dff8be42e5e38e818c82fdb0bae774387a724848460405161186592919061226f565b60405180910390a25050505050565b6000838301826001600160601b0380871690831610156118a75760405162461bcd60e51b81526004016103c49190612167565b50949350505050565b600081600160201b841061128f5760405162461bcd60e51b81526004016103c49190612167565b604080518082019091526000808252602082015290565b8035610bd381612317565b8051610bd38161232b565b8035610bd381612334565b8051610bd381612334565b8035610bd38161233d565b8035610bd381612346565b60006020828403121561194257600080fd5b600061194e84846118ee565b949350505050565b6000806040838503121561196957600080fd5b600061197585856118ee565b925050602061198685828601611904565b9150509250929050565b60008060008060008060c087890312156119a957600080fd5b60006119b589896118ee565b96505060206119c689828a01611904565b95505060406119d789828a01611904565b94505060606119e889828a01611925565b93505060806119f989828a01611904565b92505060a0611a0a89828a01611904565b9150509295509295509295565b60008060408385031215611a2a57600080fd5b6000611a3685856118ee565b92505060206119868582860161191a565b600060208284031215611a5957600080fd5b600061194e84846118f9565b600060208284031215611a7757600080fd5b600061194e8484611904565b600060208284031215611a9557600080fd5b600061194e848461190f565b611aaa816122c4565b82525050565b611aaa8161228a565b611aaa81612295565b611aaa8161229a565b611aaa611ad78261229a565b61229a565b611aaa816122cb565b6000611af08261227d565b611afa8185612281565b9350611b0a8185602086016122e1565b611b138161230d565b9093019392505050565b6000611b2a6002836106be565b61190160f01b815260020192915050565b6000611b48601b83612281565b7f536166654d6174683a206164646974696f6e206f766572666c6f770000000000815260200192915050565b6000611b81602383612281565b7f5444726f705374616b696e673a3a7374616b653a20696e76616c696420616d6f8152621d5b9d60ea1b602082015260400192915050565b6000611bc6603183612281565b7f5444726f705374616b696e673a3a6f6e6c795768656e556e7061757365643a208152701cdd185ada5b99c81a5cc81c185d5cd959607a1b602082015260400192915050565b6000611c19602e83612281565b7f5444726f705374616b696e673a3a64656c656761746542795369673a2073696781526d1b985d1d5c9948195e1c1a5c995960921b602082015260400192915050565b6000611c69602a83612281565b7f5444726f705374616b696e673a3a64656c656761746542795369673a20696e76815269616c6964206e6f6e636560b01b602082015260400192915050565b6000611cb5602d83612281565b7f5444726f705374616b696e673a3a756e7374616b653a20616d6f756e7420657881526c63656564732062616c616e636560981b602082015260400192915050565b6000611d046043836106be565b7f454950373132446f6d61696e28737472696e67206e616d652c75696e7432353681527f20636861696e49642c6164647265737320766572696679696e67436f6e74726160208201526263742960e81b604082015260430192915050565b6000611d6f603f83612281565b7f5444726f705374616b696e673a3a6f6e6c7941646d696e3a206f6e6c7920746881527f652061646d696e2063616e20706572666f726d207468697320616374696f6e00602082015260400192915050565b6000611dce602183612281565b7f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f8152607760f81b602082015260400192915050565b6000611e11602f83612281565b7f5444726f705374616b696e673a3a6765745072696f72566f7465733a206e6f7481526e081e595d0819195d195c9b5a5b9959608a1b602082015260400192915050565b6000611e62602e83612281565b7f5444726f705374616b696e673a3a64656c656761746542795369673a20696e7681526d616c6964207369676e617475726560901b602082015260400192915050565b6000611eb2602583612281565b7f5444726f705374616b696e673a3a756e7374616b653a20696e76616c696420618152641b5bdd5b9d60da1b602082015260400192915050565b6000611ef9604a83612281565b7f5444726f705374616b696e673a3a6f6e6c79537570657241646d696e3a206f6e81527f6c79207468652073757065722061646d696e2063616e20706572666f726d20746020820152693434b99030b1ba34b7b760b11b604082015260600192915050565b6000611f6b603a836106be565b7f44656c65676174696f6e28616464726573732064656c6567617465652c75696e81527f74323536206e6f6e63652c75696e7432353620657870697279290000000000006020820152603a0192915050565b611aaa816122a9565b611aaa816122b2565b611aaa816122d6565b611aaa816122b8565b6000611fec82611b1d565b9150611ff88285611acb565b6020820191506120088284611acb565b5060200192915050565b6000610bd382611cf7565b6000610bd382611f5e565b60208101610bd38284611ab0565b606081016120448286611aa1565b6120516020830185611ab0565b61194e6040830184611fcf565b6040810161206c8285611aa1565b610eef6020830184611ac2565b604081016120878285611ab0565b610eef6020830184611ab0565b604081016120a28285611ab0565b610eef6020830184611fcf565b60208101610bd38284611ab9565b60208101610bd38284611ac2565b608081016120d98287611ac2565b6120e66020830186611ab0565b6120f36040830185611ac2565b6121006060830184611ac2565b95945050505050565b608081016121178287611ac2565b6121246020830186611ac2565b6121316040830185611ac2565b6121006060830184611ab0565b6080810161214c8287611ac2565b6120e66020830186611fc6565b60208101610bd38284611adc565b60208082528101610eef8184611ae5565b60208082528101610bd381611b3b565b60208082528101610bd381611b74565b60208082528101610bd381611bb9565b60208082528101610bd381611c0c565b60208082528101610bd381611c5c565b60208082528101610bd381611ca8565b60208082528101610bd381611d62565b60208082528101610bd381611dc1565b60208082528101610bd381611e04565b60208082528101610bd381611e55565b60208082528101610bd381611ea5565b60208082528101610bd381611eec565b60208101610bd38284611fbd565b604081016122548285611fbd565b610eef6020830184611fd8565b60208101610bd38284611fd8565b604081016120a28285611fcf565b5190565b90815260200190565b6000610bd38261229d565b151590565b90565b6001600160a01b031690565b63ffffffff1690565b60ff1690565b6001600160601b031690565b6000610bd3825b6000610bd38261228a565b6000610bd3826122b8565b60005b838110156122fc5781810151838201526020016122e4565b838111156115f65750506000910152565b601f01601f191690565b6123208161228a565b811461075f57600080fd5b61232081612295565b6123208161229a565b612320816122a9565b612320816122b256fe5444726f705374616b696e673a3a7374616b653a20746f74616c537570706c79206578636565647320393620626974735444726f705374616b696e673a3a5f6d6f7665566f7465733a20766f746520616d6f756e7420756e646572666c6f77735444726f705374616b696e673a3a756e7374616b653a20696e76616c6964206f757470757420616d6f756e745444726f705374616b696e673a3a7374616b653a20616d6f756e74206578636565647320393620626974735444726f705374616b696e673a3a657374696d617465645444726f704f776e656442793a2072657761726420616d6f756e74206578636565647320393620626974735444726f705374616b696e673a3a5f7772697465436865636b706f696e743a20626c6f636b206e756d626572206578636565647320333220626974735444726f705374616b696e673a3a5f6d6f7665566f7465733a20766f746520616d6f756e74206f766572666c6f77735444726f705374616b696e673a3a756e7374616b653a20696e76616c6964206f7574707574207368617265735444726f705374616b696e673a3a7374616b653a2072657761726420616d6f756e74206578636565647320393620626974735444726f705374616b696e673a3a657374696d617465645444726f704f776e656442793a20696e76616c6964206163636f756e74205444726f7020616d6f756e745444726f705374616b696e673a3a756e7374616b653a20696e76616c696420746f74616c20736861726573a365627a7a72315820d29247f7da3557355cf9cfce0f6bc45bbdf2db63198f8b51539415e400fee79e6c6578706572696d656e74616cf564736f6c63430005100040"
}
}