New answers tagged

0

The "blockchain way" you refer to is unfeasible from a technical & cost perspective. Contract execution is triggered by external calls to the contract's functions; therefore, there is no straightforward way to listen for events within the contract. Even if you could listen for events inside a contract, such as a price variant, this would ...


-1

enode://a9a95b83e056f7e938331e6f2da4835b1d5a9af2e22dfedeab9e0b388a92698d9af419f557d22c349d09f82ad33d3b070ec6ab74b60787021738803369a9772e@62.171.150.91:30303[-1]/Export%20JSON%20File%E2%80%99d


1

So can I trust that all transactions in these blocks will be in the main chain? In a word (or two): not necessarily :-) I wrote a quick (dumb) script a while back to scrape data from Etherscan relating to chain reorganisations (i.e. ephemeral chain fork events). Running the script again, for the last 10 day's worth of blocks, gives: Forks of length 1: 742 ...


0

Do not use Ethereum, but use some other blockchain that provides faster block times. E.g. NEAR EVM shard can do sub-1 second blocks. You are still not going to see millisecond times, because of the limit of light speed. The blockchain must stay synchronous around the world.


0

There are two basic ways how to reference a contract: either by using the new keyword or without it. The difference is that when you use the new keyword, as new contract instance is created at a new address. Without new, an existing contract is used and you need to know its address. If the two contracts are really in the same file, then you can simply use ...


0

If your requirement is: detect if someone "connected" or "disconnected" from my App the methods connect and disconnect you are trying might not help, as they are intended to know if your connection to the blockchain is available or not (for instance, when a user already connected tries to launch a transaction but the RPC connection is ...


0

If you see ethereum then infura does provide the WebSocket URL as in the screenshot below. I am then instantiating web3 with this Websocket URL. But I tried searching such Websocket URL for ETC but couldn't get the one. That's why it's really frustrating. With this now I can listen to the ethereum smart-contract events. I want to do the same in ETC contracts....


0

Short answer: "no". Long answer: Any valid Ethereum address can receive Ether via transactions, even if the private key is not known/not yet found. Any valid transaction can be injected via any participating node in the network.


2

Short answer: no idea. It's not a functionality of the blockchain protocol. It's a functionality in the client nodes. So the Ethereum itself doesn't care how people interact with it, as long as the data is valid. The clients provide the means for users to interact with the blockchain. So it depends on the client implementation. Unfortunately I have no idea ...


1

You can get ABI json from etherscan API like below. var Web3 = require('web3'); var web3 = new Web3(new Web3.providers.HttpProvider()); var version = web3.version.api; $.getJSON('https://api.etherscan.io/api?module=contract&action=getabi&address=0xfb6916095ca1df60bb79ce92ce3ea74c37c5d359', function (data) { var contractABI = "";...


Top 50 recent answers are included