List for Purchase - tx

List 𝔉rc20 token to the marketplace for purchase

Example of Fixes Inscription data string:

op=list-sellnow,tick=fixes,amt=100000.0,price=0.001

Transaction parameters:

Key
Required
FType
Description

tick

t.String

Ticker: identity of the 𝔉rc20 token

buyAmount

t.UFix64

Amount to buy: States the amount of the 𝔉rc20 token to buy

buyPrice

t.UFix64

Total Price: The total price of buying these 𝔉rc20 tokens.

commissionAddr

t.Address

The address for collecting fees commission splits, 10% of the fees will be sent to this address. (If the listing is not listed in the official market, the original 10% of deployers will be overrided as commission. learn more)

customID

t.String

The third party market identity (eg. MyMarket)

Transaction code example:

import txUserListAsSellNow from "@fixes/contracts/transactions/marketplace/user-list-as-sell-now-with-commission.cdc?raw";

async function userListAsSellNow(
  tick: string,
  buyAmount: number,
  buyPrice: number,
  commissionAddr: string,
  customID: string,
) {
  const txid = await flow.sendTransaction(flowSrv, txUserListAsSellNow, (arg, t) => [
    arg(tick, t.String),
    arg(buyAmount.toFixed(8), t.UFix64),
    arg(buyPrice.toFixed(8), t.UFix64),
    arg(commissionAddr, t.Address),
    arg(customID, t.String),
  ]);
  return txid;
}

Transaction source code

Last updated