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

SB script dry execution #237

Merged
merged 6 commits into from
Jun 7, 2019
Merged

SB script dry execution #237

merged 6 commits into from
Jun 7, 2019

Conversation

szerintedmi
Copy link
Member

@szerintedmi szerintedmi commented Jun 6, 2019

dryExecute method without signature check - reverts in all cases with result in reason string.

It still needs to be tested on a local ganache forked from mainnet.

NB: in Solc 5+ it could be done without inline assembly:

bytes memory returndata;
(result, returndata) = scriptAddress.delegatecall(sig);
require(result, string(returndata));

@szerintedmi szerintedmi requested review from treerz and phraktle June 6, 2019 20:05
treerz
treerz previously approved these changes Jun 7, 2019
Copy link
Contributor

@treerz treerz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks promising, it's worth a try if it actually works.

@szerintedmi szerintedmi changed the title Sb script dry run SB script dry execution Jun 7, 2019
@szerintedmi szerintedmi merged commit 522eb25 into staging Jun 7, 2019
@szerintedmi szerintedmi deleted the sb_script_dry_run branch June 7, 2019 15:07
szerintedmi added a commit that referenced this pull request Sep 14, 2020
* script

* rename

* comment

* comment

* fix

* Scripts (migrate, convert) (#228)

* margin_loan (#229)

* fix loan related test failures when run multiple times (also take snapshot before initialization, and revert after all tests have run, because init already changes the state)

* move old sb scripts to archive

* Loans with margin calls (#230)

* Bump handlebars from 4.1.1 to 4.1.2 (#234)

Bumps [handlebars](https://github.com/wycats/handlebars.js) from 4.1.1 to 4.1.2.
- [Release notes](https://github.com/wycats/handlebars.js/releases)
- [Changelog](https://github.com/wycats/handlebars.js/blob/master/release-notes.md)
- [Commits](handlebars-lang/handlebars.js@v4.1.1...v4.1.2)

Signed-off-by: dependabot[bot] <support@github.com>

* Bump fstream from 1.0.11 to 1.0.12 (#232)

Bumps [fstream](https://github.com/npm/fstream) from 1.0.11 to 1.0.12.
- [Release notes](https://github.com/npm/fstream/releases)
- [Commits](npm/fstream@v1.0.11...v1.0.12)

* Update truffle-hdwallet-provider to the latest version 🚀 (#231)

* chore(package): update truffle-hdwallet-provider to version 1.0.10

* chore(package): update lockfile yarn.lock

* Update coveralls to the latest version 🚀 (#235)

* chore(package): update coveralls to version 3.0.4

* chore(package): update lockfile yarn.lock

* SB script dry execution (#237)

* code formatting

* dryExecute

* dryExecute to return delegatecall revert reason

* dryExecute: return void, copy only on revert, comments

* dryExecute: minor code simplification

* dryExecute: extra tests with no reason&out of gas

* Update eslint to the latest version 🚀 (#240)

* chore(package): update eslint to version 6.0.0

* chore(package): update lockfile yarn.lock

* Update ganache-cli to the latest version 🚀 (#238)

* chore(package): update ganache-cli to version 6.4.4

* chore(package): update lockfile yarn.lock

* Greenkeeper/truffle hdwallet provider 1.0.13 (#241)

* chore(package): update truffle-hdwallet-provider to version 1.0.13

Closes #239

* chore(package): update lockfile yarn.lock

* loan manager improvements (#236)

- add currentRate to LoanManager events (NewLoan, LoanRepayed, LoanCollected)
- fix inverted collateralRatio, rename to initialCollateralRatio
- add minRate to newEthBackedLoan
- emit LoanChanged event on addExtraCollateral

* margin loanmanager mainnet deploy (#253)

* scripts: deploy loanmanager
* scripts: loanmanager permission setup script
* abiniser: deployment info for mainnet loanmanager (manual)
* scripts: loanmanager product setup script
* bump package version to 1.1.1

* sb script: transfer eth from reserve

* yarn version  to 1.22.4 (#262)

* upgrade to ganache_cli 6.10.2 (#263)

* mega truffle upgrade  (#264)

Massive PR to upgrade to truffle 5.1.43

- Latest truffle uses web3 v1 which required a lot of changes in tests due to values returned differently.
- Truffle now injects v1 web3 to tests so no need to hack in an additional web3 (v1) for tests anymore (removed package).
- As part of reorg changed all BigNumber.js variables to web3 native 'BN.js' vars (removed Bignumber package)

* sb script: eth transfer from reserve (#255)

* Main0034_feeaccount_transfer [0x4120e93d6fa16e30fae5284e35b8fbe8526274a5](https://etherscan.io/address/0x4120e93d6fa16e30fae5284e35b8fbe8526274a5#code)

* Main0032_reserve_transfer [0x7872040512885e0f7DEDDfEE95cc38aA8108e4d2](https://etherscan.io/address/0x7872040512885e0f7deddfee95cc38aa8108e4d2)

*  Main0033_reserve_transfer  [0x3d55c33d5aab0d863c644f1b9d8b2836292d104e](https://etherscan.io/address/0x3d55c33d5aab0d863c644f1b9d8b2836292d104e)

* Truffle to 5.1.44 (#266)

* truffle to 5.1.44

* enable dependabot (#267)

* Dependabot conf fix (#268)

* fix dependabot.yml

* Bump stringifier from 2.0.0 to 2.1.0 (#269)

Bumps [stringifier](https://github.com/twada/stringifier) from 2.0.0 to 2.1.0.
- [Release notes](https://github.com/twada/stringifier/releases)
- [Changelog](https://github.com/twada/stringifier/blob/master/CHANGELOG.md)
- [Commits](twada/stringifier@v2.0.0...v2.1.0)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump moment from 2.22.2 to 2.27.0 (#270)

Bumps [moment](https://github.com/moment/moment) from 2.22.2 to 2.27.0.
- [Release notes](https://github.com/moment/moment/releases)
- [Changelog](https://github.com/moment/moment/blob/develop/CHANGELOG.md)
- [Commits](moment/moment@2.22.2...2.27.0)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump solidity-coverage from 0.5.11 to 0.7.10 (#271)

Bumps [solidity-coverage](https://github.com/sc-forks/solidity-coverage) from 0.5.11 to 0.7.10.
- [Release notes](https://github.com/sc-forks/solidity-coverage/releases)
- [Changelog](https://github.com/sc-forks/solidity-coverage/blob/master/CHANGELOG.md)
- [Commits](https://github.com/sc-forks/solidity-coverage/commits)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Peter Petrovics <peter@augmint.org>

* Bump dotenv from 8.0.0 to 8.2.0 (#272)

Bumps [dotenv](https://github.com/motdotla/dotenv) from 8.0.0 to 8.2.0.
- [Release notes](https://github.com/motdotla/dotenv/releases)
- [Changelog](https://github.com/motdotla/dotenv/blob/master/CHANGELOG.md)
- [Commits](motdotla/dotenv@v8.0.0...v8.2.0)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Peter Petrovics <peter@augmint.org>

* Bump wait-on from 3.2.0 to 5.2.0 (#273)

Bumps [wait-on](https://github.com/jeffbski/wait-on) from 3.2.0 to 5.2.0.
- [Release notes](https://github.com/jeffbski/wait-on/releases)
- [Commits](jeffbski/wait-on@v3.2.0...v5.2.0)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump truffle-hdwallet-provider from 1.0.13 to 1.0.17 (#274)

Bumps [truffle-hdwallet-provider](https://github.com/trufflesuite/truffle) from 1.0.13 to 1.0.17.
- [Release notes](https://github.com/trufflesuite/truffle/releases)
- [Commits](https://github.com/trufflesuite/truffle/compare/truffle-hdwallet-provider@1.0.13...truffle-hdwallet-provider@1.0.17)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump eslint from 6.0.0 to 7.9.0 (#276)

* Bump coveralls from 3.0.4 to 3.1.0 (#275)

Bumps [coveralls](https://github.com/nickmerwin/node-coveralls) from 3.0.4 to 3.1.0.
- [Release notes](https://github.com/nickmerwin/node-coveralls/releases)
- [Commits](nickmerwin/node-coveralls@3.0.4...v3.1.0)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* truffle-hdwallet upgrade & dump babel-register (#277)

* Bump moment from 2.27.0 to 2.28.0 (#278)

Bumps [moment](https://github.com/moment/moment) from 2.27.0 to 2.28.0.
- [Release notes](https://github.com/moment/moment/releases)
- [Changelog](https://github.com/moment/moment/blob/develop/CHANGELOG.md)
- [Commits](moment/moment@2.27.0...2.28.0)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* bump package version to 1.1.2 (#279)

Co-authored-by: Treer Zoltán <treer@euedge.com>
Co-authored-by: Treer Zoltán <38250343+treer-euedge@users.noreply.github.com>
Co-authored-by: dependabot[bot] <dependabot[bot]@users.noreply.github.com>
Co-authored-by: greenkeeper[bot] <greenkeeper[bot]@users.noreply.github.com>
Co-authored-by: greenkeeper[bot] <23040076+greenkeeper[bot]@users.noreply.github.com>
Co-authored-by: Treer Zoltán <38250343+treerz@users.noreply.github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
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.

3 participants