All Questions

Filter by
Sorted by
Tagged with
2
votes
2answers
77 views

Smart contract and oracles

I'm having trouble understanding the flow: Contract <==observes/injects== Oracle <==requestdata==> API I read several articles like this and I'm aware of the theory of the flow. But what ...
2
votes
2answers
72 views

What are private variables in solidity?

The following variables here, assuming solidity 4.24 or later. mapping(something => something) private yourmapping; bool private yourbool; address private youraddress; uint256 private ...
1
vote
0answers
27 views

How to find bottleneck in geth sync?

I'm trying to benchmark geth full sync. Here are my current machine specs: Google Cloud 16 vCPU 14 Gb RAM 700 Gb NVMe SSD RAID 0 772k read/258k write IOPS 6+ Gbps network Launching with following ...
3
votes
0answers
45 views

How do I redirect my .eth domain with eth.link?

Let's say I want to redirect somewebsite.eth.link to www.otherdomainiown.com. http://spacex.eth.link/ does this and the redirect works on chrome. However, I don't see an A record and I do see IPFS ...
0
votes
2answers
23 views

Is transaction confidentiality achievable in Ethereum currently

I have read about zk-SNARKs on different articles which is written in 2016. So I am wondering if the zk-SNARKs is implemented in Ethereum currently?
1
vote
1answer
23 views

ERC20 coin transaction not successful

I called the mint function on a default coin to send some of my new coin to my METAMASK account but it looks like nothing was received. I can't tell what specifically could have gone wrong, so here's ...
0
votes
0answers
17 views

Sell Orders Reverted - Uniswap

I'm using node library with web3.js, big number, and ethereumjs-tx, and I can get the "buy" orders that use either solidity function ethToTokenSwapOutput or tokenToEthSwapOutput to work great. But I ...
1
vote
1answer
20 views

Can I use create2 to deploy minimal proxies in solidity, without using assembly?

Solidity 0.6.2 allows the creation of contracts with the create2 opcode via the new keyword and passing a salt in addition to any args. This is adequate for creating standard contracts, but what if I ...
1
vote
2answers
23 views

Oracle used by a Smart Contract no longer available

