Skip to Content
X404 Protocol docs
Official documentation/ SDK and examples
X404 · Official documentation v1

Go SDK

Complete queries, transactions and events; HTTP by default, WSS optional.

Standalone Go module#

During initialization the creator can save initial settings, but recruitment, wars and issuance stay closed. Completing initialization permanently removes the creator’s parameter-editing rights while preserving creator and LP principal-beneficiary identity. Afterwards, settings, recipients, issuance, buybacks and extension permissions require an operations proposal and reviewer approval.

Operations edits current values and submits a proposal without changing active settings. The reviewer checks targets, amounts and changes under Parameters and review, then approves the exact stored batch. Execution is atomic and failure rolls back the batch. Proposals expire after 7 days; each approval invalidates other proposals for the old configuration revision. Game approval requires no further platform multisig or additional timelock.

Fresh deployments from 2026-10-24: Recruit 100 (default admission mining power, configurable per game) → Warrior 300 → Chief 2,700 → Retirement 8,100 mining power, paid on each actual milestone, totaling 11,200 per full cycle at the default. Later paid cycles earn real promotions again. Free seed warriors receive no admission or initial warrior reward. Taking over a seat (paid takeover or accepted transfer) pays the admission and warrior amounts on that seat's first handover (after an accepted transfer, once the new holder fills the seat); later paid takeovers pay only admission and later transfers pay nothing. Replacement is not retirement.

All mining power uses this game’s 6-decimal Honor.goldBalance ledger. Admission, promotion, retirement and the once-only profile reward increase lifetime combat power. Tasks, wars, sales and ordinary extensions only credit mining power. Spending never reduces power. Country creation/joining cost 10,000 / 20 mining power. Initial prestige imports lifetime power; leaving removes it and rejoining imports it once again.

Each game has its own mining power redemption pool. Availability, claim times and actual redemption results are determined by the game page and on-chain transactions.

Game tokens default to 6 decimals. The creator may select an integer from 0–18, including 0; decimals cannot change after issuance. One token equals 10^decimals base units: at 6 decimals, 1 token = 1,000,000 base units. Calculations use exact base units and the UI formats actual precision. mining power uses 6 decimals and BNB keeps 18 decimals; rates use bps and lifetime combat power uses integers.

TokenConfig appends a uint8 decimals field. supply, issuance budgets, transfers, approvals, tax amounts, locks, airdrops and token swap amounts remain integer base units: TypeScript bigint, Go *big.Int, and decimal integer strings in HTTP JSON. The SDK does not scale amounts automatically; token literals and budget variables in examples are also base units. Before issuance, read decimals from treasury getTokenConfig(); afterwards, read the token’s decimals(). TypeScript uses parseUnits(text, decimals) / formatUnits(raw, decimals); Go scales with integer arithmetic using 10^decimals. Avoid floating-point conversion and double scaling.

The standalone module uses the import path github.com/0xfnzero/x404-sdk-go and package name x404. The current version uses Go 1.26.10 and go-ethereum 1.17.8.

Both the Go and JavaScript/TypeScript SDKs provide contract queries, transaction preparation and submission, event decoding, historical replay, continuous HTTP synchronization and optional WSS subscriptions. APIs are not divided by frontend/backend role. Use Go in services, CLI tools or native clients; browser websites use the npm SDK rather than loading a Go module.

Get the Go SDK archive from SDK and ABI downloads, then configure a local replace using the commands below to use the shared module import path in your project.

sh
mkdir -p vendor-src/x404-go-sdk
tar -xzf x404-go-sdk-0.1.0.tar.gz --strip-components=1 -C vendor-src/x404-go-sdk
go mod edit -replace github.com/0xfnzero/x404-sdk-go=./vendor-src/x404-go-sdk
go get github.com/0xfnzero/x404-sdk-go

Query social data#

go
package main

import (
    "context"
    "fmt"
    "log"
    "math/big"
    "os"
    x404 "github.com/0xfnzero/x404-sdk-go"
    "github.com/ethereum/go-ethereum/ethclient"
)

