Skip to content
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

Merged
merged 21 commits into from
Oct 21, 2022
Merged

rETH onboarding #506

merged 21 commits into from
Oct 21, 2022

Conversation

valiafetisov
Copy link
Contributor

@valiafetisov valiafetisov commented Oct 19, 2022

Closes #507

Checklist:

  • issue number linked above after pound (#)
    • replace "Closes " with "Contributes to" or other if this PR does not close the issue
  • issue checkboxes are all addressed
  • manually checked my feature / not applicable
  • wrote tests / not applicable
  • attached screenshots / not applicable

@valiafetisov
Copy link
Contributor Author

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`
seth---to-hexdata: error: invalid hexdata: `6101006040523480156200001257600080fd5b5062278d004201604051620000279062000212565b604051809103906000f08015801562000044573d6000803e3d6000fd5b5073da0ab1e0017debcd72be8599041a2aa3ba7e740f73ffffffffffffffffffffffffffffffffffffffff166321f8a7216040518163ffffffff1660e01b815260040162000092906200032f565b60206040518083038186803b158015620000ab57600080fd5b505afa158015620000c0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620000e69190620002dd565b73ffffffffffffffffffffffffffffffffffffffff1660e08173ffffffffffffffffffffffffffffffffffffffff1660601b815250508160c081815250508073ffffffffffffffffffffffffffffffffffffffff1660a08173ffffffffffffffffffffffffffffffffffffffff1660601b815250506040516024016040516020818303038152906040527f61461954000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff838183161783525050505060019080519060200190620001f592919062000220565b50600080829050803f915081608081815250505050505062000398565b6111a780620014b383390190565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106200026357805160ff191683800117855562000294565b8280016001018555821562000294579182015b828111156200029357825182559160200191906001019062000276565b5b509050620002a39190620002a7565b5090565b5b80821115620002c2576000816000905550600101620002a8565b5090565b600081519050620002d7816200037e565b92915050565b600060208284031215620002f057600080fd5b60006200030084828501620002c6565b91505092915050565b7f4d43445f50415553450000000000000000000000000000000000000000000000815250565b6000602082019050620003456000830162000309565b919050565b600062000357826200035e565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b62000389816200034a565b81146200039557600080fd5b50565b60805160a05160601c60c05160e05160601c6110a86200040b600039806104a4528061053352806106e9528061078f5250806102f552806106425250806102d1528061035752806103fc528061056f52806107cb528061086d525080610331528061059052806107ec52506110a86000f3fe608060405234801561001057600080fd5b50600436106100ce5760003560e01c80637284e4161161008c578063ae8421e111610066578063ae8421e1146101cd578063b0604a26146101eb578063f7992d85146101f5578063fe7d47bb14610213576100ce565b80637284e416146101875780638456cb59146101a557806396d373e5146101c3576100ce565b8062a7029b146100d35780630a7a1c4d146100f15780634665096d1461010f57806351973ec91461012d57806351f910661461014b5780636e832f0714610169575b600080fd5b6100db610231565b6040516100e89190610d9f565b60405180910390f35b6100f96102cf565b6040516101069190610d02565b60405180910390f35b6101176102f3565b6040516101249190610e79565b60405180910390f35b610135610317565b6040516101429190610dc1565b60405180910390f35b61015361032f565b6040516101609190610d84565b60405180910390f35b610171610353565b60405161017e9190610d69565b60405180910390f35b61018f6103f8565b60405161019c9190610df7565b60405180910390f35b6101ad6104a2565b6040516101ba9190610ddc565b60405180910390f35b6101cb6104c6565b005b6101d561062d565b6040516101e29190610d69565b60405180910390f35b6101f3610640565b005b6101fd610863565b60405161020a9190610e79565b60405180910390f35b61021b610869565b6040516102289190610e79565b60405180910390f35b60018054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156102c75780601f1061029c576101008083540402835291602001916102c7565b820191906000526020600020905b8154815290600101906020018083116102aa57829003601f168201915b505050505081565b7f000000000000000000000000000000000000000000000000000000000000000081565b7f000000000000000000000000000000000000000000000000000000000000000081565b73da0ab1e0017debcd72be8599041a2aa3ba7e740f81565b7f000000000000000000000000000000000000000000000000000000000000000081565b60007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16636e832f076040518163ffffffff1660e01b815260040160206040518083038186803b1580156103bb57600080fd5b505afa1580156103cf573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103f391906109ed565b905090565b60607f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16637284e4166040518163ffffffff1660e01b815260040160006040518083038186803b15801561046057600080fd5b505afa158015610474573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f8201168201806040525081019061049d9190610a57565b905090565b7f000000000000000000000000000000000000000000000000000000000000000081565b600260009054906101000a900460ff1615610516576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161050d90610e19565b60405180910390fd5b6001600260006101000a81548160ff0219169083151502179055507f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663168ccd677f00000000000000000000000000000000000000000000000000000000000000007f000000000000000000000000000000000000000000000000000000000000000060016000546040518563ffffffff1660e01b81526004016105d39493929190610d1d565b600060405180830381600087803b1580156105ed57600080fd5b505af1158015610601573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f8201168201806040525081019061062a9190610a16565b50565b600260009054906101000a900460ff1681565b7f00000000000000000000000000000000000000000000000000000000000000004211156106a3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161069a90610e59565b60405180910390fd5b60008054146106e7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106de90610e39565b60405180910390fd5b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16636a42b8f86040518163ffffffff1660e01b815260040160206040518083038186803b15801561074d57600080fd5b505afa158015610761573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107859190610a98565b42016000819055507f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166346d2fbbb7f00000000000000000000000000000000000000000000000000000000000000007f000000000000000000000000000000000000000000000000000000000000000060016000546040518563ffffffff1660e01b815260040161082f9493929190610d1d565b600060405180830381600087803b15801561084957600080fd5b505af115801561085d573d6000803e3d6000fd5b50505050565b60005481565b60007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663bf0fbcec6000546040518263ffffffff1660e01b81526004016108c69190610e79565b60206040518083038186803b1580156108de57600080fd5b505afa1580156108f2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109169190610a98565b905090565b60008151905061092a81611044565b92915050565b600082601f83011261094157600080fd5b815161095461094f82610ec1565b610e94565b9150808252602083016020830185838301111561097057600080fd5b61097b838284611000565b50505092915050565b600082601f83011261099557600080fd5b81516109a86109a382610eed565b610e94565b915080825260208301602083018583830111156109c457600080fd5b6109cf838284611000565b50505092915050565b6000815190506109e78161105b565b92915050565b6000602082840312156109ff57600080fd5b6000610a0d8482850161091b565b91505092915050565b600060208284031215610a2857600080fd5b600082015167ffffffffffffffff811115610a4257600080fd5b610a4e84828501610930565b91505092915050565b600060208284031215610a6957600080fd5b600082015167ffffffffffffffff811115610a8357600080fd5b610a8f84828501610984565b91505092915050565b600060208284031215610aaa57600080fd5b6000610ab8848285016109d8565b91505092915050565b610aca81610f66565b82525050565b610ad981610f78565b82525050565b610ae881610f84565b82525050565b6000610af982610f2e565b610b038185610f44565b9350610b13818560208601611000565b610b1c81611033565b840191505092915050565b600081546001811660008114610b445760018114610b6a57610bae565b607f6002830416610b558187610f44565b955060ff198316865260208601935050610bae565b60028204610b788187610f44565b9550610b8385610f19565b60005b82811015610ba557815481890152600182019150602081019050610b86565b80880195505050505b505092915050565b610bbf81610fb8565b82525050565b610bce81610fdc565b82525050565b6000610bdf82610f39565b610be98185610f55565b9350610bf9818560208601611000565b610c0281611033565b840191505092915050565b6000610c1a601283610f55565b91507f7370656c6c2d616c72656164792d6361737400000000000000000000000000006000830152602082019050919050565b6000610c5a602583610f55565b91507f54686973207370656c6c2068617320616c7265616479206265656e207363686560008301527f64756c65640000000000000000000000000000000000000000000000000000006020830152604082019050919050565b6000610cc0601983610f55565b91507f5468697320636f6e7472616374206861732065787069726564000000000000006000830152602082019050919050565b610cfc81610fae565b82525050565b6000602082019050610d176000830184610ac1565b92915050565b6000608082019050610d326000830187610ac1565b610d3f6020830186610adf565b8181036040830152610d518185610b27565b9050610d606060830184610cf3565b95945050505050565b6000602082019050610d7e6000830184610ad0565b92915050565b6000602082019050610d996000830184610adf565b92915050565b60006020820190508181036000830152610db98184610aee565b905092915050565b6000602082019050610dd66000830184610bb6565b92915050565b6000602082019050610df16000830184610bc5565b92915050565b60006020820190508181036000830152610e118184610bd4565b905092915050565b60006020820190508181036000830152610e3281610c0d565b9050919050565b60006020820190508181036000830152610e5281610c4d565b9050919050565b60006020820190508181036000830152610e7281610cb3565b9050919050565b6000602082019050610e8e6000830184610cf3565b92915050565b6000604051905081810181811067ffffffffffffffff82111715610eb757600080fd5b8060405250919050565b600067ffffffffffffffff821115610ed857600080fd5b601f19601f8301169050602081019050919050565b600067ffffffffffffffff821115610f0457600080fd5b601f19601f8301169050602081019050919050565b60008190508160005260206000209050919050565b600081519050919050565b600081519050919050565b600082825260208201905092915050565b600082825260208201905092915050565b6000610f7182610f8e565b9050919050565b60008115159050919050565b6000819050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b6000610fc382610fca565b9050919050565b6000610fd582610f8e565b9050919050565b6000610fe782610fee565b9050919050565b6000610ff982610f8e565b9050919050565b60005b8381101561101e578082015181840152602081019050611003565b8381111561102d576000848401525b50505050565b6000601f19601f8301169050919050565b61104d81610f78565b811461105857600080fd5b50565b61106481610fae565b811461106f57600080fd5b5056fea2646970667358221220d5136b0be1d633bd6cc043ea39ff3b61121d942c9e1b5a65418d25de5f645a1864736f6c634300060c0033608060405234801561001057600080fd5b50611187806100206000396000f3fe608060405234801561001057600080fd5b50600436106100575760003560e01c8063614619541461005c5780636e832f07146100665780637284e41614610084578063bf0fbcec146100a2578063f99e36bc146100d2575b600080fd5b6100646100dc565b005b61006e6101b5565b60405161007b9190610d91565b60405180910390f35b61008c6101ba565b6040516100999190610dac565b60405180910390f35b6100bc60048036038101906100b791906108f5565b6101d6565b6040516100c99190610f30565b60405180910390f35b6100da6102a5565b005b73__$ebccc112fbca0b16f556c6c257a2b31f91$__6335329d4c426100ff6101b5565b6040518363ffffffff1660e01b815260040161011c929190610f4b565b60206040518083038186803b15801561013457600080fd5b505af4158015610148573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061016c91906108cc565b6101ab576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101a290610e7f565b60405180910390fd5b6101b36102a5565b565b600090565b6040518060a00160405280606e81526020016110e4606e913981565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff64ffffffffff1682111561020c57600080fd5b73__$ebccc112fbca0b16f556c6c257a2b31f91$__63d255745683426102306101b5565b6040518463ffffffff1660e01b815260040161024e93929190610f74565b60206040518083038186803b15801561026657600080fd5b505af415801561027a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061029e919061091e565b9050919050565b6102ad610314565b73__$ebccc112fbca0b16f556c6c257a2b31f91$__635f3a7dd76040518163ffffffff1660e01b81526004016102e290610e1c565b60006040518083038186803b1580156102fa57600080fd5b505af415801561030e573d6000803e3d6000fd5b50505050565b73__$ebccc112fbca0b16f556c6c257a2b31f91$__637571a78e604051806102a001604052807f524554482d410000000000000000000000000000000000000000000000000000815260200173ae78736cd615f374d3085123a210448e74fc639373ffffffffffffffffffffffffffffffffffffffff16815260200173c6424e862f1462281b0a5fac078e4b63006bdebf73ffffffffffffffffffffffffffffffffffffffff1681526020017327ca5e525ea473ed52ea9423cd08ccc081d96a9873ffffffffffffffffffffffffffffffffffffffff16815260200173c59b62afc96cf9737f717b5e5815070c0f15439673ffffffffffffffffffffffffffffffffffffffff16815260200173ee7f0b350aa119b3d05dc733a4621a81972f7d4773ffffffffffffffffffffffffffffffffffffffff168152602001600115158152602001600115158152602001600115158152602001620f424060050281526020016103e8600f028152602001620f4240600202815260200161051481526020016b033b2e3ca65dca26e20d5eda8152602001612af881526020016113888152602001611c2081526020016111948152602001614268815260200160fa81526020016103e88152506040518263ffffffff1660e01b81526004016104f99190610f14565b60006040518083038186803b15801561051157600080fd5b505af4158015610525573d6000803e3d6000fd5b5050505073__$ebccc112fbca0b16f556c6c257a2b31f91$__63d0bab93373c59b62afc96cf9737f717b5e5815070c0f154396605a6126ac6040518463ffffffff1660e01b815260040161057b93929190610d5a565b60006040518083038186803b15801561059357600080fd5b505af41580156105a7573d6000803e3d6000fd5b5050505073__$ebccc112fbca0b16f556c6c257a2b31f91$__63b085f237620f4240600502620f42406003026170806040518463ffffffff1660e01b81526004016105f493929190610e3c565b60006040518083038186803b15801561060c57600080fd5b505af4158015610620573d6000803e3d6000fd5b5050505073__$ebccc112fbca0b16f556c6c257a2b31f91$__6319d900a173ae78736cd615f374d3085123a210448e74fc63936040518263ffffffff1660e01b815260040161066f9190610e9f565b60006040518083038186803b15801561068757600080fd5b505af415801561069b573d6000803e3d6000fd5b5050505073__$ebccc112fbca0b16f556c6c257a2b31f91$__6319d900a173ee7f0b350aa119b3d05dc733a4621a81972f7d476040518263ffffffff1660e01b81526004016106ea9190610df5565b60006040518083038186803b15801561070257600080fd5b505af4158015610716573d6000803e3d6000fd5b5050505073__$ebccc112fbca0b16f556c6c257a2b31f91$__6319d900a173c6424e862f1462281b0a5fac078e4b63006bdebf6040518263ffffffff1660e01b81526004016107659190610dce565b60006040518083038186803b15801561077d57600080fd5b505af4158015610791573d6000803e3d6000fd5b5050505073__$ebccc112fbca0b16f556c6c257a2b31f91$__6319d900a17327ca5e525ea473ed52ea9423cd08ccc081d96a986040518263ffffffff1660e01b81526004016107e09190610ec6565b60006040518083038186803b1580156107f857600080fd5b505af415801561080c573d6000803e3d6000fd5b5050505073__$ebccc112fbca0b16f556c6c257a2b31f91$__6319d900a173c59b62afc96cf9737f717b5e5815070c0f1543966040518263ffffffff1660e01b815260040161085b9190610eed565b60006040518083038186803b15801561087357600080fd5b505af4158015610887573d6000803e3d6000fd5b50505050565b60008151905061089c816110b5565b92915050565b6000813590506108b1816110cc565b92915050565b6000815190506108c6816110cc565b92915050565b6000602082840312156108de57600080fd5b60006108ec8482850161088d565b91505092915050565b60006020828403121561090757600080fd5b6000610915848285016108a2565b91505092915050565b60006020828403121561093057600080fd5b600061093e848285016108b7565b91505092915050565b61095081610fd8565b82525050565b61095f81610fd8565b82525050565b61096e81610fea565b82525050565b61097d81610fea565b82525050565b61098c81610fea565b82525050565b61099b81610ff6565b82525050565b6109aa8161103b565b82525050565b6109b98161104d565b82525050565b6109c88161105f565b82525050565b60006109d982610fab565b6109e38185610fb6565b93506109f3818560208601611071565b6109fc816110a4565b840191505092915050565b7f4d43445f4a4f494e5f524554485f410000000000000000000000000000000000815250565b7f5049505f52455448000000000000000000000000000000000000000000000000815250565b6000610a60600683610fc7565b91507f312e31342e3400000000000000000000000000000000000000000000000000006000830152602082019050919050565b7f524554482d410000000000000000000000000000000000000000000000000000815250565b6000610ac6601483610fb6565b91507f4f757473696465206f666669636520686f7572730000000000000000000000006000830152602082019050919050565b7f5245544800000000000000000000000000000000000000000000000000000000815250565b7f4d43445f434c49505f524554485f410000000000000000000000000000000000815250565b7f4d43445f434c49505f43414c435f524554485f41000000000000000000000000815250565b6102a082016000820151610b826000850182610992565b506020820151610b956020850182610956565b506040820151610ba86040850182610956565b506060820151610bbb6060850182610956565b506080820151610bce6080850182610956565b5060a0820151610be160a0850182610956565b5060c0820151610bf460c0850182610983565b5060e0820151610c0760e0850182610983565b50610100820151610c1c610100850182610983565b50610120820151610c31610120850182610d3c565b50610140820151610c46610140850182610d3c565b50610160820151610c5b610160850182610d3c565b50610180820151610c70610180850182610d3c565b506101a0820151610c856101a0850182610d3c565b506101c0820151610c9a6101c0850182610d3c565b506101e0820151610caf6101e0850182610d3c565b50610200820151610cc4610200850182610d3c565b50610220820151610cd9610220850182610d3c565b50610240820151610cee610240850182610d3c565b50610260820151610d03610260850182610d3c565b50610280820151610d18610280850182610d3c565b50505050565b610d2781611020565b82525050565b610d3681611020565b82525050565b610d4581611020565b82525050565b610d548161102a565b82525050565b6000606082019050610d6f6000830186610947565b610d7c60208301856109b0565b610d8960408301846109bf565b949350505050565b6000602082019050610da66000830184610965565b92915050565b60006020820190508181036000830152610dc681846109ce565b905092915050565b6000604082019050610de260008301610a07565b610def6020830184610947565b92915050565b6000604082019050610e0960008301610a2d565b610e166020830184610947565b92915050565b60006020820190508181036000830152610e3581610a53565b9050919050565b6000608082019050610e5060008301610a93565b610e5d6020830186610d2d565b610e6a6040830185610d2d565b610e7760608301846109a1565b949350505050565b60006020820190508181036000830152610e9881610ab9565b9050919050565b6000604082019050610eb360008301610af9565b610ec06020830184610947565b92915050565b6000604082019050610eda60008301610b1f565b610ee76020830184610947565b92915050565b6000604082019050610f0160008301610b45565b610f0e6020830184610947565b92915050565b60006102a082019050610f2a6000830184610b6b565b92915050565b6000602082019050610f456000830184610d1e565b92915050565b6000604082019050610f606000830185610d4b565b610f6d6020830184610974565b9392505050565b6000606082019050610f896000830186610d4b565b610f966020830185610d4b565b610fa36040830184610974565b949350505050565b600081519050919050565b600082825260208201905092915050565b600082825260208201905092915050565b6000610fe382611000565b9050919050565b60008115159050919050565b6000819050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600064ffffffffff82169050919050565b600061104682611020565b9050919050565b600061105882611020565b9050919050565b600061106a82611020565b9050919050565b60005b8381101561108f578082015181840152602081019050611074565b8381111561109e576000848401525b50505050565b6000601f19601f8301169050919050565b6110be81610fea565b81146110c957600080fd5b50565b6110d581611020565b81146110e057600080fd5b5056fe323032322d31302d3132204d616b657244414f20457865637574697665205370656c6c207c20486173683a20307830623064303036356462613331663931663635353261383730323239353964633830326530643930323430323939386366343731376262646434323437316162a26469706673582212209551e4e712f84dbfd525fa5c53a06cb99b541d537d550b64c374d71e8f05b04a64736f6c634300060c0033'

@valiafetisov
Copy link
Contributor Author

Fix to the above problem:
Required dapp --version:

dapp 0.35.0
solc, the solidity compiler commandline interface
Version: 0.8.6+commit.11564f7e.Darwin.appleclang
hevm 0.49.1

To upgrade:

curl https://rari-capital.github.io/duppgrade/install | bash
duppgrade

@valiafetisov

This comment was marked as outdated.

@valiafetisov
Copy link
Contributor Author

valiafetisov commented Oct 21, 2022

(CI might fail for a different reason)

Functional testing

  1. Start simulations via npm run simulate
  2. Choose Onboard new collateral
  3. Click through all steps till Skip time
  4. Start bot

Should result in

ℹ collateral keeper: auction "RETH-A:1" net profit is 487 DAI after transaction fees, moving on to the execution                                                                                  14:22:42
ℹ keeper: wallet "0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266" has not been authorized yet. Attempting authorization now...                                                                        14:22:42
ℹ Transaction is preparing to be mined...                                                                                                                                                         14:22:42
ℹ Transaction is pending to be mined...                                                                                                                                                           14:22:43
ℹ Transaction was mined into block "15835187"                                                                                                                                                     14:22:43
ℹ keeper: wallet "0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266" successfully authorized via "0x788da0419ddf810343acfb4f2e1ff61385e84cd1f116d34ef053252deb695790" transaction                        14:22:43
ℹ collateral keeper: auction "RETH-A:1" net profit is 487 DAI after transaction fees, moving on to the execution                                                                                  14:22:43
ℹ keeper: wallet "0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266" has already been authorized                                                                                                         14:22:43
ℹ keeper: collateral "RETH-A" has not been authorized on wallet "0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266" yet. Attempting authorization now...                                                 14:22:43
ℹ Transaction is preparing to be mined...                                                                                                                                                         14:22:43
ℹ Transaction is pending to be mined...                                                                                                                                                           14:22:43
ℹ Transaction was mined into block "15835188"                                                                                                                                                     14:22:43
ℹ keeper: collateral "RETH-A" successfully authorized on wallet "0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266" via "0xb65846ed97b5051e47b67290d66696f27b8064dad79b6214e9f0c2f91c939dda" transaction 14:22:43
ℹ collateral keeper: auction "RETH-A:1" net profit is 487 DAI after transaction fees, moving on to the execution                                                                                  14:22:44
ℹ keeper: wallet "0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266" has already been authorized                                                                                                         14:22:44
ℹ keeper: collateral "RETH-A" has already been authorized on wallet "0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266"                                                                                  14:22:44
ℹ collateral keeper: auction "RETH-A:1": attempting swap execution                                                                                                                                14:22:44
ℹ Transaction is preparing to be mined...                                                                                                                                                         14:22:44
ℹ Transaction is pending to be mined...                                                                                                                                                           14:22:48
ℹ Transaction was mined into block "15835189"                                                                                                                                                     14:22:48
ℹ collateral keeper: auction "RETH-A:1" was succesfully executed via "0x3e57523f44aeec00e42d30cb1eb2adba21ab679db6232e0c2219f72bcc590966" transaction                                             14:22:48

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 main branch?

LukSteib
LukSteib previously approved these changes Oct 21, 2022
Copy link
Contributor

@LukSteib LukSteib left a 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                                  

image

@valiafetisov valiafetisov marked this pull request as ready for review October 21, 2022 15:25
core/simulations/docker/Dockerfile Outdated Show resolved Hide resolved
core/simulations/helpers/executeSpell.ts Outdated Show resolved Hide resolved
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));
Copy link
Contributor

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?

Copy link
Contributor Author

@valiafetisov valiafetisov Oct 21, 2022

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);
Copy link
Contributor

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

Copy link
Contributor Author

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)

core/simulations/helpers/executeSpell.ts Outdated Show resolved Hide resolved
core/src/calleeFunctions/helpers/wsteth.ts Show resolved Hide resolved
@valiafetisov valiafetisov merged commit c3c3cc4 into main Oct 21, 2022
@valiafetisov valiafetisov deleted the onboarding-simulation branch October 21, 2022 17:05
@valiafetisov valiafetisov mentioned this pull request Oct 27, 2022
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Onboard rETH
3 participants