Closed hany-peak closed 5 years ago
i was in hell for two days... just printed revert().. if you have same thing with my problem, just change gas config in your code.
it is not drizzzle's problem.
So the correct method call should be: contract.methods.mymethod.send({from: account, gas: })
let deployTokenKey = drizzle.contracts.MyProxy.methods.deployToken .cacheSend( this.state.tokenName, this.state.tokenSymbol, parseInt(this.state.tokenDecimals), {from:this.state.issuer,gas:5000000} );
it is successed. it was test-rpc problem.
Truffle v5.0.10 (core: 5.0.10) Solidity v0.5.0 (solc-js) Node v10.15.0 Web3.js v1.0.0-beta.37
//solidity Code ( MyToken2 newToken = new MyToken2()) <-- errorpoint
`function deployToken(string memory _name, string memory _symbol, uint8 _decimals) public returns (bool) { MyToken2 newToken = new MyToken2(_name, _symbol, _decimals);
//test code [ no Error ] && REMIX IDE [ no Error ] `it("deployToken", async() => { const address = await INSTANCE_MyProxy.deployToken("COLDBREW","CB",18,{from:MyProxyIssuer});
// myProxy.js
let deployTokenKey = drizzle.contracts.MyProxy.methods.deployToken .cacheSend( this.state.tokenName, this.state.tokenSymbol, parseInt(this.state.tokenDecimals), {from:this.state.issuer} );
I tried to basic Setter & getter like setName, getName. it is no Error. but i tried to new Contract function in drizzle (new MyToken2(_name, _symbol, _decimals)), result is error. and then i also tried new StandradToken(openzepp- ERC20). it's error too.