Skip to content

Commit

Permalink
feat: add new tests for HIP-1010 (#911)
Browse files Browse the repository at this point in the history
* Exposes new update fees methods through HTS and wrapper contract

Signed-off-by: Konstantina Blazhukova <[email protected]>

* Allows passing of custom fee arrays in TokenCreateCustom contract

Signed-off-by: Konstantina Blazhukova <[email protected]>

* Adds necessary methods for tests and adds fee key to creation methods

Signed-off-by: Konstantina Blazhukova <[email protected]>

* Adds artifacts and abis for new and updated contracts

Signed-off-by: Konstantina Blazhukova <[email protected]>

* Adds util functions

Signed-off-by: Konstantina Blazhukova <[email protected]>

* Removes console logs, makes code more modular and readable

Signed-off-by: Konstantina Blazhukova <[email protected]>

* Fixes failing update fees tests

Signed-off-by: Konstantina Blazhukova <[email protected]>

* Fixes some tests and adds new ones

Signed-off-by: Konstantina Blazhukova <[email protected]>

* Fixes tests

Signed-off-by: Konstantina Blazhukova <[email protected]>

* Fixes multiple fracitonal fees test

Signed-off-by: Konstantina Blazhukova <[email protected]>

* bumps local node version

Signed-off-by: Konstantina Blazhukova <[email protected]>

* Fixes updating of token keys in hip583 test

Signed-off-by: Konstantina Blazhukova <[email protected]>

* Fixes failing erc20 tests

Signed-off-by: Konstantina Blazhukova <[email protected]>

* Removes leftover console log

Signed-off-by: Konstantina Blazhukova <[email protected]>

* Adds solidity doc to IHederaTokenService for new methods

Signed-off-by: Konstantina Blazhukova <[email protected]>

---------

Signed-off-by: Konstantina Blazhukova <[email protected]>
  • Loading branch information
konstantinabl authored Oct 1, 2024
1 parent 40d2824 commit 485c6a7
Show file tree
Hide file tree
Showing 23 changed files with 2,730 additions and 86 deletions.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -2723,6 +2723,182 @@
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "token",
"type": "address"
},
{
"components": [
{
"internalType": "int64",
"name": "amount",
"type": "int64"
},
{
"internalType": "address",
"name": "tokenId",
"type": "address"
},
{
"internalType": "bool",
"name": "useHbarsForPayment",
"type": "bool"
},
{
"internalType": "bool",
"name": "useCurrentTokenForPayment",
"type": "bool"
},
{
"internalType": "address",
"name": "feeCollector",
"type": "address"
}
],
"internalType": "struct IHederaTokenService.FixedFee[]",
"name": "fixedFees",
"type": "tuple[]"
},
{
"components": [
{
"internalType": "int64",
"name": "numerator",
"type": "int64"
},
{
"internalType": "int64",
"name": "denominator",
"type": "int64"
},
{
"internalType": "int64",
"name": "minimumAmount",
"type": "int64"
},
{
"internalType": "int64",
"name": "maximumAmount",
"type": "int64"
},
{
"internalType": "bool",
"name": "netOfTransfers",
"type": "bool"
},
{
"internalType": "address",
"name": "feeCollector",
"type": "address"
}
],
"internalType": "struct IHederaTokenService.FractionalFee[]",
"name": "fractionalFees",
"type": "tuple[]"
}
],
"name": "updateFungibleTokenCustomFees",
"outputs": [
{
"internalType": "int64",
"name": "responseCode",
"type": "int64"
}
],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "token",
"type": "address"
},
{
"components": [
{
"internalType": "int64",
"name": "amount",
"type": "int64"
},
{
"internalType": "address",
"name": "tokenId",
"type": "address"
},
{
"internalType": "bool",
"name": "useHbarsForPayment",
"type": "bool"
},
{
"internalType": "bool",
"name": "useCurrentTokenForPayment",
"type": "bool"
},
{
"internalType": "address",
"name": "feeCollector",
"type": "address"
}
],
"internalType": "struct IHederaTokenService.FixedFee[]",
"name": "fixedFees",
"type": "tuple[]"
},
{
"components": [
{
"internalType": "int64",
"name": "numerator",
"type": "int64"
},
{
"internalType": "int64",
"name": "denominator",
"type": "int64"
},
{
"internalType": "int64",
"name": "amount",
"type": "int64"
},
{
"internalType": "address",
"name": "tokenId",
"type": "address"
},
{
"internalType": "bool",
"name": "useHbarsForPayment",
"type": "bool"
},
{
"internalType": "address",
"name": "feeCollector",
"type": "address"
}
],
"internalType": "struct IHederaTokenService.RoyaltyFee[]",
"name": "royaltyFees",
"type": "tuple[]"
}
],
"name": "updateNonFungibleTokenCustomFees",
"outputs": [
{
"internalType": "int64",
"name": "responseCode",
"type": "int64"
}
],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
Expand Down
Loading

0 comments on commit 485c6a7

Please sign in to comment.