-
Notifications
You must be signed in to change notification settings - Fork 9
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
[#1951] Handle script based DReps #2182
Conversation
✅ All checks succeeded |
2 similar comments
✅ All checks succeeded |
✅ All checks succeeded |
6bcc584
to
a57e43f
Compare
✅ All checks succeeded |
2 similar comments
✅ All checks succeeded |
✅ All checks succeeded |
@@ -758,7 +759,8 @@ instance ToSchema DRepType where | |||
|
|||
data DRep | |||
= DRep | |||
{ dRepDrepId :: DRepHash | |||
{ dRepIsScriptBased :: Bool | |||
, dRepDrepId :: DRepHash |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
, dRepDrepId :: DRepHash | |
, dRepID :: DRepHash |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We are returning drepId
not just id
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If that is easier to depend on the drep_hash.has_script
that is ok, but still for the script based Drep delegation certificate we need a script hash for such DRep, meaning, that we need to take this value.
So, having the scriptHash
in a DRep should be just enough to establish that such DRep is script based
targetDRep = DRep.new_key_hash(Ed25519KeyHash.from_bech32(target)); | ||
} else if (target.includes("drep_script1")) { | ||
targetDRep = DRep.new_script_hash(Ed25519KeyHash.from_bech32(target)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
target should be:
targetDRep = DRep.new_script_hash(Ed25519KeyHash.from_bech32(target)); | |
targetDRep = DRep.new_script_hash(ScriptHash.from_hex(target)); |
where target
is the scriptHash
of the script based DRep that is missing in the SQL.
I'll make the reference implementation of this and share you soon
I figured out that dRepId in our backend is already the scriptHash, so there is no need to update the SQL query - all good, just update pls that small change in wallet.tsx 🫡 |
✅ All checks succeeded |
✅ All checks succeeded |
1 similar comment
✅ All checks succeeded |
@jdyczka |
@jdyczka |
List of changes
Checklist