Skip to content
This repository was archived by the owner on Apr 26, 2019. It is now read-only.

Update README.md#23

Open
jeremybeal11 wants to merge 3 commits intopokt-network:masterfrom
jeremybeal11:master
Open

Update README.md#23
jeremybeal11 wants to merge 3 commits intopokt-network:masterfrom
jeremybeal11:master

Conversation

@jeremybeal11
Copy link
Copy Markdown

First draft to Android Readme

First draft to Android Readme
@pabelnl pabelnl self-requested a review February 13, 2019 23:22
Comment thread README.md Outdated
Comment thread README.md Outdated
try {
Wallet wallet = this.pocketAion.createWallet("32", null);
} catch (CreateWalletException cwe) {
throw cwe;
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

replace with cwe.printStackTrace();

Comment thread README.md Outdated
Currently there are 2 supported namespaces in Pocket Node for AION: `net` and `eth`.
In the examples below, you will see how to query the supported RPC calls in both
namespaces.
Currently there are 2 supported namespaces in PocketAION: `net` and `eth` that contains prebuild `RPC_Methods` to call when executing each namespace. In the examples below, you will see how we get the balance of a wallet using both namespaces.
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

net doesn't let you get balance from the blockchain, only the eth namespace have the getBalance. replace with In the examples below, you will see how you can use both namespaces.

Comment thread README.md Outdated
BigInteger nrg = new BigInteger("50000");
BigInteger nrgPrice = new BigInteger("10000000000");
BigInteger nonce = new BigInteger("1");
BigInteger value = new BigInteger("0");
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the value should be new BigInteger("1"); , using 0 will add nothing to the state of the contract.

Comment thread README.md Outdated
## Creating and sending a Query
Follow the example below to create a `Transaction` object for writing to the given AION network with the parameters below and `subnetwork`.
Throws `CreateQueryException` in case of errors.
### Calling an AionContract function
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should be Reading from a Smart Contract

Comment thread README.md Outdated
e.printStackTrace();
// Prepare parameters
List<Object> functionParams = new ArrayList<>();
functionParams.add(new BigInteger("2"));
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's remove the functions params, nrg, nrgPrice and from. Just as in the iOS readme, both tutorials are doing the same just he language changes. send null instead of the fromAddress, nrg, nrgPrice and value.

Comment thread README.md Outdated
BigInteger nrgPrice = new BigInteger("10000000000");
BigInteger value = new BigInteger("0");
// Execute function and assert on response
contract.executeConstantFunction("multiply", fromAddress, functionParams, nrg, nrgPrice, value, new RPCCallback<Object>() {
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

change the function name to pocketTestState

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pocketTest.executeConstantFunction("pocketTestState", null, new ArrayList<Object>(), null, null, null, new RPCCallback<Object>() {
                @Override
                public void onResult(Object result, Exception exception) {
                    // Result is an Object we can cast to String
                   // Exception, if any, will contain the error sent from the Pocket Node
                }
            });

made Pabels requests
Comment thread README.md Outdated
BigInteger nrg = new BigInteger("50000");
BigInteger nrgPrice = new BigInteger("10000000000");
BigInteger value = new BigInteger("0");
BigInteger value = new BigInteger("1");
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove this line, no function params are being sent

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants