Skip to content

Commit

Permalink
feat(generate): adding go project to generate batchMint solidity scrit
Browse files Browse the repository at this point in the history
  • Loading branch information
KristenPire committed Aug 6, 2024
1 parent 7f789db commit f5b1484
Show file tree
Hide file tree
Showing 11 changed files with 7,391 additions and 38 deletions.
8 changes: 4 additions & 4 deletions script/deploy.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ contract All is Script {
// Deploy only one implementation of the Token contract for all currencies.
Token implementation = new Token();

deployTokenProxy(implementation, "Monerium EUR emoney", "EURe", address(validatorProxy));
deployTokenProxy(implementation, "Monerium GBP emoney", "GBPe", address(validatorProxy));
deployTokenProxy(implementation, "Monerium ISK emoney", "ISKe", address(validatorProxy));
deployTokenProxy(implementation, "Monerium USD emoney", "USDe", address(validatorProxy));
deployTokenProxy(implementation, "Monerium EURe", "EURe", address(validatorProxy));
deployTokenProxy(implementation, "Monerium GBPe", "GBPe", address(validatorProxy));
deployTokenProxy(implementation, "Monerium ISKe", "ISKe", address(validatorProxy));
deployTokenProxy(implementation, "Monerium USDe", "USDe", address(validatorProxy));

vm.stopBroadcast();
}
Expand Down
18 changes: 17 additions & 1 deletion script/deployAll.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,27 @@ elif [ "$1" == "--gnosis-chiado" ]; then
echo $VERIFIER_URL
forge script script/deploy.s.sol:AllControllerGnosis --rpc-url $RPC_URL --broadcast --verify $VERIFIER_URL -vvvv --legacy
exit 0
elif [ "$1" == "--gnosis" ]; then
echo "Deploying to Gnosis..."
RPC_URL=$GNOSIS_RPC
ETHERSCAN_API_KEY=$GNOSISSCAN_API
VERIFIER_URL="--verifier-url $GNOSISSCAN_URL --chain-id $GNOSIS_CHAIN_ID"
echo $VERIFIER_URL
forge script script/deploy.s.sol:AllControllerGnosis --rpc-url $RPC_URL --broadcast --etherscan-api-key $ETHERSCAN_API_KEY --verify $VERIFIER_URL -vvvv --legacy
exit 0
elif [ "$1" == "--polygon-amoy" ]; then
echo "Deploying to Polygon Amoy..."
RPC_URL=$POLYGON_AMOY_RPC
ETHERSCAN_API_KEY=$POLYGONSCAN_API
VERIFIER_URL="--verifier-url $POLYGONSCAN_URL --chain-id $POLYGON_AMOY_CHAIN_ID"
VERIFIER_URL="--verifier-url $POLYGONSCAN_AMOY_URL --chain-id $POLYGON_AMOY_CHAIN_ID"
echo $VERIFIER_URL
forge script script/deploy.s.sol:AllControllerPolygon --rpc-url $RPC_URL --broadcast --etherscan-api-key $ETHERSCAN_API_KEY --verify $VERIFIER_URL -vvvv --legacy
exit 0
elif [ "$1" == "--polygon" ]; then
echo "Deploying to Polygon..."
RPC_URL=$POLYGON_RPC
ETHERSCAN_API_KEY=$POLYGONSCAN_API
VERIFIER_URL="--verifier-url $POLYGONSCAN_URL --chain-id $POLYGON_CHAIN_ID"
echo $VERIFIER_URL
forge script script/deploy.s.sol:AllControllerPolygon --rpc-url $RPC_URL --broadcast --etherscan-api-key $ETHERSCAN_API_KEY --verify $VERIFIER_URL -vvvv --legacy
exit 0
Expand Down
1 change: 1 addition & 0 deletions script/generate/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
savedData/*
226 changes: 226 additions & 0 deletions script/generate/data.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 15 additions & 0 deletions script/generate/data.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
syntax = "proto3";

package main;

option go_package = "./;main";

message SaveData {
repeated Holder holders_set = 1;
string last_block_number = 2;
}

message Holder {
string address = 1;
string amount = 2; // store amounts as strings to handle large numbers
}
Binary file added script/generate/generate
Binary file not shown.
Loading

0 comments on commit f5b1484

Please sign in to comment.