Closed aahna-ashina closed 11 months ago
@lbeder Here is our code: https://github.com/nation3/nationcred-contracts/blob/main/contracts/citizens/DeveloperSkillLevels.sol#L103
Each time a DAO member rates the skills of another DAO member, we store an attestation with EAS. And we want the attester address to be the address of the DAO member doing the rating, and not the address of the smart contract.
Hi @aahna-ashina,
Your reasoning is completely understandable, but unfortunately tx.origin
is still considered as a bad practice and is unreliable (it has been discussed many times to deprecate it from future EVM versions). I'd recommend you instead to encode the original attester in the data
field and use it in the resolver.
Hi @aahna-ashina, Your reasoning is completely understandable, but unfortunately
tx.origin
is still considered as a bad practice and is unreliable (it has been discussed many times to deprecate it from future EVM versions). I'd recommend you instead to encode the original attester in thedata
field and use it in the resolver.
@lbeder What if we don't use a resolver? Is it still possible?
It depends on your usage, but if you don't use a resolver, yet attest through another contract, you can emit a specific event (if the goal is to detect this offchain) or store a mapping between original attesters and UIDs, but as long as the contract itself makes the attestations - it'll be recorded as the attester.
close #126