Documentation ¶
Index ¶
- Variables
- func AddFinishData(vmOutput *vmcommon.VMOutput, data []byte)
- func AddNewOutputAccount(vmOutput *vmcommon.VMOutput, address []byte, balanceDelta int64, data []byte) *vmcommon.OutputAccount
- func DefaultTestArwen(t *testing.T, blockchain vmcommon.BlockchainHook, crypto vmcommon.CryptoHook) (*vmHost, error)
- func DefaultTestArwenForCall(t *testing.T, code []byte) (*vmHost, *mock.BlockchainHookStub)
- func DefaultTestArwenForDeployment(t *testing.T, ownerNonce uint64, newAddress []byte) *vmHost
- func DefaultTestArwenForTwoSCs(t *testing.T, firstCode []byte, secondCode []byte) (*vmHost, *mock.BlockchainHookStub)
- func DefaultTestContractCallInput() *vmcommon.ContractCallInput
- func DefaultTestContractCreateInput() *vmcommon.ContractCreateInput
- func GetSCCode(fileName string) []byte
- func GetTestSCCode(scName string, prefixToTestSCs string) []byte
- func MakeVMOutput() *vmcommon.VMOutput
- func NewArwenVM(blockChainHook vmcommon.BlockchainHook, cryptoHook vmcommon.CryptoHook, ...) (*vmHost, error)
- func SetStorageUpdate(account *vmcommon.OutputAccount, key []byte, data []byte)
- func SetStorageUpdateStrings(account *vmcommon.OutputAccount, key string, data string)
- func TryCatch(try TryFunction, catch CatchFunction, catchFallbackMessage string)
- type CatchFunction
- type TryFunction
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrCodeNotFound = errors.New("code not found")
Functions ¶
func AddFinishData ¶ added in v0.3.8
func AddFinishData(vmOutput *vmcommon.VMOutput, data []byte)
func AddNewOutputAccount ¶ added in v0.3.8
func DefaultTestArwen ¶ added in v0.3.8
func DefaultTestArwenForCall ¶ added in v0.3.8
func DefaultTestArwenForCall(t *testing.T, code []byte) (*vmHost, *mock.BlockchainHookStub)
func DefaultTestArwenForDeployment ¶ added in v0.3.8
func DefaultTestArwenForTwoSCs ¶ added in v0.3.8
func DefaultTestContractCallInput ¶ added in v0.3.8
func DefaultTestContractCallInput() *vmcommon.ContractCallInput
func DefaultTestContractCreateInput ¶ added in v0.3.8
func DefaultTestContractCreateInput() *vmcommon.ContractCreateInput
func GetTestSCCode ¶ added in v0.3.8
func MakeVMOutput ¶ added in v0.3.8
func MakeVMOutput() *vmcommon.VMOutput
func NewArwenVM ¶
func SetStorageUpdate ¶ added in v0.3.8
func SetStorageUpdateStrings ¶ added in v0.3.8
func TryCatch ¶
func TryCatch(try TryFunction, catch CatchFunction, catchFallbackMessage string)
TryCatch simulates a try/catch block using golang's recover() functionality
Types ¶
type CatchFunction ¶
type CatchFunction func(error)
CatchFunction corresponds to the catch() part of a try / catch block
type TryFunction ¶
type TryFunction func()
TryFunction corresponds to the try() part of a try / catch block
Click to show internal directories.
Click to hide internal directories.