cosm-orc 0.2.0

Cosmwasm smart contract orchestration and gas profiling library
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use anyhow::Result;
use serde::{Deserialize, Serialize};
use serde_json::Value;

use crate::orchestrator::command::CommandType;

#[derive(Debug, Serialize, Deserialize)]
pub struct Report {
    pub name: String,
    pub json_data: Vec<u8>,
}

pub trait Profiler {
    fn instrument(&mut self, op_name: String, op_type: CommandType, json: &Value) -> Result<()>;
    fn report(&self) -> Result<Report>;
}