All Questions

1
vote
1answer
24 views

Can I avoid manually changing code from solidity 0.4.17 to 0.5?

I'm totally newbie in blockchain programming and I have a situation: I have to continue the project written on truffle framework with solidity version 0.4.17, the problem is that I couldn't manage to ...
1
vote
1answer
14 views

onERC721Recieved implementation

As per the ERC721 requirements, I have to implement onERC721Recieved. This is how I did it: function onERC721Received( address _operator, address _from, uint256 _tokenId, ...
0
votes
1answer
21 views

should I use server side rendering(Next.js) for a dapp?

Recently I have been studying a lot about dapps and now working on a little complex one. So what I wanted to ask is which is better for a dapp ? SSR or CSR ? I have read in a couple of places that we ...
1
vote
1answer
48 views

Geth interface panic after weeks of being in sync

After weeks of being in sync and working fine, my Geth just stopped. Upon restart, what started as a long hang on FS Sync Time (repeat output with different values, no further movement beyond ...
0
votes
0answers
21 views

Uncaught (in promise) TypeError: rentalInstance.carsCount is not a function

I am beginner in writing Dapp. I am writing with truffle and solidity. Rental.sol pragma solidity ^0.5.0; contract Rental { // address[16] public rentals; // address public owner; ...
3
votes
2answers
48 views

Can we do ethereum transaction for free on private blockchain

I am very new to ethereum Blockchain. Please give some suggestion regarding one query regarding gas fee. Can we do ethereum transaction and smart contract deployment for free on private blockchain ...
1
vote
1answer
29 views

Infura - Signing transactions in a multi-user application

I hope this question is not a duplicate. Since I'm using Infura as a full node, I need to send raw transactions by signing them. In a multi-user application how would my application on the server-...
0
votes
1answer
33 views

is there any way to save data from sensor on smart contract automatically?

I want to take the temperature value from one sensor on save it on the contract of manually , i tried to use node-red , or raspberry pi but i didn't get a good result. the second question is it ...
4
votes
1answer
22 views

Is pre 0.5.0 keccak256(a,b) equivalent to post 0.5.0 keccak256(abi.encodePacked(a,b))?

In pre 0.5.0 Solidity if you wanted to hash a some set of data you would do keccak(a, b, c). Post 0.5.0 keccak only takes 1 arg and it is suggested to use keccak(abi.encodePacked(a,b,c)) instead But ...
3
votes
3answers
105 views

ERC721: How to get the owned tokens of an address

There is a balanceOf function, but it only displays one uint (the token identifier) I see most ERC721 tokens doing this so I am confused on how to view all owned tokens.
1
vote
0answers
24 views

metamask and infura - Managing and signing with private keys

I am using Infura as a node for my DApp so I need to send raw transactions by signing them. These transactions can come from multiple users of an application so each user must sign and send a raw ...
0
votes
0answers
13 views

JSON RPC get this error “Request have return error: gas required exceeds allowance or always failing transaction”

i'm trying to do a simple transaction for a token but i keep getting following error for estimate gas limit : "Request have return error: gas required exceeds allowance or always failing transaction" ...
-1
votes
2answers
33 views

What is deference between wallet address and account address?

I'm new in Ether world. I want to make mini Crypto exchange site with 2 coin ETH and BTC. What is deference between wallet address(maybe It's called Main Ether address) and account address ? or it's ...
2
votes
1answer
26 views

How to add new EIP and how are they numbered?

Hi I have a question to community. How do I add a new EIP? Also, how are the EIP numbers allocated?
1
vote
2answers
25 views

Best way to delete element of a dynamic array without knowing the index

I have this mapping mapping(bytes32 => address[]) public authorisation; This maps a hash with a list of authorised users. I have a function to add, and confirm - these work and its not an ...
0
votes
0answers
10 views

Contract internel transaction and parent hash detail of transaction using web3 Api

I am working on making explorer like etherscan using web3 in this link "https://etherscan.io/block/7378232".7 contract internel transaction and the click any transaction parent hash you see the detail....
0
votes
0answers
18 views

The transaction block is getting added to the block chain But transaction is getting failed to execute. @lauri Peltonen [closed]

After update, we are trying to send eth/erc20 token from main wallet to other wallet The transaction block is getting added to the block chain But transaction is getting failed to execute. I am ...
0
votes
2answers
28 views

How to increment a solidity variable using a function

i want to count every time that i call the function , i tried to increase the number by every time that I called but it doesn't work , it always gives 1 . function getdeployedcontracts () public ...
0
votes
0answers
26 views

I am working on a smart contract. I am getting the following error while running the smart contract in the browser console

Uncaught (in promise) ReferenceError: TruffleContract is not defined at Object.loadContract (app.js:55) at async Object.load (app.js:8) here is my code of app.js file App = { ...
0
votes
0answers
12 views

Can I avoid metamask popups with calls to a server-side js script in order to pay for transactions?

I have a dapp that allows a user to input some info via the GUI, and this info is stored to the blockchain(testnet for now) when the user presses a button. This naturally incurs a cost, which causes ...
0
votes
1answer
21 views

Web3: web3.utils is undefined

I am kinda new to Ethereum and Web3 so I am trying to implement the Ethereum: Building Blockchain Decentralized Apps (DApps) tutorial. I have already installed web3 and web3-utils. npm view web3 ...
2
votes
1answer
12 views

Rinkeby SSTORE GAS

I am checking the OP codes of a function (smart-contract), in Rinkeby. In my implementation there are 6 SSTORE op. - 4 of them, have 5000 GAS. - 2 of them, have 200 GAS. 5000 GAS is justified, based ...
1
vote
2answers
15 views

How to convert smallest unit of ERC20 with less than 18 decimals to full coins without rounding errors?

I can just use web3's fromWei function for all token that have 18 decimal places but I'm not sure how to convert token to full token without having to worry about rounding errors. For example convert ...
1
vote
3answers
17 views

Is there anyway to seize an account from smart contract?

I creating a smart contract for manage loans and I am searching some way to make me sure when the borrower defaulted pay back the loan, seizing some percentage of ether from the guarantor's account. ...
0
votes
2answers
19 views

does we need 6 blocks confirmation using ethereum poa network?

when working with poa ethereum network, does we need to wait 6 blocks to be confirmed? I am implmenting a private network, and I want to know if is it possible to has a fork inside the chain
1
vote
1answer
18 views

In-line assembly error

I am checking if an address is a smart contract. Similarly to many articles and example-codes out there, i do this within my function: uint32 size; assembly{ size := extcodesize(_to) } if(size &...
0
votes
1answer
30 views

Solidity events and its's necessity

I don't understand solidity events at all. For example: https://rinkeby.etherscan.io/address/0xc5a79064168c0aa3706c33d70b94a09103e9656b#events Some events show its names, others show methods without ...
0
votes
1answer
11 views

Truffle, getPastEvents synchronously

I try to check that a total of 4 events have been emitted by my contract instance. Next code will fail in the assert.equal line since getPastEvents will process the events in a callback and so the ...
0
votes
0answers
10 views

IPFS dynamic content

Can my users store dynamic content on IPFS and how that will reflect on my dapp, what will happend when everytime user can update the state of the app. How this will reflect it? Imagine something like ...
-1
votes
1answer
28 views

Blockchain usage in smart home

I am currently gathering information for my thesis about smart home implementaton with a use of blockchain. The blockchain usage is a requirement from my thesis supervisor and I have huge problem with ...
0
votes
0answers
13 views

get error code of “uint64 overflow” when create contract

when create contract in statedb, i get error code the error is gas uint64 overflow, the code data is not much and i just give it little gasprice, the code is following: func NewContext() vm.Context { ...
6
votes
1answer
91 views

Deploying contract with no cost (gasPrice 0) on private network

In order to achieve a no-coin bootstrapping of my private network I'm trying to deploy a first special contract having zero funds in owner wallet (every wallet of this private network should have zero ...
0
votes
0answers
8 views

How to create a signed ethereum transaction between two wallets using JSON rpc in a CURL command?

I am new to blockchain. I created 2 wallets using MyEtherWallet. When I use MyEtherWallet to create transactions to transfer Ether between these two wallets (on testnet), it works. I now want to ...
0
votes
0answers
17 views

Couldn't open browser

preetam@LAPTOP-84LFN4UL:~/kyc-ethereum-dapp$ npm run dev pet-shop@1.0.0 dev /home/preetam/kyc-ethereum-dapp lite-server ** browser-sync config ** { injectChanges: false, files: [ './**/*.{html,...
2
votes
2answers
46 views

Is it possible to implement the essence of smart-contract into another one before deploying the first one?

My question means for example that the primary contract stores names of secondary contracts, for example like this: mapping (address => string) secondaryContractNames; I know we can in the ...
0
votes
1answer
42 views

Multi token transfer issue [closed]

In exchange contract,With multi token when I call approve function from exchange contract, nor my address and spender get approved. Instead only the exchange address and spender gets approved. Its ...
0
votes
1answer
17 views

Original genesis.json file for ethereum mainnet, which should have 314 accounts allocation?

314 accounts are created at the start of ethereum frontier release and some funds were alloted to them. https://www.etherchain.org/charts/totalAccounts where can I get the genesis.json file used to ...
1
vote
0answers
14 views

How to retrieve private key

when an account is created using web3.eth.personal.newAccount(password), it will give u the account address but not the private key. How to get the private key of that newly created account. Can ...
0
votes
1answer
21 views

How to set up Quorum Blockchain?

I have read a lot about Quorum blockchain. My goal is to run and test it. I have found many articles. Could anyone suggest me good start-up articles for setting-up the Quorum on a number of nodes and ...
0
votes
1answer
26 views

AssertionError: amount did not match: expected {} to equal 1000000000000000000

Truffle v5.0.5 (core: 5.0.5) Solidity v0.5.0 (solc-js) Node v10.15.1 const ApprovalContracts = artifacts.require('../../contracts/ApprovalContracts.sol'); // Pulls in my smart contract // the ...
0
votes
2answers
18 views

No such file or directory: 'solc': 'solc'

I have been trying to follow the following tutorial [https://github.com/adamyala/Your_First_Decentralized_Application_Python] But the following error occurs: I have followed all the steps in ...
0
votes
0answers
49 views

How can I store every credit or debit card payment transaction on an Ethereum blockchain? [closed]

pragma solidity 0.4.25; /** * @title SafeMath * @dev Math operations with safety checks that throw on error */ library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ ...
2
votes
1answer
13 views

What is the alternative to using **label** in solidity inline assembly code?

What is the alternative to using label in Solidity inline assembly code? Label is deprecated in new version.
0
votes
0answers
19 views

ERC721, approveForAll-implementation, and others

I am currently implementing ERC721 as the standard for token-exchange in the game I am programming. I am taking inspiration from the CryptoKitties-smart contract. One thing I have realized, is that ...
0
votes
0answers
6 views

Should Ethereum wallet need to be imported to a node to send eth from it using CURL JSON rpc?

I created 2 wallets using MyEtherWallet. Noted down the private key, public key pairs. If I then use one of the wallet's public key as the from address and the public key of the other wallet as the to ...
2
votes
1answer
17 views

Invalid implicit conversion from uint256 to bytes memory requested

I am trying to create a simple random function but it gives me an error. I can't figure out what I do wrong. Solidity 0.5.0; function random() private view returns(uint){ uint source = ...
0
votes
1answer
10 views

Activating ether wallate [closed]

I want to activate my ether wallate. I need deposit $2 for that. I want the name of exchanges available in India who can help me to activate my wallate.
0
votes
0answers
10 views

Event - Filtering a BigInt (or a BigNumber)

I am trying to filter on a BigInt for an event (the number can fit in a uint256). I keep getting an error Error: invalid number value This is what the code looks like.. { filter: {fromID:BigInt(...
0
votes
0answers
10 views

Parity node failing

I am trying to setup a dev parity node, but it is failing with the error, Loading config file from config.toml. Cannot create a file when that file already exists. (os error 183) My config.toml ...
1
vote
1answer
27 views

How to compile Solidity ^0.5.5 contract with Node.js?

I am terribly new in Solidity and now I try to learn how to compile a contract in Solidity ^0.5.5 (No versions below). I have the contract as follow (UsersContract.sol) pragma solidity ^0.5.5; ...

15 30 50 per page