Skip to content
Merged
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
2 changes: 1 addition & 1 deletion cmd/chainlink-ton-extras/lock.nix
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Notice: `pkgs.lib.fakeHash` can be used as a placeholder,
# but `lock-nix-tidy` will only replace actual hashes.
{pkgs}: {
chainlink-ton-extras = "sha256-YKlMMOliCW7rm03Jdn5Trv2hZBdsNJI8LrXQPFhU28M=";
chainlink-ton-extras = "sha256-+wSZSY1L0HM2CKfqdEYb9SN1/uRQZQcO0Naeg1lHy8g=";
}
2 changes: 1 addition & 1 deletion cmd/chainlink-ton/lock.nix
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Notice: `pkgs.lib.fakeHash` can be used as a placeholder,
# but `lock-nix-tidy` will only replace actual hashes.
{pkgs}: {
chainlink-ton = "sha256-YKlMMOliCW7rm03Jdn5Trv2hZBdsNJI8LrXQPFhU28M=";
chainlink-ton = "sha256-+wSZSY1L0HM2CKfqdEYb9SN1/uRQZQcO0Naeg1lHy8g=";
}
2 changes: 1 addition & 1 deletion contracts/contracts/ccip/router/contract.tolk
Original file line number Diff line number Diff line change
Expand Up @@ -584,7 +584,7 @@ fun version(): slice { return CONTRACT_VERSION; }
get fun verifyNotCursed(subject: uint128): bool {
val st = lazy Storage.load();
var rmn = st.rmnRemote.load();
return rmn.cursedSubjects.isCursed(subject);
return !rmn.cursedSubjects.isCursed(subject);
}

/// Gets the current owner of the contract.
Expand Down
4 changes: 2 additions & 2 deletions contracts/tests/ccip/router/Router.cursing.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ describe('Router', () => {
subject: CHAINSEL_EVM_TEST_90000001,
})

await verifyNotCursed(router, deployer, true)
await verifyNotCursed(router, deployer, false)
}

// Fail router.ccipSend
Expand Down Expand Up @@ -112,7 +112,7 @@ describe('Router', () => {
subject: CHAINSEL_EVM_TEST_90000001,
})

await verifyNotCursed(router, deployer, false)
await verifyNotCursed(router, deployer, true)
}

// Succeed router.ccipSend
Expand Down
22 changes: 19 additions & 3 deletions deployment/ccip/1_6_0/sequences/adapter.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import (
tonstate "github.com/smartcontractkit/chainlink-ton/deployment/state"

"github.com/smartcontractkit/chainlink-ccip/deployment/deploy"
"github.com/smartcontractkit/chainlink-ccip/deployment/fastcurse"
"github.com/smartcontractkit/chainlink-ccip/deployment/lanes"

"github.com/smartcontractkit/chainlink-ton/pkg/ccip/codec"
Expand All @@ -21,11 +22,26 @@ func init() {
if err != nil {
panic(err)
}
lanes.GetLaneAdapterRegistry().RegisterLaneAdapter(chainsel.FamilyTon, v, &TonAdapter{})
deploy.GetRegistry().RegisterDeployer(chainsel.FamilyTon, v, &TonAdapter{})

adapter := &TonAdapter{}

// Register adapter
deploy.GetRegistry().RegisterDeployer(chainsel.FamilyTon, v, adapter)
lanes.GetLaneAdapterRegistry().RegisterLaneAdapter(chainsel.FamilyTon, v, adapter)
fastcurse.GetCurseRegistry().RegisterNewCurse(
fastcurse.CurseRegistryInput{
CursingFamily: chainsel.FamilyTon,
CursingVersion: v,
CurseAdapter: adapter,
CurseSubjectAdapter: adapter,
},
)
}

type TonAdapter struct{}
type TonAdapter struct {
routerAddressCache map[uint64]address.Address // fast cursing cache
onRampAddressCache map[uint64]address.Address
}

func (a *TonAdapter) GetOnRampAddress(ds datastore.DataStore, chainSelector uint64) ([]byte, error) {
tonChain, err := tonstate.LoadCCIPOnChainStateUsingDataStore(ds, chainSelector)
Expand Down
Loading
Loading