Skip to content

Commit

Permalink
Fix estimate precompile tests gas estimations for transfer (#8377)
Browse files Browse the repository at this point in the history
Seems like with latest changes in main branch, the actual gas used during estimate gas for calls involving transfers differs a little bit from the current expected actual gas values in the acceptance tests.

This PR updates those values with the values that the latest code from main computes as actual gas used during execution.

This PR modifies EstimatePrecompileFeature change expected gas from operations to actual values.

Signed-off-by: Kristiyan Selveliev <[email protected]>
  • Loading branch information
kselveliev authored May 27, 2024
1 parent cd630c9 commit dd0c5b9
Showing 1 changed file with 17 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1959,9 +1959,9 @@ enum ContractMethods implements ContractMethodInterface {
CREATE_FUNGIBLE_TOKEN_WITH_CUSTOM_FEES("createFungibleTokenWithCustomFeesPublic", 176628),
CREATE_NFT("createNonFungibleTokenPublic", 192472),
CREATE_NFT_WITH_CUSTOM_FEES("createNonFungibleTokenWithCustomFeesPublic", 195579),
CRYPTO_TRANSFER("cryptoTransferExternal", 44438),
CRYPTO_TRANSFER_HBARS("cryptoTransferExternal", 29698),
CRYPTO_TRANSFER_NFT("cryptoTransferExternal", 57934),
CRYPTO_TRANSFER("cryptoTransferExternal", 47206),
CRYPTO_TRANSFER_HBARS("cryptoTransferExternal", 31819),
CRYPTO_TRANSFER_NFT("cryptoTransferExternal", 60258),
DECIMALS("decimals", 27143),
DELETE_TOKEN("deleteTokenExternal", 39095),
DISSOCIATE_AND_ASSOCIATE("dissociateAndAssociateTokenExternal", 1434814),
Expand Down Expand Up @@ -2012,23 +2012,23 @@ enum ContractMethods implements ContractMethodInterface {
REDIRECT_FOR_TOKEN_SET_APPROVAL_FOR_ALL("setApprovalForAllRedirect", 737243),
REDIRECT_FOR_TOKEN_TOTAL_SUPPLY("totalSupplyRedirect", 23422),
REDIRECT_FOR_TOKEN_TOKEN_URI("tokenURIRedirect", 33997),
REDIRECT_FOR_TOKEN_TRANSFER("transferRedirect", 47048),
REDIRECT_FOR_TOKEN_TRANSFER_FROM("transferFromRedirect", 47350),
REDIRECT_FOR_TOKEN_TRANSFER_FROM_NFT("transferFromNFTRedirect", 61457),
REDIRECT_FOR_TOKEN_TRANSFER("transferRedirect", 47842),
REDIRECT_FOR_TOKEN_TRANSFER_FROM("transferFromRedirect", 48274),
REDIRECT_FOR_TOKEN_TRANSFER_FROM_NFT("transferFromNFTRedirect", 62336),
SET_APPROVAL_FOR_ALL("setApprovalForAllExternal", 729608),
SYMBOL("symbol", 27815),
SYMBOL_NFT("symbolIERC721", 27814),
TOTAL_SUPPLY("totalSupply", 27100),
TOTAL_SUPPLY_NFT("totalSupplyIERC721", 27078),
TOKEN_URI("tokenURI", 27856),
TRANSFER_ERC("transfer", 41414),
TRANSFER_FROM("transferFromExternal", 40822),
TRANSFER_FROM_ERC("transferFrom", 39511),
TRANSFER_FROM_NFT("transferFromNFTExternal", 54938),
TRANSFER_NFT("transferNFTExternal", 53751),
TRANSFER_NFTS("transferNFTsExternal", 57015),
TRANSFER_ERC("transfer", 42138),
TRANSFER_FROM("transferFromExternal", 41307),
TRANSFER_FROM_ERC("transferFrom", 42475),
TRANSFER_FROM_NFT("transferFromNFTExternal", 55478),
TRANSFER_NFT("transferNFTExternal", 54596),
TRANSFER_NFTS("transferNFTsExternal", 58999),
TRANSFER_TOKEN("transferTokenExternal", 39666),
TRANSFER_TOKENS("transferTokensExternal", 43314),
TRANSFER_TOKENS("transferTokensExternal", 48326),
UNFREEZE_TOKEN("unfreezeTokenExternal", 39323),
WIPE_TOKEN_ACCOUNT("wipeTokenAccountExternal", 39496),
WIPE_NFT_ACCOUNT("wipeTokenAccountNFTExternal", 40394),
Expand All @@ -2048,10 +2048,10 @@ enum ContractMethods implements ContractMethodInterface {
FREEZE_UNFREEZE_GET_STATUS("freezeTokenGetFreezeStatusUnfreezeGetFreezeStatus", 57387),
APPROVE_FUNGIBLE_GET_ALLOWANCE("approveTokenGetAllowance", 733080),
APPROVE_NFT_GET_ALLOWANCE("approveTokenGetAllowance", 733127),
DISSOCIATE_FUNGIBLE_TOKEN_AND_TRANSFER("associateTokenDissociateFailTransfer", 1481983),
DISSOCIATE_NFT_AND_TRANSFER("associateTokenDissociateFailTransfer", 1481983),
APPROVE_FUNGIBLE_TOKEN_AND_TRANSFER("approveFungibleTokenTransferFromGetAllowanceGetBalance", 752505),
APPROVE_NFT_TOKEN_AND_TRANSFER_FROM("approveNftAndTransfer", 765896);
DISSOCIATE_FUNGIBLE_TOKEN_AND_TRANSFER("associateTokenDissociateFailTransfer", 1482987),
DISSOCIATE_NFT_AND_TRANSFER("associateTokenDissociateFailTransfer", 1525177),
APPROVE_FUNGIBLE_TOKEN_AND_TRANSFER("approveFungibleTokenTransferFromGetAllowanceGetBalance", 785631),
APPROVE_NFT_TOKEN_AND_TRANSFER_FROM("approveNftAndTransfer", 797670);

private final String selector;
private final int actualGas;
Expand Down

0 comments on commit dd0c5b9

Please sign in to comment.