We’re rewarding the question askers & reputations are being recalculated! Read more.

New answers tagged

2

What is the meaning of stipend if transactions are always have gas limit set by sender? Not really. When EOA calls contract A, the gas limit is set in the transaction, this is true. However, when contract A calls contract B, contract A may set limit on how much gas the contract B is allowed to spend. This limit may be lower than the remaining gas ...


1

The stipend is 2300, not 23000. A scenario where this stipend is not enough: Changing a state-variable from zero to non-zero.


0

You just have to trust the contract. The idea is that contract's code is public (byte code, I mean), so everybody may analyse it and decide, whether to trust it. The reality is that byte code is unreadable, so people anslyse source code instead, and then ensure, that compiling that source code produce exactly the same byte code as published on chain (here ...


0

Thanks for that quick response. I would like to clear my question. Suppose for this transaction: https://etherscan.io/tx/0x89221691a67b15427c97f1fd0cd65966ff617728cd897be27d88a04ee0bc1e2d Ether is being transferred via Contract. All I get to know from the contract's event list is that the event Transacted was emitted. I want to be sure about the authenticity ...


0

I'm a bit unsure whether you really mean Ether transfers or (ERC20) token transfers. Ether transfers don't emit any events (unless some contract happens to emit upon receiving Ethers). If you transfer Ether between EOA (Externally Owned Account) without contracts there will certainly be no events emitted. So let me provide an answer for both cases, just in ...


0

Short answer: If you want to transfer ether based on some condition, define your criteria and you can use one of the following methods inside a payable function: address.send(weiToSend) address.transfer(weiToSend) address.call.value(weiToSend)( ) You can read more about the above methods here and here. If you are new to smart contracts, there are a number ...


1

I Personally used the 2nd option enumerated by KanekiDev. When you start the console the first time the chain configuration is loaded from the genesis.json file, the best way is set a lot of eth in the alloc section: { "config": { "chainId": 15, "homesteadBlock": 0, "eip155Block": 0, "eip158Block": 0 }, "difficulty": "20", "gasLimit": "2100000", "alloc": {...


0

Here is my solution in C# (Nethereum): var contractABI = @"[{""constant"":true,""inputs"":[],""name"":""getBalance"",""outputs"":[{""internalType"":""uint256"",""name"":"""",""type"":""uint256""}],""payable"":false,""stateMutability"":""view"",""type"":""function""},{""constant"":false,""inputs"":[{""internalType"":""address payable"",""name"":""_to"...


0

You can not use Solidity. That is solely the language to write smart contracts in. You have (at least) 2 options: web3.js If your C# dApp has a browser based frontend you can use the library web3.js. A possible call in your JavaScript code would look something like this: const receiverAddress=""xxx; await MyFirstContract.methods.send(reveiverAddress).send(...


0

What makes a coin to be a stablecoin is an ability to exchange it for certain amount of underlying stable asset (fiat currency in your case), and people's trust that this ability will persist in future. If your stablecoin is to be implemented as ERC-20 token on Ethereum, then the token smart contract does not need to have any special functionality. Just ...


1

This error happened because, in this case, S has leading zero bytes R: 4f 9d d7 50 69 b5 1d 36 .... S: 00 44 28 04 75 c3 d3 55 .... ↑ not allowed while RLP decoding While decoding, geth treated R & S as integer, meaning leading zero is not legal to process. In order to solve this issue, you simply have to remove leading zeros and RLP it. you ...


1

Short answer The issue is in the line where you try to transact with the function. You should not be invoking call() before transact(). The following modification should fix it: tx_hash = contract.functions.send(address, 5).transact({"from": config.ADMIN_ADDRESS}) Explanation Given the wording of your question I think you maybe be unclear on the ...


1

A contract can't recieve funds by dafault. To make it possible you need to add a payable fallback function to the contract code. It should looks like this: function () external payable {}


0

Using the Ethereum Public Dataset and Google BigQuery, I was able to find my answer : #standardSQL -- MIT License declare stamp TIMESTAMP default (SELECT MAX(block_timestamp) from `bigquery-public-data.ethereum_blockchain.traces`); with old_double_entry_book as ( -- debits select to_address as address, value as value from `bigquery-public-data....


0

Create an account on blockchain using web3swift With Private Key let password = "web3swift" // We recommend here and everywhere to use the password set by the user. let keystore = try! EthereumKeystoreV3(password: password)! let name = "New Wallet" let keyData = try! JSONEncoder().encode(keystore.keystoreParams) let address = keystore.addresses!....


1

how can i automatically generate bunch of eth accounts and export heir private key? You can generate eth account with private key using web3 API like: web3.eth.accounts.create()(demo code) how can i check for deposit/transactions in that address You can do this using RPC calls, using Etherscan API. By using below api you can get all transaction done by ...


0

First, switch network to another network and try to reconnect again to ganache network(http://127.0.0.1:8545). Make sure While you connecting to matamask using ganache, you have set up a connection like below : Then you need to import accounts in metamask using private keys provided in ganache. You can see I already imported account that is ...


2

You need to use Ethereum Public Dataset and Google BigQuery. This is Ethereum blockchain data picked be Google on daily basis and saved into cloud data warehouse. The data is available for everybody to query. Here is an article that one could use as a tutorial for writing BigQuery requests to Ethereum dataset: How to Query Balances for all Ethereum ...


Top 50 recent answers are included