All Questions

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

Can i disable direct transactions to smart contract address?

I wanna use rewardsAmount variable to calculate my rewards: uint rewardsAmount = 0; // Only here i can withdraw rewards function withdrawRewards() onlyOwner external { require(rewardsAmount != ...
0
votes
2answers
16 views

Sending data outside the blockchain

Once a transaction is committed to the blockchain is there a way to let an entity outside the blockchain (i.e. An entity that is not a node in the blockchain) know that a particular transaction has ...
0
votes
2answers
15 views

Tokens & Smart Contract “Upgrade”

I'm not very technical, but I have a question. Supposing that a Smart Contract is being upgraded to a new one, would it be possible in the new contract to not send new tokens to certain wallets? So ...
0
votes
1answer
456 views

problem starting ganache

I'm using truffle with ganache GUI. It worked fine at first, but now I am unable to start it. (I made it executable) When I run ./ganache.AppImage I get this message: installed: X-AppImage-BuildId=...
0
votes
1answer
10 views

How to diagnose a “Error: Transaction has been reverted by the EVM”?

This the error intercepted from my javascript, using web3.js Error: Transaction has been reverted by the EVM: { "blockHash": "...
2
votes
1answer
236 views

Does it make sense to have a Node.js backend serving json to frontend for dapp?

Currently, the architecture I am looking at is that the smart contract (SC) sits on the ethereum network, but it is a complex and multilevel contract system. Just navigating through the tiers of the ...
5
votes
1answer
695 views

MyEtherWallet shows custom token but etherscan does not show any transaction?

Yesterday I participated in an ICO. I sent ETH to the correct contract adress and my transaction was confirmed. I also found my transaction on the ICO contract adress via etherscan. I then added a ...
4
votes
3answers
1k views

Contract code size (and how to work around it?)

I'm writing some rather substantial Solidity smart-contracts, and believe I'm hitting the EIP170 24k bytecode size limit. I've already (a) factored my code into libraries (b) today split my ...
1
vote
1answer
380 views

Does Quorum works with Windows?

As the tittle says, I would like to make a demo but I don´t know if Quorum supports windows.
1
vote
2answers
65 views

How is authorization handled in smart contracts

I have deployed a Quorum network on Azure Block chain service to be used by specific invited members of a consortium. I have not yet explored the privacy features provided by Quorum on top of Ethereum....
0
votes
2answers
53 views

Own private key of smart contract to sign a line of text

For my project it is necessary for smart contract to sign a message (for example, EC-signature) I have not found a way to generate a pair of public and private keys inside the contract so that the ...
2
votes
1answer
17 views

How to check if a mapping has not been written yet?

I have this mapping: mapping (uint256 => string ) private storedData; I am trying to do this: modifier dataNotStored(uint256 _index) { require( keccak256(abi.encodePacked(storedData[...
0
votes
1answer
19 views

send erc 20 tokens with full code example

I apologize for posting another question. Here I'm giving the full example code which is giving me the respond: "txHash undefined" when I try to send erc20. I want to fix this code. If you have even ...
2
votes
3answers
275 views

Does Using Infura Breaks Decentralization?

Decentralized applications have a philosophy: they are immutable,secure and trustless applications. You can connect to Blockchain and be sure about that features. Infura is a great tool when ...
0
votes
1answer
14 views

GasPrice: is dipendent by the moment of the call and/or the network?

I'm testing a system to store a small amount of data on the blockchain using a contract. So I've some js using web3.js to make a call to a contract function that mutates states. I obtained, using ...
2
votes
1answer
391 views

Why can't the return value of a transaction be included in the transaction receipt?

Shouldn't this be possible as the return value will be known when the receipt is created?
0
votes
0answers
8 views

Which Steps until final Casper's Proof of Stake implementation?

1) Is my understanding right that for 2020 there is just one large update planned, the "ETH2"? If not please lay down the planned core upgrades. 2) How many more large scale upgrades (like ETH2) are ...
0
votes
2answers
121 views

Remove array specific value

In a array that the values are never repeated. Is there a function/library or something similar that you give the value to remove. And the function the empty space in the array?? function remove(uint ...
0
votes
2answers
20 views

Project ID is required

I got an error at sendSignedTransaction is : Project ID is required. Can you please let me know that what is the actual problem? This is my code: try { const ethereumUri = 'https://ropsten....
0
votes
0answers
16 views

Error: connection not open on send()

I'm using "web3": "^1.2.4" This is how I connect to 'wss://kovan.infura.io/ws' const web3 = new Web3(new Web3.providers.WebsocketProvider('wss://kovan.infura.io/ws')) instance = new web3.eth....
0
votes
0answers
21 views

Not able to call the solidity function through App.js? Anyone know how to call a solidity function?

I'm trying to call a Solidity function from App.js, but I'm unsuccessful even after a number of tries. Its a very simple function betOnTeam(). Inside this function I just want to check condition and ...
0
votes
1answer
37 views

Does web3.eth.wallet.create set the newly created wallet file as the 'global' source of addresses for the web3 instance?

I'm playing about with web3js@1.0.0-beta.55 and I'm setting an HttpProvider on Ganache for my web3 instance: this.web3Instance = new Web3(new Web3.providers.HttpProvider(environment.ethereum.provider)...
0
votes
1answer
52 views

Generate Public Key

I use the command: > eth.getTransaction("0xac844bd1107761fec3abe2f55bf739f0e7cc6dd1cd169a60176bfb22 9826b5a8") Where the brackets contain the hash of the successful transaction. This is what I ...
0
votes
1answer
18 views

Calculate most frequent value in a array in solidity

I have an array something like [0,0,0,0,0,0,1,1,1,1,1,1,1,2,2,2,2,2,2]. I want to find the most frequent value. If two are more are having highest frequency, the first occurance should be the result. ...
0
votes
1answer
328 views

Error while retrieving transaction count

I am trying to retrieve the total transaction count of an address using java, web3j and Infura as the Ethereum client. My code is as below: EthGetTransactionCount txnCount = web3j....
1
vote
3answers
53 views

Can Ethereum be used as part of a decentralised forum like StackExchange?

Can Ethereum be used as part of a decentralised forum?
0
votes
1answer
409 views

Web3j Signature and Solidity Ecrecover

I'm trying to understand how to sign a message in Java and recover the public key in a Solidity smart contract however my public keys don't seem to match. Here's my Java code to generate the ...
14
votes
1answer
4k views

How do I control compiler settings with truffle?

I'm using truffle development environment for prototype contract development and I need to change compiler setting (e.g. turn optimization on and off). The documentation for the development ...
1
vote
0answers
23 views

Not able to decode the input data from transaction using web3j (Java)

I am creating transactions using web3j and passing some private data in that transaction. The transaction is also getting mined . I have subscribed to the mined blocks, where I am fetching the ...
0
votes
1answer
18 views

How to resolve this error in solidity “The constructor should be payable if you send value.”?

In this solidity code the finalizeRequest() is giving a run-time error. Here is the error : Campaign.finalizeRequest(uint256) 0x692...77b3a transact to Campaign.finalizeRequest errored: VM error: ...
0
votes
1answer
28 views

Zepellin Crowsale buyTokens error

I'm trying to use the buyTokens function of the Zepellin Crowsale interface, but this gives me an error, without any log to be able to debug contract TokenA is MintableToken, PausableToken, ...
0
votes
0answers
16 views

Unfulfilled Promise From A Metamask Transaction

I'm having a problem with my JS code pausing on the let result line. Metamask prompts me to approve the transaction initiated in the line (which I do), but then doesn't proceed any further. As the ...
0
votes
2answers
9 views

What is the privatekey to be used to sign web3.js transactions?

I created an account on metamask, and downloaded the json of my wallet. It's on rinkeby. The structure of the json is { "version":3," id":"...", "address":"....", "crypto": {...
0
votes
1answer
30 views

Enabling truffle compile optimizer does not change the deployment gas cost

I am trying to deploy my contract by enabling the optimizer to see how much I can save from the gas costs. I am using truffle for the deployment. In truffle I enable the optimizer by the following ...
0
votes
1answer
139 views

Event emits multiple times on a solidity function call

I need have a problem, when I execute a solidity function, event emits multiple times, but when I refresh page then it works normally and only past events get called. Here is my code: ...
0
votes
1answer
14 views

web3.php - How to call a contract function that mutates states?

I'm creating web3 instance $web3 = new Web3( new HttpProvider( new HttpRequestManager( config('infura....
0
votes
1answer
7 views

Truffle test: “Cannot read property 'gasUsed' of null” error. Truffle migrate works fine

Whenever I try and do truffle test I get the error Cannot read property 'gasUsed' of null But truffle migrate --reset works fine More confusingly, to rule out something in one of my tests that is ...
0
votes
1answer
259 views

Send multiple transactions

This is contract I plan to implement multi send, so I can send multiple transactions to people. Here is my code pragma solidity ^0.4.11; /** * @title Ownable * @dev The Ownable contract has an ...
0
votes
0answers
10 views

Can we use geth for production?

Is geth ready and stable to be used for production? Can we install using --fast switch if we will use main net? How many GB will require? I ask becase we are planning to develop a DApp and we ...
2
votes
1answer
203 views

How do I get access to uPort from a mobile Browser

I've developed a simple DApp that uses uPort and it works fine on Desktop - where I can login through uPort with the QR Code. On a mobile browser (Anrdoid Chrome) I'm auto directed to uPort where it ...
6
votes
4answers
2k views

How to decode Log.Data in Go

I'm fetching the logs using client.SubscribeFilterLogs. The event parameters are encoded in types.Log.Data. How can I decode it in go?
0
votes
0answers
5 views

Cannot convert truffle-contract.min.js:1 undefined or null to object

I got this error in the chrome comsole while i do npm run dev for my fornt-end of smart contact. And also, page stuck in the my loading commnad. All of my code is in the link app.js truffle-...
0
votes
0answers
17 views

Error => invalid address, on passing arguments to function

so I created a function but then I needed to make it dynamic so that I will be able to call the same function body just bypassing the arguments on click of a button I am fetching the values from HTML ...
0
votes
1answer
23 views

TypeError: _getWeb3__WEBPACK_IMPORTED_MODULE_0__.default.eth is undefined

I'm not familiar with webpack, but after reading this error all I know that I import one module that is undefined by webpack. However, I don't know why export default new web3.eth.Contract(abi, ...
0
votes
1answer
315 views

web3.eth.SendSignedTransaction - gas issue

I am trying to send a signed transaction using web3.eth.sendSignedTransaction(). Everything seems to be working ok for my other web3 methods, but I am having trouble setting the gas for this. When ...
1
vote
2answers
52 views

accessing unpredictable numbers

I see that this has been a widely discussed topic in the past but I still don't understand why the future block hashes shouldn't be used for lottery-type games. As long as the incentive for a miner to ...
0
votes
1answer
28 views

Is it possible to use address you don't own while running ethereum RPC node (using geth)?

In other words, you start your own node and then somehow add accounts you don't own (aka - you don't have their private keys)? I'm asking because I wanted to make my own node exposed via RPC/...
1
vote
1answer
325 views

How to add a donation function in a smart contract

How would I add a donation function to this type of smart contract https://etherscan.io/address/0x39E5BD6AE0f2aA9240D2ae7fBF49e36F05dd339F#code Basically, what I would like to do is have a small fee ...
2
votes
4answers
38 views

ABI and Bytecode stored inside Contract

I was scrolling around Ethereum StackExchange and I came across with an interesting thought that I have never read or seen anyone talk about. I'm perfectly aware of how contracts work and are ...
0
votes
1answer
379 views

TypeError: Type uint256 is not implicitly convertible to expected type bool

function allowance (address _owner, address _spender) constant returns (uint remaining ) if **(__allowances[_owner][msg.sender])**{ **^-------------------------------^** ...

15 30 50 per page