Skip to content

Commit 7846d43

Browse files
authored
[Loopring 3.x] change target dir (#2467)
1 parent f0fadfa commit 7846d43

File tree

11 files changed

+20
-20
lines changed

11 files changed

+20
-20
lines changed

packages/loopring_v3.js/src/exchange_v3.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -79,15 +79,15 @@ export class ExchangeV3 {
7979

8080
this.syncedToEthereumBlockIdx = 0;
8181

82-
const ABIPath = "ABI/version36/";
82+
const ABIPath = "ABI/version3x/";
8383
this.exchangeV3Abi = fs.readFileSync(ABIPath + "IExchangeV3.abi", "ascii");
8484

8585
this.exchange = new web3.eth.Contract(JSON.parse(this.exchangeV3Abi));
8686
this.exchange.options.address = this.exchangeAddress;
8787

88-
const exchangeCreationTimestamp = (
89-
await this.exchange.methods.getBlockInfo(0).call()
90-
).timestamp;
88+
const exchangeCreationTimestamp = (await this.exchange.methods
89+
.getBlockInfo(0)
90+
.call()).timestamp;
9191
const genesisMerkleRoot = new BN(
9292
(await this.exchange.methods.getMerkleRoot().call()).slice(2),
9393
16

packages/loopring_v3.js/src/protocol_v3.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ export class ProtocolV3 {
4848

4949
this.syncedToEthereumBlockIdx = 0;
5050

51-
const ABIPath = "ABI/version36/";
51+
const ABIPath = "ABI/version3x/";
5252
this.loopringAbi = fs.readFileSync(ABIPath + "ILoopringV3.abi", "ascii");
5353

5454
this.loopring = new web3.eth.Contract(JSON.parse(this.loopringAbi));

packages/loopring_v3/genAbi.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
const fs = require("fs");
22
const contractBuildPath = "./build/contracts";
3-
const abiDir = "./ABI/version36";
3+
const abiDir = "./ABI/version3x";
44

55
fs.readdir(contractBuildPath, function(err, files) {
66
if (err) {

packages/loopring_v3/genAbi.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@
33
rm -rf ABI/*
44

55
node_modules/solc/solcjs \
6-
-o ABI/version36/ --overwrite \
6+
-o ABI/version3x/ --overwrite \
77
--abi contracts/core/iface/*.sol \
88
--allow-paths contracts/thirdparty/proxies/*.sol contracts/thirdparty/*.sol contracts/lib/*.sol
99

10-
ABI_PATH="ABI/version36"
10+
ABI_PATH="ABI/version3x"
1111

1212
for file in $ABI_PATH/*
1313
do

packages/loopring_v3/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "loopring_v3",
33
"version": "3.0.0",
4-
"description": "Loopring DEX protocol version 3.0",
4+
"description": "Loopring DEX protocol version 3.x",
55
"main": "index.js",
66
"directories": {
77
"test": "test"
@@ -33,7 +33,7 @@
3333
"compile": "truffle compile",
3434
"make": "LIBRARY_PATH=$LIBRARY_PATH:/usr/local/lib/ make",
3535
"build": "./install && LIBRARY_PATH=$LIBRARY_PATH:/usr/local/lib/ make && npm run compile",
36-
"genabi": "rm -rf ./ABI && mkdir -p ABI/version36 && node ./genAbi.js",
36+
"genabi": "rm -rf ./ABI && mkdir -p ABI/version3x && node ./genAbi.js",
3737
"ganache": "./ganache.sh",
3838
"migrate": "npm run transpile && truffle migrate --network live | tee -a mainnet.deployed",
3939
"migrate-ropsten": "npm run transpile && truffle migrate --network ropsten | tee -a ropsten.deployed",

packages/loopring_v3/scripts/feecollector_stats.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ async function getFeeCollectorStatsOfDate(date: string, blockNumber: number) {
8989

9090
async function getTokenBalanceAtBlock(token: string, blockNumber: number) {
9191
const tokenContract = new web3.eth.Contract(
92-
JSON.parse(fs.readFileSync("ABI/version36/ERC20.abi", "ascii")),
92+
JSON.parse(fs.readFileSync("ABI/version3x/ERC20.abi", "ascii")),
9393
token
9494
);
9595

packages/loopring_v3/scripts/list_unprocessed_deposits.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ const exchangeAddress = "0x0BABA1Ad5bE3a5C0a66E7ac838a129Bf948f1eA4";
1414

1515
async function listPendingDeposits(blocksAhead: number) {
1616
const depositEvents = await myEth.getEvents(
17-
"ABI/version36/ExchangeV3.abi",
17+
"ABI/version3x/ExchangeV3.abi",
1818
exchangeAddress,
1919
"DepositRequested",
2020
blocksAhead
@@ -35,7 +35,7 @@ async function listPendingDeposits(blocksAhead: number) {
3535

3636
const token = e.returnValues.token;
3737
const pendingAmount = await myEth.call(
38-
"ABI/version36/ExchangeV3.abi",
38+
"ABI/version3x/ExchangeV3.abi",
3939
exchangeAddress,
4040
"getPendingDepositAmount",
4141
to,

packages/loopring_v3/scripts/redistribution_helper.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ const defaultTxOpts = {
1919
const exchangeAddress = "0x0BABA1Ad5bE3a5C0a66E7ac838a129Bf948f1eA4";
2020
async function getFailedDistributions(blocksAhead: number) {
2121
const failedEvents = await myEth.getEvents(
22-
"ABI/version36/ExchangeV3.abi",
22+
"ABI/version3x/ExchangeV3.abi",
2323
exchangeAddress,
2424
"WithdrawalFailed",
2525
blocksAhead
@@ -37,7 +37,7 @@ async function getFailedDistributions(blocksAhead: number) {
3737

3838
const token = e.returnValues.token;
3939
const withdrawableAmount = await myEth.call(
40-
"ABI/version36/ExchangeV3.abi",
40+
"ABI/version3x/ExchangeV3.abi",
4141
exchangeAddress,
4242
"getAmountWithdrawable",
4343
to,

packages/loopring_v3/scripts/token_gas_stats.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ async function getAllTokensInLoopring() {
1717
[...Array(tokenCount).keys()].map(async function(i) {
1818
if (i == 0) return;
1919
const tokenAddress = await myEth.call(
20-
"ABI/version36/IExchangeV3.abi",
20+
"ABI/version3x/IExchangeV3.abi",
2121
exchangeAddress,
2222
"getTokenAddress",
2323
i
@@ -87,15 +87,15 @@ async function fetchTokenGasStats(token: string) {
8787
console.log("fetch stats for token:", token);
8888

8989
const symbol = await myEth.call(
90-
"ABI/version36/ERC20Token.abi",
90+
"ABI/version3x/ERC20Token.abi",
9191
token,
9292
"symbol"
9393
);
9494
console.log("symbol:", symbol);
9595
if (symbol.startsWith("LP-")) return;
9696

9797
const transferEvents = await myEth.getEvents(
98-
"ABI/version36/ERC20Token.abi",
98+
"ABI/version3x/ERC20Token.abi",
9999
token,
100100
"Transfer",
101101
100000

packages/loopring_v3/test/context.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ export class Context {
1313
this.blockTimestamp = blockTimestamp;
1414
this.lrcAddress = lrcAddress;
1515

16-
const ABIPath = "ABI/version36/";
16+
const ABIPath = "ABI/version3x/";
1717
const erc20Abi = fs.readFileSync(ABIPath + "ERC20.abi", "ascii");
1818

1919
/*if (!web3) {

0 commit comments

Comments
 (0)