Documentation ¶
Index ¶
- Variables
- type ABI
- func (*ABI) Descriptor() ([]byte, []int)
- func (m *ABI) GetArgs() []string
- func (m *ABI) GetGasPrice() int64
- func (m *ABI) GetLimit() *Cost
- func (m *ABI) GetName() string
- func (m *ABI) GetPayment() int32
- func (m *ABI) Marshal() (dAtA []byte, err error)
- func (m *ABI) MarshalTo(dAtA []byte) (int, error)
- func (*ABI) ProtoMessage()
- func (m *ABI) Reset()
- func (m *ABI) Size() (n int)
- func (m *ABI) String() string
- func (m *ABI) Unmarshal(dAtA []byte) error
- func (m *ABI) XXX_DiscardUnknown()
- func (m *ABI) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *ABI) XXX_Merge(src proto.Message)
- func (m *ABI) XXX_Size() int
- func (m *ABI) XXX_Unmarshal(b []byte) error
- type Compiler
- type Contract
- func (c *Contract) ABI(name string) *ABI
- func (c *Contract) B64Decode(str string) error
- func (c *Contract) B64Encode() string
- func (c *Contract) Decode(str string) error
- func (*Contract) Descriptor() ([]byte, []int)
- func (c *Contract) Encode() string
- func (m *Contract) GetCode() string
- func (m *Contract) GetID() string
- func (m *Contract) GetInfo() *Info
- func (m *Contract) Marshal() (dAtA []byte, err error)
- func (m *Contract) MarshalTo(dAtA []byte) (int, error)
- func (*Contract) ProtoMessage()
- func (m *Contract) Reset()
- func (m *Contract) Size() (n int)
- func (m *Contract) String() string
- func (m *Contract) Unmarshal(dAtA []byte) error
- func (m *Contract) XXX_DiscardUnknown()
- func (m *Contract) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *Contract) XXX_Merge(src proto.Message)
- func (m *Contract) XXX_Size() int
- func (m *Contract) XXX_Unmarshal(b []byte) error
- type Cost
- func (c *Cost) AddAssign(a *Cost)
- func (*Cost) Descriptor() ([]byte, []int)
- func (m *Cost) GetCPU() int64
- func (m *Cost) GetData() int64
- func (m *Cost) GetNet() int64
- func (c *Cost) IsOverflow(limit *Cost) bool
- func (m *Cost) Marshal() (dAtA []byte, err error)
- func (m *Cost) MarshalTo(dAtA []byte) (int, error)
- func (*Cost) ProtoMessage()
- func (m *Cost) Reset()
- func (m *Cost) Size() (n int)
- func (m *Cost) String() string
- func (c Cost) ToGas() int64
- func (m *Cost) Unmarshal(dAtA []byte) error
- func (m *Cost) XXX_DiscardUnknown()
- func (m *Cost) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *Cost) XXX_Merge(src proto.Message)
- func (m *Cost) XXX_Size() int
- func (m *Cost) XXX_Unmarshal(b []byte) error
- type Info
- func (*Info) Descriptor() ([]byte, []int)
- func (m *Info) GetAbi() []*ABI
- func (m *Info) GetLang() string
- func (m *Info) GetVersion() string
- func (m *Info) Marshal() (dAtA []byte, err error)
- func (m *Info) MarshalTo(dAtA []byte) (int, error)
- func (*Info) ProtoMessage()
- func (m *Info) Reset()
- func (m *Info) Size() (n int)
- func (m *Info) String() string
- func (m *Info) Unmarshal(dAtA []byte) error
- func (m *Info) XXX_DiscardUnknown()
- func (m *Info) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *Info) XXX_Merge(src proto.Message)
- func (m *Info) XXX_Size() int
- func (m *Info) XXX_Unmarshal(b []byte) error
- type PaymentCode
- type VersionCode
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrInvalidLengthContract = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowContract = fmt.Errorf("proto: integer overflow") )
Functions ¶
This section is empty.
Types ¶
type ABI ¶
type ABI struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` Payment int32 `protobuf:"varint,2,opt,name=payment,proto3" json:"payment,omitempty"` Limit *Cost `protobuf:"bytes,3,opt,name=limit" json:"limit,omitempty"` GasPrice int64 `protobuf:"varint,4,opt,name=gas_price,json=gasPrice,proto3" json:"gas_price,omitempty"` Args []string `protobuf:"bytes,5,rep,name=args" json:"args,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*ABI) Descriptor ¶
func (*ABI) GetGasPrice ¶
func (*ABI) GetPayment ¶
func (*ABI) ProtoMessage ¶
func (*ABI) ProtoMessage()
func (*ABI) XXX_DiscardUnknown ¶
func (m *ABI) XXX_DiscardUnknown()
func (*ABI) XXX_Unmarshal ¶
type Contract ¶
type Contract struct { ID string `protobuf:"bytes,1,opt,name=ID,proto3" json:"ID,omitempty"` Info *Info `protobuf:"bytes,2,opt,name=info" json:"info,omitempty"` Code string `protobuf:"bytes,3,opt,name=code,proto3" json:"code,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func DecodeContract ¶
DecodeContract static method to decode contract from string
func (*Contract) Descriptor ¶
func (*Contract) ProtoMessage ¶
func (*Contract) ProtoMessage()
func (*Contract) XXX_DiscardUnknown ¶
func (m *Contract) XXX_DiscardUnknown()
func (*Contract) XXX_Marshal ¶
func (*Contract) XXX_Unmarshal ¶
type Cost ¶
type Cost struct { Data int64 `protobuf:"varint,1,opt,name=data,proto3" json:"data,omitempty"` Net int64 `protobuf:"varint,2,opt,name=net,proto3" json:"net,omitempty"` CPU int64 `protobuf:"varint,3,opt,name=CPU,proto3" json:"CPU,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Cost) Descriptor ¶
func (*Cost) IsOverflow ¶
IsOverflow decide if exceed limit
func (*Cost) ProtoMessage ¶
func (*Cost) ProtoMessage()
func (*Cost) XXX_DiscardUnknown ¶
func (m *Cost) XXX_DiscardUnknown()
func (*Cost) XXX_Unmarshal ¶
type Info ¶
type Info struct { Lang string `protobuf:"bytes,1,opt,name=lang,proto3" json:"lang,omitempty"` Version string `protobuf:"bytes,2,opt,name=version,proto3" json:"version,omitempty"` Abi []*ABI `protobuf:"bytes,3,rep,name=abi" json:"abi,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Info) Descriptor ¶
func (*Info) GetVersion ¶
func (*Info) ProtoMessage ¶
func (*Info) ProtoMessage()
func (*Info) XXX_DiscardUnknown ¶
func (m *Info) XXX_DiscardUnknown()
func (*Info) XXX_Unmarshal ¶
type PaymentCode ¶
type PaymentCode int32
PaymentCode payment mode of contract
const ( SelfPay PaymentCode = iota ContractPay )
Payment mode
Click to show internal directories.
Click to hide internal directories.