-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
19036db
commit 26c43a9
Showing
3 changed files
with
43 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
from ape import project, accounts, Contract, chain, networks | ||
from hexbytes import HexBytes | ||
from scripts.deployments import getSalt, deploy_contract | ||
|
||
|
||
def deploy_keeper(): | ||
print("Deploying Keeper on ChainID", chain.chain_id) | ||
|
||
if input("Do you want to continue? ") == "n": | ||
return | ||
|
||
keeper = project.Keeper | ||
|
||
deployer = input("Name of account to use? ") | ||
deployer = accounts.load(deployer) | ||
|
||
salt = getSalt("Keeper") | ||
|
||
print(f"Salt we are using {salt}") | ||
print("Init balance:", deployer.balance / 1e18) | ||
|
||
# generate and deploy | ||
deploy_bytecode = HexBytes( | ||
HexBytes(keeper.contract_type.deployment_bytecode.bytecode) | ||
) | ||
|
||
print(f"Deploying the Keeper...") | ||
|
||
deploy_contract(deploy_bytecode, salt, deployer) | ||
|
||
print("------------------") | ||
|
||
|
||
def main(): | ||
deploy_keeper() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters