cmd

package
v2.2.1 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2024 License: Apache-2.0 Imports: 58 Imported by: 0

Documentation

Overview

Copyright © 2023 Glif LTD

Copyright © 2023 NAME HERE <EMAIL ADDRESS>

Copyright © 2023 NAME HERE <EMAIL ADDRESS>

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Copyright © 2023 Glif LTD

Index

Constants

This section is empty.

Variables

View Source
var CommitHash, GoPoolsHash = func() (string, string) {
	var ch string
	if info, ok := debug.ReadBuildInfo(); ok {
		for _, setting := range info.Settings {
			if setting.Key == "vcs.revision" {
				ch = setting.Value
			}
		}

		for _, dep := range info.Deps {
			if dep.Path == "github.com/glifio/go-pools" {
				return ch, dep.Version
			}
		}
	}
	return "", ""
}()
View Source
var ExitCode int
View Source
var PoolsSDK types.PoolsSDK

Functions

func AddressOrAccountNameToEVM

func AddressOrAccountNameToEVM(ctx context.Context, addr string) (common.Address, error)

func AddressOrAccountNameToNative

func AddressOrAccountNameToNative(ctx context.Context, addr string) (address.Address, error)

func AddressesToStrings

func AddressesToStrings(addrs []address.Address) []string

func Execute

func Execute()

Execute adds all child commands to the root command and sets flags appropriately. This is called by main.main(). It only needs to happen once to the rootCmd.

func Exit

func Exit(code int)

func ToMinerID

func ToMinerID(ctx context.Context, addr string) (address.Address, error)

Types

type GitHubRelease

type GitHubRelease struct {
	TagName    string `json:"tag_name"`
	PreRelease bool   `json:"prerelease"`
	Draft      bool   `json:"draft"`
}

GitHubRelease represents the structure of the release object from GitHub's API

type GitHubTag

type GitHubTag struct {
	Object struct {
		SHA string `json:"sha"`
	} `json:"object"`
}

GitHubTag represents the structure of the tag object, which includes the commit hash

type MockFullNodeAPI

type MockFullNodeAPI struct {
	api.FullNode
}

func (*MockFullNodeAPI) StateGetActor

func (m *MockFullNodeAPI) StateGetActor(ctx context.Context, actor address.Address, tsk types.TipSetKey) (*types.Actor, error)

func (*MockFullNodeAPI) StateLookupID

func (m *MockFullNodeAPI) StateLookupID(ctx context.Context, addr address.Address, tsk types.TipSetKey) (address.Address, error)

type PaymentType

type PaymentType int
const (
	Principal PaymentType = iota
	ToCurrent
	Custom
)

func ParsePaymentType

func ParsePaymentType(s string) (PaymentType, error)

func (PaymentType) String

func (p PaymentType) String() string

type PoolType

type PoolType uint64
const (
	InfinityPool PoolType = iota
)

Jump to

Keyboard shortcuts

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