Skip to content

Commit

Permalink
Merge pull request #138 from vegaprotocol/upgrade-contracts
Browse files Browse the repository at this point in the history
chore: update contracts and build them all as 0.8.13
  • Loading branch information
wwestgarth authored Aug 16, 2024
2 parents 712a705 + 50bbca2 commit 804ac19
Show file tree
Hide file tree
Showing 56 changed files with 619 additions and 2,563 deletions.
22 changes: 0 additions & 22 deletions ganache/prebuild
Original file line number Diff line number Diff line change
Expand Up @@ -34,25 +34,3 @@ nohup \
GANACHE_HOSTNAME="127.0.0.1" \
TRUFFLE_NETWORK="development" \
GANACHE_PORT="${GANACHE_PORT}" ./run


sleep 5;
echo "###################################################################";
echo "# #";
echo "# RUNNING MIGRATIONS FOR SECONDARY GANACHE #";
echo "# #";
echo "###################################################################";

nohup \
bash -c "node /app/dist/node/cli.js\
--miner.blockTime 1 \
--chain.chainId 1450 \
--chain.networkId 1451 \
--wallet.mnemonic \"${GANACHE_MNEMONIC}\" \
--database.dbPath /app/ganache-db-secondary \
-h 0.0.0.0 \
-p \"${GANACHE_PORT_SECONDARY}\" &" \
&& GANACHE_MNEMONIC="${GANACHE_MNEMONIC}" \
GANACHE_HOSTNAME="127.0.0.1" \
TRUFFLE_NETWORK="secondary" \
GANACHE_PORT="${GANACHE_PORT_SECONDARY}" ./run
4 changes: 2 additions & 2 deletions ganache/scripts/testing/test_tokens.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@ const Web3 = require("web3");
var assert = require('assert');


let abi = require("./../../../smartcontracts-base/contracts-solc-0.8.8/build/doc/data/files/abi/Base_Faucet_Token_ABI.json");
let abi = require("./../../../smartcontracts-base/contracts-solc-0.8.13/build/doc/data/files/abi/Base_Faucet_Token_ABI.json");
const contractOwner = {
'private': 'a37f4c2a678aefb5037bf415a826df1540b330b7e471aa54184877ba901b9ef0',
'public': '0xEe7D375bcB50C26d52E1A4a472D8822A2A22d94F'
};
const randomAccount = '0xCcFb83E3b85e70Fd815C2C690B21E48F7170926B';

const vegaAddress = '0xFcE3C7CBba976414621887F2D762e7fB0f90b5c1';
const tUSDCEthAddress = '0x9dFD86Aa69c1ad549568c9d51bf2dB27cbDeF2cD';
const tUSDCEthAddress = '0x1b8a1B6CBE5c93609b46D1829Cc7f3Cb8eeE23a0';
const tBTCEthAddress = '0x67175Da1D5e966e40D11c4B2519392B2058373de';


Expand Down
9 changes: 3 additions & 6 deletions smartcontracts-base/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
FROM ethereum/solc:0.8.8 AS solc088
FROM ethereum/solc:0.8.1 AS solc081
FROM ethereum/solc:0.8.13 AS solc0813

FROM node:20.3-alpine AS builder
RUN mkdir /app
Expand All @@ -20,13 +19,11 @@ LABEL org.opencontainers.image.source https://github.com/vegaprotocol/devops-inf
WORKDIR /app2
ENV PATH="$PATH:/app2/node_modules/.bin"

COPY --from=solc088 /usr/bin/solc /usr/bin/solc-v0.8.8
COPY --from=solc081 /usr/bin/solc /usr/bin/solc-v0.8.1
COPY --from=solc0813 /usr/bin/solc /usr/bin/solc-v0.8.13

COPY --from=builder /app/package*.json ./
COPY --from=builder /app/node_modules ./node_modules

ADD contracts-solc-0.8.1 ./contracts-solc-0.8.1
ADD contracts-solc-0.8.8 ./contracts-solc-0.8.8
ADD contracts-solc-0.8.13 ./contracts-solc-0.8.13
ADD scripts ./scripts
ADD run ./run
9 changes: 1 addition & 8 deletions smartcontracts-base/Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Makefile

#defauls
VERSION=0.8.8
VERSION=0.8.13

.PHONY: default
default: abi
Expand All @@ -25,10 +25,3 @@ abi:
jq --sort-keys . <"$$abifile" >"$${abifile%.abi}_ABI.json" && rm "$$abifile" ; \
done

.PHONY: abi-0.8.8
abi-0.8.8: VERSION=0.8.8
abi-0.8.8: abi

.PHONY: abi-0.8.1
abi-0.8.1: VERSION=0.8.1
abi-0.8.1: abi
Loading

0 comments on commit 804ac19

Please sign in to comment.