@@ -68,17 +68,17 @@ async fn main() -> Result<()> {
68
68
println ! ( "{}" , SimpleRika :: max_felt( ) ) ;
69
69
}
70
70
71
- Commands :: Pedersen { x , y } => {
72
- println ! ( "{:#x}" , SimpleRika :: pedersen( & x , & y ) ? ) ;
71
+ Commands :: Pedersen { elements } => {
72
+ println ! ( "{:#x}" , SimpleRika :: pedersen( & elements ) ) ;
73
73
}
74
74
75
75
Commands :: BlockNumber { starknet } => {
76
- let res = Rika :: new ( starknet. rpc_url ) . block_number ( ) . await ?;
76
+ let res = Rika :: new_with_http ( starknet. rpc_url ) . block_number ( ) . await ?;
77
77
println ! ( "{res}" ) ;
78
78
}
79
79
80
80
Commands :: ChainId { starknet } => {
81
- let chain_id = Rika :: new ( starknet. rpc_url ) . chain_id ( ) . await ?;
81
+ let chain_id = Rika :: new_with_http ( starknet. rpc_url ) . chain_id ( ) . await ?;
82
82
println ! ( "{chain_id}" ) ;
83
83
}
84
84
@@ -88,14 +88,14 @@ async fn main() -> Result<()> {
88
88
to_json,
89
89
starknet,
90
90
} => {
91
- let res = Rika :: new ( starknet. rpc_url )
91
+ let res = Rika :: new_with_http ( starknet. rpc_url )
92
92
. get_transaction_by_hash ( hash, field, to_json)
93
93
. await ?;
94
94
println ! ( "{res}" ) ;
95
95
}
96
96
97
97
Commands :: TransactionStatus { hash, starknet } => {
98
- let res = Rika :: new ( starknet. rpc_url )
98
+ let res = Rika :: new_with_http ( starknet. rpc_url )
99
99
. get_transaction_status ( hash)
100
100
. await ?;
101
101
println ! ( "{res}" ) ;
@@ -107,7 +107,7 @@ async fn main() -> Result<()> {
107
107
to_json,
108
108
starknet,
109
109
} => {
110
- let res = Rika :: new ( starknet. rpc_url )
110
+ let res = Rika :: new_with_http ( starknet. rpc_url )
111
111
. get_transaction_receipt ( hash, field, to_json)
112
112
. await ?;
113
113
println ! ( "{res}" ) ;
@@ -120,7 +120,7 @@ async fn main() -> Result<()> {
120
120
field,
121
121
starknet,
122
122
} => {
123
- let block = Rika :: new ( starknet. rpc_url )
123
+ let block = Rika :: new_with_http ( starknet. rpc_url )
124
124
. block ( id, full, field, to_json)
125
125
. await ?;
126
126
println ! ( "{block}" )
@@ -131,7 +131,7 @@ async fn main() -> Result<()> {
131
131
human_readable,
132
132
starknet,
133
133
} => {
134
- let timestamp = Rika :: new ( starknet. rpc_url )
134
+ let timestamp = Rika :: new_with_http ( starknet. rpc_url )
135
135
. block ( block_id, false , Some ( "timestamp" . to_string ( ) ) , false )
136
136
. await ?;
137
137
@@ -147,7 +147,7 @@ async fn main() -> Result<()> {
147
147
}
148
148
149
149
Commands :: TransactionCount { block_id, starknet } => {
150
- let total = Rika :: new ( starknet. rpc_url )
150
+ let total = Rika :: new_with_http ( starknet. rpc_url )
151
151
. get_block_transaction_count ( block_id)
152
152
. await ?;
153
153
@@ -159,7 +159,7 @@ async fn main() -> Result<()> {
159
159
block_id,
160
160
starknet,
161
161
} => {
162
- let nonce = Rika :: new ( starknet. rpc_url )
162
+ let nonce = Rika :: new_with_http ( starknet. rpc_url )
163
163
. get_nonce ( contract_address, & block_id)
164
164
. await ?;
165
165
println ! ( "{nonce}" ) ;
@@ -171,7 +171,7 @@ async fn main() -> Result<()> {
171
171
block_id,
172
172
starknet,
173
173
} => {
174
- let res = Rika :: new ( starknet. rpc_url )
174
+ let res = Rika :: new_with_http ( starknet. rpc_url )
175
175
. get_storage_at ( contract_address, index, & block_id)
176
176
. await ?;
177
177
@@ -190,15 +190,15 @@ async fn main() -> Result<()> {
190
190
block_id,
191
191
starknet,
192
192
} => {
193
- let res = Rika :: new ( starknet. rpc_url )
193
+ let res = Rika :: new_with_http ( starknet. rpc_url )
194
194
. call ( & contract_address, & function, & input, & block_id)
195
195
. await ?;
196
196
197
197
println ! ( "{res}" ) ;
198
198
}
199
199
200
200
Commands :: StateUpdate { block_id, starknet } => {
201
- let res = Rika :: new ( starknet. rpc_url )
201
+ let res = Rika :: new_with_http ( starknet. rpc_url )
202
202
. get_state_update ( & block_id)
203
203
. await ?;
204
204
println ! ( "{res}" ) ;
@@ -227,7 +227,7 @@ async fn main() -> Result<()> {
227
227
block_id,
228
228
starknet,
229
229
} => {
230
- let res = Rika :: new ( starknet. rpc_url )
230
+ let res = Rika :: new_with_http ( starknet. rpc_url )
231
231
. get_class_code ( hash, & block_id)
232
232
. await ?;
233
233
println ! ( "{res}" ) ;
@@ -238,7 +238,7 @@ async fn main() -> Result<()> {
238
238
block_id,
239
239
starknet,
240
240
} => {
241
- let res = Rika :: new ( starknet. rpc_url )
241
+ let res = Rika :: new_with_http ( starknet. rpc_url )
242
242
. get_contract_code ( contract_address, & block_id)
243
243
. await ?;
244
244
println ! ( "{res}" ) ;
@@ -249,7 +249,7 @@ async fn main() -> Result<()> {
249
249
block_id,
250
250
starknet,
251
251
} => {
252
- let res = Rika :: new ( starknet. rpc_url )
252
+ let res = Rika :: new_with_http ( starknet. rpc_url )
253
253
. get_contract_class ( contract_address, & block_id)
254
254
. await ?;
255
255
println ! ( "{res}" ) ;
@@ -275,7 +275,7 @@ async fn main() -> Result<()> {
275
275
to_block,
276
276
starknet,
277
277
} => {
278
- let res = Rika :: new ( starknet. rpc_url )
278
+ let res = Rika :: new_with_http ( starknet. rpc_url )
279
279
. get_events (
280
280
EventFilter {
281
281
address : from,
@@ -304,7 +304,7 @@ async fn main() -> Result<()> {
304
304
block_id,
305
305
starknet,
306
306
} => {
307
- let res = Rika :: new ( starknet. rpc_url )
307
+ let res = Rika :: new_with_http ( starknet. rpc_url )
308
308
. get_eth_balance ( address, block_id)
309
309
. await ?;
310
310
println ! ( "{res}" ) ;
@@ -328,7 +328,7 @@ async fn main() -> Result<()> {
328
328
}
329
329
330
330
Commands :: Syncing { starknet } => {
331
- let res = Rika :: new ( starknet. rpc_url ) . syncing ( ) . await ?;
331
+ let res = Rika :: new_with_http ( starknet. rpc_url ) . syncing ( ) . await ?;
332
332
println ! ( "{res}" ) ;
333
333
}
334
334
}
0 commit comments