Skip to content

stofrcfg.a ​

Set global Uniq offer configuration

Behavior ​

Set global configurations for all Uniq offers that will be made on either a Uniq or a Uniq factory.

Technical Behavior ​

Only ultra.nft.ft account can set Uniq offer configurations.

The action stores the configurations to offercfg.a singleton table with the specified arguments.

All fields are optional, the action will only update the specified arguments and leave the rest the same as existing entry or as the default value if there’s no existing entry.

The action even accepts the same values as the ones currently stored in offercfg.a.

eosio.nft.ft pays RAM usage.

min_price must be positive, and only supports UOS and USD.

Both min_duration and max_duration must be positive, with max_duration must be greater than min_duration.

max_active_offer_per_user must also be positive.

Action Parameters ​

Property NameC++ TypeJavaScript TypeDescription
min_priceoptional<asset>String/NullMinimum offer price
min_durationoptional<uint32_t>Number/String/NullMinimum offer duration
max_durationoptional<uint32_t>Number/String/NullMaximum offer duration
max_active_offer_per_useroptional<uint32_t>Number/String/NullMaximum number of offers, which includes both Uniq and factory offers

CLI - cleos ​

bash
cleos push action eosio.nft.ft stofrcfg.a '{"min_price": "1.00000000 UOS", "min_duration": 86400, "max_duration": 15552000, "max_active_offer_per_user": 20}' -p ultra.nft.ft@active

JavaScript - eosjs ​

js
await transact(
    [
        {
            account: 'eosio.nft.ft',
            name: 'stofrcfg.a',
            authorization: [{ actor: 'ultra.nft.ft', permission: 'active' }],
            data: {
                min_price: "1.00000000 UOS",
                min_duration: 86400,
                max_duration: 15552000,
                max_active_offer_per_user: 20
            },
        },
    ],
    {
        blocksBehind: 3,
        expireSeconds: 30,
    }
);