From 725d4bd8496dec4d036191fb1795a253386c9d1f Mon Sep 17 00:00:00 2001 From: Charles Cooper Date: Tue, 13 Feb 2024 15:07:14 -0500 Subject: [PATCH] update unit tests to use new @deploy modifier --- examples/ERC20.vy | 2 +- examples/deployer.vy | 2 +- tests/integration/RewardPool.vy | 2 +- tests/integration/network/anvil/test_network_env.py | 2 +- tests/integration/network/sepolia/test_sepolia_env.py | 2 +- tests/integration/veYFI.vy | 2 +- tests/unitary/test_gas_profiling.py | 2 +- tests/unitary/test_isolation.py | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/examples/ERC20.vy b/examples/ERC20.vy index 7d379785..521406c3 100644 --- a/examples/ERC20.vy +++ b/examples/ERC20.vy @@ -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 diff --git a/examples/deployer.vy b/examples/deployer.vy index fef73f74..6f5ebaae 100644 --- a/examples/deployer.vy +++ b/examples/deployer.vy @@ -2,7 +2,7 @@ from vyper.interfaces import ERC20 BLUEPRINT: immutable(address) -@external +@deploy def __init__(blueprint_address: address): BLUEPRINT = blueprint_address diff --git a/tests/integration/RewardPool.vy b/tests/integration/RewardPool.vy index e9152aa3..e8f054dd 100644 --- a/tests/integration/RewardPool.vy +++ b/tests/integration/RewardPool.vy @@ -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 diff --git a/tests/integration/network/anvil/test_network_env.py b/tests/integration/network/anvil/test_network_env.py index 13ad59d5..1f0acf10 100644 --- a/tests/integration/network/anvil/test_network_env.py +++ b/tests/integration/network/anvil/test_network_env.py @@ -9,7 +9,7 @@ totalSupply: public(uint256) balances: HashMap[address, uint256] -@external +@deploy def __init__(t: uint256): self.totalSupply = t self.balances[self] = t diff --git a/tests/integration/network/sepolia/test_sepolia_env.py b/tests/integration/network/sepolia/test_sepolia_env.py index d287601e..f87be433 100644 --- a/tests/integration/network/sepolia/test_sepolia_env.py +++ b/tests/integration/network/sepolia/test_sepolia_env.py @@ -10,7 +10,7 @@ totalSupply: public(uint256) balances: HashMap[address, uint256] -@external +@deploy def __init__(t: uint256): self.totalSupply = t self.balances[self] = t diff --git a/tests/integration/veYFI.vy b/tests/integration/veYFI.vy index 16d69498..b98b0a86 100644 --- a/tests/integration/veYFI.vy +++ b/tests/integration/veYFI.vy @@ -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 diff --git a/tests/unitary/test_gas_profiling.py b/tests/unitary/test_gas_profiling.py index f834175c..ed562606 100644 --- a/tests/unitary/test_gas_profiling.py +++ b/tests/unitary/test_gas_profiling.py @@ -30,7 +30,7 @@ def foo(a: uint256) -> uint256: view FOO: immutable(address) -@external +@deploy def __init__(_foo_address: address): FOO = _foo_address diff --git a/tests/unitary/test_isolation.py b/tests/unitary/test_isolation.py index 164acaa8..d846868b 100644 --- a/tests/unitary/test_isolation.py +++ b/tests/unitary/test_isolation.py @@ -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