Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: upgrades package.jsons & READMEs #48

Merged
merged 23 commits into from
Mar 12, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
6216491
updates diesel-price example's packages & readme
gskapka Mar 4, 2019
d034a2b
updates youtube example's packages & readme
gskapka Mar 4, 2019
842dd32
updates delegated-math example's packages & readme
gskapka Mar 4, 2019
91c8924
updates kraken example's packages & readme
gskapka Mar 4, 2019
b7a7316
updates streamr example's packages & readme
gskapka Mar 4, 2019
da78c17
updates wolfram-alpha example's packages & readme
gskapka Mar 4, 2019
0f634ba
updates bitcoin-balance example's packages & readme
gskapka Mar 5, 2019
d4cabe0
updates diesel-price example's packages & readme
gskapka Mar 5, 2019
80b6cb6
lints & standardizes url-requests tests
gskapka Mar 5, 2019
cfc9e7f
lints & standardizes wolfram-alpha tests
gskapka Mar 5, 2019
57c048e
lints & standardizes bitcoin-balance test
gskapka Mar 5, 2019
b0a7858
lints & standardizes diesel-price test
gskapka Mar 5, 2019
ac51061
lints & standardizes kraken-price-ticker test
gskapka Mar 5, 2019
327a37c
lints & standardizes streamr-example test
gskapka Mar 5, 2019
945633c
lints & standardizes youtube-views test
gskapka Mar 5, 2019
8130342
lints & standardizes delegated-math test
gskapka Mar 5, 2019
a9835d7
updates IPFS archive hash for bitcoin example
gskapka Mar 6, 2019
bc3e5f7
updates package jsons w/correct example names
gskapka Mar 6, 2019
ef3982f
neaten tests for `streamr` examples
gskapka Mar 12, 2019
bb408a9
adds `shrinkwrap.yamls` to examples for pnpm
gskapka Mar 12, 2019
e335b21
upgrade examples to web3 @ 47
gskapka Mar 11, 2019
890fc74
update to latest `ethereum-bridge`
gskapka Mar 12, 2019
babcabd
downgrade web3 versions to `beta-36`
gskapka Mar 12, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
**/node_modules
*.sw*
*.log
*.yaml
.node*
**/build
20 changes: 8 additions & 12 deletions solidity/truffle-examples/bitcoin-balance/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,29 +6,25 @@ This repo is to demonstrate how you would set up an Oraclize smart-contract deve

## :page_with_curl: _Instructions_

**1)** Fire up your favourite console & make sure you have Truffle 5 globally installed:

__`❍ npm install -g truffle@5.0.0-next.17`__

**2)** Clone this repo somewhere:
**1)** Fire up your favourite console & clone this repo somewhere:

__`❍ git clone https://github.com/oraclize/ethereum-examples.git`__

**3)** Enter this directory & install dependencies:
**2)** Enter this directory & install dependencies:

__`❍ cd ethereum-examples/solidity/truffle-examples/bitcoin-balance && npm install`__

**4)** Launch Truffle:
**3)** Launch Truffle:

__`❍ truffle develop`__
__`❍ npx truffle develop`__

**5)** Open a _new_ console in the same directory & spool up the ethereum-bridge:
**4)** Open a _new_ console in the same directory & spool up the ethereum-bridge:

__`❍ ./node_modules/.bin/ethereum-bridge -a 9 -H 127.0.0.1 -p 9545 --dev`__
__`❍ npx ethereum-bridge -a 9 -H 127.0.0.1 -p 9545 --dev`__

**6)** Once the bridge is ready & listening, go back to the first console with Truffle running & set the tests going!
**5)** Once the bridge is ready & listening, go back to the first console with Truffle running & set the tests going!

__`❍ test`__
__`❍ truffle(develop)> test`__

 

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ pragma solidity ^0.5.0;
import "./oraclizeAPI.sol";

contract BitcoinBalanceExample is usingOraclize {

uint256 public balance;

event LogBitcoinAddressBalance(uint _balance);

constructor() public {
getBalance("3D2oetdNuZUqQHPJmcMDDHYoqkyNVsFk9r");
}
Expand All @@ -17,8 +17,8 @@ contract BitcoinBalanceExample is usingOraclize {
balance = parseInt(result, 8);
emit LogBitcoinAddressBalance(balance);
}

function getBalance(string memory _bitcoinAddress) public payable {
oraclize_query("computation",["QmaMFiHXSqCFKkGPbWZh5zKmM827GWNpk9Y1EYhoLfwdHq", _bitcoinAddress]);
oraclize_query("computation",["QmYe37uvAUvZZ8ksV726BZt6dJFWP764sTPisNQtuDZVom", _bitcoinAddress]);
}
}
Loading