mudhelpers

package
v0.0.0-...-8ec5cd4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 18, 2023 License: GPL-3.0 Imports: 15 Imported by: 0

README

MudHelpers

To update the store contract, run on an already built mud lib:

cd mud/packages/store/abi/StoreCore.sol
abigen --abi storecore.abi.json --pkg mudhelpers --out generated.go

Documentation

Index

Constants

View Source
const (
	CONNECTOR    string = "__"
	TABLE_PREFIX string = "mode"
)

Variables

View Source
var StorecoreABI = StorecoreMetaData.ABI

StorecoreABI is the input ABI used to generate the binding from. Deprecated: Use StorecoreMetaData.ABI instead.

View Source
var (
	StorecoreAbi abi.ABI
)
View Source
var StorecoreMetaData = &bind.MetaData{
	ABI: "[{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"tableId\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"bytes32[]\",\"name\":\"key\",\"type\":\"bytes32[]\"}],\"name\":\"StoreDeleteRecord\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"tableId\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"bytes32[]\",\"name\":\"key\",\"type\":\"bytes32[]\"},{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"schemaIndex\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"StoreSetField\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"tableId\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"bytes32[]\",\"name\":\"key\",\"type\":\"bytes32[]\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"StoreSetRecord\",\"type\":\"event\"}]",
}

StorecoreMetaData contains all meta data concerning the Storecore contract.

Functions

func CombineStringifySchemaTypes

func CombineStringifySchemaTypes(schemaType []SchemaType) string

func DecodeDataField

func DecodeDataField(encoding []byte, schemaTypePair SchemaTypePair, index uint8) interface{}

DecodeDataField decodes the provided byte encoding using the provided SchemaTypePair and index.

Parameters: - encoding ([]byte): The byte encoding to decode. - schemaTypePair (SchemaTypePair): The SchemaTypePair to use for decoding. - index (uint8): The index of the data field to decode.

Returns: (string): The decoded value of the specified data field.

func DecodeDynamicField

func DecodeDynamicField(schemaType SchemaType, encodingSlice []byte) interface{}

DecodeDynamicField decodes the dynamic field of the specified schema type from the given byte slice encoding.

Parameters: - schemaType (SchemaType): The schema type of the dynamic field to be decoded. - encodingSlice ([]byte): The byte slice encoding of the dynamic field.

Returns: - (string): The decoded value of the dynamic field as a string.

func DecodeStaticField

func DecodeStaticField(schemaType SchemaType, encoding []byte, bytesOffset uint64) interface{}

DecodeStaticField decodes a static field of a given schema type from a byte slice.

Parameters: - schemaType (SchemaType): The schema type of the field to decode. - encoding ([]byte): The byte slice containing the encoded field. - bytesOffset (uint64): The offset in bytes within the encoding byte slice where the field to be decoded starts.

Returns: - string): The decoded field as a string.

func DefaultFieldName

func DefaultFieldName(index int) string

func DefaultKeyName

func DefaultKeyName(index int) string

func GetStaticByteLength

func GetStaticByteLength(schemaType SchemaType) uint64

GetStaticByteLength returns the number of bytes required for a static type schema.

Parameters: - schemaType (SchemaType): The SchemaType instance for which to return the number of bytes.

Returns: (uint64) - The number of bytes required for a static type schema.

func GetStoreAbiEventID

func GetStoreAbiEventID(eventName string) common.Hash

func MetadataTableId

func MetadataTableId() string

func MetadataTableName

func MetadataTableName() string

func Namespace

func Namespace(chainID string, worldAddress string) string

func PaddedTableId

func PaddedTableId(id [32]byte) string

func RightPadId

func RightPadId(id string) []byte

func RowFromDecodedData

func RowFromDecodedData(decodedKeyData *DecodedData, decodedFieldData *DecodedData, keynames *[]string, fieldnames *[]string) map[string]interface{}

func SchemaTableId

func SchemaTableId() string

func SchemaTableName

func SchemaTableName() string

func SchemaTypeToPostgresType

func SchemaTypeToPostgresType(schemaType SchemaType) string

