Skip to content
This repository has been archived by the owner on Aug 9, 2022. It is now read-only.

feat: upgradability using truffle plugin #142

Merged
merged 2 commits into from
Oct 8, 2020
Merged

Conversation

julianmrodri
Copy link
Contributor

@julianmrodri julianmrodri commented Oct 8, 2020

  • Prepares the storageManager contract for Upgradability. Uses the OpenZeppelin Upgrades Truffle Plugin.
  • Adapted migrations and tests (required to ensure we always use account[0] for deployment of the proxies).

Closes #134

Copy link
Contributor

@nduchak nduchak left a comment

Choose a reason for hiding this comment

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

LGTM

const { toBN, asciiToHex, padRight } = require('web3-utils')
const expect = require('chai').expect

const Staking = artifacts.require('Staking')
const StorageManager = artifacts.require('StorageManager')
const ERC20 = artifacts.require('MockERC20')

contract('Staking', ([staker, randomPerson]) => {
contract('Staking', ([randomPerson, staker]) => {
Copy link
Contributor

Choose a reason for hiding this comment

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

why do you revert this?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The plugins have still an open issue that is that you cannot specify the from address. It uses the accounts[0] from the accounts that Truffle provides. So I needed the first account to be the one Deploying the proxies. The easiest way was to revert the order to achieve that and have the one that deploys first.

Copy link
Contributor

Choose a reason for hiding this comment

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

Ahh. Ok, make sense now). Thanks

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@julianmrodri julianmrodri merged commit 08e6cea into master Oct 8, 2020
@julianmrodri julianmrodri deleted the feat/upgrades branch October 8, 2020 13:30
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Upgradeability to Storage Contract
2 participants