Skip to content

Commit

Permalink
Merge branch 'develop' into rtinianov_wasmDelegate
Browse files Browse the repository at this point in the history
  • Loading branch information
nolag committed Sep 25, 2024
2 parents 08f3605 + 700dd7c commit c773da9
Show file tree
Hide file tree
Showing 20 changed files with 108 additions and 37 deletions.
2 changes: 2 additions & 0 deletions .changeset/famous-plums-kiss.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,5 @@
---

#updated move latest capabilities code from ccip repo to chainlink repo [CCIP-2946]

PR issue: CCIP-2946
2 changes: 1 addition & 1 deletion .changeset/lucky-zebras-reflect.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@

#internal Implement EVM ChainReader ValueComparator filtering by non-indexed event data. Right now only simple non indexed data where byte offsets don't exist is supported.

BCFR-203
PR issue: BCFR-203
5 changes: 5 additions & 0 deletions .changeset/silly-zebras-exercise.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"chainlink": patch
---

#internal add support for values.Value type in the contract reader GetLatestValue and QueryKey methods
2 changes: 1 addition & 1 deletion contracts/.changeset/few-parents-punch.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
update comments


SHIP-3557
PR issue: SHIP-3557
2 changes: 1 addition & 1 deletion contracts/.changeset/fluffy-papayas-chew.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
#internal Change Chain Reader testing contract Triggered event for easier testing of filtering by non indexed evm data.


BCFR-203
PR issue: BCFR-203
2 changes: 1 addition & 1 deletion contracts/.changeset/forty-radios-brush.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
Add Configurator contract


MERC-6185
PR issue: MERC-6185
2 changes: 1 addition & 1 deletion contracts/.changeset/heavy-balloons-cheat.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@
#added Add ZKSync L2EP Validator contract


SHIP-3004
PR issue: SHIP-3004
2 changes: 2 additions & 0 deletions contracts/.changeset/nasty-llamas-prove.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,5 @@
---

DEVSVCS-147: add a reentrancy guard for balance monitor

PR issue: DEVSVCS-147
4 changes: 3 additions & 1 deletion contracts/.changeset/quick-olives-accept.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,6 @@
'@chainlink/contracts': minor
---

#updated move latest ccip contracts code from ccip repo to chainlink repo [CCIP-2946]
#updated move latest ccip contracts code from ccip repo to chainlink repo

PR issue: CCIP-2946
2 changes: 1 addition & 1 deletion contracts/.changeset/quiet-moles-retire.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
Use reusable workflow for Solidity Artifacts pipeline, move some actions to chainlink-github-actions repository


