Skip to content

Commit

Permalink
update unit tests to use new @Deploy modifier
Browse files Browse the repository at this point in the history
  • Loading branch information
charles-cooper committed Feb 13, 2024
1 parent 672b168 commit 725d4bd
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion examples/ERC20.vy
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ totalSupply: public(uint256)
minter: address


@external
@deploy
def __init__(_name: String[32], _symbol: String[32], _decimals: uint8, supply: uint256):
init_supply: uint256 = supply * 10 ** convert(decimals, uint256)
name = _name
Expand Down
2 changes: 1 addition & 1 deletion examples/deployer.vy
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ from vyper.interfaces import ERC20

BLUEPRINT: immutable(address)

@external
@deploy
def __init__(blueprint_address: address):
BLUEPRINT = blueprint_address

Expand Down
2 changes: 1 addition & 1 deletion tests/integration/RewardPool.vy
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ token_last_balance: public(uint256)
ve_supply: public(HashMap[uint256, uint256])


@external
@deploy
def __init__(veyfi: VotingYFI, start_time: uint256):
"""
@notice Contract constructor
Expand Down
2 changes: 1 addition & 1 deletion tests/integration/network/anvil/test_network_env.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
totalSupply: public(uint256)
balances: HashMap[address, uint256]
@external
@deploy
def __init__(t: uint256):
self.totalSupply = t
self.balances[self] = t
Expand Down
2 changes: 1 addition & 1 deletion tests/integration/network/sepolia/test_sepolia_env.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
totalSupply: public(uint256)
balances: HashMap[address, uint256]
@external
@deploy
def __init__(t: uint256):
self.totalSupply = t
self.balances[self] = t
Expand Down
2 changes: 1 addition & 1 deletion tests/integration/veYFI.vy
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ point_history: public(HashMap[address, HashMap[uint256, Point]]) # epoch -> uns
slope_changes: public(HashMap[address, HashMap[uint256, int128]]) # time -> signed slope change


@external
@deploy
def __init__(token: ERC20, reward_pool: RewardPool):
"""
@notice Contract constructor
Expand Down
2 changes: 1 addition & 1 deletion tests/unitary/test_gas_profiling.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def foo(a: uint256) -> uint256: view
FOO: immutable(address)
@external
@deploy
def __init__(_foo_address: address):
FOO = _foo_address
Expand Down
2 changes: 1 addition & 1 deletion tests/unitary/test_isolation.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ def boa_contract():
a: public(uint256)
b: public(address)
@external
@deploy
def __init__(a_input: uint256, b_input: address):
self.a = a_input
Expand Down

0 comments on commit 725d4bd

Please sign in to comment.