Open
Description
not very clear where to put <ContractType>Ext
doc itself
EDIT: it should be a sub-heading under #[near] macro documentation, peer (at the same heading level as) to attributes such as #[private] and what not
This task should describe, that this structure is created for all contracts, and what's the purpose of each method,
and how its methods signatures can be looked up on generated cargo doc --lib
for contract
#[must_use]
pub struct CrossContractExt {
pub(crate) account_id: ::near_sdk::AccountId,
pub(crate) deposit: ::near_sdk::NearToken,
pub(crate) static_gas: ::near_sdk::Gas,
pub(crate) gas_weight: ::near_sdk::GasWeight,
}
impl CrossContractExt {
pub fn with_attached_deposit(mut self, amount: ::near_sdk::NearToken) -> Self {
/// ...
}
pub fn with_static_gas(mut self, static_gas: ::near_sdk::Gas) -> Self {
/// ...
}
pub fn with_unused_gas_weight(mut self, gas_weight: u64) -> Self {
/// ...
}
}
impl CrossContract {
/// API for calling this contract's functions in a subsequent execution.
pub fn ext(account_id: ::near_sdk::AccountId) -> CrossContractExt {
/// ....
}
}
impl CrossContractExt {
pub fn contract_source_metadata(self) -> ::near_sdk::Promise {
/// ...
}
}
impl CrossContractExt {
pub fn method_one(self, n: u32) -> ::near_sdk::Promise {}
pub fn method_two(self, n: u32) -> ::near_sdk::Promise {
/// ...
}
}
links:
<ContractType>Ext
=> [near_sdk::Promise]- anchor of
#[near(contract_state)]
attribute =><ContractType>Ext
, and mentions, what parts of it specifically get defined bycontract_state
- anchor of
#[near]
on impl blocks =><ContractType>Ext
, and mentions, what parts of it specifically get defined by#[near]
on impl blocks
Metadata
Metadata
Assignees
Type
Projects
Status
NEW❗