Raghav Sood
  • Member for 3 years, 10 months
  • Last seen more than a month ago
Reject TransferOwnership Smart Contract Solidity
Accepted answer
0 votes

It is not possible for an address to refuse being used as the owner in another contract. Moreover, the "attack" you described will not work, as a contract is not able to magically take ether or ...

View answer
How to transfer tokens from Contract to Contract Creator?
Accepted answer
0 votes

You're currently assigning them to the contract. Just update the following lines in the contract: balances[msg.sender] = INITIAL_SUPPLY; emit Transfer(address(0), msg.sender, INITIAL_SUPPLY);

View answer
Is transaction written into block even if it failed?
Accepted answer
0 votes

If the transaction failed to be validated or out of gas, the transaction will not be written into block and gasPrice * gasLimit is wasted. This is incorrect. A transaction that runs out of gas, or ...

View answer
The contract code couldn't be stored when deploying to rinkeby
Accepted answer
0 votes

Your failing transaction is using 4700000/4700000 gas, which likely points to an out of gas situation, which is supported by : having a contract deployment take such a perfectly round amount of gas ...

View answer
Capture Solidity Emit Events without Web3 -- E.g., Calling via Postman
0 votes

Web3 is simply a convenience tool. You cannot capture emitted events from a simple sendTransaction, since events are only emitted once the transaction is mined. You do, however, get the transaction ...

View answer
Difference between creating contract with and without using new
0 votes

In the first scenario, each time you call B.get(), you will deploy a new instance of A. If you call it 10 times, there will be 1 B contract, and 10 A contracts. In the second scenario, contract A is ...

View answer
Is transaction triggered by web3 secure on the internet?
Accepted answer
0 votes

On this case, Do I have to sign the transaction using private key on the private business server. right? That would be the ideal scenario. You could technically restrict your public node's RPC to be ...

View answer
How to save a number as bytes16 in a smart contract and retrieve the number in javascript?
Accepted answer
0 votes

You need to left pad it. When you pass 0xd80, it is getting right padded as part of the encoding process (to take up 16 bytes). let argument = "0x" + web3.padLeft("d80", 32); This should give you ...

View answer
How does geth communicate with other nodes to sync ?
0 votes

In most set ups, even when ports are closed, the responses for outgoing connections are allowed through. When started, geth contacts a series of bootnodes to retrieve a peer list. It will then reach ...

View answer
How to trace token transfer that may contained in contract inner transactions
Accepted answer
0 votes

You don't need to do anything special. These type of bulk sending contracts will still emit the regular ERC20 standard Transfer event. All you need is a program that searches for these events in ...

View answer
Contract A has a function that depends on Contract B's state. How does concurrency work for these two contracts?
0 votes

You are correct in the two scenarios depending on the order of execution. This is known as a front running attack, and many ERC20 token's approve functions are vulnerable to it: https://blog.smartdec....

View answer
How can a history of addresses that have owned an ENS name be read on a block explorer?
Accepted answer
0 votes

Etherscan allows you to view the newOwner events. You could likely pull data from there, or filter the events on your own node to build a block-by-block ownership log.

View answer
Accessing older blocks from Geth: Returned error: missing trie node 94d34
0 votes

You will need to add the --gcmode=archive option to access arbitrary historical states. This will require a resync of the chainstate (although I think there's a way to get it to do that without ...

View answer
Parity all pending transactions (not local)
-1 votes

pendingTransactions will only return the pending txs for your addresses. If you want to get all unmined transactions on the node, you want the txpool_contents API.

View answer
Can someone share your geth export file with me?
-1 votes

A fast sync will finished faster than importing a geth export file. An exported blockchain must be processed block by block on your node to build the state trie, whereas a fast sync will build the ...

View answer
1 2 3 4 5
6