Skip to content

Commit f872935

Browse files
committed
hmm
1 parent 771f815 commit f872935

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

apps/fortuna/src/chain/ethereum.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,8 +102,12 @@ impl<T: JsonRpcClient + 'static + Clone> SignablePythContractInner<T> {
102102
provider: &Address,
103103
user_randomness: &[u8; 32],
104104
) -> Result<u64> {
105+
println!("1");
106+
105107
let fee = self.get_fee(*provider).call().await?;
106108

109+
println!("2");
110+
107111
let hashed_randomness: [u8; 32] = Keccak256::digest(user_randomness).into();
108112

109113
if let Some(r) = self
@@ -113,6 +117,7 @@ impl<T: JsonRpcClient + 'static + Clone> SignablePythContractInner<T> {
113117
.await?
114118
.await?
115119
{
120+
println!("3");
116121
// Extract Log from TransactionReceipt.
117122
let l: RawLog = r.logs[0].clone().into();
118123
if let PythRandomEvents::RequestedFilter(r) = PythRandomEvents::decode_log(&l)? {

apps/fortuna/src/command/generate.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,10 @@ pub async fn generate(opts: &GenerateOptions) -> Result<()> {
1919
let user_randomness = rand::random::<[u8; 32]>();
2020
let provider = opts.provider;
2121

22+
tracing::info!("starting");
23+
2224
let mut last_block_number = contract.provider().get_block_number().await?;
25+
tracing::info!(block_number = last_block_number.as_u64(), "block number");
2326

2427
// Request a random number on the contract
2528
let sequence_number = contract

0 commit comments

Comments
 (0)