SchemaTypeToPostgresType converts the specified SchemaType instance to the corresponding PostgreSQL type. The function returns a string representing the PostgreSQL type for the specified SchemaType instance.

Parameters: - schemaType (SchemaType): The SchemaType instance to convert to a PostgreSQL type.

Returns: (string) - A string representing the PostgreSQL type for the specified SchemaType instance.

func SchemaTypeToSolidityType

func SchemaTypeToSolidityType(schemaType SchemaType) string

SchemaTypeToSolidityType converts the specified SchemaType instance to the corresponding Solidity type.

Parameters: - schemaType (SchemaType): The SchemaType instance to convert to a Solidity type.

Returns: (string) - A string representing the Solidity type for the specified SchemaType instance.

func StringifySchemaTypes

func StringifySchemaTypes(schemaType []SchemaType) []string

func TableIdToTableName

func TableIdToTableName(tableId string) string

func TableNameToTableId

func TableNameToTableId(tableName string) string

Types

type DataSchemaTypePair

type DataSchemaTypePair struct {
	Data       interface{}
	SchemaType SchemaType
}

type DecodedData

type DecodedData struct {
	// contains filtered or unexported fields
}

func DecodeData

func DecodeData(encoding []byte, schemaTypePair SchemaTypePair) *DecodedData

DecodeData decodes the given byte slice `encoding` into a `DecodedData` object using the provided schema type pair `schemaTypePair`.

To minimize bugs/diff the decoding function (and others) are following @frolic's TS implementation in the client sync patch. We should coordinate whether or not we want to keep the code exactly the same or if we want to refactor / implement in a more idiomatic way.

Parameters: - encoding ([]byte) - The byte slice to be decoded. - schemaTypePair (SchemaTypePair) - The schema type pair used to decode the byte slice.

Returns: - (*DecodedData) - A pointer to the `DecodedData` object.

func DecodeDataField__DecodedData

func DecodeDataField__DecodedData(encoding []byte, schemaTypePair SchemaTypePair, index uint8) *DecodedData

func NewDecodedDataFromSchemaType

func NewDecodedDataFromSchemaType(schemaType []SchemaType) *DecodedData

NewDecodedDataFromSchemaType creates a new instance of DecodedData with the provided list of SchemaType.

Parameters: - schemaType ([]SchemaType): The list of SchemaType to use for the DecodedData instance.

Returns: (*DecodedData): The new DecodedData instance.

func NewDecodedDataFromSchemaTypePair

func NewDecodedDataFromSchemaTypePair(schemaTypePair SchemaTypePair) *DecodedData

NewDecodedDataFromSchemaTypePair creates a new instance of DecodedData with the provided SchemaTypePair.

Parameters: - schemaTypePair (SchemaTypePair): The SchemaTypePair to use for the DecodedData instance.

Returns: (*DecodedData): The new DecodedData instance.

func (*DecodedData) At

func (d *DecodedData) At(index int) *DataSchemaTypePair

At retrieves the DataSchemaTypePair at the given index in the DecodedData instance.

Parameters: - index (int): The index to retrieve the DataSchemaTypePair for.

Returns: (*DataSchemaTypePair): The DataSchemaTypePair at the given index in the DecodedData instance.

func (*DecodedData) DataAt

func (d *DecodedData) DataAt(index int) interface{}

DataAt retrieves the data value at the given index in the DecodedData instance.

Parameters: - index (int): The index to retrieve the data value for.

Returns: (string): The data value at the given index in the DecodedData instance.

func (*DecodedData) Get

func (d *DecodedData) Get(key string) *DataSchemaTypePair

Get retrieves the value for the given key in the DecodedData instance.

Parameters: - key (string): The key to retrieve the value for.

Returns: (*DataSchemaTypePair): The value for the given key in the DecodedData instance.

func (*DecodedData) Length

func (d *DecodedData) Length() int

Length returns the length of the schema types in the DecodedData instance.

Returns: (int): The length of the schema types in the DecodedData instance.

func (*DecodedData) SchemaTypeAt

func (d *DecodedData) SchemaTypeAt(index int) SchemaType

SchemaTypeAt retrieves the schema type at the given index in the DecodedData instance.

Parameters: - index (int): The index to retrieve the schema type for.

Returns: (SchemaType): The schema type at the given index in the DecodedData instance.

func (*DecodedData) SchemaTypes

func (d *DecodedData) SchemaTypes() []SchemaType

SchemaTypes retrieves a slice of all the schema types in the DecodedData instance.

Returns: ([]SchemaType): A slice of all the schema types in the DecodedData instance.

func (*DecodedData) Set

func (d *DecodedData) Set(key string, value *DataSchemaTypePair)

Set sets the value for the given key in the DecodedData instance.

Parameters: - key (string): The key to set the value for. - value (*DataSchemaTypePair): The value to set for the key.

Returns: - void.

type SchemaType

type SchemaType uint64
const (
	UINT8 SchemaType = iota
	UINT16
	UINT24
	UINT32
	UINT40
	UINT48
	UINT56
	UINT64
	UINT72
	UINT80
	UINT88
	UINT96
	UINT104
	UINT112
	UINT120
	UINT128
	UINT136
	UINT144
	UINT152
	UINT160
	UINT168
	UINT176
	UINT184
	UINT192
	UINT200
	UINT208
	UINT216
	UINT224
	UINT232
	UINT240
	UINT248
	UINT256
	INT8
	INT16
	INT24
	INT32
	INT40
	INT48
	INT56
	INT64
	INT72
	INT80
	INT88
	INT96
	INT104
	INT112
	INT120
	INT128
	INT136
	INT144
	INT152
	INT160
	INT168
	INT176
	INT184
	INT192
	INT200
	INT208
	INT216
	INT224
	INT232
	INT240
	INT248
	INT256
	BYTES1
	BYTES2
	BYTES3
	BYTES4
	BYTES5
	BYTES6
	BYTES7
	BYTES8
	BYTES9
	BYTES10
	BYTES11
	BYTES12
	BYTES13
	BYTES14
	BYTES15
	BYTES16
	BYTES17
	BYTES18
	BYTES19
	BYTES20
	BYTES21
	BYTES22
	BYTES23
	BYTES24
	BYTES25
	BYTES26
	BYTES27
	BYTES28
	BYTES29
	BYTES30
	BYTES31
	BYTES32
	BOOL
	ADDRESS
	UINT8_ARRAY
	UINT16_ARRAY
	UINT24_ARRAY
	UINT32_ARRAY
	UINT40_ARRAY
	UINT48_ARRAY
	UINT56_ARRAY
	UINT64_ARRAY
	UINT72_ARRAY
	UINT80_ARRAY
	UINT88_ARRAY
	UINT96_ARRAY
	UINT104_ARRAY
	UINT112_ARRAY
	UINT120_ARRAY
	UINT128_ARRAY
	UINT136_ARRAY
	UINT144_ARRAY
	UINT152_ARRAY
	UINT160_ARRAY
	UINT168_ARRAY
	UINT176_ARRAY
	UINT184_ARRAY
	UINT192_ARRAY
	UINT200_ARRAY
	UINT208_ARRAY
	UINT216_ARRAY
	UINT224_ARRAY
	UINT232_ARRAY
	UINT240_ARRAY
	UINT248_ARRAY
	UINT256_ARRAY
	INT8_ARRAY
	INT16_ARRAY
	INT24_ARRAY
	INT32_ARRAY
	INT40_ARRAY
	INT48_ARRAY
	INT56_ARRAY
	INT64_ARRAY
	INT72_ARRAY
	INT80_ARRAY
	INT88_ARRAY
	INT96_ARRAY
	INT104_ARRAY
	INT112_ARRAY
	INT120_ARRAY
	INT128_ARRAY
	INT136_ARRAY
	INT144_ARRAY
	INT152_ARRAY
	INT160_ARRAY
	INT168_ARRAY
	INT176_ARRAY
	INT184_ARRAY
	INT192_ARRAY
	INT200_ARRAY
	INT208_ARRAY
	INT216_ARRAY
	INT224_ARRAY
	INT232_ARRAY
	INT240_ARRAY
	INT248_ARRAY
	INT256_ARRAY
	BYTES1_ARRAY
	BYTES2_ARRAY
	BYTES3_ARRAY
	BYTES4_ARRAY
	BYTES5_ARRAY
	BYTES6_ARRAY
	BYTES7_ARRAY
	BYTES8_ARRAY
	BYTES9_ARRAY
	BYTES10_ARRAY
	BYTES11_ARRAY
	BYTES12_ARRAY
	BYTES13_ARRAY
	BYTES14_ARRAY
	BYTES15_ARRAY
	BYTES16_ARRAY
	BYTES17_ARRAY
	BYTES18_ARRAY
	BYTES19_ARRAY
	BYTES20_ARRAY
	BYTES21_ARRAY
	BYTES22_ARRAY
	BYTES23_ARRAY
	BYTES24_ARRAY
	BYTES25_ARRAY
	BYTES26_ARRAY
	BYTES27_ARRAY
	BYTES28_ARRAY
	BYTES29_ARRAY
	BYTES30_ARRAY
	BYTES31_ARRAY
	BYTES32_ARRAY
	BOOL_ARRAY
	ADDRESS_ARRAY
	BYTES
	STRING
)

