buy
Buys a token that has been listed on the mintbase market as long as the price provided is greater than what it is currently listed for.
The token is specified via tokenId
and the corresponding nftContractId
.
The nftContactId can be supplied as an argument or through the CONTRACT_ADDRESS
environment variable.
An affiliate kickback is also possible using the referrer field. This allows markets to specify an account to receive affiliante gains. This totals to 1.25% per purchase and works as a built in business model.
Market address default values depend on the NEAR_NETWORK
environment variable. If you set it to mainnet
you will get the mainnet address simple.market.mintbase1.near
otherwise it will default to the testnet
value market-v2-beta.mintspace2.testnet
.
As with all new SDK api methods, this call should be wrapped in execute and passed a signing method
buy(args: BuyArgs): NearContractCall
buy
takes a single argument of type BuyArgs
React example
Example usage of buy method in a hypothetical React component:
Last updated