All Questions

Filter by
Sorted by
Tagged with
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
45 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
22 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
33 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
24 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
21 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
18 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
32 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
7 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
24 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
26 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
36 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
24 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
29 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
42 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
13 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
19 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
29 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
18 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. ...
0
votes
1answer
26 views

TimeoutError when using Infura websocket with web3.py

When I run the following code, sometimes it run OK, most of the time it gave error: concurrent.futures._base.TimeoutError code: if __name__ == '__main__': infura_url_ws = 'wss://mainnet.infura....
0
votes
1answer
28 views

What Ethereum wallet I need

I have lots of experience with bitcoind and it's RPC calls. I want similar Ethereum wallet that supports: RPC calls from PHP, Pyhton and similar languages. erc20 tokens. Must work on Linux VPS (I ...
0
votes
1answer
37 views

Type Error: web3.eth.Contract is not a constructor but web3.version is 1.0.0

Why can't I instantiate my smart contract? When I try and instantiate an instance of a smart contract with the following code... let contractInstance = new web3.eth.Contract(abi, '...
2
votes
1answer
16 views

What is the ABI code of a map's getter function?

I'm currently trying to call Etherscan's API eth_call to check data from a smart contract. To do that, I need to pass the function ABI code and data. However, the data I need is stored in a map and I'...
1
vote
1answer
33 views

How Can I Sign A Transaction Server-Side?

I have a server-side Node.js app that sends a transaction to an Ethereum smart contract like so: const transaction = await contract.methods .method_name([params]).send({ from: [...
0
votes
1answer
35 views

erc20 token swap contract example needed

is there a contract example which allows to exchange one erc20 for another? i have 2 tokens i want to exchange from tokenA to tokenB 1:1 and keep 1% as a fee the sender should just make a normal ...
0
votes
1answer
9 views

How can I debug a my Solidity smart contract with a GUI?

Is there any way to debug a Solidity smart contract with a GUI, like remix? How can I do it for both testnets and mainnet?
0
votes
1answer
15 views

function overriding is quite working when called with web3.js

function getDetails(address publicKey) public view returns (Organization memory) { return s.getOrg(publicKey); } function getDetails(string calldata orgID) external view returns (Organization ...
2
votes
1answer
20 views

Can the block number be set back in ganache?

I know about tools like ganache-time-traveler that let you advance the block number. But is it possible to go back to a lower value?
0
votes
1answer
14 views

What are the ways to call a smart contract function during development?

What are the ways to call a smart contract function during development using Truffle simulated VM with a GUI interface (like Remix or EtherScan offer)? I know I could use CLI options like Truffle ...
0
votes
0answers
13 views

Listening events

I have a problem I want to solve with watchevent function. I am building a daemon script that submit a transaction when a particular event is emitted. Let's suppose the node that run the script goes ...
0
votes
1answer
23 views

ERC20 Token transfer fails

I'm struggling with transferring my own ERC20 Token. I got following code: contract AccountingToken is ERC20, ERC20Detailed { constructor () public ERC20Detailed("AccountingToken", "MAC", 18) { ...
1
vote
1answer
17 views

Is it possible for 2 transactions from the same address to be mined in the same block?

If I send my ETH from address 0xA, and then immediately send another one also from address 0xA, is it possible for the two to be mined in the same block? Or the second transaction must always be mined ...
1
vote
1answer
33 views

Transactions and smart contracts during reorganization

I learned from this question that transactions will be reverted and rollback after chain reorganization. But after a transaction is reverted, will the sender needs to resend this transaction? Or this ...
0
votes
0answers
36 views

Smart Contract is not working on Geth private network, while it does work on Ganache as well as Remix

I've only begun working with geth from last week and have faced the quite a challenge. I've written a smart contract and it works on remix (JavaScript VM) but somehow it does not work on my geth ...
3
votes
0answers
36 views

What's the point of Truffle Migrations?

I've been reading a few articles and StackExchange posts (e.g. What are truffle migrations?) about Truffle Migrations, but I still don't get it: why do we need them? It seems they do only one thing (...
0
votes
0answers
22 views

Web3 method getTransactionReceipt() does not return token transfer value for particular token transaction

I've tested getTransactionReceipt(), to get all detail about transaction with amount of token transfer. Also tested getTransaction but it returns only Ether transferred value. Is there any other ...
0
votes
1answer
14 views

Solidity. Return a Sruct that lives inside an array

I am not sure how to return a struct that is inside an array of structs. This is my code: contract StudentsInfoTracker{ Student[] students; struct Student{ string name; ...

15 30 50 per page