Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"math"
"math/big"

"github.com/smartcontractkit/chainlink-ton/pkg/ton/tvm"
"github.com/smartcontractkit/chainlink-ton/cciplib/ton/tvm"

"github.com/xssnick/tonutils-go/address"
"github.com/xssnick/tonutils-go/tlb"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package common //nolint:revive,nolintlint
import (
"github.com/xssnick/tonutils-go/ton"

"github.com/smartcontractkit/chainlink-ton/pkg/ton/tvm"
"github.com/smartcontractkit/chainlink-ton/cciplib/ton/tvm"
)

// GetTypeAndVersion gets the type and version of the contract
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ import (
"github.com/xssnick/tonutils-go/tvm/cell"
"golang.org/x/sync/errgroup"

"github.com/smartcontractkit/chainlink-ton/pkg/ton/tlbe"
"github.com/smartcontractkit/chainlink-ton/cciplib/ton/tlbe"

"github.com/smartcontractkit/chainlink-ton/pkg/ccip/bindings/common"
"github.com/smartcontractkit/chainlink-ton/pkg/ccip/bindings/ownable2step"
"github.com/smartcontractkit/chainlink-ton/pkg/ton/parser"
"github.com/smartcontractkit/chainlink-ton/pkg/ton/tvm"
"github.com/smartcontractkit/chainlink-ton/cciplib/ccip/bindings/common"
"github.com/smartcontractkit/chainlink-ton/cciplib/ccip/bindings/ownable2step"
"github.com/smartcontractkit/chainlink-ton/cciplib/ton/parser"
"github.com/smartcontractkit/chainlink-ton/cciplib/ton/tvm"
)

// Fee Quoter opcodes
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ import (
"github.com/xssnick/tonutils-go/ton"
"github.com/xssnick/tonutils-go/tvm/cell"

"github.com/smartcontractkit/chainlink-ton/pkg/ccip/bindings/ownable2step"
"github.com/smartcontractkit/chainlink-ton/pkg/ton/parser"
"github.com/smartcontractkit/chainlink-ton/pkg/ton/tvm"
"github.com/smartcontractkit/chainlink-ton/cciplib/ccip/bindings/ownable2step"
"github.com/smartcontractkit/chainlink-ton/cciplib/ton/parser"
"github.com/smartcontractkit/chainlink-ton/cciplib/ton/tvm"
)

// GetOwner gets the owner of the FeeQuoter contract
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (

"github.com/xssnick/tonutils-go/address"

"github.com/smartcontractkit/chainlink-ton/pkg/ccip/bindings/common"
"github.com/smartcontractkit/chainlink-ton/cciplib/ccip/bindings/common"
)

// SignatureEd25519 represents a signature structure used in commit reports.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"github.com/xssnick/tonutils-go/tlb"
"github.com/xssnick/tonutils-go/tvm/cell"

"github.com/smartcontractkit/chainlink-ton/pkg/ccip/bindings/common"
"github.com/smartcontractkit/chainlink-ton/cciplib/ccip/bindings/common"
)

func TestCommitReport_EncodingAndDecoding(t *testing.T) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"github.com/xssnick/tonutils-go/tlb"
"github.com/xssnick/tonutils-go/tvm/cell"

"github.com/smartcontractkit/chainlink-ton/pkg/ccip/bindings/common"
"github.com/smartcontractkit/chainlink-ton/cciplib/ccip/bindings/common"
)

// ExecuteReport represents CCIP execute report messages on the TON blockchain.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import (
"github.com/xssnick/tonutils-go/tlb"
"github.com/xssnick/tonutils-go/tvm/cell"

"github.com/smartcontractkit/chainlink-ton/pkg/ccip/bindings/common"
"github.com/smartcontractkit/chainlink-ton/pkg/ton/tvm"
"github.com/smartcontractkit/chainlink-ton/cciplib/ccip/bindings/common"
"github.com/smartcontractkit/chainlink-ton/cciplib/ton/tvm"
)

