cryptonetlab / retriev

Home of Retriev protocol (by CryptoNet + YOMI)
https://retriev.org
18 stars 5 forks source link

Foundry tests #44

Closed 0xjona closed 2 years ago

0xjona commented 2 years ago

We decided to use foundry and run some test to understand the gas cost details of our smart contract (ie, the gas cost of each functions used in the contract).

0xjona commented 2 years ago

For which release do we expect to close the issue? @turinglabsorg

turinglabsorg commented 2 years ago

As soon as possible

turinglabsorg commented 2 years ago

Screenshot_20220614_110213

This is the result of the first foundry tests, we have added a folder called foundry_tests so anyone can reproduce those results.

irenegia commented 2 years ago

Comments on the results:

OPENSEA SWAP https://etherscan.io/tx/0x7ff09e55f6160dc08bb779a96981233a2a7e7f7b094b6ec7d35d1f9cfe918ef9 GAS USED: 190,938

UNISWAP EXCHANGE V3 https://etherscan.io/tx/0xbadd1e9e0903f0a85fa7c657524cdd6da156b9411da772ff4e0f3528580c7333 GAS USED: 131,567

UNISWAP EXCHANGE V2 https://etherscan.io/tx/0x78ed2311129666e9a05411a6e739d30a8e3309fdbca21330fc8e0187fb948ff8 GAS USED: 101,665

UNISWAP POSITION NFT https://etherscan.io/tx/0x0fd95f53be1f0c5e0af4192be0c294c8e203f3f8c18f9610bc72195344670048 GAS USED: 297,866

REGISTER ENS https://etherscan.io/tx/0x9d7ee5c2bdd4c8ef5a5932db143b7bf4691f70c0c1d8bce617c50554c7164a65 GAS USED: 256,871

turinglabsorg commented 2 years ago

@irenegia can we close this issue?

0xjona commented 2 years ago

I think so