Skip to content

Commit

Permalink
Merge pull request #11 from iamdefinitelyahuman/v0.2.1
Browse files Browse the repository at this point in the history
v0.2.1
  • Loading branch information
iamdefinitelyahuman authored May 26, 2021
2 parents c0303e3 + 980065c commit dad9df8
Show file tree
Hide file tree
Showing 6 changed files with 33 additions and 8 deletions.
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,16 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased](https://github.com/iamdefinitelyahuman/brownie-token-tester)

## [0.2.1](https://github.com/iamdefinitelyahuman/brownie-token-tester/tree/v0.2.1) - 2021-05-26

### Changed
- Use Vyper `v0.2.12`

### Fixed
- Query SNX exchanger address from address resolver

## [0.2.0](https://github.com/iamdefinitelyahuman/brownie-token-tester/tree/v0.2.0) - 2021-03-28

### Added

- Custom minting logic for: USDC, DAI, USDT, EURS, sEURS, sETH, sUSD, ankrETH, rETH
Expand Down
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
2 changes: 1 addition & 1 deletion brownie_tokens/template.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ def ERC20(
return_statement=RETURN_STATEMENT[success],
fail_statement=FAIL_STATEMENT[fail],
)
contract = compile_source(source, vyper_version="0.2.11").Vyper
contract = compile_source(source, vyper_version="0.2.12").Vyper

if deployer is None:
tx_params = {"from": "0x0000000000000000000000000000000000001337", "silent": True}
Expand Down
2 changes: 1 addition & 1 deletion brownie_tokens/token-template.vy
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# @version 0.2.11
# @version 0.2.12
"""
@notice Mock non-standard ERC20 for testing
"""
Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[bumpversion]
current_version = 0.2.0
current_version = 0.2.1

[bumpversion:file:setup.py]

Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
name="brownie-token-tester",
packages=find_packages(exclude=["tests", "tests.*"]),
py_modules=["brownie_tokens"],
version="0.2.0", # don't change this manually, use bumpversion instead
version="0.2.1", # don't change this manually, use bumpversion instead
license="MIT",
description="Helper objects for generating ERC20s while testing a Brownie project.",
long_description=long_description,
Expand Down

0 comments on commit dad9df8

Please sign in to comment.