-
Notifications
You must be signed in to change notification settings - Fork 54
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Logan Nguyen <[email protected]>
- Loading branch information
1 parent
ea72b2b
commit c4691a4
Showing
17 changed files
with
105 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
...ntracts/hts-precompile/IHRC.sol/IHRC.json → ...s/hts-precompile/IHRC719.sol/IHRC719.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
60 changes: 60 additions & 0 deletions
60
contracts-abi/contracts/hts-precompile/IHederaAccountService.sol/IHederaAccountService.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
[ | ||
{ | ||
"inputs": [ | ||
{ | ||
"internalType": "address", | ||
"name": "owner", | ||
"type": "address" | ||
}, | ||
{ | ||
"internalType": "address", | ||
"name": "spender", | ||
"type": "address" | ||
} | ||
], | ||
"name": "hbarAllowance", | ||
"outputs": [ | ||
{ | ||
"internalType": "int64", | ||
"name": "responseCode", | ||
"type": "int64" | ||
}, | ||
{ | ||
"internalType": "int256", | ||
"name": "amount", | ||
"type": "int256" | ||
} | ||
], | ||
"stateMutability": "nonpayable", | ||
"type": "function" | ||
}, | ||
{ | ||
"inputs": [ | ||
{ | ||
"internalType": "address", | ||
"name": "owner", | ||
"type": "address" | ||
}, | ||
{ | ||
"internalType": "address", | ||
"name": "spender", | ||
"type": "address" | ||
}, | ||
{ | ||
"internalType": "int256", | ||
"name": "amount", | ||
"type": "int256" | ||
} | ||
], | ||
"name": "hbarApprove", | ||
"outputs": [ | ||
{ | ||
"internalType": "int64", | ||
"name": "responseCode", | ||
"type": "int64" | ||
} | ||
], | ||
"stateMutability": "nonpayable", | ||
"type": "function" | ||
} | ||
] |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
contracts/hts-precompile/IHRC.sol → contracts/hts-precompile/IHRC719.sol
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
// SPDX-License-Identifier: Apache-2.0 | ||
pragma solidity >=0.4.9 <0.9.0; | ||
|
||
interface IHRC { | ||
interface IHRC719 { | ||
function associate() external returns (uint256 responseCode); | ||
function dissociate() external returns (uint256 responseCode); | ||
} |
10 changes: 5 additions & 5 deletions
10
...s-precompile/examples/hrc/HRCContract.sol → ...mpile/examples/hrc-719/HRC719Contract.sol
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,14 @@ | ||
// SPDX-License-Identifier: Apache-2.0 | ||
pragma solidity ^0.8.7; | ||
|
||
import "../../IHRC.sol"; | ||
import "../../IHRC719.sol"; | ||
|
||
contract HRCContract { | ||
contract HRC719Contract { | ||
function associate(address token) public returns (uint256 responseCode) { | ||
return IHRC(token).associate(); | ||
return IHRC719(token).associate(); | ||
} | ||
|
||
function dissociate(address token) public returns (uint256 responseCode) { | ||
return IHRC(token).dissociate(); | ||
return IHRC719(token).dissociate(); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,13 @@ | ||
// SPDX-License-Identifier: Apache-2.0 | ||
pragma solidity >=0.4.9 <0.9.0; | ||
|
||
import "../../../../contracts/hts-precompile/IHRC.sol"; | ||
import "../../../../contracts/hts-precompile/IHRC719.sol"; | ||
|
||
interface IERCCommonToken { | ||
function balanceOf(address account) external view returns (uint256); | ||
} | ||
|
||
interface IHRCCommon is IHRC, IERCCommonToken { | ||
interface IHRCCommon is IHRC719, IERCCommonToken { | ||
// NOTE: can be moved into IHRC once implemented https://hips.hedera.com/hip/hip-719 | ||
function isAssociated(address evmAddress) external view returns (bool); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters