Contract Creation
Tracks smart contract creation events.
init
) bytecode{base_url}
/api/{api-key}
/subgraphs/id/{subgraph_id}
{
contract_creation(
orderBy: block_number
orderDirection: desc
) {
address
deployer
code
code_hash
from
to
factory
input
ordinal
block_hash
block_number
block_time
block_date
block_month
transaction_hash
transaction_index
}
}
graph TD;
map_contract_creation[map: map_contract_creation];
sf.substreams.v1.Clock[source: sf.substreams.v1.Clock] --> map_contract_creation;
block_index:map_block_index --> map_contract_creation;
graph_out[map: graph_out];
map_contract_creation --> graph_out;
block_index:map_block_index[map: block_index:map_block_index];
sf.ethereum.type.v2.Block[source: sf.ethereum.type.v2.Block] --> block_index:map_block_index;
Name: map_contract_creation
Initial block: 0
Kind: map
Input: source: sf.substreams.v1.Clock
Input: map: block_index:map_block_index
Output Type: proto:contract_creation.v1.Events
Hash: a003944925bdeca9470fd20078f042e158a1191c
Name: graph_out
Initial block: 0
Kind: map
Input: map: map_contract_creation
Output Type: proto:sf.substreams.sink.entity.v1.EntityChanges
Hash: 1a168932f997af5283526d4bf56cc2311649818c
Name: block_index:map_block_index
Initial block: 0
Kind: map
Input: source: sf.ethereum.type.v2.Block
Output Type: proto:sf.ethereum.type.v2.Block
Hash: 6c09d386577f8c62fe1b3f1cf50622bb0f08a48a
graph indexer rules prepare --network arbitrum-one <Qm>
graph indexer allocations create <Qm> arbitrum-one 100
docker build -t subgraph-contract-creation
docker run -it subgraph-contract-creation
[!IMPORTANT] Requires
substreams
,buf
andgraph
CLIs installed as well as Rust withwasm32-unknown-unknown
target.
make [all]
make spkg-build
make block-index
make subgraph-build-[mainnet|...|all]
substreams gui contract-creation@v0.3.0 map_contract_creation
substreams gui contract-creation@v0.3.0 graph_out
substreams gui contract-creation@v0.3.0 block_index:map_block_index
message
DeployRequest
message
Parameter
message
DeployResponse
message
UpdateRequest
message
UpdateResponse
message
InfoRequest
message
InfoResponse
message
SinkProgress
message
PackageInfo
message
ListRequest
message
ListResponse
message
DeploymentWithStatus
message
RemoveRequest
message
RemoveResponse
message
PauseRequest
message
PauseResponse
message
StopRequest
message
StopResponse
message
ResumeRequest
message
ResumeResponse
enum
DeploymentStatus
message
Block
message
BlockHeader
message
Uint64NestedArray
message
Uint64Array
message
BigInt
message
TransactionTrace
message
AccessTuple
message
TransactionReceipt
message
Log
message
Call
message
StorageChange
message
BalanceChange
message
NonceChange
message
AccountCreation
message
CodeChange
message
GasChange
message
HeaderOnlyBlock
message
BlockWithRefs
message
TransactionTraceWithBlockRef
message
TransactionRefs
message
BlockRef
enum
TransactionTraceStatus
enum
CallType
message
FileDescriptorSet
message
FileDescriptorProto
message
DescriptorProto
message
ExtensionRangeOptions
message
FieldDescriptorProto
message
OneofDescriptorProto
message
EnumDescriptorProto
message
EnumValueDescriptorProto
message
ServiceDescriptorProto
message
MethodDescriptorProto
message
FileOptions
message
MessageOptions
message
FieldOptions
message
OneofOptions
message
EnumOptions
message
EnumValueOptions
message
ServiceOptions
message
MethodOptions
message
UninterpretedOption
message
SourceCodeInfo
message
GeneratedCodeInfo
message
Any
message
Timestamp
message
Modules
message
Binary
message
Module
message
Package
message
NetworkParams
message
PackageMetadata
message
ModuleMetadata
message
Clock
message
BlockRef
message
RpcCalls
message
RpcCall
message
RpcResponses
message
RpcResponse
message
Request
message
Response
message
BlockUndoSignal
message
BlockScopedData
message
SessionInit
message
InitialSnapshotComplete
message
InitialSnapshotData
message
MapModuleOutput
message
StoreModuleOutput
message
OutputDebugInfo
message
ModulesProgress
message
ProcessedBytes
message
Error
message
Job
message
Stage
message
ModuleStats
message
ExternalCallMetric
message
StoreDelta
message
BlockRange
message
EntityChanges
message
EntityChange
message
Value
message
Array
message
Field