Admin Methods

setContractUri

Set the contract URI of the marketplace contract

Parameter

ArgumentTypeDescription
uristringThe new uri string of the marketplace contract
signerSignerAn instance to represent the one of the admins' wallet accounts.

Response

FieldTypeDescription
typenumberThe EIP-2718 type of this transaction.
chainIdnumberThe id of the network.
noncenumberThe nonce used as part of the proof-of-work to mine this block
maxPriorityFeePerGasBigNumberThe price (in wei) per unit of gas for this transaction.
maxFeePerGasBigNumberThe maximum price (in wei) per unit of gas this transaction will pay for (the combined EIP-1559 block's base fee and this transaction's priority fee).
gasPriceBigNumberThe price (in wei) per unit of gas this transaction will pay.
gasLimitBigNumberThe maximum amount of gas that this block was permitted to use.
tostringThe address of the target.
valueBigNumberThe amount (in wei) this transaction is sending.
datastringTransaction data.
accessListAccessListThe AccessList to include; only available for EIP-2930 and EIP-1559 transactions.
hashstringTransaction hash.
vnumberValues for the transaction's signature.
rstringValues for the transaction's signature.
sstringValues for the transaction's signature.
fromstringThe sender address of the transaction.
confirmationsnumberThe number of blocks that have been mined (including the initial block) since this transaction.

Example

const newUri = <NEW_URI>
await marketplaceSdk.setContractURI(newUri, owner)| Field                | Type       | Description                                                                                                                                                                                                                                     |
| -------------------- | ---------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| type                 | number     | The [EIP-2718](https://eips.ethereum.org/EIPS/eip-2718) type of this transaction.                                                                                                                                                               |
| chainId              | number     | The id of the network.                                                                                                                                                                                                                          |
| nonce                | number     | The nonce used as part of the proof-of-work to mine this block                                                                                                                                                                                  |
| maxPriorityFeePerGas | BigNumber  | The price (in wei) per unit of gas for this transaction.                                                                                                                                                                                        |
| maxFeePerGas         | BigNumber  | The maximum price (in wei) per unit of gas this transaction will pay for (the combined [EIP-1559](https://eips.ethereum.org/EIPS/eip-1559) block's base fee and this transaction's priority fee).                                               |
| gasPrice             | BigNumber  | The price (in wei) per unit of gas this transaction will pay.                                                                                                                                                                                   |
| gasLimit             | BigNumber  | The maximum amount of gas that this block was permitted to use.                                                                                                                                                                                 |
| to                   | string     | The address of the target.                                                                                                                                                                                                                      |
| value                | BigNumber  | The amount (in wei) this transaction is sending.                                                                                                                                                                                                |
| data                 | string     | Transaction data.                                                                                                                                                                                                                               |
| accessList           | AccessList | The [AccessList](https://docs.ethers.org/v5/api/providers/types/#providers-AccessList) to include; only available for [EIP-2930](https://eips.ethereum.org/EIPS/eip-2930) and [EIP-1559](https://eips.ethereum.org/EIPS/eip-1559) transactions. |
| hash                 | string     | Transaction hash.                                                                                                                                                                                                                               |
| v                    | number     | Values for the _transaction's_ signature.                                                                                                                                                                                                       |
| r                    | string     | Values for the _transaction's_ signature.                                                                                                                                                                                                       |
| s                    | string     | Values for the _transaction's_ signature.                                                                                                                                                                                                       |
| from                 | string     | The sender address of the transaction.                                                                                                                                                                                                          |
| confirmations        | number     | The number of blocks that have been mined (including the initial block) since this transaction.    

updateFees

Modify the information of feeReceiver , listingFeeToken , listingFee and fulfillmentFeeBPS of the marketplace contract

Parameter

ArgumentTypeDescription
feeReceiverstringThe wallet address of the new feeReceiver
listingFeeTokenstringThe new token address of the listing fee
listingFeestringThe new amount of listing fee of marketplace contract
fulfillmentFeeBPSstringThe new amount of the fulfillmenFeeBPS. It must be less than or equal to the bps_denom and maxFulfillmentFeeBPS of the marketplace contract
signerSignerAn instance to represent the one of the admins' wallet accounts.

Response

FieldTypeDescription
typenumberThe EIP-2718 type of this transaction.
chainIdnumberThe id of the network.
noncenumberThe nonce used as part of the proof-of-work to mine this block.
maxPriorityFeePerGasBigNumberThe price (in wei) per unit of gas for this transaction.
maxFeePerGasBigNumberThe maximum price (in wei) per unit of gas this transaction will pay for (the combined EIP-1559 block's base fee and this transaction's priority fee).
gasPriceBigNumberThe price (in wei) per unit of gas this transaction will pay.
gasLimitBigNumberThe maximum amount of gas that this block was permitted to use.
tostringThe address of the target.
valueBigNumberThe amount (in wei) this transaction is sending.
datastringTransaction data.
accessListAccessListThe AccessList to include; only available for EIP-2930 and EIP-1559 transactions.
hashstringTransaction hash.
vnumberValues for the transaction's signature.
rstringValues for the transaction's signature.
sstringValues for the transaction's signature.
fromstringThe sender address of the transaction.
confirmationsnumberThe number of blocks that have been mined (including the initial block) since this transaction.

Example

const feeReceiver = <NEW_FEE_RECEIVER>
const listingFeeToken = <NEW_LISTING_FEE_TOKEN>
const listingFee = <NEW_LISTING_FEE_AMOUNT>
const fulfillmentFeeBPS = <NEW_FULFILLMENTFEEBPS>
await marketplaceSdk.updateFees(feeReciever, listingFeeToken, listingFee, fulfillmentFeeBPS)

updateListerWhitelist

Modify the lister whitelist of the marketplaceContract to include or remove wallet addresses from the lister whitelist if listWhitelist of the marketplace contract is true

Parameter

ArgumentTypeDescription
listersstring[]List of wallet addresses that will be included or removed from the lister whitelist of the marketplace contract
isEnabledboolean[]Array of boolean value that listers[i] will be included in marketplace lister white list if isEnabled[i] is true. Vice versa.
signerSignerAn instance to represent the one of the admins' wallet accounts.

Response

FieldTypeDescription
typenumberThe EIP-2718 type of this transaction.
chainIdnumberThe id of the network.
noncenumberThe nonce used as part of the proof-of-work to mine this block.
maxPriorityFeePerGasBigNumberThe price (in wei) per unit of gas for this transaction.
maxFeePerGasBigNumberThe maximum price (in wei) per unit of gas this transaction will pay for (the combined EIP-1559 block's base fee and this transaction's priority fee).
gasPriceBigNumberThe price (in wei) per unit of gas this transaction will pay.
gasLimitBigNumberThe maximum amount of gas that this block was permitted to use.
tostringThe address of the target.
valueBigNumberValues for the transaction's signature.
datastringTransaction data.
accessListAccessListThe AccessList to include; only available for EIP-2930 and EIP-1559 transactions.
hashstringTransaction hash.
vnumberValues for the transaction's signature.
rstringValues for the transaction's signature.
sstringValues for the transaction's signature.
fromstringThe sender address of the transaction.
confirmationsnumberThe number of blocks that have been mined (including the initial block) since this transaction.

Example

const lister1 = <LISTER_ADDRESS1>
const lister2 = <LISTER_ADDRESS2>
await marketplaceSdk.updateListerWhitelist([lister1, lister2], [true, false], owner)

updateNFTWhitelist

Modify the nft whitelist of the marketplaceContract to include or remove token addresses from the nft whitelist if nftWhitelist of the marketplace contract is true

Parameter

ArgumentTypeDescription
nftAddressesstring[]List of nft contract addresses that will be included or removed from the nft whitelist of the marketplace contract
isEnabledboolean[]Array of boolean value that nftAddresses[i] wil be included in marketplace nft white list if isEnabled[i] is true. Vice versa.
signerSignerAn instance to represent the one of the admins' wallet accounts.

Response

FieldTypeDescription
typenumberThe EIP-2718 type of this transaction.
chainIdnumberThe id of the network.
noncenumberThe nonce used as part of the proof-of-work to mine this block.
maxPriorityFeePerGasBigNumberThe price (in wei) per unit of gas for this transaction.
maxFeePerGasBigNumberThe maximum price (in wei) per unit of gas this transaction will pay for (the combined EIP-1559 block's base fee and this transaction's priority fee).
gasPriceBigNumberThe price (in wei) per unit of gas this transaction will pay.
gasLimitBigNumberThe maximum amount of gas that this block was permitted to use.
tostringThe address of the target.
valueBigNumberThe amount (in wei) this transaction is sending.
datastringTransaction data.
accessListAccessListThe AccessList to include; only available for EIP-2930 and EIP-1559 transactions.
hashstringTransaction hash.
vnumberValues for the transaction's signature.
rstringValues for the transaction's signature.
sstringValues for the transaction's signature.
fromstringThe sender address of the transaction.
confirmationsnumberThe number of blocks that have been mined (including the initial block) since this transaction.

Example

const nft1 = <NFT_ADDRESS1>
const nft2 = <NFT_ADDRESS2>
await marketplaceSdk.updateNFTWhitelist([nft1, nft2], [true, false], owner)

updatePaymentWhitelist

Modify the payment whitelist of the marketplaceContract to include or remove token addresses from the payment whitelist if paymentWhitelist of the marketplace contract is true

Parameter

ArgumentTypeDescription
paymentAddressesstring[]List of crypto token addresses that will be included or removed from the payment whitelist of the marketplace contract
isEnabledboolean[]Array of boolean value that paymentAddresses[i] wil be included in marketplace payment white list if isEnabled[i] is true. Vice versa.
signerSignerAn instance to represent the one of the admins' wallet accounts.

Response

ArgumentTypeDescription
typenumberThe EIP-2718 type of this transaction.
chainIdnumberThe id of the network.
noncenumberThe nonce used as part of the proof-of-work to mine this block.
maxPriorityFeePerGasBigNumberThe price (in wei) per unit of gas for this transaction.
maxFeePerGasBigNumberThe maximum price (in wei) per unit of gas this transaction will pay for (the combined EIP-1559 block's base fee and this transaction's priority fee).
gasPriceBigNumberThe price (in wei) per unit of gas for this transaction.
gasLimitBigNumberThe maximum amount of gas that this block was permitted to use.
tostringThe address of the target.
valueBigNumberThe maximum amount of gas that this block was permitted to use.
datastringTransaction data.
accessListAccessListThe AccessList to include; only available for EIP-2930 and EIP-1559 transactions.
hashstringTransaction hash.
vnumberValues for the transaction's signature.
rstringValues for the transaction's signature.
sstringValues for the transaction's signature.
fromstringThe sender address of the transaction.
confirmationsnumberThe number of blocks that have been mined (including the initial block) since this transaction.

Example

const payment1 = <TOKEN_ADDRESS_1>
const payment2 = <TOKEN_ADDRESS_2>
await marketplaceSdk.updatePaymentWhitelist([payment1, payment2], [true, false], buyer)