Documentation
¶
Overview ¶
Copyright © 2023 Glif LTD
Copyright © 2023 Glif LTD ¶
Copyright © 2023 Glif LTD ¶
Copyright © 2023 Glif LTD ¶
Copyright © 2023 Glif LTD ¶
Copyright © 2023 Glif LTD ¶
Copyright © 2023 Glif LTD ¶
Copyright © 2023 Glif LTD ¶
Copyright © 2023 Glif LTD ¶
Copyright © 2023 Glif LTD ¶
Copyright © 2023 Glif LTD ¶
Copyright © 2023 Glif LTD ¶
Copyright © 2023 NAME HERE <EMAIL ADDRESS>
Copyright © 2023 NAME HERE <EMAIL ADDRESS>
Copyright © 2023 Glif LTD ¶
Copyright © 2023 Glif LTD ¶
Copyright © 2023 Glif LTD ¶
Copyright © 2023 Glif LTD ¶
Copyright © 2023 Glif LTD ¶
Copyright © 2023 Glif LTD ¶
Copyright © 2023 Glif LTD ¶
Copyright © 2023 Glif LTD ¶
Copyright © 2023 Glif LTD ¶
Copyright © 2023 Glif LTD ¶
Copyright © 2023 Glif LTD ¶
Copyright © 2023 Glif LTD ¶
Copyright © 2023 Glif LTD ¶
Copyright © 2023 Glif LTD ¶
Copyright © 2023 Glif LTD ¶
Copyright © 2023 Glif LTD ¶
Copyright © 2023 Glif LTD ¶
Copyright © 2023 Glif LTD ¶
Copyright © 2023 Glif LTD ¶
Copyright © 2023 Glif LTD ¶
Copyright © 2023 Glif LTD ¶
Copyright © 2023 Glif LTD ¶
Copyright © 2023 Glif LTD ¶
Copyright © 2025 Glif LTD ¶
Copyright © 2025 Glif LTD ¶
Copyright © 2025 Glif LTD ¶
Copyright © 2026 Glif LTD ¶
Copyright © 2025 Glif LTD ¶
Copyright © 2023 Glif LTD ¶
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 ¶
Copyright © 2025 Glif LTD ¶
Copyright © 2025 Glif LTD ¶
Copyright © 2025 Glif LTD ¶
Copyright © 2025 Glif LTD ¶
Copyright © 2023 Glif LTD ¶
Copyright © 2023 Glif LTD ¶
Copyright © 2023 Glif LTD ¶
Copyright © 2023 Glif LTD ¶
Copyright © 2023 Glif LTD ¶
Copyright © 2023 Glif LTD ¶
Copyright © 2023 Glif LTD ¶
Copyright © 2023 Glif LTD ¶
Copyright © 2023 Glif LTD ¶
Copyright © 2023 Glif LTD ¶
Copyright © 2023 Glif LTD ¶
Copyright © 2023 Glif LTD ¶
Copyright © 2023 Glif LTD ¶
Copyright © 2023 Glif LTD
Index ¶
- Constants
- Variables
- func AddressOrAccountNameToEVM(ctx context.Context, addr string) (common.Address, error)
- func AddressOrAccountNameToNative(ctx context.Context, addr string) (address.Address, error)
- func AddressesToStrings(addrs []address.Address) []string
- func Execute()
- func Exit(code int)
- func GetFilecoinPriceUSD() (float64, error)
- func ToMinerID(ctx context.Context, addr string) (address.Address, error)
- type CoinGeckoResponse
- type GitHubRelease
- type GitHubTag
- type MockFullNodeAPI
- type PaymentType
- type PoolType
- type QuotePath
Constants ¶
const ( MAINNET_GLIF_LTD_DELEGATEE = "0xfF0000000000000000000000000000000035909b" TESTNET_GLIF_LTD_DELEGATEE = "0xFf000000000000000000000000000000000254d7" )
const ( VOTE_QUESTION_LANGUAGE = "You are about to claim your airdrop, we have a few extra questions for you. What language would you like to continue in?" VOTE_OPTION_LANGUAGE_ENGLISH language = "English" VOTE_OPTION_LANGUAGE_CHINESE language = "中文" )
question 1
const ( VOTE_QUESTION_DELEGATEE = "The GLF Token has governance capabilities. Who do you want to delegate your vote to?" VOTE_QUESTION_DELEGATEE_CHINESE = "GLF 代币具有治理功能。你想将你的投票委托给谁?" VOTE_OPTION_DELEGATEE_GLIF_LTD = "Glif Ltd. - the development company" VOTE_OPTION_DELEGATEE_MYSELF = "Myself - I will vote on proposals" VOTE_OPTION_DELEGATEE_SOMEONE_ELSE = "Someone else - I know their address" VOTE_OPTION_DELEGATEE_GLIF_LTD_CH = "Glif Ltd. - 开发公司" VOTE_OPTION_DELEGATEE_MYSELF_CH = "我自己 - 我将参与提案投票" VOTE_OPTION_DELEGATEE_SOMEONE_ELSE_CH = "其他人 - 我知道他们的地址" )
question 2
const ( VOTE_QUESTION_DELEGATEE_ADDRESS = "Please enter the address of the person you want to delegate your vote to:" VOTE_QUESTION_DELEGATEE_ADDRESS_CHINESE = "请输入你想委托投票的人的地址:" )
question 2.5
const ( VOTE_QUESTION_ROADMAP = "" /* 486-byte string literal not displayed */ VOTE_QUESTION_ROADMAP_CHINESE = "" /* 448-byte string literal not displayed */ VOTE_OPTION_ROADMAP_CONT_EN = "Finish" VOTE_OPTION_ROADMAP_CONT_CH = "完成" )
const ( VOTE_QUESTION_ACCEPT_TERMS = "By claiming your airdrop, you are agreeing to the terms and conditions at https://glif.io/terms. Do you accept?" VOTE_QUESTION_ACCEPT_TERMS_CHINESE = "通过领取空投,你同意 https://glif.io/terms 的条款和条件。你接受吗?" VOTE_OPTION_ACCEPT_TERMS_YES = "Yes" VOTE_OPTION_ACCEPT_TERMS_YES_CH = "是" VOTE_OPTION_ACCEPT_TERMS_NO = "No" VOTE_OPTION_ACCEPT_TERMS_NO_CH = "否" )
question 3
Variables ¶
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 "", ""
}()
var ExitCode int
var PoolsSDK types.PoolsSDK
Functions ¶
func AddressesToStrings ¶
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 GetFilecoinPriceUSD ¶ added in v2.4.2
Function to fetch the current USD price of Filecoin
Types ¶
type CoinGeckoResponse ¶ added in v2.4.2
type CoinGeckoResponse struct {
Filecoin struct {
USD float64 `json:"usd"`
} `json:"filecoin"`
}
CoinGecko API response structure
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 ¶
func (*MockFullNodeAPI) StateGetActor ¶
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
Source Files
¶
- agent.go
- agent_admin_set_recovered.go
- agent_autopilot.go
- agent_autopilot_info.go
- agent_borrow.go
- agent_create.go
- agent_exit.go
- agent_history.go
- agent_id.go
- agent_import.go
- agent_info.go
- agent_interest_owed.go
- agent_liquidation_value.go
- agent_miners.go
- agent_miners_add.go
- agent_miners_change_owner.go
- agent_miners_change_worker.go
- agent_miners_confirm_worker.go
- agent_miners_list.go
- agent_miners_pull.go
- agent_miners_push.go
- agent_miners_reclaim.go
- agent_miners_remove.go
- agent_pay.go
- agent_pay_current.go
- agent_pay_custom.go
- agent_pay_principal.go
- agent_refresh_routes.go
- agent_withdraw.go
- airdrop.go
- airdrop_helpers.go
- airdrop_plans.go
- ifil.go
- ifil_allowance.go
- ifil_approve.go
- ifil_balanceof.go
- ifil_minter.go
- ifil_price.go
- ifil_supply.go
- ifil_transfer.go
- info.go
- infpool.go
- infpool_avail_liquidity.go
- infpool_deposit_fil.go
- infpool_exit_reserve.go
- infpool_get_account.go
- infpool_get_agent_level.go
- infpool_redeem.go
- infpool_tfees_owed.go
- infpool_total_assets.go
- infpool_total_borrowed.go
- infpool_total_earnings.go
- infpool_util_rate.go
- infpool_withdraw.go
- mocks.go
- plus.go
- plus_activate.go
- plus_advanced.go
- plus_approve_spend.go
- plus_cashback.go
- plus_change_owner_for_agent.go
- plus_claim_cashback.go
- plus_downgrade.go
- plus_fil_vault_balance.go
- plus_fund_glf_vault.go
- plus_info.go
- plus_mint.go
- plus_set_personal_cashback_percent.go
- plus_tiers.go
- plus_tiers_list.go
- plus_upgrade.go
- plus_withdraw_extra_locked_funds.go
- plus_withdraw_glf_vault.go
- root.go
- tokens.go
- tokens_glf_price.go
- tx.go
- tx_cancel.go
- tx_common.go
- tx_list_pending.go
- tx_speed_up.go
- utils.go
- wallet.go
- wallet_balance.go
- wallet_change_passphrase.go
- wallet_create_account.go
- wallet_create_agent_accounts.go
- wallet_export_account.go
- wallet_forward_fil.go
- wallet_import_account_encrypted.go
- wallet_import_account_raw.go
- wallet_label_account.go
- wallet_list.go
- wallet_migrate.go
- wallet_rm_account.go
- wfil.go
- wfil_alllowance.go
- wfil_balanceof.go