func main() {
    ctx := context.Background()
    rpc, err := ethclient.DialContext(ctx, os.Getenv("RPC_URL"))
    if err != nil { log.Fatal(err) }
    defer rpc.Close()
    address, err := x404.Address(os.Getenv("SOCIAL_ADDRESS"))
    if err != nil { log.Fatal(err) }
    social, err := x404.NewSocialClient(rpc, address)
    if err != nil { log.Fatal(err) }
    chain, ok := new(big.Int).SetString(os.Getenv("CHAIN_ID"), 10)
    if !ok { log.Fatal("invalid CHAIN_ID") }
    if err := social.Verify(ctx, rpc, chain); err != nil { log.Fatal(err) }
    page, err := social.Posts(ctx, big.NewInt(0), 20)
    if err != nil { log.Fatal(err) }
    fmt.Println(page.Posts, page.NextCursor)
}

API comparison#

CapabilitiesGo methods
Identity and informationVerify, ProfileID, ProfileOwner, Username, ResolveUsername, Profile, SetProfile, SetProfileWithUsername, SetUsername
Social relationsFollow, Unfollow, FollowBatch, UnfollowBatch, IsFollowing, FollowerCount, FollowingCount, Followers, Following
ContentPublishPost, Post, Posts, AuthorPosts, Replies, SetLike, Liked
Social Fission Game ModuleNewPlatformClient, Count, Games, Game, NewGameClient, Config, mining power, PrepareJoin, GameCreation
Platform CL liquidity lockNewCLLockClient, CLLockDeposit, LockBeneficiary, LockTranche, PrepareCreate, Create
Other getters and modulesNewContract, Call, Prepare, Transact, DecodeError, ABI
EventsNewDecoder, Decode, Scan, Subscribe, Watch, Checkpoint, ReorgError

Integers use *big.Int; Post's ID/ParentID, all amounts, and cursors are not converted to floating point. Typed methods return normal Go structs and do not expose ABI anonymous tuples.

Address rejects a mixed-case address whose EIP-55 checksum is wrong; all-lowercase and all-uppercase addresses are still accepted. In PrepareJoin(ctx, rpc, inviter, maxFee), maxFee (wei) is required: it is the most you agree to pay, and a higher current fee returns an error. Programs that sign automatically should use a fixed limit, not the fee just read from the chain.

Wallet Transactions#

Usebind.NewKeyedTransactorWithChainIDor create your own signer*bind.TransactOpts, callsocial.PublishPost(opts, content, big.NewInt(0)), thereafterbind.WaitMined(ctx, rpc, tx)and check receipt.Status. The SDK does not read the private key environment variable, nor does it write the private key to the configuration.

Building unsigned calldata usingsocial.Prepare("publishPost", content, big.NewInt(0)). Specify To, Data, chainId, nonce and gas via your own signing service. UniversalTransactopts.Value supports payable game methods.

Indexing and Cancellation#

Scan reads and decodes pages of up to 2048 blocks; confirms the cursor after apply is successful. Watch continuously checks the confirmation block and historical hash, and exits when the context is cancelled. Subscribe uses ethclient's WSS subscription and returns a connection error, allowing the caller to reconnect; run Watch at the same time or Scan after reconnection to complete the problem.

Continuous synchronization using HTTP only#

go
err := x404.Watch(ctx, rpc, []x404.Emitter{
    {Address: address, Kind: "X404SocialProtocol"},
}, x404.WatchOptions{
    Checkpoint: savedCheckpoint,
    Confirmations: 12,
    ChunkSize: 256,
    OnError: func(err error) { log.Printf("sync: %v", err) },
}, nil, func(events []x404.Event, checkpoint x404.Checkpoint) error {
    // Production: apply events idempotently and save the checkpoint in the same database transaction.
    return saveBatch(events, checkpoint)
})

