Skip to content

Commit

Permalink
fix: query snx exchanger address
Browse files Browse the repository at this point in the history
  • Loading branch information
iamdefinitelyahuman committed May 26, 2021
1 parent 08517a1 commit 8daa5dd
Showing 1 changed file with 20 additions and 4 deletions.
24 changes: 20 additions & 4 deletions brownie_tokens/forked.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,22 @@ def _mint_for_testing(self, target: str, amount: Wei, tx: Dict = None) -> None:
# be sure to include a comment with the symbol of the token


def _snx_exchanger() -> str:
abi = [
{
"inputs": [{"name": "name", "type": "bytes32"}],
"name": "getAddress",
"outputs": [{"internalType": "uint256", "name": "", "type": "address"}],
"stateMutability": "view",
"type": "function",
}
]
resolver = Contract.from_abi(
"AddressResolver", "0x4E3b31eB0E5CB73641EE1E65E7dCEFe520bA3ef2", abi
)
return resolver.getAddress("0x45786368616e6765720000000000000000000000000000000000000000000000")


def mint_0xE95A203B1a91a908F9B9CE46459d101078c2c3cb(
token: MintableForkToken, target: str, amount: int
) -> None:
Expand Down Expand Up @@ -131,31 +147,31 @@ def mint_0xfE18be6b3Bd88A2D2A7f928d00292E7a9963CfC6(
) -> None:
# Synth sBTC
target_contract = Contract("0xDB91E4B3b6E19bF22E810C43273eae48C9037e74")
target_contract.issue(target, amount, {"from": "0x778D2d3E3515e42573EB1e6a8d8915D4a22D9d54"})
target_contract.issue(target, amount, {"from": _snx_exchanger()})


def mint_0x5e74C9036fb86BD7eCdcb084a0673EFc32eA31cb(
token: MintableForkToken, target: str, amount: int
) -> None:
# Synth sETH
target_contract = Contract("0x87641989057242Bff28D0D6108d007C79774D06f")
target_contract.issue(target, amount, {"from": "0x778D2d3E3515e42573EB1e6a8d8915D4a22D9d54"})
target_contract.issue(target, amount, {"from": _snx_exchanger()})


def mint_0xD71eCFF9342A5Ced620049e616c5035F1dB98620(
token: MintableForkToken, target: str, amount: int
) -> None:
# Synth sEURS
target_contract = Contract("0xC61b352fCc311Ae6B0301459A970150005e74b3E")
target_contract.issue(target, amount, {"from": "0x778D2d3E3515e42573EB1e6a8d8915D4a22D9d54"})
target_contract.issue(target, amount, {"from": _snx_exchanger()})


def mint_0x57Ab1ec28D129707052df4dF418D58a2D46d5f51(
token: MintableForkToken, target: str, amount: int
) -> None:
# Synth sUSD
target_contract = Contract("0x6C85C5198C3CC4dB1b87Cb43b2674241a30f4845")
target_contract.issue(target, amount, {"from": "0x778D2d3E3515e42573EB1e6a8d8915D4a22D9d54"})
target_contract.issue(target, amount, {"from": _snx_exchanger()})


def mint_0x8dAEBADE922dF735c38C80C7eBD708Af50815fAa(
Expand Down

0 comments on commit 8daa5dd

Please sign in to comment.