1
vote
Accepted
Using ecrecover returns incorrect signer only for specific data (approx 0.3% of cases)
In your signMessage function, to get the bytes (Uint8Array) representation of the messageHash, you need to use the ethers.getBytes function instead of ethers.toBeArray, like:
const signMessage = async ...
1
vote
Accepted
Create/set "subId" by createSubscription() and get "subId" vrfCoordinatorV2_5Mock calling by javascript in hardhat environment
Instead of events, it should be the logs array, inside the createSubIdReceipt object.
So, replace this line:
subscriptionId = createSubIdReceipt.events[0].args.subId
with:
subscriptionId = ...
1
vote
Accepted
Transaction is not going through even when bundle receipt returns 1
The problem might be due to the testnet because Flashbots relays on testnets are generally less stable compared to their mainnet counterparts.
You can try to simulate your bundle before actually ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
ethers.js × 1708solidity × 520
hardhat × 359
web3js × 279
javascript × 195
metamask × 119
react × 117
blockchain × 92
uniswap × 88
ether × 77
nodejs × 73
transactions × 67
hardhat-deploy × 60
events × 59
testing × 52
erc-20 × 50
contract-development × 48
contract-deployment × 48
web3-providers × 48
etherscan × 47
ethereumjs × 45
signature × 40
dapps × 38
nft × 38
uniswapv3 × 37