Skip to content

Commit

Permalink
Add new cost figures.
Browse files Browse the repository at this point in the history
  • Loading branch information
surangap committed Jul 1, 2024
1 parent 3c257fc commit 7764ab4
Show file tree
Hide file tree
Showing 7 changed files with 95 additions and 95 deletions.
2 changes: 1 addition & 1 deletion e2e/test/Dex/Dex.TxCosts.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ describe("Dex Gas Estimation", function () {

after(async () => {
saveTxGas(allCosts, "Dex/TxCosts.md", "Dex Precompiles");
saveTxFees(allTxFeeCosts, "Dex/TxCosts.md", "ERC20 Precompiles");
saveTxFees(allTxFeeCosts, "Dex/TxCosts.md", "Dex Precompiles");
await node.stop();
});

Expand Down
26 changes: 13 additions & 13 deletions e2e/test/Dex/TxCosts.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,21 @@

| Function Call | Contract gas | Precompile gas | (Extrinsic fee/Gas price) |
|:-------------------------|:------------:|:--------------:|:-------------------------:|
| addLiquidity | 217853 | 122103 | 52139 |
| removeLiquidity | 183441 | 86009 | 34620 |
| swapExactTokensForTokens | 150598 | 70507 | 26392 |
| swapTokensForExactTokens | 150743 | 71568 | 27375 |
| quote | 23716 | 22377 | 0 |
| getAmountOut | 26047 | 22447 | 0 |
| getAmountsOut | 43843 | 42619 | 0 |
| getAmountsIn | 44058 | 42611 | 0 |
| addLiquidity | 197723 | 89078 | 52145 |
| removeLiquidity | 170713 | 68838 | 34641 |
| swapExactTokensForTokens | 133986 | 52401 | 26421 |
| swapTokensForExactTokens | 134130 | 53006 | 27404 |
| quote | 44688 | 22377 | 0 |
| getAmountOut | 44688 | 22423 | 0 |
| getAmountsOut | 120661 | 34806 | 0 |
| getAmountsIn | 120661 | 34799 | 0 |


## Generated tx costs(fees) for ERC20 Precompiles
## Generated tx costs(fees) for Dex Precompiles

| Function Call | Contract cost (Drops) | Precompile cost (Drops) | Extrinsic cost (Drops) |
|:-------------------------|:---------------------:|:-----------------------:|:----------------------:|
| addLiquidity | 1484456 | 904088 | 391044 |
| removeLiquidity | 1182769 | 630493 | 259652 |
| swapExactTokensForTokens | 1092758 | 492668 | 197943 |
| swapTokensForExactTokens | 1093921 | 502105 | 205316 |
| addLiquidity | 1338027 | 657776 | 391089 |
| removeLiquidity | 1072046 | 477830 | 259813 |
| swapExactTokensForTokens | 968038 | 387534 | 198163 |
| swapTokensForExactTokens | 969201 | 393986 | 205532 |
34 changes: 17 additions & 17 deletions e2e/test/ERC1155/TxCosts.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,26 +2,26 @@

| Function Call | Contract gas | Precompile gas | (Extrinsic fee/Gas price) |
|:----------------------|:------------:|:--------------:|:-------------------------:|
| uri | 27560 | 22400 | 0 |
| balanceOf | 25957 | 22433 | 0 |
| balanceOfBatch | 32585 | 24106 | 0 |
| setApprovalForAll | 47025 | 27501 | 0 |
| isApprovedForAll | 26076 | 23184 | 0 |
| safeTransferFrom | 59163 | 32160 | 10552 |
| safeBatchTransferFrom | 50205 | 35812 | 13298 |
| mint | 33152 | 32245 | 11374 |
| mintBatch | 42210 | 32633 | 12307 |
| burn | 32581 | 27608 | 9631 |
| burnBatch | 38043 | 31828 | 10564 |
| uri | 27560 | 22376 | 0 |
| balanceOf | 25957 | 22408 | 0 |
| balanceOfBatch | 32585 | 23721 | 0 |
| setApprovalForAll | 47025 | 26235 | 0 |
| isApprovedForAll | 26076 | 22432 | 0 |
| safeTransferFrom | 74307 | 28882 | 10552 |
| safeBatchTransferFrom | 75516 | 32822 | 13297 |
| mint | 74473 | 28572 | 11373 |
| mintBatch | 75540 | 29371 | 12306 |
| burn | 32581 | 26141 | 9630 |
| burnBatch | 38043 | 28466 | 10563 |


## Generated tx costs(fees) for ERC1155 Precompiles

| Function Call | Contract cost (Drops) | Precompile cost (Drops) | Extrinsic cost (Drops) |
|:----------------------|:---------------------:|:-----------------------:|:----------------------:|
| safeTransferFrom | 440278 | 231113 | 79145 |
| safeBatchTransferFrom | 364092 | 268013 | 99741 |
| mint | 247001 | 232478 | 85307 |
| mintBatch | 294958 | 238690 | 92307 |
| burn | 237850 | 203613 | 72233 |
| burnBatch | 284644 | 225810 | 79233 |
| safeTransferFrom | 440278 | 215285 | 79140 |
| safeBatchTransferFrom | 364092 | 241713 | 99732 |
| mint | 247001 | 214100 | 85301 |
| mintBatch | 294958 | 220311 | 92301 |
| burn | 237850 | 189637 | 72228 |
| burnBatch | 284644 | 211834 | 79228 |
22 changes: 11 additions & 11 deletions e2e/test/ERC20/TxCosts.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,21 @@

| Function Call | Contract gas | Precompile gas | (Extrinsic fee/Gas price) |
|:--------------|:------------:|:--------------:|:-------------------------:|
| totalSupply | 23717 | 22388 | 0 |
| balanceOf | 25860 | 23974 | 0 |
| totalSupply | 23717 | 22364 | 0 |
| balanceOf | 25860 | 23692 | 0 |
| allowance | 26064 | 23273 | 0 |
| approval | 47152 | 26470 | 11782 |
| transfer | 52698 | 43641 | 15507 |
| transferFrom | 44716 | 51726 | 18731 |
| name | 25926 | 22388 | 0 |
| decimals | 22354 | 22388 | 0 |
| symbol | 25945 | 22388 | 0 |
| approval | 47152 | 26133 | 11781 |
| transfer | 52698 | 35514 | 15505 |
| transferFrom | 44716 | 43610 | 18728 |
| name | 25926 | 22364 | 0 |
| decimals | 22354 | 22364 | 0 |
| symbol | 25945 | 22364 | 0 |


## Generated tx costs(fees) for ERC20 Precompiles

| Function Call | Contract cost (Drops) | Precompile cost (Drops) | Extrinsic cost (Drops) |
|:--------------|:---------------------:|:-----------------------:|:----------------------:|
| approval | 351452 | 198422 | 88369 |
| transfer | 390700 | 311427 | 116305 |
| transferFrom | 323614 | 380276 | 140487 |
| approval | 351452 | 189442 | 88360 |
| transfer | 390700 | 263777 | 116288 |
| transferFrom | 323614 | 310917 | 140466 |
46 changes: 23 additions & 23 deletions e2e/test/ERC721/TxCosts.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,32 +2,32 @@

| Function Call | Contract gas | Precompile gas | (Extrinsic fee/Gas price) |
|:------------------|:------------:|:--------------:|:-------------------------:|
| balanceOf | 25895 | 23274 | 0 |
| ownerOf | 25847 | 23242 | 0 |
| getApproved | 27395 | 23242 | 0 |
| isApprovedForAll | 26082 | 23973 | 0 |
| mint | 53193 | 31731 | 9216 |
| burn | 37870 | 35731 | 10523 |
| approve | 50740 | 28884 | 10852 |
| setApprovalForAll | 47011 | 26467 | 9700 |
| safetransferFrom | 67181 | 36625 | 0 |
| transferFrom | 66839 | 35560 | 11585 |
| name | 25932 | 22388 | 0 |
| symbol | 25938 | 22388 | 0 |
| tokenURI | 25964 | 23242 | 0 |
| owner | 23728 | 22388 | 0 |
| transferOwnership | 29147 | 28498 | 9501 |
| renounceOwnership | 30272 | 28372 | 9455 |
| balanceOf | 25895 | 23238 | 0 |
| ownerOf | 25847 | 23206 | 0 |
| getApproved | 27395 | 23206 | 0 |
| isApprovedForAll | 26082 | 23733 | 0 |
| mint | 81095 | 27732 | 9216 |
| burn | 37870 | 32429 | 10522 |
| approve | 50740 | 27473 | 10851 |
| setApprovalForAll | 47011 | 26130 | 9700 |
| safetransferFrom | 77443 | 32611 | 0 |
| transferFrom | 66839 | 32381 | 11584 |
| name | 25932 | 22364 | 0 |
| symbol | 25938 | 22364 | 0 |
| tokenURI | 25964 | 23206 | 0 |
| owner | 23728 | 22364 | 0 |
| transferOwnership | 29147 | 27419 | 9501 |
| renounceOwnership | 30272 | 26402 | 9454 |


## Generated tx costs(fees) for ERC721 Precompiles

| Function Call | Contract cost (Drops) | Precompile cost (Drops) | Extrinsic cost (Drops) |
|:------------------|:---------------------:|:-----------------------:|:----------------------:|
| mint | 395981 | 224249 | 69126 |
| burn | 245366 | 266850 | 78929 |
| approve | 369808 | 215338 | 81394 |
| setApprovalForAll | 349839 | 198339 | 72754 |
| transferFrom | 442288 | 264345 | 86893 |
| transferOwnership | 218098 | 212502 | 71263 |
| renounceOwnership | 176172 | 209831 | 70913 |
| mint | 395981 | 206426 | 69121 |
| burn | 245366 | 235419 | 78921 |
| approve | 369808 | 200507 | 81389 |
| setApprovalForAll | 349839 | 189360 | 72751 |
| transferFrom | 442288 | 234646 | 86885 |
| transferOwnership | 218098 | 199277 | 71258 |
| renounceOwnership | 176172 | 196606 | 70908 |
20 changes: 10 additions & 10 deletions e2e/test/Futurepass/TxCosts.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,19 @@

| Function Call | Contract gas | Precompile gas | (Extrinsic fee/Gas price) |
|:------------------------------|:------------:|:--------------:|:-------------------------:|
| create | 0 | 45155 | 16355 |
| registerDelegateWithSignature | 0 | 46056 | 20190 |
| unregisterDelegate | 0 | 43622 | 16203 |
| transferOwnership | 0 | 52086 | 20410 |
| proxyCall | 0 | 65694 | 21155 |
| create | 0 | 36968 | 16352 |
| registerDelegateWithSignature | 0 | 38388 | 20188 |
| unregisterDelegate | 0 | 35481 | 16200 |
| transferOwnership | 0 | 43720 | 20407 |
| proxyCall | 0 | 65259 | 21152 |


## Generated tx costs(fees) for Futurepass Precompiles

| Function Call | Contract cost (Drops) | Precompile cost (Drops) | Extrinsic cost (Drops) |
|:------------------------------|:---------------------:|:-----------------------:|:----------------------:|
| create | 0 | 328633 | 122663 |
| registerDelegateWithSignature | 0 | 338932 | 151432 |
| unregisterDelegate | 0 | 311102 | 121523 |
| transferOwnership | 0 | 384166 | 153079 |
| proxyCall | 0 | 449872 | 158668 |
| create | 0 | 274734 | 122645 |
| registerDelegateWithSignature | 0 | 286864 | 151414 |
| unregisterDelegate | 0 | 263205 | 121506 |
| transferOwnership | 0 | 312227 | 153054 |
| proxyCall | 0 | 446016 | 158642 |
40 changes: 20 additions & 20 deletions e2e/test/MarketPlace/TxCosts.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,29 +2,29 @@

| Function Call | Contract gas | Precompile gas | (Extrinsic fee/Gas price) |
|:--------------------|:------------:|:--------------:|:-------------------------:|
| registerMarketplace | 0 | 32307 | 10843 |
| sellNft | 0 | 55445 | 22404 |
| auctionNft | 0 | 55709 | 21416 |
| makeSimpleOffer | 0 | 60972 | 37599 |
| buy | 0 | 50424 | 151674 |
| bid | 0 | 61632 | 1358014 |
| cancelSale | 0 | 38090 | 13321 |
| updateFixedPrice | 0 | 29163 | 9867 |
| acceptOffer | 0 | 74959 | 27394 |
| cancelOffer | 0 | 56308 | 20784 |
| registerMarketplace | 0 | 28498 | 10842 |
| sellNft | 0 | 45446 | 22401 |
| auctionNft | 0 | 45520 | 21412 |
| makeSimpleOffer | 0 | 49759 | 37595 |
| buy | 0 | 42648 | 151671 |
| bid | 0 | 50132 | 1358010 |
| cancelSale | 0 | 33067 | 13319 |
| updateFixedPrice | 0 | 27583 | 9866 |
| acceptOffer | 0 | 55532 | 27388 |
| cancelOffer | 0 | 45476 | 20780 |


## Generated tx costs(fees) for Marketplace Precompiles

| Function Call | Contract cost (Drops) | Precompile cost (Drops) | Extrinsic cost (Drops) |
|:--------------------|:---------------------:|:-----------------------:|:----------------------:|
| registerMarketplace | 0 | 233484 | 81325 |
| sellNft | 0 | 408156 | 168036 |
| auctionNft | 0 | 410872 | 160620 |
| makeSimpleOffer | 0 | 555461 | 281997 |
| buy | 0 | 1366440 | 1137559 |
| bid | 0 | 10462114 | 10185109 |
| cancelSale | 0 | 285289 | 99912 |
| updateFixedPrice | 0 | 218406 | 74004 |
| acceptOffer | 0 | 532153 | 205460 |
| cancelOffer | 0 | 416953 | 155886 |
| registerMarketplace | 0 | 212509 | 81318 |
| sellNft | 0 | 331963 | 168010 |
| auctionNft | 0 | 332804 | 160593 |
| makeSimpleOffer | 0 | 459344 | 281963 |
| buy | 0 | 1299977 | 1137536 |
| bid | 0 | 10363327 | 10185075 |
| cancelSale | 0 | 245636 | 99899 |
| updateFixedPrice | 0 | 203020 | 73999 |
| acceptOffer | 0 | 408949 | 205417 |
| cancelOffer | 0 | 332201 | 155857 |

0 comments on commit 7764ab4

Please sign in to comment.