Skip to content

Commit

Permalink
fix: set WETH_ADDRESS to immutable
Browse files Browse the repository at this point in the history
  • Loading branch information
skellet0r committed Dec 7, 2022
1 parent 146e1f1 commit 27d753a
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions contracts/Swaps.vy
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ event ExchangeMultiple:
amount_bought: uint256

ETH_ADDRESS: constant(address) = 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE
WETH_ADDRESS: constant(address) = 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2
WETH_ADDRESS: immutable(address)
MAX_COINS: constant(uint256) = 8
CALC_INPUT_SIZE: constant(uint256) = 100
EMPTY_POOL_LIST: constant(address[8]) = [
Expand Down Expand Up @@ -152,7 +152,7 @@ base_coins: HashMap[address, address[2]]


@external
def __init__(_address_provider: address, _calculator: address):
def __init__(_address_provider: address, _calculator: address, _weth: address):
"""
@notice Constructor function
"""
Expand All @@ -162,6 +162,8 @@ def __init__(_address_provider: address, _calculator: address):
self.crypto_registry = AddressProvider(_address_provider).get_address(5)
self.default_calculator = _calculator

WETH_ADDRESS = _weth


@external
@payable
Expand Down

0 comments on commit 27d753a

Please sign in to comment.