Contracts

Contract related API's

Contract ABI for Verified Contract Source Codes

Return the ABI for a given Verified Contract Source Code.

GET https://scan.wemix.com/api/contract/{contractAddress}/abi

Query Parameters

Name
Type
Description

chain

wemix (default to wemix)

Chain. wemixTestnet is not supported for this request.

Example:

https://scan.wemix.com/api/contract/0xf19b887375623a84f6791fc67a24cd58a642d9eb/abi

Response

{
    "abi": "[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_account\",\"type\":\"address\"},{\"internalType\":\"contract IGovSBL\",\"name\":\"_govSBL\",\"type\":\"address\"},{\"internalType\":\"contract IERC20[]\",\"name\":\"_tokens\",\"type\":\"address[]\"}],\"name\":\"rewardEarned\",\"outputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"internalType\":\"struct StakeLens.Token[]\",\"name\":\"\",\"type\":\"tuple[]\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]"
}

Get Contract Source Code for Verified Contract Source Codes

Return the Solidity Source Code for a given Verified Smart Contract.

GET https://scan.wemix.com/api/contract/{contractAddress}/source-code

Query Parameters

Name
Type
Description

chain

wemix (default to wemix)

Chain. wemixTestnet is not supported for this request.

Example:

Response

Get Contract Creator and Creation Tx Hash

Return the Solidity Source Code for a given Verified Smart Contract.

GET https://scan.wemix.com/api/contract/contract-creation?contractaddresses={contractaddresses}

Query Parameters

Name
Type
Description

chain

wemix ,wemixTestnet (default to wemix)

Chain.

contractaddresses

Comma separated string

List of contract addresses to query (Maximum: 5)

Example:

Response

Last updated