Skip to content

Commit 4097cf4

Browse files
committed
fix
1 parent 395a691 commit 4097cf4

File tree

5 files changed

+2
-159
lines changed

5 files changed

+2
-159
lines changed

ethereum/circuits/lib/src/fixtures/mainnet/paris/bored_ape_yacht_club/state_proof.nr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use crate::{merkle_patricia_proofs::proof::{Proof, ProofInput}, misc::types::Bytes32, serde::Serde};
1+
use crate::{merkle_patricia_proofs::proof::{Proof, ProofInput}, serde::Serde};
22

33
pub(crate) global proof_input: ProofInput<66, 110, 10, 148> = ProofInput {
44
key: [

vlayer/ethereum/circuits/lib/src/chain_id.nr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,4 @@ pub(crate) global MAINNET: u32 = 1;
1111
//global CELO: u32 = 42220;
1212
//global AVALANCHE: u32 = 43114;
1313
//global MUMBAI: u32 = 80001;
14-
pub(crate) global SEPOLIA: u32 = 11155111;
14+
//pub(crate) global SEPOLIA: u32 = 11155111;

vlayer/ethereum/circuits/lib/src/nft_list.nr

Lines changed: 0 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -55,42 +55,3 @@ pub mod mainnet {
5555
}
5656
}
5757
}
58-
59-
mod sepolia {
60-
use crate::chain_id;
61-
use crate::nft::ERC721Token;
62-
use crate::slot::{dynamic_array_with_precalculated_slot, struct_slot};
63-
use dep::ethereum::{misc::{bytes32::field_to_bytes32, types::Bytes32}, uint256::U256};
64-
use dep::std::field::bytes32_to_field;
65-
66-
// free mint: https://sepolia.etherscan.io/address/0x80d97726548fedae6ad7cf8df4f2b514fd24afba#readContract
67-
fn FAKE_BORED_APE_YACHT_CLUB() -> ERC721Token {
68-
ERC721Token {
69-
address: [
70-
0x80, 0xd9, 0x77, 0x26, 0x54, 0x8f, 0xed, 0xae, 0x6a, 0xd7, 0xcf, 0x8d, 0xf4, 0xf2,
71-
0xb5, 0x14, 0xfd, 0x24, 0xaf, 0xba,
72-
],
73-
token_id_to_slot: |token_id| {
74-
let BORED_APE_YACHT_CLUB_MAX_TOKEN_ID: u32 = 9999;
75-
let BORED_APE_YACHT_CLUB_TOKEN_OWNERS_INNER_ENTRIES_SLOT = U256::from([
76-
0x40, 0x57, 0x87, 0xfa, 0x12, 0xa8, 0x23, 0xe0, 0xf2, 0xb7, 0x63, 0x1c, 0xc4,
77-
0x1b, 0x3b, 0xa8, 0x82, 0x8b, 0x33, 0x21, 0xca, 0x81, 0x11, 0x11, 0xfa, 0x75,
78-
0xcd, 0x3a, 0xa3, 0xbb, 0x5a, 0xce,
79-
]);
80-
let VALUE_INDEX = 1;
81-
82-
assert(
83-
bytes32_to_field(token_id) as u32 <= BORED_APE_YACHT_CLUB_MAX_TOKEN_ID,
84-
"Token ID is too high",
85-
);
86-
let owner_slot = dynamic_array_with_precalculated_slot(
87-
BORED_APE_YACHT_CLUB_TOKEN_OWNERS_INNER_ENTRIES_SLOT,
88-
2,
89-
bytes32_to_field(token_id),
90-
);
91-
struct_slot(owner_slot, VALUE_INDEX)
92-
},
93-
chain_id: chain_id::SEPOLIA,
94-
}
95-
}
96-
}

