diff --git a/.env.example b/.env.example new file mode 100644 index 00000000..e69de29b diff --git a/.gitignore b/.gitignore index a96e9353..14022d9f 100644 --- a/.gitignore +++ b/.gitignore @@ -64,3 +64,6 @@ cache artifacts !integration_tests/ethereum/artifacts *.test + +# don't save the env file +.env \ No newline at end of file diff --git a/Makefile b/Makefile index 9ffa596b..a5537694 100644 --- a/Makefile +++ b/Makefile @@ -380,7 +380,6 @@ e2e_clean_slate: @cd integration_tests && go test -c e2e_basic: e2e_clean_slate - @E2E_SKIP_CLEANUP=true @integration_tests/integration_tests.test -test.run TestBasicChain -test.failfast -test.v || make -s fail e2e_rebalance: e2e_clean_slate diff --git a/integration_tests/ethereum/Dockerfile b/integration_tests/ethereum/Dockerfile index 52041164..1fcc5725 100644 --- a/integration_tests/ethereum/Dockerfile +++ b/integration_tests/ethereum/Dockerfile @@ -1,7 +1,7 @@ FROM node:14-alpine3.13 RUN apk update -RUN apk add --no-cache git python +RUN apk add --no-cache git python3 COPY package.json package.json COPY yarn.lock yarn.lock @@ -11,8 +11,9 @@ RUN npm config set user 0 COPY . . -RUN yarn run compile - +ENV ARCHIVE_NODE_URL="" EXPOSE 8545 +RUN yarn run compile + CMD yarn start \ No newline at end of file diff --git a/integration_tests/ethereum/hardhat.config.ts b/integration_tests/ethereum/hardhat.config.ts index 1bfc73f3..37234331 100644 --- a/integration_tests/ethereum/hardhat.config.ts +++ b/integration_tests/ethereum/hardhat.config.ts @@ -77,11 +77,13 @@ task( /** * @type import('hardhat/config').HardhatUserConfig */ +const ARCHIVE_NODE_URL = process.env.ARCHIVE_NODE_URL; + module.exports = { networks: { hardhat: { forking: { - url: 'https://eth-mainnet.alchemyapi.io/v2/lErlJJCjh4o6eXRbSXel1jVcBmCvAJfx', + url: ARCHIVE_NODE_URL, blockNumber: 13405367, }, }, diff --git a/integration_tests/setup_test.go b/integration_tests/setup_test.go index 9342ed9b..d98bd0ca 100644 --- a/integration_tests/setup_test.go +++ b/integration_tests/setup_test.go @@ -451,6 +451,7 @@ func (s *IntegrationTestSuite) runEthContainer() { "8545/tcp": {{HostIP: "", HostPort: "8545"}}, }, ExposedPorts: []string{"8545/tcp"}, + Env: []string{fmt.Sprintf("ARCHIVE_NODE_URL=%s", os.Getenv("ARCHIVE_NODE_URL"))}, } s.ethResource, err = s.dockerPool.RunWithOptions(