BSC Smart Contract Events API
In this section we will see how to get BSC Smart Contract Events information using our API.
Track Newly Created Pools on BSC
This subscription websocket lets you track the newly created pools on Uniswap V3 0xdB1d10011AD0Ff90774D0C6Bb92e5C5c8b4461F7
. And we are listening for a particular event here named as PoolCreated
because whenever a new pool is created on Uniswap V3 this event is fired. You can get the newly created pool address in the response in arguments
.
You can find the query here
subscription {
EVM(network: bsc) {
Events(
where: {Log: {SmartContract: {is: "0xdB1d10011AD0Ff90774D0C6Bb92e5C5c8b4461F7"}, Signature: {Name: {is: "PoolCreated"}}}, TransactionStatus: {Success: true}}
) {
Log {
Signature {
Name
Parsed
Signature
}
SmartContract
}
Transaction {
Hash
}
Block {
Date
Number
}
Arguments {
Type
Value {
... on EVM_ABI_Boolean_Value_Arg {
bool
}
... on EVM_ABI_Bytes_Value_Arg {
hex
}
... on EVM_ABI_BigInt_Value_Arg {
bigInteger
}
... on EVM_ABI_Address_Value_Arg {
address
}
... on EVM_ABI_String_Value_Arg {
string
}
... on EVM_ABI_Integer_Value_Arg {
integer
}
}
Name
}
}
}
}