Documentation
¶
Index ¶
- Constants
- Variables
- type ApplyRampUpdates
- type CCIPReceiveConfirm
- type CCIPSend
- type CCIPSendACK
- type CCIPSendNACK
- type ChainSelector
- type ExitCode
- type MessageRejected
- type MessageSent
- type OffRamps
- type OnRamps
- type RMNOwnableMessage
- type RMNRemote
- type RMNRemoteCurse
- type RMNRemoteUncurse
- type RouteMessage
- type Storage
- type Subject
- type TokenAmount
Constants ¶
View Source
const ( OutgoingOpcodeCCIPSendACK = 0x78d0f21e OutgoingOpcodeCCIPSendNACK = 0x5a45d434 )
Variables ¶
View Source
var ( OpcodeApplyRampUpdates = tvm.MustExtractMagic(reflect.TypeOf(ApplyRampUpdates{})) OpcodeCCIPSend = tvm.MustExtractMagic(reflect.TypeOf(CCIPSend{})) OpcodeRouteMessage = tvm.MustExtractMagic(reflect.TypeOf(RouteMessage{})) OpcodeCCIPReceiveConfirm = tvm.MustExtractMagic(reflect.TypeOf(CCIPReceiveConfirm{})) OpcodeMessageSent = tvm.MustExtractMagic(reflect.TypeOf(MessageSent{})) OpcodeMessageRejected = tvm.MustExtractMagic(reflect.TypeOf(MessageRejected{})) OpcodeRMNRemoteCurse = tvm.MustExtractMagic(reflect.TypeOf(RMNRemoteCurse{})) OpcodeRMNRemoteUncurse = tvm.MustExtractMagic(reflect.TypeOf(RMNRemoteUncurse{})) )
View Source
var ExitCodeCodec tvm.ExitCodeCodecInt[ExitCode] = ExitCode(tvm.ExitCode(-1))
View Source
var GetDestChainSelectors = tvm.NewNoArgsGetter(tvm.NoArgsOpts[[]uint64]{ Name: "destChainSelectors", Decoder: tvm.NewResultDecoder(func(r *ton.ExecutionResult) ([]uint64, error) { selectors, err := parser.ParseLispTuple[*big.Int](r.AsTuple()) if err != nil { return nil, err } return lo.Map(selectors, func(x *big.Int, _ int) uint64 { return x.Uint64() }), nil }), })
GetDestChainSelectors gets all destination chain selectors
View Source
var GetOnRamp = tvm.Getter[uint64, *address.Address]{ Name: "onRamp", Decoder: tvm.NewResultDecoder(func(r *ton.ExecutionResult) (*address.Address, error) { onRampSlice, err := r.Slice(0) if err != nil { return nil, err } return onRampSlice.LoadAddr() }), }
GetOnRamp gets the onRamp address for a given destination chain selector
View Source
var GetOwner = ownable2step.GetOwner
GetOwner gets the owner of the Router contract
View Source
var GetPendingOwner = ownable2step.GetPendingOwner
GetPendingOwner gets the pending owner of the Router contract
View Source
var GetRMNOwner = ownable2step.MakeGetOwner("rmn")
View Source
var GetRMNPendingOwner = ownable2step.MakeGetPendingOwner("rmn")
View Source
var GetVerifyNotCursed = tvm.Getter[*big.Int, bool]{ Name: "verifyNotCursed", Decoder: tvm.NewResultDecoder(func(r *ton.ExecutionResult) (bool, error) { notCursed, err := r.Int(0) if err != nil { return false, fmt.Errorf("failed to parse verifyNotCursed result: %w", err) } return notCursed.Cmp(big.NewInt(0)) != 0, nil }), }
GetVerifyNotCursed checks if the input subject is not cursed.
View Source
var TLBs = tvm.MustNewTLBMap([]any{ ApplyRampUpdates{}, CCIPSend{}, RouteMessage{}, CCIPReceiveConfirm{}, CCIPSendACK{}, CCIPSendNACK{}, MessageSent{}, MessageRejected{}, RMNRemoteCurse{}, RMNRemoteUncurse{}, RMNOwnableMessage[any]{Content: nil}, }).MustWithStorageType(Storage{})
Functions ¶
This section is empty.
Types ¶
type ApplyRampUpdates ¶
type ApplyRampUpdates struct {
QueryID uint64 `tlb:"## 64"`
OnRampUpdates *OnRamps `tlb:"maybe ."`
OffRampAdds *OffRamps `tlb:"maybe ."`
OffRampRemoves *OffRamps `tlb:"maybe ."`
// contains filtered or unexported fields
}
crc32("ApplyRampUpdates")
type CCIPReceiveConfirm ¶
type CCIPSend ¶
type CCIPSend struct {
QueryID uint64 `tlb:"## 64"`
DestChainSelector uint64 `tlb:"## 64"`
Receiver common.CrossChainAddress `tlb:"."`
Data common.SnakeBytes `tlb:"^"`
TokenAmounts common.SnakedCell[TokenAmount] `tlb:"^"`
FeeToken *address.Address `tlb:"addr"`
ExtraArgs *cell.Cell `tlb:"^"`
// contains filtered or unexported fields
}
type CCIPSendACK ¶
type CCIPSendNACK ¶
type ChainSelector ¶
type ChainSelector struct {
Value uint64 `tlb:"## 64"`
}
ChainSelector is a wrapper uint64 to support SnakedCell encoding.
type MessageRejected ¶
type MessageSent ¶
type OffRamps ¶
type OffRamps struct {
SourceChainSelectors common.SnakedCell[ChainSelector] `tlb:"^"`
OffRamp *address.Address `tlb:"addr"`
}
type OnRamps ¶
type OnRamps struct {
DestChainSelectors common.SnakedCell[ChainSelector] `tlb:"^"`
OnRamps *address.Address `tlb:"addr"`
}
type RMNOwnableMessage ¶
type RMNOwnableMessage[T ownable2step.InMessage | any] struct { Content *codec.MessageEnvelope[T] `tlb:"."` // contains filtered or unexported fields }
type RMNRemote ¶
type RMNRemote struct {
Admin ownable2step.Storage `tlb:"."`
CursedSubjects *cell.Dictionary `tlb:"dict 128"`
ForwardUpdates *cell.Dictionary `tlb:"dict 267"`
}
type RMNRemoteCurse ¶
type RMNRemoteCurse struct {
QueryID uint64 `tlb:"## 64"`
Subjects common.SnakedCell[Subject] `tlb:"^"`
// contains filtered or unexported fields
}
RMNRemoteCurse message type for cursing subjects on the router.
type RMNRemoteUncurse ¶
type RMNRemoteUncurse struct {
QueryID uint64 `tlb:"## 64"`
Subjects common.SnakedCell[Subject] `tlb:"^"`
// contains filtered or unexported fields
}
RMNRemoteUncurse message type for uncursing subjects on the router.
type RouteMessage ¶
type Storage ¶
type Storage struct {
ID uint32 `tlb:"## 32"`
Ownable ownable2step.Storage `tlb:"."`
WrappedNative *address.Address `tlb:"addr"`
OnRamps *cell.Dictionary `tlb:"dict 64"`
OffRamps *cell.Dictionary `tlb:"dict 64"`
RMNRemote RMNRemote `tlb:"^"`
}
Click to show internal directories.
Click to hide internal directories.