Skip to content

Commit

Permalink
stableswapfactorynghandler deployed to ethereum
Browse files Browse the repository at this point in the history
  • Loading branch information
bout3fiddy committed Apr 25, 2024
1 parent 01e2d1e commit ff40c8d
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ interface CurvePool:
def fee() -> uint256: view
def admin_fee() -> uint256: view
def offpeg_fee_multiplier() -> uint256: view
def coins(i: uint256) -> address: view

interface ERC20:
def balanceOf(_addr: address) -> uint256: view
Expand Down Expand Up @@ -118,8 +119,8 @@ def _get_meta_underlying_balances(_pool: address) -> uint256[MAX_METAREGISTRY_CO
base_coin_idx: uint256 = self.base_registry.get_n_coins(_pool) - 1
base_pool: address = self.base_registry.get_base_pool(_pool)

# TODO: registry.get_underlying_balances('0x91553BAD9Fbc8bD69Ff5d5678Cbf7D514d00De0b') borks
base_total_supply: uint256 = ERC20(self._get_base_pool_lp_token(base_pool)).totalSupply()
# base pool lp token is at index 1:
base_total_supply: uint256 = ERC20(CurvePool(_pool).coins(1)).totalSupply()

ul_balance: uint256 = 0
underlying_pct: uint256 = 0
Expand Down
File renamed without changes.
21 changes: 5 additions & 16 deletions scripts/deploy_and_setup_stableswap_factory_ng_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,21 +10,10 @@

sys.path.append("./")
from scripts.deploy_addressprovider_and_setup import fetch_url
from scripts.utils.constants import BASE_POOLS, FIDDY_DEPLOYER
from scripts.utils.constants import FIDDY_DEPLOYER


def main(network: str = "ethereum", fork: bool = True):
"""
Deploy the contracts to the network.
It does the following:
1. deploys the base pool registry
2. deploys the crypto registry
3. deploys the stable registry handler
4. deploys the stable factory handler
5. deploys the crypto registry handler
6. deploys the crypto factory handler
7. deploys the metaregistry
"""
console = rich_console.Console()

if not fork:
Expand All @@ -44,13 +33,13 @@ def main(network: str = "ethereum", fork: bool = True):
"contracts/mainnet/registry_handlers/ng/CurveStableSwapFactoryNGHandler.vy",
"0x6A8cbed756804B16E05E741eDaBd5cB544AE21bf", # stableswap factory ng
)
console.log(f"Deployed Curve Stableswap Factory Handler to {registry.address}")

breakpoint()
console.log(
f"Deployed Curve Stableswap Factory Handler to {registry.address}"
)


if __name__ == "__main__":
network = "ethereum"
fork = True
fork = False

main(network, fork)

0 comments on commit ff40c8d

Please sign in to comment.