All Questions

Filter by
Sorted by
Tagged with
0
votes
0answers
10 views

importing a big standard contract

I am following a tutorial to use oracle from Provable, so I have to import "https://github.com/provable-things/ethereum-api/blob/master/provableAPI_0.6.sol". I notice that the contract is very big but ...
1
vote
0answers
28 views

What is the maximum size of ABI in real world contracts?

To monitor my contracts during development and test in a private blockchain I’ve written an event explorer that encodes beside other parameter the ABI in an URL parameter. The ABI will be compressed ...
0
votes
0answers
9 views

Transaction to contract from web3 not working but working from metamask

I have a method in contract to increase totalSupply and only owner can call it. function addTokenToTotalSupply(uint _value) onlyOwner public { require(_value > 0); balances[owner] = ...
0
votes
0answers
10 views

can sign derived wallet transactions with main's wallet private key of seed phrase?

I would like to sign a transaction from a wallet which is derived from a seed, and sign it, with it's parent first address and private key derived from the seed, can I sign any tx of any derived ...
0
votes
1answer
17 views

How to delete an element of array in efficient manner?

pragma solidity ^0.4.24; contract test{ uint[] public array = [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15]; function removewithgap(uint index) returns(uint[]) { if (index >= array.length) ...
0
votes
1answer
13 views

How to reverse byte order in uint256 or bytes32?

Need to convert BigEndian to LittleEndian or vice versa.
0
votes
1answer
15 views

Nested Structs with Mappings Inside

I have the following code: // SPDX-License-Identifier: MIT pragma solidity >=0.4.22 <0.7.0; pragma experimental ABIEncoderV2; contract VenueRegistry{ struct Queue{ uint head; ...
2
votes
1answer
27 views

What you mean by Off-Chain in Ethereum Blockchain? can i use geth as off-chain in DApp?

I have read several articles of off-chain definition and come to know that they are use for scale the ethereum blockchain. but my question is what is actually mean by off-chain word in ethereum ...
0
votes
1answer
25 views

How to connect to my private ethereum network using web3?

I have setup my own private eth network. I wanted to connect to this. So first I have run geth --datadir ./tolotolo --networkid 1115 --port 30304 console 2>>myEth.log It generated geth.ipc ...
1
vote
1answer
42 views

Is it possible to send an extra argument or data when interacting with a contract?

Take the transfer function of the DAI contract as example. It allows only two arguments: dst and wad. This is how the decoded data input looks like on a sample transaction: Function: transfer(...
0
votes
0answers
16 views

Getting the “VM Exception while processing transaction: revert” error for a pay() function

I'm getting the following error during the testing in Truffle: Error: Returned error: VM Exception while processing transaction: revert It simply says "revert" without the contingency message, ...
0
votes
1answer
13 views

Like an ERC20 interface, do we have any interface or a smart contract that supports creating and transferring Ether on Ethereum?

To create a token on Ethereum, we use ERC20 token interface to design our token smart contract that captures functions required like mint(), tranfer(), balanceOf(), etc. Similarly, do we have any ...
0
votes
0answers
16 views

How does EVM search in the storage?

I am reading this article to understand the storage in Solidity/EVM https://programtheblockchain.com/posts/2018/03/09/understanding-ethereum-smart-contract-storage/ It says that each smart contract ...
0
votes
1answer
12 views

Getting this error `ValueError: {'code': -32000, 'message': 'insufficient funds for gas * price + value'}` on raw transaction send

I know for sure I have enough eth on account. Some prelims: I am signing a raw transaction with web3.py, like so: transaction = { 'to': '0xSENDHEREFINALLYPLEASE', 'value': 1000, 'gas': ...
0
votes
1answer
15 views

Does crypto coins are transferred same as tokens?

If I understood correctly, when I want send a token using wallet (e.g., ERC20 token), I will: create a transaction (using send button on my wallet interface) with "to" address containing token ...
0
votes
1answer
23 views

Data location can only be specified for array, struct or mapping types, but “memory” was given

I am new to solidity. I was trying to compile the following code in chrome browser with Remix. I am getting the following error "Data location can only be specified for array, struct or mapping types, ...
0
votes
1answer
17 views

Deploying a smart contract using transaction manager in web3j

I am new to web3j and smart contract deployment. Consider a scenario where a user is too scared to give his wallet credential file or username/password or private key in a piece of code(the code is ...
0
votes
0answers
26 views

Accessing modifier of another smart contract - Role Based Access Control

I am trying to create a simple role based access control system for the contracts I have created. I have two smart contracts, one named Users that stores all of the users details as well as the type ...
1
vote
1answer
30 views

How can I implement a custom blockchain?

I am doing a research project which requires me to implement a blockchain with pBFT consensus algorithm. The blockchain would be very simple - A client should be able to send 2 values, the validators ...
0
votes
1answer
19 views

Couldn't get any accounts!, Ethereum client is not configured correctly

I'm running testrpc on the default port 7545. I run truffle console and test with: web3.eth.getAccounts().then( function (result) { return result[0] }); This works fine. According to docs the ...
0
votes
1answer
29 views

Ropsten Etherscan shows 0 holders for my token

I created ERC20 compliant token on Ropsten testnet. I set in constructor that all of the token supply is added to my wallet address. When I open the metamaks I see that I have the tokens. Here's the ...
1
vote
0answers
27 views

How to compute pairing in a smart contract

I am working on the elliptic curve and pairing stuff in Ethereum smart contract. How can I compute pairing such e(p1,p2)? I know that we have a pre-compile pairing check in Ethereum client which is ...
1
vote
1answer
15 views

Usecase for approve and allowance functions of ERC20 token

Could you please enlighten me on how approve and allowance functions work using a usecase? I dont understand the underlying operations of these functions. Especially, when a token owner delegates the ...
1
vote
1answer
19 views

Wallet transactions call functions in (ERC20) token contract to send tokens?

Firstly, thank you for helping me out in understand this. Suppose, if I have an ERC20 token contract (with all the required functions implemented including Transfer() function) deployed on the ...
0
votes
1answer
13 views

json rpc hex string weird padding/encoding

When sending eth_call to get erc20 token WETH name and symbol I get hex response padded with bunch of zeros and a mysterious digit '2'. for symbol I get response: "...
1
vote
0answers
8 views

Websocket provider reconnects every 1 minute

I'm developing an application on a private Ethereum chain and trying to listen to some events. I wrote a basic indexer script for listening to events and writing them in a database. To listen to the ...
3
votes
0answers
29 views

Passing constructor arguments from child contract to parent contract

The ERC721 standard contract requires a token name and symbol in its constructor. I have inheritance pattern that looks likes Contract A is B and Contract B is ERC721. If I want to set my token name ...
0
votes
1answer
19 views

Fast synch mode slowed down after 200Gb

It took 2 days to get to 200gb on geth fast synch mode. But now im moving with approx 5gb a day with a decent internet speed around 100mb/s in Lan. I disconnected and now running on 25mb/s with wifi....
2
votes
1answer
20 views

Why can I call contract methods containing a selfdestruct multiple times?

The following code is part of a Smart Contract I'm working with: [...] function noComplain() allowed(receiver, stage.keyRevealed) public { selfdestruct(sender); } // function ...
1
vote
1answer
30 views

What caused the forks in the Schlesi testnet?

The Schlesi testnet was the first multiclient testnet for ETH2 clients. Lighthouse, Prysm, Teku were in consensus before it forked. What were the causes of the forks? Is there a technical post ...
0
votes
0answers
9 views

Ethereum Wallet(mist) not catching private network in windows 10

I have set these paths but not working C:\Program Files\Ethereum-Wallet and C:\Program Files\Geth I have made a private network using Geth, but when I installed the Ethereum Wallet, it is not ...
1
vote
1answer
23 views

why to use ERC165 standard?

when implementing ERC721, why it is necessary to use ERC165 standard? `pragma solidity ^0.6.6; interface ERC165 { function supportsInterface(bytes4 interfaceID) external view returns (...
0
votes
1answer
13 views

Issues with using/installing python solidity parser

I am trying to install and use python solidity parser by ConsenSys I keep on getting the following error File "<stdin>", line 1, in <module> File "/home/seed/.local/lib/python3.5/site-...
0
votes
0answers
21 views

Generating a private key without a library

As far as I understand, a private key in the context of Ethereum is simply 256 random bits. The actual application of secp256k1 comes in when converting this to the public key, signing, etc. Based on ...
0
votes
0answers
7 views

How can two light nodes on a chain communicate individually?

Let's say I have two light nodes on a chain and I want them to exchange data ~3KB without appending anything to the chain. They are not on local network. How can I achieve it?
0
votes
0answers
32 views

if “address public x = tx.origin”, why does “require (tx.origin == x”) work and "require (tx.origin==tx.origin) not

Below is a contract that i have commented on, hoping to understand the logic of the arguments. Below in bold is the question in question. The .sol currently works fine. pragma solidity ^0.5.11; ...
1
vote
2answers
18 views

Non-interactive transactions with Web3 interface

would like to build a blockchain simulator with web3 interface. I use ganache and solidity. my simulator is a microgrid simulator (autonomous energy community) where a house is represented by an eth ...
1
vote
2answers
53 views

How are block proposers selected in Ethereum 2.0?

i'm doing some research about Ethereum 2.0 for university. I think i understand the way it works, but i have a perplexity about the proposer selection in a slot, especially after reading the codes ...
0
votes
0answers
10 views

How to get bytecode in Java (all programmatically)?

I am trying to generate a bytecode to deploy a contract to ethereum. I have included node.exe as resource and try to install solcjs programmatically in node, but unfortunately i am stuck. My current ...
2
votes
0answers
24 views

How to determine the uniqueness of an internal transaction

How to determine the uniqueness of an internal transaction Example is this transaction: https://rinkeby.etherscan.io/tx/0xc756517a69239bddffe3e0cb07eba98d3ad0fae1b44fc936a0119dbaf7008942#internal ...
0
votes
1answer
15 views

How to efficiently query custom token

I have a smart contract with a custom token which holds some data. The Token data is defined in a struct and stored in an array: struct Token { string text; uint256 value; } Token[] public ...
2
votes
0answers
16 views

Advantage of Chainlink's VRF over commitment scheme chain

News Chainlink announced a randomness oracle via VRF: https://blog.chain.link/verifiable-random-functions-vrf-random-number-generation-rng-feature/. Question What is the advantage of an VRF over a ...
0
votes
1answer
24 views

Is Ethereum 2.0 (Sharding Ethereum) only PoS based? Or a combination of PoW + PoS?

Does Ethereum 2.0 (Sharded Ethereum) only use PoS (Proof-of-stake) for consensus mechanism ? Or Does it use a combination of PoW + PoS ?
0
votes
1answer
22 views

Verifying ERC20 Contract that uses OpenZeppelin's library contracts

I deployed an ERC-20 Token contract and would like to now verify it on etherscan.io My contract utilizes Open-Zeppelin's library of contracts - which means it's importing one of their contracts into ...
0
votes
0answers
29 views

How to separately optimize bytecode?

This question is regarding the bytecode-optimizer of the solidity-compiler, not the yul-optimizer: Is there any way to separately optimize bytecode? Normally the solidity-compiler optimizes the ...
0
votes
0answers
9 views

Fail Transaction Using Metamask And Create Smart Contract Using Geth Private Blockchain

I have an error when building a private blockchain on my computer. The code that I run is like this (Simply my concept make it without mining and only focus on smart contract): genesis.json file { ...
0
votes
0answers
15 views

Getting suffix of blockchain domain

I have a program that can get me the first part of registered blockchain domains, but not the suffix (.eth, .zil, etc.) and am not sure how to associate suffixes with names. I know that in some cases, ...
0
votes
0answers
11 views

What is good peer etiquette for being a light node?

I just started dabbling in running my own light node and it seems like the biggest challenge is finding peers. rfikki on GitHub posts these peer lists (https://gist.github.com/rfikki/...
0
votes
1answer
20 views

What is the has() function in Solidity?

What is the has() function in Solidity? struct Role { mapping (address => bool) bearer; } function add(Role storage role, address account) internal { require(account != address(0), "...
1
vote
1answer
23 views

Gas price data from GETH

I am able to get gas price data as follows from some oracles (i.e., ethgasstation.info, etherscan.io): { "fast":50.0, "fastest":200.0, "safeLow":10.0, "average":20.0, "block_time":13....

15 30 50 per page
1
3 4
5
6 7
582