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

Commit

Permalink
A few minor typo fixes (#778)
Browse files Browse the repository at this point in the history
Signed-off-by: Guillaume George <[email protected]>
  • Loading branch information
LysanderGG authored and ixje committed Dec 31, 2018
1 parent e4c1eb5 commit c1c9868
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions docs/source/neo/SmartContract/application-vs-verification.rst
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ Lets start out with our example from before of tracking a balance, and restrict
return False
You will notice that the ``OWNER`` is the same ByteArray that we used before, as it is the address that is in the wallet I am using. This example will use the ``boa.interop.Neo.Runtime.CheckWitness`` method to verify that the wallet that has signed the InvocationTransaction is the same as ``OWNER``. First, lets build and test to make sure its working.
You will notice that the ``OWNER`` is the same ByteArray that we used before, as it is the address that is in the wallet I am using. This example will use the ``boa.interop.Neo.Runtime.CheckWitness`` method to verify that the wallet that has signed the InvocationTransaction is the same as ``OWNER``. First, let's build and test to make sure it's working.
We will turn on ``sc-events`` to make sure we can see exactly what is going on.

.. code-block:: sh
Expand Down Expand Up @@ -103,7 +103,7 @@ We will turn on ``sc-events`` to make sure we can see exactly what is going on.
Ok, it works pretty much as before. You will notice theres a few new ``print`` statements that we added in, and according to those statements, we can see that the ``Verification`` portion of the Smart Contract was never executed.
One other thing you will notice is that you can see the *SmartContract.Storage.** events, which are useful for debugging!
Currently, in order to interact with the ``Verification`` stage of the Smart Contract, you will need to deploy and use ``testinvoke``, so lets do that. Lets assume you have built and imported the contract, you will have something like this:
Currently, in order to interact with the ``Verification`` stage of the Smart Contract, you will need to deploy and use ``testinvoke``, so let's do that. Let's assume you have built and imported the contract, you will have something like this:

.. code-block:: sh
Expand Down
12 changes: 6 additions & 6 deletions docs/source/neo/SmartContract/smartcontracts.rst
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ The general syntax goes like this: ``build path/to/file.py test {input_params} {
- ``{is_payable}`` is a boolean indicating whether the contract accepts NEO/GAS transfers to it (generally only used for ICO's contracts)
- ``params1 params2 etc...`` These are the parameters you are testing with.

So for building and testing our ``sample1.py``, the syntax would be ``build docs/source/example/sample1.py test '' 01 False False``, where ``''`` indicates that no parameters are accepted and ``01`` indicates that it returns a boolean. Lets try it out in the propmt
So for building and testing our ``sample1.py``, the syntax would be ``build docs/source/example/sample1.py test '' 01 False False``, where ``''`` indicates that no parameters are accepted and ``01`` indicates that it returns a boolean. Let's try it out in the prompt

.. code-block:: sh
Expand Down Expand Up @@ -219,7 +219,7 @@ And you have now built and tested your first SC. If you would like to view the
neo>
You may have noticed that even though there is a ``print`` command in the contract, you did not see anything printed out. Lets fix that by turning on smart contract events and running it again.
You may have noticed that even though there is a ``print`` command in the contract, you did not see anything printed out. Let's fix that by turning on smart contract events and running it again.

.. code-block:: sh
Expand Down Expand Up @@ -251,7 +251,7 @@ So what happened there? We turned on SmartContractEvent logging in the prompt w
- **SmartContract.Execution.Success** indicates that the execution of the SC finished in a successful state


Ok now lets try a little more complex contract, detailed here as `sample2.py`
Ok now let's try a little more complex contract, detailed here as `sample2.py`

.. code-block:: python3
Expand Down Expand Up @@ -291,7 +291,7 @@ We will build and run with a few paramaters:
[I 180302 22:30:01 InteropService:93] Trying to get big integer Array: ['None', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'None']
Oh no, what happened there! Oh, it looks like we tried to test a contract that wanted some parameters but didn't supply them. Note than if you're building and testing contracts and you see an error similar to this, that is probably the issue you are running into. Lets try that again with some parameters.
Oh no, what happened there! Oh, it looks like we tried to test a contract that wanted some parameters but didn't supply them. Note than if you're building and testing contracts and you see an error similar to this, that is probably the issue you are running into. Let's try that again with some parameters.

.. code-block:: sh
Expand Down Expand Up @@ -323,7 +323,7 @@ Oh no, what happened there! Oh, it looks like we tried to test a contract that
neo>
Ok much better. Now lets do something a bit more useful. We will do a simple address balance tracker.
Ok much better. Now let's do something a bit more useful. We will do a simple address balance tracker.

.. code-block:: python3
Expand Down Expand Up @@ -570,7 +570,7 @@ Now that we have deployed the *Calculator Contract* we can interact with it with
[password]>
Once again, this invoke is only done locally. It will not be run on the network until you input your password. If you do not want to invoke on the network, you can simply input an incorrect password and it will cancel. Lets cancel the invoke, and then set ``config sc-events on`` to see exactly what is happening when you test invoke and then send it to the network:
Once again, this invoke is only done locally. It will not be run on the network until you input your password. If you do not want to invoke on the network, you can simply input an incorrect password and it will cancel. Let's cancel the invoke, and then set ``config sc-events on`` to see exactly what is happening when you test invoke and then send it to the network:
.. code-block:: sh
Expand Down
2 changes: 1 addition & 1 deletion neo/Wallets/Wallet.py
Original file line number Diff line number Diff line change
Expand Up @@ -691,7 +691,7 @@ def ProcessNewBlock(self, block):

if state & AddressState.InWallet > 0:

# if its in the wallet, check to see if the coin exists yet
# if it's in the wallet, check to see if the coin exists yet
key = CoinReference(tx.Hash, index)

# if it exists, update it, otherwise create a new one
Expand Down
2 changes: 1 addition & 1 deletion neo/api/JSONRPC/test_json_rpc_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -586,7 +586,7 @@ def test_gzip_compression(self):

def test_getpeers(self):
# Given this is an isolated environment and there is no peers
# lets simulate that at least some addresses are known
# let's simulate that at least some addresses are known
node = NodeLeader.Instance()
node.ADDRS = ["127.0.0.1:20333", "127.0.0.2:20334"]
node.DEAD_ADDRS = ["127.0.0.1:20335"]
Expand Down

0 comments on commit c1c9868

Please sign in to comment.