func CombineSchemaTypePair

func CombineSchemaTypePair(schemaTypePair SchemaTypePair) []SchemaType

func (SchemaType) String

func (i SchemaType) String() string

type SchemaTypeKV

type SchemaTypeKV struct {
	Key   *SchemaTypePair `json:"key"`
	Value *SchemaTypePair `json:"value"`
}

func SchemaTypeKVFromPairs

func SchemaTypeKVFromPairs(key *SchemaTypePair, value *SchemaTypePair) *SchemaTypeKV

func (*SchemaTypeKV) Flatten

func (pair *SchemaTypeKV) Flatten() []SchemaType

type SchemaTypePair

type SchemaTypePair struct {
	Static           []SchemaType `json:"static"`
	Dynamic          []SchemaType `json:"dynamic"`
	StaticDataLength uint64       `json:"static_data_length"`
}

func DecodeSchemaTypePair

func DecodeSchemaTypePair(encoding []byte) *SchemaTypePair

func (*SchemaTypePair) Flatten

func (tuple *SchemaTypePair) Flatten() []SchemaType

type Storecore

type Storecore struct {
	StorecoreCaller     // Read-only binding to the contract
	StorecoreTransactor // Write-only binding to the contract
	StorecoreFilterer   // Log filterer for contract events
}

Storecore is an auto generated Go binding around an Ethereum contract.

func NewStorecore

func NewStorecore(address common.Address, backend bind.ContractBackend) (*Storecore, error)

NewStorecore creates a new instance of Storecore, bound to a specific deployed contract.

type StorecoreCaller

type StorecoreCaller struct {
	// contains filtered or unexported fields
}

StorecoreCaller is an auto generated read-only Go binding around an Ethereum contract.

func NewStorecoreCaller

func NewStorecoreCaller(address common.Address, caller bind.ContractCaller) (*StorecoreCaller, error)

NewStorecoreCaller creates a new read-only instance of Storecore, bound to a specific deployed contract.

type StorecoreCallerRaw

type StorecoreCallerRaw struct {
	Contract *StorecoreCaller // Generic read-only contract binding to access the raw methods on
}

StorecoreCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract.

func (*StorecoreCallerRaw) Call

