I am developing my smart contracts in Hardhat and testing on RSK Testnet.
To create signer accounts, I am using a mnemonic seed phrase
and the following Hardhat configuration:
require('@nomicfoundation/hardhat-toolbox');
const { mnemonic } =…
Hardhat specifies that to use a different account for contract interactions you should use the connect() method, passing it a Signer, as such:
const [owner, addr1] = await ethers.getSigners();
/* ... */
await…
This is an example - https://etherscan.io/address/0x769250862220d509fb9bed5f88d824c9fb74a833.
It is a proxy contract which I use for minting, the problem is it doesn't have mint function when I use etherscan API to get its ABI. Mint function is only…
I use ethers to interact with solidity contract. I would like to execute multiple transactions at the same time. To do that I know I have to define noonce that would be +1 for each next transaction. I know how to do that when I do
await…
I'm trying to sign a transaction without broadcast using metamask. I have tried web3js and etherjs (eth_signTransaction) but neither worked. How to do this?
I think opensea is signing message and then using it for transaction. How did they do…
On the ethers documentation, it says that the two most commons signers are:
Wallet, which is a class which knows its private key and can execute any operations with it.
JsonRpcSigner, which is connected to a JsonRpcProvider (or sub-class) and is…
I am building an NFT smart contract with solidity, and I am trying to pass and Array of Structs into the constructor when I deploy the contract. However I am getting the following error.
TypeError: Cannot read property 'length' of undefined
The…
I'm looking for a way to get the buy and sell tax of a Token and check if it can be sold once bought.
To do this, here's the method I thought about :
1-Simulate a Buy transaction on the DEX Router Contract
2-Simulate a Sell transaction on the DEX…
I'm trying to automate sending transactions through ethers.js. It works all perfectly on Rinkeby, but then on Polygon the transactions stay pending for days even when adding much more gas than neccessary.
Pending…
I have deployed an erc20 contract (very old version running of open zeplins mintable token contract on solidity 0.4.18)
calling the 'mint', 'total supply', 'finish minting' functions work fine but when i call the "transfer" function i get
Mint…
I have a question : which provider should I choose for interacting with a contract on the mainnet and why ?
It seems like Web3Provider is easier to use, are there any drawbacks ?
Thank you for your answers.
I can't get the value from the signer.getAddress() function on Ethers.js.
When I try to use "alert" or "console.log" it is fine but I want to display it directly on the page. It says; "object Promise".
Here is my code:
import "./App.css";
import {…