Releases: pinax-network/substreams-abis
Releases · pinax-network/substreams-abis
v0.4.5
v0.4.4
- Add
CRYPTOPUNKS
v0.4.3
- Add Arbitrum WETH =
aeweth
v0.4.2
- Add Sandbox ERC-1155 to NFTs
v0.4.1
NFTs Collections
- Azuki
- BoredApeYachtClub
- Doodles
- LilPudgys
- MutantApeYachtClub
- PudgyPenguins
v0.4.0
- add Seaport ABI
-
OrderFulfilled
-
OrderCancelled
-
OrderValidated
-
OrdersMatched
-
Example code
use substreams::{hex, scalar::BigInt};
use substreams_abis::evm::seaport::events::OrderFulfilled;
use substreams_ethereum::pb::eth::v2::Log;
// Example log for OrderFulfilled event
// https://etherscan.io/tx/0xa89c4e327e91944081e13d90701861552a09640721527809085e604b65056588#eventlog
let log = Log {
topics: vec![
hex!("9d9af8e38d66c62e2c12f0225249fd9d721c54b83f48d9352c97c6cacdcb6f31").to_vec(),
hex!("0000000000000000000000005c34e725cca657f02c1d81fb16142f6f0067689b").to_vec(),
hex!("000000000000000000000000004c00500000ad104d7dbd00e3ae0a5c00560c00").to_vec(),
],
data: hex!("d3b3bf7a4a36ca79f3d565a1d7ed33baef97b8db0e56695b4db9ffe286194313000000000000000000000000caeed014e8ec72cba7adcd979ba0cda71f04215c000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000001200000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000200000000000000000000000045359616610a584cc39aecdcbb2a4579767800230000000000000000000000000000000000000000000000000000000000000b790000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000117541c86d20000000000000000000000000005c34e725cca657f02c1d81fb16142f6f0067689b000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000017a598c3a0000000000000000000000000000000a26b00c1f0df003000390027140000faa7190000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ec77f7a440000000000000000000000000006f452562d7e0e9df2135b5f797cff9a34b0b550c").to_vec(),
address: hex!("0000000000000068F116a894984e2DB1123eB395").to_vec(), // ENS Public Resolver
block_index: 0,
index: 0,
ordinal: 0,
};
match OrderFulfilled::decode(&log) {
Ok(event) => {
assert_eq!(
event.recipient,
hex!("caeEd014e8Ec72CBA7AdcD979ba0cDa71F04215C")
);
// offer
let item_type = event.offer[0].0.clone();
let token: Vec<u8> = event.offer[0].1.clone();
let identifier = event.offer[0].2.clone();
let amount = event.offer[0].3.clone();
assert_eq!(item_type, BigInt::try_from("2".to_string()).unwrap());
assert_eq!(token, hex!("45359616610A584CC39AecdcBb2A457976780023"));
assert_eq!(identifier, BigInt::try_from("2937".to_string()).unwrap());
assert_eq!(amount, BigInt::try_from("1".to_string()).unwrap());
// consideration
let amount_offerer = event.consideration[0].3.clone();
let amount_fee = event.consideration[1].3.clone();
let amount_collection = event.consideration[2].3.clone();
assert_eq!(amount_offerer, BigInt::try_from("4914000000000000".to_string()).unwrap());
assert_eq!(amount_fee, BigInt::try_from("26000000000000".to_string()).unwrap());
assert_eq!(amount_collection, BigInt::try_from("260000000000000".to_string()).unwrap());
}
Err(e) => {
panic!("Error decoding event: {:?}", e);
}
}
v0.3.2
What's Changed
- Add ENS ABIs and Rust bindings by @PaulieB14 in #1
- Add ENS
base,v0,v1
New Contributors
- @PaulieB14 made their first contribution in #1
Full Changelog: v0.2.1...v0.3.2
v0.2.1
- Removed Symbol/Name custom ABI
- Added ABI support for:
EVM
-
ERC-3643
EVM Tokens
- SAI/DAI
- USDC
- USDT
- WETH
- WBTC
- stETH
v0.1.3
What's new?
-
Uniswap V3
-
Pool
-
Factory
-
-
Uniswap V4
-
PoolManager
-
-
erc-20
-
Names
&Symbols
-
USDC
-
v0.1.2
- Added Uniswap V2 Pair & Factory
Example Pair
use substreams_abis::evm::uniswap::v2::pair::events::Sync;
// https://etherscan.io/tx/0x9bec174ed8e96e6fe302e38a1a62ea4660830d1e791029048367be0caf063573#eventlog
let log = Log {
// Sync liquidity pairs
// reserve0: 1149216704419334
// reserve1: 1935417248994
topics: vec![
hex!("1c411e9a96e071241c2f21f7726b17ae89e3cab4c78be50e062b03a9fffbbad1").to_vec(), // topic0
],
data: hex!("00000000000000000000000000000000000000000000000000041534dd6fd606000000000000000000000000000000000000000000000000000001c29fdb8ce2").to_vec(), // 199962525
address: hex!("fCd13EA0B906f2f87229650b8D93A51B2e839EBD").to_vec(), // Uniswap V2: DOGE-USDT
block_index: 0,
index: 0,
ordinal: 0,
};
match Sync::decode(&log) {
Ok(event) => {
assert_eq!(event.reserve0, BigInt::from_str("1149216704419334").unwrap());
assert_eq!(event.reserve1, BigInt::from_str("1935417248994").unwrap());
}
Err(e) => {
panic!("Error decoding Transfer event: {:?}", e);
}
}
Example Factory
use substreams_abis::evm::uniswap::v2::factory::events::PairCreated;
// https://etherscan.io/tx/0x245184375c2f1a6117bd8298a8b6fefcb76ff682e6b2c210fdb19d71514488e9
let log = Log {
topics: vec![
hex!("0d3648bd0f6ba80134a33ba9275ac585d9d315f0ad8355cddefde31afa28d0e9").to_vec(), // topic0
hex!("0000000000000000000000005b51b4cfa71d5f9dac92d1333810b6e9e4186da2").to_vec(), // topic1
hex!("000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2").to_vec(), // topic2
],
data: hex!("000000000000000000000000ce89ffd7a589987cf785ff13f70360dc05f7bf6b0000000000000000000000000000000000000000000000000000000000063934").to_vec(), // 199962525
address: hex!("5C69bEe701ef814a2B6a3EDD4B1652CB9cc5aA6f").to_vec(), // Uniswap V2: Factory Contract
block_index: 0,
index: 0,
ordinal: 0,
};
match PairCreated::decode(&log) {
Ok(event) => {
assert_eq!(event.pair, hex!("ce89ffd7a589987cf785ff13f70360dc05f7bf6b"));
}
Err(e) => {
panic!("Error decoding Transfer event: {:?}", e);
}
}