All Questions
33,457
questions
0
votes
1answer
28 views
Why BSC is used more in DeFi apps? [closed]
I decided to deploy my NFT collectibles in BSC (Binance Smart Chain) because of Gas Prices in Ethereum blockchain. So, I researched some Dapps deployed in BSC. I've found that most of the applications ...
3
votes
1answer
30 views
An oracle for real currency values
I would like to get an oracle for values of countries' based currencies.
Are there such free oracles?
0
votes
0answers
18 views
How can someone withdraw the incoming money so quickly? 0x7E5F4552091A69125d5DfCb7b8C2659029395Bdf [duplicate]
How can someone withdraw the incoming money so quickly?
0x7E5F4552091A69125d5DfCb7b8C2659029395Bdf
in - https://etherscan.io/tx/0xfbd225c6a5e7dc1ba76978d32914a6c18928a448540f2f235bca83e119c5f8a8
out - ...
0
votes
0answers
7 views
What is the most updated genesis file for Ethereum POA private network?
I have successfully created the multinode network, but some when trying to deploy smart contracts, some of them fail. This is the config of my genesis:
"config": {
"chainId": 999,
&...
0
votes
0answers
15 views
JIT events on etherum
I would like to write a contract, that fetches a data from oracle in a specific point of time (or later) Is there any option to pop up an event in some point in the future in Ethereum contract?
The ...
0
votes
0answers
7 views
Is it possible to derive multiple public addresses for a smart contract to receive ERC-20 tokens?
I have a smart contract that deposits user's fund in the AAVE lending pool on behalf of users:
lendingPool.deposit(stableCoinAddress, amount, address(this), 0)
Users can deposit at different times ...
0
votes
1answer
16 views
How would I write a jackpot/winner takes it all game in a smart contract? [closed]
I am really new to smart contract development,b but I have been watching some videos, I want to create a smart contract where players can choose how much Ethereum they want to put in ( within a range ...
1
vote
0answers
6 views
Is there any EVM debugger with a flexible UI layout available as of 2021?
Remix debugger seems to be pretty mature. But, its web-based interface makes it impossible to shuffle the block around. For example, I want to move the "Stack" section to the right sidebar ...
2
votes
0answers
5 views
Is it possible to call a higher-level function from within assembly?
Take the following code:
contract Foo {
function increment(uint256 x) external returns (uint256 result) {
result = x + 1;
}
function increment_twice(uint256 x) external ...
1
vote
0answers
8 views
Subscribing to events using ethers / hardhat network
I have a basic node express application. It connects to my locally running hardhat network via ethers & websocket. The connection seems to work, since I can query the blockchain succesfully (for ...
0
votes
0answers
20 views
Gas estimation failed AmazinBEP20 contract
Im trying to deploy the contract AmazingBEP20, i use:
http://remix.ethereum.org/#optimize=true&runs=200&evmVersion=null&version=soljson-v0.8.3+commit.8d00100c.js
Contract i want to deploy ...
1
vote
1answer
25 views
+50
web3 get_transaction get_transaction_receipt how to see the error-Message for a failed transaction
I am using the web3-implementation from python (web3.py) and use the both methods get_transaction and get_transaction_receipt to lookup failed transactions. If the status-field from ...
0
votes
1answer
23 views
How to send ether to an 'empty' contract [duplicate]
I have two smart contracts. A caller and a receiver.
My caller code looks like so:
// SPDX-License-Identifier: G.P.L 3.0
pragma solidity 0.8.3;
contract Caller {
event Response(bool success, ...
0
votes
0answers
6 views
How to stop and restart a multinode Ethereum private network?
I am testing a multinode Ethereum private network setup with Docker, 1 bootnode, 1 node, 2 miners, netstats and 2 swarm, total 7 containers. When I stop and restart the containers, the chain stops ...
1
vote
1answer
22 views
How to get Transaction Action Etherscan
I'm trying to get Transaction Action information from Etherscan Apis by using a transaction hash without success.
Here is what I want to extract (Swap 1 Ether For 2 Yf-DAI) with the API.
I have ...
0
votes
0answers
21 views
How are NFTs traceable?
I'm trying to understand some of the finer points of NFTs. What makes NFTs traceable? Is it the transaction history stored on the ledger? Is there anything else to it?
Key to the NFT's traceability is ...
1
vote
1answer
15 views
web3.getPastEvents return events but can't subscribe to an event
I have a contract which has an event. The contract's code is pretty simple:
pragma solidity >=0.7.4;
import "./Crowdfunding.sol";
contract Factory {
address[] public ...
2
votes
1answer
19 views
Is there ERC721 decimals?
Is it possible to have decimals balances in ERC721 ?
I mean is it possible to say i own 50% of an NFT for example ?
Thanks
0
votes
1answer
15 views
i accidentally sent kimchi.finance token to eth wallet totally noob [closed]
the title says it all
txn hash
0x4b17096471284533342a55ece11c62fb449e5d75f9e8b80f4cebda70d36807f2
scenario: i accidentally sent kimchi finance token from my metamask wallet
to my ethereum address in ...
0
votes
1answer
7 views
Random BigNumber in ethers.js
I'm looking to generate a random ethers.js BigNumber in a certain range. While this question has answers about random number generation, the answers as of this writing (April 2021) only cover BigInt, ...
0
votes
0answers
8 views
How to use truffle-plugin-verify when you are not deploying the contract?
Here is my A contract:
// SPDX-License-Identifier: MIT
pragma solidity >=0.4.22 <0.9.0;
contract A {
B public b;
constructor() public {
b = new B();
}
}
contract B {}
As ...
0
votes
1answer
12 views
How to recover ERC777 tokens from a ERC20 account
I have transferred some ERC777 tokens to an ERC20 Ethereum account on my Ledger wallet. The transaction was successful and confirmed by etherscan. However, I cannot find the tokens in my Ledger ...
0
votes
0answers
8 views
Swap Log amount fields explanation
This is the normal Data that I saw:
amount0In : 4000000000000000000
amount1In : 0
amount0Out : 0
amount1Out : 55176985192271150
But this one is different:
amount0In : 55242685893542
amount1In : ...
0
votes
0answers
7 views
How to make a deployer in truffle tests?
For some reason, our app will only work with a forked instance of the mainnet. And hence, we want to run our test on the forked ganache. We are using truffle, so we have written all of our tests in ...
0
votes
1answer
24 views
If you are a miner can you accept your own transactions at no cost? [duplicate]
Let us say I am a miner. Can I accept my transactions into the blockchain at no fee to myself? And what do I lose?
Let us assume someone is running a dapp. Can they mine transactions of that dapp to ...
0
votes
1answer
7 views
How to Properly use “Memory” After Function Parameters
I have a question about writing functions in Solidity - I am trying to create an array of dog structs but I can't seem to get the function declaration correctly:
pragma solidity ^0.5.1;
contract ...
4
votes
1answer
75 views
How can I protect my Chainlink oracle fulfill method?
Background:
I'm writing a contract that inherits ChainlinkClient in order to make an API request via an oracle job:
function fetch() private returns (bytes32 requestId) {
Chainlink.Request memory ...
0
votes
0answers
15 views
In a payable function, can “msg.value” pass a value in wei instead of trx?
I have two contracts, main and config. On main contract there is this buy function:
function buyItem(uint256 itemId, uint256 amount) external payable {
uint256 ethPrice;
require(msg.value &...
-5
votes
0answers
22 views
Ethereum Classic Coins bought from https://classicetherwallet.com. I want to recover or transfer them to another wallet
I bought ETC via website https://classicetherwallet.com/ by generating the wallet in 2017. After that as the market went down. I was diverted and never looked into. However recently i came to know ...
0
votes
1answer
14 views
Display tokem amount in dollar in dApp frontEnd
How do I return token amount in USD using web3js ..or is there some kindof API to be used ?
For instance , say user has 3ETH and also want the user balance to show in USD just as metamask does
1
vote
0answers
24 views
Transferring ERC20 token to a contract using custom function
I have a couple of questions related to transferring ERC20 token to a contract.
I am developing a protocol that has its own token to provide incentive mechanisms. For certain operations I need to lock ...
0
votes
0answers
10 views
Block timestamp or block number as short time check [duplicate]
Which one is better to check short period of time change 60seconds block.timestamp or block.number?
0
votes
1answer
22 views
When I run truffle compile I get a ParserError: syntax error
Error i'm getting back when I run truffle compile
ParserError: Expected ';' but got 'contract'
How my contract looks:
pragma solidity ^0.6.0;
import "@openzeppelin/contracts/token/ERC721/...
1
vote
0answers
12 views
The method eth_getBalance does not exist/is not available
I'm trying to follow the simple "Getting Started with Geth" page instructions but it is not written very well and I'm doing something wrong. This is the page I'm looking at:Getting Started ...
0
votes
0answers
6 views
TheGraph with Compound v2 is returning my mainet wallet address as null
When querying the following with the thegraph playground (compound v2)
{
account(id: "address here") {
id
totalBorrowValueInEth
}
}
returns
{
"data": {
"...
0
votes
0answers
12 views
Web3.js call() on view function on Smart Contract is failing
I am trying to access a simple variable on my smart contract, locally inside my nodejs application. The relevant parts of my contract look like this
import "@openzeppelin/contracts/utils/Counters....
0
votes
0answers
8 views
Using go, how to get the correct range of blocks
I have some eth wallet addresses, and I want to monitor the transfer information of these wallet addresses on some smart contracts.I use this function:
query := ethereum.FilterQuery{
...
1
vote
1answer
19 views
UniswapV2 addLiquidity revert ds-math-sub-underflow
I'm trying to use Uniswapv2Router with Truffle and Ganache, but haven't been able to identify what I'm doing wrong. I'm using addLiquidty method as follows:
await uniswapV2Router02.addLiquidity(token0....
2
votes
1answer
12 views
Calculating AAVE intereset rate belonging to different users that transferred into a smart contract
I have a smart contract that accepts user funds and adds them to an AAVE lending pool (DAI for example). Something like this:
lendingPool.deposit(stableCoinAddress, amount, address(this), 0);
As you ...
0
votes
1answer
30 views
There is an address that is hacked, the bot is monitoring it and payments are received regularly!
So, the bot instantly cancels these payments by sending, for example, 0.01 eth with a commission (fee) of 0.009 to another wallet, or even canceling everything through self - sending 0 to the same ...
0
votes
0answers
11 views
Ganache -f how can I fork the whole chain?
Im developing locally but I need a full copy, Im using ganache for local dev, also providing -f option to fork another blockchain (BSC), is it possible to download the complete chain somehow?
1
vote
1answer
17 views
How did this project rug? Minting new tokens, I tried to find it but i'm unable to see how they did it
this is their contract:
https://bscscan.com/address/0x95d25105237ced24523bbc3880b2551248e90de2#code
I cannot find the minting function in the contract, also how would they be able to call it?
cheers!
0
votes
0answers
15 views
List all minted tokens in SmartContract
I have a Smart Contract that I'd like to build a web based marketplace app for. How can I list all available "Items" in the contract. Seeing as there is no upper limit to the number of ...
1
vote
0answers
9 views
Do some crypto-assets have an “admin key” that allow some users to exercise “unilateral control and influence” over the asset?
I am reading the SEC prospectus Coinbase's initial public offering, available here. On page 20, it is written:
Many crypto assets have concentrated ownership or an “admin key”, allowing a small group ...
0
votes
1answer
20 views
Changing metadata dynamically
I am building a blockchain game where users can update their character's appearance. This is done by calling a function called updateAppearance in smart contract.
I want to show latest version of that ...
2
votes
1answer
20 views
Is the modulo operation cheaper in unchecked arithmetic?
The docs on Solidity v0.8.0 Breaking Changes mention that overflows are now checked by default:
Arithmetic operations revert on underflow and overflow. You can use unchecked { ... } to use the ...
1
vote
1answer
21 views
How do I identify the right gas to set in web3 send?
This is my send code:
window.videoContract.methods
.mint(account, 'https://ipfs.io/ipfs/QmRQC1...')
.send({
from: account,
gas: 20100000
});
If I set it too high, I get ...
0
votes
2answers
18 views
ERC1155 name and symbol
I do not understand something: ERC721 standard interface contains a name and a symbol.
ERC1155 is very similar to ERC721 and I do not understand why there are no symbol and name variables in ERC1155.
...
0
votes
1answer
30 views
Truffle test doesn't connect to Ganache
I'm using Truffle and Ganache for my development environment. Using the truffle console or truffle external scripts everything works fine, but truffle test does not seem to be connected to Ganache:
...
0
votes
0answers
4 views
Transaction has been reverted by EVM (Matic Mumbai Testnet)
I am getting the following error when trying to mint through my ERC721 contract.
How can I determine the cause of the failure?
https://explorer-mumbai.maticvigil.com/tx/...