Sample Python Files

The following is a selection of examples included with this project. The remainder of them can be seen at boa_test/examples. All the following items as well as other tests are tested at boa_test/tests

Addition

This example show how to add numbers. It is also an example of a smart contract that accepts multiple parameters (4).

boa_test.example.AddTest1.Main(a, b, c, d)[source]

Lists

This example shows how to create and manipulate lists.

boa_test.example.ArrayTest.Main(index)[source]
boa_test.example.ArrayTest.gethting()[source]

Binary Operators

This example shows how to use binary operators.

boa_test.example.BinopTest.Main(operation, a, b)[source]

NEP5 Token

This example shows how to create a NEP5 token.

NEP5 Standard

Author: Thomas Saunders Email: tom@neonexchange.org

Date: Dec 11 2017

boa_test.example.demo.ICO_Template.Main(operation, args)[source]
Parameters:
  • operation – str The name of the operation to perform
  • args – list A list of arguments along with the operation
Returns:

bytearray: The result of the operation

boa_test.example.demo.ICO_Template.deploy()[source]
Parameters:token – Token The token to deploy
Returns:bool: Whether the operation was successful