All Questions

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

Cannot connect to private testnet with web3.js

I have setup a local private test net and now I want to connect from Node.js to a node in the testned using IPC. I started a node with this command: ./geth --identity "5" --datadir /home/davide/...
0
votes
1answer
6 views

Trying to do interaction between 2 contracts. But compilation failure showing should be declared Abstract

WinCon.sol EnemyCon.sol To create interaction, I am creating interface for EnemyCon in WinCon.sol, but Remix is throwing compilation error stating "EnemyCon should be marked abstract". I ...
12
votes
6answers
5k views

Sorting an Array of integer with Ethereum

I'm trying to have a simple array of integer sorted in Solidity but i couldn't find any real ressources so instead i'm trying to do it "the hard way" but so far with very little success. Is anyone ...
0
votes
1answer
222 views

how to watch the eth address with infura

our project now uses scheduled task to query the eth address with infura API to get its balance every 10 seconds but as the number of addresses keep increasing, the efficiency is very bad. Is there ...
0
votes
1answer
205 views

Why stateRoot, transactionsRoot and receiptsRoot not included in the blockheader of any etherscan ?

My question may be stupid. I'm trying to understand how ethereum is made and in all articles I read that a block header include a list of things and the stateRoot, the transactionsRoot and the ...
0
votes
1answer
174 views

Out of Gas exception on testnet but on JVM it works

I am trying to withdraw a contracts balance to the owner of that contracts account. It works perfectly on the JVM in solidity browser. But on TestRPC it has an out of gas exception. The account has a ...
0
votes
1answer
21 views

myContract.getPastEvents returns undefined event

I am using Web3 1.3.0. Connecting using Node. Also if I try to enter the name of my Event I get an error saying that event does not exist. This is what I get, shouldn't event have a value ? I am using ...
1
vote
1answer
54 views

error while installing web3 in ubuntu

gyp WARN install got an error, rolling back install gyp WARN install got an error, rolling back install gyp ERR! configure error gyp ERR! stack Error: EACCES: permission denied, mkdir '/usr/lib/...
1
vote
2answers
97 views

OpenZeppelin contract not working on Kovan testnet

I created a simple smart contract using OpenZeppelin and deployed the contract to the Kovan testnet. However, when I send KEth to the contract using MetaMask, nothing happens (I believe the buyTokens ...
1
vote
2answers
3k views

Create an Ethereum wallet with React Native for single token

Many of you might think that this question has already been answered but I don't think that there is a clear answer on the internet for the current Ethereum, Web3.js and React Native versions (for ...
0
votes
1answer
146 views

Setting ERC-20 token price

I'm currently trying to set the token price of my ERC-20 token.The problem I'm having is trying to set the price to ETH(0.01) per token, but the closest value I keep getting to is ETH(0.001) per token ...
1
vote
1answer
163 views

Quorum and Swarm Integration

After building from Quorum source, I can see Swarm as on the binaries. How can one get Swarm to work alongside Quorum?
2
votes
3answers
63 views

I am unable to verify my contract on etherscan

Unable to verify my contract on etherscan. This is the link - https://ropsten.etherscan.io/address/0xc68c67a1864060631817be1eebdb91e8661fae7a . Please help. Its urgent. Here is my code: pragma ...
0
votes
0answers
20 views

throw new Error(“Could not find artifacts for ” + import_path + “ from any sources”);

I’m receiving then ex error: C:\Users\xxxxx\AppData\Roaming\npm\node_modules\truffle\build\commands.bundled.js:455204 throw new Error("Could not find artifacts for " + import_path + " ...
1
vote
1answer
181 views

How to interact with my Rinkeby contract via truffle console?

I've been using truffle console to interact with a contract which I developed locally with Ganache. I'd like to be able to call the contract's methods using the console once deployed to the Rinkeby ...
0
votes
0answers
8 views

Forking a private chain consequences

If I were to fork my private Proof of Authority chain can I revert without pruning a block with corrupted data and subsequently all successor blocks which do have complete data and if so how can I ...
0
votes
3answers
121 views

Crowdsale tokens count is not reducing even user gets the tokens to his account

I had created 100 million tokens and created a contract for crowdsale in test network If user sends a 1 ether using contract address i am able to receive 1 ether and send 1000 tokens to user who send ...
0
votes
0answers
8 views

How to resolving this “Uncaught (in promise) TypeError”

I have a problem running npm run dev when I create a crowd sale project reference yt: Dapp University this my app.js code: App = { web3Provider: null, contracts: {}, account: '0x0', loading: ...
0
votes
1answer
130 views

How to validate proper implementation of ERC-1155 contract?

I want to implement an ERC-1155 contract. Using TDD we would first write a test. Which begs the question of is there a way to validate that your contract properly implements ERC-1155?
0
votes
1answer
230 views

Vyper: Truffle test read mapping value inside struct

I have the following struct inside my vyper file: races: public({ start: timestamp, end: timestamp, racersBetHash: bytes32[address], racersBetAmount: wei_value[address] }[int128]) Then I ...
0
votes
1answer
15 views

How do I configure a browser to resolve ENS names from a testnet?

I want to preview a major revision of my Dwebsite before I update the IPFS CID to which the mainnet ENS name resolves; this requires locally resolvable names so hyperlinks and resource references work ...
1
vote
1answer
15 views

How to input bytes32[] on remix?

I have a constructor like so: constructor(bytes32[] proposalNames) public { ... How do I input values for it on deplyoment with remix? I tried ["foo", "bar"] but it said: ...
1
vote
1answer
170 views

How to simulate multiple consecutive transactions and get the resulting state?

I'm trying to simulate a transaction on the public blockchain that invokes a contract's method with certain parameters. Then I want to make a follow-up transaction with some other method call. I ...
3
votes
7answers
3k views

Are there any tools that provide security reviews of Solidity code?

Do we have any standardized security scanning tool to go for security code review for solidity language? If not, what all opensource tools are there on which we can relay? Need response urgently.
0
votes
1answer
69 views

getBalance of shows the wrong balance

I have this code to show the erc20 token balance of an account var tokenAddress = '0xb97E9bBB6fd49865709d3F1576e8506ad640a13B'; var walletAddress = '0x62f28320f688A7A4e0021c55d7ffD1acd770A133'; ...
0
votes
0answers
19 views

Public function when called from another contract throws error “The called function should be payable if you send value”?

This is the contract I am calling from: contract MultiTransfer { function multiTransfer(Marcelo token, address _addresses, uint256 amount) public { token.transfer(_addresses, ...
0
votes
1answer
16 views

Why is no block created for this function?

I have this contract and I've deployed it to ganache pragma solidity >= 0.5.0; contract HelloWorld { string public payload; function setPayload(string memory content) public { ...
2
votes
1answer
10 views

What's the point of wrapping 'now' in a _now() function that returns 'now'?

Why people wrap 'now' in _now() function that just returns 'now'? Found that on xDAI contracts: function _now() internal view returns (uint256) { return now; } Is it because in 0.7.0 'now' was ...
0
votes
1answer
89 views

Is it possible to modify privateFor addreses in a private Smart Contract (Quorum)?

I know how a private smart contract works providing a list of accepted addreses to privateFor property, but what if I want to disable (or enable) any address visibility? Should I deploy a new Smart ...
0
votes
0answers
18 views

Error sending ETH through smart contract: Transaction has been reverted by the EVM [closed]

I am trying to send ether from an account to my smart contract to another account through a function in my smart contract but I am receiving the error: "Transaction has been reverted by the EVM: {...
0
votes
1answer
76 views

Unable to deploy contract on Besu network(docker) using dynamic IP

I am stuck with a weird situation. I create a local Ethereum network with Hyperledger Besu in docker environment. I try to deploy contracts to a rpc node using Truffle(different container in same ...
0
votes
0answers
15 views

Wrapping functions in interfaces to enable higher order function capability in Solidity?

Let's say I want to have higher order function capabilities in my Solidity Dapp. Also I want to be able to pass in new functions as input to higher order functions contained within contracts that were ...
0
votes
0answers
5 views

I would like to use Ethereum Public block chain for storing data thru a mobile App(both android and IOS)

1)For this purpose, would like to build a SDK that can be integrated with my existing mobile app. 2)I have around 5million Downloads-users that would use this SDK. a)The User data would want to pass ...
2
votes
1answer
565 views

How can I decode the inputs to a transaction written by a smart contract constructor with Nethereum?

I've been able to decode the inputs to a contract function transaction given the ABI as follows: var myFunction = contract.GetFunction("MyFunction"); var myFunctionTxn = await contract.Eth....
1
vote
1answer
206 views

Running a shell script in after a contract is deployed in a private blockchain network

Is there any way that i could run a shell script after a contract is deployed,since the terminal has geth Javascript console running,and there are some commands which are already in the shell script. ...
0
votes
1answer
18 views

Allow a wallet to call a single contract

I want to build an electronic device. This device can be a raspberry pi with a ledger USB device, or anything else. This device will need to call an Ethereum smart contract. For example let's suppose ...
0
votes
1answer
498 views

Ethereum Token: How to decide gas price and gas limit using token transaction?

I made ERC20 token. And I am going to implement to send token using web3.py. Here I want to calculate gas price and gas limit using token transaction. If anyone know about that, please help me. ...
0
votes
0answers
15 views

Test execution error: 'The contract code couldn't be stored, please check your gas limit.'

When I was coding the unitary tests for my smart contract on Remix, I encountered a problem of gas limit: contract deployment failed after trying twice: The contract code couldn't be stored, please ...
0
votes
1answer
279 views

Can't connect to localhost:8545 while using ethereumjs-testrpc web3?

I am developing a simple Voting dApp by following a tutorial. In this tutorial we are using npm install ethereumjs-testrpc web3 so that we can get the fake nodes of Ethereum. For that i first ...
0
votes
1answer
55 views

What is the purpose of the Zinken Ethereum 2.0 testnet?

The Spadina testnet launched less than 2 days ago. What is the purpose of the Zinken testnet? What is being covered that was not covered in Spadina? Related: What are the Ethereum 2.0 testnets?
2
votes
1answer
54 views

Which token standard should be use to create different tokens for different users?

I have read several differences between fungible and non fungible tokens. It cleared my few doubts though, I have few more remaining. I have requirement to create a platform on which users can ...
0
votes
1answer
16 views

How to access a public function in solidity?

I have a smart contract deployed on the Testnet here - https://ropsten.etherscan.io/address/0xD99ea28F24317F28291556754edd24AA1352c26e This contract has a public function triggerAgeCount function ...
1
vote
0answers
24 views

What is operator approval in context of ERC-1155?

https://github.com/enjin/erc-1155/blob/master/contracts/ERC1155.sol says something about "operator approval". What is an operator and what is operator approval?
2
votes
2answers
177 views

How to generate a new token for ERC1155?

Developing an ERC1155 contract, how to generate an address for a new token? I need to create an API function like function createToken() returns (address). How? Should I just use an incrementing-by-...
0
votes
1answer
137 views

How many projects are there which implement ERC1155 standard?

New ERC1155 standard which is thought to be an improved version of ERC721 and ERC20. But I see many projects still prefer ERC20 or ERC721 standards. If so, do you know any projects implementing ...
1
vote
1answer
23 views

How to show erc721 NFT card images in compatible wallets?

I have created an NFT and now I want to add some metadata e.g card images, that shows in a compatible wallet like trust wallet. What step is needed next?
0
votes
0answers
12 views

How to check if a user had registered in My DAPP with Metamask?

I want to check if a user had registered in my DAPP with Metamask..Do I need to store User struct in solidity to control that or just depend on metamask for authentication.??
0
votes
1answer
116 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
0answers
13 views

Truffle Test Error Revert in Contract Factory

I'm trying to create a contract factory that creates "Oracles". Oracles have state variables that are initialized in the contract constructor, and I'm trying to use Truffle Test to verify ...
1
vote
1answer
116 views

Verifying contract code on etherscan

This question will be very similar to this one, but I'm stuck and don't know what to do: Token contract source code not verified Anyways, my friend sent me 2 pieces of code, the actual contract code,...

15 30 50 per page
1
2 3 4 5
610