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 EpochsInMinute = SecondsInMinute / builtin.EpochDurationSeconds
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 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 LIQUIDATION_DTL = big.NewInt(85e16)
View Source
var MAX_BORROW_DTL = big.NewInt(75e16)
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" MethodDefaultDTL Method = "setAgentDefaultDTL" )
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" RouteInfinityPool Route = "ROUTER_INFINITY_POOL" )
Click to show internal directories.
Click to hide internal directories.