Hot answers tagged

2

Generally call will default to using 0x0000000000000000000000000000000000000000 as msg.sender, which is why this is reverting. That address is indeed not owner, so a revert is what you would expect. You can do call though and specific the msg.sender by doing await exchange.methods.isAdmin().call({from:addressYouWantToUse}) and replace the placeholder with ...


1

If you run npm uninstall @openzeppelin/contracts and then npm install @openzeppelin/contracts@2.3.0, then retry the import, then it should work. Also, check your truffle-config.js file and see if the root directory is configured properly to find your node_modules folder properly.


1

You should be able to use truffle console --network rinkeby. You will need to configure truffle-config.js properly, e.g. using Infura and the hdwallet-provider package: const HDWalletProvider = require('@truffle/hdwallet-provider'); const infuraURL = 'https://rinkeby.infura.io/v3/YOUR-INFURA-PROJECT-ID'; const fs = require('fs'); const mnemonic = fs....


Only top voted, non community-wiki answers of a minimum length are eligible