Documentation
¶
Index ¶
Constants ¶
const ContractType = "TokenAdminRegistry"
ContractType labels TokenAdminRegistry.
Variables ¶
var AcceptAdminRole = cldfops.NewOperation( "token-admin-registry:accept-admin-role", stellarops.ContractDeploymentVersion, "Accepts administrator role for a token in TokenAdminRegistry", func(b cldfops.Bundle, d stellardeps.StellarDeps, in AcceptAdminRoleInput) (stellarops.Void, error) { c := tarbindings.NewTokenAdminRegistryClient(d.Invoker, in.ContractID) if err := c.AcceptAdminRole(b.GetContext(), in.LocalToken); err != nil { return stellarops.Void{}, err } return stellarops.Void{}, nil }, )
AcceptAdminRole calls `accept_admin_role`.
var AcceptOwnership = cldfops.NewOperation( "token-admin-registry:accept-ownership", stellarops.ContractDeploymentVersion, "Accepts TokenAdminRegistry ownership after transfer_ownership", func(b cldfops.Bundle, d stellardeps.StellarDeps, in AcceptOwnershipInput) (stellarops.Void, error) { c := tarbindings.NewTokenAdminRegistryClient(d.Invoker, in.ContractID) if err := c.AcceptOwnership(b.GetContext()); err != nil { return stellarops.Void{}, err } return stellarops.Void{}, nil }, )
AcceptOwnership calls `accept_ownership` on TokenAdminRegistry.
var Deploy = stellarops.NewDeployOperation("token-admin-registry:deploy", "Deploys the TokenAdminRegistry Soroban contract from WASM")
Deploy uploads token_admin_registry.wasm and runs its constructor.
var GetTokenConfig = cldfops.NewOperation( "token-admin-registry:get-token-config", stellarops.ContractDeploymentVersion, "Reads the token config (admin, pending admin, pool) for one token", func(b cldfops.Bundle, d stellardeps.StellarDeps, in GetTokenConfigInput) (*tarbindings.TokenConfig, error) { c := tarbindings.NewTokenAdminRegistryClient(d.Invoker, in.ContractID) return c.GetTokenConfig(b.GetContext(), in.LocalToken) }, )
GetTokenConfig reads the registry's admin/pending-admin/pool record for a token.
var ProposeAdministrator = cldfops.NewOperation( "token-admin-registry:propose-administrator", stellarops.ContractDeploymentVersion, "Proposes a token administrator in TokenAdminRegistry", func(b cldfops.Bundle, d stellardeps.StellarDeps, in ProposeAdministratorInput) (stellarops.Void, error) { c := tarbindings.NewTokenAdminRegistryClient(d.Invoker, in.ContractID) if err := c.ProposeAdministrator(b.GetContext(), in.Caller, in.LocalToken, in.Administrator); err != nil { return stellarops.Void{}, err } return stellarops.Void{}, nil }, )
ProposeAdministrator calls `propose_administrator`.
var SetPool = cldfops.NewOperation( "token-admin-registry:set-pool", stellarops.ContractDeploymentVersion, "Sets the default pool for a token in TokenAdminRegistry", func(b cldfops.Bundle, d stellardeps.StellarDeps, in SetPoolInput) (stellarops.Void, error) { c := tarbindings.NewTokenAdminRegistryClient(d.Invoker, in.ContractID) if err := c.SetPool(b.GetContext(), in.LocalToken, in.Pool); err != nil { return stellarops.Void{}, err } return stellarops.Void{}, nil }, )
SetPool calls `set_pool`.
var TransferAdminRole = cldfops.NewOperation( "token-admin-registry:transfer-admin-role", stellarops.ContractDeploymentVersion, "Transfers a token's admin role to a new admin in TokenAdminRegistry", func(b cldfops.Bundle, d stellardeps.StellarDeps, in TransferAdminRoleInput) (stellarops.Void, error) { c := tarbindings.NewTokenAdminRegistryClient(d.Invoker, in.ContractID) if err := c.TransferAdminRole(b.GetContext(), in.LocalToken, in.NewAdmin); err != nil { return stellarops.Void{}, err } return stellarops.Void{}, nil }, )
TransferAdminRole calls `transfer_admin_role` (invoked by the current admin).
var TransferOwnership = cldfops.NewOperation( "token-admin-registry:transfer-ownership", stellarops.ContractDeploymentVersion, "Transfers TokenAdminRegistry ownership to a pending new owner", func(b cldfops.Bundle, d stellardeps.StellarDeps, in TransferOwnershipInput) (stellarops.Void, error) { c := tarbindings.NewTokenAdminRegistryClient(d.Invoker, in.ContractID) if err := c.TransferOwnership(b.GetContext(), in.NewOwner); err != nil { return stellarops.Void{}, err } return stellarops.Void{}, nil }, )
TransferOwnership calls `transfer_ownership` on TokenAdminRegistry.
var Upgrade = cldfops.NewOperation( "token-admin-registry:upgrade", stellarops.ContractDeploymentVersion, "Upgrades the TokenAdminRegistry Soroban contract in place to a new WASM hash", func(b cldfops.Bundle, d stellardeps.StellarDeps, in UpgradeInput) (stellarops.Void, error) { c := tarbindings.NewTokenAdminRegistryClient(d.Invoker, in.ContractID) if err := c.Upgrade(b.GetContext(), in.NewWasmHash); err != nil { return stellarops.Void{}, err } return stellarops.Void{}, nil }, )
Upgrade calls `upgrade` on TokenAdminRegistry (owner-gated in-place self-upgrade).
Functions ¶
This section is empty.
Types ¶
type AcceptAdminRoleInput ¶
type AcceptAdminRoleInput struct {
ContractID string `json:"contract_id"`
LocalToken string `json:"local_token"`
}
AcceptAdminRoleInput accepts the proposed admin role for a token.
type AcceptOwnershipInput ¶
type AcceptOwnershipInput struct {
ContractID string `json:"contract_id"`
}
AcceptOwnershipInput completes two-step ownership transfer for the caller.
type GetTokenConfigInput ¶
type GetTokenConfigInput struct {
ContractID string `json:"contract_id"`
LocalToken string `json:"local_token"`
}
GetTokenConfigInput identifies a token admin registry token config read.
type ProposeAdministratorInput ¶
type ProposeAdministratorInput struct {
ContractID string `json:"contract_id"`
Caller string `json:"caller"`
LocalToken string `json:"local_token"`
Administrator string `json:"administrator"`
}
ProposeAdministratorInput proposes a token administrator.
type SetPoolInput ¶
type SetPoolInput struct {
ContractID string `json:"contract_id"`
LocalToken string `json:"local_token"`
Pool *string `json:"pool,omitempty"`
}
SetPoolInput registers the default pool for a token.
type TransferAdminRoleInput ¶
type TransferAdminRoleInput struct {
ContractID string `json:"contract_id"`
LocalToken string `json:"local_token"`
NewAdmin *string `json:"new_admin,omitempty"`
}
TransferAdminRoleInput transfers a token's admin role to a new admin.
type TransferOwnershipInput ¶
type TransferOwnershipInput struct {
ContractID string `json:"contract_id"`
NewOwner string `json:"new_owner"`
}
TransferOwnershipInput starts two-step ownership transfer.
type UpgradeInput ¶
type UpgradeInput struct {
ContractID string `json:"contract_id"`
NewWasmHash [32]byte `json:"new_wasm_hash"`
}
UpgradeInput upgrades the TokenAdminRegistry contract in place to a new Wasm hash.