vlayer/ethereum/circuits/lib/src/slot_test.nr

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,6 @@ mod dynamic_array_with_precalculated_slot {
129129

130130
mod struct_slot {
131131
use crate::slot::struct_slot;
132-
use dep::ethereum::misc::bytes32::field_to_bytes32;
133132
use dep::ethereum::uint256::U256;
134133

135134
#[test]

vlayer/ethereum/circuits/lib/src/token_list.nr

Lines changed: 0 additions & 117 deletions
Original file line numberDiff line numberDiff line change
@@ -12,121 +12,4 @@ pub mod mainnet {
1212
allowances_slot: U256::from_field(10),
1313
chain_id: chain_id::MAINNET,
1414
};
15-
16-
global TETHER_USD: ERC20Token = ERC20Token {
17-
address: [
18-
0xda, 0xc1, 0x7f, 0x95, 0x8d, 0x2e, 0xe5, 0x23, 0xa2, 0x20, 0x62, 0x06, 0x99, 0x45,
19-
0x97, 0xc1, 0x3d, 0x83, 0x1e, 0xc7,
20-
],
21-
balances_slot: U256::from_field(2),
22-
allowances_slot: U256::from_field(5),
23-
chain_id: chain_id::MAINNET,
24-
};
25-
26-
global UNISWAP: ERC20Token = ERC20Token {
27-
address: [
28-
0x1f, 0x98, 0x40, 0xa8, 0x5d, 0x5a, 0xf5, 0xbf, 0x1d, 0x17, 0x62, 0xf9, 0x25, 0xbd,
29-
0xad, 0xdc, 0x42, 0x01, 0xf9, 0x84,
30-
],
31-
balances_slot: U256::from_field(4),
32-
allowances_slot: U256::from_field(3),
33-
chain_id: chain_id::MAINNET,
34-
};
35-
36-
global WBTC: ERC20Token = ERC20Token {
37-
address: [
38-
0x22, 0x60, 0xfa, 0xc5, 0xe5, 0x54, 0x2a, 0x77, 0x3a, 0xa4, 0x4f, 0xbc, 0xfe, 0xdf,
39-
0x7c, 0x19, 0x3b, 0xc2, 0xc5, 0x99,
40-
],
41-
balances_slot: U256::from_field(0),
42-
allowances_slot: U256::from_field(2),
43-
chain_id: chain_id::MAINNET,
44-
};
45-
46-
global EZETH: ERC20Token = ERC20Token {
47-
address: [
48-
0xbf, 0x54, 0x95, 0xef, 0xe5, 0xdb, 0x9c, 0xe0, 0x0f, 0x80, 0x36, 0x4c, 0x8b, 0x42,
49-
0x35, 0x67, 0xe5, 0x8d, 0x21, 0x10,
50-
],
51-
balances_slot: U256::from_field(33),
52-
allowances_slot: U256::from_field(34),
53-
chain_id: chain_id::MAINNET,
54-
};
55-
56-
global WEETH: ERC20Token = ERC20Token {
57-
address: [
58-
0xcd, 0x5f, 0xe2, 0x3c, 0x85, 0x82, 0x0f, 0x7b, 0x72, 0xd0, 0x92, 0x6f, 0xc9, 0xb0,
59-
0x5b, 0x43, 0xe3, 0x59, 0xb7, 0xee,
60-
],
61-
balances_slot: U256::from_field(65),
62-
allowances_slot: U256::from_field(66),
63-
chain_id: chain_id::MAINNET,
64-
};
65-
66-
global DAI: ERC20Token = ERC20Token {
67-
address: [
68-
0x6b, 0x17, 0x54, 0x74, 0xe8, 0x90, 0x94, 0xc4, 0x4d, 0xa9, 0x8b, 0x95, 0x4e, 0xed,
69-
0xea, 0xc4, 0x95, 0x27, 0x1d, 0x0f,
70-
],
71-
balances_slot: U256::from_field(2),
72-
allowances_slot: U256::from_field(3),
73-
chain_id: chain_id::MAINNET,
74-
};
75-
76-
global WSTETH: ERC20Token = ERC20Token {
77-
address: [
78-
0x7f, 0x39, 0xc5, 0x81, 0xf5, 0x95, 0xb5, 0x3c, 0x5c, 0xb1, 0x9b, 0xd0, 0xb3, 0xf8,
79-
0xda, 0x6c, 0x93, 0x5e, 0x2c, 0xa0,
80-
],
81-
balances_slot: U256::from_field(0),
82-
allowances_slot: U256::from_field(1),
83-
chain_id: chain_id::MAINNET,
84-
};
85-
86-
global USDe: ERC20Token = ERC20Token {
87-
address: [
88-
0x4c, 0x9e, 0xdd, 0x58, 0x52, 0xcd, 0x90, 0x5f, 0x08, 0x6c, 0x75, 0x9e, 0x83, 0x83,
89-
0xe0, 0x9b, 0xff, 0x1e, 0x68, 0xb3,
90-
],
91-
balances_slot: U256::from_field(2),
92-
allowances_slot: U256::from_field(3),
93-
chain_id: chain_id::MAINNET,
94-
};
95-
96-
global PEPE: ERC20Token = ERC20Token {
97-
address: [
98-
0x69, 0x82, 0x50, 0x81, 0x45, 0x45, 0x4c, 0xe3, 0x25, 0xdd, 0xbe, 0x47, 0xa2, 0x5d,
99-
0x4e, 0xc3, 0xd2, 0x31, 0x19, 0x33,
100-
],
101-
balances_slot: U256::from_field(1),
102-
allowances_slot: U256::from_field(2),
103-
chain_id: chain_id::MAINNET,
104-
};
105-
106-
global MKR: ERC20Token = ERC20Token {
107-
address: [
108-
0x9f, 0x8f, 0x72, 0xaa, 0x93, 0x04, 0xc8, 0xb5, 0x93, 0xd5, 0x55, 0xf1, 0x2e, 0xf6,
109-
0x58, 0x9c, 0xc3, 0xa5, 0x79, 0xa2,
110-
],
111-
balances_slot: U256::from_field(1),
112-
allowances_slot: U256::from_field(2),
113-
chain_id: chain_id::MAINNET,
114-
};
115-
}
116-
117-
mod sepolia {
118-
use crate::chain_id;
119-
use crate::token::ERC20Token;
120-
use dep::ethereum::uint256::U256;
121-
122-
// free mint: https://sepolia.etherscan.io/token/0x4f657a53e27e83ee7d3df8452abfd57d658765d6
123-
global FakePEPE: ERC20Token = ERC20Token {
124-
address: [
125-
0x4f, 0x65, 0x7a, 0x53, 0xe2, 0x7e, 0x83, 0xee, 0x7d, 0x3d, 0xf8, 0x45, 0x2a, 0xbf,
126-
0xd5, 0x7d, 0x65, 0x87, 0x65, 0xd6,
127-
],
128-
balances_slot: U256::from_field(1),
129-
allowances_slot: U256::from_field(2),
130-
chain_id: chain_id::SEPOLIA,
131-
};
13215
}

0 commit comments

Comments
 (0)