rpc uses an HTTP URL; the application supplies savedCheckpoint and saveBatch. A nil wake channel opens no WSS connection and checks confirmed logs every 15 seconds by default. Optionally run Subscribe on a separate WSS client to wake Watch. Keep HTTP replay if subscriptions fail; application code handles reorg rollback and database projections.

To resume Scan, use ScanOptions{FromBlock: savedCheckpoint.NextBlock, ToBlock: confirmedHead, Checkpoint: &savedCheckpoint}; Watch carries this checkpoint automatically. Each scan anchors the target block hash and rechecks both the saved checkpoint and target anchor before committing each page. This detects a branch change between validation and log retrieval. Checks scale with page count and still require a consistent, trusted RPC. On ReorgError, stop advancing the cursor, roll back the projection and replay.

Buyback configuration and events#

Both the Go and TypeScript SDKs include the complete treasury ABI. x404.BuybackBurn is 0 and x404.BuybackLiquidity is 1. Use the generic contract adapter for reads, writes and unsigned calldata:

go
treasury, err := x404.NewContract(rpc, "X404Treasury", treasuryAddress)
if err != nil { return err }
mode, err := treasury.Call(ctx, nil, "buybackMode")
if err != nil { return err }
data, err := treasury.Prepare("setBuybackMode",
    x404.BuybackLiquidity, approvedMinimumLPPerBNB)
if err != nil { return err }
_ = mode
_ = data // Wrap management calldata in an operations proposal; reviewer approves. Use *big.Int amounts.

approvedMinimumLPPerBNB is the lowest LP raw unit per 1 BNB actual total expenditure. Setup mode does not enable policies. Scan / Subscribe / Watch Right X404Treasury Decoding mode, pooling details, status snapshots, and policy events; retaining cursors, reorganization processing, and idempotent projection to update financial data from the log.

Unified financial access#

The Go and JavaScript SDKs support the same four DEX adapters. NewFinanceClient(ethclient, treasury) can be called after Family, Integration, PrepareConfigureLaunch, PrepareActivation, SwapSpender and PrepareSwap. Prepare interface to return PreparedTransaction{To, Data, Value}, signature and nonce management are the responsibility of the application; WSS is not required.

go
finance, err := x404.NewFinanceClient(client, treasuryAddress)
if err != nil { return err }
request, err := finance.PrepareConfigureLaunch(ctx, x404.FinancePlan{
    RevenueWallet: revenueWallet,
    Pools: []x404.FinancePool{{Family: x404.DexPancakeInfinity, Tokens: approvedLiquidityTokens,
        NativeAmount: approvedNativeBudget}},
})
if err != nil { return err }
// Configuration and activation each require an operations proposal and reviewer approval.
spender, err := finance.SwapSpender(ctx)
if err != nil { return err }
_ = spender // Approve this address with ERC20 approve before selling.
swap, err := finance.PrepareSwap(ctx, x404.SwapRequest{
    Buy: true, Amount: nativeBudget, MinimumOut: approvedMinimumTokens,
    Recipient: account, Deadline: deadline,
})
if err != nil { return err }
_ = request
_ = swap // Build and send the transaction using your application's signer.

Open Finance and follow the current on-chain state and approval steps. After initialization, operations proposes and the reviewer approves. Check the game, network and wallet before submitting, and wait for confirmation before continuing.

Before issuance, use PrepareFeeBeneficiaries to configure V4 fee wallets and shares; the default beneficiary is the game creator. The UI requires an explicit project income wallet for V2 trading taxes and V4 LP fees after the protocol share. Anyone may trigger claims, but cannot redirect payment or withdraw locked principal: first-launch LP is permanently locked by default (or time-locked for a term chosen before launch), and buyback-added LP is always permanently locked. Changing the payout wallet requires the game operation wallet.

Asset lock access#

NewCLLockClient Bind the X404CLLockFactory of the current platform. PrepareCreate Unsigned calldata returned, Create Use bind.TransactOpts, Value is the native currency budget for this time. First execute platform token approve separately and wait for confirmation.

