Skip to content

Commit

Permalink
feat: Store native token in json (#18)
Browse files Browse the repository at this point in the history
* store native token json in etc/tokens/

* fmt

---------

Co-authored-by: Santiago Pittella <[email protected]>
  • Loading branch information
SantiagoPittella and Santiago Pittella authored Dec 20, 2023
1 parent 1181aa3 commit bd8c238
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ Cargo.lock
!/etc/env/ext-node.toml
!/etc/env/ext-node-docker.toml
/etc/tokens/localhost.json
/etc/tokens/native_erc20.json
/etc/zksolc-bin/*
/etc/zkvyper-bin/*
/etc/solc-bin/*
Expand Down
3 changes: 2 additions & 1 deletion infrastructure/zk/src/run/run.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,9 @@ export async function deployERC20(
const WETH = getTokens(destinationFile).find((token) => token.symbol === 'WETH')!;
env.modify('CONTRACTS_L1_WETH_TOKEN_ADDR', `CONTRACTS_L1_WETH_TOKEN_ADDR=${WETH.address}`);
} else if (command == 'new') {
let destinationFile = 'native_erc20';
await utils.spawn(
`yarn --silent --cwd contracts/ethereum deploy-erc20 add --token-name ${name} --symbol ${symbol} --decimals ${decimals}`
`yarn --silent --cwd contracts/ethereum deploy-erc20 add --token-name ${name} --symbol ${symbol} --decimals ${decimals} > ./etc/tokens/${destinationFile}.json`
);
}
}
Expand Down

0 comments on commit bd8c238

Please sign in to comment.