fvm-std 1.0.0

tool for user to write contract which will be run in hyperchain with rust
Documentation
use alloc::vec::Vec;
use crate::prelude::{Address, H256};
use crate::runtime;
use crate::types::LogLevel;

pub fn revert(msg: &str) -> ! {
    runtime::revert(msg)
}

pub fn ret(data: &[u8]) {
    runtime::ret(data)
}

pub fn input() -> Vec<u8> {
    runtime::input()
}

pub fn self_address() -> Address {
    runtime::self_address()
}

pub fn caller_address() -> Address {
    runtime::caller_address()
}

pub fn origin_address() -> Address {
    runtime::origin_address()
}

pub fn tx_hash() -> H256 {
    runtime::tx_hash()
}

pub fn sha256(data: impl AsRef<[u8]>) -> H256 {
    runtime::sha256(data)
}

pub fn block_time() -> u64 {
    runtime::block_time()
}

pub fn block_height() -> u64 {
    runtime::block_height()
}

pub fn call_contract(addr: &Address, input: &[u8]) -> Vec<u8> {
    runtime::call_contract(addr, input)
}

pub fn cns_call_contract(cns: &[u8], input: &[u8]) -> Vec<u8> {
    runtime::cns_call_contract(cns, input)
}

pub fn log(class_name: &[u8], data: &[u8], level: LogLevel) {
    runtime::log(class_name, data, level)
}