Questions tagged [ethersjs]

A lightweight JavaScript library which can be used as an alternative to Web3.js to build your JavaScript front-end and interact with the Ethereum blockchain.

Filter by
Sorted by
Tagged with
0
votes
0answers
27 views

Metamask and Ether.js API

I am trying to use the ether.js API with Metamask (with Ganache GUI i.e. localhost 7545) via the Chrome console. I am getting an error saying that ethers is not defined. > let currentProvider = ...
0
votes
1answer
32 views

What is the ethersjs equivalent of `web3.eth.call` in web3js?

web3.js has the ability to call a transaction and get return data without sending a transaction: web3.eth.call(callObject [, defaultBlock] [, callback]) ethersjs apparently does not have this ...
0
votes
2answers
51 views

Ethers.js: Call constant method with await does not work [closed]

If I try to get the result of a constant function call with: let gameCountAwait = await contract.getGameEntry(0); it fails with: Uncaught SyntaxError: await is only valid in async function ...
1
vote
0answers
48 views

Meta transaction using ethers.js

How can I implement a meta transaction using ethers.js library. My transaction is to transfer 100 tokens from 0xAccountA to 0xAccountB. The transaction will be signed by 0xAccountA but the gas ...
0
votes
1answer
35 views

How to set different signer and gas payer for a single transaction

I am trying to make a transaction of DAI tokens from user wallet 0xDAIUserWallet to some random token contract say 0xRandomContractAddress. In this scenario I am using the private key of DAI User to ...
0
votes
1answer
185 views

Ethers js estimate gas offline?

Looking here in the docs it mentions I need to have the provider attached to estimate gas. But for formatting a transaction offline, I dont have access to the provider. Is there a way to estimate the ...