Ordinary tokens, V2 LP and V4 NFT, as well as the complete reading and claiming interface of the vault are available NewContract. Transact(opts, "claimFeesFor", beneficiary, currency, amount): Anyone may call claimFeesFor(beneficiary, currency, amount) without beneficiary signatures. The protocol share goes to the current platform recipient. For official game CL positions, net income goes to feeRecipient(beneficiary), which operations may propose changing, subject to reviewer approval. Accounting remains keyed by the original beneficiary; shares and claimed balances stay unchanged. Privately created CL/NFT locks still pay their original beneficiaries, and game administrators cannot redirect their income. Claim callers cannot select destinations. Principal rights are unchanged; amount 0 means all currently claimable income.

Personal mining power and war distribution#

Use NewHonorClient(backend, entry.Honor), then GoldBalance(ctx, wallet), TotalAllocatedGold(ctx), TotalPendingGold(ctx) and WarGoldClaimed(ctx, wallet) to read claimed and reserved amounts. Personal amounts use *big.Int: 1 mining power = 10^6 base units. The backend accumulates rewards, and users actively claim with its signature. The four-tier configuration frozen at war opening shares 1% without a per-war cap; the other 99% follows positive opening battle contributions. The shared pool is not exclusively the king’s. Claim with ClaimWarGold(opts, cumulative, epoch, deadline, signature), and index the individual difference in WarGoldClaimed. Country cumulative mining power remains integer mining power. Inventory sales and other credits use their respective events.

Deferred activation and dual pools#

PrepareConfigureLaunch(ctx, FinancePlan) · PrepareBuybackRouting(ctx, true, 0). First-launch game LP is permanently locked by default. When the platform has enabled timed locks and the game chose a lock term before launch, that LP is time-locked instead: after the unlock time only the game creator wallet can claim it, and the public game page shows the unlock time. Buyback-added LP is always permanently locked. Test deployments (BSC testnet and local chains only) let the creator wallet reclaim LP and are labelled as test deployments on public pages. termLiquidityLocksEnabled only controls new term or installment locks for personally deposited LP and starts enabled. It cannot change game LP or existing locks. Ordinary and team-token vesting is unaffected.

After configuration is approved, call PrepareActivation(ctx, expectedNonce) and wrap the returned request in an operations proposal for reviewer approval. The SDK reads the approved plan and version at one block. Configuration does not mint or create pools; activation creates all pools atomically. SwapRequest.PoolIndex = 1 selects the second pool.

Configure V2 dual pools in FinancePlan.Pools with family DexPancakeV2 with DexUniswapV2, ordered to match the primary-pool setting and with equal initial prices. SwapRequest.PoolIndex=1 uses the second Router. Before approval, call SwapSpenderForPool(ctx,1) for the exact spender. Buy and sell taxes remain those configured at issuance. Pool selection and activation use the same API as V4 dual pools; V2 and CL cannot be mixed.

Multi-asset extensions and countries#

NewExtensionsClient provides typed AssetPolicy / AssetApproval / AssetBalance without manual tuple decoding. ExtensionPolicy contains enablement, policy version, code hash, cumulative spending/rewards and caps; ExtensionApproval contains remaining allowances, expiry, version and nonce. mining power allowances are independent of airdrop rounds. The asset owner signs ApproveAsset / RevokeAsset; PrepareConfigureAsset only builds governance-proposal calldata.

Asset 0 is retired. mining power uses ExtensionGoldAsset=1 in 6-decimal base units; ExtensionLootAsset(0..23) returns 2..25 for integer item quantities. New gameplay uses CharactersAddress / NewCharactersClient / Play in one participation transaction with governance-approved budgets.

GameClient adds CountryCount / Country / Countries / CountryMembership / CountryMembers / CountryContribution / CountryContributors. Pagination offsets and IDs use *big.Int, and size is 1–100. CountryContributors returns Members, Amounts and Total. Country.TotalPoints is current prestige; Country.mining power is historical integer war mining power. Use IdentityKey(chainID, game.Address, country.ID) to associate the global identity. Creator governance approves extensions for the game without king consent. New gameplay acts on personal assets only during the member's own participation transaction.

