6,675 questions
Score of 2
0 answers
30 views
errecover returns address 0 for valid eip712 signatures generated with viem. works fine with etherv5
My contract verifies eip712 signatures fine when generated with etherv5 but failsin viem. erecover returns address(0) when generated using viem. verifyTypedData returns true on the frontend so the ...
Best practices
0
votes
0
replies
107
views
How can AI agents authenticate and identify themselves when making RPC calls to blockchain nodes?
I'm building an autonomous AI agent that needs to interact with Ethereum — querying on-chain data, monitoring mempools, and executing transactions without human intervention.
The agent works 24/7 and ...
Score of 1
1 answer
196 views
Why cryptopp generates different signature than libsecp256k1 for ECDSA
I'm trying to use cryptopp to implement ECDSA signing used by Ethereum. But I couldn't get the result right. Here is a sample implementation using both cryptopp and libsecp25k1, where the latter ...
Score of 0
0 answers
38 views
Sending message from Etherenium Sepolia to Solana Testnet through hyperlane always has status pending
I am trying to send message from Etherenium Sepolia Smart Contract to Solana Testnet through Hypelane.
Program on Ethereum Sepolia
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.13;
...
Score of 0
1 answer
75 views
Why does my ERC20 contract revert when calling transferFrom?
I'm writing an ERC20-based contract in Solidity 0.8.21.
When I call transferFrom, the transaction reverts even though the allowance and balance are sufficient.
Here’s a simplified example:
function ...
Score of 0
1 answer
170 views
How to communicate to dapp wallet extensions (like MetaMask and Coinbase) from another extension, the way you can from a site
There's a few different ways of accessing dapp providers, but one of the most standard ways to check everything's good in the context you're running things is with a bog standard,
window....
Score of -1
1 answer
69 views
Chainlink function callback failing but computation is passing
Im working on a smart contract in solidity and im having issues with Chainlink function execution.
I have this source code for the function:
string private functionCode = "return Functions....
Score of 2
1 answer
94 views
Ethers.js can call fetchMarketItems() fine, but PHP (web3p/web3.php) fails to decode the tuple[] return — how do I read struct[] results?
I have an NFT marketplace contract running on a local Hardhat node. The function below returns an array of structs:
struct MarketItem {
uint256 tokenId;
address payable seller;
address ...
Score of 0
1 answer
130 views
How to transfer tokens from one contract to another contract
I have two contracts, A and B. Contract A defines my token. I want to transfer some of these tokens to Contract B.
If I understood correctly:
First, contract A should have some tokens to be able to ...
Score of 2
1 answer
163 views
Uniswap swapping tokens issue
I am trying to swap two tokens A and B for which I have created the pool on the Uniswap testnet Sepolia. But in Remix, when I try to execute the swap, it gives an error.
Everything else is working ...
Score of -1
1 answer
105 views
How to call name and Symbol of an XRC-20 (ERC-20) token on XDC/Ethereum?
I'm trying to interact with a deployed XRC-20 token contract on the XDC Network (EVM-compatible) using Rust and the alloy crate.
I have already deployed my token using MetaMask and Remix IDE, and I ...
Score of 1
0 answers
42 views
Experiencing error when Testing Raffle smart Contract
I'm working on testing a Chainlink VRF-based Raffle contract using Foundry, but I’m encountering a EvmError: Revert when running the test that checks whether the raffle correctly blocks entries while ...
Score of 1
0 answers
84 views
Why does my Hardhat test fail with Transaction reverted after using evm_increaseTime?
I’m testing a Solidity smart contract for a project. A user buys a short-term policy that expires in 5 seconds. After advancing blockchain time by 10 seconds, I try to call claim(), but the ...
Score of 0
0 answers
103 views
Gnosis Safe - Enable module during safe creation
Here is my contracts:
// SPDX-License-Identifier: LGPL-3.0-only
pragma solidity ^0.8.20;
import "hardhat/console.sol";
// import console.log;
interface ISafe {
...
Score of 0
2 answers
95 views
Contract Deployment Size Limit [closed]
I have a question regarding contract size limits on Ethereum. Suppose I have a smart contract whose size has increased by 24,945 bytes — does that mean it can no longer be deployed on the Ethereum ...