3 ms·
The author has an excellent reply to a question on twitter >> What are the gas prices like for copying a pointer? > Copying an nft_ptr is illegal. Moving an n
by iudqnolq 6y ago
The author has an excellent reply to a question on twitter
>> What are the gas prices like for copying a pointer?
> Copying an nft_ptr is illegal.
Moving an nft_ptr takes 87,169 gas:
https://goerli.etherscan.io/tx/0xcbe06fdd54bd9d221993c875022fe2960128874811a25075d692cc638a28f290 https://goerli.etherscan.io/tx/0xcbe06fdd54bd9d221993c875022...
at mainnet gas prices of ~100 Gwei, equal to 0.0087169 ETH, or $18.69 USD.
(This was intentionally written to waste resources for no benefit, just like cryptocurrencies themselves)
> The C++ "as-if" rule means the compiler is allowed to optimize away the move, but it still needs to charge the $18.