Documentation
¶
Index ¶
Constants ¶
View Source
const ContractType = "Router"
ContractType labels Router in datastore-style tooling.
Variables ¶
View Source
var AcceptOwnership = cldfops.NewOperation( "router:accept-ownership", stellarops.ContractDeploymentVersion, "Accepts Router ownership after transfer_ownership", func(b cldfops.Bundle, d stellardeps.StellarDeps, in AcceptOwnershipInput) (stellarops.Void, error) { c := routerbindings.NewRouterClient(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 Router.
View Source
var ApplyRampUpdates = cldfops.NewOperation( "router:apply-ramp-updates", stellarops.ContractDeploymentVersion, "Applies Router on-ramp and off-ramp map updates", func(b cldfops.Bundle, d stellardeps.StellarDeps, in ApplyRampUpdatesInput) (stellarops.Void, error) { c := routerbindings.NewRouterClient(d.Invoker, in.ContractID) if err := c.ApplyRampUpdates(b.GetContext(), in.OnRampUpdates, in.OffRampRemoves, in.OffRampAdds); err != nil { return stellarops.Void{}, err } return stellarops.Void{}, nil }, )
ApplyRampUpdates calls Router `apply_ramp_updates`.
View Source
var Deploy = stellarops.NewDeployOperation("router:deploy", "Deploys the Router Soroban contract from WASM")
Deploy uploads router.wasm.
View Source
var Initialize = cldfops.NewOperation( "router:initialize", stellarops.ContractDeploymentVersion, "Initializes Router with owner and RMN proxy", func(b cldfops.Bundle, d stellardeps.StellarDeps, in InitializeInput) (stellarops.Void, error) { c := routerbindings.NewRouterClient(d.Invoker, in.ContractID) if err := c.Initialize(b.GetContext(), in.Owner, in.RmnProxy); err != nil { return stellarops.Void{}, err } return stellarops.Void{}, nil }, )
Initialize calls Router `initialize`.
View Source
var TransferOwnership = cldfops.NewOperation( "router:transfer-ownership", stellarops.ContractDeploymentVersion, "Transfers Router ownership to a pending new owner", func(b cldfops.Bundle, d stellardeps.StellarDeps, in TransferOwnershipInput) (stellarops.Void, error) { c := routerbindings.NewRouterClient(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 Router.
Functions ¶
This section is empty.
Types ¶
type AcceptOwnershipInput ¶
type AcceptOwnershipInput struct {
ContractID string `json:"contract_id"`
}
AcceptOwnershipInput completes two-step ownership transfer for the caller.
type ApplyRampUpdatesInput ¶
type ApplyRampUpdatesInput struct {
ContractID string `json:"contract_id"`
OnRampUpdates []routerbindings.OnRampEntry `json:"on_ramp_updates"`
OffRampRemoves []routerbindings.OffRampEntry `json:"off_ramp_removes"`
OffRampAdds []routerbindings.OffRampEntry `json:"off_ramp_adds"`
}
ApplyRampUpdatesInput updates on-ramp and off-ramp routing tables.
type InitializeInput ¶
type InitializeInput struct {
ContractID string `json:"contract_id"`
Owner string `json:"owner"`
RmnProxy string `json:"rmn_proxy"`
}
InitializeInput wires owner and RMN proxy to Router.
type TransferOwnershipInput ¶
type TransferOwnershipInput struct {
ContractID string `json:"contract_id"`
NewOwner string `json:"new_owner"`
}
TransferOwnershipInput starts two-step ownership transfer.
Click to show internal directories.
Click to hide internal directories.