added deployment script
This commit is contained in:
parent
5711f24e98
commit
b85ce55f94
4 changed files with 28 additions and 15 deletions
4
.gitignore
vendored
4
.gitignore
vendored
|
|
@ -3,7 +3,7 @@ cache/
|
|||
out/
|
||||
|
||||
# Ignores development broadcast logs
|
||||
!/broadcast
|
||||
/broadcast
|
||||
/broadcast/*/31337/
|
||||
/broadcast/**/dry-run/
|
||||
|
||||
|
|
@ -12,3 +12,5 @@ docs/
|
|||
|
||||
# Dotenv file
|
||||
.env
|
||||
.secret
|
||||
.infura
|
||||
|
|
|
|||
|
|
@ -2,7 +2,9 @@
|
|||
src = "src"
|
||||
out = "out"
|
||||
libs = ["lib"]
|
||||
fs_permissions = [{ access = "read", path = "./"}]
|
||||
# See more config options https://github.com/foundry-rs/foundry/tree/master/config
|
||||
|
||||
[rpc_endpoints]
|
||||
goerli = "${GOERLI_RPC_URL}"
|
||||
# Remappings in remappings.txt
|
||||
|
||||
# See more config options https://github.com/gakonst/foundry/tree/master/config
|
||||
|
|
@ -1,12 +0,0 @@
|
|||
// SPDX-License-Identifier: UNLICENSED
|
||||
pragma solidity ^0.8.13;
|
||||
|
||||
import "forge-std/Script.sol";
|
||||
|
||||
contract CounterScript is Script {
|
||||
function setUp() public {}
|
||||
|
||||
function run() public {
|
||||
vm.broadcast();
|
||||
}
|
||||
}
|
||||
21
script/Deploy.sol
Normal file
21
script/Deploy.sol
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
pragma solidity ^0.8.4;
|
||||
|
||||
import "forge-std/Script.sol";
|
||||
import "../src/BloodX.sol";
|
||||
import "../src/StakeX.sol";
|
||||
|
||||
contract GoerliScript is Script {
|
||||
function setUp() public {}
|
||||
|
||||
function run() public {
|
||||
string memory seedPhrase = vm.readFile(".secret");
|
||||
uint256 privateKey = vm.deriveKey(seedPhrase, 0);
|
||||
vm.startBroadcast(privateKey);
|
||||
|
||||
BloodX bloodX = new BloodX("bloodX", "bXXX");
|
||||
StakeX stakeX = new StakeX("stakeX", "sXXX", address(bloodX));
|
||||
bloodX.setStakingContract(address(stakeX));
|
||||
|
||||
vm.stopBroadcast();
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue