Skip to main content
0 votes
1 answer
36 views

Why can't Hardhat test my typescript test file?

I am new to programming and Web3. I am building an NFT Staking project using TypeScript and Solidity. I already created my contract and wrote both Solidity and TypeScript tests. However, when I run: ...
Figo Aljufrie's user avatar
1 vote
1 answer
23 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 ...
Fauzan Hidayatulloh's user avatar
0 votes
1 answer
40 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....
ChLink sufferer's user avatar
0 votes
0 answers
46 views

Forge test fails with --match-test(Fork mainnet) but passes with forge test(anvil)

I’m running into an issue with my Foundry tests and can’t figure out what’s going wrong. When I run on a local Anvil fork, everything passes just fine. But when I switch to a mainnet fork, I keep ...
NOS Magical's user avatar
0 votes
0 answers
25 views

Forge build Compilation Error. Contract not compiling despite correct remappings. Returning 'Access is denied. (os error 5).'

I have been getting this error whenever I try to run 'forge build.' I don't think there is anything wrong with my remappings because this is exactly how it is in Patrick's course. I also keep getting '...
Ezinne nwoke's user avatar
0 votes
1 answer
74 views

How to correctly ABI-decode multicall results (ERC-20 decimals + symbol) in tests?

I’m trying to understand ABI decoding of multicall RPC calls so I can create stubbed tests using WireMock for my Rust EVM application. The multicall function signature is: function aggregate(Call[] ...
Joel Earps's user avatar
0 votes
1 answer
57 views

Contract deployed successfully on Hedera Testnet, but has no code. Script works for anvil

I have the following deploment script: require('dotenv').config(); const { ethers } = require("ethers"); const fs = require("fs"); const path = require("path"); const ...
Kotaka Danski's user avatar
2 votes
1 answer
70 views

How to find proper address to use AggregatorV3Interface?

I am using hardhat and metamask on a local blockchain and I have imported AggregatorV3Interface and am trying to get the latest price of USDT in my contract to exchange Ethereuem to USDT. Here is the ...
user9805040's user avatar
-3 votes
2 answers
110 views

How do I send Ethereum from a MetaMask wallet to a smart contract?

I've connected my MetaMask to a local blockchain and got the 10k fake Ethereum in my wallet. I want to use this to buy some tokens from a self defined contract. I assume the procedure is: Send ...
user9805040's user avatar
0 votes
1 answer
78 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 ...
user9805040's user avatar
2 votes
1 answer
105 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 ...
Akshit Sharma's user avatar
0 votes
1 answer
31 views

"Token Purchase Failing with 'Insufficient Reserve' Error in Solidity Smart Contract"

I’ve deployed two contracts for a token sale system on BSC Testnet: TestUSDT: https://testnet.bscscan.com/address/0xD93221735d2323a7ddca9e82d0EF44040C570848#readContract (Mock USDT) APTToken: https://...
Karan Rawat's user avatar
1 vote
0 answers
109 views

Base Sepolia API key invalid

Using an API key from Etherscan to verify a contract on sepolia Base , i always receive the message that my API key is invalid. I have already checked the status on etherscan and API key is up and ...
Beginner's user avatar
-1 votes
1 answer
81 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 ...
Alok's user avatar
  • 10.9k
1 vote
0 answers
29 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 ...
King Lucky's user avatar

15 30 50 per page
1
2 3 4 5
441