Skip to content

Commit

Permalink
fix: update schema
Browse files Browse the repository at this point in the history
  • Loading branch information
Bisht13 committed Oct 12, 2024
1 parent 8d8e520 commit 0a458c8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
7 changes: 5 additions & 2 deletions packages/relayer/src/chain.rs
Original file line number Diff line number Diff line change
Expand Up @@ -162,13 +162,16 @@ impl ChainClient {
// Convert each arg to a Token. This conversion depends on the type of arg.
// For example, if arg is a string, you might use Token::String(arg).
// Adjust the conversion based on the actual type of arg.
let token = Token::from(arg); // Replace with appropriate conversion
let token = Token::from(arg);
tokens.push(token);
}

// Now you can use the tokens vector to call the contract function
let call = contract.method::<_, ()>(&function.name, tokens)?;
let _result = call.send().await?;

let tx = call.send().await?;
let receipt = tx.await?;

Ok(())
}
}
Expand Down
4 changes: 2 additions & 2 deletions packages/relayer/src/schema.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use std::collections::HashMap;

use ethers::{
abi::{Abi, Function, Token},
types::Address,
types::{Address, U256},
};
use relayer_utils::AccountCode;
use serde::{Deserialize, Serialize};
Expand All @@ -17,7 +17,7 @@ pub struct EmailTxAuthSchema {
pub function_abi: Function,
pub command_template: String,
pub command_params: Vec<String>,
pub template_id: usize,
pub template_id: U256,
pub remaining_args: Vec<Token>,
pub email_address: String,
pub subject: String,
Expand Down

0 comments on commit 0a458c8

Please sign in to comment.