Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
6c9cc5e
NONEVM-5192: convert source chain decimal for receiver
FelixFan1992 May 27, 2026
1cd84f0
fix deployment with an init decimal op
FelixFan1992 May 27, 2026
bf61fa8
address feedback
FelixFan1992 May 28, 2026
7961ae4
more feedback
FelixFan1992 May 28, 2026
4ffcf1f
fix test
FelixFan1992 May 28, 2026
d8d853f
Merge branch 'develop' into ccip-source-chain-decimal-on-dest
FelixFan1992 May 29, 2026
d1ceb4e
Merge branch 'develop' into ccip-source-chain-decimal-on-dest
FelixFan1992 Jun 1, 2026
db583fa
Merge branch 'develop' into ccip-source-chain-decimal-on-dest
FelixFan1992 Jun 1, 2026
62a8461
Merge branch 'develop' into ccip-source-chain-decimal-on-dest
faisal-chainlink Jun 3, 2026
ced5084
regenerate bindings
faisal-chainlink Jun 3, 2026
85b4085
initial draft (w/ replace clauses)
faisal-chainlink Jun 4, 2026
4b36a1a
Merge branch 'develop' into chore/e2e-tests
faisal-chainlink Jun 4, 2026
d06637e
update integration tests dir
faisal-chainlink Jun 5, 2026
12feb2d
add events to grpc response mapping
faisal-chainlink Jun 5, 2026
e873c18
misc updates to client and packages
faisal-chainlink Jun 5, 2026
6cb98c0
remove unnecessary debug logs and update node test helper
faisal-chainlink Jun 5, 2026
bda5401
fix onramp ccip tests
faisal-chainlink Jun 5, 2026
ba253f5
remove replace clause for MCMS dep in favor of commit hash
faisal-chainlink Jun 5, 2026
69e8158
re-enable MCMS tests in ./integration-tests in CI
faisal-chainlink Jun 5, 2026
378b7ae
Merge branch 'develop' into chore/e2e-tests
faisal-chainlink Jun 5, 2026
b967a74
remove replace clause for CLDF dep in favor of commit hash
faisal-chainlink Jun 5, 2026
da5187b
update go mods in ./deployment
faisal-chainlink Jun 5, 2026
d4b47ce
tidy
faisal-chainlink Jun 5, 2026
919522f
re-enable ops tests
faisal-chainlink Jun 5, 2026
ffadcf4
deps graph
faisal-chainlink Jun 5, 2026
541f796
fix op test mock stub
faisal-chainlink Jun 5, 2026
70c6555
Update bindings/bind/publish.go
faisal-chainlink Jun 5, 2026
fa6d41e
re-enable
FelixFan1992 Jun 5, 2026
981def9
merge
faisal-chainlink Jun 5, 2026
78cf810
simplify local node helper
faisal-chainlink Jun 5, 2026
218c89f
go mod tidy in ./integration-tests
faisal-chainlink Jun 5, 2026
eb9893a
lint
faisal-chainlink Jun 5, 2026
5d720f9
NONEVM-5191: implement receiver abi check (#393)
FelixFan1992 Jun 8, 2026
4ae3cdb
Merge branch 'develop' into chore/e2e-tests
faisal-chainlink Jun 8, 2026
bbf0ba8
NONEVM-5015: make broken receiver not blocking relayer and add more t…
FelixFan1992 Jun 8, 2026
ab5479e
fix
FelixFan1992 Jun 8, 2026
d55d366
nonevm-5255: check for errors before memory allocation (#405)
FelixFan1992 Jun 9, 2026
ee3b47c
use address deserializing for MCMS reports to handle move structs
faisal-chainlink Jun 9, 2026
bd02f53
use address deserializing for MCMS reports as fallback
faisal-chainlink Jun 9, 2026
b771e89
update bindings deserializer for MCMS
faisal-chainlink Jun 9, 2026
5206703
NONEVM-5258: billing for Sui => Sui (#403)
FelixFan1992 Jun 9, 2026
ccd2899
nonevm-5017: update dummy receiver and add a new receiver integration…
FelixFan1992 Jun 10, 2026
fd180da
regen binding
FelixFan1992 Jun 10, 2026
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: 0 additions & 2 deletions .github/workflows/pull-request-develop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,6 @@ jobs:
nix develop --command go test -v ./bindings/... -tags="integration"

- name: Run Operations Tests
if: false # disabled until MCMS package is updated for the new Sui gRPC client
env:
TEST_DB_URL: postgres://localhost:5432/chainlink_test?sslmode=disable&user=postgres&password=postgres
run: |
Expand Down Expand Up @@ -142,7 +141,6 @@ jobs:
nix develop --command sui genesis --force --with-faucet

- name: Run System Integration Tests
if: false # disabled until MCMS package is updated for the new Sui gRPC client
env:
TEST_DB_URL: postgres://localhost:5432/chainlink_test?sslmode=disable&user=postgres&password=postgres
run: |
Expand Down
33 changes: 21 additions & 12 deletions bindings/bind/bcs_deserialize.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"bytes"
"errors"
"fmt"
"io"
"math/big"
"reflect"
"strings"
Expand All @@ -28,7 +29,7 @@ func DeserializeBCS(data []byte, moveTypes []string) ([]any, error) {
deserializer := mystenbcs.NewDecoder(reader)
ret := make([]any, 0, len(moveTypes))
for _, moveType := range moveTypes {
decoded, _, err := bcsDeserializeType(deserializer, moveType)
decoded, _, err := bcsDeserializeType(reader, deserializer, moveType)
if err != nil {
return ret, err
}
Expand All @@ -41,11 +42,7 @@ func DeserializeBCS(data []byte, moveTypes []string) ([]any, error) {
return ret, nil
}

func bcsDeserializeType(deserializer *mystenbcs.Decoder, moveType string) (any, reflect.Type, error) {
if _, ok := bcsStructDecoders[moveType]; ok {
return nil, nil, fmt.Errorf("struct decoder path not supported in DeserializeBCS for type %s", moveType)
}

func bcsDeserializeType(reader io.Reader, deserializer *mystenbcs.Decoder, moveType string) (any, reflect.Type, error) {
switch {
case moveType == "bool":
var res bool
Expand All @@ -72,15 +69,16 @@ func bcsDeserializeType(deserializer *mystenbcs.Decoder, moveType string) (any,
typ, err := bcsDecode(deserializer, &res)
return res, typ, err
case strings.HasPrefix(moveType, "vector<") && strings.HasSuffix(moveType, ">"):
return bcsDeserializeSlice(deserializer, moveType)
return bcsDeserializeSlice(reader, deserializer, moveType)
case moveType == "address":
return bcsDeserializeAddress(deserializer)
case moveType == "u128":
return bcsDeserializeBigInt(deserializer, moveType, 16)
case moveType == "u256":
return bcsDeserializeBigInt(deserializer, moveType, 32)
default:
return nil, nil, fmt.Errorf("unsupported type for BCS deserialization: %s", moveType)
// custom move structs are decoded by their IDs
return bcsDeserializeAddress(deserializer)
}
}

Expand All @@ -91,17 +89,28 @@ func bcsDecode(deserializer *mystenbcs.Decoder, target any) (reflect.Type, error
return reflect.TypeOf(target).Elem(), nil
}

func bcsDeserializeSlice(deserializer *mystenbcs.Decoder, moveType string) (any, reflect.Type, error) {
func bcsDeserializeSlice(reader io.Reader, deserializer *mystenbcs.Decoder, moveType string) (any, reflect.Type, error) {
innerType := moveType[len("vector<") : len(moveType)-1]
var length uint64
if _, err := deserializer.Decode(&length); err != nil {

// vector<u8> uses ULEB128 length + raw bytes; mystenbcs handles this natively.
if innerType == "u8" {
var res []byte
typ, err := bcsDecode(deserializer, &res)
return res, typ, err
}

length, _, err := mystenbcs.ULEB128Decode[uint64](reader)
if err != nil {
return nil, nil, fmt.Errorf("failed to decode vector length: %w", err)
}
if length > uint64(^uint(0)>>1) {
return nil, nil, fmt.Errorf("vector length %d out of range", length)
}

elements := make([]any, length)
var elemType reflect.Type
for i := uint64(0); i < length; i++ {
dec, refT, err := bcsDeserializeType(deserializer, innerType)
dec, refT, err := bcsDeserializeType(reader, deserializer, innerType)
if err != nil {
return nil, nil, err
}
Expand Down
3 changes: 2 additions & 1 deletion bindings/bind/compile.go
Original file line number Diff line number Diff line change
Expand Up @@ -299,6 +299,7 @@ func compilePackageInternal(packageName contracts.Package, namedAddresses map[st
filepath.Join(dstRoot, "ccip", "ccip_offramp"),
filepath.Join(dstRoot, "ccip", "ccip_burn_mint_token"),
filepath.Join(dstRoot, "ccip", "ccip_dummy_receiver"),
filepath.Join(dstRoot, "ccip", "ccip_broken_receiver"),
filepath.Join(dstRoot, "ccip", "managed_token"),
filepath.Join(dstRoot, "ccip", "managed_token_faucet"),
filepath.Join(dstRoot, "ccip", "mock_eth_token"),
Expand Down Expand Up @@ -479,7 +480,7 @@ func compilePackageInternal(packageName contracts.Package, namedAddresses map[st
}
}

if packageName == contracts.CCIPDummyReceiver {
if packageName == contracts.CCIPDummyReceiver || packageName == contracts.CCIPBrokenReceiver {
mcmsAddr := namedAddresses["mcms"]
if !isZeroAddress(mcmsAddr) {
mcmsDir := filepath.Join(dstRoot, "mcms", "mcms")
Expand Down
18 changes: 18 additions & 0 deletions bindings/bind/grpc_response.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,18 @@ func mapExecuteResponseToModels(resp *suirpcv2.ExecuteTransactionResponse) (*mod
result.ObjectChanges = mapChangedObjectsToModels(tx.Effects.GetChangedObjects())
}

if tx.GetEvents() != nil {
events := tx.GetEvents().GetEvents()
for _, event := range events {
result.Events = append(result.Events, models.SuiEventResponse{
PackageId: event.GetPackageId(),
TransactionModule: event.GetModule(),
Type: event.GetEventType(),
ParsedJson: event.GetJson().AsInterface().(map[string]any),
})
}
}
Comment thread
faisal-chainlink marked this conversation as resolved.

return result, nil
}

Expand Down Expand Up @@ -181,6 +193,12 @@ func transactionChangedObjectsReadMaskPaths() []string {
"effects.changed_objects.output_version",
"effects.changed_objects.output_digest",
"effects.changed_objects.input_version",
"events",
"events.events",
"events.events.package_id",
"events.events.module",
"events.events.event_type",
"events.events.json",
}
}

Expand Down
2 changes: 1 addition & 1 deletion bindings/bind/publish.go
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ func FindObjectIdFromPublishTx(tx models.SuiTransactionBlockResponse, module, ob

// FindCoinObjectIdFromTx finds a coin object ID from a transaction response by looking for created objects of type Coin<T>
func FindCoinObjectIdFromTx(tx models.SuiTransactionBlockResponse, coinType string) (string, error) {
expectedType := fmt.Sprintf("0x2::coin::Coin<%s>", coinType)
expectedType := fmt.Sprintf("0x0000000000000000000000000000000000000000000000000000000000000002::coin::Coin<%s>", coinType)

for _, change := range tx.ObjectChanges {
if change.Type == "created" && change.ObjectType == expectedType {
Comment thread
faisal-chainlink marked this conversation as resolved.
Expand Down
4 changes: 2 additions & 2 deletions bindings/bind/type_converter.go
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ func convertPureValueToCallArg(typeName string, value any) (*transaction.CallArg
case "vector<u8>":
valueToEncode, err = convertToByteArray(value)

case "0x1::string::String":
case "0x1::string::String", "ascii::String":
str, ok := value.(string)
if !ok {
return nil, fmt.Errorf("expected string, got %T", value)
Expand Down Expand Up @@ -554,7 +554,7 @@ func convertVectorToBCS(innerType string, value any) (any, error) {

return result, nil

case "0x1::string::String":
case "0x1::string::String", "ascii::String":
result := make([]string, rv.Len())
for i := range rv.Len() {
elem := rv.Index(i).Interface()
Expand Down

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

6 changes: 3 additions & 3 deletions bindings/tests/testenv/testenv.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ var (
refMu sync.Mutex
)

func SetupEnvironment(t *testing.T) (utils.SuiSigner, client.BindingsClient) {
func SetupEnvironment(t *testing.T) (utils.SuiSigner, client.SuiPTBClient) {
t.Helper()

log := logger.Test(t)
Expand Down Expand Up @@ -147,7 +147,7 @@ func Cleanup() {

// CreateTestAccount creates a new test account with funding from the faucet.
// This requires the test environment to be set up first (via Setup() or SetupEnvironment()).
func CreateTestAccount(t *testing.T) (utils.SuiSigner, client.BindingsClient) {
func CreateTestAccount(t *testing.T) (utils.SuiSigner, client.SuiPTBClient) {
t.Helper()

refMu.Lock()
Expand Down Expand Up @@ -256,7 +256,7 @@ func (te *TestEnvironment) cleanup() {
te.cleanupLocked()
}

func createPTBClient(log logger.Logger) (client.BindingsClient, error) {
func createPTBClient(log logger.Logger) (client.SuiPTBClient, error) {
ptbClient, err := client.NewPTBClient(log, client.PTBClientConfig{
GrpcTarget: fmt.Sprintf("%s:%d", loopbackHost, instance.rpcPort),
GrpcToken: "test",
Expand Down
Loading
Loading