timelock

package
v0.0.0-...-773544c Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 11, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Code generated by stellar-bindings-generator. DO NOT EDIT.

Code generated by stellar-bindings-generator. DO NOT EDIT.

Index

Constants

View Source
const (
	CCIPErrorNotInitialized                      = 1
	CCIPErrorAlreadyInitialized                  = 2
	CCIPErrorUnauthorized                        = 3
	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.

View Source
const (
	TimelockErrorNotInitialized             = 1
	TimelockErrorAlreadyInitialized         = 2
	TimelockErrorNotAuthorized              = 3
	TimelockErrorOperationAlreadyScheduled  = 20
	TimelockErrorInsufficientDelay          = 21
	TimelockErrorSelectorIsBlocked          = 22
	TimelockErrorOperationNotReady          = 30
	TimelockErrorMissingPredecessor         = 31
	TimelockErrorCallReverted               = 32
	TimelockErrorOperationCannotBeCancelled = 40
	TimelockErrorInvalidInvokeData          = 50
	TimelockErrorIndexOutOfBounds           = 51
)

TimelockError represents the contract error codes.

View Source
const BypasserCallExecutedEventTopic = "tl_BypCallExec"

BypasserCallExecutedEventTopic is the event topic identifier.

View Source
const CallExecutedEventTopic = "tl_CallExecuted"

CallExecutedEventTopic is the event topic identifier.

View Source
const CallScheduledEventTopic = "tl_CallScheduled"

CallScheduledEventTopic is the event topic identifier.

View Source
const CancelledEventTopic = "tl_Cancelled"

CancelledEventTopic is the event topic identifier.

View Source
const FunctionSelectorBlockedEventTopic = "tl_SelBlocked"

FunctionSelectorBlockedEventTopic is the event topic identifier.

View Source
const FunctionSelectorUnblockedEventTopic = "tl_SelUnblock"

FunctionSelectorUnblockedEventTopic is the event topic identifier.

View Source
const MinDelayChangeEventTopic = "tl_MinDelay"

MinDelayChangeEventTopic is the event topic identifier.

View Source
const RoleGrantedEventTopic = "tl_RoleGranted"

RoleGrantedEventTopic is the event topic identifier.

View Source
const RoleRevokedEventTopic = "tl_RoleRevoked"

RoleRevokedEventTopic is the event topic identifier.

Variables

View Source
var CCIPErrorMessage = map[int]string{}/* 116 elements not displayed */

CCIPErrorMessage returns a human-readable message for error codes.

View Source
var TimelockErrorMessage = map[int]string{
	1:  "not initialized",
	2:  "already initialized",
	3:  "not authorized",
	20: "operation already scheduled",
	21: "insufficient delay",
	22: "selector is blocked",
	30: "operation not ready",
	31: "missing predecessor",
	32: "call reverted",
	40: "operation cannot be cancelled",
	50: "invalid invoke data",
	51: "index out of bounds",
}

TimelockErrorMessage returns a human-readable message for error codes.

Functions

This section is empty.

Types

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.

func (AnyToStellarMessage) ToScVal

func (s AnyToStellarMessage) ToScVal() (xdr.ScVal, error)

ToScVal converts AnyToStellarMessage to an xdr.ScVal for contract calls.

type BypasserCallExecutedEvent

type BypasserCallExecutedEvent struct {
	Index uint32
	To    [32]byte
	Data  []byte
	// Event metadata
	Ledger uint32
	TxHash string
}

BypasserCallExecutedEvent represents the BypasserCallExecutedEvent event. Topics: [tl_BypCallExec]

func ParseBypasserCallExecutedEvent

func ParseBypasserCallExecutedEvent(e protocolrpc.EventInfo) (*BypasserCallExecutedEvent, error)

type Call

type Call struct {
	Data []byte
	To   [32]byte
}

Call represents the Call struct from the contract.

func CallFromScVal

func CallFromScVal(val xdr.ScVal) (*Call, error)

CallFromScVal parses an xdr.ScVal into Call.

func (Call) ToScVal

func (s Call) ToScVal() (xdr.ScVal, error)

ToScVal converts Call to an xdr.ScVal for contract calls.

type CallExecutedEvent

type CallExecutedEvent struct {
	Id    [32]byte
	Index uint32
	To    [32]byte
	Data  []byte
	// Event metadata
	Ledger uint32
	TxHash string
}

CallExecutedEvent represents the CallExecutedEvent event. Topics: [tl_CallExecuted]

func ParseCallExecutedEvent

func ParseCallExecutedEvent(e protocolrpc.EventInfo) (*CallExecutedEvent, error)

type CallScheduledEvent

type CallScheduledEvent struct {
	Id          [32]byte
	Index       uint32
	To          [32]byte
	Data        []byte
	Predecessor [32]byte
	Salt        [32]byte
	Delay       uint64
	// Event metadata
	Ledger uint32
	TxHash string
}

CallScheduledEvent represents the CallScheduledEvent event. Topics: [tl_CallScheduled]

func ParseCallScheduledEvent

func ParseCallScheduledEvent(e protocolrpc.EventInfo) (*CallScheduledEvent, error)

type Calls

type Calls struct {
	Inner []Call
}

Calls represents the Calls struct from the contract.

func CallsFromScVal

func CallsFromScVal(val xdr.ScVal) (*Calls, error)

CallsFromScVal parses an xdr.ScVal into Calls.

func (Calls) ToScVal

func (s Calls) ToScVal() (xdr.ScVal, error)

ToScVal converts Calls to an xdr.ScVal for contract calls.

type CancelledEvent

type CancelledEvent struct {
	Id [32]byte
	// Event metadata
	Ledger uint32
	TxHash string
}

CancelledEvent represents the CancelledEvent event. Topics: [tl_Cancelled]

func ParseCancelledEvent

func ParseCancelledEvent(e protocolrpc.EventInfo) (*CancelledEvent, error)

type FunctionSelectorBlockedEvent

type FunctionSelectorBlockedEvent struct {
	Selector string
	// Event metadata
	Ledger uint32
	TxHash string
}

FunctionSelectorBlockedEvent represents the FunctionSelectorBlockedEvent event. Topics: [tl_SelBlocked]

type FunctionSelectorUnblockedEvent

type FunctionSelectorUnblockedEvent struct {
	Selector string
	// Event metadata
	Ledger uint32
	TxHash string
}

FunctionSelectorUnblockedEvent represents the FunctionSelectorUnblockedEvent event. Topics: [tl_SelUnblock]

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.

func (GenericExtraArgsV3) ToScVal

func (s GenericExtraArgsV3) ToScVal() (xdr.ScVal, error)

ToScVal converts GenericExtraArgsV3 to an xdr.ScVal for contract calls.

type MinDelayChangeEvent

type MinDelayChangeEvent struct {
	OldDuration uint64
	NewDuration uint64
	// Event metadata
	Ledger uint32
	TxHash string
}

MinDelayChangeEvent represents the MinDelayChangeEvent event. Topics: [tl_MinDelay]

func ParseMinDelayChangeEvent

func ParseMinDelayChangeEvent(e protocolrpc.EventInfo) (*MinDelayChangeEvent, error)

type RoleGrantedEvent

type RoleGrantedEvent struct {
	Role    string
	Account string
	Sender  string
	// Event metadata
	Ledger uint32
	TxHash string
}

RoleGrantedEvent represents the RoleGrantedEvent event. Topics: [tl_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: [tl_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.

func (StellarToAnyMessage) ToScVal

func (s StellarToAnyMessage) ToScVal() (xdr.ScVal, error)

ToScVal converts StellarToAnyMessage to an xdr.ScVal for contract calls.

type TimelockClient

type TimelockClient struct {
	// contains filtered or unexported fields
}

TimelockClient provides methods to interact with the Timelock contract.

func NewTimelockClient

func NewTimelockClient(invoker bindings.Invoker, contractID string) *TimelockClient

NewTimelockClient creates a new TimelockClient.

func (*TimelockClient) BlockFunctionSelector

func (c *TimelockClient) BlockFunctionSelector(ctx context.Context, caller string, selector string) error

BlockFunctionSelector calls the block_function_selector function on the contract.

func (*TimelockClient) BypasserExecuteBatch

func (c *TimelockClient) BypasserExecuteBatch(ctx context.Context, caller string, calls Calls) error

BypasserExecuteBatch calls the bypasser_execute_batch function on the contract.

func (*TimelockClient) Cancel

func (c *TimelockClient) Cancel(ctx context.Context, caller string, id [32]byte) error

Cancel calls the cancel function on the contract.

func (*TimelockClient) ContractID

func (c *TimelockClient) ContractID() string

ContractID returns the contract ID.

func (*TimelockClient) ExecuteBatch

func (c *TimelockClient) ExecuteBatch(ctx context.Context, caller string, calls Calls, predecessor [32]byte, salt [32]byte) error

ExecuteBatch calls the execute_batch function on the contract.

func (*TimelockClient) ExtendAllTtls

func (c *TimelockClient) ExtendAllTtls(ctx context.Context) error

ExtendAllTtls calls the extend_all_ttls function on the contract.

func (*TimelockClient) ExtendOpTimeTtl

func (c *TimelockClient) ExtendOpTimeTtl(ctx context.Context, id [32]byte) error

ExtendOpTimeTtl calls the extend_op_time_ttl function on the contract.

func (*TimelockClient) GetBlockedSelectorAt

func (c *TimelockClient) GetBlockedSelectorAt(ctx context.Context, index uint32) (string, error)

GetBlockedSelectorAt calls the get_blocked_selector_at function on the contract.

func (*TimelockClient) GetBlockedSelectorCount

func (c *TimelockClient) GetBlockedSelectorCount(ctx context.Context) (uint32, error)

GetBlockedSelectorCount calls the get_blocked_selector_count function on the contract.

func (*TimelockClient) GetMinDelay

func (c *TimelockClient) GetMinDelay(ctx context.Context) (uint64, error)

GetMinDelay calls the get_min_delay function on the contract.

func (*TimelockClient) GetRoleMember

func (c *TimelockClient) GetRoleMember(ctx context.Context, role string, index uint32) (string, error)

GetRoleMember calls the get_role_member function on the contract.

func (*TimelockClient) GetRoleMemberCount

func (c *TimelockClient) GetRoleMemberCount(ctx context.Context, role string) (uint32, error)

GetRoleMemberCount calls the get_role_member_count function on the contract.

func (*TimelockClient) GetTimestamp

func (c *TimelockClient) GetTimestamp(ctx context.Context, id [32]byte) (uint64, error)

GetTimestamp calls the get_timestamp function on the contract.

func (*TimelockClient) GrantRole

func (c *TimelockClient) GrantRole(ctx context.Context, caller string, role string, account string) error

GrantRole calls the grant_role function on the contract.

func (*TimelockClient) HasRole

func (c *TimelockClient) HasRole(ctx context.Context, role string, account string) (bool, error)

HasRole calls the has_role function on the contract.

func (*TimelockClient) HashOperationBatch

func (c *TimelockClient) HashOperationBatch(ctx context.Context, calls Calls, predecessor [32]byte, salt [32]byte) ([32]byte, error)

HashOperationBatch calls the hash_operation_batch function on the contract.

func (*TimelockClient) Initialize

func (c *TimelockClient) Initialize(ctx context.Context, minDelay uint64, admin string, proposers []string, executors []string, cancellers []string, bypassers []string) error

Initialize calls the initialize function on the contract.

func (*TimelockClient) IsOperation

func (c *TimelockClient) IsOperation(ctx context.Context, id [32]byte) (bool, error)

IsOperation calls the is_operation function on the contract.

func (*TimelockClient) IsOperationDone

func (c *TimelockClient) IsOperationDone(ctx context.Context, id [32]byte) (bool, error)

IsOperationDone calls the is_operation_done function on the contract.

func (*TimelockClient) IsOperationPending

func (c *TimelockClient) IsOperationPending(ctx context.Context, id [32]byte) (bool, error)

IsOperationPending calls the is_operation_pending function on the contract.

func (*TimelockClient) IsOperationReady

func (c *TimelockClient) IsOperationReady(ctx context.Context, id [32]byte) (bool, error)

IsOperationReady calls the is_operation_ready function on the contract.

func (*TimelockClient) RenounceRole

func (c *TimelockClient) RenounceRole(ctx context.Context, account string, role string) error

RenounceRole calls the renounce_role function on the contract.

func (*TimelockClient) RevokeRole

func (c *TimelockClient) RevokeRole(ctx context.Context, caller string, role string, account string) error

RevokeRole calls the revoke_role function on the contract.

func (*TimelockClient) ScheduleBatch

func (c *TimelockClient) ScheduleBatch(ctx context.Context, caller string, calls Calls, predecessor [32]byte, salt [32]byte, delay uint64) error

ScheduleBatch calls the schedule_batch function on the contract.

func (*TimelockClient) UnblockFunctionSelector

func (c *TimelockClient) UnblockFunctionSelector(ctx context.Context, caller string, selector string) error

UnblockFunctionSelector calls the unblock_function_selector function on the contract.

func (*TimelockClient) UpdateDelay

func (c *TimelockClient) UpdateDelay(ctx context.Context, caller string, newDelay uint64) error

UpdateDelay calls the update_delay function on the contract.

func (*TimelockClient) WaitForBypasserCallExecutedEvent

func (c *TimelockClient) WaitForBypasserCallExecutedEvent(ctx context.Context, startLedger uint32, timeout time.Duration, filter func(*BypasserCallExecutedEvent) bool) (*BypasserCallExecutedEvent, error)

WaitForBypasserCallExecutedEvent waits for a BypasserCallExecutedEvent event.

func (*TimelockClient) WaitForCallExecutedEvent

func (c *TimelockClient) WaitForCallExecutedEvent(ctx context.Context, startLedger uint32, timeout time.Duration, filter func(*CallExecutedEvent) bool) (*CallExecutedEvent, error)

WaitForCallExecutedEvent waits for a CallExecutedEvent event.

func (*TimelockClient) WaitForCallScheduledEvent

func (c *TimelockClient) WaitForCallScheduledEvent(ctx context.Context, startLedger uint32, timeout time.Duration, filter func(*CallScheduledEvent) bool) (*CallScheduledEvent, error)

WaitForCallScheduledEvent waits for a CallScheduledEvent event.

func (*TimelockClient) WaitForCancelledEvent

func (c *TimelockClient) WaitForCancelledEvent(ctx context.Context, startLedger uint32, timeout time.Duration, filter func(*CancelledEvent) bool) (*CancelledEvent, error)

WaitForCancelledEvent waits for a CancelledEvent event.

func (*TimelockClient) WaitForFunctionSelectorBlockedEvent

func (c *TimelockClient) WaitForFunctionSelectorBlockedEvent(ctx context.Context, startLedger uint32, timeout time.Duration, filter func(*FunctionSelectorBlockedEvent) bool) (*FunctionSelectorBlockedEvent, error)

WaitForFunctionSelectorBlockedEvent waits for a FunctionSelectorBlockedEvent event.

func (*TimelockClient) WaitForFunctionSelectorUnblockedEvent

func (c *TimelockClient) WaitForFunctionSelectorUnblockedEvent(ctx context.Context, startLedger uint32, timeout time.Duration, filter func(*FunctionSelectorUnblockedEvent) bool) (*FunctionSelectorUnblockedEvent, error)

WaitForFunctionSelectorUnblockedEvent waits for a FunctionSelectorUnblockedEvent event.

func (*TimelockClient) WaitForMinDelayChangeEvent

func (c *TimelockClient) WaitForMinDelayChangeEvent(ctx context.Context, startLedger uint32, timeout time.Duration, filter func(*MinDelayChangeEvent) bool) (*MinDelayChangeEvent, error)

WaitForMinDelayChangeEvent waits for a MinDelayChangeEvent event.

func (*TimelockClient) WaitForRoleGrantedEvent

func (c *TimelockClient) WaitForRoleGrantedEvent(ctx context.Context, startLedger uint32, timeout time.Duration, filter func(*RoleGrantedEvent) bool) (*RoleGrantedEvent, error)

WaitForRoleGrantedEvent waits for a RoleGrantedEvent event.

func (*TimelockClient) WaitForRoleRevokedEvent

func (c *TimelockClient) WaitForRoleRevokedEvent(ctx context.Context, startLedger uint32, timeout time.Duration, filter func(*RoleRevokedEvent) bool) (*RoleRevokedEvent, error)

WaitForRoleRevokedEvent waits for a RoleRevokedEvent event.

type TimelockDataKey

type TimelockDataKey struct {
	OpTime *TimelockDataKeyOpTime
}

TimelockDataKey is a Soroban discriminated-union (#[contracttype] enum with payload(s)). Wire format: ScVal::Vec([ScVal::Symbol(<VariantName>), <payload fields...>]). Construct by setting exactly one variant pointer to a non-nil value.

func TimelockDataKeyFromScVal

func TimelockDataKeyFromScVal(val xdr.ScVal) (TimelockDataKey, error)

TimelockDataKeyFromScVal parses an xdr.ScVal into TimelockDataKey.

func (TimelockDataKey) ToScVal

func (e TimelockDataKey) ToScVal() (xdr.ScVal, error)

ToScVal converts TimelockDataKey to its Soroban discriminated-union encoding. Returns an error if zero or multiple variant pointers are set.

type TimelockDataKeyOpTime

type TimelockDataKeyOpTime struct {
	Field0 [32]byte
}

TimelockDataKeyOpTime is the tuple variant TimelockDataKey::OpTime.

type TokenAmount

type TokenAmount struct {
	Amount int64
	Token  string
}

TokenAmount represents the TokenAmount struct from the contract.

func TokenAmountFromScVal

func TokenAmountFromScVal(val xdr.ScVal) (*TokenAmount, error)

TokenAmountFromScVal parses an xdr.ScVal into TokenAmount.

func (TokenAmount) ToScVal

func (s TokenAmount) ToScVal() (xdr.ScVal, error)

ToScVal converts TokenAmount to an xdr.ScVal for contract calls.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL