Skip to content

Commit

Permalink
temp debugging
Browse files Browse the repository at this point in the history
  • Loading branch information
koloz193 committed Apr 18, 2024
1 parent d69fa85 commit 2c3ff58
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/l1-contracts-foundry-ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ jobs:

- name: Run DeployErc20 script
working-directory: ./l1-contracts-foundry
run: forge script ./script/DeployErc20.s.sol --ffi --rpc-url $ANVIL_RPC_URL --broadcast --private-key $ANVIL_PRIVATE_KEY
run: cat /home/runner/work/era-contracts/era-contracts/l1-contracts-foundry/script-config/config-deploy-erc20.toml && forge script ./script/DeployErc20.s.sol --ffi --rpc-url $ANVIL_RPC_URL --broadcast --private-key $ANVIL_PRIVATE_KEY

- name: Run InitializeL2WethToken script
working-directory: ./l1-contracts-foundry
Expand Down
11 changes: 10 additions & 1 deletion l1-contracts-foundry/script/DeployErc20.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {stdToml} from "forge-std/StdToml.sol";

import {Utils} from "./Utils.sol";

contract DeployERC20Script is Script {
contract DeployErc20Script is Script {
using stdToml for string;

struct Config {
Expand Down Expand Up @@ -43,6 +43,15 @@ contract DeployERC20Script is Script {
string memory path = string.concat(root, "/script-config/config-deploy-erc20.toml");
string memory toml = vm.readFile(path);

string[] memory inputs = new string[](2);
inputs[0] = "cat";
inputs[1] = path;

bytes memory res = vm.ffi(inputs);
string memory output = abi.decode(res, (string));

console.log(output);

config.deployerAddress = msg.sender;

// Config file must be parsed key by key, otherwise values returned
Expand Down

0 comments on commit 2c3ff58

Please sign in to comment.