All Questions

Filter by
Sorted by
Tagged with
0
votes
1answer
15 views

Ganache Smart Contract

is it possible to use a smart contract of an existing token in ganache for testing ?? that is, I don't have to create my smart contract
0
votes
0answers
11 views

Storage space geth for private network?

Setup a private network with clique at 15 secs block creation. Started with 3 nodes. Then deployed a smart contract (ERC 721) and send two transactions. After about 2 days idling, and no transactions, ...
0
votes
1answer
21 views

How can i get the Payable function to send the right amount to the owner address?

function () public payable { uint tokens; /// this math isnt safe tokens = msg.value * 10; /// this didnt give us the address we needed address tokenOwner; ...
1
vote
0answers
12 views

Building receipts proofs using only information from RPC

I tried to build a proof of inclusion for a particular receipt in a block, but I noticed that in some cases, the receipt was serialised together with the partial state root hash after executing this ...
0
votes
0answers
7 views

Delegate Call fails

I have the following function enum OptionType {Invalid, Put, Call} function create( uint256 period, uint256 amount, uint256 strike, OptionType optionType ) { .... } When I ...
0
votes
1answer
9 views

How To Verify A Coin Without Original Contract Source Code?

We are new to crypto. A while ago we created a coin (3DOM coin) with 14,000,000,000 units and stored them in our wallet on myetherwallet.com. We would like to deploy the token now but we do not have ...
1
vote
0answers
10 views

ERC-2222 : Funds Distribution Token implementation for a fee contract

My MainCore contract is a contract who sell NFT, and all the sell and buy have a 1% fee for team developper (uint DevelopperCutTotalSupply). I try to implement the ERC-2222 "Funds Distribution ...
0
votes
0answers
4 views

Interacting with wrappers in contracts from Go

I'm currently having issues with contracts in a small project of mine. The issue is as follows: I have a Go client for a Dapp and some Smart Contracts to interact with. I planned a contract (...
0
votes
0answers
6 views

Need to access/send to Ethereum wallet on web page

I'm looking for a good, simple, effective PHP toolkit to access Ethereum wallets. I am designing a page where participants can contribute Ethereum towards a final goal. I want the page to not just say ...
1
vote
0answers
10 views

eth_signTypedData does not exist [closed]

with any web3 or ethers provider I am getting this error. This is suddently startedoccuring. Noticed it when my hardhat test cases started failing. Is anyone else facing the same and has solution?? ...
0
votes
0answers
25 views

Reverse my transaction on uniswap

I swap ether to some coins and now i cannot swap back those coin to etherum. Probably i bought some scam coin but now my coinbase wallet is showing price against that coin. Is it possible that i can ...
2
votes
0answers
8 views

How to query data from Uniswap using the JS SDK?

I'm having problems retrieving some data metrics using the Uniswap JS SDK. When I try to query getInputAmount it returns this error: (node:88) UnhandledPromiseRejectionWarning: TypeError: Cannot read ...
0
votes
1answer
13 views

Safe way to make a payable function that accepts a ERC20 Token in a contract that didn't create that Token

I have two contracts, contract A represents Token A, contract B is its own contract. I users to call a contract B function by paying Token A to contract B, as if they were using a payable function, ...
0
votes
1answer
9 views

How do I change cors domain of geth metrics?

I am trying to connect the output of geth metrics of a local node to Grafana. I am initializing my node using the following geth command: geth --datadir "n1" --nodiscover --networkid "...
1
vote
0answers
5 views

Is there any version of AAVE protocol deployed on polygon/matic testnet?

As AAVE documentation suggests, there is a deployed version of the protocol on matic/polygon mainnet. However, it does not make any mention of those smart contracts on Mumbai testnet which I need to ...
1
vote
1answer
12 views

Untitleded.sol:5:77: ParserError: Expected type name function sendmessage(string message) view public returns(string message, memory) { ^----^(i need)

I've seen the other StackExchange errors but it didn't help me. Untitleded.sol:5:77: ParserError: Expected type name function sendmessage(string message) view public returns(string message, memory) { ...
0
votes
1answer
32 views

How does this line of code (Solidity) work?

User storage user = users[msg.sender]; I have a "User" struct: struct User { Deposit[] deposits; uint256 checkpoint; address referrer; uint256[3] levels; uint256 ...
0
votes
0answers
13 views

Transfer ERC20 token from smart contract to wallet using sendSignedTransaction

I have s smart contract that holds ERC20 DAI token that needs to be transfer to my wallet. Using javascript web3 side on kovan testnet: const EthereumTx = require('ethereumjs-tx').Transaction const ...
0
votes
0answers
14 views

geth never finishes fast sync on Linux Mint

$ geth version Geth Version: 1.10.2-stable Git Commit: 97d11b0187b4695ccf44e3b71b54155fe405a36f Git Commit Date: 20210408 Architecture: amd64 Go Version: go1.16 Operating System: linux GOPATH= GOROOT=...
0
votes
0answers
6 views

Binance Smart Chain setup [closed]

I downloaded the project from Binance Smart Chain github account and when I say make all, I get the following error.
2
votes
1answer
39 views

Why in some contracts I see: If (condition_1 & 0xfffffffffffffff…)?

I'm looking at the code of some smart contracts and I've seen somewhere where the code is something like: if (msg.sender == storage[0x00] & 0xffffffffffffffffffffffffffffffffffffffff) From my ...
0
votes
0answers
8 views

How i can switch between account without using metamask

I import 10 accounts from ganache to metamask and I give each user's login to my application an address. i want to switch between this address without using metamask i want to change this address ...
0
votes
1answer
9 views

How get estimated block with timestamp

So for example, I want to enable my contract 1 week after deployment, thats now() + 1 week, how could I know which block that will be so I can send my clients a countdown to that block with https://...
0
votes
0answers
7 views

Where exactly is Ethereum private key?

I just generated new Ethereum account with geth account new Your new account is locked with a password. Please give a password. Do not forget this password. Password: Repeat password: Your new key ...
2
votes
0answers
14 views

trouble understanding the usage and calculation of INIT_HASH and precompiled contracts

I am working with pancakeswap and I was following a tutorial which just said that we need to calculated the INIT_HASH and that we can follow this link enter link description here for guidance. The ...
1
vote
0answers
13 views

“Good enough” random number in BSC

I'm trying to develop a weighted probability selection algorithm on BSC and I think I need an algorithm that can generate a random number within a given range for that. What would be a "good ...
1
vote
0answers
41 views

I can't approve and sell a token I bought on pancakeswap. I saw someone else sell it in the transaction list on bscscan

Okay, so obviously I bought a scamcoin, but theres this one guy who still managed to sell it, most likely by using a bot. I want to sell the token as well, the liquidity isn't pulled and I would make ...
0
votes
0answers
6 views

Quorum: How to find the key used in privateFor

I have a 3 nodes quorum network, which I created with the help of quorum maker. I am adding an new account to my first node, so that my first node now has 2 accounts on it. I want to find the public ...
1
vote
0answers
13 views

What are the factors involved in NFT gas consumption?

After reading this article ("The Unreasonable Ecological Cost of #CryptoArt" Part 1, Part 2), I'm keen to better understand what are the factors involved in energy consumption by NFTs. The ...
0
votes
1answer
12 views

Pass enum value in mapping

I am trying to pass a default value in solidity but get the following error: "Invalid implicit conversion from enum tlb.Category to enum tlb.Category[] memory requested" Does anybody have an ...
0
votes
0answers
14 views

Full Archive Node Compaction Performance

We're currently syncing a Full Archive Node (--gcmode archive --sync full --mainnet) and are experiencing a relatively odd behavior: As you can see, the node seems to "pause" its processing ...
1
vote
0answers
10 views

Ensuring the atomicity of multiple transactions

I am new to solidity and have been creating single (both basic and complex) transactions. However, I have a question which I couldn't come up with a solution. How can I create 2 (or more) transactions ...
0
votes
1answer
9 views

Reasons why simple Token should be upgradeable

The question is that the simple organization token is built with basic Open Zeppelin libraries. It doesn’t have a custom implementation. It’s not a whatever protocol. Any reasons to make it ...
0
votes
1answer
12 views

What are DeFi Smart Accounts?

What are DeFi Smart Accounts? And how they are different from ethereum accounts? It seems "Smart Accounts" is not exact thing, non-standard within Ethereum ecosystem
0
votes
0answers
11 views

How come I could spend 1.5 WETH, even though I only wrapped 1 ETH?

On opensea, I converted (wrapped) 1 ETH to 1 WETH, which is equal to 2 x 0.5 WETH = 1 WETH. I then spent 0.5 WETH on 3 items = 1.5 WETH, which is greater than the amount I had. how is this even ...
1
vote
1answer
10 views

Ethereum Bucket Synchronisation

The normal operation of Ethereum and other blockchains is to Store new transactions in a mempool, Distribute the bucket, and then mine contents into a block picked from the bucket based on priority of ...
0
votes
0answers
21 views

How does one prove NFT ownership?

I've been hearing a lot about nft and I understand some fundamentals, though I am not 100% clear how would one prove ownership of an NFT token. Does proving NFT ownership requires to pay gas fees?
0
votes
0answers
9 views

Untitleded.sol:5:27: TypeError: Data location must be “memory” for parameter in function, but none was given [duplicate]

Im using solidity version 0.5.1(Ik they are vulnabilities in that version). Im getting this erorr saying "Untitleded.sol:5:49: TypeError: Data location must be "memory" for return ...
0
votes
0answers
13 views

Use Web3js library

I am new to the use of blockchain we are building an application where I have the following problem to solve: Users when registering in our system will create a wallet of an ethereum token Be able to ...
0
votes
0answers
8 views

Why is a proxy object created when you try to access the same web3 object outside of the scope where it was created?

I have two functions, called one after another. The first one called creates a new Web3 object and sets it to window.web3: async loadWeb3() { window.addEventListener('load', async () => { ...
1
vote
2answers
25 views

Can I detect if my solidity contract runs on testnet/ganache or mainnet?

Is it possible to detect from the smart contract in solidity if it runs on mainnet or testnet? Or if it runs on ganache? Maybe by getting the network ID? But I'm not sure it's possible from the smart ...
1
vote
0answers
15 views

Sending bytes to contract from web3

so I have the following function in my smart contract: function proxy(address target, uint value, string memory signature, bytes memory data, uint eta) public returns (bytes32) { callData = ...
0
votes
0answers
9 views

How to disable deployment of smart contracts on besu private network?

Is there any way to disable creation of smart contracts on Hyperledger Besu Private Network for addresses except those that I specify? I want to create private network with zero gas fee, but no one ...
-2
votes
2answers
40 views

I SENT ETH TO WRONG ADDRESS [duplicate]

I sent eth to wrong address by accident thru and exchange hitbtc 2. It whats a mistyped attempt so it is considered a "fresh" or unclaimed account. Is there any way around this? if so im up ...
1
vote
1answer
21 views

Is it possible to trigger an ERC777 receiver hook by receiving ERC20 tokens?

I noticed that the callTokensReceived hook is called when using a few of the ERC777 functions but I am wondering how this could be triggered if an ERC20 token was sent to it? Example (pseudo code): ...
2
votes
0answers
18 views

What is the reason behind writing “using Counters for Counters.counters” when using the Counters openzeppelin library

while trying to understand the OpenZeppelin contracts that a contract inheritated from I stumbled unto this line "using Counters for Counters.Counter;" (after the library counters of ...
0
votes
3answers
26 views

Can I interact with an ethereum contract through C/C++?

Assuming I have a device that receives sensor data in C, and I want to make calls to an Ethereum smart contract directly through it, is there a way to use C/C++ for that communication? Something ...
1
vote
1answer
27 views

What are IBEP20 _lp and address _wbnb parameter in BnbStaking.sol [closed]

I am trying to deploy bnbstaking.sol for my own project by cloning pancakeswap-farm repository. The farm repository has other contracts of MasterChef, Souschef, CakeToken and SyrupBar. For farming all ...
0
votes
1answer
11 views

Unable to synchronize with Ropsten testnet with Geth 1.9.25

For the past two days I've been trying to synchronize with Ropsten testnet using the following command in Geth 1.9.25: ./geth --ropsten --rpc --rpcaddr="0.0.0.0" --rpcapi="eth, web3, ...
1
vote
2answers
212 views

Do Solidity smart contract symbols support unicode?

In a smart contract where the token name and symbol are defined, is unicode supported or should these be ASCII only characters? As below, would it be a valid contract or token symbol? constructor()...

15 30 50 per page