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

Commit

Permalink
Merge 8200f50 into 7a98b47
Browse files Browse the repository at this point in the history
  • Loading branch information
mmoravec authored Oct 3, 2017
2 parents 7a98b47 + 8200f50 commit f8b3851
Show file tree
Hide file tree
Showing 88 changed files with 4,282 additions and 11 deletions.
13 changes: 11 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,9 @@

## Getting started

You will need to install the libleveldb library.
You will need to install the libleveldb library. Install Python 3.5 to make sure you don't run into any issues with your Python version [dist](https://www.python.org/downloads/release/python-354/)

We have published a Youtube [video](https://youtu.be/oy6Z_zd42-4) to help get you started with this library. There are other videos under the CityOfZion Youtube channel.

##### OSX:

Expand All @@ -63,7 +65,7 @@ apt-get -s install libleveldb-dev

This is a bit more tricky...

```
```
yum -y install development tools python35 python35-devel python35-pip readline-devel leveldb-devel libffi-devel
```

Expand All @@ -85,6 +87,13 @@ python3 -m venv venv
source venv/bin/activate
```

or to install Python 3.5 specifically

```
virtualenv -p /usr/local/bin/python3.5 venv
source venv/bin/activate
```

Then install requirements
```
pip install -r requirements.txt
Expand Down
Empty file added boa/__init__.py
Empty file.
Empty file added boa/blockchain/__init__.py
Empty file.
5 changes: 5 additions & 0 deletions boa/blockchain/vm/FunctionCode.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
from boa.blockchain.vm.SmartContract import SmartContract

class FunctionCode(SmartContract):

pass
19 changes: 19 additions & 0 deletions boa/blockchain/vm/Neo/Account.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@

class Account():
pass


def GetScriptHash(account):
pass


def GetVotes(account):
pass


def SetVotes(account, votes):
pass


def GetBalance(asset_id):
pass
44 changes: 44 additions & 0 deletions boa/blockchain/vm/Neo/Asset.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@

class Asset():
pass


def GetAssetId(asset):
pass


def GetAssetType(asset):
pass


def GetAmount(asset):
pass


def GetAvailable(asset):
pass


def GetPrecision(asset):
pass


def GetOwner(asset):
pass


def GetAdmin(asset):
pass


def GetIssuer(asset):
pass


def Create(asset_type, name, amount, precision, owner, admin, issuer):
pass


def Renew(asset, years):
pass

18 changes: 18 additions & 0 deletions boa/blockchain/vm/Neo/Block.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
from boa.blockchain.vm.Neo.Transaction import Transaction

class Block():
pass



def GetTransactionCount(block) -> int:
pass


def GetTransactions(block) -> list:
pass


def GetTransaction(block, index) -> Transaction:
pass

39 changes: 39 additions & 0 deletions boa/blockchain/vm/Neo/Blockchain.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
from boa.blockchain.vm.Neo.Header import Header
from boa.blockchain.vm.Neo.Block import Block
from boa.blockchain.vm.Neo.Transaction import Transaction
from boa.blockchain.vm.Neo.Account import Account
from boa.blockchain.vm.Neo.Asset import Asset
from boa.blockchain.vm.Neo.Contract import Contract



def GetHeight() -> int:
pass


def GetHeader(height_or_hash) -> Header:
pass


def GetBlock(height_or_hash) -> Block:
pass


def GetTransaction(hash) -> Transaction:
pass


def GetAccount(script_hash) -> Account:
pass


def GetValidators() -> []:
pass


def GetAsset(asset_id) -> Asset:
pass


def GetContract(script_hash) -> Contract:
pass
42 changes: 42 additions & 0 deletions boa/blockchain/vm/Neo/Contract.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@

class Contract():
pass


def GetScript(contract):
pass


def GetStorageContext(contract):
pass


def Create(script,
parameter_list,
return_type,
need_storage,
version,
author,
email,
description
):

pass


def Migrate(script,
parameter_list,
return_type,
need_storage,
version,
author,
email,
description
):

pass

def Destroy(contract):
pass


26 changes: 26 additions & 0 deletions boa/blockchain/vm/Neo/Header.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@


class Header():
pass


def GetHash(header):
pass

def GetVersion(header):
pass

def GetPrevHash(header):
pass

def GetMerkleRoot(header):
pass

def GetTimestamp(header):
pass

def GetConsensusData(header):
pass

def GetNextConsensus(header):
pass
16 changes: 16 additions & 0 deletions boa/blockchain/vm/Neo/Input.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@

class TransactionOutput():
pass


def GetAssetId(output):
pass


def GetValue(output):
pass


def GetScriptHash(output):
pass

11 changes: 11 additions & 0 deletions boa/blockchain/vm/Neo/Output.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@

class TransactionInput():
pass


def GetHash(input):
pass


def GetIndex(input):
pass
6 changes: 6 additions & 0 deletions boa/blockchain/vm/Neo/Runtime.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@

def Log(message):
pass

def Notify(arg):
pass
19 changes: 19 additions & 0 deletions boa/blockchain/vm/Neo/Storage.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@



def GetContext():
pass



#def CurrentContext():
# return GetContext()

def Get(context, key):
pass

def Put(context, key, value):
pass

def Delete(context, key, value):
pass
28 changes: 28 additions & 0 deletions boa/blockchain/vm/Neo/Transaction.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@

class Transaction():
pass


def GetHash(transaction):
pass


def GetType(transaction):
pass


def GetAttributes(transaction):
pass


def GetInputs(transaction):
pass


def GetOutputs(transaction):
pass


def GetReferences(transaction):
pass

12 changes: 12 additions & 0 deletions boa/blockchain/vm/Neo/TransactionAttribute.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@

class TransactionAttribute():
pass


def GetUsage(transaction_attr):
pass


def GetData(transaction_attr):
pass

6 changes: 6 additions & 0 deletions boa/blockchain/vm/Neo/TriggerType.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@

def Verification():
return b'\x00'

def Application():
return b'\x10'
7 changes: 7 additions & 0 deletions boa/blockchain/vm/Neo/Validator.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@

class Validator():
pass


def Register(pubkey):
pass
Empty file.
18 changes: 18 additions & 0 deletions boa/blockchain/vm/SmartContract.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@

class SmartContract():


def Sha1(data):
pass

def Sha256(data):
pass

def Hash160(data):
pass

def Hash256(data):
pass

def VerifySignature(pubkey, signature):
pass
20 changes: 20 additions & 0 deletions boa/blockchain/vm/System/ExecutionEngine.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@


class ExecutionEngine():
pass


def GetScriptContainer():
pass


def GetExecutingScriptHash():
pass


def GetCallingScriptHash():
pass


def GetEntryScriptHash():
pass
Empty file.
Loading

0 comments on commit f8b3851

Please sign in to comment.