-
Notifications
You must be signed in to change notification settings - Fork 75
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
Showing
2 changed files
with
40 additions
and
0 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,34 @@ | ||
# This script simply tests the deployment process | ||
|
||
from ape import project, accounts, networks | ||
from ape.cli import NetworkBoundCommand, network_option | ||
# account_option could be used when in prod? | ||
import click | ||
|
||
from dotenv import load_dotenv | ||
from pathlib import Path | ||
BASE_DIR = Path(__file__).resolve().parent.parent | ||
load_dotenv(Path(BASE_DIR, ".env")) | ||
|
||
|
||
@click.group() | ||
def cli(): | ||
""" | ||
Script for testing the deployment process in ape | ||
""" | ||
|
||
|
||
@cli.command( | ||
cls=NetworkBoundCommand, | ||
) | ||
@network_option() | ||
def deploy(network): | ||
account = accounts.load('babe') | ||
account.set_autosign(True) | ||
|
||
max_fee = networks.active_provider.base_fee * 2 | ||
max_priority_fee = '0.5 gwei' | ||
|
||
with accounts.use_sender(account): | ||
account.deploy(project.DummyPriceOracle, account, 2000 * 10**18, max_fee=max_fee, | ||
max_priority_fee=max_priority_fee) |