-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update to overlay-market/[email protected] (#30)
* Update to overlay-market/[email protected] * Update pm("overlay-market/[email protected]") and gh actions * Fix compile issues * Fix tests/state/conftest.py * Fix test estimates for state * Fix test position for state * Fix tol in position tests for state * Fix fee disperser conftest for v1-core upgrade
- Loading branch information
Showing
9 changed files
with
195 additions
and
128 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -58,10 +58,10 @@ jobs: | |
|
||
- name: Create env file for Brownie pm | ||
run: | | ||
touch ~/.brownie/packages/overlay-market/[email protected].2/.env | ||
echo WEB3_INFURA_PROJECT_ID=${{ secrets.WEB3_INFURA_PROJECT_ID }} >> ~/.brownie/packages/overlay-market/[email protected].2/.env | ||
echo ETHERSCAN_TOKEN=${{ secrets.ETHERSCAN_TOKEN }} >> ~/.brownie/packages/overlay-market/[email protected].2/.env | ||
cat ~/.brownie/packages/overlay-market/[email protected].2/.env | ||
touch ~/.brownie/packages/overlay-market/[email protected].4/.env | ||
echo WEB3_INFURA_PROJECT_ID=${{ secrets.WEB3_INFURA_PROJECT_ID }} >> ~/.brownie/packages/overlay-market/[email protected].4/.env | ||
echo ETHERSCAN_TOKEN=${{ secrets.ETHERSCAN_TOKEN }} >> ~/.brownie/packages/overlay-market/[email protected].4/.env | ||
cat ~/.brownie/packages/overlay-market/[email protected].4/.env | ||
- name: Run Tests | ||
run: brownie test -vv -s --gas |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,7 +11,7 @@ dotenv: .env | |
# require OpenZepplin, Uniswap Contracts | ||
dependencies: | ||
- OpenZeppelin/[email protected] | ||
- overlay-market/[email protected].2 | ||
- overlay-market/[email protected].4 | ||
- Uniswap/[email protected] | ||
- Uniswap/[email protected] | ||
|
||
|
@@ -23,6 +23,6 @@ compiler: | |
runs: 800 | ||
remappings: | ||
- "@openzeppelin=OpenZeppelin/[email protected]" | ||
- "@overlay/v1-core=overlay-market/[email protected].2" | ||
- "@overlay/v1-core=overlay-market/[email protected].4" | ||
- "@uniswap/v3-core=Uniswap/[email protected]" | ||
- "@uniswap/v3-periphery=Uniswap/[email protected]" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,7 @@ | |
|
||
@pytest.fixture(scope="module") | ||
def ovl_v1_core(pm): | ||
return pm("overlay-market/[email protected].2") | ||
return pm("overlay-market/[email protected].4") | ||
|
||
|
||
@pytest.fixture(scope="module") | ||
|
@@ -43,14 +43,22 @@ def governor_role(): | |
|
||
|
||
@pytest.fixture(scope="module", params=[8000000]) | ||
def create_token(ovl_v1_core, gov, alice, bob, governor_role, request): | ||
def create_token(ovl_v1_core, gov, alice, bob, minter_role, governor_role, | ||
request): | ||
sup = request.param | ||
|
||
def create_token(supply=sup): | ||
ovl = ovl_v1_core.OverlayV1Token | ||
tok = gov.deploy(ovl) | ||
|
||
# grant governor role | ||
tok.grantRole(governor_role, gov, {"from": gov}) | ||
|
||
# mint the token then renounce minter role | ||
tok.grantRole(minter_role, gov, {"from": gov}) | ||
tok.mint(gov, supply * 10 ** tok.decimals(), {"from": gov}) | ||
tok.renounceRole(minter_role, gov, {"from": gov}) | ||
|
||
tok.transfer(alice, (supply/2) * 10 ** tok.decimals(), {"from": gov}) | ||
tok.transfer(bob, (supply/2) * 10 ** tok.decimals(), {"from": gov}) | ||
return tok | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,7 @@ | |
|
||
@pytest.fixture(scope="module") | ||
def ovl_v1_core(pm): | ||
return pm("overlay-market/[email protected].2") | ||
return pm("overlay-market/[email protected].4") | ||
|
||
|
||
@pytest.fixture(scope="module") | ||
|
@@ -32,21 +32,6 @@ def fee_recipient(accounts): | |
yield accounts[4] | ||
|
||
|
||
@pytest.fixture(scope="module", params=[8000000]) | ||
def create_token(ovl_v1_core, gov, alice, bob, request): | ||
sup = request.param | ||
|
||
def create_token(supply=sup): | ||
ovl = ovl_v1_core.OverlayV1Token | ||
tok = gov.deploy(ovl) | ||
tok.mint(gov, supply * 10 ** tok.decimals(), {"from": gov}) | ||
tok.transfer(alice, (supply/2) * 10 ** tok.decimals(), {"from": gov}) | ||
tok.transfer(bob, (supply/2) * 10 ** tok.decimals(), {"from": gov}) | ||
return tok | ||
|
||
yield create_token | ||
|
||
|
||
@pytest.fixture(scope="module") | ||
def minter_role(): | ||
yield web3.solidityKeccak(['string'], ["MINTER"]) | ||
|
@@ -62,6 +47,26 @@ def governor_role(): | |
yield web3.solidityKeccak(['string'], ["GOVERNOR"]) | ||
|
||
|
||
@pytest.fixture(scope="module", params=[8000000]) | ||
def create_token(ovl_v1_core, gov, alice, bob, minter_role, request): | ||
sup = request.param | ||
|
||
def create_token(supply=sup): | ||
ovl = ovl_v1_core.OverlayV1Token | ||
tok = gov.deploy(ovl) | ||
|
||
# mint the token then renounce minter role | ||
tok.grantRole(minter_role, gov, {"from": gov}) | ||
tok.mint(gov, supply * 10 ** tok.decimals(), {"from": gov}) | ||
tok.renounceRole(minter_role, gov, {"from": gov}) | ||
|
||
tok.transfer(alice, (supply/2) * 10 ** tok.decimals(), {"from": gov}) | ||
tok.transfer(bob, (supply/2) * 10 ** tok.decimals(), {"from": gov}) | ||
return tok | ||
|
||
yield create_token | ||
|
||
|
||
@pytest.fixture(scope="module") | ||
def ovl(create_token): | ||
yield create_token() | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.