model

package
v1.3.2 Latest Latest
Warning

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

Go to latest
Published: Jan 13, 2022 License: GPL-3.0 Imports: 1 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AccountID

type AccountID string

func (AccountID) String added in v0.5.4

func (a AccountID) String() string

type Contract

type Contract struct {
	ID ContractID

	AccountID *AccountID `json:"account_id"`
	ProjectID *ProjectID `json:"project_id"`

	Name                  string                `json:"contract_name"`
	LowercaseName         string                `json:"lowercase_contract_name"`
	Abi                   string                `json:"abi"`
	Bytecode              string                `json:"bytecode"`
	SourceMap             string                `json:"source_map"`
	Source                string                `json:"source"`
	NumberOfExceptions    int                   `json:"number_of_exceptions"`
	LastEventOccurredAt   *time.Time            `json:"last_event_occurred_at"`
	DeploymentInformation DeploymentInformation `json:"deployment_information"`

	VerificationDate time.Time `json:"verification_date"`
	CreatedAt        time.Time `json:"created_at"`
}

type ContractAddress

type ContractAddress string

type ContractID

type ContractID string

type Data added in v0.6.0

type Data struct {
	Nonce    uint64 `json:"nonce"`
	Balance  []byte `json:"balance"`
	CodeHash []byte `json:"codeHash"`
}

type DeploymentInformation

type DeploymentInformation struct {
	NetworkID NetworkID       `json:"network_id"`
	Address   ContractAddress `json:"address"`
}
type Header struct {
	Number      int64  `json:"number"`
	ReceiptHash []byte `json:"receiptHash"`
	ParentHash  []byte `json:"parentHash"`
	Root        []byte `json:"root"`
	UncleHash   []byte `json:"uncleHash"`
	GasLimit    []byte `json:"gasLimit"`
	TxHash      []byte `json:"txHash"`
	Timestamp   int64  `json:"timestamp"`
	Difficulty  []byte `json:"difficulty"`
	Coinbase    []byte `json:"coinbase"`
	Bloom       []byte `json:"bloom"`
	GasUsed     uint64 `json:"gasUsed"`
	Extra       []byte `json:"extra"`
	MixDigest   []byte `json:"mixDigest"`
	Nonce       []byte `json:"nonce"`
	BaseFee     []byte `json:"baseFee"`
}

type NetworkID

type NetworkID string

type Organization added in v0.9.7

type Organization struct {
	PrincipalID AccountID `json:"id"`

	Name string `json:"name"`
}

type OwnerInfo added in v0.6.0

type OwnerInfo struct {
	ID        AccountID `json:"id"`
	FirstName string    `json:"first_name"`
	LastName  string    `json:"last_name"`
	Username  string    `json:"username"`
	Email     string    `json:"email"`
}

type Principal added in v0.9.7

type Principal struct {
	ID AccountID `json:"id"`

	Username     string        `json:"username"`
	Organization *Organization `json:"organization,omitempty" `
	User         *User         `json:"user,omitempty"`

	Type PrincipalType `json:"type"`
}

type PrincipalType added in v0.9.7

type PrincipalType string
const (
	UserPrincipalType         PrincipalType = "user"
	OrganizationPrincipalType PrincipalType = "organization"
)

type Project

type Project struct {
	ID        AccountID  `json:"id"`
	Name      string     `json:"name"`
	Slug      string     `json:"slug"`
	Owner     AccountID  `json:"owner_id"`
	OwnerInfo *OwnerInfo `json:"owner"`
	CreatedAt time.Time  `json:"created_at"`

	Permissions *ProjectPermissions `json:"permissions,omitempty"`

	IsShared bool `json:"-"`
}

type ProjectID

type ProjectID struct {
	AccountID AccountID
	Name      string
}

type ProjectPermissions added in v0.5.4

type ProjectPermissions struct {
	AddContract bool `json:"add_contract"`
}

type StateObject added in v0.6.0

type StateObject struct {
	Address string            `json:"address"`
	Data    *Data             `json:"data"`
	Code    []byte            `json:"code"`
	Storage map[string][]byte `json:"storage"`
}

type TransactionState added in v0.6.0

type TransactionState struct {
	GasUsed uint64 `json:"-"`
	Status  bool   `json:"-"`

	Headers      []*Header      `json:"headers"`
	StateObjects []*StateObject `json:"state_objects"`
}

type User

type User struct {
	ID AccountID `json:"id"`

	FirstName string `json:"first_name"`
	LastName  string `json:"last_name"`
	Username  string `json:"username"`
	Email     string `json:"email"`

	CreatedAt time.Time `json:"-"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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