func TestTokenAmounts(t *testing.T) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package ocr

import "github.com/smartcontractkit/chainlink-ton/pkg/ton/tvm"
import "github.com/smartcontractkit/chainlink-ton/cciplib/ton/tvm"

//go:generate go run golang.org/x/tools/cmd/stringer@v0.38.0 -type=ExitCode
type ExitCode tvm.ExitCode
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ import (
"github.com/xssnick/tonutils-go/ton"
"github.com/xssnick/tonutils-go/tvm/cell"

"github.com/smartcontractkit/chainlink-ton/pkg/ccip/bindings/common"
"github.com/smartcontractkit/chainlink-ton/pkg/ccip/bindings/feequoter"
"github.com/smartcontractkit/chainlink-ton/pkg/ccip/bindings/ocr"
"github.com/smartcontractkit/chainlink-ton/pkg/ccip/bindings/ownable2step"
"github.com/smartcontractkit/chainlink-ton/pkg/ton/tvm"
"github.com/smartcontractkit/chainlink-ton/cciplib/ccip/bindings/common"
"github.com/smartcontractkit/chainlink-ton/cciplib/ccip/bindings/feequoter"
"github.com/smartcontractkit/chainlink-ton/cciplib/ccip/bindings/ocr"
"github.com/smartcontractkit/chainlink-ton/cciplib/ccip/bindings/ownable2step"
"github.com/smartcontractkit/chainlink-ton/cciplib/ton/tvm"
)

// OnRamp opcodes
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ import (
"github.com/xssnick/tonutils-go/tlb"
"github.com/xssnick/tonutils-go/tvm/cell"

"github.com/smartcontractkit/chainlink-ton/pkg/ccip/bindings/common"
"github.com/smartcontractkit/chainlink-ton/pkg/ccip/bindings/ownable2step"
"github.com/smartcontractkit/chainlink-ton/cciplib/ccip/bindings/common"
"github.com/smartcontractkit/chainlink-ton/cciplib/ccip/bindings/ownable2step"
)

func TestTopicCRC32Values(t *testing.T) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ import (
"github.com/xssnick/tonutils-go/tlb"
"github.com/xssnick/tonutils-go/ton"

"github.com/smartcontractkit/chainlink-ton/pkg/ccip/bindings/ownable2step"
"github.com/smartcontractkit/chainlink-ton/pkg/ton/parser"
"github.com/smartcontractkit/chainlink-ton/pkg/ton/tvm"
"github.com/smartcontractkit/chainlink-ton/cciplib/ccip/bindings/ownable2step"
"github.com/smartcontractkit/chainlink-ton/cciplib/ton/parser"
"github.com/smartcontractkit/chainlink-ton/cciplib/ton/tvm"
)

// GetOwner gets the owner of the OnRamp contract
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"github.com/xssnick/tonutils-go/address"
"github.com/xssnick/tonutils-go/ton"

"github.com/smartcontractkit/chainlink-ton/pkg/ton/tvm"
"github.com/smartcontractkit/chainlink-ton/cciplib/ton/tvm"
)

var (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"github.com/xssnick/tonutils-go/address"
"github.com/xssnick/tonutils-go/tlb"

"github.com/smartcontractkit/chainlink-ton/pkg/ton/tvm"
"github.com/smartcontractkit/chainlink-ton/cciplib/ton/tvm"
)

// --- Messages - incoming ---
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (

"github.com/smartcontractkit/chainlink-common/pkg/types/ccipocr3"

"github.com/smartcontractkit/chainlink-ton/pkg/ton/tvm"
"github.com/smartcontractkit/chainlink-ton/cciplib/ton/tvm"
)

