The EVM Blockchain Adapter purpose is to provide an API so we can interact with our EVM smart contracts.
Currently it supports the following functionality:
- Collection: Interact with a collection smart contract
- Sale: Interact with a sale smart contract
- Marketplace: Interact with a marketplace
Owner Of
Get the owner of the tokenId token of collection contract contractAddress.
Authorizations:
path Parameters
| contractAddress required | string Example: 0xCfEB869F69431e42cdB54A4F4f105C19C080A601 A collection contract address |
| tokenId required | number Example: 1 The token id |
Responses
Response samples
- 200
{- "owner": "0xFFcf8FDEE72ac11b5c542428B35EEF5769C409f0"
}Token URI
Get the token URI of the tokenId token of collection contract contractAddress.
Authorizations:
path Parameters
| contractAddress required | string Example: 0xCfEB869F69431e42cdB54A4F4f105C19C080A601 A collection contract address |
| tokenId required | number Example: 1 The token id |
Responses
Response samples
- 200
{- "tokenURI": "https://api.example.com/v1/1 "
}Approved For All
Get if the operator is allowed to manage all of the assets of owner for collection contract contractAddress.
Authorizations:
path Parameters
| contractAddress required | string Example: 0xCfEB869F69431e42cdB54A4F4f105C19C080A601 A collection contract address |
| owner required | string Example: 0xFFcf8FDEE72ac11b5c542428B35EEF5769C409f0 The tokens owner |
| operator required | string Example: 0x22d491Bde2303f2f43325b2108D26f1eAbA1e32b The operator of the tokens |
Responses
Response samples
- 200
{- "isApprovedForAll": true
}Approve Encoded
Get a transaction encoded data to approve:
Give permission to to to transfer tokenId token of contractAddress contract to another account. The approval is cleared when the token is transferred. Only a single account can be approved at a time, so approving the zero address clears previous approvals. The caller should be the token owner or approved for all.
The end-user caller is required to sign the transaction and submit it via his wallet.
Authorizations:
path Parameters
| contractAddress required | string Example: 0xCfEB869F69431e42cdB54A4F4f105C19C080A601 A collection contract |
Request Body schema: application/json
| caller required | string |
| to required | string |
| tokenId required | integer <int32> |
Responses
Request samples
- Payload
{- "caller": "0xFFcf8FDEE72ac11b5c542428B35EEF5769C409f0 ",
- "to": "0x22d491Bde2303f2f43325b2108D26f1eAbA1e32b ",
- "tokenId": 0
}Response samples
- 200
{- "from": "0xFFcf8FDEE72ac11b5c542428B35EEF5769C409f0",
- "maxFeePerGas": "0x80be6278",
- "maxPriorityFeePerGas": "0x7b1b1304",
- "to": "0xCfEB869F69431e42cdB54A4F4f105C19C080A601",
- "data": "0x095ea7b30000000000000000000000009b1f7f645351af3631a656421ed2e40f2802e6c00000000000000000000000000000000000000000000000000000000000000002",
- "type": "0x2",
- "gas": "0xb8db"
}Set Approval For All Encoded
Get a transaction encoded data to set approval for all:
Approve or remove operator as an operator for contractAddress contract for the owner. Operators can call {transferFrom} or {safeTransferFrom} for any token of contractAddress collection contract owned by the owner.
A use case is to approve the marketplace (operator) to move the owner's tokens only for the collection specified in contractAddress.
The end-user owner is required to sign the transaction and submit it via his wallet.
Authorizations:
path Parameters
| contractAddress required | string Example: 0xCfEB869F69431e42cdB54A4F4f105C19C080A601 A collection contract |
Request Body schema: application/json
| owner required | string |
| operator required | string |
| approved required | boolean |
Responses
Request samples
- Payload
{- "owner": "0xFFcf8FDEE72ac11b5c542428B35EEF5769C409f0 ",
- "operator": "0x22d491Bde2303f2f43325b2108D26f1eAbA1e32b ",
- "approved": true
}Response samples
- 200
{- "from": "0xFFcf8FDEE72ac11b5c542428B35EEF5769C409f0",
- "maxFeePerGas": "0x7f9d5683",
- "maxPriorityFeePerGas": "0x7c024daf",
- "to": "0xCfEB869F69431e42cdB54A4F4f105C19C080A601",
- "data": "0xa22cb4650000000000000000000000009b1f7f645351af3631a656421ed2e40f2802e6c00000000000000000000000000000000000000000000000000000000000000001",
- "type": "0x2",
- "gas": "0xb154"
}Get royalty info
Gets royalty info for the given token id and sale price
Authorizations:
Request Body schema: application/json
| contractAddress required | string The contract address of the collection. |
| tokenId required | integer <int32> The token id. |
| salePrice required | integer <int32> The sale price. |
Responses
Request samples
- Payload
{- "contractAddress": "0xCfEB869F69431e42cdB54A4F4f105C19C080A601",
- "tokenId": 2,
- "salePrice": 3
}Response samples
- 200
{- "receiver": "0xCfEB869F69431e42cdB54A4F4f105C19C080A601",
- "amount": "0.1"
}Buy Token
Create a transaction encoded data to buy a token from the market. The end-user is required to sign the transaction and submit it via his wallet.
Authorizations:
Request Body schema: application/json
| saleContractAddress required | string The contract address of the sale. |
| tokenId required | integer <int32> |
| wallet required | string The address of the buyer. |
| price required | string The token's price to pay. |
| network required | string The network the transaction will be executed. |
Responses
Request samples
- Payload
{- "saleContractAddress": "0x254dffcd3277C0b1660F6d42EFbB754edaBAbC2B",
- "tokenId": "1",
- "wallet": "0xFFcf8FDEE72ac11b5c542428B35EEF5769C409f0",
- "price": "2",
- "network": "polygon"
}Response samples
- 200
{- "from": "0xFFcf8FDEE72ac11b5c542428B35EEF5769C409f0",
- "gas": "0x14743",
- "maxFeePerGas": "0x9ea854d3",
- "maxPriorityFeePerGas": "0x83fa4e0d",
- "value": "0x1bc16d674ec80000",
- "data": "0xb1fd32e60000000000000000000000000000000000000000000000000000000000000020000000000000000000000000ffcf8fdee72ac11b5c542428b35eef5769c409f00000000000000000000000000000000000000000000000001bc16d674ec80000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000041068fdfc4324999962211794caacca5a55c801d753c7dee3d3d7a95f8b5a4632b4a245ebfd1e55b2a8d7993a8f5dd50b7176016ea14d0ae0dfd47b7984c17650a1c00000000000000000000000000000000000000000000000000000000000000",
- "type": "0x2",
- "to": "0x254dffcd3277C0b1660F6d42EFbB754edaBAbC2B"
}Create Listing
Get a transaction encoded data to create a listing for the given token. The end-user is required to sign the transaction and submit it via his wallet.
Authorizations:
Request Body schema: application/json
| listingId required | number The listing id. |
| listingOwner required | string The listing owner. |
| startDate required | number The start date of the listing. |
| endDate required | number The end date of the listing. |
| price required | number The price of the listing in eth. |
required | object |
| royaltyFee | number The royalty fee of the listing. |
| royaltyRecipient | string The royalty recipient address. |
required | object |
Responses
Request samples
- Payload
{- "listingId": 1,
- "listingOwner": "0x90F8bf6A479f320ead074411a4B0e7944Ea8c9C1",
- "startDate": 1664446541,
- "endDate": 1664446541,
- "price": 2,
- "collection": {
- "address": "0xCfEB869F69431e42cdB54A4F4f105C19C080A601"
}, - "metadata": {
- "tokenIds": [
- 1
]
}
}Response samples
- 200
{- "from": "0xFFcf8FDEE72ac11b5c542428B35EEF5769C409f0",
- "to": "0x9b1f7F645351AF3631a656421eD2e40f2802E6c0",
- "maxFeePerGas": "0x87b2eb51",
- "maxPriorityFeePerGas": "0x82cc690a",
- "data": "0x9975dffe0000000000000000000000000000000000000000000000000000000000000001000000000000000000000000cfeb869f69431e42cdb54a4f4f105c19c080a60100000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000001bc16d674ec800000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000006320ec3e00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
- "type": "0x2",
- "gas": "0x3d9b5"
}Update Listing
Get a transaction encoded data to update the price of a listing. The end-user is required to sign the transaction and submit it via his wallet.
Authorizations:
Request Body schema: application/json
| listingOwner required | string The listing owner. |
| contractListingId required | number The contract listing id. |
| price required | number The new price of the listing in eth. |
Responses
Request samples
- Payload
{- "listingOwner": "0x90F8bf6A479f320ead074411a4B0e7944Ea8c9C1",
- "contractListingId": 1,
- "price": 5
}Response samples
- 200
{- "from": "0xFFcf8FDEE72ac11b5c542428B35EEF5769C409f0",
- "to": "0x9b1f7F645351AF3631a656421eD2e40f2802E6c0",
- "maxFeePerGas": "0x84977032",
- "maxPriorityFeePerGas": "0x80c128e5",
- "data": "0x0179ea8800000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000004563918244f40000",
- "type": "0x2",
- "gas": "0x9bdb"
}Cancel Listing
Get a transaction encoded data to cancel a listing. The end-user is required to sign the transaction and submit it via his wallet.
Authorizations:
Request Body schema: application/json
| contractListingId required | number The contract listing id. |
| listingOwner required | string The listing owner. |
Responses
Request samples
- Payload
{- "listingOwner": "0x90F8bf6A479f320ead074411a4B0e7944Ea8c9C1",
- "contractListingId": 1
}Response samples
- 200
{- "from": "0xFFcf8FDEE72ac11b5c542428B35EEF5769C409f0",
- "to": "0x9b1f7F645351AF3631a656421eD2e40f2802E6c0",
- "maxFeePerGas": "0x87dd30f8",
- "maxPriorityFeePerGas": "0x846b893b",
- "data": "0x305a67a80000000000000000000000000000000000000000000000000000000000000001",
- "type": "0x2",
- "gas": "0x9ae8"
}Fullfill Listing (purchase)
Get a transaction encoded data to fullfil a listing, that is to purchase the listing's token. The end-user is required to sign the transaction and submit it via his wallet.
Authorizations:
Request Body schema: application/json
| listingBuyer required | string The listing buyer. |
| contractListingId required | number The contract listing id. |
| price required | number The price of the listing. |
Responses
Request samples
- Payload
{- "listingBuyer": "0x90F8bf6A479f320ead074411a4B0e7944Ea8c9C1",
- "contractListingId": 1,
- "price": 2
}Response samples
- 200
{- "from": "0x22d491Bde2303f2f43325b2108D26f1eAbA1e32b",
- "to": "0x9b1f7F645351AF3631a656421eD2e40f2802E6c0",
- "maxFeePerGas": "0x7e3d6e5a",
- "maxPriorityFeePerGas": "0x7b6e16e3",
- "data": "0xefef39a10000000000000000000000000000000000000000000000000000000000000002",
- "value": "0x1bc16d674ec80000",
- "type": "0x2",
- "gas": "0x1dc63"
}Version
Returns the version of the EVM Blockchain Adapter service.
Authorizations:
Responses
Response samples
- 200
{- "version": "1.0.0",
- "git_revision": "36a5a67",
- "branch": "btc-70_collection-controller",
- "@wappier/xanadu-lib": "1.3.3",
- "env": "local_test",
- "hostname": "LP-AP",
- "ips": [
- "172.21.192.1",
- "192.168.56.1",
- "10.32.1.193",
- "172.20.10.2"
]
}