New answers tagged blockchain
0
votes
Accepted
ERC20 token smart contract check
I can spot something, you shouldnt be marking internal functions as whenNotFrozen(), just stick to public functions since it's impossible to call internal functions directly, you're just making ...
0
votes
ERC20 token smart contract check
First of all, I noticed that you are using OpenZeppelin contracts as imports, which is a good choice since they are well-tested and audited. However, you should also make sure that you are using the ...
1
vote
Hardhat Verify contract issue
As the error code suggests, you should wait for a certain number of network confirmations before verifying a contract.
On your code snippet, I can see you are trying to deploy and verify on Mumbai, ...
0
votes
Accepted
When i type forge init --force / forge init
Thanks! Your second method successfully solved my problem!command as follows:
sudo -i
cd /bin/
rm forge
exit
That's all!
0
votes
Explain this constructor inheritance solidity
Inheritance is a way to, well, inherit functionality from another contract, during the development phase. Once a contract is deployed to a blockchain, it can't be inherited from directly anymore.
If ...
0
votes
Explain this constructor inheritance solidity
It's hard to answer your question, since you're not providing enough information on the issue, but I'll give it a try.
I believe you're confusing inheritance of contracts with the deployment of ...
0
votes
Why is Transaction Value showing 0 ETH on Etherscan?
This is not a transfer transaction. Rather, the transaction is the execution of a function of the smart contract. After executing this function of the smart contract, a number of internal transfer ...
0
votes
are there other ways to send bundle of transactions without using flashbot?
You can bundle transactions using a Multi Call contract. Just encode all your transactions into one and use the Multi Call contract. Here is the link
0
votes
Why is my Open Zeppelin import in Remix throwing an error?
When using contract inheritance, the child contract must contain the parent contract's constructor arguments or be marked as abstract.
If you look at the contract you are trying to inherit, Open ...
0
votes
A guide to solve some challenges in building a blockchain game
Thank you very much for your help my friend
The only other question that arises is if I use the AES 256 algorithm to encrypt the private key, is it optimal from a security point of view to use the ...
0
votes
Why is Transaction Value showing 0 ETH on Etherscan?
Since you are using Coinbase, the initial transaction you made didn't really contain the ETH, but instead, it made a contract call that triggered the actual transaction to send the ETH from Coinbase's ...
1
vote
Accepted
A guide to solve some challenges in building a blockchain game
DISCLAIMER : This is just a piece of my mind, as you probably know there are many different approaches to solve all of those problems and the ones im going here with are just the ones i thought about ...
1
vote
Signing message using web3 and using ethers gives different result. Why?
You are using two different cryptography to sign the transactions on web3 and ethers.
Web3 soliditySha3() and for ethers solidityPackedKeccak256()
Instead you should implement web3.utils.keccak256() ...
0
votes
Error Handling in Solidity Using Custom Errors with Web3js
Emit the error as an event in your Solidity contract:
Modify your contract like this:
pragma solidity ^0.8.4
...
event NotOwnerError(address expected, address received);
function example(address ...
0
votes
Do Miners/validators get rewarded for miming/validating blocks on Testnets
A lot of people who run faucets and testnet validators/miners are doing so out of the goodness in their hearts as opposed to any monetary incentive.
Testnets are a crucial part of creating smart ...
1
vote
Accepted
fetching address label from transaction info
can anyone please guide me on how can i achieve the same for multiple chains, like for a BTC, BTC cash, Solana transaction.
It is not possible without buying the label data from somewhere, like ...
0
votes
I get error couldn't find module 'ethereumjs-wallet/hdkey'
The solution is that you import hdkey from the ethereumjs-wallet library. hdkey is being exported and it is not the default export.
const {hdkey} = require('ethereumjs-wallet');
const mnemonic = ...
0
votes
What is Blockchain ? What is Ethereum?
The link below can give you a little more clarity on how decentralized applications are created. And can give you a deeper understanding of Ethereum and details on how to get started when making a ...
0
votes
TypeError: Cannot read properties of undefined (reading 'checkUpkeep')
Ethers v6 comes with some major changes to their syntax, <contract>.staticCall.<function> is the way for v5, but the syntax for v6 looks like this:
For example:
it("Should transfer ...
0
votes
How can I execute a call from a contract using another contract?
Unfortunately, if you have already deployed both contracts without implementing a method to change the owner or call the processAccount() function, then the funds are lost forever.
For future ...
0
votes
Unable to call a function from my smart contract in react
You are missing the ABI in code,
const contractInstance = new web3.eth.Contract(ABI,contract);
and pass this instance to get your contract data where ever required
1
vote
Can I monitor contract's activity on any explorer?
Yes. Bitquery gives you APIs and explorers to do real-time and detailed monitoring. The builder is easy to use, you can just click select to add data.
For example:
You can track dex trades
...
0
votes
Smart Contract/Nextjs Error: Returned values aren't valid, did it run Out of Gas?
Your contract isn't deployed correctly and hence has no code. If you run eth_getCode on Sepolia, it'll return 0x. That's why you fail to call functions of your deployed contract — there aren't any.
4
votes
Accepted
Why Ethereum addresses contain lowercase and uppercase letters
Ethereum address checksum is encoded in alphabet cases in hexadecimal. This allows to detect copy-paste errors in Ethereum addresses.
This is EIP-55 standard.
1
vote
Invalid account: #0 for network: sepolia - private key too long, expected 32 bytes
private keys do not start with 0x, public keys are the keys that start with 0x in EVM chains.
You must provide a private key, not a public one.
1
vote
Accepted
Tips for designing a blockchain game
You can interact with the smart contracts in whatever way you'd like, just note that regardless of how you interact with them, you will always need a contract address and an abi.
I don't have any ...
0
votes
Accepted
How can I retrieve the latest locked token from the Ethereum blockchain using JavaScript without knowing Solidity?
Create an Infura Account:
You need an Infura account to access Ethereum nodes.
Use the subscribe Method:
Subscribe to new pending transactions (newPendingTransactions) using Infura.
Retrieve ...
0
votes
Accepted
All my Assert.isTrue testing seems to be passing, im a bit skeptical about how efficient it's to test with asert.isTrue and assert.isFalse
It does not look like a question.
I can tell you forge tests with assertTrue works. Please share your code if you want some help.
1
vote
How to give a name to my forked Ethereum blockchain
Heyy Mehran Ra,
So If You Forked/Clone the Repo of geth and runned the Private Node
You must have made the Genesis.json there
Give them a Unique Chain Id there.
In Config File aka genesis.json you ...
0
votes
Accepted
Is blockchain a hard or soft real-time system?
Blockchains are generally not categorized as either hard or soft real-time operating systems according to traditional real-time computing definitions. However, they share more characteristics with ...
0
votes
Developing a Staking and Un-staking Smart Contract
You have 2 very complete tutorials here, to understand the process but also for copy/paste the code if you want:
https://hackernoon.com/how-to-implement-a-stake-and-reward-contract-in-solidity
https:/...
1
vote
Get details(Symbol, Icon, ...) of any EVM-compatible network
not a perfect solution, but you could get EVM compatible chains name, id, currency and icon URL by parsing out HTML returned by this request: https://chainlist.org/?search=
And if you know chaidID (...
-1
votes
How to we fetch price of NFT index using chainlink
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.7;
import "@chainlink/contracts/src/v0.8/interfaces/AggregatorV3Interface.sol";
contract NFTFloorPriceConsumerV3 {
...
0
votes
Quorum with sidechains : Does Quorum work with sidechain blockchains?
Quorum supports subchains rather than sidechains.
This is accomplished using enhanced permissioning model.
In Quorum terms; the blockchain can have organizations and suborganization, which reflects as ...
4
votes
Accepted
Smart Contract: Unintended Transfer of Ownership
It seems like you've fallen victim to a scam tutorial.
The youtube video was posted two weeks ago from the time of writing this:
And in the video they show the contract being brand new:
Yet if you ...
Top 50 recent answers are included
Related Tags
blockchain × 3193solidity × 943
go-ethereum × 626
web3js × 368
contract-development × 253
transactions × 252
remix × 184
ether × 181
private-blockchain × 178
dapps × 130
tokens × 126
synchronization × 120
mining × 119
ethereum-wallet-dapp × 110
ethereumjs × 106
truffle × 105
metamask × 105
contract-design × 102
blocks × 94
etherscan × 92
erc-20 × 90
nft × 86
javascript × 77
ethers.js × 71
wallets × 66