Contract APIs

Get Contract ABI for Verified contract source code

URI

network

uri

Mainnet

GET https://explorerapi.wemix.com/v1/contracts/{contract_address}/abi

Testnet

GET https://explorerapi.test.wemix.com/v1/contracts/{contract_address}/abi

REQUEST PARAMETER

  • HEADER

key

value

required

api-key

api-key

true

  • PATH VARIABLE

key

type

value

required

contract_address

String

Verified contract address

true

REQUEST SAMPLE

GET https://explorerapi.wemix.com/v1/contracts/0xB4EF146F31Bd7e680707658a9772D0cfD35c8df4/abi
api-key: 1ba5e446edf1997f67b51bf9e60b3fbba6fa1bf84301115292805d7e24f43539

RESPONSE PARAMETER

key

type

value

status

String

Status of request

message

String

Response Message of request

results

Object

Result of request

results.data

Json

Contract abi

results.data.name

String

Name of contract

results.data.type

String

Type of contract

results.data.inputs

String

Array of contract objects

results.data.inputs.name

String

Name of parameter

results.data.inputs.type

String

Type of parameter

results.data.inputs.internalType

String

Internal type of parameter

results.data.output

String

Array similar to inputs

results.data.stateMutability

String

Blockchain state value

RESPONSE SAMPLE

Get contract source code for verified contract source code

URI

network

uri

Mainnet

GET https://explorerapi.wemix.com/v1/contracts/{contract_address}/code

Testnet

GET https://explorerapi.test.wemix.com/v1/contracts/{contract_address}/code

REQUEST PARAMETER

  • HEADER

key

value

required

api-key

api-key

true

  • PATH VARIABLE

key

type

value

required

contract_address

String

Verified contract address

true

REQUEST SAMPLE

RESPONSE PARAMETER

key

type

value

status

String

Status of request

message

String

Response Message of request

results

Json

Results of request

results.data

List<Object>

List of data

results.data.address

String

Contract address

results.data.logo

String

Logo set during contract code verification

results.data.compiler

String

Solidity compiler version

results.data.libraries

String

Libraries List

results.data.verify_data

String

Contract code validation date

results.data.contract_name

String

Name of contract

results.data.runs_optimizer

String

Value of time which running optimizer

results.optimization_enabled

String

Identify if optimization is enable or not - 1: enable - Other number: not

results.data.contract_code

String

Contract code deployed on the network

results.date.contract_abi

Json

Abi of contract

results.data.contract_source

String

Solidity contract code

constructor_arguments

String

Arguments of constructor

reuslts.data.swam_source

String

Address of swarm source

reuslts.data.verify_status

String

Contract code verify status

reuslts.data.verify_message

String

Message written during contract code verification

RESPONSE SAMPLE

Verify contract source code

URI

network

uri

Mainnet

POST https://explorerapi.wemix.com/v1/contracts/{contract_address}/verify

Testnet

POST https://explorerapi.test.wemix.com/v1/contracts/{contract_address}/verify

REQUEST PARAMETER

  • HEADER

key

value

required

api-key

api-key

true

  • BODY(application/json)

key

type

value

contract_name

String

Name of contract

compiler

String

Solidity compiler version

runs_optimizer

Integer

Value of time which running optimizer

optimization_enabled

Integer

Identify if optimization is enable or not - 1: enable - Other number: not

contract_source

String

Solidity contract code(base64 encoding)

constructor_arguments

String

Arguments of constructor

libraries

List<Object>

Library list used for the contract

REQUEST SAMPLE

RESPONSE PARAMETER

key

type

value

results

Json

Result of verification process - 0: Failed - 1: Success

RESPONSE SAMPLE