TT-1693
PR issue: TT-1693
4 changes: 2 additions & 2 deletions core/scripts/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ require (
github.com/prometheus/client_golang v1.20.0
github.com/shopspring/decimal v1.4.0
github.com/smartcontractkit/chainlink-automation v1.0.4
github.com/smartcontractkit/chainlink-common v0.2.3-0.20240923163738-9f7db4ed0dfc
github.com/smartcontractkit/chainlink-common v0.2.3-0.20240925085218-aded1b263ecc
github.com/smartcontractkit/chainlink/v2 v2.0.0-00010101000000-000000000000
github.com/smartcontractkit/libocr v0.0.0-20240717100443-f6226e09bee7
github.com/spf13/cobra v1.8.1
Expand Down Expand Up @@ -273,7 +273,7 @@ require (
github.com/shirou/gopsutil v3.21.11+incompatible // indirect
github.com/shirou/gopsutil/v3 v3.24.3 // indirect
github.com/smartcontractkit/chain-selectors v1.0.23 // indirect
github.com/smartcontractkit/chainlink-ccip v0.0.0-20240924070918-21dc2dadfdad // indirect
github.com/smartcontractkit/chainlink-ccip v0.0.0-20240924115754-8858b0423283 // indirect
github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20240911175228-daf2600bb7b7 // indirect
github.com/smartcontractkit/chainlink-data-streams v0.0.0-20240916152957-433914114bd2 // indirect
github.com/smartcontractkit/chainlink-feeds v0.0.0-20240910155501-42f20443189f // indirect
Expand Down
8 changes: 4 additions & 4 deletions core/scripts/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -1085,10 +1085,10 @@ github.com/smartcontractkit/chain-selectors v1.0.23 h1:D2Eaex4Cw/O7Lg3tX6WklOqnj
github.com/smartcontractkit/chain-selectors v1.0.23/go.mod h1:d4Hi+E1zqjy9HqMkjBE5q1vcG9VGgxf5VxiRHfzi2kE=
github.com/smartcontractkit/chainlink-automation v1.0.4 h1:iyW181JjKHLNMnDleI8umfIfVVlwC7+n5izbLSFgjw8=
github.com/smartcontractkit/chainlink-automation v1.0.4/go.mod h1:u4NbPZKJ5XiayfKHD/v3z3iflQWqvtdhj13jVZXj/cM=
github.com/smartcontractkit/chainlink-ccip v0.0.0-20240924070918-21dc2dadfdad h1:oEqKi71gr6Ldj8UKJuQOL70CHtNaoyR6pOFEyNgi6Z4=
github.com/smartcontractkit/chainlink-ccip v0.0.0-20240924070918-21dc2dadfdad/go.mod h1:KP82vFCqm+M1G1t6Vos5CewGUGYJkxxCEdxnta4uLlE=
github.com/smartcontractkit/chainlink-common v0.2.3-0.20240923163738-9f7db4ed0dfc h1:6+X6I0JiLYkxUi0oNtLpAexDqQEqhAeeosxH/We1Zao=
github.com/smartcontractkit/chainlink-common v0.2.3-0.20240923163738-9f7db4ed0dfc/go.mod h1:F6WUS6N4mP5ScwpwyTyAJc9/vjR+GXbMCRUOVekQi1g=
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.20240925085218-aded1b263ecc h1:ALbyaoRzUSXQ2NhGFKVOyJqO22IB5yQjhjKWbIZGbrI=
github.com/smartcontractkit/chainlink-common v0.2.3-0.20240925085218-aded1b263ecc/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=
Expand Down
54 changes: 52 additions & 2 deletions core/services/relay/evm/chain_reader.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import (
commontypes "github.com/smartcontractkit/chainlink-common/pkg/types"
"github.com/smartcontractkit/chainlink-common/pkg/types/query"
"github.com/smartcontractkit/chainlink-common/pkg/types/query/primitives"
"github.com/smartcontractkit/chainlink-common/pkg/values"

evmclient "github.com/smartcontractkit/chainlink/v2/core/chains/evm/client"
"github.com/smartcontractkit/chainlink/v2/core/chains/evm/logpoller"
Expand Down Expand Up @@ -176,7 +177,28 @@ func (cr *chainReader) GetLatestValue(ctx context.Context, readName string, conf
return err
}

return binding.GetLatestValue(ctx, common.HexToAddress(address), confidenceLevel, params, returnVal)
ptrToValue, isValue := returnVal.(*values.Value)
if !isValue {
return binding.GetLatestValue(ctx, common.HexToAddress(address), confidenceLevel, params, returnVal)
}

contractType, err := cr.CreateContractType(readName, false)
if err != nil {
return err
}

if err = cr.GetLatestValue(ctx, readName, confidenceLevel, params, contractType); err != nil {
return err
}

value, err := values.Wrap(contractType)
if err != nil {
return err
}

*ptrToValue = value

return nil
}

func (cr *chainReader) BatchGetLatestValues(ctx context.Context, request commontypes.BatchGetLatestValuesRequest) (commontypes.BatchGetLatestValuesResult, error) {
Expand All @@ -195,7 +217,35 @@ func (cr *chainReader) QueryKey(
return nil, err
}

return binding.QueryKey(ctx, common.HexToAddress(address), filter, limitAndSort, sequenceDataType)
_, isValuePtr := sequenceDataType.(*values.Value)
if !isValuePtr {
return binding.QueryKey(ctx, common.HexToAddress(address), filter, limitAndSort, sequenceDataType)
}

dataTypeFromReadIdentifier, err := cr.CreateContractType(contract.ReadIdentifier(filter.Key), false)
if err != nil {
return nil, err
}

sequence, err := binding.QueryKey(ctx, common.HexToAddress(address), filter, limitAndSort, dataTypeFromReadIdentifier)
if err != nil {
return nil, err
}

sequenceOfValues := make([]commontypes.Sequence, len(sequence))
for idx, entry := range sequence {
value, err := values.Wrap(entry.Data)
if err != nil {
return nil, err
}
sequenceOfValues[idx] = commontypes.Sequence{
Cursor: entry.Cursor,
Head: entry.Head,
Data: &value,
}
}

return sequenceOfValues, nil
}

func (cr *chainReader) CreateContractType(readIdentifier string, forEncoding bool) (any, error) {
Expand Down
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,8 @@ require (
github.com/shopspring/decimal v1.4.0
github.com/smartcontractkit/chain-selectors v1.0.23
github.com/smartcontractkit/chainlink-automation v1.0.4
github.com/smartcontractkit/chainlink-ccip v0.0.0-20240924070918-21dc2dadfdad
github.com/smartcontractkit/chainlink-common v0.2.3-0.20240923163738-9f7db4ed0dfc
github.com/smartcontractkit/chainlink-ccip v0.0.0-20240924115754-8858b0423283
github.com/smartcontractkit/chainlink-common v0.2.3-0.20240925085218-aded1b263ecc
github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20240911175228-daf2600bb7b7
github.com/smartcontractkit/chainlink-data-streams v0.0.0-20240916152957-433914114bd2
github.com/smartcontractkit/chainlink-feeds v0.0.0-20240910155501-42f20443189f
Expand Down
8 changes: 4 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -1046,10 +1046,10 @@ github.com/smartcontractkit/chain-selectors v1.0.23 h1:D2Eaex4Cw/O7Lg3tX6WklOqnj
github.com/smartcontractkit/chain-selectors v1.0.23/go.mod h1:d4Hi+E1zqjy9HqMkjBE5q1vcG9VGgxf5VxiRHfzi2kE=
github.com/smartcontractkit/chainlink-automation v1.0.4 h1:iyW181JjKHLNMnDleI8umfIfVVlwC7+n5izbLSFgjw8=
github.com/smartcontractkit/chainlink-automation v1.0.4/go.mod h1:u4NbPZKJ5XiayfKHD/v3z3iflQWqvtdhj13jVZXj/cM=
github.com/smartcontractkit/chainlink-ccip v0.0.0-20240924070918-21dc2dadfdad h1:oEqKi71gr6Ldj8UKJuQOL70CHtNaoyR6pOFEyNgi6Z4=
github.com/smartcontractkit/chainlink-ccip v0.0.0-20240924070918-21dc2dadfdad/go.mod h1:KP82vFCqm+M1G1t6Vos5CewGUGYJkxxCEdxnta4uLlE=
github.com/smartcontractkit/chainlink-common v0.2.3-0.20240923163738-9f7db4ed0dfc h1:6+X6I0JiLYkxUi0oNtLpAexDqQEqhAeeosxH/We1Zao=
github.com/smartcontractkit/chainlink-common v0.2.3-0.20240923163738-9f7db4ed0dfc/go.mod h1:F6WUS6N4mP5ScwpwyTyAJc9/vjR+GXbMCRUOVekQi1g=
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.20240925085218-aded1b263ecc h1:ALbyaoRzUSXQ2NhGFKVOyJqO22IB5yQjhjKWbIZGbrI=
github.com/smartcontractkit/chainlink-common v0.2.3-0.20240925085218-aded1b263ecc/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=
Expand Down
4 changes: 2 additions & 2 deletions integration-tests/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ require (
github.com/smartcontractkit/ccip-owner-contracts v0.0.0-20240919155713-f4bf4ae0b9c6
github.com/smartcontractkit/chain-selectors v1.0.23
github.com/smartcontractkit/chainlink-automation v1.0.4
github.com/smartcontractkit/chainlink-ccip v0.0.0-20240924070918-21dc2dadfdad
github.com/smartcontractkit/chainlink-common v0.2.3-0.20240923163738-9f7db4ed0dfc
github.com/smartcontractkit/chainlink-ccip v0.0.0-20240924115754-8858b0423283
github.com/smartcontractkit/chainlink-common v0.2.3-0.20240925085218-aded1b263ecc
github.com/smartcontractkit/chainlink-testing-framework/havoc v1.50.0
github.com/smartcontractkit/chainlink-testing-framework/lib v1.50.9
github.com/smartcontractkit/chainlink-testing-framework/lib/grafana v1.50.0
Expand Down
8 changes: 4 additions & 4 deletions integration-tests/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -1427,10 +1427,10 @@ github.com/smartcontractkit/chain-selectors v1.0.23 h1:D2Eaex4Cw/O7Lg3tX6WklOqnj
github.com/smartcontractkit/chain-selectors v1.0.23/go.mod h1:d4Hi+E1zqjy9HqMkjBE5q1vcG9VGgxf5VxiRHfzi2kE=
github.com/smartcontractkit/chainlink-automation v1.0.4 h1:iyW181JjKHLNMnDleI8umfIfVVlwC7+n5izbLSFgjw8=
github.com/smartcontractkit/chainlink-automation v1.0.4/go.mod h1:u4NbPZKJ5XiayfKHD/v3z3iflQWqvtdhj13jVZXj/cM=
github.com/smartcontractkit/chainlink-ccip v0.0.0-20240924070918-21dc2dadfdad h1:oEqKi71gr6Ldj8UKJuQOL70CHtNaoyR6pOFEyNgi6Z4=
github.com/smartcontractkit/chainlink-ccip v0.0.0-20240924070918-21dc2dadfdad/go.mod h1:KP82vFCqm+M1G1t6Vos5CewGUGYJkxxCEdxnta4uLlE=
github.com/smartcontractkit/chainlink-common v0.2.3-0.20240923163738-9f7db4ed0dfc h1:6+X6I0JiLYkxUi0oNtLpAexDqQEqhAeeosxH/We1Zao=
github.com/smartcontractkit/chainlink-common v0.2.3-0.20240923163738-9f7db4ed0dfc/go.mod h1:F6WUS6N4mP5ScwpwyTyAJc9/vjR+GXbMCRUOVekQi1g=
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.20240925085218-aded1b263ecc h1:ALbyaoRzUSXQ2NhGFKVOyJqO22IB5yQjhjKWbIZGbrI=
github.com/smartcontractkit/chainlink-common v0.2.3-0.20240925085218-aded1b263ecc/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=
Expand Down
4 changes: 2 additions & 2 deletions integration-tests/load/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ require (
github.com/pkg/errors v0.9.1
github.com/rs/zerolog v1.33.0
github.com/slack-go/slack v0.12.2
github.com/smartcontractkit/chainlink-common v0.2.3-0.20240923163738-9f7db4ed0dfc
github.com/smartcontractkit/chainlink-common v0.2.3-0.20240925085218-aded1b263ecc
github.com/smartcontractkit/chainlink-testing-framework/lib v1.50.9
github.com/smartcontractkit/chainlink-testing-framework/seth v1.50.1
github.com/smartcontractkit/chainlink-testing-framework/wasp v1.50.0
Expand Down Expand Up @@ -388,7 +388,7 @@ require (
github.com/shopspring/decimal v1.4.0 // indirect
github.com/sirupsen/logrus v1.9.3 // indirect
github.com/smartcontractkit/chain-selectors v1.0.23 // indirect
github.com/smartcontractkit/chainlink-ccip v0.0.0-20240924070918-21dc2dadfdad // indirect
github.com/smartcontractkit/chainlink-ccip v0.0.0-20240924115754-8858b0423283 // indirect
github.com/smartcontractkit/chainlink-cosmos v0.4.1-0.20240911175228-daf2600bb7b7 // indirect
github.com/smartcontractkit/chainlink-data-streams v0.0.0-20240916152957-433914114bd2 // indirect
github.com/smartcontractkit/chainlink-feeds v0.0.0-20240910155501-42f20443189f // indirect
Expand Down
8 changes: 4 additions & 4 deletions integration-tests/load/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -1401,10 +1401,10 @@ github.com/smartcontractkit/chain-selectors v1.0.23 h1:D2Eaex4Cw/O7Lg3tX6WklOqnj
github.com/smartcontractkit/chain-selectors v1.0.23/go.mod h1:d4Hi+E1zqjy9HqMkjBE5q1vcG9VGgxf5VxiRHfzi2kE=
github.com/smartcontractkit/chainlink-automation v1.0.4 h1:iyW181JjKHLNMnDleI8umfIfVVlwC7+n5izbLSFgjw8=
github.com/smartcontractkit/chainlink-automation v1.0.4/go.mod h1:u4NbPZKJ5XiayfKHD/v3z3iflQWqvtdhj13jVZXj/cM=
github.com/smartcontractkit/chainlink-ccip v0.0.0-20240924070918-21dc2dadfdad h1:oEqKi71gr6Ldj8UKJuQOL70CHtNaoyR6pOFEyNgi6Z4=
github.com/smartcontractkit/chainlink-ccip v0.0.0-20240924070918-21dc2dadfdad/go.mod h1:KP82vFCqm+M1G1t6Vos5CewGUGYJkxxCEdxnta4uLlE=
github.com/smartcontractkit/chainlink-common v0.2.3-0.20240923163738-9f7db4ed0dfc h1:6+X6I0JiLYkxUi0oNtLpAexDqQEqhAeeosxH/We1Zao=
github.com/smartcontractkit/chainlink-common v0.2.3-0.20240923163738-9f7db4ed0dfc/go.mod h1:F6WUS6N4mP5ScwpwyTyAJc9/vjR+GXbMCRUOVekQi1g=
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.20240925085218-aded1b263ecc h1:ALbyaoRzUSXQ2NhGFKVOyJqO22IB5yQjhjKWbIZGbrI=
github.com/smartcontractkit/chainlink-common v0.2.3-0.20240925085218-aded1b263ecc/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=
Expand Down
18 changes: 14 additions & 4 deletions integration-tests/test.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,26 @@ ARG BASE_IMAGE
ARG IMAGE_VERSION=latest
FROM ${BASE_IMAGE}:${IMAGE_VERSION} AS build-env

ARG SUITES=chaos migration performance reorg smoke soak benchmark load ccip-load

COPY . testdir/
WORKDIR /go/testdir
RUN mkdir -p /go/testdir/integration-tests/load
COPY go.mod go.sum ./
COPY integration-tests/go.mod integration-tests/go.sum ./integration-tests/
COPY integration-tests/load/go.mod integration-tests/load/go.sum ./integration-tests/load/
RUN cd integration-tests && go mod download
RUN cd integration-tests/load && go mod download

COPY . .

ARG SUITES=chaos soak benchmark load ccip-load

RUN /go/testdir/integration-tests/scripts/buildTests "${SUITES}"

FROM ${BASE_IMAGE}:${IMAGE_VERSION}

RUN mkdir -p /go/testdir/integration-tests/scripts
COPY --from=build-env /go/pkg /go/pkg
# Dependency of CosmWasm/wasmd
COPY --from=build-env /go/pkg/mod/github.com/\!cosm\!wasm/wasmvm@v*/internal/api/libwasmvm.*.so /usr/lib/
RUN chmod 755 /usr/lib/libwasmvm.*.so
COPY --from=build-env /go/testdir/integration-tests/*.test /go/testdir/integration-tests/
COPY --from=build-env /go/testdir/integration-tests/ccip-tests/*.test /go/testdir/integration-tests/
COPY --from=build-env /go/testdir/integration-tests/scripts /go/testdir/integration-tests/scripts/
Expand Down

0 comments on commit c773da9

Please sign in to comment.