diff --git a/docs/build/isc/v1.1/docs/how-tos/core-contracts/basics/get-balance.md b/docs/build/isc/v1.1/docs/how-tos/core-contracts/basics/get-balance.md index 8ab06fafb02..9b3eceec362 100644 --- a/docs/build/isc/v1.1/docs/how-tos/core-contracts/basics/get-balance.md +++ b/docs/build/isc/v1.1/docs/how-tos/core-contracts/basics/get-balance.md @@ -42,33 +42,7 @@ uint256 nfts = ISC.accounts.getL2NFTAmount(agentID); ### Full Example Code -```solidity -// SPDX-License-Identifier: MIT - -pragma solidity ^0.8.0; - -import "@iota/iscmagic/ISC.sol"; - -contract GetBalance { - event GotAgentID(bytes agentID); - event GotBaseBalance(uint64 baseBalance); - event GotNativeTokenBalance(uint256 nativeTokenBalance); - event GotNFTIDs(uint256 nftBalance); - - function getBalance(bytes memory nativeTokenID) public { - ISCAgentID memory agentID = ISC.sandbox.getSenderAccount(); - emit GotAgentID(agentID.data); - - uint64 baseBalance = ISC.accounts.getL2BalanceBaseTokens(agentID); - emit GotBaseBalance(baseBalance); - - NativeTokenID memory id = NativeTokenID({ data: nativeTokenID}); - uint256 nativeTokens = ISC.accounts.getL2BalanceNativeTokens(id, agentID); - emit GotNativeTokenBalance(nativeTokens); - - uint256 nfts = ISC.accounts.getL2NFTAmount(agentID); - emit GotNFTIDs(nfts); - } -} +```solidity reference +https://github.com/iotaledger/wasp/blob/develop/packages/evm/evmtest/wiki_how_tos/GetBalance.sol ``` diff --git a/docs/build/isc/v1.3/docs/how-tos/core-contracts/basics/get-balance.md b/docs/build/isc/v1.3/docs/how-tos/core-contracts/basics/get-balance.md index 8ab06fafb02..9b3eceec362 100644 --- a/docs/build/isc/v1.3/docs/how-tos/core-contracts/basics/get-balance.md +++ b/docs/build/isc/v1.3/docs/how-tos/core-contracts/basics/get-balance.md @@ -42,33 +42,7 @@ uint256 nfts = ISC.accounts.getL2NFTAmount(agentID); ### Full Example Code -```solidity -// SPDX-License-Identifier: MIT - -pragma solidity ^0.8.0; - -import "@iota/iscmagic/ISC.sol"; - -contract GetBalance { - event GotAgentID(bytes agentID); - event GotBaseBalance(uint64 baseBalance); - event GotNativeTokenBalance(uint256 nativeTokenBalance); - event GotNFTIDs(uint256 nftBalance); - - function getBalance(bytes memory nativeTokenID) public { - ISCAgentID memory agentID = ISC.sandbox.getSenderAccount(); - emit GotAgentID(agentID.data); - - uint64 baseBalance = ISC.accounts.getL2BalanceBaseTokens(agentID); - emit GotBaseBalance(baseBalance); - - NativeTokenID memory id = NativeTokenID({ data: nativeTokenID}); - uint256 nativeTokens = ISC.accounts.getL2BalanceNativeTokens(id, agentID); - emit GotNativeTokenBalance(nativeTokens); - - uint256 nfts = ISC.accounts.getL2NFTAmount(agentID); - emit GotNFTIDs(nfts); - } -} +```solidity reference +https://github.com/iotaledger/wasp/blob/develop/packages/evm/evmtest/wiki_how_tos/GetBalance.sol ```