var ErrInvalidWorkchain = errors.New("workchain value outside valid int8 range [-128, 127]")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ import (

cciptypes "github.com/smartcontractkit/chainlink-common/pkg/types/ccipocr3"

"github.com/smartcontractkit/chainlink-ton/pkg/ccip/bindings/common"
"github.com/smartcontractkit/chainlink-ton/pkg/ccip/bindings/feequoter"
"github.com/smartcontractkit/chainlink-ton/pkg/ccip/bindings/ocr"
"github.com/smartcontractkit/chainlink-ton/cciplib/ccip/bindings/common"
"github.com/smartcontractkit/chainlink-ton/cciplib/ccip/bindings/feequoter"
"github.com/smartcontractkit/chainlink-ton/cciplib/ccip/bindings/ocr"
)

// CommitPluginCodecV1 is a codec for encoding and decoding commit plugin reports.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ import (

"github.com/smartcontractkit/chainlink-common/pkg/types/ccipocr3"

"github.com/smartcontractkit/chainlink-ton/pkg/ccip/bindings/common"
"github.com/smartcontractkit/chainlink-ton/pkg/ccip/bindings/ocr"
"github.com/smartcontractkit/chainlink-ton/pkg/ccip/bindings/onramp"
"github.com/smartcontractkit/chainlink-ton/pkg/ton/tvm"
"github.com/smartcontractkit/chainlink-ton/cciplib/ccip/bindings/common"
"github.com/smartcontractkit/chainlink-ton/cciplib/ccip/bindings/ocr"
"github.com/smartcontractkit/chainlink-ton/cciplib/ccip/bindings/onramp"
"github.com/smartcontractkit/chainlink-ton/cciplib/ton/tvm"
)

// ExecutePluginCodecV1 is a codec for encoding and decoding execute plugin reports.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ import (

"github.com/smartcontractkit/chainlink-common/pkg/types/ccipocr3"

mocks "github.com/smartcontractkit/chainlink-ton/mocks/ccipocr3"
"github.com/smartcontractkit/chainlink-ton/pkg/ccip/bindings/common"
"github.com/smartcontractkit/chainlink-ton/pkg/ccip/bindings/ocr"
"github.com/smartcontractkit/chainlink-ton/pkg/ton/tvm"
mocks "github.com/smartcontractkit/chainlink-ton/cciplib/mocks/ccipocr3"
"github.com/smartcontractkit/chainlink-ton/cciplib/ccip/bindings/common"
"github.com/smartcontractkit/chainlink-ton/cciplib/ccip/bindings/ocr"
"github.com/smartcontractkit/chainlink-ton/cciplib/ton/tvm"
)