func (_Storecore *StorecoreCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error

Call invokes the (constant) contract method with params as input values and sets the output to result. The result type might be a single field for simple returns, a slice of interfaces for anonymous returns and a struct for named returns.

type StorecoreCallerSession

type StorecoreCallerSession struct {
	Contract *StorecoreCaller // Generic contract caller binding to set the session for
	CallOpts bind.CallOpts    // Call options to use throughout this session
}

StorecoreCallerSession is an auto generated read-only Go binding around an Ethereum contract, with pre-set call options.

type StorecoreFilterer

type StorecoreFilterer struct {
	// contains filtered or unexported fields
}

StorecoreFilterer is an auto generated log filtering Go binding around an Ethereum contract events.

func NewStorecoreFilterer

func NewStorecoreFilterer(address common.Address, filterer bind.ContractFilterer) (*StorecoreFilterer, error)

NewStorecoreFilterer creates a new log filterer instance of Storecore, bound to a specific deployed contract.

func (*StorecoreFilterer) FilterStoreDeleteRecord

func (_Storecore *StorecoreFilterer) FilterStoreDeleteRecord(opts *bind.FilterOpts) (*StorecoreStoreDeleteRecordIterator, error)

FilterStoreDeleteRecord is a free log retrieval operation binding the contract event 0x2cc8610b80ef19409ae51ecbdd9c137960fb22ae9ef2d817d36ec1b685d68ecd.

Solidity: event StoreDeleteRecord(bytes32 tableId, bytes32[] key)

func (*StorecoreFilterer) FilterStoreSetField

func (_Storecore *StorecoreFilterer) FilterStoreSetField(opts *bind.FilterOpts) (*StorecoreStoreSetFieldIterator, error)

FilterStoreSetField is a free log retrieval operation binding the contract event 0xd01f9f1368f831528fc9fe6442366b2b7d957fbfff3bcf7c24d9ab5fe51f8c46.

Solidity: event StoreSetField(bytes32 tableId, bytes32[] key, uint8 schemaIndex, bytes data)

func (*StorecoreFilterer) FilterStoreSetRecord

func (_Storecore *StorecoreFilterer) FilterStoreSetRecord(opts *bind.FilterOpts) (*StorecoreStoreSetRecordIterator, error)

FilterStoreSetRecord is a free log retrieval operation binding the contract event 0x912af873e852235aae78a1d25ae9bb28b616a67c36898c53a14fd8184504ee32.

Solidity: event StoreSetRecord(bytes32 tableId, bytes32[] key, bytes data)

func (*StorecoreFilterer) ParseStoreDeleteRecord

func (_Storecore *StorecoreFilterer) ParseStoreDeleteRecord(log types.Log) (*StorecoreStoreDeleteRecord, error)

ParseStoreDeleteRecord is a log parse operation binding the contract event 0x2cc8610b80ef19409ae51ecbdd9c137960fb22ae9ef2d817d36ec1b685d68ecd.

Solidity: event StoreDeleteRecord(bytes32 tableId, bytes32[] key)

func (*StorecoreFilterer) ParseStoreSetField

func (_Storecore *StorecoreFilterer) ParseStoreSetField(log types.Log) (*StorecoreStoreSetField, error)

ParseStoreSetField is a log parse operation binding the contract event 0xd01f9f1368f831528fc9fe6442366b2b7d957fbfff3bcf7c24d9ab5fe51f8c46.

Solidity: event StoreSetField(bytes32 tableId, bytes32[] key, uint8 schemaIndex, bytes data)

func (*StorecoreFilterer) ParseStoreSetRecord

func (_Storecore *StorecoreFilterer) ParseStoreSetRecord(log types.Log) (*StorecoreStoreSetRecord, error)

ParseStoreSetRecord is a log parse operation binding the contract event 0x912af873e852235aae78a1d25ae9bb28b616a67c36898c53a14fd8184504ee32.

Solidity: event StoreSetRecord(bytes32 tableId, bytes32[] key, bytes data)

func (*StorecoreFilterer) WatchStoreDeleteRecord

func (_Storecore *StorecoreFilterer) WatchStoreDeleteRecord(opts *bind.WatchOpts, sink chan<- *StorecoreStoreDeleteRecord) (event.Subscription, error)

WatchStoreDeleteRecord is a free log subscription operation binding the contract event 0x2cc8610b80ef19409ae51ecbdd9c137960fb22ae9ef2d817d36ec1b685d68ecd.

Solidity: event StoreDeleteRecord(bytes32 tableId, bytes32[] key)

func (*StorecoreFilterer) WatchStoreSetField

func (_Storecore *StorecoreFilterer) WatchStoreSetField(opts *bind.WatchOpts, sink chan<- *StorecoreStoreSetField) (event.Subscription, error)

WatchStoreSetField is a free log subscription operation binding the contract event 0xd01f9f1368f831528fc9fe6442366b2b7d957fbfff3bcf7c24d9ab5fe51f8c46.

Solidity: event StoreSetField(bytes32 tableId, bytes32[] key, uint8 schemaIndex, bytes data)

func (*StorecoreFilterer) WatchStoreSetRecord

func (_Storecore *StorecoreFilterer) WatchStoreSetRecord(opts *bind.WatchOpts, sink chan<- *StorecoreStoreSetRecord) (event.Subscription, error)

WatchStoreSetRecord is a free log subscription operation binding the contract event 0x912af873e852235aae78a1d25ae9bb28b616a67c36898c53a14fd8184504ee32.

Solidity: event StoreSetRecord(bytes32 tableId, bytes32[] key, bytes data)

type StorecoreRaw

type StorecoreRaw struct {
	Contract *Storecore // Generic contract binding to access the raw methods on
}

StorecoreRaw is an auto generated low-level Go binding around an Ethereum contract.

func (*StorecoreRaw) Call

func (_Storecore *StorecoreRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error

Call invokes the (constant) contract method with params as input values and sets the output to result. The result type might be a single field for simple returns, a slice of interfaces for anonymous returns and a struct for named returns.

func (*StorecoreRaw) Transact

func (_Storecore *StorecoreRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error)

Transact invokes the (paid) contract method with params as input values.

func (*StorecoreRaw) Transfer

func (_Storecore *StorecoreRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error)

Transfer initiates a plain transaction to move funds to the contract, calling its default method if one is available.

type StorecoreSession

type StorecoreSession struct {
	Contract     *Storecore        // Generic contract binding to set the session for
	CallOpts     bind.CallOpts     // Call options to use throughout this session
	TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session
}

StorecoreSession is an auto generated Go binding around an Ethereum contract, with pre-set call and transact options.

type StorecoreStoreDeleteRecord

type StorecoreStoreDeleteRecord struct {
	TableId [32]byte
	Key     [][32]byte
	Raw     types.Log // Blockchain specific contextual infos
}

StorecoreStoreDeleteRecord represents a StoreDeleteRecord event raised by the Storecore contract.

func (*StorecoreStoreDeleteRecord) WorldAddress

func (event *StorecoreStoreDeleteRecord) WorldAddress() string

type StorecoreStoreDeleteRecordIterator

type StorecoreStoreDeleteRecordIterator struct {
	Event *StorecoreStoreDeleteRecord // Event containing the contract specifics and raw log
	// contains filtered or unexported fields
}

StorecoreStoreDeleteRecordIterator is returned from FilterStoreDeleteRecord and is used to iterate over the raw logs and unpacked data for StoreDeleteRecord events raised by the Storecore contract.

func (*StorecoreStoreDeleteRecordIterator) Close

Close terminates the iteration process, releasing any pending underlying resources.

func (*StorecoreStoreDeleteRecordIterator) Error

Error returns any retrieval or parsing error occurred during filtering.

func (*StorecoreStoreDeleteRecordIterator) Next

Next advances the iterator to the subsequent event, returning whether there are any more events found. In case of a retrieval or parsing error, false is returned and Error() can be queried for the exact failure.

type StorecoreStoreSetField

type StorecoreStoreSetField struct {
	TableId     [32]byte
	Key         [][32]byte
	SchemaIndex uint8
	Data        []byte
	Raw         types.Log // Blockchain specific contextual infos
}

StorecoreStoreSetField represents a StoreSetField event raised by the Storecore contract.

func (*StorecoreStoreSetField) WorldAddress

func (event *StorecoreStoreSetField) WorldAddress() string

type StorecoreStoreSetFieldIterator

type StorecoreStoreSetFieldIterator struct {
	Event *StorecoreStoreSetField // Event containing the contract specifics and raw log
	// contains filtered or unexported fields
}

StorecoreStoreSetFieldIterator is returned from FilterStoreSetField and is used to iterate over the raw logs and unpacked data for StoreSetField events raised by the Storecore contract.

func (*StorecoreStoreSetFieldIterator) Close

Close terminates the iteration process, releasing any pending underlying resources.

func (*StorecoreStoreSetFieldIterator) Error

Error returns any retrieval or parsing error occurred during filtering.

func (*StorecoreStoreSetFieldIterator) Next

Next advances the iterator to the subsequent event, returning whether there are any more events found. In case of a retrieval or parsing error, false is returned and Error() can be queried for the exact failure.

type StorecoreStoreSetRecord

type StorecoreStoreSetRecord struct {
	TableId [32]byte
	Key     [][32]byte
	Data    []byte
	Raw     types.Log // Blockchain specific contextual infos
}

StorecoreStoreSetRecord represents a StoreSetRecord event raised by the Storecore contract.

func (*StorecoreStoreSetRecord) WorldAddress

func (event *StorecoreStoreSetRecord) WorldAddress() string

type StorecoreStoreSetRecordIterator

type StorecoreStoreSetRecordIterator struct {
	Event *StorecoreStoreSetRecord // Event containing the contract specifics and raw log
	// contains filtered or unexported fields
}

StorecoreStoreSetRecordIterator is returned from FilterStoreSetRecord and is used to iterate over the raw logs and unpacked data for StoreSetRecord events raised by the Storecore contract.

func (*StorecoreStoreSetRecordIterator) Close

Close terminates the iteration process, releasing any pending underlying resources.

func (*StorecoreStoreSetRecordIterator) Error

Error returns any retrieval or parsing error occurred during filtering.

func (*StorecoreStoreSetRecordIterator) Next

Next advances the iterator to the subsequent event, returning whether there are any more events found. In case of a retrieval or parsing error, false is returned and Error() can be queried for the exact failure.

type StorecoreTransactor

type StorecoreTransactor struct {
	// contains filtered or unexported fields
}

StorecoreTransactor is an auto generated write-only Go binding around an Ethereum contract.

func NewStorecoreTransactor

func NewStorecoreTransactor(address common.Address, transactor bind.ContractTransactor) (*StorecoreTransactor, error)

NewStorecoreTransactor creates a new write-only instance of Storecore, bound to a specific deployed contract.

type StorecoreTransactorRaw

type StorecoreTransactorRaw struct {
	Contract *StorecoreTransactor // Generic write-only contract binding to access the raw methods on
}

StorecoreTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract.

func (*StorecoreTransactorRaw) Transact

func (_Storecore *StorecoreTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error)

Transact invokes the (paid) contract method with params as input values.

func (*StorecoreTransactorRaw) Transfer

func (_Storecore *StorecoreTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error)

Transfer initiates a plain transaction to move funds to the contract, calling its default method if one is available.

type StorecoreTransactorSession

type StorecoreTransactorSession struct {
	Contract     *StorecoreTransactor // Generic contract transactor binding to set the session for
	TransactOpts bind.TransactOpts    // Transaction auth options to use throughout this session
}

StorecoreTransactorSession is an auto generated write-only Go binding around an Ethereum contract, with pre-set transact options.

type TableSchema

type TableSchema struct {
	TableId    string   `json:"id"`   // Table ID as it comes from chain.
	TableName  string   `json:"name"` // Table name is table ID but with naming adjustments to work with the database.
	FieldNames []string `json:"field_names"`
	KeyNames   []string `json:"key_names"` // Key names are separte from field names and are used for searching.

	SolidityTypes map[string]string `json:"solidity_types"` // Field name -> Solidity type
	PostgresTypes map[string]string `json:"postgres_types"` // Field name -> Postgres type

	IsKey map[string]bool `json:"is_key"` // Field name -> Is key?

	// Auxiliary data about the table.
	Namespace             string            `json:"namespace"`
	StoreCoreSchemaTypeKV *SchemaTypeKV     `json:"store_core_schema_type_kv"`
	PrimaryKey            string            `json:"primary_key"`
	OnChainReadableName   string            `json:"on_chain_readable_name"`
	OnChainColNames       map[string]string `json:"on_chain_col_names"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL