All Questions

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

create ERC-20 token from a contract function

I would like to do a function create contract with ERC-20 interface. But I have a few problems. If anyone help me I’ll be appreciated. Here’s the code : pragma solidity ^0.5.0; import 'https://...
0
votes
1answer
17 views

Define “difficultyHardforkTransition” parameter?

I have looked through all of the glossaries I know of for genesis/chain spec files but I don't see this one. Can anyone tell me what "difficultyHardforkTransition" means?
0
votes
0answers
20 views

Which are the operations providing gas refund available immediatly for the current running transaction?

Most of gas refund operation aren’t available immediately, but instead increase the refund counter (which if I understand correctly is refunded not after the end of contract creation or call by ...
0
votes
0answers
51 views

Web3 Websocket Connection To Infura Rinkeby Ropsten

This is my Javascript code. I keep getting an error that states (node:30062) UnhandledPromiseRejectionWarning: TypeError: privateKey.startsWith is not a function I am using node 12.1.0 & ...
0
votes
1answer
32 views

I have msg.sender issue

Lets suppose here are user A and smartcontract B and C(sort of regular dapp). A has no token but little ETH for gas, but B has enough tokens(Erc20). A send TX to B B send call to C C receive tokens ...
0
votes
2answers
1k views

Returning dynamic array not works

I'm trying to build a function that, when called, returns a mapping as two different array. The problem that I have a mapping (address => uint) content2view and I have to get this value outside ...
0
votes
1answer
176 views

How to get all the contracts deployed by a specific ethereum address?

It is anyhow possible to get all the contracts deployed by a specific ethereum address in lifetime? If yes, is it possible to get ABI details of the contract by their address?
0
votes
1answer
280 views

Deploying and calling a contract works only with Ganache (not with Geth)

I deployed a HelloWorld contract using web3j and it worked awesome with Ganache. I was able to call my only function from the contract and it returns the desired result all the time. When I deploy ...
0
votes
2answers
1k views

Can I use ICO (Initial Coin Offering) to fund for a non-blockchain project?

I did a fair amount of googling before posting. Let's just say, I am planning to create a yet-another-blog-engine which is noway related to blockchain. Can I use ICO (Initial Coin Offering) to fund ...
0
votes
1answer
185 views

Monax :-Issue in executing job configuration file

I am using Monax version 0.18.0.I am following the tutorial for deploying contracts in Monax https://monax.io/docs/getting-started/. I have used the sample contract defined in their starting tutorial....
0
votes
1answer
43 views

In ICOs why initial supply/total supply tokens are transferred to owner address rather than storing it in the contract itself?

Here I have taken two of the top 20 ERC20 Token/ICO. 1.BNB(https://etherscan.io/address/0xB8c77482e45F1F44dE1745F52C74426C631bDD52#code) 2.BAT(https://etherscan.io/address/...
0
votes
1answer
337 views

Do I have to implement ERC20 signature as separate contract and use inheritance?

ERC20 defines contract signature for contract in order for them to be accepted by wallets, exchanges etc. I have seen that for some reason, even when signature contract (interface/abstract contract) ...
0
votes
1answer
930 views

How to watch events on smart contract? [duplicate]

All the existing questions explains to catch the event on client end or server. How to catch the event on smart contract itself? Here's what I'm looking for: Contract A emits the event Contract B ...
0
votes
1answer
55 views

How to return the change to the sender?

In this answer, @pabloruiz55 provides the following code for sending ether. SmartContract.sol function transferToOwner() payable returns (bool) { //Sender should forward at least 1 ether. ...
0
votes
2answers
1k views

Solidity: How could I apply delete to complete storage ref[] with one call?

Definition: mapping(address => data) clusterContract; struct data { //defined inside a Library. mapping(address => Library.Struct[]) my_status; } data list; ...
0
votes
1answer
622 views

ETH wallet error

I want to download the ETH wallet and make light synchronization on my PC. I downloaded ethereum wallet, but after launch, the Checksum mismatch in downloaded node crashes! MD5: 308 ... Please install ...
0
votes
1answer
191 views

Solidity smart contract inherited function output failed

I'm trying to inherit a function from the parent contract into child contract and its working fine in remix JavaScript VM. I did the following steps: Deployed the parent contract in remix JavaScript ...
0
votes
1answer
412 views

Ethereum light node: Light vs Cache vs fastsync

There are many different options when running a Ethereum node. I want to make sure I pick the right options before I start downloading the blockchain... can someone explain the advantages of using: —...
0
votes
1answer
550 views

Cannot connect to testrpc

I have a testrpc running on a virtual machine (Ubuntu 16.04) and it works properly when I interact with it using the truffle console. My only goal is to call a smart contract that simply sends ether ...
0
votes
1answer
2k views

Contract Not sending ether to other account

I have created a contract which store the address of the users and i want to send 1 ether all the users stored in array. Here is my code contract project{ address public user; bytes32[10] ...
0
votes
1answer
120 views

Issue in creating App using Monax :- Contract not found in JSON

I am trying to create applications using Monax. I am using the reference given in Monax for developing app https://github.com/monax/hello-doug. I have created hello-chain as mentioned in their Read-me....
0
votes
1answer
78 views

dApp index.html fails to load for dAppUniversity election application

Hit a brick wall with this. git clone https://github.com/dappuniversity/election The following is the Shell output I get when I npm run dev. I’m using the cloned project from GitHub but I’ve ...
0
votes
1answer
461 views

JSON RPC + web3: Subscribe to Solidity events

When using web3 and the JSON RPC, is there a way to subscribe to Solidity events? For instance, I want to subscribe to every event Transfer(address indexed from, address indexed to, uint256 value); ...
0
votes
1answer
68 views

How to connect with Metamask and Smart contract?

I am ready with my frontend design. I have only 3 files HTML, CSS, and JAVASCRIPT. So, I didn't create any project or DAPP to have other files. Now next step is to connect with metamask and smart ...
0
votes
1answer
54 views

How can I send array of structs as arguments?

I want to send to my contract an array of currency and its price so it will store it: pragma solidity ^0.4.24; contract ExchangeContract { enum CurrencyType { USD, TWOKEY, BTC, ETH, DAI, USDT, ...
0
votes
2answers
378 views

web3 detect/listen to events if someone send ether to addresses

I need to constantly keep running some code to detect if someone has in the past minute sent some ether/token to a lot of addresses, is there better way to do than https://ethereum.stackexchange.com/a/...
0
votes
0answers
85 views

How require() and assert() work in solidity?

I'm trying to validate a condition using require(). If the condition is false for the first time, the contract is stopped and reverted to its initial state. On the other hand, if the condition is true ...
0
votes
2answers
544 views

Public struct array variable getter

I create a struct array and map it to an address: contract MyContract { struct something { bytes32 test1; bytes32 test2; bytes32 test3; } mapping (address => ...
0
votes
2answers
312 views

Do I have to run geth locally to access Rinkeby via web3.js?

I have used truffle to a migrate some contracts to a local instance of geth that points at Rinkeby. The problem is that I'm behind a firewall, with little hope of getting port 8545 open, so now I can'...
0
votes
1answer
239 views

How do I export ethereum blocks with quickblocks to a JSON file?

I am looking for how to export or save data from ethereum blocks in a json file using quickblocks.
0
votes
2answers
2k views

Convert Ether to Wei without web3

I don't want to load the web3 library, I do however want to convert Either to Wei, does anyone have a JavaScript function to share. I don't mind loading a smaller library
0
votes
1answer
315 views

plateforms to develop private blockchain [duplicate]

plateforms to develop private blockchain Hello ! I want to develop a private blockchain , and i wanna know what's the best plateforms / logiciel to work with thank you
0
votes
1answer
320 views

Is it possible to set up a token with a fixed amount available, where all coins can be redistributed among token holders?

I'm new to this so i apologise in advance for my lack of technical knowledge. What I'm trying to is distribute an investment among people ( a closed group) using tokens, allowing people to buy and ...
0
votes
1answer
43 views

Apparent mismatch between Oraclize CBOR and python3 CBOR encodings

I encoded a value using the Oraclize CBOR library like so: Buffer.buffer memory cborArgs; Buffer.init(cborArgs, 64); cborArgs.startArray(); cborArgs.encodeUInt(10); cborArgs....
0
votes
1answer
114 views

Mist hash Identicon

Upon finding this thread How are the account "pictures" used in Mist generated? I tried to use this version of blockies to generate the identicon based on a wallet/contract hash Although i ...
0
votes
1answer
105 views

Problem with meteor server side call to Ethereum node

I try to interact with Ethereum node via web3 lib. (meteor add ethereum:web3) Meteor 1.5.4.1 lib.js if (typeof web3 === ‘undefined’){ web3 = new Web3(new Web3.providers.HttpProvider(‘http://127.0.0....
0
votes
2answers
285 views

Three tokens transfer between each other

I would like to write three token contracts A, B and C that can interact with each other. A is the main token, B and C are the sub-tokens. A buyer can buy the main token(token A) and use them to buy ...
0
votes
3answers
199 views

Error trying to create a crowdfunding contract?

I am using the template code found on the Ethereum website for crowdfunding and when I insert it in the solidity contract source code in the Ethereum wallet, it returns: Unused local variable ...
0
votes
0answers
521 views

“callback contain no result Error: Error: base fee exceeds gas limit” when call selfdestruct function (using Remix IDE)

I'm testing this simple contract. All the functions works well, but when I call the kill() function I'm getting this error: callback contain no result Error: Error: base fee exceeds gas limit I'm ...
0
votes
2answers
27 views

Oraclize: Mismatching queryId and myid

I have the following contract that uses Oraclize: contract Test is usingOraclize { bytes32 public query; mapping (bytes32=> address) senderAddress; address public resultAddress; function ...
0
votes
1answer
106 views

Question about Gas and Gas Price

In my transaction: gasPrice: 210000 blockHash: "0x69bd71736f2a5d2c83919a0de81a7de0b6b690bb6bdda3acff254d5c68f634bc", blockNumber: 3178, from: "0xc8caa71c16299b40b8579742a27ee53162886040", gas: ...
0
votes
2answers
57 views

initialise array of struct inside a new struct

Following up on the question of 2d array of different types: 2d array of different types? How would one go about initializing a new array of structs (Vote) when creating a new struct (Project) ...
0
votes
1answer
29 views

Truffle test error: deducts the amount from the allowance

What i did first was watching at Dapp university tutorials, I manage to watch all 14 videos and run it with Ganache. But since everything is doing good at local, I created my own private network. Then....
0
votes
0answers
105 views

If I stored an encrypted variable in a smart contract, how long would it take to crack?

Just trying to get some information... Lets say I did this. state = b'MySecretKey' _state = bcrypt.hashpw(state, bcrypt.gensalt()) _state = _state.decode('utf-8') And then stored that in the ...
0
votes
2answers
241 views

Car Rental System Compile Error

I am writing code for a car rental system but i'm getting a few compile error messages that don't understand. The first error is TypeError: Expression has to be an lvalue. The second is ...
0
votes
1answer
93 views

How to “move” balances between wallets?

There is a "move" command in Bitcoin, Litecoin, Dash etc. which lets you move balances between wallets in your node without paying a transaction fee. I wonder if there is a similar command in geth? I'...
0
votes
0answers
58 views

command line brings up code instead of running commands [duplicate]

I am trying to run truffle commands on commandline but it brings up the code file instead like this
0
votes
2answers
41 views

I'm trying to create an app that allows people to exchange ether between themselves but I have the error: “web3.eth.transact is not a function”

<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <center> <title>dEnergy</title> </head> <body> <label for="name" ...
0
votes
1answer
226 views

How can I upload a smart contract to the Ethereum blockchain directly from a Raspbian Terminal without Parity, Geth, etc installed?

How can I upload a smart contract to the Ethereum blockchain directly from a Raspbian Terminal without Parity, Geth, etc installed? Hello, I primarily use a Raspberry Pi 3B with Raspbian OS ...
0
votes
1answer
20 views

Read List of Posts using struct

I tried to read a list of posts using the code below struct posts { bytes32 postTag; string post; address[] acceptedBy; uint8[] voteCount; } mapping(address => posts) totaluserPosts; ...

15 30 50 per page