6,576 questions
Advice
0
votes
1
replies
78
views
2 YOE Full‑Stack dev: how to choose between AI and Blockchain?
I have ~2 years of experience as a software engineer working across full‑stack web and some mobile development.
I want to upskill for better growth and salary, and I’m currently stuck between focusing ...
0
votes
1
answer
62
views
How do I fix INVALID_ALIAS_KEY when trying to transfer a fungible token with a Hedera smart contract?
So I have a simple contract to transfer some funds:
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.0;
import "./HederaTokenService.sol";
contract TransferTest is ...
-1
votes
1
answer
106
views
Bad data when calling a public getter with Ethersv6
I have a Hardhat 2.27.2 and Foundry 1.5.0 smart contract project with some tests I wrote few months ago.
The tests I wrote used to work, but now I get this error:
Error: could not decode result data (...
1
vote
0
answers
70
views
Why am I getting a decode error when calling a function in my Hardhat smart contract?
I’m building a simple Voting DApp using Solidity and Hardhat.
The contract deploys successfully, and I can start and end voting without issues.
However, when I try to call the getWinner() function ...
0
votes
1
answer
94
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:
...
0
votes
1
answer
65
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 ...
-1
votes
1
answer
64
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....
0
votes
0
answers
67
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 ...
0
votes
0
answers
46
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 '...
0
votes
1
answer
119
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[] ...
0
votes
1
answer
68
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 ...
2
votes
1
answer
93
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 ...
-3
votes
2
answers
169
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 ...
0
votes
1
answer
106
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 ...
2
votes
1
answer
144
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 ...