Macros: Core Tables: ABIs - FlipsideCrypto/fsc-evm GitHub Wiki
The following macros make up the ABI pipeline which consolidates ABI data from various sources and maintains a complete view of contract events and functions. These macros can be accessed via version >=1.7.0
of the fsc-evm
package. Please see the fsc-evm
installation instructions in the README for more details on how to access and utilize this macro effectively.
silver_user_verified_abis
Usage
This macro is used to build the silver.user_verified_abis
table. It takes in user-submitted ABIs from the ABI requestor tool, standardises the function and event signatures and validates them against recent traces and event logs. No chain parameter is needed here because it derives the chain name from the name description in the dbt_project.yml file.
fsc_evm.silver_user_verified_abis Note: The link must point to the permalink
, which is the line in the code where the macro begins.
Parameters
Note: Parameters with default
values must be ordered after non-default parameters.
Parameter | Type | Default | Description |
---|---|---|---|
- |
- | - | - |
Example
{{ fsc_evm.silver_user_verified_abis() }}
silver_verified_abis
Usage
This macro is used to build the silver.verified_abis
table. It consolidates ABIs from block explorers and verified user submissions. The macro also includes a logic to handle streamline vs non streamline contract pulls. This will be a parameter called streamline and whenever the chain upgrades to use streamline to pull in contract ABIs, the parameter would need to be set to true.
This macro also requires specifying the block explorer name. The full list of current block explorers by chain is shared below. It is set up this way to ensure easier switching of block explorers without the need to upgrade the macro each time.
fsc_evm.silver_verified_abis Note: The link must point to the permalink
, which is the line in the code where the macro begins.
Parameters
Note: Parameters with default
values must be ordered after non-default parameters.
Parameter | Type | Default | Description |
---|---|---|---|
block_explorer |
String | - | hardcodes the block explorer name as the abi source. Full list of block explorers below |
streamline |
Boolean | false | when set to true, pulls ABI data from bronze.streamline_contract_abis and bronze.streamline_fr_contract_abis |
Example
{{ fsc_evm.silver_verified_abis (
block_explorer = 'etherscan',
streamline = true
) }}
Block explorer list
Chain | Block Explorer |
---|---|
ethereum | etherscan |
polygon | polyscan |
optimism | opscan |
avalanche | snowscan |
base | basescan |
blast | blastscan |
bsc | bscscan |
gnosis | gnosisscan |
kaia | kaiascope |
sei | seitrace |
|
silver_override_abis
Usage
This macro is used to build the silver.override_abis
table. It acts as a backdoor to insert ABIs.
fsc_evm.silver_override_abis Note: The link must point to the permalink
, which is the line in the code where the macro begins.
Parameters
Note: Parameters with default
values must be ordered after non-default parameters.
Parameter | Type | Default | Description |
---|---|---|---|
- |
- | - | - |
Example
{{ fsc_evm.silver_override_abis() }}
silver_bytecode_abis
Usage
This macro is used to build the silver.bytecode_abis
table. It matches bytecodes of unverified contracts to known bytecode patterns, to infer ABIs for those unverified contracts.
fsc_evm.silver_bytecode_abis Note: The link must point to the permalink
, which is the line in the code where the macro begins.
Parameters
Note: Parameters with default
values must be ordered after non-default parameters.
Parameter | Type | Default | Description |
---|---|---|---|
- |
- | - | - |
Example
{{ fsc_evm.silver_bytecode_abis() }}
silver_abis
Usage
This macro is used to build the silver.abis
table. It combines and prioritises ABIs from several sources (overrides, verified, user-submitted, and bytecode-matched) and prioritises them. This macro takes in the block_explorer
parameter similar to the silver_verified_abis macro. The difference here is that in the silver_verified_abis macro, the block explorer input is used to hardcode the abi source while in the silver_abis macro, it is used to select the block explorer source name. The full list of block explorers can be found below.
fsc_evm.silver_abis Note: The link must point to the permalink
, which is the line in the code where the macro begins.
Parameters
Note: Parameters with default
values must be ordered after non-default parameters.
Parameter | Type | Default | Description |
---|---|---|---|
block_explorer |
String | - | Used to select the name of block explorer source |
Block explorer list
Chain | Block Explorer |
---|---|
ethereum | etherscan |
polygon | polyscan |
optimism | opscan |
avalanche | snowscan |
base | basescan |
blast | blastscan |
bsc | bscscan |
gnosis | gnosisscan |
kaia | kaiascope |
sei | seitrace |
|
Example
{{ fsc_evm.silver_abis (
block_explorer = 'basescan'
) }}
silver_proxies
Usage
This macro is used to build the silver.proxies
table. It identifies proxy contracts and their implementation addresses based on successful DELEGATECALL traces.
fsc_evm.silver_proxies Note: The link must point to the permalink
, which is the line in the code where the macro begins.
Parameters
Note: Parameters with default
values must be ordered after non-default parameters.
Parameter | Type | Default | Description |
---|---|---|---|
- |
- | - | - |
Example
{{ fsc_evm.silver_proxies() }}
silver_flat_event_abis
Usage
This macro is used to build the silver.flat_event_abis
table. It flattens and standardises event ABIs from the silver.abis
table.
fsc_evm.silver_flat_event_abis Note: The link must point to the permalink
, which is the line in the code where the macro begins.
Parameters
Note: Parameters with default
values must be ordered after non-default parameters.
Parameter | Type | Default | Description |
---|---|---|---|
- |
- | - | - |
Example
{{ fsc_evm.silver_flat_event_abis() }}
silver_complete_event_abis
Usage
This macro is used to build the silver.complete_event_abis
table. It consolidates events from ABIs across implementation and proxy contracts and maintains historical records of when a new implementation addresses are used for a given proxy contract.
fsc_evm.silver_complete_event_abis Note: The link must point to the permalink
, which is the line in the code where the macro begins.
Parameters
Note: Parameters with default
values must be ordered after non-default parameters.
Parameter | Type | Default | Description |
---|---|---|---|
- |
- | - | - |
Example
{{ fsc_evm.silver_complete_event_abis() }}
silver_flat_function_abis
Usage
This macro is used to build the silver.flat_function_abis
table. It flattens and standardises function ABIs from the silver.abis
table.
fsc_evm.silver_flat_function_abis Note: The link must point to the permalink
, which is the line in the code where the macro begins.
Parameters
Note: Parameters with default
values must be ordered after non-default parameters.
Parameter | Type | Default | Description |
---|---|---|---|
- |
- | - | - |
Example
{{ fsc_evm.silver_flat_function_abis() }}
silver_complete_function_abis
Usage
This macro is used to build the silver.complete_function_abis
table. It consolidates functions from ABIs across implementation and proxy contracts and maintains historical records of when a new implementation addresses are used for a given proxy contract.
fsc_evm.silver_complete_function_abis Note: The link must point to the permalink
, which is the line in the code where the macro begins.
Parameters
Note: Parameters with default
values must be ordered after non-default parameters.
Parameter | Type | Default | Description |
---|---|---|---|
- |
- | - | - |
Example
{{ fsc_evm.silver_complete_function_abis() }}