Contracts
Get Contract ABI for Verified Contract Source Codes
Returns the Contract Application Binary Interface ( ABI ) of a verified smart contract.
https://api.w3w.ai/mantle/v1/developer/api
?module=contract
&action=getabi
&address=0x5989fb161568b9f133edf5cf6787f5597762797f
&apikey=YourApiKeyTokenTry this endpoint in your browser 🔗
https://api.socialscan.io/monad-testnet/v1/developer/api
?module=contract
&action=getabi
&address=0xe0fa8195ae92b9c473c0c0c12c2d6bcbd245de47
&apikey=8f9d3e27-a516-4c08-b235-7d94f02ca91bTry this endpoint in your browser 🔗
Query Parameters
Parameter
Description
address
the contract address that has a verified source code
Sample response
{
"status": "1",
"message": "OK",
"result": "[{\"inputs\":[],\"name\":\"GameBoardInvalid\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"GameIdUsed\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"GamePlayed\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"GamePlayerInvalid\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"player\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"id\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"board\",\"type\":\"uint256\"}],\"name\":\"NewGame\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"player\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"id\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"move\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"result\",\"type\":\"uint256\"}],\"name\":\"NewMove\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"gameHash\",\"type\":\"bytes32\"}],\"name\":\"gameHashOf\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"gameId\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"gameId\",\"type\":\"bytes32\"}],\"name\":\"getBoard\",\"outputs\":[{\"internalType\":\"uint8[16]\",\"name\":\"boardArr\",\"type\":\"uint8[16]\"},{\"internalType\":\"uint256\",\"name\":\"nextMoveNumber\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"gameId\",\"type\":\"bytes32\"}],\"name\":\"latestBoard\",\"outputs\":[{\"internalType\":\"uint128\",\"name\":\"\",\"type\":\"uint128\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"gameId\",\"type\":\"bytes32\"}],\"name\":\"nextMove\",\"outputs\":[{\"internalType\":\"uint120\",\"name\":\"\",\"type\":\"uint120\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"gameId\",\"type\":\"bytes32\"},{\"internalType\":\"uint8\",\"name\":\"move\",\"type\":\"uint8\"},{\"internalType\":\"uint128\",\"name\":\"resultBoard\",\"type\":\"uint128\"}],\"name\":\"play\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"gameId\",\"type\":\"bytes32\"},{\"internalType\":\"uint128[4]\",\"name\":\"boards\",\"type\":\"uint128[4]\"},{\"internalType\":\"uint8[3]\",\"name\":\"moves\",\"type\":\"uint8[3]\"}],\"name\":\"startGame\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"gameId\",\"type\":\"bytes32\"}],\"name\":\"state\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"move\",\"type\":\"uint8\"},{\"internalType\":\"uint120\",\"name\":\"nextMove\",\"type\":\"uint120\"},{\"internalType\":\"uint128\",\"name\":\"board\",\"type\":\"uint128\"}],\"stateMutability\":\"view\",\"type\":\"function\"}]"
}Get Contract Creator and Creation Tx Hash
[https://docs.etherscan.io/api-endpoints/contracts#get-contract-creator-and-creation-tx-hash]
Returns a contract's deployer address and transaction hash it was created, up to 5 at a time.
https://api.w3w.ai/mantle/v1/developer/api
?module=contractaddresses
&action=getcontractcreation
&address=0x6af20623bcc96de7a12961d432ce352fdd9fd994,0x8ac95e6359e9b4b24080f1505096ba5762d2d120,0x7e12e32e2720bf9431b980d5e6ca1d7629b30be4
&apikey=YourApiKeyTokenTry this endpoint in your browser 🔗
https://api.socialscan.io/monad-testnet/v1/developer/api
?module=contract
&action=getcontractcreation
&contractaddresses=0x359551653fce22a810722ec481f4b4643a60a297,0x671b42d0a0e2557f51a2a806db713ec934e6dd81,0x0f0bdebf0f83cd1ee3974779bcb7315f9808c714
&apikey=8f9d3e27-a516-4c08-b235-7d94f02ca91bTry this endpoint in your browser 🔗
Query Parameters
Parameter
Description
contractaddresses
the contract address , up to 5 at a time
Sample response
{
"status": "1",
"message": "OK",
"result": [
{
"contractAddress": "0x6af20623bcc96de7a12961d432ce352fdd9fd994",
"contractCreator": "0x69e2baaf77d3e95e1c31f8596da43bcc7c6f0739",
"txHash": "0xd008aa0d76fedf3553bc57d20132577ca1aa77f88d3d4ad3eee7bfb9cf9ab048"
},
{
"contractAddress": "0x7e12e32e2720bf9431b980d5e6ca1d7629b30be4",
"contractCreator": "0x69e2baaf77d3e95e1c31f8596da43bcc7c6f0739",
"txHash": "0xb9de0e98263dfa6e3b63ea5bdd685cbed1a79ea2b92802104c920544db8d1a6a"
},
{
"contractAddress": "0x8ac95e6359e9b4b24080f1505096ba5762d2d120",
"contractCreator": "0x69e2baaf77d3e95e1c31f8596da43bcc7c6f0739",
"txHash": "0xb9abdf11588af09cc0191b1e33170a883a90d98426096e907fa7ffe6122ed640"
}
]
}Last updated
Was this helpful?