All Questions

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

Two smart contracts interact can't pass value when I using web3.js

I have two different smart contracts interaction_1 and interaction_2 I input the data(team) from remix ide. What I want to accomplish is when user input team in user_input function at interaction_1,...
0
votes
0answers
11 views

subscriptions in Geth or Parity

I am trying to get the way to register subscriptions to events, with the services of QuikNode I can do it without problem and it is working perfect, but I am trying to raise a node --light with geth ...
1
vote
1answer
56 views

Why doesn't Raiden release channel capacity immediately when routing fails?

In the current implementation of the Raiden protocol, when a payment routing fails after some transfers, the already made hash time locks are left there until they expire. This consumed the channel ...
0
votes
1answer
13 views

Connecting to Rinkeby using Infura and calling a state-changing function from smart contract

So i have trouble using a smart contract on Rinkeby through infura as it gives an "extra-data" error, which as far as i have read, is due to Rinkeby being a POA testnet. There are suggestions of using ...
0
votes
1answer
13 views

In ethereum network how data structured and is every data stored, is public?

Let's say, 3 companies are using ethereum network. Company A Company B Company C Company A put some data, block01 and block02. So ethereum network looks like, Genesis Block -> block01 -> block02 ...
0
votes
0answers
36 views

How to print the value of a Struct ?(mapping)

If the set function receives two inputs 1.["0xca35b7d915458ef540ade6068dfe2f44e8fa733c",50,"ROC","park"] 2.["0x14723a09acff6d2a60dcdf7aa4aff308fddc160c",60,"AU","school"] How do I display the ...
0
votes
0answers
26 views

not able to assign address to a public property using web3

while everything is working fine when working on remix ide but on truffle its not updaing value of a property (player2) i am also returning that address value and its returning as it should be. but ...
1
vote
1answer
15 views

divide ethers to current token holders only

My task is to divide the dividend sent by owner to the contract to the current token holders.The token holders can come later and redeem their pending amounts, the important point here is that, when a ...
0
votes
1answer
16 views

what will happen to blockchain industry in India if cryptocurrencies are banned?

According to recent article India is very sure of banning cryptocurrency and most of the blockchains working today use cryptocurrency, so what will be there future as I am interested in blockchain ...
1
vote
2answers
35 views

What should I prepare for the coming ETH 2.0 upgrade as a Dapps developer?

As announced, Ethereum is expected to be its upgraded version Eth2.0 probably from 2020. There will be several upgrades like PoW to PoS/Casper FFG eWasm integration sharding (Casper CBC) These ...
0
votes
2answers
50 views

Ethereum smart contract require function

I have one question about the "require function" of smart contract. Function is as following, function set(uint currentTs) public { require(msg.sender == owner); ts = currentTs; } I'm not ...
0
votes
1answer
24 views

How to transfer ERC20 tokens from an account to a contract?

I'm struggling to transfer my ERC20 token toward a contract address. My code is like this. What's wrong with my code? the code is like this. Contract A{ function deposit(uint amount) public { ...
0
votes
1answer
15 views

What can you change and adapt when you create an Erc 20 token?

I saw this list of things that can be modified for your token. I can't find it but it listed all the different uses and things that can be changed about your token such as the max supply etc.
0
votes
1answer
33 views

library modifying string vs string literal

I have a library which has the following function: function strConcat( string memory _a, string memory _b ) internal pure returns (string memory) My contract implements the library ...
0
votes
3answers
43 views

Can we add custom data in ERC20 token?

Is there any way that we can add hex data in ERC20 transaction? Let s say we want to keep track of why we send the token and other detailed information. How can we achieve that?
0
votes
1answer
16 views

How do you get casted uint division to work like literal division?

How do I get testDivCast() to return the same result as testDivLiteral()? pragma solidity ^0.5.1; function testDivLiteral() external pure returns (uint16) { return (1 / 5) * 100; } // ...
0
votes
0answers
36 views

Can not tranfer eth with solidity and web3js

Error when I try to send eth from fontend react to smart contract and from contract I tranfer eth to another address but it error, when I try it in remix then it total work. I user web3js to call ...
2
votes
0answers
34 views

Creating new accounts using `web3`

In the new version of web3.py, the personal.newAccount functionality has been retained only for the geth client. What is the right cross-client approach to creating new accounts? See v5 migration ...
0
votes
0answers
21 views

Contract can't import remote repository locally

I made a compiler script that takes all contracts in folder ./contracts/ and produces a .json for each contract, containing an ABI and Bytecode. This worked fine for a while. However, I added some ...
0
votes
0answers
14 views

ethereum deposit notice(hook)

I want to detect that someone sent coin to my wallet. (ethereum deposit notice(hook)) I will use web3 api. The easiest way is to search the latest blocks for my address. I don't think it's an ...
1
vote
0answers
27 views

When I call tranfer_from function, remix saids gas limit exceed

I am owner of the token contract, And when I call transfer_from() function, remix saids gas limit exceed. my gas limit is 300000. this is same contract, and call transfer_from() successfully. "https:/...
0
votes
0answers
18 views

Error based on inheritance and dependency between contracts (Using EternalStorage contract)

I have been using EternalStorage contract with my contracts for the storage purpose. Now the structure is some like this: Eternal Storage <- Contract (A) <- Contract (B) <- Contract (C) Now ...
0
votes
0answers
18 views

Is Gas consumed in boolean operations that do not change contract state?

Imagine I've created a voting contract, and I'm the owner of this contract. I'm going to deploy it and create a front end to interact with it. Within my contract i've everything secured to add ...
0
votes
0answers
11 views

Parity isn't doing anything- hasn't even started syncing as far as I can tell

I'm sorry for what must be a common question around these parts, but I'm getting nowhere fast with parity. I ran this command: parity --warp-barrier 8460000 --no-ancient-blocks And after 24 hours ...
0
votes
0answers
26 views

Geth web3.eth.contract returns null

I understand that the way I'm doing this is a bit backwards, but I cannot install node.js onto our server, and we are using a PHP backend which doesn't have very good Ethereum support. I am trying to ...
0
votes
1answer
17 views

How a contract notifies its event listener when an event trigged?

It's confusing for me about how the event listener obtains event in time. Does it mean the listener APP(web3 code) keeps online and just waiting for notificaiton from the contract generating event, ...
0
votes
0answers
18 views

Is there any for a contract A to directly read the value of another contract B , while B doesn't necessarily have any getter functions

The following codes is a function of contract B, how can a contract A get these values such as balance[from], balance[to], balance[msg.sender] as efficiently and directly as possible in contract B ...
1
vote
1answer
54 views

What is DeFi decentralized finance?

What is DeFi? What are its core components? How to think about or picture "it"? Some of the parts are tokens, stablecoins (tokens with specific properties to reduce its volatility), and exchanges, ...
2
votes
0answers
11 views

Question on initial sync and Freezer (SSD and HDD)

I've kicked off a fresh fast sync of Geth v1.9.2 and after 3 weeks it's still pulling states (state trie). As per the documentation you can use the Freezer with a HDD as it references old data so ...
0
votes
2answers
21 views

Should I include all public and view functions under contract ERC20Interface?

Should I include all public and view functions under contract ERC20Interface, why or why not ?
0
votes
1answer
21 views

Difference between a.add(b) and a+=b as well as a=a+b?

For example, if I have: balances[from] -= tokens; balances[from] = balances[from]-tokens; balances[from] = balances[from].sub(tokens); What is a difference and why should I use one rather than the ...
0
votes
0answers
14 views

Is Geth and Parity a threat to decentralization?

They make up nearly 80% of all clients. If they wanted to, could they rearrange blocks and mess the blockchain up? Are they a threat of decentralization?
1
vote
2answers
30 views

What is the best way to report scam/fraud token

Recently I've bought small amount of some token with good overall idea as it seems for the first look. Then I go deeper to the source code and found that product is fraudulent, with differences ...
1
vote
2answers
34 views

I Call SmartContract Token ERC20, Why Show Hashing Output ? (Web3 + Metamask + Javascript)

I do not know why with this, even though in the previous version (web3 + Metamask) can issue real data. But now used as hashing (output). I took the example in the code and output below (to get the ...
0
votes
0answers
19 views

Etherscan API, the input field value of erc20 transactions is always deprecated?

I used to use ABIs to decode the input field of token transactions. I notices recently that the input field has always the value deprecated. You can try the example provided in Etherscan API page: ...
0
votes
1answer
47 views

Contract Fallback function with ERC20

I see the fallback function of a contract as a way of "depositing" an Ether value to the contract. My question is very simple I guess, but I couldn't find the answer yet. Is it possible to develop a ...
0
votes
0answers
20 views

Making difficulty static - Geth

I made a setup for a private PoA network with geth. Everything works fine, regarding mining, making transactions, connecting through http and websockets. Now I need to optimize transaction time, I ...
0
votes
1answer
66 views

How to loop an array and store values in another after if conditions

I am trying to do something that I believe it should be simple enough. I want to make a getter function iterating a struct array find the min value and the values that is equal to this minvalue of a ...
0
votes
0answers
17 views

How to get my private key from keystore file for creating raw transactions Web3.js [duplicate]

I am trying to get my Ethereum private key, so that I can create raw transactions to broadcast through infura. Currently, I have a keystore file that was created with Geth, but this is not directly ...
1
vote
0answers
8 views

Can we add block reward contract in parity aura latter on

We know there is an option to add a block reward contract to incentivize authors of new block by using blockRewardContractAddress at chain engine specs. Is it possible to add this property in the ...
0
votes
1answer
34 views

web3 - web3.utils.toHex zeros length

I'm trying to send 12 integer as bytes to a contract function. If I use web3.utils.toHex(12) the variable will become 0xc The problem is that when contract function parses bytes, it reads uint256, ...
0
votes
1answer
25 views

Web3.py cannot connect to geth --dev node via IPC

I've launched a geth client over IPC: geth --dev --allow-insecure-unlock --ipcpath ipc://$HOME/Library/Ethereum/geth.ipc And trying to connect using a Web3 IPC provider: my_provider = Web3....
0
votes
0answers
26 views

web3 update monitoring

Inside a DAPP, I have been using web3.currentProvider.publicConfigStore.on('update',... to monitoring Metamask activity. But in the new metamask-mobile such method does not exists. There is a ...
1
vote
2answers
29 views

ERC20 not recognized by TokenTracker

I have deployed ERC20 with reference to // File: openzeppelin- zos/contracts/token/ERC20/DetailedMintableToken.sol I called the initialized function with owner, name, symbol and decimal value. ...
0
votes
1answer
15 views

Geth + Web3 | web3.eth.getAccounts() returns undefined

I have follow this SO answer for sending ERC20 tokens from 1 address to another. I am running into an issue where I am receiving an error that my from address is invalid Error: Error: ...
0
votes
1answer
23 views

Combine BytesX and BytesY to create BytesZ?

I am working on a Solidity Smart Contract (^0.5.10) where I want to return an array of Ratings elements. struct Ratings { address restaurant uint8 score }; Since returning Rating[], string[]...
1
vote
1answer
24 views

How to call a function with params and check them

I want to create a smart contract that users can send a number to and receive an amount of ether. function airdrop(uint val) public payable { require(airdrop == true); if (val == 0x31){ ...
0
votes
0answers
28 views

How to connect to MetaMask via web3js

I'm trying to recreate this site TenThousandSu And this is the smart contract I'm trying to call https://rinkeby.etherscan.io/address/0x7e338acfb7a5d7e99f4225cc12dc884f49c00f6a#code I'm using "1.0....
0
votes
0answers
16 views

What is the limit of IPC in Geth?

What is the maximum size of the IPC file in ethereum? Are there any way to increase its size?
0
votes
0answers
25 views

web3.utils.toHex but combined, hex concat?

I'm currently working with bytes in Remix. The goal I wanted to achieve was to put variables into bytes in one function, copy bytes, paste bytes to another function as a parameter and unpack these ...

15 30 50 per page