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

[DO NOT MERGE] Shared: PoC testing contracts versions #782

Open
wants to merge 2 commits into
base: master
from

Conversation

Projects
None yet
4 participants
@facuspagnuolo
Copy link
Contributor

facuspagnuolo commented Apr 9, 2019

This is a proof of concept of how we could use previous versions of a contract in a test, it could be useful for testing upgrades for example. I proposed two alternatives here, either using a commit sha or a path to the build files of that version.

Do not merge, it was just to show the idea.

@facuspagnuolo facuspagnuolo requested a review from sohkai Apr 9, 2019

@facuspagnuolo facuspagnuolo force-pushed the contract_versions_testing_poc branch from 0612e3e to f779645 Apr 9, 2019

@facuspagnuolo facuspagnuolo requested review from bingen and izqui Apr 9, 2019

@coveralls

This comment has been minimized.

Copy link

coveralls commented Apr 9, 2019

Coverage Status

Coverage remained the same at 96.734% when pulling 7f6a4d9 on contract_versions_testing_poc into 9dd4b27 on organize_ganache_cli_script.

@facuspagnuolo facuspagnuolo force-pushed the contract_versions_testing_poc branch from f779645 to 7f6a4d9 Apr 9, 2019


module.exports = (web3, TruffleContract, TruffleConfig) => {
return class VersionedContractsProvider {
static fromBranch({ commit, source = APPS_GIT_URL, projectDir = '.', outputDir = 'tmp' }) {

This comment has been minimized.

Copy link
@sohkai

sohkai Apr 9, 2019

Member

Wonder if we could be more generic than using "branch" terminology. I foresee us using tags most of the time, but I imagine there's a better abstraction for git references in general.

This comment has been minimized.

Copy link
@facuspagnuolo

facuspagnuolo Apr 9, 2019

Author Contributor

I started it with a tag/branch abstraction, but I thought that maybe commit was more flexible. We can extend it to whatever we want actually :)

@facuspagnuolo facuspagnuolo changed the base branch from organize_ganache_cli_script to master Apr 16, 2019

@bingen
Copy link
Member

bingen left a comment

This is really cool!!!
I guess we could integrate @sohkai 's tool to automatically compare bytecode size (and even add it to the CI), or for other gas comparisons.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.