PvP, inventory and mining power spending#

go
arenaAddress, err := hub.PvPAddress(ctx)
if err != nil { return err }
arena, err := x404.NewPvPClient(rpc, arenaAddress)
if err != nil { return err }
inventory, err := arena.Inventory(ctx, member)
if err != nil { return err }
history, err := arena.History(ctx, member, big.NewInt(0), 20)
if err != nil { return err }
_ = inventory // [24]*big.Int,数量为整数。
_ = history   // BattlePage{Battles, Total}。

Nonce / RemainingAttempts / InventoryValue / Wins / Losses / QuoteLootSale / BattleRecord provides other reads. BattlePermit uses uint8 for levels and uint16 for draw; other integers use *big.Int. Signature arguments use raw []byte. PvPAuthMessage generates the player's authentication message. After verification, the service returns an operator claim; PrepareBattle builds calldata, and Battle submits the user transaction. The SDK does not generate random outcomes or operator signatures. For authentication, see PVP.

HonorClient.TotalSpentGold reads cumulative spending; TotalAllocatedGold is cumulative issuance. Both use 6-decimal base units. InventoryValue with QuoteLootSale is an integer catalog valuation. Selling through HonorClient.SellLoot atomically converts it to an 6-decimal balance. When producing HTTP JSON, explicitly convert *big.Int to decimal strings to avoid JavaScript precision loss.

SocialClient.SetProfileDetails / ProfileDetails / ProfileCompletion and the extension hub's ProfileProtocol / ProfileRewardClaimed / ClaimProfileReward correspond to Profile completion. Task hall signed sessions, review and contribution records belong to the backend HTTP API; an onchain SDK cannot grant backend review permissions.

Issuance, locks and redemption#

Team locking has two steps: PrepareTeamLock(ctx, amount, beneficiaries, tranches, absoluteDates) builds the configuration request. After governance executes and confirms it, read the nonce with TeamPlan(ctx, nil) and build execution with PrepareExecuteTeamLock(ctx, nonce). The TokenBeneficiary.Amount values and amounts in a nonempty TokenTranche schedule must each sum to amount. They use token base units, not LP basis points; both SDK and contract validate the totals. Relative seconds start at actual execution by default; empty tranches mean a permanent lock.

Use PreparePeriodicTeamLock instead for a complete recurring release plan. approvedTeamAmount is the approved token base-unit quantity and must fit the remaining team budget:

go
teamRequest, err := finance.PreparePeriodicTeamLock(ctx, approvedTeamAmount,
    []x404.TokenBeneficiary{{Wallet: teamWallet, Amount: approvedTeamAmount}},
    x404.PeriodicPlan{
        CliffCount: 3, CliffUnit: x404.LockTimeYear,
        PeriodCount: 1, PeriodUnit: x404.LockTimeMonth,
        Installments: 36, AmountPerPeriod: new(big.Int),
    })
if err != nil { return err }
_ = teamRequest

The first installment is released 3 years plus 1 month after execution, followed by monthly releases for 36 installments in total. LockTimeDay / LockTimeMonth / LockTimeQuarter / LockTimeYear support days, months, quarters and years; calendar units use UTC. To specify a quantity per period, use Installments: 0 and a positive AmountPerPeriod; the final installment releases the remainder. Select only one release mode.

Use PrepareLiveAirdropFunding(ctx, 1, amount, nonce) for the single mining power pool. First funding uses the full initial allocation; later funding consumes the later budget. Governance separately calls scheduleRound(startsAt, endsAt, expectedRound).

DEX fee configuration#

Regular rates default to 2% and can be configured before issuance from 0–5% (0–500 bps), in steps of 0.01%. V2 token.buyTaxBps and token.sellTaxBps are independent; token.poolFeeBps must be 0. The token collects these taxes and the DEX native pool fee is additional. V4 / Infinity CL ordinary buy/sell taxes must be 0; token.poolFeeBps can be 0–500 and is the LP pool fee, collected directly by the DEX core.

