Skip to content

Commit

Permalink
chore: add StRIFToken upgrade script params
Browse files Browse the repository at this point in the history
  • Loading branch information
shenshin committed Nov 13, 2024

Verified

This commit was signed with the committer’s verified signature. The key has expired.
amorde Eric Amorde
1 parent b06c194 commit 607266f
Showing 4 changed files with 14 additions and 5 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -223,8 +223,8 @@ Successfully verified contract "contracts/EarlyAdopters.sol:EarlyAdopters" for n
| ---------------------------------------------- | ------------------------------------------ |
| GovernorRootstockCollective impl | 0x2109FF4a9D5548a21F877cA937Ac5847Fde49694 |
| GovernorRootstockCollective proxy | 0x91a8E4A070B4BA4bf2e2a51Cb42BdeDf8FFB9b5a |
| StRIFToken impl | 0x4861198e9A6814EBfb152552D1b1a37426C54D23 |
| StRIFToken proxy | 0xFff256c3451D5cF59653Cfe71950AE9ba2F5f0Ef |
| StRIFToken proxy | 0x4861198e9A6814EBfb152552D1b1a37426C54D23 |
| StRIFToken impl | 0xFff256c3451D5cF59653Cfe71950AE9ba2F5f0Ef |
| DaoTimelockUpgradableRootstockCollective impl | 0x2AEdf0B35651934cF3BEC855cbCE207bBA0C4aB5 |
| DaoTimelockUpgradableRootstockCollective proxy | 0x5eDA6fA73350291F7D7cFC7ad93F48189f1333ef |
| TreasuryRootstockCollective | 0x47C969d7ae7A377BeaD553c2899D9B83A90e0772 |
6 changes: 3 additions & 3 deletions ignition/modules/StRifV02Module.ts
Original file line number Diff line number Diff line change
@@ -8,13 +8,13 @@ export const stRifV02Module = buildModule('StRIFTokenV02', m => {

const stRIFTokenProxy = m.contractAt('StRIFToken', stRIFTokenProxyAddress)

const newImplementation = m.contract('StRIFTokenV02', [], { id: 'Implementation02' })
const newImplementation = m.contract('StRIFTokenV02', [], { id: 'Implementation' })

const reInitCall = m.encodeFunctionCall(newImplementation, 'initializeV2', [])

m.call(stRIFTokenProxy, 'upgradeToAndCall', [newImplementation, reInitCall], { id: 'Reinitialize02' })
m.call(stRIFTokenProxy, 'upgradeToAndCall', [newImplementation, reInitCall], { id: 'Reinitialize' })

const stRifV02 = m.contractAt('StRIFTokenV02', stRIFTokenProxy, { id: 'Contract02' })
const stRifV02 = m.contractAt('StRIFTokenV02', stRIFTokenProxy, { id: 'Contract' })

return { stRifV02 }
})
5 changes: 5 additions & 0 deletions params/StRif/v2UpgradeTestnet.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"StRIFTokenV02": {
"StRifAddress": "0x47955BbC3a077FFA59BD7aedf25fcD1f2f0360e3"
}
}
4 changes: 4 additions & 0 deletions test/StRIFToken.test.ts
Original file line number Diff line number Diff line change
@@ -22,6 +22,10 @@ describe('stRIFToken', () => {
expect(contractBalance).to.equal(ethers.parseUnits('1000000000', 18))
})

it('deployer should be the owner', async () => {
expect(await stRIF.owner()).to.equal(owner.address)
})

describe('Wrapping RIF tokens to stRIF', () => {
it('holder should NOT initially own RIF tokens', async () => {
expect(await rif.balanceOf(holder.address)).to.equal(0)

0 comments on commit 607266f

Please sign in to comment.