-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
rETH onboarding #506
rETH onboarding #506
Conversation
Current warnings while compiling the contract with dapp tools# make
DAPP_LIBRARIES=' lib/dss-exec-lib/src/DssExecLib.sol:DssExecLib:0x8De6DDbCd5053d32292AAA0D2105A32d108484a6' \
DAPP_BUILD_OPTIMIZE=0 DAPP_BUILD_OPTIMIZE_RUNS=200 \
dapp --use solc:0.6.12 build
warning: dumping very large path (> 256 MiB); this may run out of memory
+ dapp clean
+ rm -rf out
+ solc --overwrite ds-math/=lib/ds-math/src/ ds-math=lib/ds-math/src/index.sol dss-interfaces/=lib/dss-interfaces/src/ dss-interfaces=lib/dss-interfaces/src/index.sol ds-test/=lib/ds-test/src/ ds-test=lib/ds-test/src/index.sol dss-exec-lib/=lib/dss-exec-lib/src/ dss-exec-lib=lib/dss-exec-lib/src/index.sol dss-lerp/=lib/dss-exec-lib/lib/dss-lerp/src/ dss-lerp=lib/dss-exec-lib/lib/dss-lerp/src/index.sol median/=lib/dss-exec-lib/lib/median/src/ median=lib/dss-exec-lib/lib/median/src/index.sol osm-mom/=lib/dss-exec-lib/lib/osm-mom/src/ osm-mom=lib/dss-exec-lib/lib/osm-mom/src/index.sol dss-auto-line/=lib/dss-exec-lib/lib/dss-auto-line/src/ dss-auto-line=lib/dss-exec-lib/lib/dss-auto-line/src/index.sol dss-direct-deposit/=lib/dss-exec-lib/lib/dss-direct-deposit/src/ dss-direct-deposit=lib/dss-exec-lib/lib/dss-direct-deposit/src/index.sol mkr-authority/=lib/dss-exec-lib/lib/mkr-authority/src/ mkr-authority=lib/dss-exec-lib/lib/mkr-authority/src/index.sol dss-chain-log/=lib/dss-exec-lib/lib/dss-chain-log/src/ dss-chain-log=lib/dss-exec-lib/lib/dss-chain-log/src/index.sol ds-proxy/=lib/dss-exec-lib/lib/ds-proxy/src/ ds-proxy=lib/dss-exec-lib/lib/ds-proxy/src/index.sol dss/=lib/dss-exec-lib/lib/dss/src/ dss=lib/dss-exec-lib/lib/dss/src/index.sol ilk-registry/=lib/dss-exec-lib/lib/ilk-registry/src/ ilk-registry=lib/dss-exec-lib/lib/ilk-registry/src/index.sol flipper-mom/=lib/dss-exec-lib/lib/flipper-mom/src/ flipper-mom=lib/dss-exec-lib/lib/flipper-mom/src/index.sol clipper-mom/=lib/dss-exec-lib/lib/clipper-mom/src/ clipper-mom=lib/dss-exec-lib/lib/clipper-mom/src/index.sol univ2-lp-oracle/=lib/dss-exec-lib/lib/univ2-lp-oracle/src/ univ2-lp-oracle=lib/dss-exec-lib/lib/univ2-lp-oracle/src/index.sol ds-token/=lib/dss-exec-lib/lib/dss/lib/ds-token/src/ ds-token=lib/dss-exec-lib/lib/dss/lib/ds-token/src/index.sol ds-value/=lib/dss-exec-lib/lib/dss/lib/ds-value/src/ ds-value=lib/dss-exec-lib/lib/dss/lib/ds-value/src/index.sol ds-note/=lib/dss-exec-lib/lib/ds-proxy/lib/ds-note/src/ ds-note=lib/dss-exec-lib/lib/ds-proxy/lib/ds-note/src/index.sol ds-auth/=lib/dss-exec-lib/lib/ds-proxy/lib/ds-auth/src/ ds-auth=lib/dss-exec-lib/lib/ds-proxy/lib/ds-auth/src/index.sol osm/=lib/dss-exec-lib/lib/osm-mom/lib/osm/src/ osm=lib/dss-exec-lib/lib/osm-mom/lib/osm/src/index.sol ds-thing/=lib/dss-exec-lib/lib/dss/lib/ds-value/lib/ds-thing/src/ ds-thing=lib/dss-exec-lib/lib/dss/lib/ds-value/lib/ds-thing/src/index.sol ds-stop/=lib/dss-exec-lib/lib/osm-mom/lib/osm/lib/ds-stop/src/ ds-stop=lib/dss-exec-lib/lib/osm-mom/lib/osm/lib/ds-stop/src/index.sol --combined-json=abi,bin,bin-runtime,srcmap,srcmap-runtime,ast,metadata,storage-layout /=/ src/test/config.sol src/test/addresses_wallets.sol src/test/addresses_deployers.sol src/test/rates.sol src/test/starknet.t.sol src/test/addresses_mainnet.sol src/DssSpell.t.base.sol src/DssSpell.sol src/DssSpellCollateral.sol src/DssSpell.t.sol
Warning: SPDX license identifier not provided in source file. Before publishing, consider adding a comment containing "SPDX-License-Identifier: <SPDX-License>" to each source file. Use "SPDX-License-Identifier: UNLICENSED" for non-open-source code. Please see https://spdx.org for more information.
--> lib/ds-math/src/math.sol
Warning: SPDX license identifier not provided in source file. Before publishing, consider adding a comment containing "SPDX-License-Identifier: <SPDX-License>" to each source file. Use "SPDX-License-Identifier: UNLICENSED" for non-open-source code. Please see https://spdx.org for more information.
--> lib/dss-exec-lib/src/CollateralOpts.sol
Warning: Variable is shadowed in inline assembly by an instruction of the same name
--> lib/ds-math/src/math.sol:19:5:
|
19 | function add(uint x, uint y) internal pure returns (uint z) {
| ^ (Relevant source part starts here and spans across multiple lines).
Warning: Variable is shadowed in inline assembly by an instruction of the same name
--> lib/ds-math/src/math.sol:25:5:
|
25 | function mul(uint x, uint y) internal pure returns (uint z) {
| ^ (Relevant source part starts here and spans across multiple lines).
Warning: Variable is shadowed in inline assembly by an instruction of the same name
--> lib/ds-math/src/math.sol:22:5:
|
22 | function sub(uint x, uint y) internal pure returns (uint z) {
| ^ (Relevant source part starts here and spans across multiple lines).
Warning: Variable is shadowed in inline assembly by an instruction of the same name
--> lib/ds-math/src/math.sol:19:5:
|
19 | function add(uint x, uint y) internal pure returns (uint z) {
| ^ (Relevant source part starts here and spans across multiple lines).
Warning: Variable is shadowed in inline assembly by an instruction of the same name
--> lib/ds-math/src/math.sol:25:5:
|
25 | function mul(uint x, uint y) internal pure returns (uint z) {
| ^ (Relevant source part starts here and spans across multiple lines).
Warning: Variable is shadowed in inline assembly by an instruction of the same name
--> lib/ds-math/src/math.sol:22:5:
|
22 | function sub(uint x, uint y) internal pure returns (uint z) {
| ^ (Relevant source part starts here and spans across multiple lines).
Warning: Variable is shadowed in inline assembly by an instruction of the same name
--> lib/ds-math/src/math.sol:19:5:
|
19 | function add(uint x, uint y) internal pure returns (uint z) {
| ^ (Relevant source part starts here and spans across multiple lines).
Warning: Variable is shadowed in inline assembly by an instruction of the same name
--> lib/ds-math/src/math.sol:25:5:
|
25 | function mul(uint x, uint y) internal pure returns (uint z) {
| ^ (Relevant source part starts here and spans across multiple lines).
Warning: Variable is shadowed in inline assembly by an instruction of the same name
--> lib/ds-math/src/math.sol:22:5:
|
22 | function sub(uint x, uint y) internal pure returns (uint z) {
| ^ (Relevant source part starts here and spans across multiple lines).
Warning: Variable is shadowed in inline assembly by an instruction of the same name
--> lib/ds-math/src/math.sol:19:5:
|
19 | function add(uint x, uint y) internal pure returns (uint z) {
| ^ (Relevant source part starts here and spans across multiple lines).
Warning: Variable is shadowed in inline assembly by an instruction of the same name
--> lib/ds-math/src/math.sol:25:5:
|
25 | function mul(uint x, uint y) internal pure returns (uint z) {
| ^ (Relevant source part starts here and spans across multiple lines).
Warning: Variable is shadowed in inline assembly by an instruction of the same name
--> lib/ds-math/src/math.sol:22:5:
|
22 | function sub(uint x, uint y) internal pure returns (uint z) {
| ^ (Relevant source part starts here and spans across multiple lines).
Warning: Variable is shadowed in inline assembly by an instruction of the same name
--> lib/ds-math/src/math.sol:19:5:
|
19 | function add(uint x, uint y) internal pure returns (uint z) {
| ^ (Relevant source part starts here and spans across multiple lines).
Warning: Variable is shadowed in inline assembly by an instruction of the same name
--> lib/ds-math/src/math.sol:25:5:
|
25 | function mul(uint x, uint y) internal pure returns (uint z) {
| ^ (Relevant source part starts here and spans across multiple lines).
Warning: Variable is shadowed in inline assembly by an instruction of the same name
--> lib/ds-math/src/math.sol:22:5:
|
22 | function sub(uint x, uint y) internal pure returns (uint z) {
| ^ (Relevant source part starts here and spans across multiple lines).
Warning: Variable is shadowed in inline assembly by an instruction of the same name
--> lib/ds-math/src/math.sol:19:5:
|
19 | function add(uint x, uint y) internal pure returns (uint z) {
| ^ (Relevant source part starts here and spans across multiple lines).
Warning: Variable is shadowed in inline assembly by an instruction of the same name
--> lib/ds-math/src/math.sol:25:5:
|
25 | function mul(uint x, uint y) internal pure returns (uint z) {
| ^ (Relevant source part starts here and spans across multiple lines).
Warning: Variable is shadowed in inline assembly by an instruction of the same name
--> lib/ds-math/src/math.sol:22:5:
|
22 | function sub(uint x, uint y) internal pure returns (uint z) {
| ^ (Relevant source part starts here and spans across multiple lines).
Warning: Function state mutability can be restricted to pure
--> lib/dss-exec-lib/src/DssAction.sol:42:5:
|
42 | function officeHours() public virtual returns (bool) {
| ^ (Relevant source part starts here and spans across multiple lines).
Warning: Contract code size exceeds 24576 bytes (a limit introduced in Spurious Dragon). This contract may not be deployable on mainnet. Consider enabling the optimizer (with a low "runs" value!), turning off revert strings, or using libraries.
--> lib/dss-exec-lib/src/DssExecLib.sol:134:1:
|
134 | library DssExecLib {
| ^ (Relevant source part starts here and spans across multiple lines).
Warning: Contract code size exceeds 24576 bytes (a limit introduced in Spurious Dragon). This contract may not be deployable on mainnet. Consider enabling the optimizer (with a low "runs" value!), turning off revert strings, or using libraries.
--> src/test/config.sol:19:1:
|
19 | contract Config {
| ^ (Relevant source part starts here and spans across multiple lines).
Warning: Contract code size exceeds 24576 bytes (a limit introduced in Spurious Dragon). This contract may not be deployable on mainnet. Consider enabling the optimizer (with a low "runs" value!), turning off revert strings, or using libraries.
--> src/DssSpell.t.base.sol:160:1:
|
160 | contract DssSpellTestBase is Config, DSTest, DSMath {
| ^ (Relevant source part starts here and spans across multiple lines).
Warning: Contract code size exceeds 24576 bytes (a limit introduced in Spurious Dragon). This contract may not be deployable on mainnet. Consider enabling the optimizer (with a low "runs" value!), turning off revert strings, or using libraries.
--> src/DssSpell.t.sol:62:1:
|
62 | contract DssSpellTest is DssSpellTestBase {
| ^ (Relevant source part starts here and spans across multiple lines).
Warning: Contract code size exceeds 24576 bytes (a limit introduced in Spurious Dragon). This contract may not be deployable on mainnet. Consider enabling the optimizer (with a low "runs" value!), turning off revert strings, or using libraries.
--> src/test/starknet.t.sol:77:1:
|
77 | contract StarknetTests is DssSpellTestBase, ConfigStarknet {
| ^ (Relevant source part starts here and spans across multiple lines). Current error while deploying the contract via `dapp create DssSpell`
|
Fix to the above problem:
To upgrade:
|
This comment was marked as outdated.
This comment was marked as outdated.
(CI might fail for a different reason) Functional testing
Should result in
Note: I'm having problems executing authorizations in the frontend. Can you please validate it works for you? In case it is broken: can you please check it works on the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Was able to participate in the
RETH-A
auction via the keeper 🎊 (see logs below) - Could not re-produce the auth problem you reported via the UI (see screenshot below). But instead was able to successfully execute the auction here as well 🎊
- only NIT thing: don't like the button arrangement of execute buttons on top each other
ℹ collateral keeper: auction "RETH-A:1" net profit is 487 DAI after transaction fees, moving on to the execution 14:48:23
ℹ keeper: wallet "0x70997970C51812dc3A010C7d01b50e0d17dc79C8" has not been authorized yet. Attempting authorization now...
ℹ Transaction is preparing to be mined... 14:48:23
ℹ Transaction is pending to be mined... 14:48:23
ℹ Transaction was mined into block "15835187" 14:48:23
ℹ keeper: wallet "0x70997970C51812dc3A010C7d01b50e0d17dc79C8" successfully authorized via "0x4d2899b333d9d1c6aee66a204e79e2d1bdb1b77d8d6a1be944d9a5e875c50f9e" transaction
ℹ collateral keeper: auction "RETH-A:1" net profit is 487 DAI after transaction fees, moving on to the execution 14:48:23
ℹ keeper: wallet "0x70997970C51812dc3A010C7d01b50e0d17dc79C8" has already been authorized 14:48:23
ℹ keeper: collateral "RETH-A" has not been authorized on wallet "0x70997970C51812dc3A010C7d01b50e0d17dc79C8" yet. Attempting authorization now...
ℹ Transaction is preparing to be mined... 14:48:23
ℹ Transaction is pending to be mined... 14:48:23
ℹ Transaction was mined into block "15835188" 14:48:23
ℹ keeper: collateral "RETH-A" successfully authorized on wallet "0x70997970C51812dc3A010C7d01b50e0d17dc79C8" via "0xf19ece6a148f523184516c18cb53c4d4a5d92f33c9c315bf9f52111eef6e43ed" transaction
ℹ collateral keeper: auction "RETH-A:1" net profit is 487 DAI after transaction fees, moving on to the execution 14:48:23
ℹ keeper: wallet "0x70997970C51812dc3A010C7d01b50e0d17dc79C8" has already been authorized 14:48:23
ℹ keeper: collateral "RETH-A" has already been authorized on wallet "0x70997970C51812dc3A010C7d01b50e0d17dc79C8" 14:48:23
ℹ collateral keeper: auction "RETH-A:1": attempting swap execution 14:48:23
ℹ Transaction is preparing to be mined... 14:48:23
ℹ Transaction is pending to be mined... 14:48:31
ℹ Transaction was mined into block "15835189" 14:48:31
ℹ collateral keeper: auction "RETH-A:1" was succesfully executed via "0x7610879ed433b336c8136afe53037ab40af6db6627f8157e1924e2d133300d40" transaction
ℹ collateral auctions: found "0" auctions "" on "custom" network
await govContract['approve(address,uint256)'](chiefContract.address, mkrAmountInteger); | ||
await chiefContract.lock(mkrAmountInteger); | ||
await chiefContract.etch([spellAddress]); | ||
const slate = ethers.utils.keccak256(ethers.utils.hexZeroPad(spellAddress, 32)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should we make it a helper?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You mean the encoding part? I wouldn't know what it does here to come up with a proper name. Since I also don't know when and if it will be useful in the future I will skip this suggestion
console.info(`executing spell "${spellAddress}": voting for the spell...`); | ||
await voteForSpell(spellAddress, maximumVotingPoverMkr.plus(1)); | ||
const spellAbi = ['function schedule() external', 'function cast() external']; | ||
const spellContract = await ethers.getContractAt(spellAbi, spellAddress); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
does it make sense to cache getting of the contract by address and abi? this can be tied together with the existing function that gets the erc20 contract by address
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
to cache
This function is executed once and during the tests/simulations. It makes sense to cache only functions that execute something on the frontend to be mindful of resources, not to introduce unexpected side effects (eg when simulation is rerun in the loop, but it's cached)
Closes #507
Checklist:
#
)