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:

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