diff --git a/test/MiscTests.js b/test/MiscTests.js index b37a8bb08..f66311f1d 100644 --- a/test/MiscTests.js +++ b/test/MiscTests.js @@ -1,3 +1,5 @@ +var FiatTokenProxy = artifacts.require('FiatTokenProxy'); + var tokenUtils = require('./TokenTestUtils');; var BigNumber = require('bignumber.js'); var assertDiff = require('assert-diff'); @@ -435,6 +437,21 @@ async function run_tests(newToken) { assert(await token.removeMinter.call(minterAccount, { from: masterMinterAccount })); }); + it('ms045 initialized should be in slot 8, byte 21', async function() { + var slot8Data = await web3.eth.getStorageAt(proxy.address, 8); + var initialized = "0x" + slot8Data.substring(2,4); // first 2 hex-chars after 0x + var masterMinterAddress = "0x" + slot8Data.substring(4,44); // first 42 hex chars after 0xii + + assert.equal(masterMinterAccount, masterMinterAddress); + assert.equal("0x01", initialized); + }); + + it('ms046 initialized should be 0 before initialization', async function() { + var newProxy = await FiatTokenProxy.new(token.address, { from: arbitraryAccount }); + var slot8Data = await web3.eth.getStorageAt(newProxy.address, 8); + assert.equal("0x00", slot8Data); + }); + } module.exports = {