Initial rates are selected during creation. After initialization, rate changes require operations proposals and reviewer approval; the creator cannot bypass approval. Rates may be reconfigured before issuance. A rate change increments launchNonce, invalidating old activation requests; an activation proposal must reference the latest approved version and be approved by the reviewer. Rates are immutable after issuance and both pools share the same set. X404GameConfig holds the initial creation terms; read the treasury’s getTokenConfig() for effective current rates.

FinanceClient.PrepareTradingFees(ctx, TradingFees{BuyTaxBps:125, SellTaxBps:350, PoolFeeBps:0}) illustrates a 1.25% V2 buy tax and a 3.50% sell tax. CL requires zero buy/sell taxes and uses PoolFeeBps for its pool fee. The method validates rates against the current protocol and returns an unsigned liquidityManager setTradingFees request. Execute it through the game's operation wallet, then re-read launchNonce before preparing activation. DefaultFeeBps=200 is the default and MaxTradingFeeBps=500 is the maximum.

V2 collects only its configured buy and sell taxes. Uniswap V4 / Infinity CL uses native static pool fees with a zero Hook address. There is no opening anti-sniping tax or waiting period.

Categorized inventory, skills and new battle interfaces#

After discovering hub.CharactersAddress(ctx) and constructing characters with NewCharactersClient, query using the existing rpc, arena and member:

go
block, err := rpc.BlockNumber(ctx)
if err != nil { return err }
blockNumber := new(big.Int).SetUint64(block)
entries, total, err := characters.Inventory(ctx, member, [32]byte{}, big.NewInt(0), big.NewInt(20), blockNumber)
if err != nil { return err }
state, err := arena.Call(ctx, blockNumber, "getPlayerState", member)
if err != nil { return err }
_ = entries
_ = total
_ = state

An all-zero category selects everything. Page size is 1–100, returning active equipment and item stacks without exhausted items. Pair ID with Kind and pin blockNumber across pages; use Instances for history. CategoryPage / CharacterSkills also support a pinned block. Skill / SkillDefinition return skill state and definitions; use Call(ctx, blockNumber, "skills", characterId, key) for skill details at a specific block.

Governance uses generic Prepare to encode defineCategory / defineInventoryType / defineSkill / setSkillEnabled; execution uses the game operation wallet. Approved modules atomically learn/use skills and consume items within a Play session. getPlayerState / getFighters / getWarEligibility use generic Call and return ABI-decoded results, with no dedicated typed wrappers currently available.

Read country tickets with hub.Ticket(ctx, CountryTicket) and PvP tickets with hub.Ticket(ctx, PvPTicket). These are separate activities, not bit flags; do not combine the constants with bitwise OR. Read the recipient with TicketRecipient and prepare governance changes with PrepareConfigureTicket. After approving ERC-20 spending to the hub address, use JoinCountryWithTicket for joining a country. For PvP, use arena.Prepare("battleWithTicket", permit, signature, version) or Transact, with version as *big.Int. Bind the current ticket version when enabled or pass 0 when disabled. Free Battle does not apply to games with enabled tickets.

Protocol share of trading income and LP lock policy#

The protocol share of trading income defaults to 25% and may be changed only by platform governance through setTradingFeeShareBps. Each V2 tax conversion and V4/Infinity LP fee claim uses the current rate, including existing games and income accrued before the change but still unclaimed. Already paid income is not recalculated. The share is deducted from trading income, separately from the fixed 1% entry fee; locked principal is never charged. The protocol portion is paid directly to the currently approved Treasury.protocolFees().recipient. Platform Safe multisig and a timelock of at least 1 hour may change it through X404GameFactory.setProtocolFeeRecipient(expectedRecipient, newRecipient). All unpaid protocol BNB, subsequent trading-income payouts and future token tickets use the current address, including existing games. The game portion uses its approved tax or official project LP fee destination; completed payments are not recovered.

