I have multiple ERC20 tokens, deployed on Rootstock,
and I want to track their balances and allowances in a real time from my DApp.
In ethers.js,
I can track their balances by alternately calling the functions
balanceOf(address) and allowance(owner,…
How do you create a new Provider using a custom node url using the ethers package?
Looking to do something like this:
const provider = new ethers.providers.Web3Provider('http://my-node.com')
I want to connect to ganache and I get an error that I don't know how to solve it. here is my deploy.js code which is script node.js
const ethers = require("ethers")
// const solc = require("solc")
const fs = require("fs-extra")
…
I have two interacting smart contracts that I am developing/testing in Hardhat and deploying to RSK:
DelegateCallee smart contract with a getData() function, emitting a Received event:
contract DelegateCallee {
event Received(address sender,…
I have 2 interacting smart contracts which I am developing/testing in Hardhat and deploying to RSK. One of them is an ERC1363 payable token with transferAndCall(address,uint256,bytes) function, and the second one is a token receiver whose…
I have a Solidity smart contract Demo which I am developing in Hardhat and testing on the RSK Testnet.
//SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.0;
contract Demo {
event Error(string);
fallback() external {
emit…
Say I have a Solidity smart contract MultiToken.sol which I am developing and testing using Hardhat and deploying to the RSK network.
//SPDX-License-Identifier: Unlicense
pragma solidity ^0.8.0;
import…
I am trying to sign a message with wallet connect using ethers, but I am facing an issue when verifying the message with ambire wallet, it's not returning any response.
const signMessage = async () => {
try {
console.log("started");
…
I'm trying to pass a Web3Provider as a prop to a hook with others, and I keep getting an error
Here's the code of how I get the provider
const provider = new ethers.providers.Web3Provider(window.ethereum)
Then I have inside the return…
I'm fetching transaction data using Etherscan API. This is the example result I'm getting:
{
blockNumber: '7409930',
timeStamp: '1639151980',
hash: '...',
nonce: '4124',
...
input:…
I have deployed a smart contract on a public testnet and now I am trying to connect to it from the front end using ethers js. But when I try to fetch the value it gives the following errors in the console:
I am using Angular for the front end and…
I am attempting to generate a personal_sign in Golang like its implemented in ethers.js. Similar question but that ended up using the regular sign over the personal sign_implementation.
Ethers
// keccak256 hash of the data
let dataHash =…
I'm trying to listen to events emitted from the USDT contract Transfer function using ethers.js (not web3) in a node.js application.
When I run the script, the code runs with no errors and then quickly exits. I'd expect to get the event logs. I'm…
When I deploy 2 smart contracts at the same time to Hedera Testnet,
I get the following error:
nonce has already been used [ See: https://links.ethers.org/v5-errors-NONCE_EXPIRED ]
This occurs intermittently, roughly about 20% of the time.
Their…