sp4c3
  • Member for 3 years, 10 months
  • Last seen more than 2 years ago
  • Pune, Maharashtra, India
1 answers
3 votes
628 views
Is there any difference between transaction hash and transaction receipt?
Accepted answer
4 votes

Yes, there is a difference between transaction hash and transaction receipt. First of all, a hash is a 32 byte hex string, where as a receipt is an object containing various information about that ...

View answer
1 answers
0 votes
1k views
TypeError: Return argument type bytes32 is not implicitly convertible to expected type (type of first return variable)
Accepted answer
3 votes

Just type cast your randomized result to uint256 uint256(keccak256(abi.encodePacked(block.difficulty,block.timestamp, players.length))) as keccack returns bytes32 output and you are returning uint256 ...

View answer
2 answers
1 votes
899 views
Soldity: += not compatible with int type
2 votes

Just type cast msg.value to int using int(msg.value).

View answer
1 answers
1 votes
258 views
Converting an address type variable to payable address type throws me error
1 votes

You must be using solidity 0.5 or above compiler, just declare destinationAddress as payable : address payable destinationAddress, then you can directly use destinationAddress.transfer(amount);. Also ...

View answer
1 answers
0 votes
43 views
Who Receives An Event?
Accepted answer
1 votes

Any event emitted in the smart contract is stored in transaction receipt object, and hence in transactionRoot tree. So yes, B will also receive the same event, as they share the same blockchain. But ...

View answer
1 answers
0 votes
1k views
How to call a function from deployed contract to another contract?
1 votes

contract 1 : Already deployed pragma solidity ^0.4.21; contract SaveData { uint a; function getA () public view returns (uint _a){ return a; } function setA (uint _a) ...

View answer
1 answers
-2 votes
8k views
ParserError: Expected '(' but got identifier function OrderItem(uint _itemid, string _itemname) public returns(address){
1 votes

You were missing a } in ManageCarriers as @Lauri mentioned, also you declared Owner in a struct and then you are initializing it independently in constructor, that is also an error. Also please format ...

View answer
1 answers
0 votes
372 views
How to specify node as a mining node or non mining node in geth
1 votes

It is upto you basically, if you don't want a node to mine blocks, don't start the miner in that node. If you want to start/stop mining, use miner.start(1) and miner.stop() respectively. To check if ...

View answer
1 answers
0 votes
555 views
Getting error : Error encoding arguments: SyntaxError: Unexpected number in JSON at position 47
Accepted answer
1 votes

Check your parameters, you are missing " at the end of first address, hence the error.

View answer
1 answers
0 votes
63 views
creating account on button click
1 votes

With web3, once you are connected to the desired node, execute newAddress = web3.personal.newAccount(password) on submit/ click. Of-course, the password, to be used in future to unlock account/ ...

View answer
1 answers
0 votes
63 views
Unable to sign a message on geth Console
Accepted answer
1 votes

Correct syntax for eth.sign is web3.eth.sign(address, dataToSign, [, callback]), you switched address and data, also make sure to give hex string or use web3.toHex for dataToSign parameter.

View answer
3 answers
1 votes
93 views
Public Key of existing wallet
1 votes

Public keys in ethereum does not hold much significance. Your account address is last 20 bytes of the hash of your public key and that is used for sending or receiving any transactions. But if you ...

View answer
1 answers
0 votes
568 views
Make a struct member optional when initializing struct
Accepted answer
0 votes

struct Petition { uint id; string name; string description; uint voteFor; uint voteAgainst; address[] addressOfVotedForUsers; address[] addressOfVotedAgainstUsers; ...

View answer
2 answers
0 votes
226 views
Returning all struct data of msg.sender in solidity
0 votes

pragma solidity 0.4.25; contract Notes { struct notes { string id; string content; address owner; bool isCreated; bool isDeleted; uint256 timestamp;...

View answer
1 answers
0 votes
76 views
How to map one to many
Accepted answer
0 votes

Contain owner's information in one mapping, where one variable can be an array of property Ids and create another mapping for each property Id to its relevant information. struct owner{ ...

View answer
1 answers
1 votes
577 views
How to query incoming transactions to an ethereum address via web3j?
0 votes

You can try this for upcoming transaction in latest blocks, even though I feel that the frequency of watch here is a bit high to use it in any application. var address = web3.eth.accounts[0]; ...

View answer
4 answers
0 votes
245 views
Owner is returned as 0x00
0 votes

Initially, your owner is 0x0000000.. because you have not instantiated it, but once you call owned from one of the accounts, you can see the result in owner variable is updated. And further you can ...

View answer
1 answers
1 votes
498 views
Node lags behind 100 blocks, states are finished syncing
0 votes

According to eth.syncing definition, it has not finished syncing yet, if it were synced up it would return false, and blockNumber for this node would be same as network. Also, all the states are not ...

View answer
2 answers
1 votes
38 views
Transaction's initial node
0 votes

I'm not completely sure about it, but if you are dealing with a private-net this should get you the desired result. You can get block number of any transaction using eth.getTransaction and then miner ...

View answer
1 answers
3 votes
2k views
Invalid address error
0 votes

I suppose this due to invalid checksum, your address should have a valid checksum, it depends on the lower/upper case of characters in address.Refer to this

View answer
3 answers
1 votes
2k views
How can I call a function in deployed contract on Ropsten Testnet when I don't have ABI and source code?
-1 votes

https://ropsten.etherscan.io/address/0x479955ee1b96bc0b6fff39317e567c373910e39f#code Replace "0x479955ee1b96bc0b6fff39317e567c373910e39f" with address of your contract, it will show you the source ...

View answer