List for Sale - tx

List 𝔉rc20 token to the marketplace for sale

Example of Fixes Inscription data string:

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

Transaction parameters:

KeyRequiredFTypeDescription

tick

t.String

Ticker: identity of the 𝔉rc20 token

sellAmount

t.UFix64

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

sellPrice

t.UFix64

Total Price: The total price of selling 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 txUserListAsBuyNow from "@fixes/contracts/transactions/marketplace/user-list-as-buy-now-with-commission.cdc?raw";

async function userListAsBuyNow(
  tick: string,
  sellAmount: number,
  sellPrice: number,
  commissionAddr: string,
  customID: string,
) {
  const txid = await flow.sendTransaction(txUserListAsBuyNow, (arg, t) => [
    arg(tick, t.String),
    arg(sellAmount.toFixed(8), t.UFix64),
    arg(sellPrice.toFixed(8), t.UFix64),
    arg(commissionAddr, t.Address),
    arg(customID, t.String),
  ]);
  return txid;
}

Transaction source code

Last updated