Skip to content

Commit

Permalink
minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
thurendous committed Oct 7, 2023
1 parent 8e2c877 commit 7fb2df5
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 8 deletions.
18 changes: 14 additions & 4 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,10 +1,20 @@
PRIVATE_KEY=
POLYSCAN_API_KEY=


# RPCs
SEPOLIA_RPC_URL=
AVALANCHEFUJI_RPC_URL=

# used in deployContracts.s.sol
STADIUM_ADDRESS=0x1FBcd7D20155274DFD796343149D0FCA41338F14
# test addresses created locally -> need not to used in prod
STADIUM_ADDRESS=
SPARKN_DEV=

# add prod env variables here
# snowtrace api key
SNOWTRACE_API_KEY=

# prod addresses
AVALANCHE_STADIUM_ADDRESS=

# prod addresses
AVALANCHE_RPC_URL=
POLYSCAN_API_KEY=
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -50,4 +50,4 @@ ifeq ($(findstring --network avalanchemainnnet,$(ARGS)),--network avalanchemainn
endif

deploy:
@forge script script/DeployContracts.s.sol:DeployContracts $(NETWORK_ARGS)
@forge script script/DeployContracts.s.sol:DeployContracts $(NETWORK_ARGS)
7 changes: 4 additions & 3 deletions script/DeployContracts.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ contract DeployContracts is Script {
// tokens' array to whitelist
// satadium_address = 0x5aB0ffF1a51ee78F67247ac0B90C8c1f1f54c37F
address[] public finalTokensToWhitelist;
address public avalancheStadiumAddress = vm.envAddress("MAINNET_STADIUM_ADDRESS"); // SPARKN STADDIUM
address public avalancheStadiumAddress = vm.envAddress("AVALANCHE_STADIUM_ADDRESS"); // SPARKN STADDIUM
address public stadiumAddress = vm.envAddress("STADIUM_ADDRESS"); // SPARKN STADDIUM
address public factoryAdmin = vm.envAddress("SPARKN_DEV"); // SPARKN DEV
address public jpycv1Address;
Expand All @@ -29,7 +29,7 @@ contract DeployContracts is Script {
// set up config
HelperConfig config = new HelperConfig();
if (block.chainid == 43114 || block.chainid == 43113) {
// get the addresses of the tokens to whitelist
// get the addresses of jpycv2 and usdc to whitelist
(,jpycv2Address, usdcAddress,, deployerKey) =
config.activeNetworkConfig();
address[] memory tokensToWhitelist = new address[](2);
Expand Down Expand Up @@ -64,10 +64,11 @@ contract DeployContracts is Script {
// console.log("deployerKey: %s", deployerKey);

vm.startBroadcast(deployerKey); // prank
// console.log("Deploying contracts...sender: ", msg.sender);
// do this when it is on avalanche
if (block.chainid == 43114 ) {
proxyFactory = new ProxyFactory(finalTokensToWhitelist, avalancheStadiumAddress);
} else {
// do this when it is not on avalanche
proxyFactory = new ProxyFactory(finalTokensToWhitelist, stadiumAddress);
}
// console.log("proxyFactory Owner: %s", proxyFactory.owner());
Expand Down

0 comments on commit 7fb2df5

Please sign in to comment.