First-launch game LP is permanently locked by default. When the platform has enabled timed locks and the game chose a lock term before launch, that LP is time-locked instead: after the unlock time only the game creator wallet can claim it, and the public game page shows the unlock time. Buyback-added LP is always permanently locked. Test deployments (BSC testnet and local chains only) let the creator wallet reclaim LP and are labelled as test deployments on public pages. termLiquidityLocksEnabled only controls new term or installment locks for personally deposited LP and starts enabled. It cannot change game LP or existing locks. Ordinary and team-token vesting is unaffected.

For V4/Infinity, claimableFees, claimedFees, FeesClaimed, and the amount arguments and return values of claimFees / claimFeesFor are gross amounts before the protocol share. Read quoteFees(beneficiary, currency, amount) for (gross, protocolAmount, netAmount, shareBps); amount=0 selects the full current gross entitlement. Game receipts use netAmount. FeesSplit records each gross amount, protocol share, net payment and rate. Fee-wallet weights define the game beneficiaries only and cannot override the protocol destination or rate. Rates and carried fractions may change after a preview; execution events are final.

Fractional protocol fees below one base unit carry forward per contract and currency, so splitting claims cannot avoid the fee. A rejected payment reverts the claim, gross claimed balance and carry, allowing a retry once the receiving issue is resolved. Principal and fee ledgers stay separate.

V2 processTax minimum BNB and TaxConverted amounts describe gross conversion output. The game tax wallet receives the net amount after the protocol share. TaxRevenueSplit records grossBNB / protocolAmount / netAmount / shareBps; income summaries use the actual net amount without counting the gross event again. Forced BNB donations are excluded from conversion income.

Changing payout addresses through multisig#

Team admission destinations, V2 tax wallets and official game CL fee destinations may be changed through operations proposals and reviewer approval for that game. The platform protocol recipient requires the platform Safe timelock; game governance has no such authority. Claims remain permissionless but pay only the currently approved addresses. Private lock beneficiaries, allocation shares and principal rights are unchanged.

  • Team admission income: game governance calls replaceProjectWallet(previousWallet, newWallet) to replace one address atomically, preserving order, headcount and equal shares. Only future admission and takeover payments change. Existing pendingPayments remain owned and claimable by the old account.
  • Protocol income: platform governance calls X404GameFactory.setProtocolFeeRecipient(expectedRecipient, newRecipient). Unpaid protocol BNB, subsequent trading-tax/LP protocol-share payouts and future token tickets use the current address, including existing games. Game governance cannot change it.
  • V2 tax income: game governance calls X404Token.setTaxWallet(expectedWallet, newWallet). Unconverted and future taxes pay the new wallet; completed payments are not recovered. Tax rates and the approved conversion floor remain unchanged.
  • Official project CL fees: game governance calls X404LiquidityManager.setFeeRecipient(vault, originalBeneficiary, expectedRecipient, newRecipient) for a game treasury and original beneficiary. The original ledger identity, shares, claimed balances and principal rights stay unchanged; unpaid net income goes to the new address. One setting applies to all existing and future official project positions in that game; vault is the game Treasury address. This authority does not apply to privately created CL/NFT locks.

### Treasury BNB disbursements

FinanceClient.PrepareDisbursement(recipient, amountWei) only prepares a reviewed disburseBNB call. Amounts are integer wei and the attached value is zero. Operations submits it through the game administration contract; reviewer approval pays from the treasury. This helper never sends transactions or grants direct withdrawal rights. availableDisbursementBNB() excludes pending buyback reserves, and execution checks the balance again. Only newly deployed treasuries support this method.

PrepareConfigureTicket(activity, enabled, amount, currency)

PVP tickets support currency: 0 (mining power with 6 decimals) or currency: 1 (the game token with its actual decimals). Kingdom admission tickets only support tokens. Disabling tickets means free entry; the independent PVP switch still controls challenges. mining power requires no ERC-20 approval.