New answers tagged

0

https://github.com/MOACChain/moac-core/issues/24 signed r and s need to clear leading zero bytes


2

As of December 2019 at least, it doesn't seem possible to do this. Read this discussion on Twitter for more details. The best option is to chain the promises, as Ismael suggested in the comment above. createTokenApprovalTx().then(() => createFooTx());


0

If you have a public key/address (the visible key you share with others/ view on a block explorer) then you cannot decern any info about the wallet that was used to create the address.


2

When you submit a transaction it starts to get propagated to all the network's nodes. After that some miner picks it up at some point and includes in his block. After that the miner may succeed in mining the block with your transaction. After that the block may or may not end up in the canonical chain. So the possible delays are: Transaction propagation ...


0

The transaction is confirmed right away on the node you are connected to. It may be possible that somewhere else, another group of nodes has generated a chain that is different than the node you are connected to. This other chain, when synced with your node, may be considered as the correct chain (likely because it has a higher block number). So, in order ...


1

The users who is spending tokens is the one to approve the contract. The contract cannot appoint itself to spend tokens from someone else's wallet. Hope it helps.


1

You can use this solution to sync the state of public ethereum chains into your local private blockchain in truffle (or embark) and then locally simulate the execution of both transactions in the correct causal order to properly estimate the gas cost.


0

I was also facing the same issue. I reached out to them and this is what they have replied yes it's a known issue with our ERC223 implementation. There's a SIP coming to remove our ERC223 support.


1

A block discovery takes some time to propagate across the network due to network latency. That means a portion of the total hash power is always mining on the wrong block because they haven't heard the news. That portion increases with short block time targets. For example, if blocks take five seconds to propagate and block time is also five seconds, then ...


0

I don't think that I'd say uncle blocks directly improve throughput. In Ethereum, the block time and gas limit combine are what defines the number of transactions that can be submitted to the network. The idea of uncle blocks in ethereum also exist in bitcoin - generally called orphan blocks. Uncles / orphans are part of the reason you do not accept your ...


0

There guide to accessing your ERC20 Token via Ledger Live. If you still have access to your coins and sent them properly, then this is how you would access them.


0

Where you have var tx = new Tx(txObject) you need const tx = new Tx(txObject, {chain:'ropsten', hardfork: 'petersburg'}) h/t https://community.infura.io/t/sendsignedtransaction-invalid-sender-error/832 Full Code This code is working locally. Replace your infura url and private key. web3 1.2.4 ethereumjs-tx 2.1.1 (installed with separate npm install ...


2

Cryptocurrency is basically a form of cashless money. It does not have to be stored. Instead, balances of all accounts have to be recorded somewhere and all participants need to agree on what current balances are. Ethereum uses sophisticated cryptography algorithms to allow honest participants to agree on current balances without knowing nor trusting each ...


1

A string can consist of an integer in any basis, that's the reason you have to include the basis, so the integer within is interpreted properly. Examples: '01' Basis 2, or 'binary' '01234567' Basis 8, or 'octal', '0123456789' Basis 10, or 'decimal', '0123456789ABCDEF' Basis 16, or 'hexadecimal' Example that shows why it is important to specify the ...


1

Serialization means that the message is packed in a byte stream, which properties (like encoding, byte ordering, etc.) are defined by a common protocol. This way you can ensure everybody can pack (serialize) the object into a byte-stream and send it to any participant who knows the protocol, whereupon the participant is able to properly unpack (deserialize) ...


2

Transactions from an exchange are usually sent from a "hot wallet", basically a wallet that is managed by the exchange. Most of the time exchanges pay for the gas, so you don't need any ETH in the exchange to withdraw tokens. In the case of a decentralised exchange (DEX), you do need some ETH, since those kinds of exchanges are based on a smart contract.


2

Yes! This pattern of transactions is called metatransactions. As you described, your user would sign the transaction, but you would send the transaction to the network via a metatransaction. There are a number of different ways to implement it. The Gas Station Network (GSN) by OpenZeppelin provides this as a service and is worth considering for your use.


0

In short This is not a reentrance attack. The actual vulnerability is the contract's mechanism allows cheap trail-and-error, until there a "hit". (Interestingly, "hit" is also the name of attacker's contract method) Attack Mechanism The attacker deployed a contract that calls random to see if a Win will happen. If yes, loop and call send 100 times. If ...


2

I haven't studied this in-depth but I see a clear problem outside of the mutex. This is not random. function random() private view returns(uint){ uint source = block.difficulty + now; bytes memory source_b = toBytes(source); return uint(keccak256(source_b)) % 100; } It is also not hard to guess. You are trying to make ...


Top 50 recent answers are included