Open andresceballosm opened 1 month ago
This is a great start, thank you! I've got 2 comments :)
With the current design, you're converting the ens name to an address using viem
. This happens at condition creation time. The problem here is that ens ownership can change, and the condition won't stay in line with the ownership.
This implementation would also require us to build an equivalent ensOwnership
condition in nucypher/nucypher
. Would it be possible to have ensOwnership
be a wrapper of ContractCondition
?
The condition is still defined exactly as you specified:
const ensCondition = new conditions.ensOwnership.EnsAddressOwnershipCondition({
ensName: 'andrestest.eth',
signer,
domain
});
but behind the scenes it would create a contract condition that reads from the ens registry. This would fix both of my comments. @KPrasch thoughts?
Please see this issue comment https://github.com/nucypher/taco-web/issues/104#issuecomment-2079254236 for the context on ENS resolution. TLDR, it's a multi-step process that requires some development in nucypher/nucypher
and we can't support it out-of-the-box using ContractConditions
at the moment. Maybe with sequential conditions?
Type of PR:
Required reviews:
What this does:
Issues fixed/closed:
Why it's needed:
Notes for reviewers: