Documentation
¶
Overview ¶
Code generated by stellar-bindings-generator. DO NOT EDIT.
Code generated by stellar-bindings-generator. DO NOT EDIT.
Index ¶
- Constants
- Variables
- type ChainUpdate
- type LockOrBurnIn
- type LockOrBurnOut
- type MessageDirection
- type PoolFeeResult
- type PoolRequiredCCVs
- type RateLimitConfig
- type RateLimiterState
- type ReleaseOrMintIn
- type ReleaseOrMintOut
- type TokenBucket
- type TokenPoolClient
- func (c *TokenPoolClient) ApplyChainUpdates(ctx context.Context, adds []ChainUpdate, removes []uint64) error
- func (c *TokenPoolClient) ContractID() string
- func (c *TokenPoolClient) GetAdvancedPoolHooks(ctx context.Context) (*string, error)
- func (c *TokenPoolClient) GetAllowedFinalityConfig(ctx context.Context) (uint32, error)
- func (c *TokenPoolClient) GetCurrentRateLimiterState(ctx context.Context, remoteChainSelector uint64, fastFinality bool) (*RateLimiterState, error)
- func (c *TokenPoolClient) GetFee(ctx context.Context, remoteChainSelector uint64) (*PoolFeeResult, error)
- func (c *TokenPoolClient) GetRampRegistry(ctx context.Context) (*string, error)
- func (c *TokenPoolClient) GetRateLimitAdmin(ctx context.Context) (*string, error)
- func (c *TokenPoolClient) GetRemotePool(ctx context.Context, remoteChainSelector uint64) ([]byte, error)
- func (c *TokenPoolClient) GetRemoteToken(ctx context.Context, remoteChainSelector uint64) ([]byte, error)
- func (c *TokenPoolClient) GetRequiredCcvs(ctx context.Context, localToken string, remoteChainSelector uint64, ...) (*PoolRequiredCCVs, error)
- func (c *TokenPoolClient) GetRouter(ctx context.Context) (*string, error)
- func (c *TokenPoolClient) GetToken(ctx context.Context) (string, error)
- func (c *TokenPoolClient) GetTokenDecimals(ctx context.Context) (uint32, error)
- func (c *TokenPoolClient) Initialize(ctx context.Context, owner string, token string, tokenDecimals uint32, ...) error
- func (c *TokenPoolClient) IsSupportedChain(ctx context.Context, remoteChainSelector uint64) (bool, error)
- func (c *TokenPoolClient) IsSupportedToken(ctx context.Context, token string) (bool, error)
- func (c *TokenPoolClient) LockOrBurn(ctx context.Context, caller string, input LockOrBurnIn, ...) (*LockOrBurnOut, error)
- func (c *TokenPoolClient) ReleaseOrMint(ctx context.Context, caller string, input ReleaseOrMintIn, ...) (*ReleaseOrMintOut, error)
- func (c *TokenPoolClient) RemoveAdvancedPoolHooks(ctx context.Context) error
- func (c *TokenPoolClient) SetAdvancedPoolHooks(ctx context.Context, hooks string) error
- func (c *TokenPoolClient) SetAllowedFinalityConfig(ctx context.Context, allowedFinality uint32) error
- func (c *TokenPoolClient) SetRampRegistry(ctx context.Context, rampRegistry string) error
- func (c *TokenPoolClient) SetRateLimitAdmin(ctx context.Context, admin string) error
- func (c *TokenPoolClient) SetRateLimitConfig(ctx context.Context, remoteChainSelector uint64, ...) error
- func (c *TokenPoolClient) SetRouter(ctx context.Context, router string) error
- func (c *TokenPoolClient) TypeAndVersion(ctx context.Context) (string, error)
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 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 CCIPErrorRouterNotConfigured = 318 CCIPErrorInvalidFeeCalculation = 801 CCIPErrorInvalidFeeTokenConversion = 802 )
CCIPError represents the contract error codes.
Variables ¶
var CCIPErrorMessage = map[int]string{}/* 113 elements not displayed */
CCIPErrorMessage returns a human-readable message for error codes.
Functions ¶
This section is empty.
Types ¶
type ChainUpdate ¶
type ChainUpdate struct {
RemoteChainSelector uint64
RemotePoolAddresses []byte
RemoteTokenAddress []byte
OutboundRateLimiterConfig RateLimitConfig
InboundRateLimiterConfig RateLimitConfig
}
ChainUpdate represents the ChainUpdate struct from the contract.
func ChainUpdateFromScVal ¶
func ChainUpdateFromScVal(val xdr.ScVal) (*ChainUpdate, error)
ChainUpdateFromScVal parses an xdr.ScVal into ChainUpdate.
type LockOrBurnIn ¶
type LockOrBurnIn struct {
Receiver []byte
RemoteChainSelector uint64
OriginalSender string
Amount int64
LocalToken string
}
LockOrBurnIn represents the LockOrBurnIn struct from the contract.
func LockOrBurnInFromScVal ¶
func LockOrBurnInFromScVal(val xdr.ScVal) (*LockOrBurnIn, error)
LockOrBurnInFromScVal parses an xdr.ScVal into LockOrBurnIn.
type LockOrBurnOut ¶
LockOrBurnOut represents the LockOrBurnOut struct from the contract.
func LockOrBurnOutFromScVal ¶
func LockOrBurnOutFromScVal(val xdr.ScVal) (*LockOrBurnOut, error)
LockOrBurnOutFromScVal parses an xdr.ScVal into LockOrBurnOut.
type MessageDirection ¶
type MessageDirection uint32
MessageDirection represents the MessageDirection enum (unit-only Soroban contracttype, encoded as ScVal::U32).
const ( MessageDirectionOutbound MessageDirection = 0 MessageDirectionInbound MessageDirection = 1 )
func MessageDirectionFromScVal ¶
func MessageDirectionFromScVal(val xdr.ScVal) (MessageDirection, error)
MessageDirectionFromScVal parses an xdr.ScVal into MessageDirection.
type PoolFeeResult ¶
type PoolFeeResult struct {
FeeUsdCents uint32
}
PoolFeeResult represents the PoolFeeResult struct from the contract.
func PoolFeeResultFromScVal ¶
func PoolFeeResultFromScVal(val xdr.ScVal) (*PoolFeeResult, error)
PoolFeeResultFromScVal parses an xdr.ScVal into PoolFeeResult.
type PoolRequiredCCVs ¶
PoolRequiredCCVs represents the PoolRequiredCCVs struct from the contract.
func PoolRequiredCCVsFromScVal ¶
func PoolRequiredCCVsFromScVal(val xdr.ScVal) (*PoolRequiredCCVs, error)
PoolRequiredCCVsFromScVal parses an xdr.ScVal into PoolRequiredCCVs.
type RateLimitConfig ¶
RateLimitConfig represents the RateLimitConfig struct from the contract.
func RateLimitConfigFromScVal ¶
func RateLimitConfigFromScVal(val xdr.ScVal) (*RateLimitConfig, error)
RateLimitConfigFromScVal parses an xdr.ScVal into RateLimitConfig.
type RateLimiterState ¶
type RateLimiterState struct {
Outbound TokenBucket
Inbound TokenBucket
}
RateLimiterState represents the RateLimiterState struct from the contract.
func RateLimiterStateFromScVal ¶
func RateLimiterStateFromScVal(val xdr.ScVal) (*RateLimiterState, error)
RateLimiterStateFromScVal parses an xdr.ScVal into RateLimiterState.
type ReleaseOrMintIn ¶
type ReleaseOrMintIn struct {
OriginalSender []byte
RemoteChainSelector uint64
Receiver string
Amount int64
LocalToken string
SourcePoolAddress []byte
SourcePoolData []byte
}
ReleaseOrMintIn represents the ReleaseOrMintIn struct from the contract.
func ReleaseOrMintInFromScVal ¶
func ReleaseOrMintInFromScVal(val xdr.ScVal) (*ReleaseOrMintIn, error)
ReleaseOrMintInFromScVal parses an xdr.ScVal into ReleaseOrMintIn.
type ReleaseOrMintOut ¶
type ReleaseOrMintOut struct {
DestinationAmount int64
}
ReleaseOrMintOut represents the ReleaseOrMintOut struct from the contract.
func ReleaseOrMintOutFromScVal ¶
func ReleaseOrMintOutFromScVal(val xdr.ScVal) (*ReleaseOrMintOut, error)
ReleaseOrMintOutFromScVal parses an xdr.ScVal into ReleaseOrMintOut.
type TokenBucket ¶
type TokenBucket struct {
Tokens scval.U128
LastUpdated uint64
IsEnabled bool
Capacity scval.U128
Rate scval.U128
}
TokenBucket represents the TokenBucket struct from the contract.
func TokenBucketFromScVal ¶
func TokenBucketFromScVal(val xdr.ScVal) (*TokenBucket, error)
TokenBucketFromScVal parses an xdr.ScVal into TokenBucket.
type TokenPoolClient ¶
type TokenPoolClient struct {
// contains filtered or unexported fields
}
TokenPoolClient provides methods to interact with the TokenPool contract.
func NewTokenPoolClient ¶
func NewTokenPoolClient(invoker bindings.Invoker, contractID string) *TokenPoolClient
NewTokenPoolClient creates a new TokenPoolClient.
func (*TokenPoolClient) ApplyChainUpdates ¶
func (c *TokenPoolClient) ApplyChainUpdates(ctx context.Context, adds []ChainUpdate, removes []uint64) error
ApplyChainUpdates calls the apply_chain_updates function on the contract.
func (*TokenPoolClient) ContractID ¶
func (c *TokenPoolClient) ContractID() string
ContractID returns the contract ID.
func (*TokenPoolClient) GetAdvancedPoolHooks ¶
func (c *TokenPoolClient) GetAdvancedPoolHooks(ctx context.Context) (*string, error)
GetAdvancedPoolHooks calls the get_advanced_pool_hooks function on the contract.
func (*TokenPoolClient) GetAllowedFinalityConfig ¶
func (c *TokenPoolClient) GetAllowedFinalityConfig(ctx context.Context) (uint32, error)
GetAllowedFinalityConfig calls the get_allowed_finality_config function on the contract.
func (*TokenPoolClient) GetCurrentRateLimiterState ¶
func (c *TokenPoolClient) GetCurrentRateLimiterState(ctx context.Context, remoteChainSelector uint64, fastFinality bool) (*RateLimiterState, error)
GetCurrentRateLimiterState calls the get_current_rate_limiter_state function on the contract.
func (*TokenPoolClient) GetFee ¶
func (c *TokenPoolClient) GetFee(ctx context.Context, remoteChainSelector uint64) (*PoolFeeResult, error)
GetFee calls the get_fee function on the contract.
func (*TokenPoolClient) GetRampRegistry ¶
func (c *TokenPoolClient) GetRampRegistry(ctx context.Context) (*string, error)
GetRampRegistry calls the get_ramp_registry function on the contract.
func (*TokenPoolClient) GetRateLimitAdmin ¶
func (c *TokenPoolClient) GetRateLimitAdmin(ctx context.Context) (*string, error)
GetRateLimitAdmin calls the get_rate_limit_admin function on the contract.
func (*TokenPoolClient) GetRemotePool ¶
func (c *TokenPoolClient) GetRemotePool(ctx context.Context, remoteChainSelector uint64) ([]byte, error)
GetRemotePool calls the get_remote_pool function on the contract.
func (*TokenPoolClient) GetRemoteToken ¶
func (c *TokenPoolClient) GetRemoteToken(ctx context.Context, remoteChainSelector uint64) ([]byte, error)
GetRemoteToken calls the get_remote_token function on the contract.
func (*TokenPoolClient) GetRequiredCcvs ¶
func (c *TokenPoolClient) GetRequiredCcvs(ctx context.Context, localToken string, remoteChainSelector uint64, amount int64, requestedFinality uint32, extraData []byte, direction MessageDirection) (*PoolRequiredCCVs, error)
GetRequiredCcvs calls the get_required_ccvs function on the contract.
func (*TokenPoolClient) GetRouter ¶
func (c *TokenPoolClient) GetRouter(ctx context.Context) (*string, error)
GetRouter calls the get_router function on the contract.
func (*TokenPoolClient) GetToken ¶
func (c *TokenPoolClient) GetToken(ctx context.Context) (string, error)
GetToken calls the get_token function on the contract.
func (*TokenPoolClient) GetTokenDecimals ¶
func (c *TokenPoolClient) GetTokenDecimals(ctx context.Context) (uint32, error)
GetTokenDecimals calls the get_token_decimals function on the contract.
func (*TokenPoolClient) Initialize ¶
func (c *TokenPoolClient) Initialize(ctx context.Context, owner string, token string, tokenDecimals uint32, router string, rampRegistry string) error
Initialize calls the initialize function on the contract.
func (*TokenPoolClient) IsSupportedChain ¶
func (c *TokenPoolClient) IsSupportedChain(ctx context.Context, remoteChainSelector uint64) (bool, error)
IsSupportedChain calls the is_supported_chain function on the contract.
func (*TokenPoolClient) IsSupportedToken ¶
IsSupportedToken calls the is_supported_token function on the contract.
func (*TokenPoolClient) LockOrBurn ¶
func (c *TokenPoolClient) LockOrBurn(ctx context.Context, caller string, input LockOrBurnIn, requestedFinality uint32) (*LockOrBurnOut, error)
LockOrBurn calls the lock_or_burn function on the contract.
func (*TokenPoolClient) ReleaseOrMint ¶
func (c *TokenPoolClient) ReleaseOrMint(ctx context.Context, caller string, input ReleaseOrMintIn, requestedFinality uint32) (*ReleaseOrMintOut, error)
ReleaseOrMint calls the release_or_mint function on the contract.
func (*TokenPoolClient) RemoveAdvancedPoolHooks ¶
func (c *TokenPoolClient) RemoveAdvancedPoolHooks(ctx context.Context) error
RemoveAdvancedPoolHooks calls the remove_advanced_pool_hooks function on the contract.
func (*TokenPoolClient) SetAdvancedPoolHooks ¶
func (c *TokenPoolClient) SetAdvancedPoolHooks(ctx context.Context, hooks string) error
SetAdvancedPoolHooks calls the set_advanced_pool_hooks function on the contract.
func (*TokenPoolClient) SetAllowedFinalityConfig ¶
func (c *TokenPoolClient) SetAllowedFinalityConfig(ctx context.Context, allowedFinality uint32) error
SetAllowedFinalityConfig calls the set_allowed_finality_config function on the contract.
func (*TokenPoolClient) SetRampRegistry ¶
func (c *TokenPoolClient) SetRampRegistry(ctx context.Context, rampRegistry string) error
SetRampRegistry calls the set_ramp_registry function on the contract.
func (*TokenPoolClient) SetRateLimitAdmin ¶
func (c *TokenPoolClient) SetRateLimitAdmin(ctx context.Context, admin string) error
SetRateLimitAdmin calls the set_rate_limit_admin function on the contract.
func (*TokenPoolClient) SetRateLimitConfig ¶
func (c *TokenPoolClient) SetRateLimitConfig(ctx context.Context, remoteChainSelector uint64, outboundConfig RateLimitConfig, inboundConfig RateLimitConfig, fastFinality bool) error
SetRateLimitConfig calls the set_rate_limit_config function on the contract.
func (*TokenPoolClient) SetRouter ¶
func (c *TokenPoolClient) SetRouter(ctx context.Context, router string) error
SetRouter calls the set_router function on the contract.
func (*TokenPoolClient) TypeAndVersion ¶
func (c *TokenPoolClient) TypeAndVersion(ctx context.Context) (string, error)
TypeAndVersion calls the type_and_version function on the contract.