Skip to content

Commit

Permalink
Charlie/docker_container (#61)
Browse files Browse the repository at this point in the history
* Added Dockerfile
  • Loading branch information
CharlieMc0 authored Feb 8, 2023
1 parent 76f566c commit fc15ef5
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 5 deletions.
8 changes: 8 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
**/node_modules/
**/cache
**/.env
Dockerfile
.github
.vscode
.changeset
.dockerignore
29 changes: 29 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@

FROM node:16.14-alpine

ENV SHELL /bin/ash
ENV EXECUTE_PROGRAMMATICALLY=true

RUN apk add --update python3 yarn git nodejs make g++

## Install node modules before the code is copied to the container
WORKDIR /home/zetachain/
COPY package*.json ./
RUN yarn install

COPY . ./
RUN yarn install

RUN yarn add solc@0.5.10
RUN yarn add solc@0.6.6
RUN yarn add solc@0.7.6
RUN yarn add solc@0.8.7

RUN cd packages/protocol-contracts && npx hardhat compile && cd -
RUN cd packages/example-contracts && npx hardhat compile && cd -
RUN cd packages/zevm-contracts && npx hardhat compile && cd -

WORKDIR /home/zetachain/

ENTRYPOINT ["ash"]

10 changes: 5 additions & 5 deletions packages/protocol-contracts/scripts/test-zeta-send.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,18 @@ const encoder = new AbiCoder();

async function main() {
const factory = (await ethers.getContractFactory("ZetaConnectorEth")) as ZetaConnectorEthFactory;

const accounts = await ethers.getSigners();
const contract = factory.attach(getAddress("connector"));

console.log("Sending");
console.log(`Sending To ${accounts[0].address}`);
await (
await contract.send({
destinationAddress: encoder.encode(["address"], ["0x09b80BEcBe709Dd354b1363727514309d1Ac3C7b"]),
destinationAddress: encoder.encode(["address"], [accounts[0].address]),
destinationChainId: getChainId("bsc-testnet"),
destinationGasLimit: 1_000_000,
message: encoder.encode(["address"], ["0x09b80BEcBe709Dd354b1363727514309d1Ac3C7b"]),
message: encoder.encode(["address"], [accounts[0].address]),
zetaParams: [],
zetaValueAndGas: 0
zetaValueAndGas: "10000000000000000000"
})
).wait();
console.log("Sent");
Expand Down

0 comments on commit fc15ef5

Please # to comment.