Skip to content

cancelauct.a

Cancel an an Uniq auction without any bids

Technical Behavior

The action checks that the auction exists in the auction.a table with the specified Uniq with ID token_id.

If the auction has reached its expiration date, the canceler can be any account, including the auction creator. Otherwise, only the auction creator can cancel an auction.

If the auction contains a bidder, the action will fail.

If all checks pass successfully, the auction will be erased from the auction.a table.

Action Parameters

Property NameC++ TypeJavaScript TypeDescription
token_iduint64_tNumberUniq ID for which the auction needs to be canceled
cancelernameStringAccount that authorizes the transaction
memostringStringMemo

CLI - cleos

bash
cleos push action eosio.nft.ft cancelauct.a '[1, "alice", "cancel the auction"]' -p alice@active

JavaScript - eosjs

js
await transact(
    [
        {
            account: 'eosio.nft.ft',
            name: 'cancelauct.a',
            authorization: [{ actor: 'alice', permission: 'active' }],
            data: {
                token_id: 1,
                canceler: "alice",
                memo: "cancel the auction",
            },
        },
    ],
    {
        blocksBehind: 3,
        expireSeconds: 30,
    }
);