diff --git a/cli/smartcontract/smart_contract.go b/cli/smartcontract/smart_contract.go index 2dd69bf94..5bfe32c14 100644 --- a/cli/smartcontract/smart_contract.go +++ b/cli/smartcontract/smart_contract.go @@ -28,7 +28,7 @@ var ( // %s is parsed to be the smartContractName smartContractTmpl = `package %s -import "github.com/CityOfZion/neo-storm/interop/runtime" +import "github.com/CityOfZion/neo-go/pkg/interop/runtime" func Main(op string, args []interface{}) { runtime.Notify("Hello world!") diff --git a/examples/engine/engine.go b/examples/engine/engine.go index c436dc33f..aa210abdf 100644 --- a/examples/engine/engine.go +++ b/examples/engine/engine.go @@ -1,8 +1,8 @@ package engine_contract import ( - "github.com/CityOfZion/neo-storm/interop/engine" - "github.com/CityOfZion/neo-storm/interop/runtime" + "github.com/CityOfZion/neo-go/pkg/interop/engine" + "github.com/CityOfZion/neo-go/pkg/interop/runtime" ) func Main() bool { diff --git a/examples/iterator/iterator.go b/examples/iterator/iterator.go index 4ccf996b3..0809b173f 100644 --- a/examples/iterator/iterator.go +++ b/examples/iterator/iterator.go @@ -1,9 +1,9 @@ package iterator_contract import ( - "github.com/CityOfZion/neo-storm/interop/iterator" - "github.com/CityOfZion/neo-storm/interop/runtime" - "github.com/CityOfZion/neo-storm/interop/storage" + "github.com/CityOfZion/neo-go/pkg/interop/iterator" + "github.com/CityOfZion/neo-go/pkg/interop/runtime" + "github.com/CityOfZion/neo-go/pkg/interop/storage" ) func Main() bool { diff --git a/examples/runtime/runtime.go b/examples/runtime/runtime.go index 6c11632ee..4d914e445 100644 --- a/examples/runtime/runtime.go +++ b/examples/runtime/runtime.go @@ -1,8 +1,8 @@ package runtime_contract import ( - "github.com/CityOfZion/neo-storm/interop/runtime" - "github.com/CityOfZion/neo-storm/interop/util" + "github.com/CityOfZion/neo-go/pkg/interop/runtime" + "github.com/CityOfZion/neo-go/pkg/interop/util" ) // Check if the invoker of the contract is the specified owner diff --git a/examples/storage/storage.go b/examples/storage/storage.go index bca5c86e5..319e9e71f 100644 --- a/examples/storage/storage.go +++ b/examples/storage/storage.go @@ -1,7 +1,7 @@ package storage_contract import ( - "github.com/CityOfZion/neo-storm/interop/storage" + "github.com/CityOfZion/neo-go/pkg/interop/storage" ) func Main(operation string, args []interface{}) interface{} { diff --git a/examples/token-sale/token_sale.go b/examples/token-sale/token_sale.go index 4402d8ccc..2dd8edb0f 100644 --- a/examples/token-sale/token_sale.go +++ b/examples/token-sale/token_sale.go @@ -1,9 +1,9 @@ package tokensale import ( - "github.com/CityOfZion/neo-go/pkg/vm/api/runtime" - "github.com/CityOfZion/neo-go/pkg/vm/api/storage" - "github.com/CityOfZion/neo-go/pkg/vm/api/util" + "github.com/CityOfZion/neo-go/pkg/interop/runtime" + "github.com/CityOfZion/neo-go/pkg/interop/storage" + "github.com/CityOfZion/neo-go/pkg/interop/util" ) const ( diff --git a/examples/token/nep5/nep5.go b/examples/token/nep5/nep5.go index cd38ab81a..e4bc2267e 100644 --- a/examples/token/nep5/nep5.go +++ b/examples/token/nep5/nep5.go @@ -1,10 +1,10 @@ package nep5 import ( - "github.com/CityOfZion/neo-storm/interop/engine" - "github.com/CityOfZion/neo-storm/interop/runtime" - "github.com/CityOfZion/neo-storm/interop/storage" - "github.com/CityOfZion/neo-storm/interop/util" + "github.com/CityOfZion/neo-go/pkg/interop/engine" + "github.com/CityOfZion/neo-go/pkg/interop/runtime" + "github.com/CityOfZion/neo-go/pkg/interop/storage" + "github.com/CityOfZion/neo-go/pkg/interop/util" ) // Token holds all token info diff --git a/examples/token/token.go b/examples/token/token.go index 834d0ffbd..1f1c62fa8 100644 --- a/examples/token/token.go +++ b/examples/token/token.go @@ -1,10 +1,10 @@ package token_contract import ( - "github.com/CityOfZion/neo-storm/examples/token/nep5" + "github.com/CityOfZion/neo-go/examples/token/nep5" - "github.com/CityOfZion/neo-storm/interop/storage" - "github.com/CityOfZion/neo-storm/interop/util" + "github.com/CityOfZion/neo-go/pkg/interop/storage" + "github.com/CityOfZion/neo-go/pkg/interop/util" ) const ( diff --git a/interop/account/account.go b/pkg/interop/account/account.go similarity index 89% rename from interop/account/account.go rename to pkg/interop/account/account.go index cb60fac54..c25903c1b 100644 --- a/interop/account/account.go +++ b/pkg/interop/account/account.go @@ -1,7 +1,7 @@ package account // Package account provides function signatures that can be used inside -// smart contracts that are written in the neo-storm framework. +// smart contracts that are written in the neo-go framework. // Account stubs a NEO account type. type Account struct{} diff --git a/interop/asset/asset.go b/pkg/interop/asset/asset.go similarity index 94% rename from interop/asset/asset.go rename to pkg/interop/asset/asset.go index e3242b777..a7a46db97 100644 --- a/interop/asset/asset.go +++ b/pkg/interop/asset/asset.go @@ -1,7 +1,7 @@ package asset // Package asset provides function signatures that can be used inside -// smart contracts that are written in the neo-storm framework. +// smart contracts that are written in the neo-go framework. // Asset stubs a NEO asset type. type Asset struct{} diff --git a/interop/attribute/attribute.go b/pkg/interop/attribute/attribute.go similarity index 85% rename from interop/attribute/attribute.go rename to pkg/interop/attribute/attribute.go index e53a06165..6147b5be2 100644 --- a/interop/attribute/attribute.go +++ b/pkg/interop/attribute/attribute.go @@ -1,7 +1,7 @@ package attribute // Package attribute provides function signatures that can be used inside -// smart contracts that are written in the neo-storm framework. +// smart contracts that are written in the neo-go framework. // Attribute stubs a NEO transaction attribute type. type Attribute struct{} diff --git a/interop/block/block.go b/pkg/interop/block/block.go similarity index 83% rename from interop/block/block.go rename to pkg/interop/block/block.go index 11fc9f6b4..2f3bf6738 100644 --- a/interop/block/block.go +++ b/pkg/interop/block/block.go @@ -1,9 +1,9 @@ package block -import "github.com/CityOfZion/neo-storm/interop/transaction" +import "github.com/CityOfZion/neo-go/pkg/interop/transaction" // Package block provides function signatures that can be used inside -// smart contracts that are written in the neo-storm framework. +// smart contracts that are written in the neo-go framework. // Block stubs a NEO block type. type Block struct{} diff --git a/interop/blockchain/blockchain.go b/pkg/interop/blockchain/blockchain.go similarity index 76% rename from interop/blockchain/blockchain.go rename to pkg/interop/blockchain/blockchain.go index 80f12a676..d27bdaa07 100644 --- a/interop/blockchain/blockchain.go +++ b/pkg/interop/blockchain/blockchain.go @@ -1,16 +1,16 @@ package blockchain import ( - "github.com/CityOfZion/neo-storm/interop/account" - "github.com/CityOfZion/neo-storm/interop/asset" - "github.com/CityOfZion/neo-storm/interop/block" - "github.com/CityOfZion/neo-storm/interop/contract" - "github.com/CityOfZion/neo-storm/interop/header" - "github.com/CityOfZion/neo-storm/interop/transaction" + "github.com/CityOfZion/neo-go/pkg/interop/account" + "github.com/CityOfZion/neo-go/pkg/interop/asset" + "github.com/CityOfZion/neo-go/pkg/interop/block" + "github.com/CityOfZion/neo-go/pkg/interop/contract" + "github.com/CityOfZion/neo-go/pkg/interop/header" + "github.com/CityOfZion/neo-go/pkg/interop/transaction" ) // Package blockchain provides function signatures that can be used inside -// smart contracts that are written in the neo-storm framework. +// smart contracts that are written in the neo-go framework. // GetHeight returns the height of te block recorded in the current execution scope. func GetHeight() int { diff --git a/interop/contract/contract.go b/pkg/interop/contract/contract.go similarity index 90% rename from interop/contract/contract.go rename to pkg/interop/contract/contract.go index d9f4676e6..55f60c0ad 100644 --- a/interop/contract/contract.go +++ b/pkg/interop/contract/contract.go @@ -1,9 +1,9 @@ package contract -import "github.com/CityOfZion/neo-storm/interop/storage" +import "github.com/CityOfZion/neo-go/pkg/interop/storage" // Package contract provides function signatures that can be used inside -// smart contracts that are written in the neo-storm framework. +// smart contracts that are written in the neo-go framework. // Contract stubs a NEO contract type. type Contract struct{} diff --git a/interop/crypto/crypto.go b/pkg/interop/crypto/crypto.go similarity index 87% rename from interop/crypto/crypto.go rename to pkg/interop/crypto/crypto.go index b9d71325e..6877fd46e 100644 --- a/interop/crypto/crypto.go +++ b/pkg/interop/crypto/crypto.go @@ -1,7 +1,7 @@ package crypto // Package crypto provides function signatures that can be used inside -// smart contracts that are written in the neo-storm framework. +// smart contracts that are written in the neo-go framework. // SHA1 computes the sha1 hash of b. func SHA1(b []byte) []byte { diff --git a/interop/engine/engine.go b/pkg/interop/engine/engine.go similarity index 85% rename from interop/engine/engine.go rename to pkg/interop/engine/engine.go index 0b2c838f1..057d42728 100644 --- a/interop/engine/engine.go +++ b/pkg/interop/engine/engine.go @@ -1,9 +1,9 @@ package engine -import "github.com/CityOfZion/neo-storm/interop/transaction" +import "github.com/CityOfZion/neo-go/pkg/interop/transaction" // Package engine provides function signatures that can be used inside -// smart contracts that are written in the neo-storm framework. +// smart contracts that are written in the neo-go framework. // GetScriptContainer returns the transaction that is in the execution context. func GetScriptContainer() transaction.Transaction { diff --git a/interop/enumerator/enumerator.go b/pkg/interop/enumerator/enumerator.go similarity index 91% rename from interop/enumerator/enumerator.go rename to pkg/interop/enumerator/enumerator.go index e2b906c34..8da72424d 100644 --- a/interop/enumerator/enumerator.go +++ b/pkg/interop/enumerator/enumerator.go @@ -1,7 +1,7 @@ package enumerator // Package enumerator provides function signatures that can be used inside -// smart contracts that are written in the neo-storm framework. +// smart contracts that are written in the neo-go framework. // TODO: Check enumerator use cases and add them to the examples folder. diff --git a/interop/header/header.go b/pkg/interop/header/header.go similarity index 94% rename from interop/header/header.go rename to pkg/interop/header/header.go index 29fa5d9da..44fc2d9e6 100644 --- a/interop/header/header.go +++ b/pkg/interop/header/header.go @@ -1,7 +1,7 @@ package header // Package header provides function signatures that can be used inside -// smart contracts that are written in the neo-storm framework. +// smart contracts that are written in the neo-go framework. // Header stubs a NEO block header type. type Header struct{} diff --git a/interop/input/input.go b/pkg/interop/input/input.go similarity index 84% rename from interop/input/input.go rename to pkg/interop/input/input.go index cdc0a0336..047637226 100644 --- a/interop/input/input.go +++ b/pkg/interop/input/input.go @@ -1,7 +1,7 @@ package input // Package input provides function signatures that can be used inside -// smart contracts that are written in the neo-storm framework. +// smart contracts that are written in the neo-go framework. // Input stubs the input of a NEO transaction. type Input struct{} diff --git a/interop/iterator/iterator.go b/pkg/interop/iterator/iterator.go similarity index 90% rename from interop/iterator/iterator.go rename to pkg/interop/iterator/iterator.go index 352cf3f17..c63d3b93d 100644 --- a/interop/iterator/iterator.go +++ b/pkg/interop/iterator/iterator.go @@ -1,7 +1,7 @@ package iterator // Package iterator provides function signatures that can be used inside -// smart contracts that are written in the neo-storm framework. +// smart contracts that are written in the neo-go framework. // Iterator stubs a NEO iterator object type. type Iterator struct{} diff --git a/interop/output/output.go b/pkg/interop/output/output.go similarity index 88% rename from interop/output/output.go rename to pkg/interop/output/output.go index 08f2230df..6f40ac544 100644 --- a/interop/output/output.go +++ b/pkg/interop/output/output.go @@ -1,7 +1,7 @@ package output // Package output provides function signatures that can be used inside -// smart contracts that are written in the neo-storm framework. +// smart contracts that are written in the neo-go framework. // Output stubs the output of a NEO transaction. type Output struct{} diff --git a/interop/runtime/runtime.go b/pkg/interop/runtime/runtime.go similarity index 94% rename from interop/runtime/runtime.go rename to pkg/interop/runtime/runtime.go index 40df58b17..fd07d7bd6 100644 --- a/interop/runtime/runtime.go +++ b/pkg/interop/runtime/runtime.go @@ -1,7 +1,7 @@ package runtime // Package runtime provides function signatures that can be used inside -// smart contracts that are written in the neo-storm framework. +// smart contracts that are written in the neo-go framework. // CheckWitness verifies if the given hash is the invoker of the contract. func CheckWitness(hash []byte) bool { diff --git a/interop/storage/storage.go b/pkg/interop/storage/storage.go similarity index 84% rename from interop/storage/storage.go rename to pkg/interop/storage/storage.go index 25cf4ef34..2391fd550 100644 --- a/interop/storage/storage.go +++ b/pkg/interop/storage/storage.go @@ -1,9 +1,9 @@ package storage -import "github.com/CityOfZion/neo-storm/interop/iterator" +import "github.com/CityOfZion/neo-go/pkg/interop/iterator" // Package storage provides function signatures that can be used inside -// smart contracts that are written in the neo-storm framework. +// smart contracts that are written in the neo-go framework. // Context represents the storage context type Context struct{} diff --git a/interop/transaction/transaction.go b/pkg/interop/transaction/transaction.go similarity index 84% rename from interop/transaction/transaction.go rename to pkg/interop/transaction/transaction.go index 44ba46728..550c796d4 100644 --- a/interop/transaction/transaction.go +++ b/pkg/interop/transaction/transaction.go @@ -1,13 +1,13 @@ package transaction import ( - "github.com/CityOfZion/neo-storm/interop/attribute" - "github.com/CityOfZion/neo-storm/interop/input" - "github.com/CityOfZion/neo-storm/interop/output" + "github.com/CityOfZion/neo-go/pkg/interop/attribute" + "github.com/CityOfZion/neo-go/pkg/interop/input" + "github.com/CityOfZion/neo-go/pkg/interop/output" ) // Package transaction provides function signatures that can be used inside -// smart contracts that are written in the neo-storm framework. +// smart contracts that are written in the neo-go framework. // Transaction stubs a NEO transaction type. type Transaction struct{} diff --git a/interop/util/util.go b/pkg/interop/util/util.go similarity index 100% rename from interop/util/util.go rename to pkg/interop/util/util.go diff --git a/pkg/vm/README.md b/pkg/vm/README.md index 46e21b560..cff6635d4 100644 --- a/pkg/vm/README.md +++ b/pkg/vm/README.md @@ -117,7 +117,7 @@ You can invoke smart contracts with arguments. Take the following ***roll the di ``` package rollthedice -import "github.com/CityOfZion/neo-go/pkg/vm/api/runtime" +import "github.com/CityOfZion/neo-go/pkg/interop/runtime" func Main(method string, args []interface{}) int { if method == "rollDice" { diff --git a/pkg/vm/api/asset/asset.go b/pkg/vm/api/asset/asset.go deleted file mode 100644 index edc4aa99a..000000000 --- a/pkg/vm/api/asset/asset.go +++ /dev/null @@ -1,31 +0,0 @@ -package asset - -import "github.com/CityOfZion/neo-go/pkg/core" - -// GetAssetID returns the id of the given asset. -func GetAssetID(asset *core.AssetState) []byte { return nil } - -// TODO: Verify if we need to return a uint8 here. -// GetAssetType returns the type of the given asset. -func GetAssetType(asset *core.AssetState) uint8 { return 0x00 } - -// GetAmount returns the amount of the given asset. -func GetAmount(asset *core.AssetState) uint64 { return 0 } - -// GetAvailable returns the available amount of the given asset. -func GetAvailable(asset *core.AssetState) uint64 { return 0 } - -// GetPrecision returns the precision the given asset. -func GetPrecision(asset *core.AssetState) uint8 { return 0 } - -// GetOwner returns the owner the given asset. -func GetOwner(asset *core.AssetState) []byte { return nil } - -// GetIssuer returns the issuer the given asset. -func GetIssuer(asset *core.AssetState) []byte { return nil } - -// Create a new asset specified by the given parameters. -func Create(typ uint8, name string, amount uint64, owner, admin, issuer []byte) {} - -// Renew the given asset for the given x years. -func Renew(asset *core.AssetState, years uint32) {} diff --git a/pkg/vm/api/block/block.go b/pkg/vm/api/block/block.go deleted file mode 100644 index ad3b4d8a1..000000000 --- a/pkg/vm/api/block/block.go +++ /dev/null @@ -1,41 +0,0 @@ -package block - -import ( - "github.com/CityOfZion/neo-go/pkg/core" - "github.com/CityOfZion/neo-go/pkg/core/transaction" -) - -// GetTransactionCount returns the number of transactions that are recorded in -// the given block. -func GetTransactionCount(block *core.Block) int { return 0 } - -// GetTransactions returns a list of transactions that are recorded in this block. -func GetTransactions(block *core.Block) []*transaction.Transaction { return nil } - -// GetIndex returns the index of the given block. -func GetIndex(block *core.Block) uint32 { return 0 } - -// GetHash returns the hash of the given block. -func GetHash(block *core.Block) []byte { return nil } - -// GetHash returns the version of the given block. -func GetVersion(block *core.Block) uint32 { return 0 } - -// GetHash returns the previous hash of the given block. -func GetPrevHash(block *core.Block) []byte { return nil } - -// GetHash returns the merkle root of the given block. -func GetMerkleRoot(block *core.Block) []byte { return nil } - -// GetHash returns the timestamp of the given block. -func GetTimestamp(block *core.Block) uint32 { return 0 } - -// GetHash returns the next validator address of the given block. -func GetNextConsensus(block *core.Block) []byte { return nil } - -// GetConsensusData returns the consensus data of the given block. -func GetConsensusData(block *core.Block) uint64 { return 0 } - -// GetTransaction returns a specific transaction that is recorded in the given block -// by the given index. -func GetTransaction(block *core.Block, index int) *transaction.Transaction { return nil } diff --git a/pkg/vm/api/crypto/util.go b/pkg/vm/api/crypto/util.go deleted file mode 100644 index d2f734564..000000000 --- a/pkg/vm/api/crypto/util.go +++ /dev/null @@ -1,21 +0,0 @@ -package crypto - -// SHA1 computes the sha1 hash of b. -func SHA1(b []byte) []byte { - return nil -} - -// SHA256 computes the sha256 hash of b. -func SHA256(b []byte) []byte { - return nil -} - -// Hash160 .. -func Hash160(b []byte) []byte { - return nil -} - -// Hash256 .. -func Hash256(b []byte) []byte { - return nil -} diff --git a/pkg/vm/api/header/header.go b/pkg/vm/api/header/header.go deleted file mode 100644 index c4254bd94..000000000 --- a/pkg/vm/api/header/header.go +++ /dev/null @@ -1,24 +0,0 @@ -package header - -import "github.com/CityOfZion/neo-go/pkg/core" - -// GetIndex returns the index of the given header. -func GetIndex(header *core.Header) uint32 { return 0 } - -// GetHash returns the hash of the given header. -func GetHash(header *core.Header) []byte { return nil } - -// GetHash returns the version of the given header. -func GetVersion(header *core.Header) uint32 { return 0 } - -// GetHash returns the previous hash of the given header. -func GetPrevHash(header *core.Header) []byte { return nil } - -// GetHash returns the merkle root of the given header. -func GetMerkleRoot(header *core.Header) []byte { return nil } - -// GetHash returns the timestamp of the given header. -func GetTimestamp(header *core.Header) uint32 { return 0 } - -// GetHash returns the next validator address of the given header. -func GetNextConsensus(header *core.Header) []byte { return nil } diff --git a/pkg/vm/api/runtime/runtime.go b/pkg/vm/api/runtime/runtime.go deleted file mode 100644 index 685db4937..000000000 --- a/pkg/vm/api/runtime/runtime.go +++ /dev/null @@ -1,45 +0,0 @@ -package runtime - -// CheckWitness verifies if the invoker is the owner of the contract. -func CheckWitness(hash []byte) bool { - return true -} - -// GetTime returns the timestamp of the most recent block. -func GetTime() int { - return 0 -} - -// Notify an event to the VM. -func Notify(arg interface{}) int { - return 0 -} - -// Log instructs the VM to log the given message. -func Log(message string) {} - -// Application returns the application trigger type. -func Application() byte { - return 0x10 -} - -// Verification returns the verification trigger type. -func Verification() byte { - return 0x00 -} - -// GetTrigger return the current trigger type. The return in this function -// doesn't really mather, this is just an interop placeholder. -func GetTrigger() interface{} { - return 0 -} - -// Serialize serializes and item into a bytearray. -func Serialize(item interface{}) []byte { - return nil -} - -// Deserialize an item from a bytearray. -func Deserialize(b []byte) interface{} { - return nil -} diff --git a/pkg/vm/api/storage/storage.go b/pkg/vm/api/storage/storage.go deleted file mode 100644 index ed8cea536..000000000 --- a/pkg/vm/api/storage/storage.go +++ /dev/null @@ -1,19 +0,0 @@ -package storage - -// Context represents the storage context. -type Context interface{} - -// GetContext returns the storage context. -func GetContext() interface{} { return nil } - -// Put stores a value in to the storage. -func Put(ctx interface{}, key interface{}, value interface{}) {} - -// Get returns the value from the storage. -func Get(ctx interface{}, key interface{}) interface{} { return 0 } - -// Delete removes a stored key value pair. -func Delete(ctx interface{}, key interface{}) {} - -// Find entries somewhat matching the given key. -func Find(ctx interface{}, key interface{}) interface{} { return 0 } diff --git a/pkg/vm/api/transaction/transaction.go b/pkg/vm/api/transaction/transaction.go deleted file mode 100644 index e0744e217..000000000 --- a/pkg/vm/api/transaction/transaction.go +++ /dev/null @@ -1,27 +0,0 @@ -package transaction - -import "github.com/CityOfZion/neo-go/pkg/core/transaction" - -// GetType returns the type of the given transaction. -// TODO: Double check if the type returned should be of type uint8. -func GetType(tx *transaction.Transaction) uint8 { return 0x00 } - -// GetTXHash returns the hash of the given transaction. -func GetTXHash(tx *transaction.Transaction) []byte { return nil } - -// GetAttributes returns the attributes of the given transaction. -func GetAttributes(tx *transaction.Transaction) []*transaction.Attribute { return nil } - -// GetInputs returns the inputs of the given transaction. -func GetInputs(tx *transaction.Transaction) []*transaction.Input { return nil } - -// GetOutputs returns the outputs of the given transaction. -func GetOutputs(tx *transaction.Transaction) []*transaction.Output { return nil } - -// TODO: What does this return as data type? -// GetReferences returns the outputs of the given transaction. -// func GetReferences(tx *transaction.Transaction) { } - -// TODO: What does this return as data type? -// GetUnspentCoins returns the unspent coins of the given transaction. -// func GetUnspentCoins(tx *transaction.Transaction) { } diff --git a/pkg/vm/api/types/block.go b/pkg/vm/api/types/block.go deleted file mode 100644 index 928449db6..000000000 --- a/pkg/vm/api/types/block.go +++ /dev/null @@ -1,9 +0,0 @@ -package types - -// Block represents a block in the blockchain. -type Block struct{} - -// Index returns the height of the block. -func (b Block) Index() int { - return 0 -} diff --git a/pkg/vm/api/util/util.go b/pkg/vm/api/util/util.go deleted file mode 100644 index fee3d9b05..000000000 --- a/pkg/vm/api/util/util.go +++ /dev/null @@ -1,6 +0,0 @@ -package util - -// FromAddress returns the underlying bytes from the given address string. -func FromAddress(address string) []byte { - return nil -} diff --git a/pkg/vm/compiler/README.md b/pkg/vm/compiler/README.md index 3d2cbb44f..9592950e5 100644 --- a/pkg/vm/compiler/README.md +++ b/pkg/vm/compiler/README.md @@ -118,8 +118,8 @@ Will output something like: package mycontract import ( - "github.com/CityOfZion/neo-go/pkg/vm/api/runtime" - "github.com/CityOfZion/neo-go/pkg/vm/api/util" + "github.com/CityOfZion/neo-go/pkg/interop/runtime" + "github.com/CityOfZion/neo-go/pkg/interop/util" ) var owner = util.FromAddress("AJX1jGfj3qPBbpAKjY527nPbnrnvSx9nCg") @@ -142,8 +142,8 @@ func Main() bool { package mytoken import ( - "github.com/CityOfZion/neo-go/pkg/vm/api/runtime" - "github.com/CityOfZion/neo-go/pkg/vm/api/storage" + "github.com/CityOfZion/neo-go/pkg/interop/runtime" + "github.com/CityOfZion/neo-go/pkg/interop/storage" ) var owner = util.FromAddress("AJX1jGfj3qPBbpAKjY527nPbnrnvSx9nCg") diff --git a/pkg/vm/tests/syscall_test.go b/pkg/vm/tests/syscall_test.go index 5b3e4c883..a19e9dcb3 100644 --- a/pkg/vm/tests/syscall_test.go +++ b/pkg/vm/tests/syscall_test.go @@ -8,7 +8,7 @@ func TestStoragePutGet(t *testing.T) { src := ` package foo - import "github.com/CityOfZion/neo-go/pkg/vm/api/storage" + import "github.com/CityOfZion/neo-go/pkg/interop/storage" func Main() string { ctx := storage.GetContext() diff --git a/pkg/vm/tests/util_test.go b/pkg/vm/tests/util_test.go index db56be0a3..2da750d91 100644 --- a/pkg/vm/tests/util_test.go +++ b/pkg/vm/tests/util_test.go @@ -8,7 +8,7 @@ func TestSHA256(t *testing.T) { src := ` package foo import ( - "github.com/CityOfZion/neo-go/pkg/vm/api/crypto" + "github.com/CityOfZion/neo-go/pkg/interop/crypto" ) func Main() []byte { src := []byte{0x97} @@ -23,7 +23,7 @@ func TestSHA1(t *testing.T) { src := ` package foo import ( - "github.com/CityOfZion/neo-go/pkg/vm/api/crypto" + "github.com/CityOfZion/neo-go/pkg/interop/crypto" ) func Main() []byte { src := []byte{0x97} @@ -38,7 +38,7 @@ func TestHash160(t *testing.T) { src := ` package foo import ( - "github.com/CityOfZion/neo-go/pkg/vm/api/crypto" + "github.com/CityOfZion/neo-go/pkg/interop/crypto" ) func Main() []byte { src := []byte{0x97} @@ -53,7 +53,7 @@ func TestHash256(t *testing.T) { src := ` package foo import ( - "github.com/CityOfZion/neo-go/pkg/vm/api/crypto" + "github.com/CityOfZion/neo-go/pkg/interop/crypto" ) func Main() []byte { src := []byte{0x97}