Function: buildCreateGateTx()
buildCreateGateTx(
packageId,platformConfigId,opts):Transaction
Defined in: ptb.ts:180
Build a PTB that creates a new gate with an immutable policy (default: unrestricted). packageId is the call target (latest published-at).
priceMist > 0callscreate_gate; the price must be at least the platform'sminimumPaidPriceMistor the call aborts (E_PRICE_TOO_LOW, 11).priceMist == 0callscreate_free_gate, payingfreeGateFeeMist(the platform's currentfree_gate_fee_mist, fromfetchPlatformConfig) out of gas; an excess is refunded on-chain.
Parameters
packageId
string
platformConfigId
string
opts
autoBurnAtZero
boolean
defaultUses
number | bigint
freeGateFeeMist?
number | bigint
Required when priceMist is 0: the free-gate fee to pay.
nftDescription
string
nftImageUrl
string
nftName
string
paymentRecipient
string
policy?
Immutable restrictions for this gate; omit for the unrestricted default.
priceMist
number | bigint
soulbound
boolean
Returns
Transaction
Throws
if policy is an invalid combination (validateGatePolicy); the contract would abort with E_POLICY_COMBINATION (15), so no transaction is built.