You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With this new technique, the comment on the homepage can be updated:
The address of our GST2 GasToken, 0x0000000000b3F879cb30FE243b4Dfee438691c04, is hardcoded. Note that this address is very short (only 15 non-zero bytes instead of 20). We generated our GasToken contract at such an address on purpose, so as to save some gas when creating contracts. The above child contract uses 22 bytes of code, and thus costs roughly 32000 + 22 * 200 = 36400 gas to create (the additional overhead of calling mint is only about 150 gas). If we could make use of address 0x0 for GasToken, we could save an extra 3000 gas or so for every created contract!
Don't worry about the 0x0 address. You want the 0xPC address. Then you can additionally save the PUSH15 and XOR operations.
This proposed update also affects the efficiency ratio and other parts of the web page.
The text was updated successfully, but these errors were encountered:
Just wanted to say this is a cute project. I have been studying and wanted to share my notes.
Current contract call costs 22 gas.
https://github.com/projectchicago/gastoken/blob/master/contract/GST2_ETH.sol#L106-L114
Proposed update requires 19 gas.
With this new technique, the comment on the homepage can be updated:
Don't worry about the 0x0 address. You want the 0xPC address. Then you can additionally save the
PUSH15
andXOR
operations.This proposed update also affects the efficiency ratio and other parts of the web page.
The text was updated successfully, but these errors were encountered: