How dangerous is this: number of contracts contain a function like “approveandcall” which lets anyone call any contract (some thoughts?)

The most common implementation is as follows: function approveAndCall(address _spender, uint256 _value, bytes _extraData) public returns (bool success) { tokenRecipient spender = tokenRecipient(_spender); if (approve(_spender, _value)) { _spender.receiveApproval(msg.sender, _value, this, _extraData); ApproveAndCall(_spender, _value, _extraData ); return true; } } From what I can see it’s obligatory that the receiving contract has “Receiveapproval” function, meaning a…

Revert()/throw/invalid are so powerful they can even put back an already self-destructed contract, but is there a way to surpass such limitation?

I know this sounds confusing so let me explain: In this case below a transaction will succeed and a contract will be first destroyed and then re-initialized on the same address (yes, I didn’t think it was possible…but apparently it is): contract A { address contractb = // some address here function first() public {…

Get transaction data from full node

Background Information I am building an application that requires the ability to query any bitcoin full node (from a python script using raw tcp sockets) in order to read the OP_Return value listed in the following transaction (https://live.blockcypher.com/btc-testnet/tx/2599dbe540a583ede3512fef9a0f26be718c039ffd4d04d85ff3b339f40e73b1/) What I have done to date I have successfully managed to establish the version + verack, however…

Why hasn’t cold storage (offline signing) been supported by Bitcoin Core (GUI) up till now (0.19.0.1)?

Is there any deep reason not to support this? Or is this merely a “good idea, but no volunteers” situation? By the way, although Bitcoin Core had supported BIP32 several years ago, it uses hardened derivation for addresses, which makes it impossible for the watch-only side to derive new addresses for receiving/change, or used addresses…

Is lack of version number really a flaw of BIP39?

It seemed that BIP39 was often criticized as it lacks version number. However, wasn’t BIP39 supposed to be universal, that “one single seed covers all purposes, one single seed backups everything”? For example, Trezor supports multiple coins/accounts, as well as multiple address types (P2PKH/P2SH-P2WPKH), with only one single BIP39 mnemonic phrase. Trezor users can switch…