Improve error message on 'ParameterizedValidator'.
This commit is contained in:
parent
cdc7ebf9a0
commit
f311e048b7
|
@ -37,8 +37,11 @@ pub enum Error {
|
|||
)]
|
||||
#[diagnostic(code("aiken::blueprint::address::parameterized"))]
|
||||
#[diagnostic(help(
|
||||
"I can only compute addresses of validators that are fully applied. For example, a {keyword_spend} validator must have exactly 3 arguments: a datum, a redeemer and a context. If it has more, they need to be provided beforehand and applied directly in the validator. Applying parameters change the validator's compiled code, and thus the address.\n\nThis is why I need you to apply parameters first.",
|
||||
keyword_spend = "spend".if_supports_color(Stdout, |s| s.purple())))]
|
||||
"I can only compute addresses of validators that are fully applied. For example, a {keyword_spend} validator must have exactly {spend_arity} arguments: a datum, a redeemer and a context. If it has more, they need to be provided beforehand and applied directly to the validator.\n\nApplying parameters change the validator's compiled code, and thus the address. This is why I need you to apply parameters first using the {blueprint_apply_command} command.",
|
||||
keyword_spend = "spend".if_supports_color(Stdout, |s| s.yellow()),
|
||||
spend_arity = "3".if_supports_color(Stdout, |s| s.yellow()),
|
||||
blueprint_apply_command = "blueprint apply".if_supports_color(Stdout, |s| s.purple()),
|
||||
))]
|
||||
ParameterizedValidator { n: usize },
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue