Documentation ¶
Index ¶
- func Encode_Decode() common.Pair
- func FromVariant(v *common.Variants, o *types.SignedTransaction, ...)
- func FromVariantToActionData(actionParams *types.ContractTypesInterface, v *common.Variants, ...)
- func ToABI(abiVec common.HexBytes, abi *AbiDef) bool
- func ToVariant()
- func ToVariantFromActionData(actionParams *types.ContractTypesInterface, v *common.Variants, ...)
- type ABIEncoder
- type AbiDef
- func (a *AbiDef) ActionForName(name common.ActionName) *ActionDef
- func (a *AbiDef) DecodeAction(actionName string, data []byte) ([]byte, error)
- func (a *AbiDef) DecodeStruct(structType string, data []byte) ([]byte, error)
- func (a *AbiDef) EncodeAction(actionName common.ActionName, json []byte) ([]byte, error)
- func (a *AbiDef) EncodeStruct(structName typeName, json []byte) ([]byte, error)
- func (a AbiDef) IsEmpty() bool
- func (a *AbiDef) StructForName(name typeName) *StructDef
- func (a *AbiDef) TableForName(name common.TableName) *TableDef
- func (a *AbiDef) TypeNameForNewTypeName(typeName string) string
- type AbiSerializer
- func (a AbiSerializer) BinaryToVariant(rtype typeName, binary []byte, maxSerializationTime common.Microseconds, ...) common.Variants
- func (a AbiSerializer) BinaryToVariant2(rtype typeName, binary []byte, maxSerializationTime common.Microseconds, ...) []byte
- func (a AbiSerializer) BinaryToVariantPrint(rtype typeName, binary []byte, maxSerializationTime common.Microseconds, ...) interface{}
- func (a *AbiSerializer) ConfigureBuiltInTypes()
- func (a AbiSerializer) FundamentalType(stype typeName) string
- func (a AbiSerializer) GetActionType(action common.Name) typeName
- func (a AbiSerializer) GetErrorMessage(errorCode uint64) string
- func (a AbiSerializer) GetIntegerSize(stype typeName) int
- func (a AbiSerializer) GetStruct(stype typeName) *StructDef
- func (a AbiSerializer) GetTableType(action common.Name) typeName
- func (a AbiSerializer) IsArray(stype typeName) bool
- func (a AbiSerializer) IsBuiltinType(stype typeName) bool
- func (a AbiSerializer) IsEmpty() bool
- func (a AbiSerializer) IsInteger(stype typeName) bool
- func (a AbiSerializer) IsOptional(stype typeName) bool
- func (a AbiSerializer) IsStruct(stype typeName) bool
- func (a AbiSerializer) IsType(rtype typeName, recursionDepth common.SizeT, deadline *common.TimePoint, ...) bool
- func (a AbiSerializer) ResolveType(stype typeName) typeName
- func (a *AbiSerializer) SetAbi(abi *AbiDef, maxSerializationTime common.Microseconds)
- func (a *AbiSerializer) VariantToBinary(name typeName, body *common.Variants, maxSerializationTime common.Microseconds) []byte
- type ActionDef
- type ClausePair
- type ErrorMessage
- type FieldDef
- type Float128
- type Int128
- type Int64
- type StructDef
- type TableDef
- type TypeDef
- type Uint128
- type Uint64
- type VariantDef
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Encode_Decode ¶
func FromVariant ¶
func FromVariant(v *common.Variants, o *types.SignedTransaction, resolver func(account common.AccountName) *AbiSerializer, maxSerialization common.Microseconds)
template<typename M, typename Resolver, not_require_abi_t<M> = 1> static void extract( const variant& v, M& o, Resolver, abi_traverse_context& ctx )
{ auto h = ctx.enter_scope(); from_variant(v, o); }
func FromVariantToActionData ¶
func FromVariantToActionData(actionParams *types.ContractTypesInterface, v *common.Variants, resolver func(account common.AccountName) *AbiSerializer, maxSerialization common.Microseconds)
func ToVariantFromActionData ¶
func ToVariantFromActionData(actionParams *types.ContractTypesInterface, v *common.Variants, resolver func(account common.AccountName) *AbiSerializer, maxSerialization common.Microseconds)
Types ¶
type ABIEncoder ¶
type ABIEncoder struct {
// contains filtered or unexported fields
}
type AbiDef ¶
type AbiDef struct { Version string `json:"version"` Types []TypeDef `json:"types,omitempty"` Structs []StructDef `json:"structs,omitempty"` Actions []ActionDef `json:"actions,omitempty"` Tables []TableDef `json:"tables,omitempty"` RicardianClauses []ClausePair `json:"ricardian_clauses,omitempty"` ErrorMessages []ErrorMessage `json:"error_messages,omitempty"` Extensions []*types.Extension `json:"abi_extensions,omitempty"` Variants []VariantDef `json:"variants,omitempty"` // TODO may not exit }
func (*AbiDef) ActionForName ¶
func (a *AbiDef) ActionForName(name common.ActionName) *ActionDef
func (*AbiDef) DecodeAction ¶
func (*AbiDef) DecodeStruct ¶
func (*AbiDef) EncodeAction ¶
func (*AbiDef) EncodeStruct ¶
func (*AbiDef) StructForName ¶
func (*AbiDef) TypeNameForNewTypeName ¶
type AbiSerializer ¶
type AbiSerializer struct {
// contains filtered or unexported fields
}
func NewAbiSerializer ¶
func NewAbiSerializer(abi *AbiDef, maxSerializationTime common.Microseconds) *AbiSerializer
func (AbiSerializer) BinaryToVariant ¶
func (a AbiSerializer) BinaryToVariant(rtype typeName, binary []byte, maxSerializationTime common.Microseconds, shortPath bool) common.Variants
fc::variant abi_serializer::binary_to_variant( const type_name& type, const bytes& binary, const fc::microseconds& max_serialization_time, bool short_path )const { impl::binary_to_variant_context ctx(*this, max_serialization_time, type); ctx.short_path = short_path; return _binary_to_variant(type, binary, ctx); } todo shortPath default is false
func (AbiSerializer) BinaryToVariant2 ¶
func (a AbiSerializer) BinaryToVariant2(rtype typeName, binary []byte, maxSerializationTime common.Microseconds, shortPath bool) []byte
func (AbiSerializer) BinaryToVariantPrint ¶
func (a AbiSerializer) BinaryToVariantPrint(rtype typeName, binary []byte, maxSerializationTime common.Microseconds, shortPath bool) interface{}
func (*AbiSerializer) ConfigureBuiltInTypes ¶
func (a *AbiSerializer) ConfigureBuiltInTypes()
func (AbiSerializer) FundamentalType ¶
func (a AbiSerializer) FundamentalType(stype typeName) string
func (AbiSerializer) GetActionType ¶
func (a AbiSerializer) GetActionType(action common.Name) typeName
func (AbiSerializer) GetErrorMessage ¶
func (a AbiSerializer) GetErrorMessage(errorCode uint64) string
func (AbiSerializer) GetIntegerSize ¶
func (a AbiSerializer) GetIntegerSize(stype typeName) int
func (AbiSerializer) GetStruct ¶
func (a AbiSerializer) GetStruct(stype typeName) *StructDef
func (AbiSerializer) GetTableType ¶
func (a AbiSerializer) GetTableType(action common.Name) typeName
func (AbiSerializer) IsArray ¶
func (a AbiSerializer) IsArray(stype typeName) bool
func (AbiSerializer) IsBuiltinType ¶
func (a AbiSerializer) IsBuiltinType(stype typeName) bool
func (AbiSerializer) IsEmpty ¶
func (a AbiSerializer) IsEmpty() bool
func (AbiSerializer) IsInteger ¶
func (a AbiSerializer) IsInteger(stype typeName) bool
func (AbiSerializer) IsOptional ¶
func (a AbiSerializer) IsOptional(stype typeName) bool
func (AbiSerializer) IsStruct ¶
func (a AbiSerializer) IsStruct(stype typeName) bool
func (AbiSerializer) IsType ¶
func (a AbiSerializer) IsType(rtype typeName, recursionDepth common.SizeT, deadline *common.TimePoint, maxSerializationTime common.Microseconds) bool
func (AbiSerializer) ResolveType ¶
func (a AbiSerializer) ResolveType(stype typeName) typeName
func (*AbiSerializer) SetAbi ¶
func (a *AbiSerializer) SetAbi(abi *AbiDef, maxSerializationTime common.Microseconds)
func (*AbiSerializer) VariantToBinary ¶
func (a *AbiSerializer) VariantToBinary(name typeName, body *common.Variants, maxSerializationTime common.Microseconds) []byte
type ActionDef ¶
type ActionDef struct { Name common.ActionName `json:"name"` Type typeName `json:"type"` RicardianContract string `json:"ricardian_contract"` }
type ClausePair ¶
ClausePair represents clauses, related to Ricardian Contracts.
type ErrorMessage ¶
type Float128 ¶
type Float128 Uint128
func (Float128) MarshalJSON ¶
func (*Float128) UnmarshalJSON ¶
type StructDef ¶
type StructDef struct { Name typeName `json:"name"` Base typeName `json:"base"` Fields []FieldDef `json:"fields,omitempty"` }
type TableDef ¶
type TableDef struct { Name common.TableName `json:"name"` IndexType typeName `json:"index_type"` KeyNames []fieldName `json:"key_names,omitempty"` KeyTypes []typeName `json:"key_types,omitempty"` Type typeName `json:"type"` }
TableDef defines a table. See libraries/chain/include/eosio/chain/contracts/types.hpp:78
type TypeDef ¶
type TypeDef struct { NewTypeName typeName `json:"new_type_name"` Type typeName `json:"type"` }
func CommonTypeDefs ¶
func CommonTypeDefs() []TypeDef
type VariantDef ¶
type VariantDef struct { Name typeName `json:"name"` Types []typeName `json:"types"` }
Click to show internal directories.
Click to hide internal directories.