Skip to main content

Questions tagged [ethers.rs]

Use the ethers.rs tag for questions specifically about using the ethers.rs Rust library for interacting with the Ethereum blockchain. This includes queries about installation, functionalities, transactions, and smart contract interactions within a Rust environment.

Filter by
Sorted by
Tagged with
1 vote
1 answer
105 views

Uniswap V2 swap tx - invalid codepoint at offset 22; missing continuation byte

So I have recently been using ethers-rs. I was forking mainnet using anvil, and I tried to front run an uniswap v2 swap. Every time I was trying to frontrun the transaction the frontrun swap was ...
Cizia's user avatar
  • 263
1 vote
0 answers
81 views

How do I convert from big endian to little endian types in ethers-rs?

Ethers-rs uses big-endian types when instantiating its I256 type from a raw value with from_raw. How do you reverse the endianness to get a little endian U256 type?
Alexander Angel's user avatar
0 votes
1 answer
122 views

EIP 1559 - Set both priority fee and max fee to the same value

:) Can someone explain to me how this is possible? I mean from EIP1559 documentation is it said that if the max_priority_fee + base_fee > max_fee then the max_priority_fee is reduced. (https://www....
Daddy's user avatar
  • 1
0 votes
0 answers
89 views

How to ABI encode a contract function using ethers

The following function sends a transaction using ethers. Running this gives the error TypeError: func.format is not a function. What am I doing wrong? import { Contract, getDefaultProvider, AbiCoder, ...
Pål Thingbø's user avatar
0 votes
0 answers
188 views

How to decode tx data with Rust ethers.rs

I am trying to decode the tx data using the ethersrs crate with Rust. From the crate source code, I can see that it is possible to decode using an instance of the BaseContract type. However, I cannot ...
user23050542's user avatar
0 votes
1 answer
165 views

ethers.rs - PendingTransaction returns Ok(None)

I'm running into some issue while testing a smart contract. So I published a smart contract, made a call using cli, and I got the data of the call: let data = "...
Nathan's user avatar
  • 101
0 votes
1 answer
85 views

Signing a valid ERC20 transfer transaction

I'm building a backend that has an endpoint to set up a send transaction. This send can be a native, ERC20, ERC721, or ERC1155. The idea is to configure the transaction correctly according to its type,...
Vitor M. Almeida's user avatar
0 votes
0 answers
35 views

Provider does not live long enough

Using ether.rs, I'm trying to listen to multiple steams at the same time. To do this, I have multiple steps: I first receive the provider address as parameter: async fn start( &self, ...
Nathan's user avatar
  • 101