Documentation ¶
Index ¶
- Constants
- Variables
- type ContractRequestBase
- type ContractResponseBase
- type CreateAccountRequest
- type CreateAccountResponse
- type DebugFacade
- func (f *DebugFacade) CreateAccount(request CreateAccountRequest) (*CreateAccountResponse, error)
- func (f *DebugFacade) DeploySmartContract(request DeployRequest) (*DeployResponse, error)
- func (f *DebugFacade) QuerySmartContract(request QueryRequest) (*QueryResponse, error)
- func (f *DebugFacade) RunSmartContract(request RunRequest) (*RunResponse, error)
- func (f *DebugFacade) UpgradeSmartContract(request UpgradeRequest) (*UpgradeResponse, error)
- type DebugServer
- type DeployRequest
- type DeployResponse
- type QueryRequest
- type QueryResponse
- type RequestBase
- type RequestError
- type ResponseBase
- type RunRequest
- type RunResponse
- type UpgradeRequest
- type UpgradeResponse
Constants ¶
const DefaultGasPrice = 200000000000
DefaultGasPrice is the default gas price for debugging
Variables ¶
var ErrInvalidArgumentEncoding = errors.New("invalid contract argument encoding")
ErrInvalidArgumentEncoding signals an error
Functions ¶
This section is empty.
Types ¶
type ContractRequestBase ¶
type ContractRequestBase struct { RequestBase ImpersonatedHex string Impersonated []byte Value string ValueAsBigInt *big.Int GasPrice uint64 GasLimit uint64 }
ContractRequestBase is a CLI / REST request message
type ContractResponseBase ¶
type ContractResponseBase struct { ResponseBase Input *vmcommon.VMInput Output *vmcommon.VMOutput ReturnCodeString string }
ContractResponseBase is a CLI / REST response message
type CreateAccountRequest ¶
type CreateAccountRequest struct { RequestBase AddressHex string Address []byte Balance string BalanceAsBigInt *big.Int Nonce uint64 }
CreateAccountRequest is a CLI / REST request message
type CreateAccountResponse ¶
CreateAccountResponse is a CLI / REST response message
type DebugFacade ¶
type DebugFacade struct { }
DebugFacade is the debug facade
func (*DebugFacade) CreateAccount ¶
func (f *DebugFacade) CreateAccount(request CreateAccountRequest) (*CreateAccountResponse, error)
CreateAccount creates a test account
func (*DebugFacade) DeploySmartContract ¶
func (f *DebugFacade) DeploySmartContract(request DeployRequest) (*DeployResponse, error)
DeploySmartContract deploys a smart contract
func (*DebugFacade) QuerySmartContract ¶
func (f *DebugFacade) QuerySmartContract(request QueryRequest) (*QueryResponse, error)
QuerySmartContract queries a pure function of the smart contract
func (*DebugFacade) RunSmartContract ¶
func (f *DebugFacade) RunSmartContract(request RunRequest) (*RunResponse, error)
RunSmartContract executes a smart contract function
func (*DebugFacade) UpgradeSmartContract ¶
func (f *DebugFacade) UpgradeSmartContract(request UpgradeRequest) (*UpgradeResponse, error)
UpgradeSmartContract upgrades a smart contract
type DebugServer ¶
type DebugServer struct {
// contains filtered or unexported fields
}
DebugServer is the debugging server
func NewDebugServer ¶
func NewDebugServer(facade *DebugFacade, address string) *DebugServer
NewDebugServer creates a Server object
func (*DebugServer) Start ¶
func (server *DebugServer) Start() error
Start starts the debugging server
type DeployRequest ¶
type DeployRequest struct { ContractRequestBase CodeHex string Code []byte CodePath string CodeMetadata string CodeMetadataBytes []byte ArgumentsHex []string Arguments [][]byte }
DeployRequest is a CLI / REST request message
type DeployResponse ¶
type DeployResponse struct { ContractResponseBase ContractAddress []byte ContractAddressHex string }
DeployResponse is a CLI / REST response message
type QueryRequest ¶
type QueryRequest struct {
RunRequest
}
QueryRequest is a CLI / REST request message
type QueryResponse ¶
type QueryResponse struct {
ContractResponseBase
}
QueryResponse is a CLI / REST response message
type RequestBase ¶
RequestBase is a CLI / REST request message
type RequestError ¶
RequestError signals an error
func NewRequestErrorMessageInner ¶
func NewRequestErrorMessageInner(message string, err error) *RequestError
NewRequestErrorMessageInner -
func (*RequestError) Error ¶
func (err *RequestError) Error() string
func (*RequestError) Unwrap ¶
func (err *RequestError) Unwrap() error
Unwrap unwraps the inner error
type ResponseBase ¶
type ResponseBase struct {
Error error
}
ResponseBase is a CLI / REST response message
type RunRequest ¶
type RunRequest struct { ContractRequestBase ContractAddressHex string ContractAddress []byte Function string ArgumentsHex []string Arguments [][]byte }
RunRequest is a CLI / REST request message
type RunResponse ¶
type RunResponse struct {
ContractResponseBase
}
RunResponse is a CLI / REST response message
type UpgradeRequest ¶
type UpgradeRequest struct { DeployRequest ContractAddressHex string ContractAddress []byte }
UpgradeRequest is a CLI / REST request message
type UpgradeResponse ¶
type UpgradeResponse struct {
ContractResponseBase
}
UpgradeResponse is a CLI / REST response message