Is there a way for a function to perform some code to a point and then revert without conditions (more details below…)?

I want to create a payable function that acts similarly to onlyowner modifier, or: function owner() public payable{ if(msg.sender != owner) { balances[owner] += msg.value; revert(); } } What I want to accomplish: 1. when called by anyone except owner function will add funds to owner… 2. and after that it reverts, returning ‘unsuccessful’ or…

What kind of messages should be expected when using ‘expectRevert’ by OpenZeppelin Test Helpers

When I test smartcontract with OpenZeppelin Test Helpers and use expectRevert as follows, I got this message. What does it mean? Code context(“when querying the zero address”, function() { it(“throws”, async function() { await expectRevert( item.balanceOf(ZERO_ADDRESS), “ERCX: balance query for the zero address” ); }); }); Result Wrong kind of exception received + expected -…

Is bitcoin the world’s first (highly specialized) yottascale computer?

I’ve read that one bitcoin hash uses 12,700 floating point operations. The bitcoin network, as of writing, is roughly 9*10^19 hashes per second. I plugged the numbers from difficulties in the past in, and this milestone appears to have been reached in mid-August. (The minimum hashrate is 7.7*10^19 per second.) note: the yottascale is 10^24…