Ethereum relies on Oracles to provide information about the outside world used by SmartContracts. Also, when a node syncs (in slow mode) it has to go over all transactions (including SmartContract ...
0
votes
1answer
30 views

Unable to filter events with specific values of indexed parameters

I am currently trying to test a smart contract using the truffle suit ( with 'truffle test'). My contract is of a simple ERC20 token which includes the standard Transfer event: event Transfer(address ...
1
vote
2answers
15 views

Returning an array of structs

Here is my code example: pragma solidity ^0.5.16; pragma experimental ABIEncoderV2; contract Operations { Operation[] public operations; struct Operation { uint startOperation; ...
1
vote
1answer
35 views

Ganache: out-of-gas during deployment

I have a bunch of contracts which deploy just fine. Deployment of one of the contracts, XBRNetwork takes exactly 5418911 gas - no problems with that. However, once I add another trivial (public) ...
3
votes
2answers
64 views

Is it possible to deploy a contract using create2 in Solidity?

Can I deploy a contract in Solidity (not in-line assembly) using create2?
1
vote
1answer
21 views

can you override in solidity [closed]

in this code what is part 1 part 2 part 3 part 4 contract MyContract { // part 1 uint count; uint[] totalPoints; function localVars(){ // part 2 uint[] localArr; // ...
1
vote
1answer
21 views

Who Guarantees the Accuracy of a Smart Contract? [closed]

Assume Client A wants to sell a package to client B.
3
votes
2answers
55 views

Does Hyperledger Besu support Plasma?

Does the Besu client support Plasma? I guess this question could also be asked about other clients such as Geth and Parity as well.
1
vote
1answer
29 views

Difference between web3.eth.personal.getAccounts() with web3.eth.getAccounts()

What are the differences between web3.eth.personal.getAccounts() and web3.eth.getAccounts()? environment truffle: v5.1.7 using truffle console.
1
vote
1answer
21 views

Contract Call from another Contract

I am trying to refer to this Solidity Docs https://solidity.readthedocs.io/en/v0.6.2/control-structures.html and trying to execute the following code pragma solidity >=0.4.0 <0.7.0; contract ...
4
votes
0answers
24 views

what is a pseudorandom cache mentioned in ethereum yellow paper

in ethereum yellow paper it says: "There exists a seed which can be computed for each block by scanning through the block headers up until that point. From the seed, one can compute a pseudorandom ...
1
vote
1answer
25 views

use geth in ropsten network invalid transaction v, r, s values [closed]

when I use solc instruction compile following code that get bin & abi: pragma solidity ^0.6.0; contract TestContract{ function multilpy(uint a,uint b) public pure return (uint){ return a*b; ...
1
vote
1answer
19 views

Smart contract DB

Is it a good practice to create a smart contract to serve as a DB table? For example, lets say that I have users that need to create Operations. My operations objects need to contain id, description,...
1
vote
1answer
25 views

Re-entrancy Vulnerability?

function transferFunds(uint _value) private { uint _fee = (3*_value)/(2*100); //Perform Ether transfer method merchant.transfer(_value - _fee); admin.transfer(_fee); ...
1
vote
1answer
17 views

How to convert uint95 to bytes32 in solidity > 5.0?

contract TypeConversion{ uint96 data = 5; bytes32 b = bytes32(data); } It gives error: Explicit type conversion not allowed from "uint96" to "bytes32". What will be the better way to ...
-2
votes
2answers
43 views

Can I make a proper website by using ganache and truffle? Like maybe abc.com?

I have developed a voting system usinh dapp that runs on local host. It uses accounts from ganache and metamask for transactions of votes. Now if i want to buy a domain and make the thing work, is it ...
1
vote
0answers
34 views

Why can I only deploy approx. 3 smart contracts per minute with infura using Ropsten and Rinkeby

I have created a Dapp that is written in Solidity and compiled with Truffle on both Rinkeby and Ropsten. I have also created a frontend for batch file uploads and a backend for the actual deploying ...
2
votes
1answer
55 views

Recover public key from sign generated by AWS Cloud HSM - Golang

I am signing a transaction by using a private key in AWS Cloud HSM. But not able to recover the correct public key from the signature. Every time I try to run ECRecover method, it generates different ...
1
vote
0answers
19 views

How to connect 2 nodes without admin.addPeer()?

So, I started 2 nodes on my private net using geth, with custom genesis file, different port numbers, all how it was supposed to be. In one instance I added the admin.nodeInfo.enode of the other ...
1
vote
2answers
84 views

How to withdraw DAI from DSR (Oasis Saving Dapp / MakerDao) using the contract only, not the Dapp frontend?

I am currently testing the Oasis Saving Dapp by MakerDao (https://oasis.app/save). After converting some DAI to DSR, users can earn savings and whenever they want, withdraw their funds (convert back ...
1
vote
1answer
23 views

Geth list all javascript commands inside console [closed]

Need to know every single js console command inside geth like eth.syncing, eth.accounts etc... Can anyone brief into this?
1
vote
1answer
32 views

How to get web3 to interact with smart contract to input string info

Just cannot get what seems like a simple input from html page to interact with a very simple contract to input data. Started off trying to make this tutorial work: Interacting with a Smart Contract ...
1
vote
1answer
33 views

msg.sender.balance returns a strange number

From a JS web3 file, I am calling a simple function that returns the wallet balance. function readCustomerBalance() public view returns (uint) { return msg.sender.balance; } Works fine in Remix. ...
1
vote
1answer
25 views

Generating multiple deposite address for one account

I want to create something like a Crypto exchange, in which I need to generate different unique deposit addresses for each user, so they can send funds to their accounts while I can keep track of how ...
1
vote
1answer
26 views

What happens in a 50% Attack

I thik it is kind of clear to me that of 50%+1 attack, but now i am thinking about something that occurred when i was testing a DAPP in a two node network. Each node had a blockchain (the same ...
0
votes
1answer
19 views

How to call function from SmartContract?

I have a smart contract deployed having the following function. function getTime() public view returns (uint){ return now; } However, when I try to call the function like this. ("einstance"...
1
vote
1answer
16 views

How to change Ethereum default directory

Im trying to run geth attach on my console , i have already started a node , this is the script that i used : #!/bin/bash geth --identity "miner1" --networkid 42 --datadir "~/Desktop/Tutorials/...
3
votes
2answers
30 views

What is a good alternative to `ContractTranslator.encode_abi`

Since the ethereum Python library has been deprecated in May 2019, the ContractTranslator.encode_abi function is probably not the best way to turn Python argument lists into calldata strings. In ...
1
vote
0answers
19 views

Extra fee for cross shard transactions

I have been looking into sharding and I wanted to figure out how much extra fee or gas does a person needs to spend on a cross shard transaction compared to a transaction within a shard. What could ...
0
votes
1answer
19 views

DaoAttack not working

I am trying to replicate the famous DAO attack for a cryptocurrencies course. I have the following contract already deployed on the blockchain. pragma solidity ^0.5.4; contract EDao { address ...
1
vote
1answer
38 views

ERC 20 - very large balance created on a wallet

I deployed an ERC20 at this address: 0x60c56fb23dc18c719491759b6c40cd46e502fcbd One of the addresses I own got a huge balance (more then the token supply) couple of days back. The address is: ...
2
votes
1answer
23 views

geth clique block gas limit

I have setup new PoA network with default block gas limit to 3 billions. The network starts with configured limit. However, overtime the block gas limit reduce down to 8 millions. Is there a way to ...
2
votes
1answer
19 views

It is possible to run out of gas when calling bytes32[]?

Is possible to run out of gas when calling bytes32[], even when count e.g. 1k entries?
0
votes
0answers
18 views

How PPLNS pool reward system works?

I want to create my own pool where me and my bros can mine ETC (because it is not difficult) without fees. So, stratum and some others are done, only Front End and reward system left. I've checked ...
1
vote
0answers
38 views

Not able to populate my smart contract with data after deployment [closed]

I want to populate my smart contract with data. I am using truffle framework. In migrations file for the smart contract I'm populating the data but it is giving error: TypeError: instance.create is ...
3
votes
2answers
34 views

How does Ethereum prevents a node from mining a block with tempered transaction?

My question is rather simple, and I found this question in the Bitcoin StackExchange that somehow relates to mine, although, for the Bitcoin Blockchain, which I'm not sure if Ethereum solves the ...
0
votes
0answers
21 views

Add Two peer from two different machine into one machine

I have created three node on three different machines. I have used same genesis file for all three nodes. Here is my screenshots of nodes Node-1 Similarly, I have set up two more node on two ...
0
votes
1answer
25 views

How to send a private transaction using Quorum

I'm trying to send a private transaction using Quorum geth, but eventually got an error : Error: ether value is not supported for private transactions at web3.js:3143:20 at web3.js:6347:15 ...
0
votes
0answers
33 views

what is wrong with this token contract?

This one: https://etherscan.io/address/0xc12d1c73ee7dc3615ba4e37e4abfdbddfa38907e As you can see most of the last transfer fail, the transfer function is: function transfer(address recipient, ...
0
votes
1answer
16 views

Contract with a method to send received erc20 token to two different owner addresses

Was wondering if there is already an open source solidity code with method to sweep erc20 tokens received in contract address to destination address by calling an in-contract method such as "sweep()". ...
0
votes
2answers
43 views

Measuring deployment time of a group of transactions in a heavy load testing

I am currently trying to perform heavy load testing on a ERC20 token. My plan is to use truffle to test stuff like how long it would take for 500 transfer transactions to be deployed (on a private ...
0
votes
0answers
28 views

Geth automining includes only 1 transaction per block

I am trying to perform a heavy load and scalability tests on a smart contract. However, the test takes a lot of time because only 1 transaction is added per block. I read that this might be due to ...

15 30 50 per page
1 3 4 5 6 7 560