Skip to content

Commit

Permalink
add default return value for approve
Browse files Browse the repository at this point in the history
  • Loading branch information
bout3fiddy committed Nov 10, 2023
1 parent eeb3773 commit aeca06b
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 7 deletions.
6 changes: 5 additions & 1 deletion contracts/main/CurveStableSwapMetaNG.vy
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,11 @@ def __init__(
if i < BASE_N_COINS:
# Approval needed for add_liquidity operation on base pool in
# _exchange_underlying:
ERC20(_base_coins[i]).approve(BASE_POOL, max_value(uint256))
ERC20(_base_coins[i]).approve(
BASE_POOL,
max_value(uint256),
default_return_value = True
)

# For ERC4626 tokens:
if asset_types[0] == 3:
Expand Down
6 changes: 3 additions & 3 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ packages = []
[tool.poetry.dependencies]
python = "^3.10"
poetry = "1.5.1"
titanoboa = {git = "https://github.com/vyperlang/titanoboa.git", rev = "1924f4888e2ef261efb2367fce2cf467de16f529"}
titanoboa = {git = "https://github.com/vyperlang/titanoboa.git", rev = "b5e9fb96d1424ed5cc5a6af03391d885439c83e5"}
vyper = "0.3.10"
pycryptodome = "^3.18.0"
pre-commit = "^3.3.3"
Expand Down
5 changes: 3 additions & 2 deletions scripts/deploy_infra.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"math": "0x20D1c021525C85D9617Ccc64D8f547d5f730118A",
"views": "0x87DD13Dd25a1DBde0E1EdcF5B8Fa6cfff7eABCaD",
"plain_amm": "0x3E3B5F27bbf5CC967E074b70E9f4046e31663181",
"meta_amm": "0x19bd1AB34d6ABB584b9C1D5519093bfAA7f6c7d2",
"meta_amm": "0x64AFA95e0C3D8410240a4262df9Fd82B12b64eDd",
"factory": "0x6A8cbed756804B16E05E741eDaBd5cB544AE21bf",
"gauge": "0xF5617D4f7514bE35fce829a1C19AE7f6c9106979",
},
Expand Down Expand Up @@ -193,6 +193,7 @@ def deploy_infra(network, url, account, fork=False):
if fork:
boa.env.fork(url)
logger.log("Forkmode ...")
boa.env.eoa = deploy_utils.FIDDYDEPLOYER # set eoa address here
else:
logger.log("Prodmode ...")
boa.set_env(NetworkEnv(url))
Expand Down Expand Up @@ -261,7 +262,7 @@ def main():

deploy_infra(
"ethereum:mainnet",
os.environ["RPC_ETHEREUM"],
"http://localhost:9090",
"FIDDYDEPLOYER",
fork=False,
)
Expand Down

0 comments on commit aeca06b

Please sign in to comment.