Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConstantRepository ¶
type ConstantRepository interface {
Get(ctx context.Context, address string) (GlobalConstant, error)
All(ctx context.Context, addresses ...string) ([]GlobalConstant, error)
List(ctx context.Context, size, offset int64, orderBy, sort string) ([]ListGlobalConstantItem, error)
ForContract(ctx context.Context, address string, size, offset int64) ([]GlobalConstant, error)
ContractList(ctx context.Context, address string, size, offset int64) ([]Contract, error)
}
type Contract ¶
type Contract struct {
bun.BaseModel `bun:"contracts"`
ID int64 `bun:"id,pk,notnull,autoincrement"`
Level int64 `bun:"level"`
Timestamp time.Time `bun:"timestamp,pk,notnull"`
AccountID int64
Account account.Account `bun:"rel:belongs-to"`
ManagerID int64
Manager account.Account `bun:"rel:belongs-to"`
DelegateID int64
Delegate account.Account `bun:"rel:belongs-to"`
Tags types.Tags
AlphaID int64
Alpha Script `bun:"rel:belongs-to"`
BabylonID int64
Babylon Script `bun:"rel:belongs-to"`
JakartaID int64
Jakarta Script `bun:"rel:belongs-to"`
}
Contract - entity for contract
type GlobalConstant ¶
type GlobalConstant struct {
bun.BaseModel `bun:"global_constants"`
ID int64 `bun:"id,pk,notnull,autoincrement"`
Timestamp time.Time `json:"timestamp"`
Level int64 `json:"level"`
Address string `bun:"address,type:text"`
Value []byte
Scripts []Script `bun:"m2m:script_constants,join:GlobalConstant=Script"`
}
GlobalConstant -
func (*GlobalConstant) LogFields ¶
func (m *GlobalConstant) LogFields() map[string]interface{}
LogFields -
func (GlobalConstant) PartitionBy ¶
func (GlobalConstant) PartitionBy() string
func (GlobalConstant) TableName ¶
func (GlobalConstant) TableName() string
type ListGlobalConstantItem ¶
type ListGlobalConstantItem struct {
Timestamp time.Time `bun:"timestamp"`
Level int64 `bun:"level"`
Address string `bun:"address"`
LinksCount uint64 `bun:"links_count"`
}
ListGlobalConstantItem -
type Repository ¶
type Repository interface {
Get(ctx context.Context, address string) (Contract, error)
Script(ctx context.Context, address string, symLink string) (Script, error)
// ScriptPart - returns part of script type. Part can be `storage`, `parameter` or `code`.
ScriptPart(ctx context.Context, address string, symLink, part string) ([]byte, error)
FindOne(ctx context.Context, tags types.Tags) (Contract, error)
AllExceptDelegators(ctx context.Context) ([]Contract, error)
}
type Script ¶
type Script struct {
bun.BaseModel `bun:"scripts"`
ID int64 `bun:"id,pk,notnull,autoincrement"`
Level int64 `bun:"level"`
Hash string `bun:"hash,type:text"`
Code []byte `bun:",type:bytea"`
Parameter []byte `bun:",type:bytea"`
Storage []byte `bun:",type:bytea"`
Views []byte `bun:",type:bytea"`
Entrypoints pq.StringArray `bun:",type:text[]"`
FailStrings pq.StringArray `bun:",type:text[]"`
Annotations pq.StringArray `bun:",type:text[]"`
Hardcoded pq.StringArray `bun:",type:text[]"`
Tags types.Tags
Constants []GlobalConstant `bun:"m2m:script_constants,join:Script=GlobalConstant"`
}
Scripts -
type ScriptConstants ¶
type ScriptConstants struct {
bun.BaseModel `bun:"script_constants"`
ScriptId int64
Script Script `bun:"rel:belongs-to,join:script_id=id"`
GlobalConstantId int64
GlobalConstant GlobalConstant `bun:"rel:belongs-to,join:global_constant_id=id"`
}
ScriptConstants -
func (ScriptConstants) TableName ¶
func (ScriptConstants) TableName() string
type ScriptRepository ¶
type ScriptRepository interface {
ByHash(ctx context.Context, hash string) (Script, error)
Code(ctx context.Context, id int64) ([]byte, error)
Parameter(ctx context.Context, id int64) ([]byte, error)
Storage(ctx context.Context, id int64) ([]byte, error)
Views(ctx context.Context, id int64) ([]byte, error)
}
type Sections ¶
type Sections struct {
Parameter stdJSON.RawMessage `json:"parameter"`
ReturnType stdJSON.RawMessage `json:"returnType"`
Code stdJSON.RawMessage `json:"code"`
}
Sections -
type View ¶
type View struct {
Name string `json:"name"`
Description string `json:"description"`
Implementations []ViewImplementation `json:"implementations"`
}
View -
type ViewImplementation ¶
type ViewImplementation struct {
MichelsonStorageView Sections `json:"michelsonStorageView"`
}
ViewImplementation -
Click to show internal directories.
Click to hide internal directories.