-
Notifications
You must be signed in to change notification settings - Fork 143
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add an IHRC token facade to support associations via HTS system contract #5950
Comments
Hey @Nana-EC I tried attempting an |
Hey @lukelee-sl could you please confirm if the issue described here is known? As far as I can tell it isn't in which case its a bug. |
Hey @mshakeg - looking at the logs, it looks to me like that particular transaction was trying to perform a
|
@lukelee-sl thanks for the reply, yes, I just created a script to reproduce it here, if you run the
|
Hey @lukelee-sl I just wanted to check back with you on the above issue. I also wanted to ask if an // for IHRC facade
function isAssociated(address account) view external returns (bool associated);
// for IHederaTokenService
function isAssociated(address token, address account) view external returns (bool associated); |
Yesterday we were able to identify and fix the problem on
Could you verify again and see if now you are able to complete these steps? |
Hi @mshakeg, to answer your other question regarding The IHRC facade calls are callable from within a function call - for example here.
The restriction is that the address being associated to has to be the caller (either the EOA or the contract). Will that be sufficient for your needs for the new To clarify I am proposing that we add this call as the token address and the sender are implied.
|
@AlfredoG87 thanks, it works now, however there seems to be an issue running the
|
@lukelee-sl awesome, I don't think it'll be an issue to add |
Hey @AlfredoG87 I just wanted to ask if y'all have made progress with this issue? |
@mshakeg I guess you are referring to the |
Hey @AlfredoG87 yes, I'm referring to the |
@mshakeg Thank you for the insights, they are very valuable in finding and fixing the issue. |
@AlfredoG87 agreed I'm AFK atm, so I'd appreciate it if you do. Though it seems highly related to hashgraph/hedera-json-rpc-relay/issues/1139 |
@mshakeg I have created the ticket so we can tracked it independently of this one. |
Problem
With the removal of delegate calls to system contracts there's no longer a way for an EOA to issue an associate / dissociate transaction in smart contracts.
Solution
Token facades similar to the IERC(tokenAddress).approve provide secure and conformant access to system contract functions.
associate can be exposed in a similar strategy as
IERC(tokenAddress).approve
.As such we should
IHRC(tokenAddress).associate()
to support an EOA associating with a tokenIHRC(tokenAddress).dissociate()
to support an EOA associating with a tokenisAssociated()
supportAlternatives
No response
The text was updated successfully, but these errors were encountered: