Fix generated projects' README + rename 'certify' -> 'publish'
This hints to how this particular purpose is about publishing certificate (either delegation or key de-registration).
This commit is contained in:
parent
20ac9c20a2
commit
c440026e36
|
@ -31,10 +31,10 @@ impl IdGenerator {
|
||||||
}
|
}
|
||||||
|
|
||||||
pub const SPEND: &str = "spend";
|
pub const SPEND: &str = "spend";
|
||||||
pub const CERT: &str = "cert";
|
pub const PUBLISH: &str = "publish";
|
||||||
pub const MINT: &str = "mint";
|
pub const MINT: &str = "mint";
|
||||||
pub const WITHDRAW: &str = "withdraw";
|
pub const WITHDRAW: &str = "withdraw";
|
||||||
pub const VALIDATOR_NAMES: [&str; 4] = [SPEND, CERT, MINT, WITHDRAW];
|
pub const VALIDATOR_NAMES: [&str; 4] = [SPEND, PUBLISH, MINT, WITHDRAW];
|
||||||
|
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
mod tests;
|
mod tests;
|
||||||
|
|
|
@ -17,7 +17,7 @@ use aiken_lang::{
|
||||||
builtins::{self, generic_var},
|
builtins::{self, generic_var},
|
||||||
tipo::TypeInfo,
|
tipo::TypeInfo,
|
||||||
uplc::CodeGenerator,
|
uplc::CodeGenerator,
|
||||||
IdGenerator, CERT, MINT, SPEND, VALIDATOR_NAMES, WITHDRAW,
|
IdGenerator, MINT, PUBLISH, SPEND, VALIDATOR_NAMES, WITHDRAW,
|
||||||
};
|
};
|
||||||
use deps::UseManifest;
|
use deps::UseManifest;
|
||||||
use miette::NamedSource;
|
use miette::NamedSource;
|
||||||
|
@ -430,7 +430,7 @@ where
|
||||||
|
|
||||||
// depending on name, validate the minimum number of arguments
|
// depending on name, validate the minimum number of arguments
|
||||||
// if too low, push a new error on to errors
|
// if too low, push a new error on to errors
|
||||||
if [MINT, CERT, WITHDRAW].contains(&func_def.name.as_str())
|
if [MINT, WITHDRAW, PUBLISH].contains(&func_def.name.as_str())
|
||||||
&& func_def.arguments.len() < 2
|
&& func_def.arguments.len() < 2
|
||||||
{
|
{
|
||||||
errors.push(Error::WrongValidatorArity {
|
errors.push(Error::WrongValidatorArity {
|
||||||
|
|
|
@ -105,10 +105,10 @@ fn readme(root: &Path, project_name: &str) -> miette::Result<()> {
|
||||||
|
|
||||||
Validators are named after their purpose, so one of:
|
Validators are named after their purpose, so one of:
|
||||||
|
|
||||||
- `script`
|
- `spent`
|
||||||
- `mint`
|
- `mint`
|
||||||
- `withdraw`
|
- `withdraw`
|
||||||
- `certify`
|
- `publish`
|
||||||
|
|
||||||
## Building
|
## Building
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue