constants

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2024 License: Apache-2.0 Imports: 2 Imported by: 5

Documentation

Index

Constants

View Source
const AnvilChainID = 31337
View Source
const CalibnetChainID = 314159
View Source
const ChainHeadLookbackEpochs = 3

the ChainHeadLookbackEpochs epochs is the protocol wide parameter that is subtracted from ChainHead height to look at real time on chain info

View Source
const CredentialEpochsValid = CredentialMinutesValid * EpochsInMinute
View Source
const CredentialMinutesValid = 5

a credential is valid for 5 minutes

View Source
const EpochsInDay = builtin.EpochsInDay
View Source
const EpochsInWeek = EpochsInDay * 7
View Source
const EpochsInYear = EpochsInDay * 365
View Source
const LocalnetChainID = 31415926
View Source
const MainnetChainID = 314
View Source
const SecondsInMinute = 60

Variables

View Source
var CHUNKSIZE = big.NewInt(EpochsInDay)
View Source
var DefaultWindow = EpochsInWeek * 3
View Source
var EventsURL = "https://events.glif.link"
View Source
var FAULTY_SECTOR_TOLERANCE = big.NewFloat(0.001)
View Source
var INFINITY_POOL_ID = big.NewInt(0)

the infinity pool is the first pool created, and has a 0 id cache this here to not fetch it from the contracts every time we need it

View Source
var MAX_DTE = big.NewInt(2e18)

NOTE these should be generated in the future from the live values in the contracts

View Source
var MAX_DTI = big.NewInt(25e16)
View Source
var MAX_LTV = big.NewInt(8e17)
View Source
var MAX_UINT256 = new(big.Int).Sub(new(big.Int).Exp(big.NewInt(2), big.NewInt(256), nil), big.NewInt(1))
View Source
var RepeatBorrowEpochTolerance = EpochsInDay
View Source
var WAD = big.NewInt(1e18)

Functions

This section is empty.

Types

type Method

type Method string
var (
	MethodBorrow       Method = "borrow"
	MethodPay          Method = "pay"
	MethodAddMiner     Method = "addMiner"
	MethodRemoveMiner  Method = "removeMiner"
	MethodWithdraw     Method = "withdraw"
	MethodPushFunds    Method = "pushFunds"
	MethodPullFunds    Method = "pullFunds"
	MethodSetRecovered Method = "setRecovered"
)

these method names must match the names in the Agent contract in order to get the right function signature

type Route

type Route string
var (
	RouteAgentPolice   Route = "ROUTER_AGENT_POLICE"
	RouteAgentFactory  Route = "ROUTER_AGENT_FACTORY"
	RoutePoolRegistry  Route = "ROUTER_POOL_REGISTRY"
	RouteMinerRegistry Route = "ROUTER_MINER_REGISTRY"
	RouteWFIL          Route = "ROUTER_WFIL_TOKEN"
	RouteVCIssuer      Route = "ROUTER_VC_ISSUER"
	RouteCredParser    Route = "ROUTER_CRED_PARSER"
	RouteAgentDeployer Route = "ROUTER_AGENT_DEPLOYER"
)

Jump to

Keyboard shortcuts

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