Documentation
¶
Index ¶
- Variables
- func BalanceOf(b *cmn.Blockchain, t *cmn.Token, address common.Address) (*big.Int, error)
- func BuildHailToSendTemplate(b *cmn.Blockchain, t *cmn.Token, from *cmn.Address, to common.Address, ...) (string, error)
- func BuildHailToSendTxTemplate(b *cmn.Blockchain, from *cmn.Address, to common.Address, amount *big.Int, ...) (string, error)
- func BuildTx(b *cmn.Blockchain, s *cmn.Signer, from *cmn.Address, to common.Address, ...) (*types.Transaction, error)
- func BuildTxERC20Transfer(b *cmn.Blockchain, t *cmn.Token, s *cmn.Signer, from *cmn.Address, ...) (*types.Transaction, error)
- func BuildTxTransfer(b *cmn.Blockchain, s *cmn.Signer, from *cmn.Address, to common.Address, ...) (*types.Transaction, error)
- func ERC20Transfer(msg *bus.Message, b *cmn.Blockchain, t *cmn.Token, s *cmn.Signer, ...) error
- func GetBalance(b *cmn.Blockchain, address common.Address) (*big.Int, error)
- func GetCurrentRateLimit(chainId int) int
- func GetERC20Balance(b *cmn.Blockchain, t *cmn.Token, address common.Address) (*big.Int, error)
- func GetERC20BalancesBatch(b *cmn.Blockchain, queries []*BalanceQuery) error
- func GetERC20TokenInfo(b *cmn.Blockchain, address common.Address) (string, string, int, error)
- func GetNativeBalancesBatch(b *cmn.Blockchain, queries []*NativeBalanceQuery) error
- func Init()
- func LoadABIs()
- func Loop()
- func ReportRateLimitError(chainId int)
- func ReportSuccess(chainId int)
- func SendSignedTx(signedTx *types.Transaction) (string, error)
- func Transfer(msg *bus.Message, b *cmn.Blockchain, s *cmn.Signer, from *cmn.Address, ...) error
- func UpdateRateLimiterSettings(chainId int)
- type BalanceQuery
- type NativeBalanceQuery
Constants ¶
This section is empty.
Variables ¶
View Source
var ERC20_ABI abi.ABI
View Source
var ERC20_ABI_JSON []byte
View Source
var MULTICALL2_ABI abi.ABI
View Source
var MULTICALL2_ABI_JSON []byte
Functions ¶
func BuildHailToSendTemplate ¶
func BuildTxERC20Transfer ¶
func BuildTxTransfer ¶
func ERC20Transfer ¶
func GetBalance ¶
func GetCurrentRateLimit ¶
GetCurrentRateLimit returns the current rate limit for a chain (for display purposes)
func GetERC20Balance ¶
func GetERC20BalancesBatch ¶
func GetERC20BalancesBatch(b *cmn.Blockchain, queries []*BalanceQuery) error
GetERC20BalancesBatch fetches multiple ERC20 balances in a single multicall All tokens must be on the same chain
func GetERC20TokenInfo ¶
func GetNativeBalancesBatch ¶
func GetNativeBalancesBatch(b *cmn.Blockchain, queries []*NativeBalanceQuery) error
GetNativeBalancesBatch fetches multiple native balances in a single multicall Uses multicall's getEthBalance function
func ReportRateLimitError ¶
func ReportRateLimitError(chainId int)
ReportRateLimitError should be called when a 429 error is detected
func ReportSuccess ¶
func ReportSuccess(chainId int)
ReportSuccess should be called after a successful RPC call
func SendSignedTx ¶
func SendSignedTx(signedTx *types.Transaction) (string, error)
func UpdateRateLimiterSettings ¶
func UpdateRateLimiterSettings(chainId int)
UpdateRateLimiterSettings updates an existing rate limiter with new settings from blockchain config This preserves timing state (lastCallTime, backoffUntil) to avoid race conditions
Types ¶
Click to show internal directories.
Click to hide internal directories.