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
1,655 changes: 1,407 additions & 248 deletions chain/ton/mocks/api_client_wrapped.go

Large diffs are not rendered by default.

5 changes: 3 additions & 2 deletions chain/ton/provider/ctf_provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,10 @@ import (
"github.com/xssnick/tonutils-go/ton/wallet"

chainsel "github.com/smartcontractkit/chain-selectors"
"github.com/smartcontractkit/freeport"

"github.com/smartcontractkit/chainlink-testing-framework/framework"
"github.com/smartcontractkit/chainlink-testing-framework/framework/components/blockchain"
"github.com/smartcontractkit/freeport"

"github.com/smartcontractkit/chainlink-deployments-framework/chain"
cldf_ton "github.com/smartcontractkit/chainlink-deployments-framework/chain/ton"
Expand Down Expand Up @@ -217,7 +218,7 @@ func createTonWallet(client ton.APIClientWrapped, versionConfig wallet.VersionCo
if err != nil {
return nil, fmt.Errorf("failed to create wallet from seed: %w", err)
}
pw, perr := wallet.FromPrivateKeyWithOptions(client, rw.PrivateKey(), versionConfig, option)
pw, perr := wallet.FromPrivateKeyWithOptions(rw.PrivateKey(), versionConfig, wallet.WithAPI(client), option)
if perr != nil {
return nil, fmt.Errorf("failed to create wallet from private key: %w", perr)
}
Expand Down
2 changes: 1 addition & 1 deletion chain/ton/provider/rpc_provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ func createWallet(
return nil, nil, fmt.Errorf("unsupported wallet version: %w", err)
}

tonWallet, err := wallet.FromPrivateKeyWithOptions(api, privateKey, walletConfig, wallet.WithWorkchain(0))
tonWallet, err := wallet.FromPrivateKeyWithOptions(privateKey, walletConfig, wallet.WithAPI(api), wallet.WithWorkchain(0))
if err != nil {
return nil, nil, fmt.Errorf("failed to init TON wallet: %w", err)
}
Expand Down
2 changes: 1 addition & 1 deletion chain/ton/ton_chain.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ func (c Chain) ReadOnly() (common.BlockChain, error) {
return nil, fmt.Errorf("failed to generate private key for read-only chain %v: %w", c, err)
}

c.Wallet, err = wallet.FromPrivateKeyWithOptions(c.Client, privateKey, c.WalletVersionConfig)
c.Wallet, err = wallet.FromPrivateKeyWithOptions(privateKey, c.WalletVersionConfig, wallet.WithAPI(c.Client))
if err != nil {
return nil, fmt.Errorf("failed to generate wallet for read-only chain %v: %w", c, err)
}
Expand Down
4 changes: 2 additions & 2 deletions chain/ton/ton_chain_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,8 @@ func funder(t *testing.T, tonChain ton.Chain) *wallet.Wallet {
t.Helper()
funderWallet, err := wallet.FromSeed(tonChain.Client, strings.Fields(faucetMnemonic), wallet.HighloadV2Verified) //nolint:staticcheck
require.NoError(t, err)
funderWallet, err = wallet.FromPrivateKeyWithOptions(tonChain.Client, funderWallet.PrivateKey(),
wallet.HighloadV2Verified, wallet.WithWorkchain(int8(address.MasterchainID))) //nolint:staticcheck
funderWallet, err = wallet.FromPrivateKeyWithOptions(funderWallet.PrivateKey(),
wallet.HighloadV2Verified, wallet.WithAPI(tonChain.Client), wallet.WithWorkchain(int8(address.MasterchainID))) //nolint:staticcheck
require.NoError(t, err)
funder, err := funderWallet.GetSubwallet(uint32(42))
require.NoError(t, err)
Expand Down
8 changes: 4 additions & 4 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ require (
github.com/stretchr/testify v1.11.1
github.com/testcontainers/testcontainers-go v0.43.0
github.com/testcontainers/testcontainers-go/modules/postgres v0.43.0
github.com/xssnick/tonutils-go v1.14.1
github.com/xssnick/tonutils-go v1.18.0
github.com/zksync-sdk/zksync2-go v1.1.1-0.20250620124214-2c742ee399c6
go.uber.org/zap v1.28.0
golang.org/x/crypto v0.53.0
Expand Down Expand Up @@ -104,6 +104,7 @@ require (
github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f // indirect
github.com/onsi/ginkgo/v2 v2.22.1 // indirect
github.com/onsi/gomega v1.36.2 // indirect
github.com/pierrec/lz4/v4 v4.1.27 // indirect
github.com/smartcontractkit/chainlink-common/pkg/chipingress v0.0.10 // indirect
github.com/smartcontractkit/chainlink-protos/cre/go v0.0.0-20260505131349-78e491b80735 // indirect
github.com/smartcontractkit/chainlink-protos/linking-service/go v0.0.0-20251002192024-d2ad9222409b // indirect
Expand All @@ -129,7 +130,7 @@ require (

require (
dario.cat/mergo v1.0.2 // indirect
filippo.io/edwards25519 v1.1.1 // indirect
filippo.io/edwards25519 v1.2.0 // indirect
github.com/Azure/go-ansiterm v0.0.0-20250102033503-faa5f7b0171c // indirect
github.com/BurntSushi/toml v1.6.0 // indirect
github.com/DataDog/zstd v1.5.6 // indirect
Expand Down Expand Up @@ -282,7 +283,6 @@ require (
github.com/shirou/gopsutil v3.21.11+incompatible // indirect
github.com/shirou/gopsutil/v4 v4.26.5 // indirect
github.com/shopspring/decimal v1.4.0 // indirect
github.com/sigurn/crc16 v0.0.0-20211026045750-20ab5afb07e3 // indirect
github.com/sirupsen/logrus v1.9.4 // indirect
github.com/smartcontractkit/chainlink-sui v0.0.0-20260630144638-b69f16bdddd8
github.com/smartcontractkit/grpc-proxy v0.0.0-20240830132753-a7e17fec5ab7 // indirect
Expand Down Expand Up @@ -332,7 +332,7 @@ require (
go.opentelemetry.io/proto/otlp v1.10.0 // indirect
go.uber.org/multierr v1.11.0 // indirect
go.uber.org/ratelimit v0.3.1 // indirect
golang.org/x/net v0.55.0 // indirect
golang.org/x/net v0.56.0 // indirect
golang.org/x/sync v0.21.0 // indirect
golang.org/x/sys v0.46.0 // indirect
golang.org/x/term v0.44.0 // indirect
Expand Down
18 changes: 8 additions & 10 deletions go.sum

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading