All Questions

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

JSON-RPC: TheDao contract returning not null values for not existing methods in the contract

When using the geth JSON-RPC eth_call to retrieve some ERC20 token contracts symbol and name information, it comes up the case of TheDao contract. I was expecting to receive a null/empty string like ...
0
votes
0answers
7 views

Puppeth usage in private PoA

I am about to setup a private network using Geth PoA (clique? still unsure as to what the purpose of this protocol is- clique not PoA); having rented 3 servers. My concern is should I be using puppeth ...
1
vote
2answers
21 views

How to provide data for sendTransaction using web3.js 1.0

I'm using web3.js 1.0. I want to use sendTransaction method to call a contract method, but I don't know how to provide data parameter for it. For example suppose we have a contract named myContract ...
0
votes
0answers
14 views

Avoid upfront cost for calling own faucet?

To onboard users to a project quickly, I want to build my own little Rinkeby-faucet where users with new accounts (0 ETH) can get a bit of ETH by clicking a button. However, just calling the ...
0
votes
2answers
29 views

how to write a test case for msg.sender==0?

In my contract I am use the below mapping. mapping(address => uint)Drivers In the function function registerDriver(uint _perkm) public payable returns(string memory) { require(...
0
votes
0answers
15 views

Can't migrate, ropsten randomly throws out of gas

I have the following migration files with 50 contracts' deployment and their setup (calling each other functions like privileges, access and so on): On the development network everything works fine. ...
1
vote
1answer
21 views

Unable to load smart contract using web3j on android

What I'my trying to do is to load already deployed smart contract and interact with it. The problem is that after my credentials are being created properly, the error is being catched but the message ...
0
votes
0answers
26 views

Metamask error: Transaction error. exception thrown in contract code

I've been successfully compiled and deployed my smart contract Campaign.sol. All the functions in my contract can run successfully but as I use my javascript file RequestRow.js to call my function ...
0
votes
1answer
19 views

Implement Ethereum test wallet support in Python [closed]

I'm new in cryptocurrency and i need implement Ethereum test wallet support in python. I have an account on etherscan.io already and I can add 1 ETH to my test wallet by https://faucet.metamask.io/ ...
0
votes
2answers
35 views

Exchange ERC20 token with other ERC20 token

I have 2 ERC20 tokens. The contract are designed as standard ERC20. Here are the 2 tokens to take as an example - AUDC --> Contract Address: (0xContractAUDC) Wallet Address: (...
0
votes
1answer
11 views

Unable to interface the contract while running test.js and how to get the abi while compiling using solc?

Solidity Contract: index.sol pragma solidity ^0.5.0; contract Inbox{ string public message; constructor(string memory IntialMessage) public{ message = IntialMessage; } function setMessage(...
1
vote
1answer
21 views

How to permission (disallow) smart contract deployment on private Ethereum network?

On a private Ethereum network, what is the best way to permission the deployment of who (and what) users can deploy? One obvious way would be increasing the gas cost of CREATE opcode. Yet, I do not ...
0
votes
1answer
31 views

Emited Solidity Events not being watched at frontend truffle contract instance

So, I have been reading through A LOT of pages about events in Solidity and how to interact with them on frontend but I am still pretty new to this and it seems like there have been multiple changes, ...
1
vote
0answers
19 views

PGP Key in Funding Application [closed]

I am looking to get funding from the ECF Network for an Ethereum project. They ask for a PGP key under the apply form ("Please make sure you paste your pgp public key here: ", but nowhere on their ...
0
votes
1answer
31 views

What's the proper way to store a long string (like a news article) in Solidity?

I'm working on Layer 2 so gas/efficiency aren't primary concerns, assuming the function can be executed by the EVM
0
votes
0answers
18 views

Sending multipe ETH transactions through an API?

Is there any Ether wallet management software or some kind of API service other than BitGo that I can use to send queued Ethereum transactions, rebroadcast them automatically if they are out of gas, ...
0
votes
0answers
7 views

web3py Filter Contract Events

I am new to web3py and I am trying to filter the events of a certain ERC20 contract. I can successfully call the contract's functions, but I struggle with the events. contract = w3.eth.contract(...
0
votes
2answers
29 views

How to disable a function from a parent contract?

Say I have this contract: contract Foo { uint256 public foo; function setFoo(uint256 _foo) public { foo = _foo; } function setFooToZero() public { foo = 0; } } ...
0
votes
1answer
24 views

I was transferring 2 ETH from Gemini to Exodus, it end up in Etherscan ?? Help!

On 9/18/2019 12:53am, I made a transfer of 2 Eth from Gemini to Exodus, it did not go through, bet end up in Etherscan. How did that happened? and How to transfer Eth out out Etherscan? Thanks to ...
0
votes
1answer
46 views

Solidity returning a value to authorized address

I am writing a Smart Contract that saves a certain random hash given by the owner that is used for a 3rd party reason. I would like the owner of the contract to specify some Ethereum addresses that is ...
1
vote
0answers
23 views

Is there a curated list of known security vulnerabilities related to escrow?

In Factories Improve Smart Contract Security, Steve Marx says that: This bug was hand-picked to show the benefit, but this bug is representative of a large class of bugs around escrow. In my ...
0
votes
1answer
11 views

Does packing bools alongside addresses reduce storage costs?

Say I have a struct like this: struct MyStruct { bool foo; uint256 bar; uint256 baz; address qux; } If I rewrite it like this: struct MyStruct { bool foo; address qux; ...
1
vote
1answer
14 views

Geth and JavaScript

I want to deploy a private blockchain using Geth. I am considering using JavaScript to build the backend as I did before (NodeJS) but what about the smart contract? Since it is private is there a way ...
0
votes
2answers
34 views

Blockchain Development [closed]

I want to build a blockchain network such that if one node updates, all the other linked nodes gets update too. Think of it as Centralized Hospital record in multiple cities, if any of the city pushes ...
0
votes
0answers
25 views

Timeout while running contract

I have created a private blockchain and a private networ using Geth i have submitted a contract for deployment.. i can see in main geth CLI there its showing as after that I did mining .. is that ...
0
votes
1answer
22 views

Passing more than 20 parameters in solidity

How to pass more than 20 parameters in solidity function? I have tried using array[] parameter that uses pragma ABIENCODERV2 experimental feature. But this feature cannot be used in production purpose....
0
votes
1answer
24 views

create new account using personal.newAccount [closed]

How to retrieve their private and public key.I created one ethereum address using command line personal.newAccount .When I am checking this address in etherscan it shows 0 balance but in my ethereum ...
0
votes
0answers
24 views

web3.exceptions.BadFunctionCallOutput: Could not decode contract function call getEvidence return data b'' for output_types ['string']

Solidity Code: function getEvidence(string memory _evidenceID) view public returns (string memory) { require(evidenceOwner[_evidenceID] == msg.sender); string memory evidenceHash = ...
4
votes
1answer
33 views

Why is the subcall gas limit set to 63/64th of the remaining gas?

From the solidity docs: Calls are limited to a depth of 1024, which means that for more complex operations, loops should be preferred over recursive calls. Furthermore, only 63/64th of the gas can ...
1
vote
1answer
19 views

When does it make sense to use `this.f()` instead of making the function public?

In external vs public best practices, Tjaden Hess says that: It almost never makes sense to use the this.f() pattern, as this requires a real CALL to be executed, which is expensive So why does ...
1
vote
1answer
8 views

How to type cast fixed size byte arrays in solc 0.5.x?

In solc 0.4.28 I was able to do: uint foo = 42; bytes28 bar = bytes28(foo); but in 0.5.9 I'm getting the error: TypeError: Explicit type conversion not allowed from "uint256" to "bytes28". ...
0
votes
1answer
20 views

Create2 and new contract deploy at used address

Given that it seems possible, using somehow CREATE2, to deploy a new smart contract at a certain address where a different smart contract existed before to be killed... (see @smarx answer here Can ...
0
votes
1answer
23 views

Can I put a lock on an already issued erc20 token?

Can I put a lock on an already issued erc20 token? I have issued a fixed erc20 and I want to know if it is possible to apply locku to smart contracts.
1
vote
1answer
22 views

Why OpenZepplin always use private visibility for state variables?

Why OpenZepplin always use private visibility with getter functions for its state variables? I can't find a reason why they are not using public, is there any potential security or gas cost difference ...
1
vote
1answer
25 views

how to calculate the correct amount with decimal

I have total token 99,999,999.99999457, It is 8 decimal, but when I do like below I get 99999999, I expected 99,999,999.99999457: const decimals = await this.contract.methods.decimals().call(); ...
0
votes
0answers
31 views

Truffle how to test with reference to mainnet smart contract - Error: while migrating VM Exception while processing transaction: revert

I would like to run a truffle test on a smart contract that includes a smart contract address deployed on mainnet. However, this results in the following error Error: Error: Error: while migrating ...
0
votes
0answers
21 views

Web3 - Total Suppy

Just wondering if there is a way to calculate the total supply via web3? I imagine you'd need to scan for all addresses? Not sure where to start with coding this one.... EDIT: So since it's not ...
0
votes
0answers
14 views

How can link metamask wallet to create Android and web wallet for ERC20 token

I studied Solidity and Web3.js .I still need to know how can use metamask wallet that use in chrome extension to create as a mobile wallet and web wallet for client side.
0
votes
1answer
31 views

How to solve the error “”before all“ hook: prepare suite:” [closed]

When I tested my contract, I got this error ""before all" hook: prepare suite:" Does anyone know how to solve this error? This is my dependencies. "truffle": "5.0.7", "web3": "1.0.0-beta.46"
2
votes
2answers
38 views

Can you selfdestruct a contract more than once?

I read the Contract's state after a selfdestruct thread, but it doesn't answer the question whether you can selfdestruct multiple times.
1
vote
1answer
25 views

Nothing-At-Stacke: What is EV and why can I not vote on both branches with full stake?

Can somebody tell me what EV means and what the graphs represent? Does p=0.9 means that I look 0.9 of my stake for the one branch and 0.1 for the other? Where does this locking happens? Why can't I ...
0
votes
1answer
31 views

Ethereum 2.0 (Serenity) & PoS

I understand that the underlying consensus model changes from PoW to PoS. However, will it also result in changes to how wallets interact with the network? Will transaction fees still have to be paid ...
2
votes
2answers
46 views

Gas cost of a sha256 hash

I'm confused about the cost of the sha256 function, because my understanding of the cost from the yellow paper ( https://ethereum.github.io/yellowpaper/paper.pdf (Appendix E. Precompiled Contracts) ) ...
0
votes
2answers
23 views

Can you use a private Ethereum blockchain network to deploy an actual application for the public?

I am starting to do some research for my blockchain based project and I was wondering if it is possible that I can deploy my project on my very own private ethereum network for actual public use and ...
0
votes
1answer
27 views

TypeError: Type contract Campaign is not implicitly convertible to expected type address [closed]

pragma solidity ^0.5.11; contract CampaignFactory { address[] public deployedCampaigns; function createCampaign(uint minimum) public { address newCampaignAddress = new Campaign(...
0
votes
1answer
15 views

Check if Struct already exists in array of structs

I am new to solidity. I have a struct and an array of structs, like this: struct Adopter{ uint age; uint gender; // 0 woman, 1 man // maybe add an id field } Adopter[] adopters; So, a ...
0
votes
1answer
16 views

Solidity. Check if key has value in mapping. Operator != not compatible with types struct

I am new to solidity. I have a Person struct and mapping: struct Person{ uint age; string gender; } Person[] players; // holds the 24 players mapping (string => Person) ...
0
votes
1answer
21 views

Geth-Clique: 2 sealer POA network - sealer nodes not mining - Signed recently, must wait for others - stuck

I have the following setup for a geth clique POA network, however blocks are not mined. The network consists of two separated nodes which are both acting as an active sealer. Sealer 1 Start Command ...
0
votes
1answer
33 views

How is Ethereum Virtual Machine (EVM) isolated (sandboxed)?

I always had this question in mind: What are the used technologies, in order to achieve the isolation of the EVM? does it just run as an isolated process in its own namespaces using the linux feature ...
0
votes
0answers
19 views

How to manually close a websocket connection to ganache-cli

I am trying to reproduce a bug which happens after my websocket connection restarts. To pinpoint the problem I am trying to manually close (and then restart) the ws connection to my ganache-cli node. ...

15 30 50 per page