This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// A runtime module that interprets a sipmlified pi calculus | |
use support::{decl_module, decl_storage, decl_event, StorageMap, dispatch::Result, ensure}; | |
use system::ensure_signed; | |
use rstd::boxed::Box; | |
use codec::{ Encode, Decode }; | |
use sr_primitives::traits::Hash; | |
/// All the types of processes in our calculus |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "Local Testnet", | |
"id": "local_testnet", | |
"bootNodes": [ | |
"/ip4/127.0.0.1/tcp/30333/p2p/QmSidBKvi8CcbqK5TZdAq1cxFBJAYwUWmg6VwwPtVK2eyT" | |
], | |
"telemetryEndpoints": null, | |
"protocolId": null, | |
"consensusEngine": null, | |
"properties": null, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use support::{decl_module, decl_storage, decl_event, StorageValue, dispatch::Result}; | |
use system::ensure_signed; | |
use rstd::prelude::*; | |
use rstd::collections::btree_set::BTreeSet; | |
pub trait Trait: system::Trait { | |
type Event: From<Event<Self>> + Into<<Self as system::Trait>::Event>; | |
} | |
decl_storage! { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use support::{decl_module, decl_storage, StorageValue, dispatch::Result}; | |
use system::ensure_signed; | |
use parity_codec::{ Encode, Decode }; | |
#[derive(Encode, Decode, Clone, PartialEq)] | |
#[cfg_attr(feature = "std", derive(Debug))] | |
pub enum Choices { | |
None, | |
One, | |
Two, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use support::{decl_module, decl_storage, decl_event, StorageValue, dispatch::Result, ensure, StorageMap}; | |
use system::ensure_signed; | |
pub trait Trait: system::Trait { | |
type Event: From<Event<Self>> + Into<<Self as system::Trait>::Event>; | |
} | |
decl_storage! { | |
trait Store for Module<T: Trait> as calculator { | |
FinalResult: u64; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use support::{decl_module, dispatch::Result, | |
traits::{Currency, ExistenceRequirement, WithdrawReason}}; | |
use system::ensure_signed; | |
// v1.0 branch | |
// use runtime_primitives::traits::As; | |
pub trait Trait: balances::Trait {} | |
decl_module! { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#![feature(prelude_import)] | |
#![no_std] | |
// Copyright 2017-2019 Parity Technologies (UK) Ltd. | |
// This file is part of Substrate. | |
// Substrate is free software: you can redistribute it and/or modify | |
// it under the terms of the GNU General Public License as published by | |
// the Free Software Foundation, either version 3 of the License, or | |
// (at your option) any later version. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use support::{decl_module, decl_storage, decl_event, StorageValue, dispatch::Result}; | |
use system::ensure_signed; | |
pub trait Trait: system::Trait { | |
type Event: From<Event<Self>> + Into<<Self as system::Trait>::Event>; | |
} | |
type U8 = [u8; 1]; | |
decl_storage! { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// initialise with: | |
// post({sender: runtime.indices.ss58Decode('F7Gh'), call: calls.demo.setPayment(1000)}).tie(console.log) | |
use parity_codec::Encode; | |
use srml_support::{StorageValue, dispatch::Result, decl_module, decl_storage}; | |
use runtime_primitives::traits::Hash; | |
use {balances, system::{self, ensure_signed}}; | |
pub trait Trait: balances::Trait {} |
NewerOlder