diff --git a/.changeset/sad-bottles-tell.md b/.changeset/sad-bottles-tell.md new file mode 100644 index 000000000..bebab9004 --- /dev/null +++ b/.changeset/sad-bottles-tell.md @@ -0,0 +1,5 @@ +--- +"@smartcontractkit/mcms": patch +--- + +Add TON option to buildTimelockConverters diff --git a/.changeset/salty-grapes-take.md b/.changeset/salty-grapes-take.md new file mode 100644 index 000000000..7869346ea --- /dev/null +++ b/.changeset/salty-grapes-take.md @@ -0,0 +1,5 @@ +--- +"@smartcontractkit/mcms": patch +--- + +Bump ghcr.io/neodix42/mylocalton-docker:v4.0.0 - speedup diff --git a/chainwrappers/chainaccessor.go b/chainwrappers/chainaccessor.go index d0f32d220..aa31c9b41 100644 --- a/chainwrappers/chainaccessor.go +++ b/chainwrappers/chainaccessor.go @@ -16,5 +16,5 @@ type ChainAccessor interface { SolanaClient(selector uint64) (*solrpc.Client, bool) AptosClient(selector uint64) (aptoslib.AptosRpcClient, bool) SuiClient(selector uint64) (sui.ISuiAPI, suisuisdk.SuiSigner, bool) - TonClient(selector uint64) (*ton.APIClient, bool) + TonClient(selector uint64) (ton.APIClientWrapped, bool) } diff --git a/chainwrappers/mocks/chain_accessor.go b/chainwrappers/mocks/chain_accessor.go index d3a1c946a..4648be013 100644 --- a/chainwrappers/mocks/chain_accessor.go +++ b/chainwrappers/mocks/chain_accessor.go @@ -320,23 +320,23 @@ func (_c *ChainAccessor_SuiClient_Call) RunAndReturn(run func(uint64) (sui.ISuiA } // TonClient provides a mock function with given fields: selector -func (_m *ChainAccessor) TonClient(selector uint64) (*ton.APIClient, bool) { +func (_m *ChainAccessor) TonClient(selector uint64) (ton.APIClientWrapped, bool) { ret := _m.Called(selector) if len(ret) == 0 { panic("no return value specified for TonClient") } - var r0 *ton.APIClient + var r0 ton.APIClientWrapped var r1 bool - if rf, ok := ret.Get(0).(func(uint64) (*ton.APIClient, bool)); ok { + if rf, ok := ret.Get(0).(func(uint64) (ton.APIClientWrapped, bool)); ok { return rf(selector) } - if rf, ok := ret.Get(0).(func(uint64) *ton.APIClient); ok { + if rf, ok := ret.Get(0).(func(uint64) ton.APIClientWrapped); ok { r0 = rf(selector) } else { if ret.Get(0) != nil { - r0 = ret.Get(0).(*ton.APIClient) + r0 = ret.Get(0).(ton.APIClientWrapped) } } @@ -367,12 +367,12 @@ func (_c *ChainAccessor_TonClient_Call) Run(run func(selector uint64)) *ChainAcc return _c } -func (_c *ChainAccessor_TonClient_Call) Return(_a0 *ton.APIClient, _a1 bool) *ChainAccessor_TonClient_Call { +func (_c *ChainAccessor_TonClient_Call) Return(_a0 ton.APIClientWrapped, _a1 bool) *ChainAccessor_TonClient_Call { _c.Call.Return(_a0, _a1) return _c } -func (_c *ChainAccessor_TonClient_Call) RunAndReturn(run func(uint64) (*ton.APIClient, bool)) *ChainAccessor_TonClient_Call { +func (_c *ChainAccessor_TonClient_Call) RunAndReturn(run func(uint64) (ton.APIClientWrapped, bool)) *ChainAccessor_TonClient_Call { _c.Call.Return(run) return _c } diff --git a/e2e/config.ton.toml b/e2e/config.ton.toml index a613a55d0..29dcba444 100644 --- a/e2e/config.ton.toml +++ b/e2e/config.ton.toml @@ -8,7 +8,7 @@ private_keys = [ [ton_config] chain_id = "-217" type = "ton" -image = "ghcr.io/neodix42/mylocalton-docker:v3.99" +image = "ghcr.io/neodix42/mylocalton-docker:v4.0.0" [ton_config.out] family = "ton" diff --git a/timelock_proposal.go b/timelock_proposal.go index 7c7c173e5..68d8171f1 100644 --- a/timelock_proposal.go +++ b/timelock_proposal.go @@ -22,6 +22,7 @@ import ( "github.com/smartcontractkit/mcms/sdk/evm" "github.com/smartcontractkit/mcms/sdk/solana" "github.com/smartcontractkit/mcms/sdk/sui" + "github.com/smartcontractkit/mcms/sdk/ton" "github.com/smartcontractkit/mcms/types" ) @@ -300,6 +301,8 @@ func (m *TimelockProposal) buildTimelockConverters(_ context.Context) (map[types if err != nil { return nil, fmt.Errorf("failed to create Sui timelock converter: %w", err) } + case chainsel.FamilyTon: + converter = ton.NewTimelockConverter(ton.DefaultSendAmount) default: return nil, fmt.Errorf("unsupported chain family %s", fam) }