2_deploy_contracts.js
Replacing 'OraclizeTest'
Error: * Deployment Failed *
"OraclizeTest" -- invalid number value (arg="_amount", coderType="uint256", value={"from":"0xb5Fb3E9BB73e742689F1001C519d6763a39A4Bc5","gas":6721975,"value":1000000000000000000}).
at /root/.nvm/versions/node/v9.11.2/lib/node_modules/truffle/build/webpack:/packages/deployer/src/deployment.js:364:1 at at process._tickCallback (internal/process/next_tick.js:182:7) Truffle v5.1.8 (core: 5.1.8) Node v9.11.2
var OraclizeTest = artifacts.require("./OraclizeTest.sol");
module.exports = function(deployer, network, accounts) {
// Deploys the OraclizeTest contract and funds it with 0.5 ETH
// The contract needs a balance > 0 to communicate with Oraclize
deployer.deploy(
OraclizeTest,
{ from: accounts[9], gas:6721975, value: 1000000000000000000 });
};
-
contract OraclizeTest is usingOraclize {
using strings for *; //strings import requirement
// string public matchId;
uint256 public amount;
//remove url traces
address public homeBet;
address public awayBet;
//string public ETHUSD;
event LogInfo(string description); //getting from update function
//event LogPriceUpdate(string price); //waiting for price in callback
//then calling update function
//event LogUpdate(address indexed _owner, uint indexed _balance); //getting from constructor
// Constructor
function OraclizeTest (uint _amount) public { //adding args and not matchid
amount = _amount;
// emit LogUpdate(owner, address(this).balance); //owner was in original
// Replace the next line with your version:
OAR = OraclizeAddrResolverI(0x6f485C8BF6fc43eA212E93BBF8ce046C7f1cb475);
oraclize_setProof(proofType_TLSNotary | proofStorage_IPFS);
update();
}