Skip to content
This repository has been archived by the owner on May 26, 2021. It is now read-only.

Commit

Permalink
fixed request sig in mock script
Browse files Browse the repository at this point in the history
  • Loading branch information
mdcoon committed May 6, 2019
1 parent 0144320 commit 1d522a5
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
Binary file modified .DS_Store
Binary file not shown.
13 changes: 10 additions & 3 deletions scripts/MockScripts.js
Expand Up @@ -34,8 +34,15 @@ module.exports = async function(callback) {
oracle = await TellorMaster.deployed()
console.log('oracle address',oracle.address)
oracle2 = await new web3.eth.Contract(oracleAbi,oracle.address);///will this instance work for logWatch? hopefully...
web3.eth.sendTransaction({to: oracle.address,from:acct,gas:7000000, data: web3.utils.keccak256("tellorPostConstructor()")})
web3.eth.sendTransaction({to: oracle.address,from:acct,gas:7000000,data:oracle2.methods.requestData(api,"BTC/USD",0,1000,0).encodeABI()});
console.log('Ready!')
await web3.eth.sendTransaction({to: oracle.address,from:acct,gas:7000000, data: web3.utils.keccak256("tellorPostConstructor()")})
console.log("Initialized")
try {
await web3.eth.sendTransaction({to: oracle.address,from:acct,gas:7000000,data:oracle2.methods.requestData(api,"BTC/USD",1000,0).encodeABI()}, (e,r)=>{
console.log("Requested data", e, r);
});
console.log('Requested Data!')
} catch (e) {
console.log("Problem sending requestData txn", e);
}
return true;
}

0 comments on commit 1d522a5

Please sign in to comment.