-
Notifications
You must be signed in to change notification settings - Fork 53
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
84e1b99
commit 2389494
Showing
17 changed files
with
132 additions
and
79 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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.
50 changes: 50 additions & 0 deletions
50
...acts-abi/contracts/hts-precompile/examples/hrc-632/HRC632Contract.sol/HRC719Contract.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,50 @@ | ||
[ | ||
{ | ||
"inputs": [ | ||
{ | ||
"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": "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.
40 changes: 40 additions & 0 deletions
40
contracts-abi/contracts/hts-precompile/examples/hrc-719/HRCContract.sol/HRC719Contract.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,40 @@ | ||
[ | ||
{ | ||
"inputs": [ | ||
{ | ||
"internalType": "address", | ||
"name": "token", | ||
"type": "address" | ||
} | ||
], | ||
"name": "associate", | ||
"outputs": [ | ||
{ | ||
"internalType": "uint256", | ||
"name": "responseCode", | ||
"type": "uint256" | ||
} | ||
], | ||
"stateMutability": "nonpayable", | ||
"type": "function" | ||
}, | ||
{ | ||
"inputs": [ | ||
{ | ||
"internalType": "address", | ||
"name": "token", | ||
"type": "address" | ||
} | ||
], | ||
"name": "dissociate", | ||
"outputs": [ | ||
{ | ||
"internalType": "uint256", | ||
"name": "responseCode", | ||
"type": "uint256" | ||
} | ||
], | ||
"stateMutability": "nonpayable", | ||
"type": "function" | ||
} | ||
] |
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
Oops, something went wrong.