Skip to content

Commit

Permalink
fix(evm): revert from to back to optional (#1881)
Browse files Browse the repository at this point in the history
* revert from,to to optional in ethtxinfo

* fmt
  • Loading branch information
canonbrother authored Apr 11, 2023
1 parent 46b6c62 commit 4599ce0
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
1 change: 1 addition & 0 deletions src/rust/crates/ain-grpc/src/rpc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ impl EthServiceApi for EthService {
// Get from wallet
Ok(EthAccountsResult { accounts: vec![] })
}

fn Eth_GetBalance(
handler: Arc<Handlers>,
input: EthGetBalanceInput,
Expand Down
4 changes: 2 additions & 2 deletions src/rust/crates/ain-grpc/src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ const BOB: &str = "0x0000000000000000000000000000000000000001";
fn should_call() {
let handler = Arc::new(Handlers::new());
let tx_info = EthTransactionInfo {
from: ALICE.to_string(),
to: BOB.to_string(),
from: Some(ALICE.to_string()),
to: Some(BOB.to_string()),
gas: None,
price: None,
value: None,
Expand Down
6 changes: 3 additions & 3 deletions src/rust/protobuf/types/eth.proto
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ message EthAccountsResult {
}

message EthTransactionInfo {
string from = 1; // The address from which the transaction is sent
string to = 2; // The address to which the transaction is addressed
optional string from = 1; // The address from which the transaction is sent
optional string to = 2; // The address to which the transaction is addressed
optional uint64 gas = 3; // The integer of gas provided for the transaction execution
optional uint64 price = 4; // The integer of gas price used for each paid gas encoded as hexadecimal
optional uint64 value = 5; // The integer of value sent with this transaction encoded as hexadecimal
optional string data = 6; // The hash of the method signature and encoded parameters.
optional uint64 nonce = 7; // The integer of a nonce. This allows to overwrite your own pending transactions that use the same nonce.
optional uint64 nonce = 7; // The integer of a nonce. This allows to overwrite your own pending transactions that use the same nonce.
}

message EthBlockInfo {
Expand Down

0 comments on commit 4599ce0

Please sign in to comment.