diff --git a/go.mod b/go.mod index d48862848..06402b2bd 100644 --- a/go.mod +++ b/go.mod @@ -17,7 +17,7 @@ require ( github.com/jpillora/backoff v1.0.0 github.com/pelletier/go-toml/v2 v2.2.0 github.com/prometheus/client_golang v1.17.0 - github.com/smartcontractkit/chainlink-common v0.2.3-0.20240925150249-664dd5a59715 + github.com/smartcontractkit/chainlink-common v0.2.3-0.20240926180110-0784a13b2536 github.com/smartcontractkit/libocr v0.0.0-20240702141926-063ceef8c42e github.com/stretchr/testify v1.9.0 go.uber.org/zap v1.27.0 diff --git a/go.sum b/go.sum index 9e65dcc5c..9e8bacb8e 100644 --- a/go.sum +++ b/go.sum @@ -435,8 +435,8 @@ github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeV github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ= github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= -github.com/smartcontractkit/chainlink-common v0.2.3-0.20240925150249-664dd5a59715 h1:6s5a5g62qvUiHSyknLLw9h8Y0FfdVEsNHc5o/Q/T9w4= -github.com/smartcontractkit/chainlink-common v0.2.3-0.20240925150249-664dd5a59715/go.mod h1:F6WUS6N4mP5ScwpwyTyAJc9/vjR+GXbMCRUOVekQi1g= +github.com/smartcontractkit/chainlink-common v0.2.3-0.20240926180110-0784a13b2536 h1:k6DLMavlqxr7cnZN1DOZLwxeiZfCK2UHeCJ0tyXSuw4= +github.com/smartcontractkit/chainlink-common v0.2.3-0.20240926180110-0784a13b2536/go.mod h1:F6WUS6N4mP5ScwpwyTyAJc9/vjR+GXbMCRUOVekQi1g= github.com/smartcontractkit/grpc-proxy v0.0.0-20240830132753-a7e17fec5ab7 h1:12ijqMM9tvYVEm+nR826WsrNi6zCKpwBhuApq127wHs= github.com/smartcontractkit/grpc-proxy v0.0.0-20240830132753-a7e17fec5ab7/go.mod h1:FX7/bVdoep147QQhsOPkYsPEXhGZjeYx6lBSaSXtZOA= github.com/smartcontractkit/libocr v0.0.0-20240702141926-063ceef8c42e h1:9ypZ/8aW8Vm497i1gXHcT96oNLiu88jbg9QdX+IUE3E= diff --git a/integration-tests/go.mod b/integration-tests/go.mod index 269a61869..509753a3a 100644 --- a/integration-tests/go.mod +++ b/integration-tests/go.mod @@ -14,7 +14,7 @@ require ( github.com/lib/pq v1.10.9 github.com/pelletier/go-toml/v2 v2.2.2 github.com/rs/zerolog v1.33.0 - github.com/smartcontractkit/chainlink-common v0.2.3-0.20240925150249-664dd5a59715 + github.com/smartcontractkit/chainlink-common v0.2.3-0.20240926180110-0784a13b2536 github.com/smartcontractkit/chainlink-solana v1.1.1-0.20240911182932-3c609a6ac664 github.com/smartcontractkit/chainlink-testing-framework/lib v1.50.9 github.com/smartcontractkit/chainlink-testing-framework/seth v1.50.1 diff --git a/integration-tests/go.sum b/integration-tests/go.sum index 9b9442561..55f790540 100644 --- a/integration-tests/go.sum +++ b/integration-tests/go.sum @@ -1394,8 +1394,8 @@ github.com/smartcontractkit/chainlink-automation v1.0.4 h1:iyW181JjKHLNMnDleI8um github.com/smartcontractkit/chainlink-automation v1.0.4/go.mod h1:u4NbPZKJ5XiayfKHD/v3z3iflQWqvtdhj13jVZXj/cM= github.com/smartcontractkit/chainlink-ccip v0.0.0-20240924115754-8858b0423283 h1:f0vdqcOL9kJZwfmWE76roIyEuiZx/R82js0IfXNAvXg= github.com/smartcontractkit/chainlink-ccip v0.0.0-20240924115754-8858b0423283/go.mod h1:KP82vFCqm+M1G1t6Vos5CewGUGYJkxxCEdxnta4uLlE= -github.com/smartcontractkit/chainlink-common v0.2.3-0.20240925150249-664dd5a59715 h1:6s5a5g62qvUiHSyknLLw9h8Y0FfdVEsNHc5o/Q/T9w4= -github.com/smartcontractkit/chainlink-common v0.2.3-0.20240925150249-664dd5a59715/go.mod h1:F6WUS6N4mP5ScwpwyTyAJc9/vjR+GXbMCRUOVekQi1g= +github.com/smartcontractkit/chainlink-common v0.2.3-0.20240926180110-0784a13b2536 h1:k6DLMavlqxr7cnZN1DOZLwxeiZfCK2UHeCJ0tyXSuw4= +github.com/smartcontractkit/chainlink-common v0.2.3-0.20240926180110-0784a13b2536/go.mod h1:F6WUS6N4mP5ScwpwyTyAJc9/vjR+GXbMCRUOVekQi1g= github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20240911175228-daf2600bb7b7 h1:lTGIOQYLk1Ufn++X/AvZnt6VOcuhste5yp+C157No/Q= github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20240911175228-daf2600bb7b7/go.mod h1:BMYE1vC/pGmdFSsOJdPrAA0/4gZ0Xo0SxTMdGspBtRo= github.com/smartcontractkit/chainlink-data-streams v0.0.0-20240916152957-433914114bd2 h1:yRk4ektpx/UxwarqAfgxUXLrsYXlaNeP1NOwzHGrK2Q= diff --git a/pkg/solana/chainreader/chain_reader_test.go b/pkg/solana/chainreader/chain_reader_test.go index d85ddf77c..5bff4ccc3 100644 --- a/pkg/solana/chainreader/chain_reader_test.go +++ b/pkg/solana/chainreader/chain_reader_test.go @@ -857,7 +857,7 @@ func fullStructIDL(t *testing.T) string { return fmt.Sprintf( baseIDL, strings.Join([]string{testStructAIDL, testStructBIDL}, ","), - strings.Join([]string{midLevelStructIDL, innerStructIDL}, ","), + strings.Join([]string{midLevelDynamicStructIDL, midLevelStaticStructIDL, innerDynamicStructIDL, innerStaticStructIDL}, ","), ) } @@ -877,7 +877,8 @@ const ( {"name": "field","type": {"option": "i32"}}, {"name": "differentField","type": "string"}, {"name": "bigField","type": "i128"}, - {"name": "nestedStruct","type": {"defined": "MidLevelStruct"}} + {"name": "nestedDynamicStruct","type": {"defined": "MidLevelDynamicStruct"}}, + {"name": "nestedStaticStruct","type": {"defined": "MidLevelStaticStruct"}} ] } }` @@ -895,19 +896,30 @@ const ( } }` - midLevelStructIDL = `{ - "name": "MidLevelStruct", + midLevelDynamicStructIDL = `{ + "name": "MidLevelDynamicStruct", "type": { "kind": "struct", "fields": [ {"name": "fixedBytes", "type": {"array": ["u8",2]}}, - {"name": "inner", "type": {"defined": "InnerTestStruct"}} + {"name": "inner", "type": {"defined": "InnerDynamicTestStruct"}} ] } }` - innerStructIDL = `{ - "name": "InnerTestStruct", + midLevelStaticStructIDL = `{ + "name": "MidLevelStaticStruct", + "type": { + "kind": "struct", + "fields": [ + {"name": "fixedBytes", "type": {"array": ["u8",2]}}, + {"name": "inner", "type": {"defined": "InnerStaticTestStruct"}} + ] + } + }` + + innerDynamicStructIDL = `{ + "name": "InnerDynamicTestStruct", "type": { "kind": "struct", "fields": [ @@ -917,6 +929,17 @@ const ( } }` + innerStaticStructIDL = `{ + "name": "InnerStaticTestStruct", + "type": { + "kind": "struct", + "fields": [ + {"name": "i", "type": "i32"}, + {"name": "a", "type": "bytes"} + ] + } + }` + uint64BaseTypeIDL = `{ "name": "SimpleUint64Value", "type": {