odra-cli 2.6.0

Odra CLI - Command Line Interface for Odra smart contracts.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use odra::schema::casper_contract_schema::Entrypoint;

use crate::cmd::args::CommandArg;
use crate::custom_types::CustomTypeSet;
use crate::entry_point::utils::flatten_schema_arg;

pub fn entry_point_args(entry_point: &Entrypoint, types: &CustomTypeSet) -> Vec<CommandArg> {
    entry_point
        .arguments
        .iter()
        .filter(|arg| arg.name != "__cargo_purse")
        .flat_map(|arg| flatten_schema_arg(arg, types, false))
        .flatten()
        .collect()
}