Skip to content

Commit

Permalink
Update examples based on PR comments
Browse files Browse the repository at this point in the history
  • Loading branch information
bitzoic committed Nov 3, 2023
1 parent 3a76cc1 commit f1c99af
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 11 deletions.
14 changes: 8 additions & 6 deletions examples/src_3/multi_asset/src/multi_asset.sw
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,11 @@ impl SRC3 for Contract {
///
/// ```sway
/// use src3::SRC3;
/// use std::constants::ZERO_B256;
///
/// fn foo(contract: ContractId) {
/// let contract_abi = abi(SR3, contract);
/// contract_abi.mint(Identity::ContractId(this_contract()), ZERO_B256, 100);
/// fn foo(contract_id: ContractId) {
/// let contract_abi = abi(SR3, contract_id);
/// contract_abi.mint(Identity::ContractId(contract_id), ZERO_B256, 100);
/// }
/// ```
#[storage(read, write)]
Expand Down Expand Up @@ -97,13 +98,14 @@ impl SRC3 for Contract {
///
/// ```sway
/// use src3::SRC3;
/// use std::constants::ZERO_B256;
///
/// fn foo(contract: ContractId, asset_id: AssetId) {
/// let contract_abi = abi(SR3, contract);
/// fn foo(contract_id: ContractId, asset_id: AssetId) {
/// let contract_abi = abi(SR3, contract_id);
/// contract_abi {
/// gas: 10000,
/// coins: 100,
/// asset_id: AssetId,
/// asset_id: asset_id,
/// }.burn(ZERO_B256, 100);
/// }
/// ```
Expand Down
12 changes: 7 additions & 5 deletions examples/src_3/single_asset/src/single_asset.sw
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,11 @@ impl SRC3 for Contract {
///
/// ```sway
/// use src3::SRC3;
/// use std::constants::ZERO_B256;
///
/// fn foo(contract: ContractId) {
/// fn foo(contract_id: ContractId) {
/// let contract_abi = abi(SR3, contract);
/// contract_abi.mint(Identity::ContractId(this_contract()), ZERO_B256, 100);
/// contract_abi.mint(Identity::ContractId(contract_id), ZERO_B256, 100);
/// }
/// ```
#[storage(read, write)]
Expand Down Expand Up @@ -89,13 +90,14 @@ impl SRC3 for Contract {
///
/// ```sway
/// use src3::SRC3;
/// use std::constants::ZERO_B256;
///
/// fn foo(contract: ContractId, asset_id: AssetId) {
/// let contract_abi = abi(SR3, contract);
/// fn foo(contract_id: ContractId, asset_id: AssetId) {
/// let contract_abi = abi(SR3, contract_id);
/// contract_abi {
/// gas: 10000,
/// coins: 100,
/// asset_id: AssetId,
/// asset_id: asset_id,
/// }.burn(ZERO_B256, 100);
/// }
/// ```
Expand Down

0 comments on commit f1c99af

Please sign in to comment.