Market
A perpetual market.

Types

1
class Bid {
2
constructor(
3
public amount: u128,
4
public bidder: AccountId,
5
public recipient: AccountId,
6
public sell_on_share: u16,
7
public currency: CurrencyId = 'near'
8
) {}
9
}
Copied!
1
class BidShares {
2
constructor(
3
public prev_owner: u16,
4
public creator: u16,
5
public owner: u16
6
) {}
7
}
Copied!
1
class Ask {
2
amount: u128 // Amount asked
3
currency: CurrencyId = 'near' // currency of ask, default is NEAR
4
sell_on_share: u16 // % to pay to previous owner on this sale
5
constructor() {}
6
}
Copied!

Methods

get
[market-contract]
.get_bids(token_id)
Get Bids
get
[market-contract]
.get_bidders_bids(account_id)
Get Bidders Bids
post
[market-contract]
.set_bid_shares(token_id, prev_owner, creator, owner)
Set Bid Shares
post
[market-contract]
.set_bid(token_id, amount, bidder, recipient, sell_on_share, currency)
Set Bid
delete
[market-contract]
.remove_bid(token_id, bidder)
Remove Bid
get
[market-contract]
.burn(token_id)
Burn
patch
[market-contract]
.accept_bid(token_id, bidder, creator, owner, prev_owner)
Accept Bid
Last modified 4mo ago