Documentation
¶
Overview ¶
Code generated by stellar-bindings-generator. DO NOT EDIT.
Code generated by stellar-bindings-generator. DO NOT EDIT.
Index ¶
- Constants
- Variables
- type AllowListEntry
- type AllowListUpdate
- type AnyToStellarMessage
- type AuthorizedCallerAddedEvent
- type AuthorizedCallerRemovedEvent
- type DepositEvent
- type GenericExtraArgsV3
- type OwnershipTransferStartedEvent
- type RoleGrantedEvent
- type RoleRevokedEvent
- type StellarToAnyMessage
- type TokenAmount
- type TokenLockBoxClient
- func (c *TokenLockBoxClient) AcceptOwnership(ctx context.Context) error
- func (c *TokenLockBoxClient) AddAllowedCallers(ctx context.Context, callers []string) error
- func (c *TokenLockBoxClient) CancelOwnershipTransfer(ctx context.Context) error
- func (c *TokenLockBoxClient) ContractID() string
- func (c *TokenLockBoxClient) Deposit(ctx context.Context, caller string, amount int64) error
- func (c *TokenLockBoxClient) GetAllowedCallers(ctx context.Context) ([]string, error)
- func (c *TokenLockBoxClient) GetPendingOwner(ctx context.Context) (*string, error)
- func (c *TokenLockBoxClient) GetToken(ctx context.Context) (string, error)
- func (c *TokenLockBoxClient) InitOwner(ctx context.Context, owner string) error
- func (c *TokenLockBoxClient) Initialize(ctx context.Context, owner string, token string) error
- func (c *TokenLockBoxClient) IsOwner(ctx context.Context, addr string) (bool, error)
- func (c *TokenLockBoxClient) IsTokenSupported(ctx context.Context, token string) (bool, error)
- func (c *TokenLockBoxClient) Owner(ctx context.Context) (*string, error)
- func (c *TokenLockBoxClient) RemoveAllowedCallers(ctx context.Context, callers []string) error
- func (c *TokenLockBoxClient) RequireOwner(ctx context.Context) (string, error)
- func (c *TokenLockBoxClient) SetNewOwner(ctx context.Context, newOwner string) error
- func (c *TokenLockBoxClient) TransferOwnership(ctx context.Context, newOwner string) error
- func (c *TokenLockBoxClient) WaitForAuthorizedCallerAddedEvent(ctx context.Context, startLedger uint32, timeout time.Duration, ...) (*AuthorizedCallerAddedEvent, error)
- func (c *TokenLockBoxClient) WaitForAuthorizedCallerRemovedEvent(ctx context.Context, startLedger uint32, timeout time.Duration, ...) (*AuthorizedCallerRemovedEvent, error)
- func (c *TokenLockBoxClient) WaitForDepositEvent(ctx context.Context, startLedger uint32, timeout time.Duration, ...) (*DepositEvent, error)
- func (c *TokenLockBoxClient) WaitForOwnershipTransferStartedEvent(ctx context.Context, startLedger uint32, timeout time.Duration, ...) (*OwnershipTransferStartedEvent, error)
- func (c *TokenLockBoxClient) WaitForRoleGrantedEvent(ctx context.Context, startLedger uint32, timeout time.Duration, ...) (*RoleGrantedEvent, error)
- func (c *TokenLockBoxClient) WaitForRoleRevokedEvent(ctx context.Context, startLedger uint32, timeout time.Duration, ...) (*RoleRevokedEvent, error)
- func (c *TokenLockBoxClient) WaitForWithdrawalEvent(ctx context.Context, startLedger uint32, timeout time.Duration, ...) (*WithdrawalEvent, error)
- func (c *TokenLockBoxClient) Withdraw(ctx context.Context, caller string, amount int64, recipient string) error
- type WithdrawalEvent
Constants ¶
const ( CCIPErrorNotInitialized = 1 CCIPErrorAlreadyInitialized = 2 CCIPErrorNotOwner = 4 CCIPErrorNoPendingOwner = 5 CCIPErrorCallerNotAuthorized = 6 CCIPErrorCallerAlreadyAuthorized = 7 CCIPErrorCallerNotFound = 8 CCIPErrorRoleNotGranted = 9 CCIPErrorFeatureNotEnabled = 10 CCIPErrorRoleAlreadyGranted = 11 CCIPErrorCannotRenounceRole = 12 CCIPErrorInvalidVersionTag = 13 CCIPErrorInvalidSignatureLength = 14 CCIPErrorInvalidSignature = 15 CCIPErrorInvalidSignatureCount = 16 CCIPErrorInvalidSignatureThreshold = 17 CCIPErrorInvalidSignaturePubkey = 18 CCIPErrorSourceSignersNotConfigured = 19 CCIPErrorInvalidVerifierResults = 20 CCIPErrorReentrantCall = 21 CCIPErrorTokenNotSupported = 22 CCIPErrorFeeTokenNotSupported = 23 CCIPErrorNoGasPriceAvailable = 24 CCIPErrorDestinationChainNotEnabled = 25 CCIPErrorInvalidExtraArgsTag = 26 CCIPErrorInvalidExtraArgsData = 27 CCIPErrorMessageGasLimitTooHigh = 28 CCIPErrorMessageTooLarge = 29 CCIPErrorUnsupportedNumberOfTokens = 30 CCIPErrorInvalidDestChainConfig = 31 CCIPErrorMessageFeeTooHigh = 32 CCIPErrorInvalidStaticConfig = 33 CCIPErrorInvalidTokenReceiver = 34 CCIPErrorSourceTokenDataTooLarge = 35 CCIPErrorInvalidDestBytesOverhead = 36 CCIPErrorDestinationChainNotSupported = 37 CCIPErrorMustBeCalledByRouter = 38 CCIPErrorRouterMustSetOriginalSender = 39 CCIPErrorCannotSendZeroTokens = 40 CCIPErrorCanOnlySendOneTokenPerMessage = 41 CCIPErrorUnsupportedToken = 42 CCIPErrorInvalidDestChainAddress = 43 CCIPErrorFeeExceedsMaxAllowed = 44 CCIPErrorInsufficientFeeTokenAmount = 45 CCIPErrorTokenReceiverNotAllowed = 46 CCIPErrorCursedByRMN = 47 CCIPErrorRemoteChainNotSupported = 48 CCIPErrorSenderNotAllowed = 49 CCIPErrorInvalidTokenAmount = 50 CCIPErrorInvalidReceiverAddress = 51 CCIPErrorInvalidConfig = 52 CCIPErrorInvalidVerifierResultsLength = 53 CCIPErrorInboundImplementationNotFound = 54 CCIPErrorOutboundImplementationNotFound = 55 CCIPErrorInvalidAddress = 56 CCIPErrorInvalidChainSelector = 57 CCIPErrorInvalidVersion = 58 CCIPErrorInvalidCCVVersion = 59 CCIPErrorOffRampAlreadyExists = 60 CCIPErrorOffRampMismatch = 61 CCIPErrorBadRMNSignal = 62 CCIPErrorUnsupportedDestinationChain = 63 CCIPErrorAlreadyCursed = 64 CCIPErrorConfigNotSet = 65 CCIPErrorDuplicateOnchainPublicKey = 66 CCIPErrorInvalidSignerOrder = 67 CCIPErrorNotEnoughSigners = 68 CCIPErrorNotCursed = 69 CCIPErrorOutOfOrderSignatures = 70 CCIPErrorThresholdNotMet = 71 CCIPErrorUnexpectedSigner = 72 CCIPErrorZeroValueNotAllowed = 73 CCIPErrorSourceChainNotEnabled = 100 CCIPErrorInvalidSourceChainConfig = 101 CCIPErrorInvalidOnRampAddress = 102 CCIPErrorInvalidOffRampAddress = 103 CCIPErrorInvalidMessageDestination = 104 CCIPErrorMessageAlreadyExecuted = 105 CCIPErrorInvalidExecutionState = 106 CCIPErrorCCVLengthMismatch = 107 CCIPErrorCCVQuorumNotMet = 108 CCIPErrorReceiverError = 109 CCIPErrorGasLimitOverrideTooLow = 110 CCIPErrorInvalidReceiverLength = 111 CCIPErrorTokenHandlingError = 112 CCIPErrorMessageDecodingError = 113 CCIPErrorReceiverDoesNotExist = 114 CCIPErrorReceiverNotWasmContract = 115 CCIPErrorRequiredCCVMissing = 116 CCIPErrorOnlyRegistryModuleOrOwner = 201 CCIPErrorOnlyAdministrator = 202 CCIPErrorOnlyPendingAdministrator = 203 CCIPErrorTokenAlreadyRegistered = 204 CCIPErrorInvalidTokenPoolToken = 205 CCIPErrorPoolTokenMismatch = 301 CCIPErrorChainNotSupported = 302 CCIPErrorCallerIsNotRamp = 303 CCIPErrorInsufficientPoolLiquidity = 304 CCIPErrorInvalidRemotePoolAddress = 305 CCIPErrorInvalidRemoteChainConfig = 306 CCIPErrorInvalidRemoteChainDecimals = 307 CCIPErrorDecimalAmountOverflow = 308 CCIPErrorInvalidPoolTokenDecimals = 309 CCIPErrorBucketOverfilled = 310 CCIPErrorTokenMaxCapacityExceeded = 311 CCIPErrorTokenRateLimitReached = 312 CCIPErrorInvalidRateLimitRate = 313 CCIPErrorDisabledNonZeroRateLimit = 314 CCIPErrorInvalidRequestedFinality = 315 CCIPErrorRequestedFinalityCanOnlyHaveOneMode = 316 CCIPErrorInvalidChainForClient = 317 CCIPErrorRouterNotConfigured = 318 CCIPErrorInvalidFeeCalculation = 801 CCIPErrorInvalidFeeTokenConversion = 802 CCIPErrorZeroFeeAggregatorNotAllowed = 803 )
CCIPError represents the contract error codes.
const AuthorizedCallerAddedEventTopic = "auth_CallerAdded"
AuthorizedCallerAddedEventTopic is the event topic identifier.
const AuthorizedCallerRemovedEventTopic = "auth_CallerRemoved"
AuthorizedCallerRemovedEventTopic is the event topic identifier.
const DepositEventTopic = "lockbox_Deposit"
DepositEventTopic is the event topic identifier.
const OwnershipTransferStartedEventTopic = "auth_OwnerTransferStart"
OwnershipTransferStartedEventTopic is the event topic identifier.
const RoleGrantedEventTopic = "auth_RoleGranted"
RoleGrantedEventTopic is the event topic identifier.
const RoleRevokedEventTopic = "auth_RoleRevoked"
RoleRevokedEventTopic is the event topic identifier.
const WithdrawalEventTopic = "lockbox_Withdrawal"
WithdrawalEventTopic is the event topic identifier.
Variables ¶
var CCIPErrorMessage = map[int]string{}/* 116 elements not displayed */
CCIPErrorMessage returns a human-readable message for error codes.
Functions ¶
This section is empty.
Types ¶
type AllowListEntry ¶
AllowListEntry represents the AllowListEntry struct from the contract.
func AllowListEntryFromScVal ¶
func AllowListEntryFromScVal(val xdr.ScVal) (*AllowListEntry, error)
AllowListEntryFromScVal parses an xdr.ScVal into AllowListEntry.
type AllowListUpdate ¶
type AllowListUpdate struct {
AddedAllowlistedSenders []string
AllowlistEnabled bool
DestChainSelector uint64
RemovedAllowlistedSenders []string
}
AllowListUpdate represents the AllowListUpdate struct from the contract.
func AllowListUpdateFromScVal ¶
func AllowListUpdateFromScVal(val xdr.ScVal) (*AllowListUpdate, error)
AllowListUpdateFromScVal parses an xdr.ScVal into AllowListUpdate.
type AnyToStellarMessage ¶
type AnyToStellarMessage struct {
Data []byte
DestTokenAmounts []TokenAmount
MessageId [32]byte
Sender []byte
SourceChainSelector uint64
}
AnyToStellarMessage represents the AnyToStellarMessage struct from the contract.
func AnyToStellarMessageFromScVal ¶
func AnyToStellarMessageFromScVal(val xdr.ScVal) (*AnyToStellarMessage, error)
AnyToStellarMessageFromScVal parses an xdr.ScVal into AnyToStellarMessage.
type AuthorizedCallerAddedEvent ¶
type AuthorizedCallerAddedEvent struct {
Caller string
// Event metadata
Ledger uint32
TxHash string
}
AuthorizedCallerAddedEvent represents the AuthorizedCallerAddedEvent event. Topics: [auth_CallerAdded]
func ParseAuthorizedCallerAddedEvent ¶
func ParseAuthorizedCallerAddedEvent(e protocolrpc.EventInfo) (*AuthorizedCallerAddedEvent, error)
type AuthorizedCallerRemovedEvent ¶
type AuthorizedCallerRemovedEvent struct {
Caller string
// Event metadata
Ledger uint32
TxHash string
}
AuthorizedCallerRemovedEvent represents the AuthorizedCallerRemovedEvent event. Topics: [auth_CallerRemoved]
func ParseAuthorizedCallerRemovedEvent ¶
func ParseAuthorizedCallerRemovedEvent(e protocolrpc.EventInfo) (*AuthorizedCallerRemovedEvent, error)
type DepositEvent ¶
type DepositEvent struct {
Token string
Depositor string
Amount int64
// Event metadata
Ledger uint32
TxHash string
}
DepositEvent represents the DepositEvent event. Topics: [lockbox_Deposit]
func ParseDepositEvent ¶
func ParseDepositEvent(e protocolrpc.EventInfo) (*DepositEvent, error)
type GenericExtraArgsV3 ¶
type GenericExtraArgsV3 struct {
BlockConfirmations uint32
CcvArgs [][]byte
Ccvs []string
Executor string
ExecutorArgs []byte
GasLimit uint32
TokenArgs []byte
TokenReceiver []byte
}
GenericExtraArgsV3 represents the GenericExtraArgsV3 struct from the contract.
func GenericExtraArgsV3FromScVal ¶
func GenericExtraArgsV3FromScVal(val xdr.ScVal) (*GenericExtraArgsV3, error)
GenericExtraArgsV3FromScVal parses an xdr.ScVal into GenericExtraArgsV3.
type OwnershipTransferStartedEvent ¶
type OwnershipTransferStartedEvent struct {
PreviousOwner string
NewOwner string
// Event metadata
Ledger uint32
TxHash string
}
OwnershipTransferStartedEvent represents the OwnershipTransferStartedEvent event. Topics: [auth_OwnerTransferStart]
func ParseOwnershipTransferStartedEvent ¶
func ParseOwnershipTransferStartedEvent(e protocolrpc.EventInfo) (*OwnershipTransferStartedEvent, error)
type RoleGrantedEvent ¶
type RoleGrantedEvent struct {
Role string
Account string
Sender string
// Event metadata
Ledger uint32
TxHash string
}
RoleGrantedEvent represents the RoleGrantedEvent event. Topics: [auth_RoleGranted]
func ParseRoleGrantedEvent ¶
func ParseRoleGrantedEvent(e protocolrpc.EventInfo) (*RoleGrantedEvent, error)
type RoleRevokedEvent ¶
type RoleRevokedEvent struct {
Role string
Account string
Sender string
// Event metadata
Ledger uint32
TxHash string
}
RoleRevokedEvent represents the RoleRevokedEvent event. Topics: [auth_RoleRevoked]
func ParseRoleRevokedEvent ¶
func ParseRoleRevokedEvent(e protocolrpc.EventInfo) (*RoleRevokedEvent, error)
type StellarToAnyMessage ¶
type StellarToAnyMessage struct {
Data []byte
ExtraArgs []byte
FeeToken string
Receiver []byte
TokenAmounts []TokenAmount
}
StellarToAnyMessage represents the StellarToAnyMessage struct from the contract.
func StellarToAnyMessageFromScVal ¶
func StellarToAnyMessageFromScVal(val xdr.ScVal) (*StellarToAnyMessage, error)
StellarToAnyMessageFromScVal parses an xdr.ScVal into StellarToAnyMessage.
type TokenAmount ¶
TokenAmount represents the TokenAmount struct from the contract.
func TokenAmountFromScVal ¶
func TokenAmountFromScVal(val xdr.ScVal) (*TokenAmount, error)
TokenAmountFromScVal parses an xdr.ScVal into TokenAmount.
type TokenLockBoxClient ¶
type TokenLockBoxClient struct {
// contains filtered or unexported fields
}
TokenLockBoxClient provides methods to interact with the TokenLockBox contract.
func NewTokenLockBoxClient ¶
func NewTokenLockBoxClient(invoker bindings.Invoker, contractID string) *TokenLockBoxClient
NewTokenLockBoxClient creates a new TokenLockBoxClient.
func (*TokenLockBoxClient) AcceptOwnership ¶
func (c *TokenLockBoxClient) AcceptOwnership(ctx context.Context) error
AcceptOwnership calls the accept_ownership function on the contract.
func (*TokenLockBoxClient) AddAllowedCallers ¶
func (c *TokenLockBoxClient) AddAllowedCallers(ctx context.Context, callers []string) error
AddAllowedCallers calls the add_allowed_callers function on the contract.
func (*TokenLockBoxClient) CancelOwnershipTransfer ¶
func (c *TokenLockBoxClient) CancelOwnershipTransfer(ctx context.Context) error
CancelOwnershipTransfer calls the cancel_ownership_transfer function on the contract.
func (*TokenLockBoxClient) ContractID ¶
func (c *TokenLockBoxClient) ContractID() string
ContractID returns the contract ID.
func (*TokenLockBoxClient) GetAllowedCallers ¶
func (c *TokenLockBoxClient) GetAllowedCallers(ctx context.Context) ([]string, error)
GetAllowedCallers calls the get_allowed_callers function on the contract.
func (*TokenLockBoxClient) GetPendingOwner ¶
func (c *TokenLockBoxClient) GetPendingOwner(ctx context.Context) (*string, error)
GetPendingOwner calls the get_pending_owner function on the contract.
func (*TokenLockBoxClient) GetToken ¶
func (c *TokenLockBoxClient) GetToken(ctx context.Context) (string, error)
GetToken calls the get_token function on the contract.
func (*TokenLockBoxClient) InitOwner ¶
func (c *TokenLockBoxClient) InitOwner(ctx context.Context, owner string) error
InitOwner calls the init_owner function on the contract.
func (*TokenLockBoxClient) Initialize ¶
Initialize calls the initialize function on the contract.
func (*TokenLockBoxClient) IsTokenSupported ¶
IsTokenSupported calls the is_token_supported function on the contract.
func (*TokenLockBoxClient) Owner ¶
func (c *TokenLockBoxClient) Owner(ctx context.Context) (*string, error)
Owner calls the owner function on the contract.
func (*TokenLockBoxClient) RemoveAllowedCallers ¶
func (c *TokenLockBoxClient) RemoveAllowedCallers(ctx context.Context, callers []string) error
RemoveAllowedCallers calls the remove_allowed_callers function on the contract.
func (*TokenLockBoxClient) RequireOwner ¶
func (c *TokenLockBoxClient) RequireOwner(ctx context.Context) (string, error)
RequireOwner calls the require_owner function on the contract.
func (*TokenLockBoxClient) SetNewOwner ¶
func (c *TokenLockBoxClient) SetNewOwner(ctx context.Context, newOwner string) error
SetNewOwner calls the set_new_owner function on the contract.
func (*TokenLockBoxClient) TransferOwnership ¶
func (c *TokenLockBoxClient) TransferOwnership(ctx context.Context, newOwner string) error
TransferOwnership calls the transfer_ownership function on the contract.
func (*TokenLockBoxClient) WaitForAuthorizedCallerAddedEvent ¶
func (c *TokenLockBoxClient) WaitForAuthorizedCallerAddedEvent(ctx context.Context, startLedger uint32, timeout time.Duration, filter func(*AuthorizedCallerAddedEvent) bool) (*AuthorizedCallerAddedEvent, error)
WaitForAuthorizedCallerAddedEvent waits for a AuthorizedCallerAddedEvent event.
func (*TokenLockBoxClient) WaitForAuthorizedCallerRemovedEvent ¶
func (c *TokenLockBoxClient) WaitForAuthorizedCallerRemovedEvent(ctx context.Context, startLedger uint32, timeout time.Duration, filter func(*AuthorizedCallerRemovedEvent) bool) (*AuthorizedCallerRemovedEvent, error)
WaitForAuthorizedCallerRemovedEvent waits for a AuthorizedCallerRemovedEvent event.
func (*TokenLockBoxClient) WaitForDepositEvent ¶
func (c *TokenLockBoxClient) WaitForDepositEvent(ctx context.Context, startLedger uint32, timeout time.Duration, filter func(*DepositEvent) bool) (*DepositEvent, error)
WaitForDepositEvent waits for a DepositEvent event.
func (*TokenLockBoxClient) WaitForOwnershipTransferStartedEvent ¶
func (c *TokenLockBoxClient) WaitForOwnershipTransferStartedEvent(ctx context.Context, startLedger uint32, timeout time.Duration, filter func(*OwnershipTransferStartedEvent) bool) (*OwnershipTransferStartedEvent, error)
WaitForOwnershipTransferStartedEvent waits for a OwnershipTransferStartedEvent event.
func (*TokenLockBoxClient) WaitForRoleGrantedEvent ¶
func (c *TokenLockBoxClient) WaitForRoleGrantedEvent(ctx context.Context, startLedger uint32, timeout time.Duration, filter func(*RoleGrantedEvent) bool) (*RoleGrantedEvent, error)
WaitForRoleGrantedEvent waits for a RoleGrantedEvent event.
func (*TokenLockBoxClient) WaitForRoleRevokedEvent ¶
func (c *TokenLockBoxClient) WaitForRoleRevokedEvent(ctx context.Context, startLedger uint32, timeout time.Duration, filter func(*RoleRevokedEvent) bool) (*RoleRevokedEvent, error)
WaitForRoleRevokedEvent waits for a RoleRevokedEvent event.
func (*TokenLockBoxClient) WaitForWithdrawalEvent ¶
func (c *TokenLockBoxClient) WaitForWithdrawalEvent(ctx context.Context, startLedger uint32, timeout time.Duration, filter func(*WithdrawalEvent) bool) (*WithdrawalEvent, error)
WaitForWithdrawalEvent waits for a WithdrawalEvent event.
type WithdrawalEvent ¶
type WithdrawalEvent struct {
Token string
Recipient string
Amount int64
// Event metadata
Ledger uint32
TxHash string
}
WithdrawalEvent represents the WithdrawalEvent event. Topics: [lockbox_Withdrawal]
func ParseWithdrawalEvent ¶
func ParseWithdrawalEvent(e protocolrpc.EventInfo) (*WithdrawalEvent, error)