func randomTONExecuteReport(t *testing.T, sourceChainSelector uint64) ccipocr3.ExecutePluginReport {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ import (

"github.com/smartcontractkit/chainlink-common/pkg/types/ccipocr3"

"github.com/smartcontractkit/chainlink-ton/pkg/ccip/bindings/common"
"github.com/smartcontractkit/chainlink-ton/pkg/ccip/bindings/onramp"
"github.com/smartcontractkit/chainlink-ton/cciplib/ccip/bindings/common"
"github.com/smartcontractkit/chainlink-ton/cciplib/ccip/bindings/onramp"
)

const (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ import (
"github.com/stretchr/testify/require"
"github.com/xssnick/tonutils-go/tlb"

"github.com/smartcontractkit/chainlink-ton/pkg/ccip/bindings/common"
"github.com/smartcontractkit/chainlink-ton/pkg/ccip/bindings/onramp"
"github.com/smartcontractkit/chainlink-ton/cciplib/ccip/bindings/common"
"github.com/smartcontractkit/chainlink-ton/cciplib/ccip/bindings/onramp"
)

func Test_decodeExtraArgs(t *testing.T) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ import (
"github.com/xssnick/tonutils-go/tlb"
"github.com/xssnick/tonutils-go/tvm/cell"

"github.com/smartcontractkit/chainlink-ton/pkg/ccip/bindings/common"
"github.com/smartcontractkit/chainlink-ton/pkg/ccip/bindings/ocr"
"github.com/smartcontractkit/chainlink-ton/cciplib/ccip/bindings/common"
"github.com/smartcontractkit/chainlink-ton/cciplib/ccip/bindings/ocr"
)

// 0x0000000000000000000000000000000000000000000000000000000000000000
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import (
"github.com/smartcontractkit/chainlink-common/pkg/logger"
"github.com/smartcontractkit/chainlink-common/pkg/types/ccipocr3"

mocks "github.com/smartcontractkit/chainlink-ton/mocks/ccipocr3"
mocks "github.com/smartcontractkit/chainlink-ton/cciplib/mocks/ccipocr3"
)

// Extract a single message from the executecodec_test.go helper
Expand Down
File renamed without changes.
66 changes: 66 additions & 0 deletions cciplib/go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
module github.com/smartcontractkit/chainlink-ton/cciplib

go 1.26.2

require (
github.com/block-vision/sui-go-sdk v1.2.1
github.com/ethereum/go-ethereum v1.17.2
github.com/gagliardetto/solana-go v1.13.0
github.com/samber/lo v1.52.0
github.com/smartcontractkit/chain-selectors v1.0.98
github.com/smartcontractkit/chainlink-common v0.11.2-0.20260407150650-8115835abd6e
github.com/stretchr/testify v1.11.1
github.com/xssnick/tonutils-go v1.14.1
golang.org/x/sync v0.20.0
)

require (
filippo.io/edwards25519 v1.1.0 // indirect
github.com/blendle/zapdriver v1.3.1 // indirect
github.com/btcsuite/btcutil v1.0.2 // indirect
github.com/cespare/xxhash/v2 v2.3.0 // indirect
github.com/cosmos/go-bip39 v1.0.0 // indirect
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
github.com/fatih/color v1.18.0 // indirect
github.com/gabriel-vasile/mimetype v1.4.8 // indirect
github.com/gagliardetto/binary v0.8.0 // indirect
github.com/gagliardetto/treeout v0.1.4 // indirect
github.com/go-playground/locales v0.14.1 // indirect
github.com/go-playground/universal-translator v0.18.1 // indirect
github.com/go-playground/validator/v10 v10.26.0 // indirect
github.com/gorilla/websocket v1.5.0 // indirect
github.com/holiman/uint256 v1.3.2 // indirect
github.com/jinzhu/copier v0.4.0 // indirect
github.com/json-iterator/go v1.1.12 // indirect
github.com/klauspost/compress v1.18.0 // indirect
github.com/leodido/go-urn v1.4.0 // indirect
github.com/logrusorgru/aurora v2.0.3+incompatible // indirect
github.com/mattn/go-colorable v0.1.14 // indirect
github.com/mattn/go-isatty v0.0.20 // indirect
github.com/mitchellh/go-testing-interface v1.14.1 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.2 // indirect
github.com/mostynb/zstdpool-freelist v0.0.0-20201229113212-927304c0c3b1 // indirect
github.com/mr-tron/base58 v1.2.0 // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
github.com/sigurn/crc16 v0.0.0-20211026045750-20ab5afb07e3 // indirect
github.com/smartcontractkit/libocr v0.0.0-20250912173940-f3ab0246e23d // indirect
github.com/streamingfast/logging v0.0.0-20230608130331-f22c91403091 // indirect
github.com/stretchr/objx v0.5.2 // indirect
github.com/tidwall/gjson v1.14.4 // indirect
github.com/tidwall/match v1.1.1 // indirect
github.com/tidwall/pretty v1.2.0 // indirect
go.mongodb.org/mongo-driver v1.12.2 // indirect
go.opentelemetry.io/otel v1.40.0 // indirect
go.opentelemetry.io/otel/trace v1.40.0 // indirect
go.uber.org/multierr v1.11.0 // indirect
go.uber.org/zap v1.27.1 // indirect
golang.org/x/crypto v0.47.0 // indirect
golang.org/x/net v0.49.0 // indirect
golang.org/x/sys v0.40.0 // indirect
golang.org/x/term v0.39.0 // indirect
golang.org/x/text v0.33.0 // indirect
golang.org/x/time v0.14.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)
Loading
Loading