Commit 9033e1b1 authored by Hero Bird's avatar Hero Bird
Browse files

[pdsl_core] Convert the entire library to no_std

parent 7e69439d
......@@ -35,6 +35,8 @@ mod test_env;
use crate::storage::Key;
use alloc::vec::Vec;
/// The evironment API usable by SRML contracts.
pub trait Env {
/// Returns the chain address of the caller.
......
......@@ -16,6 +16,8 @@
use super::*;
use alloc::vec::Vec;
/// Refer to substrate SRML contract module for more documentation.
pub mod c_abi {
extern "C" {
......
......@@ -14,6 +14,13 @@
// You should have received a copy of the GNU General Public License
// along with pDSL. If not, see <http://www.gnu.org/licenses/>.
#![no_std]
#![feature(alloc)]
// #[macro_use]
extern crate alloc;
#[cfg(test)]
#[macro_use]
mod test_utils;
......
#!/bin/sh
curl -XPOST -N 'Content-Type: application/json' -d '{"jsonrpc": "2.0", "method": "chain_getBlockHash", "params": [0], "id": 1}' -vv http://localhost:9933 | jq -r '.result'
# On Success: Returns the generis block hash in the last line.
# => GENESIS_HASH
curl -XPOST -N 'Content-Type: application/json' -d '{"jsonrpc": "2.0", "method": "author_submitEntrinsic", "params": ["$GENESIS_HASH"], "id": 1}' -vv http://localhost:9933 | jq -r '.result'
#
\ No newline at end of file
......@@ -24,6 +24,7 @@ use crate::{
};
use parity_codec_derive::{Encode, Decode};
use alloc::vec::Vec;
/// A raw cell.
///
......
......@@ -22,6 +22,7 @@ use crate::{
},
env::{Env, ContractEnv},
};
use alloc::vec::Vec;
/// A chunk of raw cells.
///
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment