Truffle 4.0.1
I've got a contract declared "is Pausable" (OpenZeppelin framework) and I want to pause it as part of the deployment logic.
I'm getting an error, however, when invoking pause()
Error: Invalid number of arguments to Solidity function
at Object.InvalidNumberOfSolidityArgs (/Users/sofend/.nvm/versions/node/v7.5.0/lib/node_modules/truffle/build/cli.bundled.js:43290:16)
The code seems straight-forward enough:
const MyContract = artifacts.require("./MyContract.sol");
module.exports = function (deployer, network, accounts) {
const owner = accounts[0];
return deployer.deploy(MyContract, {from: owner})
.then(function () {
return MyContract.deployed().then((instance) => {
// pause the contract
instance.pause(/*{from: owner}*/) // I've tried it passing in the from: owner; tried it with call() etc.
.catch(function (error) {
console.error(error.stack);
})
;
})
.catch(function (error) {
console.error(error.stack);
})
;
}.catch(function (error) {
console.error(error.stack);
})
);
};
And have tried variations of the call to pause():
.pause.call()
.pause({from: owner})
.pause.call({from: owner})
but all give the same error: Invalid number of arguments to Solidity function
The pause() function isn't declared to take any parameters.
What am I doing wrong?