A message from our CEO about the future of Stack Overflow and Stack Exchange. Read now.

New answers tagged

0

It worked for me following this code.. function approve() external payable{ require(msg.sender == approver); address(uint160(receiver)).transfer(address(this).balance); }


1

Your question indicates: Total cost in wei units = 67123160000000000 Gas price in wei units = 20000000000 This implies that the amount of gas required is 67123160000000000 / 20000000000 = 3356158. This amount of gas should be identical on every network (assuming that you're using the same compiler in order to generate the byte-code which you are deploying)...


0

There are lots of different ways you could manage writing this data to ethereum. Depending on how big your JSON files are / how many json files you'll need to publish, this is a potential solution. Deploy the contract below and transact with the writeJsonFile to emit JSONFileEvents from this smart contract, these events will be stored in the blockchain and ...


0

If you are using js, you can use ethers.js or web3.js to interact with the smart contracts when certain functions are needed. Centralized Solution For a basic, centralized implementation (assuming an ERC20 smart contract has already been deployed and tokens have been minted / distributed) you and your users would interact with the transfer function. On ...


1

Everything (no exceptions) starts with a transaction signed by an externally owned account (EOA). Signed transactions are sent to the network and included in a block. Blocks establish the canonical transaction order. (Peer discovery, gossip and mining.) Ordered transactions are processed by nodes as the blocks arrive. To deploy that contract, first, it is ...


0

The code you pasted is code for creating a smart contract. So that is a program running inside the Ethereum blockchain and users of the blockchain can interact with the smart contract. Everything the contract does happens inside the blockchain. Now if I just copypaste that code (or any other code to create a smart contract) to some editor it obviously is ...


2

To be specific there is no need to query the blockchain. Read operations (from view or pure functions or to read a variable's state) can be executed locally in your local node as they don't modify the contract's state. So the query is never sent to the blockchain and the result is immediate. Otherwise both options are possible but my guess is that it simply ...


Top 50 recent answers are included