Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/chainbound/apollo
/ functions
Functions
154 in github.com/chainbound/apollo
⨍
Functions
154
◇
Types & classes
39
↓ 25 callers
Method
Name
()
generate/callmsg.go:15
↓ 9 callers
Method
Address
()
dsl/schema.go:294
↓ 7 callers
Method
Call
Call invokes the (constant) contract method with params as input values and sets the output to result. The result type might be a single field for sim
bindings/erc20/erc20.go:148
↓ 6 callers
Function
NewLogger
(module string)
log/log.go:12
↓ 6 callers
Function
NewSchema
NewSchema returns a new DynamicSchema, loaded from confDir/schema.hcl. It will decode the top-level body with an initial evaluation context to provide
dsl/schema.go:381
↓ 5 callers
Function
aggregateCallResults
(results ...*apolloTypes.CallResult)
chainservice/utils.go:8
↓ 5 callers
Method
callMethod
callMethod executes all the methods on the contract, and aggregates their results into a CallResult
chainservice/methods.go:75
↓ 4 callers
Function
ABIToSQLType
(abiType ABIType)
generate/utils.go:34
↓ 4 callers
Method
Error
Error returns any retrieval or parsing error occurred during filtering.
bindings/erc20/erc20.go:508
↓ 4 callers
Method
GetBlock
(ctx context.Context, num *big.Int)
chainservice/block_dater.go:138
↓ 4 callers
Function
GetTopic
(eventName string, abi abi.ABI)
generate/callmsg.go:56
↓ 4 callers
Method
HandleLog
HandleLog unpacks the raw log.Data into our desired output, and it requests the timestamp over the network.
chainservice/events.go:410
↓ 4 callers
Method
Transact
Transact invokes the (paid) contract method with params as input values.
bindings/erc20/erc20.go:159
↓ 4 callers
Function
bindErc20
bindErc20 binds a generic wrapper to an already deployed contract.
bindings/erc20/erc20.go:136
↓ 3 callers
Method
BalanceOf
BalanceOf is a free data retrieval call binding the contract method 0x70a08231. Solidity: function balanceOf(address _owner) view returns(uint256 bal
bindings/erc20/erc20.go:216
↓ 3 callers
Method
Decimals
Decimals is a free data retrieval call binding the contract method 0x313ce567. Solidity: function decimals() view returns(uint8)
bindings/erc20/erc20.go:247
↓ 3 callers
Method
FilterLogs
(ctx context.Context, query ethereum.FilterQuery)
chainservice/cached_client.go:119
↓ 3 callers
Method
OutputName
()
dsl/schema.go:348
↓ 3 callers
Method
Transfer
Transfer initiates a plain transaction to move funds to the contract, calling its default method if one is available.
bindings/erc20/erc20.go:154
↓ 2 callers
Function
ABIToGoType
(abiType ABIType, val string)
generate/utils.go:52
↓ 2 callers
Method
Allowance
Allowance is a free data retrieval call binding the contract method 0xdd62ed3e. Solidity: function allowance(address _owner, address _spender) view r
bindings/erc20/erc20.go:185
↓ 2 callers
Method
BlockByTimestamp
(ctx context.Context, chain apolloTypes.Chain, timestamp int64)
chainservice/chainservice.go:220
↓ 2 callers
Method
BlockNumberByTimestamp
BlockNumberByTimestamp returns the first block it finds that is under 3 * 60 seconds difference with the target timestamp. We have this threshold beca
chainservice/block_dater.go:48
↓ 2 callers
Function
BuildCallInput
(method Method, abi abi.ABI)
generate/callmsg.go:31
↓ 2 callers
Method
Connect
()
db/db.go:49
↓ 2 callers
Method
DumpMetrics
()
chainservice/chainservice.go:293
↓ 2 callers
Function
GenerateInsertSQL
GenerateInsertSQL generates INSERT statements based on the tableName and the toInsert values.
generate/sql.go:39
↓ 2 callers
Method
HeaderByNumber
(ctx context.Context, number *big.Int)
chainservice/cached_client.go:93
↓ 2 callers
Function
InitialContext
InitialContext returns the initial context at the start of evaluation. It has nothing but the most basic functions and variables.
dsl/schema.go:368
↓ 2 callers
Method
Inputs
()
generate/callmsg.go:16
↓ 2 callers
Method
IsConnected
()
db/db.go:69
↓ 2 callers
Method
ListenForEvents
ListenForEvents handles the event query for realtime use, and will open a subscription for the target event with the JSON-RPC API. For every message,
chainservice/events.go:221
↓ 2 callers
Function
NewBlockDater
(client *ethclient.Client)
chainservice/block_dater.go:38
↓ 2 callers
Function
NewDB
(s DbSettings)
db/db.go:39
↓ 2 callers
Method
Outputs
()
dsl/schema.go:344
↓ 2 callers
Method
RunMethodCaller
RunMethodCaller starts a listening channel on `blocks`, and on every incoming block it will execute all methods concurrently on the given blockNumber,
chainservice/methods.go:21
↓ 2 callers
Method
SetBoundaries
(ctx context.Context)
chainservice/block_dater.go:118
↓ 2 callers
Method
SmartFilterLogs
SmartFilterLogs splits up the range in equally large parts. It will concurrently try to get all the logs for the parts, but if one fails because the r
chainservice/cached_client.go:131
↓ 2 callers
Method
SubscribeFilterLogs
(ctx context.Context, query ethereum.FilterQuery, ch chan<- types.Log)
chainservice/cached_client.go:113
↓ 2 callers
Method
Symbol
Symbol is a free data retrieval call binding the contract method 0x95d89b41. Solidity: function symbol() view returns(string)
bindings/erc20/erc20.go:309
↓ 2 callers
Method
TotalSupply
TotalSupply is a free data retrieval call binding the contract method 0x18160ddd. Solidity: function totalSupply() view returns(uint256)
bindings/erc20/erc20.go:340
↓ 2 callers
Function
convertCtyMap
(m map[string]cty.Value)
output/output.go:64
↓ 2 callers
Function
newChainService
const ( rpcUrl = "wss://arb-mainnet.g.alchemy.com/v2/5_JWUuiS1cewWFpLzRxdjgZM0yLA4Uqp" )
chainservice/chainservice_test.go:16
↓ 1 callers
Method
AddCsv
(name string, cols map[string]cty.Value)
output/output.go:140
↓ 1 callers
Method
Approve
Approve is a paid mutator transaction binding the contract method 0x095ea7b3. Solidity: function approve(address _spender, uint256 _value) returns(bo
bindings/erc20/erc20.go:378
↓ 1 callers
Method
Balance
(types.Chain, common.Address, *big.Int)
dsl/schema.go:167
↓ 1 callers
Function
BuildCallMsg
(to common.Address, method Method, abi abi.ABI)
generate/callmsg.go:19
↓ 1 callers
Function
BuildChainFunctions
BuildChainFunctions builds the chain functions that can be used in the schema.
dsl/functions.go:69
↓ 1 callers
Function
BuildFlags
(opts *types.ApolloOpts)
flags.go:8
↓ 1 callers
Method
CallContract
(ctx context.Context, msg ethereum.CallMsg, blockNumber *big.Int)
chainservice/cached_client.go:72
↓ 1 callers
Function
ConfigDir
()
config.go:42
↓ 1 callers
Function
ConfigPath
()
config.go:33
↓ 1 callers
Method
Connect
Connect will create a CachedClient and a BlockDater for the given chain and store them in the maps.
chainservice/chainservice.go:67
↓ 1 callers
Method
CreateTable
CreateTable drops and creates the table with `name` if it exists, otherwise just creates it. `cols` contains the results, which in this case are used
db/db.go:79
↓ 1 callers
Function
CtyToSQLType
(t cty.Type)
generate/utils.go:43
↓ 1 callers
Method
EvalFilter
EvalFilter evaluates the filter list, and if one of the items evaluates to false, it returns false and the evaluation should be stopped.
dsl/schema.go:131
↓ 1 callers
Method
EvalSave
EvalSave updates the evaluation context, evaluates the transform blocks and then evaluates the save block. The results will be returned as a map.
dsl/schema.go:174
↓ 1 callers
Method
EvalTransforms
EvalTransforms evaluates the transformation block per contract / top-level method. The identifier is the OutputName of the method or the name of the c
dsl/schema.go:87
↓ 1 callers
Method
Fallback
Fallback is a paid mutator transaction binding the contract fallback function. Solidity: fallback() payable returns()
bindings/erc20/erc20.go:441
↓ 1 callers
Method
FilterEvents
FilterEvents handles the event query from `fromBlock` to `toBlock` concurrently, and sends the results on the `out` channel. It blocks until every eve
chainservice/events.go:23
↓ 1 callers
Method
FilterGlobalEvents
FilterGlobalEvents is like FilterEvents but for global events.
chainservice/events.go:121
↓ 1 callers
Method
FindTargetBlock
NOTE: could we be better off making this a binary search? Sometimes the search gets stuck hopping between 2 blocks because the predicted block differe
chainservice/block_dater.go:99
↓ 1 callers
Function
GenerateColumns
(cols map[string]cty.Value)
generate/sql.go:96
↓ 1 callers
Function
GenerateContextVars
GenerateContextVars converts a CallResult into a map that can be added as context variables. This function is called after the first step (calling met
dsl/schema.go:485
↓ 1 callers
Function
GenerateCreateDDL
GenerateCreateDDL creates CREATE statements based on the tableName and the columns.
generate/sql.go:18
↓ 1 callers
Function
GenerateCsvHeader
(cols map[string]cty.Value)
generate/csv.go:5
↓ 1 callers
Method
HandleResult
HandleResult takes a map of the final results (from the `save` block), and writes it to the preferred output options. If DB output is selected, it wil
output/output.go:82
↓ 1 callers
Method
HasContractEvents
()
dsl/schema.go:256
↓ 1 callers
Method
HasContractMethods
()
dsl/schema.go:266
↓ 1 callers
Method
HasGlobalEvents
()
dsl/schema.go:252
↓ 1 callers
Function
Init
()
main.go:67
↓ 1 callers
Method
InsertResult
InsertResult converts the result map into the table with name `name`.
db/db.go:97
↓ 1 callers
Method
ListenForGlobalEvents
ListenForGlobalEvents is like ListenForEvents but for global events.
chainservice/events.go:323
↓ 1 callers
Method
LogMap
(m map[string]cty.Value)
output/output.go:57
↓ 1 callers
Function
NewCachedClient
(client *ethclient.Client, logParts int)
chainservice/cached_client.go:43
↓ 1 callers
Function
NewChainService
(defaultTimeout time.Duration, actionsPerSecond, logParts int, rpcs map[apolloTypes.Chain]string)
chainservice/chainservice.go:52
↓ 1 callers
Function
NewConfig
(path string)
config.go:18
↓ 1 callers
Function
NewCsvHandler
()
output/output.go:133
↓ 1 callers
Function
NewErc20Caller
NewErc20Caller creates a new read-only instance of Erc20, bound to a specific deployed contract.
bindings/erc20/erc20.go:109
↓ 1 callers
Function
NewOutputHandler
()
output/output.go:25
↓ 1 callers
Method
Ping
(ctx context.Context)
db/db.go:65
↓ 1 callers
Function
Run
(opts types.ApolloOpts)
main.go:97
↓ 1 callers
Method
SecondsToBlockInterval
(ctx context.Context, chain apolloTypes.Chain, seconds int64)
chainservice/chainservice.go:232
↓ 1 callers
Method
Start
Start handles the schema. For every query * it calls Connect to connect the client and block dater * it determines the start and end blocks (using Blo
chainservice/chainservice.go:84
↓ 1 callers
Method
TokenBalance
(types.Chain, common.Address, common.Address, *big.Int)
dsl/schema.go:168
↓ 1 callers
Method
TransferFrom
TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. Solidity: function transferFrom(address _from, address _to, uint25
bindings/erc20/erc20.go:420
↓ 1 callers
Method
Validate
(opts types.ApolloOpts)
dsl/schema.go:213
↓ 1 callers
Method
WithCsv
(csv *CsvHandler)
output/output.go:51
↓ 1 callers
Method
WithDB
(db *db.DB)
output/output.go:39
↓ 1 callers
Method
WithStdOut
()
output/output.go:45
↓ 1 callers
Function
genCallKey
genCallKey will generate a unique key per contract call. If the call returns an immutable value, like ERC20 metadata, the key will be the contract add
chainservice/cached_client.go:59
↓ 1 callers
Method
generateCsvEntry
(name string, res map[string]string)
output/output.go:158
↓ 1 callers
Method
handleQuery
handleQuery is a non-blocking function that handles an individual query. It returns a channel on which the results are sent.
chainservice/chainservice.go:162
↓ 1 callers
Function
matchABIValue
(outputName string, outputs abi.Arguments, results []any)
chainservice/utils.go:24
↓ 1 callers
Function
newDB
()
db/db_test.go:8
↓ 1 callers
Function
setupCloseHandler
(svc *chainservice.ChainService)
main.go:200
Function
AddColumnTypesFromABI
AddColumnTypesFromABI cross-references the name ("event" or "method") with the ABI, to fill in which types the columns need to be. These types get con
generate/sql.go:57
Method
Allowance
Allowance is a free data retrieval call binding the contract method 0xdd62ed3e. Solidity: function allowance(address _owner, address _spender) view r
bindings/erc20/erc20.go:202
Method
Allowance
Allowance is a free data retrieval call binding the contract method 0xdd62ed3e. Solidity: function allowance(address _owner, address _spender) view r
bindings/erc20/erc20.go:209
Method
Approve
Approve is a paid mutator transaction binding the contract method 0x095ea7b3. Solidity: function approve(address _spender, uint256 _value) returns(bo
bindings/erc20/erc20.go:371
next →
1–100 of 154, ranked by callers