mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-11 22:21:07 +00:00
srml-contracts: minor documentation improvements (#3086)
* fix typos * update information about ink * fix typos * fix typo * fix typos
This commit is contained in:
@@ -14,7 +14,7 @@
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Substrate. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
//! Auxilliaries to help with managing partial changes to accounts state.
|
||||
//! Auxiliaries to help with managing partial changes to accounts state.
|
||||
|
||||
use super::{
|
||||
AliveContractInfo, BalanceOf, CodeHash, ContractInfo, ContractInfoOf, Trait, TrieId,
|
||||
|
||||
@@ -69,7 +69,7 @@ pub trait Ext {
|
||||
/// Instantiate a contract from the given code.
|
||||
///
|
||||
/// The newly created account will be associated with `code`. `value` specifies the amount of value
|
||||
/// transfered from this to the newly created account (also known as endowment).
|
||||
/// transferred from this to the newly created account (also known as endowment).
|
||||
fn instantiate(
|
||||
&mut self,
|
||||
code: &CodeHash<Self::T>,
|
||||
@@ -78,7 +78,7 @@ pub trait Ext {
|
||||
input_data: &[u8],
|
||||
) -> Result<InstantiateReceipt<AccountIdOf<Self::T>>, &'static str>;
|
||||
|
||||
/// Call (possibly transfering some amount of funds) into the specified account.
|
||||
/// Call (possibly transferring some amount of funds) into the specified account.
|
||||
fn call(
|
||||
&mut self,
|
||||
to: &AccountIdOf<Self::T>,
|
||||
@@ -102,7 +102,7 @@ pub trait Ext {
|
||||
/// The `value_transferred` is already added.
|
||||
fn balance(&self) -> BalanceOf<Self::T>;
|
||||
|
||||
/// Returns the value transfered along with this call or as endowment.
|
||||
/// Returns the value transferred along with this call or as endowment.
|
||||
fn value_transferred(&self) -> BalanceOf<Self::T>;
|
||||
|
||||
/// Returns a reference to the timestamp of the current block
|
||||
@@ -304,7 +304,7 @@ where
|
||||
}
|
||||
}
|
||||
|
||||
/// Make a call to the specified address, optionally transfering some funds.
|
||||
/// Make a call to the specified address, optionally transferring some funds.
|
||||
pub fn call(
|
||||
&mut self,
|
||||
dest: T::AccountId,
|
||||
@@ -504,7 +504,7 @@ enum TransferCause {
|
||||
///
|
||||
/// This function also handles charging the fee. The fee depends
|
||||
/// on whether the transfer happening because of contract instantiation
|
||||
/// (transfering endowment) or because of a transfer via `call`. This
|
||||
/// (transferring endowment) or because of a transfer via `call`. This
|
||||
/// is specified using the `cause` parameter.
|
||||
///
|
||||
/// NOTE: that the fee is denominated in `BalanceOf<T>` units, but
|
||||
|
||||
@@ -274,7 +274,7 @@ macro_rules! match_tokens {
|
||||
// have an iterator of Box<dyn Any> and to downcast we need to specify
|
||||
// the type which we want downcast to.
|
||||
//
|
||||
// So what we do is we assign `_pattern_typed_next_ref` to the a variable which has
|
||||
// So what we do is we assign `_pattern_typed_next_ref` to a variable which has
|
||||
// the required type.
|
||||
//
|
||||
// Then we make `_pattern_typed_next_ref = token.downcast_ref()`. This makes
|
||||
@@ -366,7 +366,7 @@ mod tests {
|
||||
// Make sure that if the gas meter is charged by exceeding amount then not only an error
|
||||
// returned for that charge, but also for all consequent charges.
|
||||
//
|
||||
// This is not striclty necessary, because the execution should be interrupred immediatelly
|
||||
// This is not strictly necessary, because the execution should be interrupted immediately
|
||||
// if the gas meter runs out of gas. However, this is just a nice property to have.
|
||||
#[test]
|
||||
fn overcharge_is_unrecoverable() {
|
||||
|
||||
@@ -68,7 +68,8 @@
|
||||
//! The Contract module is a work in progress. The following examples show how this Contract module can be
|
||||
//! used to create and call contracts.
|
||||
//!
|
||||
//! * [`pDSL`](https://github.com/Robbepop/pdsl) is a domain specific language that enables writing
|
||||
//! * [`ink`](https://github.com/paritytech/ink) is
|
||||
//! an [`eDSL`](https://wiki.haskell.org/Embedded_domain_specific_language) that enables writing
|
||||
//! WebAssembly based smart contracts in the Rust programming language. This is a work in progress.
|
||||
//!
|
||||
//! ## Related Modules
|
||||
@@ -158,7 +159,7 @@ impl<T: Trait> ContractInfo<T> {
|
||||
}
|
||||
}
|
||||
|
||||
/// If contract is tombstone then return some alive info
|
||||
/// If contract is tombstone then return some tombstone info
|
||||
pub fn get_tombstone(self) -> Option<TombstoneContractInfo<T>> {
|
||||
if let ContractInfo::Tombstone(tombstone) = self {
|
||||
Some(tombstone)
|
||||
@@ -313,7 +314,7 @@ pub trait Trait: timestamp::Trait {
|
||||
/// by the Executive module for regular dispatch.
|
||||
type ComputeDispatchFee: ComputeDispatchFee<Self::Call, BalanceOf<Self>>;
|
||||
|
||||
/// trieid id generator
|
||||
/// trie id generator
|
||||
type TrieIdGenerator: TrieIdGenerator<Self::AccountId>;
|
||||
|
||||
/// Handler for the unbalanced reduction when making a gas payment.
|
||||
@@ -321,7 +322,7 @@ pub trait Trait: timestamp::Trait {
|
||||
|
||||
/// Number of block delay an extrinsic claim surcharge has.
|
||||
///
|
||||
/// When claim surchage is called by an extrinsic the rent is checked
|
||||
/// When claim surcharge is called by an extrinsic the rent is checked
|
||||
/// for current_block - delay
|
||||
type SignedClaimHandicap: Get<Self::BlockNumber>;
|
||||
|
||||
@@ -421,7 +422,7 @@ decl_module! {
|
||||
pub struct Module<T: Trait> for enum Call where origin: <T as system::Trait>::Origin {
|
||||
/// Number of block delay an extrinsic claim surcharge has.
|
||||
///
|
||||
/// When claim surchage is called by an extrinsic the rent is checked
|
||||
/// When claim surcharge is called by an extrinsic the rent is checked
|
||||
/// for current_block - delay
|
||||
const SignedClaimHandicap: T::BlockNumber = T::SignedClaimHandicap::get();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user