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:

Key
Required
FType
Description

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

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