Skip to content

Commit

Permalink
"added salt in env"
Browse files Browse the repository at this point in the history
  • Loading branch information
guha-rahul committed Feb 2, 2024
1 parent b10ff7e commit 5bcf1f4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
3 changes: 3 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,6 @@ OWNER_PRIVATE_KEY="0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f
# - gnosis: https://gnosis.publicnode.com
RPC_URL="http://127.0.0.1:8545"

#this is an example salt that is used to deploy the contract on the same address in different
#make sure to change the salt if u need to redeploy the same contract in the same chain
SALT="69420"
5 changes: 2 additions & 3 deletions script/Deploy001_NftReward.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,12 @@ contract Deploy001_NftReward is Script {
string memory nftTokenName = vm.envString("NFT_TOKEN_NAME");
string memory nftTokenSymbol = vm.envString("NFT_TOKEN_SYMBOL");
uint256 ownerPrivateKey = vm.envUint("OWNER_PRIVATE_KEY");
// bytes32 salt = vm.envBytes32("SALT");
bytes32 salt = bytes32(bytes(vm.envString("SALT")));
address ownerAddress = vm.addr(ownerPrivateKey);

// start sending owner transactions
vm.startBroadcast(ownerPrivateKey);
//Enter the your salt here
bytes32 salt = "694204353";

// deploy NftReward
nftReward = new NftReward{salt: salt}(
nftTokenName, // token name
Expand Down

0 comments on commit 5bcf1f4

Please sign in to comment.