From 407511100c1ec70cb6dc4027e3506776caf4135a Mon Sep 17 00:00:00 2001 From: Shawn Tabrizi Date: Tue, 30 Apr 2019 15:53:31 +0200 Subject: [PATCH] Add `pub` to functions in Contract module (#2399) * Add `pub` to functions in Contract module This is to support a wrapper module which will add an access control layer to the SRML Contract module. * Remove `pub` from `on_finalize` --- substrate/srml/contract/src/lib.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/substrate/srml/contract/src/lib.rs b/substrate/srml/contract/src/lib.rs index 8b89652208..c8b55ef737 100644 --- a/substrate/srml/contract/src/lib.rs +++ b/substrate/srml/contract/src/lib.rs @@ -325,7 +325,7 @@ decl_module! { /// Updates the schedule for metering contracts. /// /// The schedule must have a greater version than the stored schedule. - fn update_schedule(schedule: Schedule) -> Result { + pub fn update_schedule(schedule: Schedule) -> Result { if >::current_schedule().version >= schedule.version { return Err("new schedule must have a greater version than current"); } @@ -338,7 +338,7 @@ decl_module! { /// Stores the given binary Wasm code into the chain's storage and returns its `codehash`. /// You can instantiate contracts only with stored code. - fn put_code( + pub fn put_code( origin, #[compact] gas_limit: T::Gas, code: Vec @@ -365,7 +365,7 @@ decl_module! { /// * If the account is a regular account, any value will be transferred. /// * If no account exists and the call value is not less than `existential_deposit`, /// a regular account will be created and any value will be transferred. - fn call( + pub fn call( origin, dest: ::Source, #[compact] value: BalanceOf, @@ -421,7 +421,7 @@ decl_module! { /// after the execution is saved as the `code` of the account. That code will be invoked /// upon any call received by this account. /// - The contract is initialized. - fn create( + pub fn create( origin, #[compact] endowment: BalanceOf, #[compact] gas_limit: T::Gas,