diff --git a/cli/package.json b/cli/package.json index df60db98c2a..f5ab0f1324f 100644 --- a/cli/package.json +++ b/cli/package.json @@ -21,7 +21,7 @@ "prepack": "yarn build" }, "dependencies": { - "@babel/generator": "^7.25.0", + "@babel/generator": "^7.25.6", "@babel/parser": "^7.24.7", "@babel/types": "^7.23.6", "@iota-wiki/core": "workspace:^", diff --git a/config/versionedConfig.js b/config/versionedConfig.js index 744d29f0788..429d758f5fe 100644 --- a/config/versionedConfig.js +++ b/config/versionedConfig.js @@ -27,12 +27,12 @@ exports.buildPluginsConfig = [ subsection: 'build-layer-2', versions: [ { - label: 'v1.1', - banner: 'unmaintained', + label: 'v1.3', + badges: ['IOTA'], }, { - label: 'v1.3', - badges: ['IOTA', 'Shimmer', 'Testnet'], + label: 'v1.4', + badges: ['Shimmer', 'Testnet'], }, ], }, @@ -153,12 +153,12 @@ exports.maintainPluginsConfig = [ subsection: 'maintain-layer-2', versions: [ { - label: 'v1.1', - banner: 'unmaintained', + label: 'v1.3', + badges: ['IOTA'], }, { - label: 'v1.3', - badges: ['IOTA', 'Shimmer', 'Testnet'], + label: 'v1.4', + badges: ['Shimmer', 'Testnet'], }, ], }, diff --git a/docs/build/isc/v1.1/docs/_admonitions/_mint-nft.md b/docs/build/isc/v1.1/docs/_admonitions/_mint-nft.md deleted file mode 100644 index 1ed17749708..00000000000 --- a/docs/build/isc/v1.1/docs/_admonitions/_mint-nft.md +++ /dev/null @@ -1,5 +0,0 @@ -:::tip Mint an NFT - -Mint your first NFT following our how to [mint an NFT guide](../how-tos/core-contracts/nft/mint-nft.md#about-nfts). - -::: \ No newline at end of file diff --git a/docs/build/isc/v1.3/docs/how-tos/core-contracts/token/erc20-native-token.md b/docs/build/isc/v1.3/docs/how-tos/core-contracts/token/erc20-native-token.md index eef11254681..af60eca098f 100644 --- a/docs/build/isc/v1.3/docs/how-tos/core-contracts/token/erc20-native-token.md +++ b/docs/build/isc/v1.3/docs/how-tos/core-contracts/token/erc20-native-token.md @@ -10,7 +10,7 @@ tags: # Custom ERC20 Functions -Once you [registered your native token as ERC20](./erc20-native-token.md) you can use it like any other ERC20 token, with functions like +Once you [created your token](./create-native-token.md) it is automatically registered as ERC20 token and you can use it like any other ERC20 token, with functions like `transfer`, `balanceOf`, etc. But, as the ERC20 token maps the native token on L2, there are some additional ISC features you can take advantage of. diff --git a/docs/build/isc/v1.3/docs/tutorials/cross-chain-nft-marketplace-part-3.md b/docs/build/isc/v1.3/docs/tutorials/cross-chain-nft-marketplace-part-3.md new file mode 100644 index 00000000000..9028b56361a --- /dev/null +++ b/docs/build/isc/v1.3/docs/tutorials/cross-chain-nft-marketplace-part-3.md @@ -0,0 +1,316 @@ +#  Cross-chain NFT Marketplace: Part III + +This is the third part of the Cross-chain NFT Marketplace tutorial series, that will guide you to how to evolve the marketplace to handle cross-chain NFT transfers. + +[Part I](https://wiki.iota.org/isc/tutorials/cross-chain-nft-marketplace-part-1/) already covered the project's setup and the deployment of the NFT marketplace contract on the ShimmerEVM Testnet. + +[Part II](https://wiki.iota.org/isc/tutorials/cross-chain-nft-marketplace-part-2/) guided you on how to manually bridge NFTs from the BNB Testnet to the ShimmerEVM Testnet and list them on the NFT marketplace. + +This final part will evolve the marketplace's architecture to handle cross-chain NFT transfers. You will deploy the necessary contracts on the BNB Testnet and the ShimmerEVM Testnet and configure them to send and receive NFTs across chains. You will also create scripts to automate sending and receiving NFTs across chains. + +## Prerequisites + +- [Node.js](https://nodejs.org) >=  v18.0 +- [Hardhat](https://hardhat.org) >= v2.0.0 +- [npx](https://www.npmjs.com/package/npx)  >= v7.1.0. +- The code for this part of the tutorial is based on [Part I](https://wiki.iota.org/isc/tutorials/cross-chain-nft-marketplace-part-1/) and [Part II](https://wiki.iota.org/isc/tutorials/cross-chain-nft-marketplace-part-2/) of the tutorial series. + + +## Configuration + +You can use the same `hardhat.config.js` file from [Part I](https://wiki.iota.org/isc/tutorials/cross-chain-nft-marketplace-part-1/). + +```javascript reference +https://github.com/iota-community/ISC-Cross-Chain-NFT-Marketplace/blob/main/hardhat.config.js +``` + +## Contracts Architecture + +![Contract Archicteture](../../../../../../static/img/tutorials/cross_chain_marketplace/Architecture-V3.png) + +In addition to the marketplace contract, you will deploy additional contracts to handle cross-chain NFT transfers and messages. To put things into perspective, here is the flow of the cross-chain NFT buying process from a user on BNB Testnet to the marketplace on ShimmerEVM Testnet: + +### Flow +1- A user `Alice` on ShimmerEVM Testnet lists an NFT on the marketplace. The NFT is an `ONFT` so that the NFT can be transferred across chains. The NFT can also be a normal ERC721 token, but in this case, a proxy contract must be used to transfer the NFT across chains. + +2- A user `Bob` with some ERC20 tokens, an `OFT`, on the BNB Testnet wants to buy an NFT listed on the marketplace on the ShimmerEVM Testnet. +3- `Bob` allows the `CrossChainAgent` contract on the BNB Testnet to transfer the required amount of ERC20 to itself. Note that ERC20 tokens are an `OFT` that can be transferred across chains themselves. +4- The user calls `buyCrossChain` on the `CrossChainAgent` contract with the required amount of ERC20 tokens and the NFT ID. +5- The `CrossChainAgent` contract sends a message to the `CrossChainAgent` contract on the ShimmerEVM Testnet with the user's address and the NFT Address and token ID. +6- The `CrossChainAgent` contract on the ShimmerEVM Testnet receives the message, does some checks, and then calls the `buyItemCrossChain` function on the marketplace contract to complete the purchase. +7- The marketplace contract interacts with the corresponding ONFT contract to transfer the NFT to the user. + +:::note + +The flow doesn't include transferring ERC20 tokens across chains. The `CrossChainAgent` contract receives the ERC20 tokens on the BNB Testnet and sends a message to the `CrossChainAgent` contract on the ShimmerEVM Testnet. This can be done, but it would add more complexity to the flow. + +::: + + +### MyOFT.sol + +A simple ERC20 token contract that you will deploy on the BNB Testnet and the ShimmerEVM Testnet. This will be used as the currency for buying NFTs on the marketplace. + +```solidity reference +https://github.com/iota-community/ISC-Cross-Chain-NFT-Marketplace/blob/main/contracts/CrossChainToken.sol +``` + +### CrossChainAgent.sol + +The `CrossChainAgent` contract is responsible for sending and receiving messages across chains. It is deployed on both the BNB Testnet and the ShimmerEVM Testnet. The contract has two main functions: + +1. `buyCrossChain`: This function is called by the user on the BNB Testnet to send a message to the `CrossChainAgent` contract on the ShimmerEVM Testnet with the user's address and the NFT Address and token ID. It transfers the required amount of ERC20 tokens to the `CrossChainAgent` contract on the BNB Testnet, and calls `_lzsend` to send a message to the `CrossChainAgent` contract on the ShimmerEVM Testnet. + +```Solidity +/// @notice this function is to be called by the user to buy an NFT on BNB +    function buyCrossChain( +        uint16 _dstChainId, +        address _user, +        address _tokenAddress, +        address _nftAddress, +        uint256 _amount, +        uint256 _tokenId, +        address payable refundAddress, +        bytes memory adapterParams + ) public payable { + +        IERC20(_tokenAddress).transferFrom(_user, address(this), _amount); + +        // Update user balance on this chain + balances[_user] += _amount; + +        // Encode the payload with the required data +        bytes memory payload = abi.encode( +            abi.encodePacked(_user), + _amount, + _nftAddress, + _tokenId + ); + +        // Send the payload to the agent on Shimmer +        _lzSend(_dstChainId, payload, refundAddress, address(0x0), adapterParams, msg.value); + } +``` + +2. `_nonblockingLzReceive`: This function is called by the LayerZero endpoint on the destination chain upon the receipt of a message. You should override this function in the `CrossChainAgent` contract Testnet to call the `_notifyMarketPlace` function on the marketplace contract to complete the purchase. + +```solidity +/// @notice This function is called by LayerZero when a cross-chain message is received +    function _nonblockingLzReceive( +        uint16 , +        bytes memory , +        uint64 _nonce, +        bytes memory _payload + ) internal override { +        // Decode the payload + (bytes memory toAddressBytes, uint256 amount, address tokenAddress, uint256 tokenId) = abi.decode(_payload, (bytes, uint256, address, uint256)); + +        // Convert toAddressBytes to an address +        address to; +        assembly { + to := mload(add(toAddressBytes, 20)) + } + +        // Increment the user's balance + balances[to] += amount; + +        // Emit events +        emit CustomMessageReceived(amount, tokenAddress, tokenId, to); +        emit EmitPayload(_payload); + +        // Notify the marketplace that the balance is updated (this could be another cross-chain message) +        _notifyMarketplace(tokenAddress, tokenId, to, balances[to]); + } +``` + +The full contract code is as follows: + +```solidity reference +https://github.com/iota-community/ISC-Cross-Chain-NFT-Marketplace/blob/main/contracts/CrossChainAgent.sol +``` + +### NFTMarketPlaceV2.sol + +The `NFTMarketPlaceV2` contract is an updated version of the `NFTMarketPlace` contract that you deployed in [Part I](https://wiki.iota.org/isc/tutorials/cross-chain-nft-marketplace-part-1/). This version includes a new function `buyItemCrossChain` that is called by the `CrossChainAgent` contract on the ShimmerEVM Testnet to complete the purchase of an NFT. + +The function checks if the item is listed and available and if the user has enough balance to complete the purchase. It then transfers the NFT to the user by calling the NFT's proxy contract (the contract responsible for transferring the NFT cross-chain). The user's balance is updated, and the item's availability is set to false. + +```solidity +    function buyItemCrossChain( +        address nftAddress, +        uint256 tokenId, +        address payable buyer, +        uint256 amount + ) external nonReentrant isListed(nftAddress, tokenId) { + Listing memory listedItem = s_listings[nftAddress][tokenId]; + +        _validateAmount(amount, listedItem.price, nftAddress, tokenId); + +        delete s_listings[nftAddress][tokenId]; + +        _approveNFT(listedItem.proxyContract, nftAddress, tokenId); + +        bytes memory adapterParams = _createAdapterParams(buyer); + +        uint256 fee = _estimateFee(listedItem.proxyContract, buyer, tokenId, adapterParams); + +        _sendNFT(listedItem, buyer, tokenId, adapterParams, fee); + + s_proceeds[listedItem.seller] += amount; + +        emit ItemBought(msg.sender, nftAddress, tokenId, listedItem.price); + } +``` + +The full contract code is as follows: + +```solidity reference +https://github.com/iota-community/ISC-Cross-Chain-NFT-Marketplace/blob/main/contracts/NFTMarketPlaceV2.sol +``` + + +## Scripts + +You will add scripts that perform the following tasks in order: + +1. [Deploy the `NFTMarketPlaceV2` contract to the ShimmerEVM Testnet.](#deploy-nftmarketplacev2) + +2. [Deploy an `ONFT721` contract on ShimmerEVM Testnet and BNB Testnet, and configure them to send and receive NFTs across chains.](#deploy-onft721) + +3. [Mint an NFT (from the `ONFT` contract), allow the marketplace to spend it then list it on the marketplace.](#mint-an-nft-and-list-it-on-the-marketplace) + +4. [Deploy the `CrossChainAgent` contract to the BNB Testnet and the ShimmerEVM Testnet.](#deploy-the-crosschainagent-contract) + +5. [Configure the `CrossChainAgent` contract on the BNB Testnet to send messages to the `CrossChainAgent` contract on the ShimmerEVM Testnet.](#configure-crosschainagent) + +6. [Call the `buyCrossChain` function on the `CrossChainAgent` contract on the BNB Testnet to buy the NFT listed on the marketplace on the ShimmerEVM Testnet.](#call-buycrosschain-to-buy-the-nft) + +### Deploy NFTMarketPlaceV2 + +This script will deploy the `MarketPlaceV2` contract to the Shimmer Testnet, and save the contract's address to a file called `MarketplaceV2_Shimmer.txt`. + + +```javascript reference +https://github.com/iota-community/ISC-Cross-Chain-NFT-Marketplace/blob/main/scripts/deploy_marketplace_v2_shimmer.js +``` +You can run this script with the following command: + +```bash +npx hardhat run scripts/deploy_marketplace_v2_shimmer.js --network shimmerevm-testnet +``` + +### Deploy ONFT721 + +The next step is to deploy the `ONFT721` contract to the ShimmerEVM Testnet and the BNB Testnet. The `ONFT721` contract is an ERC721 contract that can send and receive NFTs across chains. + +```javascript reference +https://github.com/iota-community/ISC-Cross-Chain-NFT-Marketplace/blob/main/scripts/deploy_onft_shimmer.js +``` + +You can run both scripts by executing the following commands: + +```bash +npx hardhat run scripts/deploy_onft_shimmer.js --network shimmerevm-testnet +npx hardhat run scripts/deploy_onft_bnb.js  --network bnbTestnet +``` + +### Set the Trusted Remote Addresses of ONFT on BNB and Shimmer + +After deploying the ONFT contracts, you need to connect them by caling `setTrustedRemoteAddress` on the `ONFT721` contract on the ShimmerEVM Testnet and BNB Testnet. + +```javascript reference +https://github.com/iota-community/ISC-Cross-Chain-NFT-Marketplace/blob/main/scripts/set_trusted_remote_shimmer.js +``` + +```javascript reference +https://github.com/iota-community/ISC-Cross-Chain-NFT-Marketplace/blob/main/scripts/set_trusted_remote_bnb.js +``` + +You can run the script by executing the following commands: + +```bash +npx hardhat run scripts/set_trusted_remote_bnb.js --network bnbTestnet +npx hardhat run scripts/set_trusted_remote_shimmer.js --network shimmerevm-testnet +``` + +### Mint an NFT and List It on the Marketplace + +After you deploy and configure the `ONFT721` contracts, you can mint an NFT, allow the marketplace to spend it, and list it on the marketplace using the following scripts: + +```javascript reference +https://github.com/iota-community/ISC-Cross-Chain-NFT-Marketplace/blob/main/scripts/mint_nft_shimmer.js +``` + +```javascript reference +https://github.com/iota-community/ISC-Cross-Chain-NFT-Marketplace/blob/main/scripts/approve_myERC721_for_marketplace.js +``` + +You can run the scripts by executing the following commands: + +```bash +npx hardhat run scripts/mint_nft_shimmer.js --network shimmerevm-testnet +npx hardhat run scripts/approve_myERC721_for_marketplace.js --network shimmerevm-testnet +``` + +### Deploy the `CrossChainAgent` Contract + +Once you have an NFT listed on the marketplace, you need to deploy the `CrossChainAgent` contract to the BNB Testnet and the ShimmerEVM Testnet. + + +```javascript reference +https://github.com/iota-community/ISC-Cross-Chain-NFT-Marketplace/blob/main/scripts/deploy_messanger_bnb.js +``` + +```javascript reference +https://github.com/iota-community/ISC-Cross-Chain-NFT-Marketplace/blob/main/scripts/deploy_messanger_shimmer.js +``` + +You can run the scripts by executing the following commands: + +```bash +npx hardhat run scripts/deploy_messanger_shimmer.js --network shimmerevm-testnet +npx hardhat run scripts/deploy_messanger_bnb.js --network bnbTestnet +``` + +### Configure the `CrossChainAgent` Contracts + +After deploying the `CrossChainAgent` contracts, you need to configure the `CrossChainAgent` contract on the BNB Testnet to send messages to the `CrossChainAgent` contract on the ShimmerEVM Testnet. This is the same process as setting the trusted remote address for the `ONFT721` contracts. + +```javascript reference +https://github.com/iota-community/ISC-Cross-Chain-NFT-Marketplace/blob/main/scripts/set_trusted_remote_agent_bnb.js +``` + +```javascript reference +https://github.com/iota-community/ISC-Cross-Chain-NFT-Marketplace/blob/main/scripts/set_trusted_remote_agent_shimmer.js +``` + +You can run the scripts by executing the following commands: + +```bash +npx hardhat run scripts/set_trusted_remote_agent_bnb.js  --network bnbTestnet +npx hardhat run scripts/set_trusted_remote_agent_shimmer.js --network shimmerevm-testnet +``` + +### Call `buyCrossChain` to buy the NFT + +Finally, on the BNB Tetnet, call the `CrossChainAgent` contract to buy the NFT listed on the marketplace on the ShimmerEVM Testnet. + +```javascript reference +https://github.com/iota-community/ISC-Cross-Chain-NFT-Marketplace/blob/main/scripts/send_msg_bnb.js +``` +You can run the script by executing the following command: + +```bash +npx hardhat run scripts/send_msg_bnb.js  --network bnbTestnet +``` + + +:::note +For the OFTs, we are using the `MyOFT` contract, which is a simple ERC20 token contract. You can deploy this contract to the BNB Testnet and the ShimmerEVM Testnet using the same process as the `ONFT721` contract. +::: + + + +## Conclusion + +In the third part of the tutorial, you have automated the buy flow of the cross-chain NFT marketplace. You deployed the necessary contracts on the BNB Testnet and the ShimmerEVM Testnet and configured them to send and receive NFTs across chains. \ No newline at end of file diff --git a/docs/build/isc/v1.3/docs/tutorials/defi-yield-farming.md b/docs/build/isc/v1.3/docs/tutorials/defi-yield-farming.md new file mode 100644 index 00000000000..128997b73dd --- /dev/null +++ b/docs/build/isc/v1.3/docs/tutorials/defi-yield-farming.md @@ -0,0 +1,193 @@ +--- +description: Yield Farming Tutorial Using Solidity. +image: /img/logo/WASP_logo_dark.png +tags: + - EVM + - tutorial + - defi + - yield-farming +--- + +import DeployAdmonition from '../_admonitions/_deploy_a_smart_contract.md'; + +# Yield Farming DApp with Pyth Network Price Feeds + +## Introduction + +This tutorial will guide you through the process of building a basic yield farming decentralized application (DApp) using [Solidity](https://docs.soliditylang.org/en/v0.8.26/), the [Hardhat](https://hardhat.org/) development environment and the [Pyth Network Price Feeds](/build/oracles/#pyth) to retrieve the IOTA/USD price feed to calculate rewards for stakers. + +## What is Yield Farming? + +Yield farming, also known as liquidity mining, is a way for users to earn passive income by providing liquidity to a blockchain protocol. This involves depositing assets into a protocol, which in return offers rewards in the form of fees, interest, or other incentives. For example, users can supply liquidity to a decentralized lending platform or a decentralized exchange that operates on an Automated Market Maker (AMM) model, earning rewards in return. + +At its core, yield farming allows cryptocurrency holders to lock up their assets, generating rewards in the process. + +### Key Concepts Covered + +1. **ERC20 Tokens**: Both the reward and staking tokens are standard ERC20 tokens. +2. **Staking Mechanism**: Users can deposit (stake) IOTATokens into the TokenFarm contract. +3. **Unstaking Mechanism**: Users can withdraw (unstake) their staked tokens at any time. +4. **Reward Distribution**: The contract periodically distributes DappTokens as rewards to stakers. + +## Yield Farming Architecture Overview + +![DeFi Yield Farming](../../../../../../static/img/tutorials/defi_yield_farming/Architecture.png) + +## Prerequisites + +- [Node.js](https://nodejs.org) >= v18.0 +- [Hardhat](https://hardhat.org) >= v2.0.0 +- [npx](https://www.npmjs.com/package/npx) >= v7.1.0. +- Basic understanding of Solidity and smart contracts. + +## 1. Set Up the Hardhat Project + +First, create a new directory for the project and navigate into it: + +```bash +mkdir yield-farming +cd yield-farming +``` + +Then [bootsrap a new Hardhat project](https://hardhat.org/tutorial/creating-a-new-hardhat-project), by running: + +```bash +npx hardhat init +``` + +Follow the prompts to create a basic sample project. After that, install the necessary dependencies: + +```bash +npm install --save-dev @nomiclabs/hardhat-ethers ethers @openzeppelin/contracts dotenv +``` + +Pyth provides a [Solidity SDK](https://github.com/pyth-network/pyth-crosschain/tree/main/target_chains/ethereum/sdk/solidity) to fetch prices from Pyth contracts. The SDK exposes IPyth interface to interact with Pyth price feeds. + +```bash +npm install @pythnetwork/pyth-sdk-solidity +``` + +## 2. Write and Understand the Smart Contracts + +Create a `contracts` folder in the root of the project and add the following files under it: + +### 1. DappToken.sol + +#### Description + +This contract represents the reward token (DappToken) that users will earn as a reward for staking their IOTATokens. It is an [ERC20](https://ethereum.org/en/developers/docs/standards/tokens/erc-20/) token, which is a widely used token standard on EVM compatible blockchains. The contract inherits from [OpenZeppelin’s](https://www.openzeppelin.com/) ERC20 implementation, which provides standard functionalities for a fungible token. + +```solidity reference +https://github.com/iota-community/Defi-yield-farming/blob/main/contracts/DappToken.sol +``` + +#### Key Details + +- The constructor mints an initial supply of 1,000,000 tokens to the deployer's address. +- The token is named "DappToken" with the symbol "DAP". + +### 2. IOTAToken.sol + +#### Description + +This contract represents the token that users will stake in the yield farm (IOTAToken). Like the DappToken, this is also an [ERC20](https://ethereum.org/en/developers/docs/standards/tokens/erc-20/) token. The IOTAToken will be transferred to the TokenFarm contract when users stake their tokens. + +```solidity reference +https://github.com/iota-community/Defi-yield-farming/blob/main/contracts/IOTAToken.sol +``` + +#### Key Details + +- The constructor mints an initial supply of 1,000,000 tokens to the deployer's address. +- The token is named "IOTAToken" with the symbol "TST". + +### 3. TokenFarm.sol + +#### Description + +This is the core contract of the yield farming application. It manages the staking, unstaking, and reward distribution logic. Users can stake their IOTATokens in this contract to earn DappTokens as rewards. The contract integrates with the Pyth Oracle to fetch the IOTA/USD price, which is used to calculate rewards for stakers. + +#### Key Functionalities + +- **Staking**: Users can stake their IOTATokens in the contract by calling the `stakeTokens` function. This function transfers the tokens from the user's wallet to the contract and updates their staking balance. +- **Unstaking**: Users can un-stake their tokens by calling the unstakeTokens function, which returns their tokens and resets their staking balance. +- **Rewards Distribution**: The contract owner can call the `issueTokens` function to distribute DappToken rewards to stakers. Rewards are issued once every 60 minutes, and the reward rate is 10% of the staked amount. + +#### Key Variables + +- `dappToken` and `iotaToken`: Instances of the DappToken and IOTAToken contracts, used for staking and rewarding tokens. +- `stakingBalance`: A mapping to track each user's staked IOTATokens. +- `stakers`: An array that keeps track of all users who have staked tokens. +- `hasStaked` and `isStaking`: Mappings to track whether a user has staked before and whether they are currently staking. + +#### Functions + +- `stakeTokens(uint256 _amount)`: Allows users to stake IOTATokens in the contract. +- `unstakeTokens()`: Allows users to withdraw their staked IOTATokens. +- `issueTokens()`: Allows the owner to distribute DappToken rewards to all stakers. +- `getIOTA2USDPriceFeed`: Interacts with the Pyth Oracle network to fetch the current price of IOTA in USD. This fetched price is used within the `issueTokens` function to calculate the equivalent value of rewards in DappToken. + +```solidity reference +https://github.com/iota-community/Defi-yield-farming/blob/main/contracts/TokenFarm.sol +``` + +## 3. Create a HardHat Deploy Script + +Create a deployment script to deploy the contracts to the Shimmer EVM testnet. + +In the `scripts` folder, create a file named `deploy.js` with the following content: + +```javascript reference +https://github.com/iota-community/Defi-yield-farming/blob/main/scripts/deploy.js +``` + +## 4. Deploy to the Shimmer EVM Test + +### 1. Configure Hardhat for Shimmer EVM Testnet + +Create a `.env` file with the following content, replacing your own private key: + +```bash +PRIVATE_KEY=your-private-key +SHIMMER_EVM_TESTNET_URL=https://json-rpc.evm.testnet.shimmer.network +``` + +### 2. Install the `dotenv` Package to Manage Environment Variables + +```bash +npm install dotenv +``` + +### 3. Import the `dotenv` package in your `hardhat.config.js` + +Modify `hardhat.config.js` to include the Shimmer EVM testnet configuration: + +```javascript reference +https://github.com/iota-community/Defi-yield-farming/blob/main/hardhat.config.js +``` + +## 5. Deploy to Shimmer EVM Testnet + + + +### 1. Compile Your Contracts + +```bash +npx hardhat compile +``` + +### 2. Deploy Your Contracts to the Shimmer EVM Testnet + +```bash +npx hardhat run scripts/deploy.js --network shimmer_evm_testnet +``` + +You can verify your contract by visiting +the [Shimmmer EVM Testnet Explorer](https://explorer.evm.testnet.shimmer.network/), +and searching for the address from the previous step. If you access the `Contract` tab, you should be able to see your code and interact with your contract or you can use the below command to verify the contracts through hardhat : + +```bash +npx hardhat verify --network shimmer_evm_testnet CONTRACT_ADDRESS_HERE "CONSTRUCTOR_ARGUMENTS_IF_ANY" +``` + +Feel free to [fork this repository](https://github.com/iota-community/Defi-yield-farming), contribute with pull requests, or customize it to suit your needs. We have a React [frontend](https://github.com/iota-community/Defi-yield-farming/tree/main/frontend) on the repository that you can use to interact with Token Farm smart contract. \ No newline at end of file diff --git a/docs/build/isc/v1.3/sidebars.js b/docs/build/isc/v1.3/sidebars.js index 634ee72a0cd..ebc6718750b 100644 --- a/docs/build/isc/v1.3/sidebars.js +++ b/docs/build/isc/v1.3/sidebars.js @@ -269,6 +269,11 @@ module.exports = { label: 'Part II', id: 'tutorials/cross-chain-nft-marketplace-part-2', }, + { + type: 'doc', + label: 'Part III', + id: 'tutorials/cross-chain-nft-marketplace-part-3', + }, ], }, { @@ -286,6 +291,9 @@ module.exports = { id: 'tutorials/defi-lend-borrow-tutorial-part-2', }, ], + type: 'doc', + label: 'Yield Farming', + id: 'tutorials/defi-yield-farming', }, ], }, diff --git a/docs/build/isc/v1.1/docs/_admonitions/_AgentID.md b/docs/build/isc/v1.4/docs/_admonitions/_AgentID.md similarity index 100% rename from docs/build/isc/v1.1/docs/_admonitions/_AgentID.md rename to docs/build/isc/v1.4/docs/_admonitions/_AgentID.md diff --git a/docs/build/isc/v1.1/docs/_admonitions/_ERC721.md b/docs/build/isc/v1.4/docs/_admonitions/_ERC721.md similarity index 100% rename from docs/build/isc/v1.1/docs/_admonitions/_ERC721.md rename to docs/build/isc/v1.4/docs/_admonitions/_ERC721.md diff --git a/docs/build/isc/v1.1/docs/_admonitions/_EVM-required-prior-knowledge.md b/docs/build/isc/v1.4/docs/_admonitions/_EVM-required-prior-knowledge.md similarity index 100% rename from docs/build/isc/v1.1/docs/_admonitions/_EVM-required-prior-knowledge.md rename to docs/build/isc/v1.4/docs/_admonitions/_EVM-required-prior-knowledge.md diff --git a/docs/build/isc/v1.1/docs/_admonitions/_EVM_compatibility.md b/docs/build/isc/v1.4/docs/_admonitions/_EVM_compatibility.md similarity index 100% rename from docs/build/isc/v1.1/docs/_admonitions/_EVM_compatibility.md rename to docs/build/isc/v1.4/docs/_admonitions/_EVM_compatibility.md diff --git a/docs/build/isc/v1.1/docs/_admonitions/_IRC27.md b/docs/build/isc/v1.4/docs/_admonitions/_IRC27.md similarity index 100% rename from docs/build/isc/v1.1/docs/_admonitions/_IRC27.md rename to docs/build/isc/v1.4/docs/_admonitions/_IRC27.md diff --git a/docs/build/isc/v1.1/docs/_admonitions/_about-accounts.md b/docs/build/isc/v1.4/docs/_admonitions/_about-accounts.md similarity index 100% rename from docs/build/isc/v1.1/docs/_admonitions/_about-accounts.md rename to docs/build/isc/v1.4/docs/_admonitions/_about-accounts.md diff --git a/docs/build/isc/v1.1/docs/_admonitions/_create-native-token.md b/docs/build/isc/v1.4/docs/_admonitions/_create-native-token.md similarity index 100% rename from docs/build/isc/v1.1/docs/_admonitions/_create-native-token.md rename to docs/build/isc/v1.4/docs/_admonitions/_create-native-token.md diff --git a/docs/build/isc/v1.1/docs/_admonitions/_deploy_a_smart_contract.md b/docs/build/isc/v1.4/docs/_admonitions/_deploy_a_smart_contract.md similarity index 100% rename from docs/build/isc/v1.1/docs/_admonitions/_deploy_a_smart_contract.md rename to docs/build/isc/v1.4/docs/_admonitions/_deploy_a_smart_contract.md diff --git a/docs/build/isc/v1.1/docs/_admonitions/_ownership.md b/docs/build/isc/v1.4/docs/_admonitions/_ownership.md similarity index 100% rename from docs/build/isc/v1.1/docs/_admonitions/_ownership.md rename to docs/build/isc/v1.4/docs/_admonitions/_ownership.md diff --git a/docs/build/isc/v1.1/docs/_admonitions/_payable.md b/docs/build/isc/v1.4/docs/_admonitions/_payable.md similarity index 100% rename from docs/build/isc/v1.1/docs/_admonitions/_payable.md rename to docs/build/isc/v1.4/docs/_admonitions/_payable.md diff --git a/docs/build/isc/v1.1/docs/_admonitions/_query_gas_fees.md b/docs/build/isc/v1.4/docs/_admonitions/_query_gas_fees.md similarity index 100% rename from docs/build/isc/v1.1/docs/_admonitions/_query_gas_fees.md rename to docs/build/isc/v1.4/docs/_admonitions/_query_gas_fees.md diff --git a/docs/build/isc/v1.1/docs/_admonitions/_remix-IDE.md b/docs/build/isc/v1.4/docs/_admonitions/_remix-IDE.md similarity index 100% rename from docs/build/isc/v1.1/docs/_admonitions/_remix-IDE.md rename to docs/build/isc/v1.4/docs/_admonitions/_remix-IDE.md diff --git a/docs/build/isc/v1.1/docs/_admonitions/_token-demo-setup.md b/docs/build/isc/v1.4/docs/_admonitions/_token-demo-setup.md similarity index 100% rename from docs/build/isc/v1.1/docs/_admonitions/_token-demo-setup.md rename to docs/build/isc/v1.4/docs/_admonitions/_token-demo-setup.md diff --git a/docs/build/isc/v1.1/docs/_partials/_hardhat_config.md b/docs/build/isc/v1.4/docs/_partials/_hardhat_config.md similarity index 100% rename from docs/build/isc/v1.1/docs/_partials/_hardhat_config.md rename to docs/build/isc/v1.4/docs/_partials/_hardhat_config.md diff --git a/docs/build/isc/v1.1/docs/_partials/_on_off_ledger_request.md b/docs/build/isc/v1.4/docs/_partials/_on_off_ledger_request.md similarity index 100% rename from docs/build/isc/v1.1/docs/_partials/_on_off_ledger_request.md rename to docs/build/isc/v1.4/docs/_partials/_on_off_ledger_request.md diff --git a/docs/build/isc/v1.1/docs/_partials/how-tos/token/_check_storage_deposit.md b/docs/build/isc/v1.4/docs/_partials/how-tos/token/_check_storage_deposit.md similarity index 100% rename from docs/build/isc/v1.1/docs/_partials/how-tos/token/_check_storage_deposit.md rename to docs/build/isc/v1.4/docs/_partials/how-tos/token/_check_storage_deposit.md diff --git a/docs/build/isc/v1.1/docs/_partials/how-tos/token/_example_code_intro.md b/docs/build/isc/v1.4/docs/_partials/how-tos/token/_example_code_intro.md similarity index 100% rename from docs/build/isc/v1.1/docs/_partials/how-tos/token/_example_code_intro.md rename to docs/build/isc/v1.4/docs/_partials/how-tos/token/_example_code_intro.md diff --git a/docs/build/isc/v1.1/docs/_partials/how-tos/token/_get-nft-metadata.md b/docs/build/isc/v1.4/docs/_partials/how-tos/token/_get-nft-metadata.md similarity index 100% rename from docs/build/isc/v1.1/docs/_partials/how-tos/token/_get-nft-metadata.md rename to docs/build/isc/v1.4/docs/_partials/how-tos/token/_get-nft-metadata.md diff --git a/docs/build/isc/v1.1/docs/_partials/how-tos/token/_obsolete_token_creation.md b/docs/build/isc/v1.4/docs/_partials/how-tos/token/_obsolete_token_creation.md similarity index 100% rename from docs/build/isc/v1.1/docs/_partials/how-tos/token/_obsolete_token_creation.md rename to docs/build/isc/v1.4/docs/_partials/how-tos/token/_obsolete_token_creation.md diff --git a/docs/build/isc/v1.1/docs/explanations/consensus.md b/docs/build/isc/v1.4/docs/explanations/consensus.md similarity index 100% rename from docs/build/isc/v1.1/docs/explanations/consensus.md rename to docs/build/isc/v1.4/docs/explanations/consensus.md diff --git a/docs/build/isc/v1.1/docs/explanations/context.mdx b/docs/build/isc/v1.4/docs/explanations/context.mdx similarity index 100% rename from docs/build/isc/v1.1/docs/explanations/context.mdx rename to docs/build/isc/v1.4/docs/explanations/context.mdx diff --git a/docs/build/isc/v1.1/docs/explanations/core-contracts.md b/docs/build/isc/v1.4/docs/explanations/core-contracts.md similarity index 100% rename from docs/build/isc/v1.1/docs/explanations/core-contracts.md rename to docs/build/isc/v1.4/docs/explanations/core-contracts.md diff --git a/docs/build/isc/v1.1/docs/explanations/how-accounts-work.md b/docs/build/isc/v1.4/docs/explanations/how-accounts-work.md similarity index 100% rename from docs/build/isc/v1.1/docs/explanations/how-accounts-work.md rename to docs/build/isc/v1.4/docs/explanations/how-accounts-work.md diff --git a/docs/build/isc/v1.1/docs/explanations/invocation.md b/docs/build/isc/v1.4/docs/explanations/invocation.md similarity index 100% rename from docs/build/isc/v1.1/docs/explanations/invocation.md rename to docs/build/isc/v1.4/docs/explanations/invocation.md diff --git a/docs/build/isc/v1.1/docs/explanations/sandbox.md b/docs/build/isc/v1.4/docs/explanations/sandbox.md similarity index 100% rename from docs/build/isc/v1.1/docs/explanations/sandbox.md rename to docs/build/isc/v1.4/docs/explanations/sandbox.md diff --git a/docs/build/isc/v1.1/docs/explanations/smart-contract-anatomy.md b/docs/build/isc/v1.4/docs/explanations/smart-contract-anatomy.md similarity index 100% rename from docs/build/isc/v1.1/docs/explanations/smart-contract-anatomy.md rename to docs/build/isc/v1.4/docs/explanations/smart-contract-anatomy.md diff --git a/docs/build/isc/v1.1/docs/explanations/smart-contracts.md b/docs/build/isc/v1.4/docs/explanations/smart-contracts.md similarity index 100% rename from docs/build/isc/v1.1/docs/explanations/smart-contracts.md rename to docs/build/isc/v1.4/docs/explanations/smart-contracts.md diff --git a/docs/build/isc/v1.1/docs/explanations/state_manager.md b/docs/build/isc/v1.4/docs/explanations/state_manager.md similarity index 100% rename from docs/build/isc/v1.1/docs/explanations/state_manager.md rename to docs/build/isc/v1.4/docs/explanations/state_manager.md diff --git a/docs/build/isc/v1.1/docs/explanations/states.md b/docs/build/isc/v1.4/docs/explanations/states.md similarity index 100% rename from docs/build/isc/v1.1/docs/explanations/states.md rename to docs/build/isc/v1.4/docs/explanations/states.md diff --git a/docs/build/isc/v1.1/docs/explanations/validators.md b/docs/build/isc/v1.4/docs/explanations/validators.md similarity index 100% rename from docs/build/isc/v1.1/docs/explanations/validators.md rename to docs/build/isc/v1.4/docs/explanations/validators.md diff --git a/docs/build/isc/v1.1/docs/getting-started/compatibility.mdx b/docs/build/isc/v1.4/docs/getting-started/compatibility.mdx similarity index 97% rename from docs/build/isc/v1.1/docs/getting-started/compatibility.mdx rename to docs/build/isc/v1.4/docs/getting-started/compatibility.mdx index 193f58e5dee..2ffd0cbe144 100644 --- a/docs/build/isc/v1.1/docs/getting-started/compatibility.mdx +++ b/docs/build/isc/v1.4/docs/getting-started/compatibility.mdx @@ -44,11 +44,9 @@ functionalities, introducing commands like `isc.send(...)` for token transfers. ### Gas Fees -As in [Ethereum](https://ethereum.org/en/developers/docs/gas), gas fees depend on the current network usage. As in an +As in [Ethereum](https://ethereum.org/en/developers/docs/gas), gas fees depend on the current network usage. As in an auction, if there is a high demand, users will compete and try to outbid each other's transactions. This means gas prices increase in periods of high usage and decrease when the usage goes down. However, unlike Ethereum, the chain owner can set the minimum gas fee. - - diff --git a/docs/build/isc/v1.1/docs/getting-started/contracts.mdx b/docs/build/isc/v1.4/docs/getting-started/contracts.mdx similarity index 100% rename from docs/build/isc/v1.1/docs/getting-started/contracts.mdx rename to docs/build/isc/v1.4/docs/getting-started/contracts.mdx diff --git a/docs/build/isc/v1.1/docs/getting-started/languages-and-vms.md b/docs/build/isc/v1.4/docs/getting-started/languages-and-vms.md similarity index 100% rename from docs/build/isc/v1.1/docs/getting-started/languages-and-vms.md rename to docs/build/isc/v1.4/docs/getting-started/languages-and-vms.md diff --git a/docs/build/isc/v1.1/docs/getting-started/networks-and-chains.mdx b/docs/build/isc/v1.4/docs/getting-started/networks-and-chains.mdx similarity index 100% rename from docs/build/isc/v1.1/docs/getting-started/networks-and-chains.mdx rename to docs/build/isc/v1.4/docs/getting-started/networks-and-chains.mdx diff --git a/docs/build/isc/v1.1/docs/getting-started/quick-start.mdx b/docs/build/isc/v1.4/docs/getting-started/quick-start.mdx similarity index 100% rename from docs/build/isc/v1.1/docs/getting-started/quick-start.mdx rename to docs/build/isc/v1.4/docs/getting-started/quick-start.mdx diff --git a/docs/build/isc/v1.1/docs/getting-started/tools.mdx b/docs/build/isc/v1.4/docs/getting-started/tools.mdx similarity index 100% rename from docs/build/isc/v1.1/docs/getting-started/tools.mdx rename to docs/build/isc/v1.4/docs/getting-started/tools.mdx diff --git a/docs/build/isc/v1.1/docs/how-tos/ERC20.md b/docs/build/isc/v1.4/docs/how-tos/ERC20.md similarity index 100% rename from docs/build/isc/v1.1/docs/how-tos/ERC20.md rename to docs/build/isc/v1.4/docs/how-tos/ERC20.md diff --git a/docs/build/isc/v1.1/docs/how-tos/ERC721.md b/docs/build/isc/v1.4/docs/how-tos/ERC721.md similarity index 100% rename from docs/build/isc/v1.1/docs/how-tos/ERC721.md rename to docs/build/isc/v1.4/docs/how-tos/ERC721.md diff --git a/docs/build/isc/v1.1/docs/how-tos/core-contracts/basics/allowance/allow.md b/docs/build/isc/v1.4/docs/how-tos/core-contracts/basics/allowance/allow.md similarity index 100% rename from docs/build/isc/v1.1/docs/how-tos/core-contracts/basics/allowance/allow.md rename to docs/build/isc/v1.4/docs/how-tos/core-contracts/basics/allowance/allow.md diff --git a/docs/build/isc/v1.1/docs/how-tos/core-contracts/basics/allowance/get-allowance.md b/docs/build/isc/v1.4/docs/how-tos/core-contracts/basics/allowance/get-allowance.md similarity index 100% rename from docs/build/isc/v1.1/docs/how-tos/core-contracts/basics/allowance/get-allowance.md rename to docs/build/isc/v1.4/docs/how-tos/core-contracts/basics/allowance/get-allowance.md diff --git a/docs/build/isc/v1.1/docs/how-tos/core-contracts/basics/allowance/take-allowance.md b/docs/build/isc/v1.4/docs/how-tos/core-contracts/basics/allowance/take-allowance.md similarity index 100% rename from docs/build/isc/v1.1/docs/how-tos/core-contracts/basics/allowance/take-allowance.md rename to docs/build/isc/v1.4/docs/how-tos/core-contracts/basics/allowance/take-allowance.md diff --git a/docs/build/isc/v1.1/docs/how-tos/core-contracts/basics/get-balance.md b/docs/build/isc/v1.4/docs/how-tos/core-contracts/basics/get-balance.md similarity index 100% rename from docs/build/isc/v1.1/docs/how-tos/core-contracts/basics/get-balance.md rename to docs/build/isc/v1.4/docs/how-tos/core-contracts/basics/get-balance.md diff --git a/docs/build/isc/v1.1/docs/how-tos/core-contracts/basics/send-assets-to-l1.mdx b/docs/build/isc/v1.4/docs/how-tos/core-contracts/basics/send-assets-to-l1.mdx similarity index 100% rename from docs/build/isc/v1.1/docs/how-tos/core-contracts/basics/send-assets-to-l1.mdx rename to docs/build/isc/v1.4/docs/how-tos/core-contracts/basics/send-assets-to-l1.mdx diff --git a/docs/build/isc/v1.1/docs/how-tos/core-contracts/call-view.md b/docs/build/isc/v1.4/docs/how-tos/core-contracts/call-view.md similarity index 100% rename from docs/build/isc/v1.1/docs/how-tos/core-contracts/call-view.md rename to docs/build/isc/v1.4/docs/how-tos/core-contracts/call-view.md diff --git a/docs/build/isc/v1.1/docs/how-tos/core-contracts/get-randomness-on-l2.md b/docs/build/isc/v1.4/docs/how-tos/core-contracts/get-randomness-on-l2.md similarity index 100% rename from docs/build/isc/v1.1/docs/how-tos/core-contracts/get-randomness-on-l2.md rename to docs/build/isc/v1.4/docs/how-tos/core-contracts/get-randomness-on-l2.md diff --git a/docs/build/isc/v1.1/docs/how-tos/core-contracts/introduction.md b/docs/build/isc/v1.4/docs/how-tos/core-contracts/introduction.md similarity index 100% rename from docs/build/isc/v1.1/docs/how-tos/core-contracts/introduction.md rename to docs/build/isc/v1.4/docs/how-tos/core-contracts/introduction.md diff --git a/docs/build/isc/v1.1/docs/how-tos/core-contracts/nft/get-L2-nfts.mdx b/docs/build/isc/v1.4/docs/how-tos/core-contracts/nft/get-L2-nfts.mdx similarity index 100% rename from docs/build/isc/v1.1/docs/how-tos/core-contracts/nft/get-L2-nfts.mdx rename to docs/build/isc/v1.4/docs/how-tos/core-contracts/nft/get-L2-nfts.mdx diff --git a/docs/build/isc/v1.1/docs/how-tos/core-contracts/nft/get-nft-data.mdx b/docs/build/isc/v1.4/docs/how-tos/core-contracts/nft/get-nft-data.mdx similarity index 100% rename from docs/build/isc/v1.1/docs/how-tos/core-contracts/nft/get-nft-data.mdx rename to docs/build/isc/v1.4/docs/how-tos/core-contracts/nft/get-nft-data.mdx diff --git a/docs/build/isc/v1.1/docs/how-tos/core-contracts/nft/get-nft-in-collection.mdx b/docs/build/isc/v1.4/docs/how-tos/core-contracts/nft/get-nft-in-collection.mdx similarity index 100% rename from docs/build/isc/v1.1/docs/how-tos/core-contracts/nft/get-nft-in-collection.mdx rename to docs/build/isc/v1.4/docs/how-tos/core-contracts/nft/get-nft-in-collection.mdx diff --git a/docs/build/isc/v1.1/docs/how-tos/core-contracts/nft/get-nft-metadata.mdx b/docs/build/isc/v1.4/docs/how-tos/core-contracts/nft/get-nft-metadata.mdx similarity index 100% rename from docs/build/isc/v1.1/docs/how-tos/core-contracts/nft/get-nft-metadata.mdx rename to docs/build/isc/v1.4/docs/how-tos/core-contracts/nft/get-nft-metadata.mdx diff --git a/docs/build/isc/v1.1/docs/how-tos/core-contracts/nft/introduction.md b/docs/build/isc/v1.4/docs/how-tos/core-contracts/nft/introduction.md similarity index 100% rename from docs/build/isc/v1.1/docs/how-tos/core-contracts/nft/introduction.md rename to docs/build/isc/v1.4/docs/how-tos/core-contracts/nft/introduction.md diff --git a/docs/build/isc/v1.1/docs/how-tos/core-contracts/nft/mint-nft.md b/docs/build/isc/v1.4/docs/how-tos/core-contracts/nft/mint-nft.md similarity index 100% rename from docs/build/isc/v1.1/docs/how-tos/core-contracts/nft/mint-nft.md rename to docs/build/isc/v1.4/docs/how-tos/core-contracts/nft/mint-nft.md diff --git a/docs/build/isc/v1.1/docs/how-tos/core-contracts/nft/use-as-erc721.md b/docs/build/isc/v1.4/docs/how-tos/core-contracts/nft/use-as-erc721.md similarity index 100% rename from docs/build/isc/v1.1/docs/how-tos/core-contracts/nft/use-as-erc721.md rename to docs/build/isc/v1.4/docs/how-tos/core-contracts/nft/use-as-erc721.md diff --git a/docs/build/isc/v1.1/docs/how-tos/core-contracts/token/create-foundry.md b/docs/build/isc/v1.4/docs/how-tos/core-contracts/token/create-foundry.md similarity index 100% rename from docs/build/isc/v1.1/docs/how-tos/core-contracts/token/create-foundry.md rename to docs/build/isc/v1.4/docs/how-tos/core-contracts/token/create-foundry.md diff --git a/docs/build/isc/v1.1/docs/how-tos/core-contracts/token/create-native-token.md b/docs/build/isc/v1.4/docs/how-tos/core-contracts/token/create-native-token.md similarity index 100% rename from docs/build/isc/v1.1/docs/how-tos/core-contracts/token/create-native-token.md rename to docs/build/isc/v1.4/docs/how-tos/core-contracts/token/create-native-token.md diff --git a/docs/build/isc/v1.1/docs/how-tos/core-contracts/token/erc20-native-token.md b/docs/build/isc/v1.4/docs/how-tos/core-contracts/token/erc20-native-token.md similarity index 59% rename from docs/build/isc/v1.1/docs/how-tos/core-contracts/token/erc20-native-token.md rename to docs/build/isc/v1.4/docs/how-tos/core-contracts/token/erc20-native-token.md index dfbe3d280e5..af60eca098f 100644 --- a/docs/build/isc/v1.1/docs/how-tos/core-contracts/token/erc20-native-token.md +++ b/docs/build/isc/v1.4/docs/how-tos/core-contracts/token/erc20-native-token.md @@ -10,7 +10,7 @@ tags: # Custom ERC20 Functions -Once you [registered your native token as ERC20](./erc20-native-token.md) you can use it like any other ERC20 token, with functions like +Once you [created your token](./create-native-token.md) it is automatically registered as ERC20 token and you can use it like any other ERC20 token, with functions like `transfer`, `balanceOf`, etc. But, as the ERC20 token maps the native token on L2, there are some additional ISC features you can take advantage of. @@ -35,21 +35,11 @@ NativeTokenID memory id =token.nativeTokenID(); ### Full Example Code ```solidity -// SPDX-License-Identifier: MIT - -pragma solidity ^0.8.0; - -import "@iota/iscmagic/ISC.sol"; - -contract MyNativeToken { - - function nativeTokenID(uint32 _foundrySN) public view returns (bytes memory) { - ERC20NativeTokens token = ERC20NativeTokens( - ISC.sandbox.erc20NativeTokensAddress(_foundrySN) - ); - NativeTokenID memory id = token.nativeTokenID(); - return id.data; - } +function nativeTokenID(uint32 _foundrySN) public view returns (bytes memory) { + ERC20NativeTokens token = ERC20NativeTokens( + ISC.sandbox.erc20NativeTokensAddress(_foundrySN) + ); + NativeTokenID memory id =token.nativeTokenID(); + return id.data; } - ``` diff --git a/docs/build/isc/v1.1/docs/how-tos/core-contracts/token/introduction.md b/docs/build/isc/v1.4/docs/how-tos/core-contracts/token/introduction.md similarity index 100% rename from docs/build/isc/v1.1/docs/how-tos/core-contracts/token/introduction.md rename to docs/build/isc/v1.4/docs/how-tos/core-contracts/token/introduction.md diff --git a/docs/build/isc/v1.1/docs/how-tos/core-contracts/token/mint-token.md b/docs/build/isc/v1.4/docs/how-tos/core-contracts/token/mint-token.md similarity index 57% rename from docs/build/isc/v1.1/docs/how-tos/core-contracts/token/mint-token.md rename to docs/build/isc/v1.4/docs/how-tos/core-contracts/token/mint-token.md index 551452802db..bd79533d844 100644 --- a/docs/build/isc/v1.1/docs/how-tos/core-contracts/token/mint-token.md +++ b/docs/build/isc/v1.4/docs/how-tos/core-contracts/token/mint-token.md @@ -29,25 +29,13 @@ ISC.accounts.mintNativeTokens(_foundrySN, _amount, allowance); ## Full Example Code ```solidity -// SPDX-License-Identifier: MIT - -pragma solidity ^0.8.0; - -import "@iota/iscmagic/ISC.sol"; - -contract NativeTokenMinter { - event MintedNativeTokens(uint32 foundrySN, uint amount); - - function mintNativeTokens(uint32 _foundrySN, uint _amount, uint64 _storageDeposit) public payable { - require(msg.value == _storageDeposit * (10 ** 12), "Please send exact funds to pay for storage deposit"); - - ISCAssets memory allowance; - allowance.baseTokens = _storageDeposit; - - ISC.accounts.mintNativeTokens(_foundrySN, _amount, allowance); - - emit MintedNativeTokens(_foundrySN, _amount); - } +event MintedNativeTokens(uint32 foundrySN, uint amount); + +function mintNativeTokens(uint32 _foundrySN, uint _amount, uint64 _storageDeposit) public payable { + require(msg.value == _storageDeposit*(10**12), "Please send exact funds to pay for storage deposit"); + ISCAssets memory allowance; + allowance.baseTokens = _storageDeposit; + ISC.accounts.mintNativeTokens(_foundrySN, _amount, allowance); + emit MintedNativeTokens(_foundrySN, _amount); } - ``` diff --git a/docs/build/isc/v1.1/docs/how-tos/core-contracts/token/register-token.md b/docs/build/isc/v1.4/docs/how-tos/core-contracts/token/register-token.md similarity index 56% rename from docs/build/isc/v1.1/docs/how-tos/core-contracts/token/register-token.md rename to docs/build/isc/v1.4/docs/how-tos/core-contracts/token/register-token.md index 6e3af8a789f..990ae5e69b3 100644 --- a/docs/build/isc/v1.1/docs/how-tos/core-contracts/token/register-token.md +++ b/docs/build/isc/v1.4/docs/how-tos/core-contracts/token/register-token.md @@ -43,32 +43,14 @@ address erc20address = ISC.sandbox.erc20NativeTokensAddress(_foundrySN); ### Full Example Code ```solidity -// SPDX-License-Identifier: MIT +event ERC20Address(address erc20address); -pragma solidity ^0.8.0; - -import "@iota/iscmagic/ISC.sol"; - -contract ERC20NativeTokenRegistry { - - event ERC20Address(address erc20address); - - function registerERC20NativeToken( - uint32 _foundrySN, - string calldata _name, - string calldata _symbol, - uint8 _decimals, - uint64 _storageDeposit - ) public payable { - require(msg.value == _storageDeposit * (10 ** 12), "Please send exact funds to pay for storage deposit"); - - ISCAssets memory allowance; - allowance.baseTokens = _storageDeposit; - - ISC.sandbox.registerERC20NativeToken(_foundrySN, _name, _symbol, _decimals, allowance); - - address erc20address = ISC.sandbox.erc20NativeTokensAddress(_foundrySN); - emit ERC20Address(erc20address); - } +function registerERC20NativeToken(uint32 _foundrySN, string calldata _name, string calldata _symbol, uint8 _decimals, uint64 _storageDeposit) public payable { +require(msg.value == _storageDeposit*(10**12), "Please send exact funds to pay for storage deposit"); +ISCAssets memory allowance; +allowance.baseTokens = _storageDeposit; +ISC.sandbox.registerERC20NativeToken(_foundrySN, _name, _symbol, _decimals, allowance); +address erc20address = ISC.sandbox.erc20NativeTokensAddress(_foundrySN); +emit ERC20Address(erc20address); } ``` diff --git a/docs/build/isc/v1.1/docs/how-tos/core-contracts/token/send-token-across-chains.mdx b/docs/build/isc/v1.4/docs/how-tos/core-contracts/token/send-token-across-chains.mdx similarity index 100% rename from docs/build/isc/v1.1/docs/how-tos/core-contracts/token/send-token-across-chains.mdx rename to docs/build/isc/v1.4/docs/how-tos/core-contracts/token/send-token-across-chains.mdx diff --git a/docs/build/isc/v1.1/docs/how-tos/create-a-basic-contract.md b/docs/build/isc/v1.4/docs/how-tos/create-a-basic-contract.md similarity index 100% rename from docs/build/isc/v1.1/docs/how-tos/create-a-basic-contract.md rename to docs/build/isc/v1.4/docs/how-tos/create-a-basic-contract.md diff --git a/docs/build/isc/v1.1/docs/how-tos/deploy-a-smart-contract.mdx b/docs/build/isc/v1.4/docs/how-tos/deploy-a-smart-contract.mdx similarity index 100% rename from docs/build/isc/v1.1/docs/how-tos/deploy-a-smart-contract.mdx rename to docs/build/isc/v1.4/docs/how-tos/deploy-a-smart-contract.mdx diff --git a/docs/build/isc/v1.1/docs/how-tos/introduction.md b/docs/build/isc/v1.4/docs/how-tos/introduction.md similarity index 100% rename from docs/build/isc/v1.1/docs/how-tos/introduction.md rename to docs/build/isc/v1.4/docs/how-tos/introduction.md diff --git a/docs/build/isc/v1.1/docs/how-tos/send-ERC20-across-chains.md b/docs/build/isc/v1.4/docs/how-tos/send-ERC20-across-chains.md similarity index 100% rename from docs/build/isc/v1.1/docs/how-tos/send-ERC20-across-chains.md rename to docs/build/isc/v1.4/docs/how-tos/send-ERC20-across-chains.md diff --git a/docs/build/isc/v1.1/docs/how-tos/send-NFTs-across-chains.md b/docs/build/isc/v1.4/docs/how-tos/send-NFTs-across-chains.md similarity index 99% rename from docs/build/isc/v1.1/docs/how-tos/send-NFTs-across-chains.md rename to docs/build/isc/v1.4/docs/how-tos/send-NFTs-across-chains.md index f76c757dfa9..3e9b5a435a7 100644 --- a/docs/build/isc/v1.1/docs/how-tos/send-NFTs-across-chains.md +++ b/docs/build/isc/v1.4/docs/how-tos/send-NFTs-across-chains.md @@ -135,7 +135,7 @@ approve step is also required, but the operations will happen on the `ONFT` cont - [layerZero Endpoint V1 (Mainnet)](https://docs.layerzero.network/v1/developers/evm/technical-reference/mainnet/mainnet-addresses) - [LayerZero explorer](https://Testnet.layerzeroscan.com/) -### Install and compile the Library +### Install and Compile the Library After you have cloned the [IOTA Community Utilities for LayerZero ONFT V1 repository](https://github.com/iota-community/layerzero-onft-v1-utils), diff --git a/docs/build/isc/v1.1/docs/how-tos/send-funds-from-L1-to-L2.mdx b/docs/build/isc/v1.4/docs/how-tos/send-funds-from-L1-to-L2.mdx similarity index 100% rename from docs/build/isc/v1.1/docs/how-tos/send-funds-from-L1-to-L2.mdx rename to docs/build/isc/v1.4/docs/how-tos/send-funds-from-L1-to-L2.mdx diff --git a/docs/build/isc/v1.1/docs/how-tos/test-smart-contracts.md b/docs/build/isc/v1.4/docs/how-tos/test-smart-contracts.md similarity index 100% rename from docs/build/isc/v1.1/docs/how-tos/test-smart-contracts.md rename to docs/build/isc/v1.4/docs/how-tos/test-smart-contracts.md diff --git a/docs/build/isc/v1.1/docs/introduction.md b/docs/build/isc/v1.4/docs/introduction.md similarity index 100% rename from docs/build/isc/v1.1/docs/introduction.md rename to docs/build/isc/v1.4/docs/introduction.md diff --git a/docs/build/isc/v1.1/docs/reference/.gitignore b/docs/build/isc/v1.4/docs/reference/.gitignore similarity index 100% rename from docs/build/isc/v1.1/docs/reference/.gitignore rename to docs/build/isc/v1.4/docs/reference/.gitignore diff --git a/docs/build/isc/v1.1/docs/reference/core-contracts/accounts.md b/docs/build/isc/v1.4/docs/reference/core-contracts/accounts.md similarity index 100% rename from docs/build/isc/v1.1/docs/reference/core-contracts/accounts.md rename to docs/build/isc/v1.4/docs/reference/core-contracts/accounts.md diff --git a/docs/build/isc/v1.1/docs/reference/core-contracts/blob.md b/docs/build/isc/v1.4/docs/reference/core-contracts/blob.md similarity index 100% rename from docs/build/isc/v1.1/docs/reference/core-contracts/blob.md rename to docs/build/isc/v1.4/docs/reference/core-contracts/blob.md diff --git a/docs/build/isc/v1.1/docs/reference/core-contracts/blocklog.md b/docs/build/isc/v1.4/docs/reference/core-contracts/blocklog.md similarity index 100% rename from docs/build/isc/v1.1/docs/reference/core-contracts/blocklog.md rename to docs/build/isc/v1.4/docs/reference/core-contracts/blocklog.md diff --git a/docs/build/isc/v1.1/docs/reference/core-contracts/errors.md b/docs/build/isc/v1.4/docs/reference/core-contracts/errors.md similarity index 100% rename from docs/build/isc/v1.1/docs/reference/core-contracts/errors.md rename to docs/build/isc/v1.4/docs/reference/core-contracts/errors.md diff --git a/docs/build/isc/v1.1/docs/reference/core-contracts/evm.md b/docs/build/isc/v1.4/docs/reference/core-contracts/evm.md similarity index 100% rename from docs/build/isc/v1.1/docs/reference/core-contracts/evm.md rename to docs/build/isc/v1.4/docs/reference/core-contracts/evm.md diff --git a/docs/build/isc/v1.1/docs/reference/core-contracts/governance.md b/docs/build/isc/v1.4/docs/reference/core-contracts/governance.md similarity index 100% rename from docs/build/isc/v1.1/docs/reference/core-contracts/governance.md rename to docs/build/isc/v1.4/docs/reference/core-contracts/governance.md diff --git a/docs/build/isc/v1.1/docs/reference/core-contracts/overview.md b/docs/build/isc/v1.4/docs/reference/core-contracts/overview.md similarity index 100% rename from docs/build/isc/v1.1/docs/reference/core-contracts/overview.md rename to docs/build/isc/v1.4/docs/reference/core-contracts/overview.md diff --git a/docs/build/isc/v1.1/docs/reference/core-contracts/root.md b/docs/build/isc/v1.4/docs/reference/core-contracts/root.md similarity index 100% rename from docs/build/isc/v1.1/docs/reference/core-contracts/root.md rename to docs/build/isc/v1.4/docs/reference/core-contracts/root.md diff --git a/docs/build/isc/v1.1/docs/reference/core-contracts/xfer.md b/docs/build/isc/v1.4/docs/reference/core-contracts/xfer.md similarity index 100% rename from docs/build/isc/v1.1/docs/reference/core-contracts/xfer.md rename to docs/build/isc/v1.4/docs/reference/core-contracts/xfer.md diff --git a/docs/build/isc/v1.1/docs/reference/json-rpc-spec.md b/docs/build/isc/v1.4/docs/reference/json-rpc-spec.md similarity index 100% rename from docs/build/isc/v1.1/docs/reference/json-rpc-spec.md rename to docs/build/isc/v1.4/docs/reference/json-rpc-spec.md diff --git a/docs/build/isc/v1.1/docs/reference/magic-contract/introduction.md b/docs/build/isc/v1.4/docs/reference/magic-contract/introduction.md similarity index 100% rename from docs/build/isc/v1.1/docs/reference/magic-contract/introduction.md rename to docs/build/isc/v1.4/docs/reference/magic-contract/introduction.md diff --git a/docs/build/isc/v1.1/docs/reference/wasm-lib-data-types.mdx b/docs/build/isc/v1.4/docs/reference/wasm-lib-data-types.mdx similarity index 100% rename from docs/build/isc/v1.1/docs/reference/wasm-lib-data-types.mdx rename to docs/build/isc/v1.4/docs/reference/wasm-lib-data-types.mdx diff --git a/docs/build/isc/v1.1/docs/schema/how-tos/access.mdx b/docs/build/isc/v1.4/docs/schema/how-tos/access.mdx similarity index 100% rename from docs/build/isc/v1.1/docs/schema/how-tos/access.mdx rename to docs/build/isc/v1.4/docs/schema/how-tos/access.mdx diff --git a/docs/build/isc/v1.1/docs/schema/how-tos/call.mdx b/docs/build/isc/v1.4/docs/schema/how-tos/call.mdx similarity index 100% rename from docs/build/isc/v1.1/docs/schema/how-tos/call.mdx rename to docs/build/isc/v1.4/docs/schema/how-tos/call.mdx diff --git a/docs/build/isc/v1.1/docs/schema/how-tos/events.mdx b/docs/build/isc/v1.4/docs/schema/how-tos/events.mdx similarity index 100% rename from docs/build/isc/v1.1/docs/schema/how-tos/events.mdx rename to docs/build/isc/v1.4/docs/schema/how-tos/events.mdx diff --git a/docs/build/isc/v1.1/docs/schema/how-tos/funcdesc.mdx b/docs/build/isc/v1.4/docs/schema/how-tos/funcdesc.mdx similarity index 100% rename from docs/build/isc/v1.1/docs/schema/how-tos/funcdesc.mdx rename to docs/build/isc/v1.4/docs/schema/how-tos/funcdesc.mdx diff --git a/docs/build/isc/v1.1/docs/schema/how-tos/funcs.mdx b/docs/build/isc/v1.4/docs/schema/how-tos/funcs.mdx similarity index 100% rename from docs/build/isc/v1.1/docs/schema/how-tos/funcs.mdx rename to docs/build/isc/v1.4/docs/schema/how-tos/funcs.mdx diff --git a/docs/build/isc/v1.1/docs/schema/how-tos/init.mdx b/docs/build/isc/v1.4/docs/schema/how-tos/init.mdx similarity index 100% rename from docs/build/isc/v1.1/docs/schema/how-tos/init.mdx rename to docs/build/isc/v1.4/docs/schema/how-tos/init.mdx diff --git a/docs/build/isc/v1.1/docs/schema/how-tos/params.mdx b/docs/build/isc/v1.4/docs/schema/how-tos/params.mdx similarity index 100% rename from docs/build/isc/v1.1/docs/schema/how-tos/params.mdx rename to docs/build/isc/v1.4/docs/schema/how-tos/params.mdx diff --git a/docs/build/isc/v1.1/docs/schema/how-tos/post.mdx b/docs/build/isc/v1.4/docs/schema/how-tos/post.mdx similarity index 100% rename from docs/build/isc/v1.1/docs/schema/how-tos/post.mdx rename to docs/build/isc/v1.4/docs/schema/how-tos/post.mdx diff --git a/docs/build/isc/v1.1/docs/schema/how-tos/results.mdx b/docs/build/isc/v1.4/docs/schema/how-tos/results.mdx similarity index 100% rename from docs/build/isc/v1.1/docs/schema/how-tos/results.mdx rename to docs/build/isc/v1.4/docs/schema/how-tos/results.mdx diff --git a/docs/build/isc/v1.1/docs/schema/how-tos/spec.mdx b/docs/build/isc/v1.4/docs/schema/how-tos/spec.mdx similarity index 100% rename from docs/build/isc/v1.1/docs/schema/how-tos/spec.mdx rename to docs/build/isc/v1.4/docs/schema/how-tos/spec.mdx diff --git a/docs/build/isc/v1.1/docs/schema/how-tos/state.mdx b/docs/build/isc/v1.4/docs/schema/how-tos/state.mdx similarity index 100% rename from docs/build/isc/v1.1/docs/schema/how-tos/state.mdx rename to docs/build/isc/v1.4/docs/schema/how-tos/state.mdx diff --git a/docs/build/isc/v1.1/docs/schema/how-tos/structs.mdx b/docs/build/isc/v1.4/docs/schema/how-tos/structs.mdx similarity index 100% rename from docs/build/isc/v1.1/docs/schema/how-tos/structs.mdx rename to docs/build/isc/v1.4/docs/schema/how-tos/structs.mdx diff --git a/docs/build/isc/v1.1/docs/schema/how-tos/thunks.mdx b/docs/build/isc/v1.4/docs/schema/how-tos/thunks.mdx similarity index 100% rename from docs/build/isc/v1.1/docs/schema/how-tos/thunks.mdx rename to docs/build/isc/v1.4/docs/schema/how-tos/thunks.mdx diff --git a/docs/build/isc/v1.1/docs/schema/how-tos/transfers.mdx b/docs/build/isc/v1.4/docs/schema/how-tos/transfers.mdx similarity index 100% rename from docs/build/isc/v1.1/docs/schema/how-tos/transfers.mdx rename to docs/build/isc/v1.4/docs/schema/how-tos/transfers.mdx diff --git a/docs/build/isc/v1.1/docs/schema/how-tos/typedefs.mdx b/docs/build/isc/v1.4/docs/schema/how-tos/typedefs.mdx similarity index 100% rename from docs/build/isc/v1.1/docs/schema/how-tos/typedefs.mdx rename to docs/build/isc/v1.4/docs/schema/how-tos/typedefs.mdx diff --git a/docs/build/isc/v1.1/docs/schema/how-tos/usage.mdx b/docs/build/isc/v1.4/docs/schema/how-tos/usage.mdx similarity index 100% rename from docs/build/isc/v1.1/docs/schema/how-tos/usage.mdx rename to docs/build/isc/v1.4/docs/schema/how-tos/usage.mdx diff --git a/docs/build/isc/v1.1/docs/schema/how-tos/views.mdx b/docs/build/isc/v1.4/docs/schema/how-tos/views.mdx similarity index 100% rename from docs/build/isc/v1.1/docs/schema/how-tos/views.mdx rename to docs/build/isc/v1.4/docs/schema/how-tos/views.mdx diff --git a/docs/build/isc/v1.1/docs/schema/how-tos/yaml.mdx b/docs/build/isc/v1.4/docs/schema/how-tos/yaml.mdx similarity index 100% rename from docs/build/isc/v1.1/docs/schema/how-tos/yaml.mdx rename to docs/build/isc/v1.4/docs/schema/how-tos/yaml.mdx diff --git a/docs/build/isc/v1.1/docs/schema/introduction.mdx b/docs/build/isc/v1.4/docs/schema/introduction.mdx similarity index 100% rename from docs/build/isc/v1.1/docs/schema/introduction.mdx rename to docs/build/isc/v1.4/docs/schema/introduction.mdx diff --git a/docs/build/isc/v1.1/docs/schema/proxies.mdx b/docs/build/isc/v1.4/docs/schema/proxies.mdx similarity index 100% rename from docs/build/isc/v1.1/docs/schema/proxies.mdx rename to docs/build/isc/v1.4/docs/schema/proxies.mdx diff --git a/docs/build/isc/v1.1/docs/solo/getting-started.md b/docs/build/isc/v1.4/docs/solo/getting-started.md similarity index 100% rename from docs/build/isc/v1.1/docs/solo/getting-started.md rename to docs/build/isc/v1.4/docs/solo/getting-started.md diff --git a/docs/build/isc/v1.1/docs/solo/how-tos/deploying-sc.md b/docs/build/isc/v1.4/docs/solo/how-tos/deploying-sc.md similarity index 100% rename from docs/build/isc/v1.1/docs/solo/how-tos/deploying-sc.md rename to docs/build/isc/v1.4/docs/solo/how-tos/deploying-sc.md diff --git a/docs/build/isc/v1.1/docs/solo/how-tos/error-handling.md b/docs/build/isc/v1.4/docs/solo/how-tos/error-handling.md similarity index 100% rename from docs/build/isc/v1.1/docs/solo/how-tos/error-handling.md rename to docs/build/isc/v1.4/docs/solo/how-tos/error-handling.md diff --git a/docs/build/isc/v1.1/docs/solo/how-tos/examples.mdx b/docs/build/isc/v1.4/docs/solo/how-tos/examples.mdx similarity index 100% rename from docs/build/isc/v1.1/docs/solo/how-tos/examples.mdx rename to docs/build/isc/v1.4/docs/solo/how-tos/examples.mdx diff --git a/docs/build/isc/v1.1/docs/solo/how-tos/first-example.md b/docs/build/isc/v1.4/docs/solo/how-tos/first-example.md similarity index 100% rename from docs/build/isc/v1.1/docs/solo/how-tos/first-example.md rename to docs/build/isc/v1.4/docs/solo/how-tos/first-example.md diff --git a/docs/build/isc/v1.1/docs/solo/how-tos/invoking-sc.md b/docs/build/isc/v1.4/docs/solo/how-tos/invoking-sc.md similarity index 100% rename from docs/build/isc/v1.1/docs/solo/how-tos/invoking-sc.md rename to docs/build/isc/v1.4/docs/solo/how-tos/invoking-sc.md diff --git a/docs/build/isc/v1.1/docs/solo/how-tos/test.mdx b/docs/build/isc/v1.4/docs/solo/how-tos/test.mdx similarity index 100% rename from docs/build/isc/v1.1/docs/solo/how-tos/test.mdx rename to docs/build/isc/v1.4/docs/solo/how-tos/test.mdx diff --git a/docs/build/isc/v1.1/docs/solo/how-tos/the-l1-ledger.md b/docs/build/isc/v1.4/docs/solo/how-tos/the-l1-ledger.md similarity index 100% rename from docs/build/isc/v1.1/docs/solo/how-tos/the-l1-ledger.md rename to docs/build/isc/v1.4/docs/solo/how-tos/the-l1-ledger.md diff --git a/docs/build/isc/v1.1/docs/solo/how-tos/the-l2-ledger.md b/docs/build/isc/v1.4/docs/solo/how-tos/the-l2-ledger.md similarity index 100% rename from docs/build/isc/v1.1/docs/solo/how-tos/the-l2-ledger.md rename to docs/build/isc/v1.4/docs/solo/how-tos/the-l2-ledger.md diff --git a/docs/build/isc/v1.1/docs/solo/how-tos/timelock.mdx b/docs/build/isc/v1.4/docs/solo/how-tos/timelock.mdx similarity index 100% rename from docs/build/isc/v1.1/docs/solo/how-tos/timelock.mdx rename to docs/build/isc/v1.4/docs/solo/how-tos/timelock.mdx diff --git a/docs/build/isc/v1.1/docs/solo/how-tos/view-sc.md b/docs/build/isc/v1.4/docs/solo/how-tos/view-sc.md similarity index 100% rename from docs/build/isc/v1.1/docs/solo/how-tos/view-sc.md rename to docs/build/isc/v1.4/docs/solo/how-tos/view-sc.md diff --git a/docs/build/isc/v1.1/docs/tutorials/cross-chain-nft-marketplace-part-1.md b/docs/build/isc/v1.4/docs/tutorials/cross-chain-nft-marketplace-part-1.md similarity index 87% rename from docs/build/isc/v1.1/docs/tutorials/cross-chain-nft-marketplace-part-1.md rename to docs/build/isc/v1.4/docs/tutorials/cross-chain-nft-marketplace-part-1.md index 50abd2a9f68..0f460e90060 100644 --- a/docs/build/isc/v1.1/docs/tutorials/cross-chain-nft-marketplace-part-1.md +++ b/docs/build/isc/v1.4/docs/tutorials/cross-chain-nft-marketplace-part-1.md @@ -8,32 +8,23 @@ The second part of the series will focus on bridging NFTs from another EVM netwo Finally, in part III, you will deploy another instance of the marketplace on the BNB Testnet, making the marketplace truly cross-chain. ## Marketplace Architecture Overview - The architecture of the marketplace will evolve as we progress through the tutorials. - ### Part I - In part I, we will start with this very simple architecture: - ![Cross Chain MarketPlace V1](../../../../../../static/img/tutorials/cross_chain_marketplace/Architecture-V1.png) ### Part II - -In Part II, you will add the contracts and scripts to manually bridge NFTs from the BNB Testnet to the ShimmerEVM Testnet and list them on the marketplace. - -The architecture will evolve to look like this: - +In Part II, you will add the contracts and scripts to manually bridge NFTs from the BNB Testnet to the ShimmerEVM Testnet and list them on the marketplace. The architecture will evolve to look like this: ![Cross Chain MarketPlace V2](../../../../../../static/img/tutorials/cross_chain_marketplace/Architecture-V2.png) ### Part III - Finally, in part III, you will deploy another marketplace instance on the BNB Testnet, where the contract will handle cross-chain transactions. This enables a user on the BNB Testnet, to view and buy an NFT listed on the ShimmerEVM Testnet and vice versa without switching networks. - The architecture will look like this: - ![Cross Chain MarketPlace V3](../../../../../../static/img/tutorials/cross_chain_marketplace/Architecture-V3.png) + + ## Prerequisites - [Node.js](https://nodejs.org) >= v18.0 @@ -63,6 +54,10 @@ In the `hardhat.config.js` file, update the `networks` object to include the Shi https://github.com/iota-community/ISC-Cross-Chain-NFT-Marketplace/blob/ab11866504fe8f72fc54d719a316ec9291839ced/hardhat.config.js ``` + + + + ## Contracts In the first part of the tutorial, you will only need two contracts: the [NFT Marketplace contract](https://github.com/iota-community/ISC-Cross-Chain-NFT-Marketplace/blob/ab11866504fe8f72fc54d719a316ec9291839ced/contracts/NFTMarketPlace.sol) and an [NFT ERC721-compatible](https://github.com/iota-community/ISC-Cross-Chain-NFT-Marketplace/blob/main/contracts/MyERC721.sol) contract. @@ -73,12 +68,10 @@ Create a `contracts` folder in the root of the project and add the following fil The idea behind a marketplace contract is to allow users to list their NFTs for sale and other users to buy them. The contract will handle the transfer of the NFT from the seller to the buyer and the payment from the buyer to the seller. A seller must first allow the marketplace contract to transfer the NFT on their behalf before listing it for sale. -#### Data Structures - The main data structures and functions in the contract are: -- `struct Listing`: Represents an NFT listing with the seller's price and address. In further parts of the tutorial, `struct Listing` will be expanded to include more details about the NFT being listed, like the chain it resides on. - +- `struct Listing` +Represents an NFT listing with the price and the address of the seller. In further parts of the tutorial, `struct Listing` will be expanded to include more details about the NFT being listed, like the chain it resides on. ```solidity struct Listing { address seller; @@ -87,13 +80,15 @@ struct Listing { ``` -- `mapping s_listings` : Maps the token contract address to a mapping of token ID to `Listing.` +- `mapping s_listings` +Maps the token contract address to a mappring of token ID to `Listing`. ```solidity mapping(address => mapping(uint256 => Listing)) private s_listings; ``` -#### Functions -- `function listItem`: Allows a seller to list an NFT for sale by specifying the token contract address, the token ID, and the price. This function will stay the same in Part II, but the `Listing` struct will be expanded to include more details about the NFT being listed, like the chain it resides on. + +- `function listItem` +Allows a seller to list an NFT for sale by specifying the token contract address, the token ID, and the price. In Part II, this function will stay the same, but the `Listing` struct will be expanded to include more details about the NFT being listed, like the chain it resides on. ```solidity /* @@ -123,7 +118,11 @@ mapping(address => mapping(uint256 => Listing)) private s_listings; } ``` -- `function buyItem`: This handles the transfer of an NFT from a seller to the buyer. Similar to the `listItem` function, this function will stay the same in Part II because the NFTs will be bridged manually. + + + +- `function buyItem` +This handles the transfer of an NFT from a seller to buyer. Same as the `listItem` function, this function will stay the same in Part II, because the NFTs will be bridged manually. ```solidity /* @@ -159,7 +158,11 @@ mapping(address => mapping(uint256 => Listing)) private s_listings; ``` -- `function getListing`: Gets an NFT listing by its address and `tokenId`. + + + +- `function getListing` +gets an NFT listing by its address and `tokenId`. ```solidity function getListing(address nftAddress, uint256 tokenId) external @@ -185,7 +188,6 @@ A standard ERC721-compatible contract that allows minting and transferring of NF ```solidity reference https://github.com/iota-community/ISC-Cross-Chain-NFT-Marketplace/blob/main/contracts/MyERC721.sol ``` -### Compile the Contracts After adding the contracts, compile them by running: @@ -199,7 +201,6 @@ npx hardhat compile First, create a `scripts` folder in the root of the project and add the following files under it: ### deploy_marketplace_shimmer.js - The `deploy_marketplace_shimmer.js` script will deploy the NFTMarketplace contract to the ShimmerEVM Testnet and save the contract address to a file called `NFTMarketplace.txt`. ```javascript reference @@ -213,13 +214,11 @@ npx hardhat run scripts/deploy_marketplace_shimmer.js --network shimmerevm-testn ``` ### deploy_er721_shimmer.js - This script will deploy the `MyERC721` contract to the ShimmerEVM Testnet and save the contract's address to a file called `MyERC721.txt`. ```javascript reference https://github.com/iota-community/ISC-Cross-Chain-NFT-Marketplace/blob/main/scripts/deploy_erc721_shimmer.js ``` - You can run this script with the following command: ```bash @@ -233,7 +232,6 @@ After you have deployed the `MyERC721` contract, you are ready to mint an NFT us ```javascript reference https://github.com/iota-community/ISC-Cross-Chain-NFT-Marketplace/blob/main/scripts/mint_nft.js ``` - You can run the script by executing the following command: ```bash @@ -279,4 +277,4 @@ npx hardhat run scripts/buy_item.js --network shimmerevm-testnet ## Conclusion -In this first part of the cross-chain NFT marketplace tutorial, you have set up the project and deployed the NFTMarketplace contract to the ShimmerEVM Testnet. You have also deployed the MyERC721 contract, minted an NFT, and listed it on the marketplace. In the next part, we will manually bridge NFTs from the BNB Testnet and Shimmer Testnet to the ShimmerEVM Testnet and list them on the same marketplace. \ No newline at end of file +In this first part of the cross-chain NFT marketplace tutorial, we have set up the project and deployed the NFTMarketplace contract to the ShimmerEVM Testnet. We have also deployed the MyERC721 contract, minted an NFT and then listed it on the marketplace. In the next part, we will manually bridge NFTs from BNB Testnet and Shimmer Testnet to the ShimmerEVM Testnet and list them on the same marketplace. \ No newline at end of file diff --git a/docs/build/isc/v1.1/docs/tutorials/cross-chain-nft-marketplace-part-2.md b/docs/build/isc/v1.4/docs/tutorials/cross-chain-nft-marketplace-part-2.md similarity index 100% rename from docs/build/isc/v1.1/docs/tutorials/cross-chain-nft-marketplace-part-2.md rename to docs/build/isc/v1.4/docs/tutorials/cross-chain-nft-marketplace-part-2.md diff --git a/docs/build/isc/v1.1/docs/tutorials/defi-lend-borrow-tutorial-part-1.md b/docs/build/isc/v1.4/docs/tutorials/defi-lend-borrow-tutorial-part-1.md similarity index 100% rename from docs/build/isc/v1.1/docs/tutorials/defi-lend-borrow-tutorial-part-1.md rename to docs/build/isc/v1.4/docs/tutorials/defi-lend-borrow-tutorial-part-1.md diff --git a/docs/build/isc/v1.1/docs/tutorials/defi-lend-borrow-tutorial-part-2.md b/docs/build/isc/v1.4/docs/tutorials/defi-lend-borrow-tutorial-part-2.md similarity index 100% rename from docs/build/isc/v1.1/docs/tutorials/defi-lend-borrow-tutorial-part-2.md rename to docs/build/isc/v1.4/docs/tutorials/defi-lend-borrow-tutorial-part-2.md diff --git a/docs/build/isc/v1.4/docs/tutorials/defi-yield-farming.md b/docs/build/isc/v1.4/docs/tutorials/defi-yield-farming.md new file mode 100644 index 00000000000..128997b73dd --- /dev/null +++ b/docs/build/isc/v1.4/docs/tutorials/defi-yield-farming.md @@ -0,0 +1,193 @@ +--- +description: Yield Farming Tutorial Using Solidity. +image: /img/logo/WASP_logo_dark.png +tags: + - EVM + - tutorial + - defi + - yield-farming +--- + +import DeployAdmonition from '../_admonitions/_deploy_a_smart_contract.md'; + +# Yield Farming DApp with Pyth Network Price Feeds + +## Introduction + +This tutorial will guide you through the process of building a basic yield farming decentralized application (DApp) using [Solidity](https://docs.soliditylang.org/en/v0.8.26/), the [Hardhat](https://hardhat.org/) development environment and the [Pyth Network Price Feeds](/build/oracles/#pyth) to retrieve the IOTA/USD price feed to calculate rewards for stakers. + +## What is Yield Farming? + +Yield farming, also known as liquidity mining, is a way for users to earn passive income by providing liquidity to a blockchain protocol. This involves depositing assets into a protocol, which in return offers rewards in the form of fees, interest, or other incentives. For example, users can supply liquidity to a decentralized lending platform or a decentralized exchange that operates on an Automated Market Maker (AMM) model, earning rewards in return. + +At its core, yield farming allows cryptocurrency holders to lock up their assets, generating rewards in the process. + +### Key Concepts Covered + +1. **ERC20 Tokens**: Both the reward and staking tokens are standard ERC20 tokens. +2. **Staking Mechanism**: Users can deposit (stake) IOTATokens into the TokenFarm contract. +3. **Unstaking Mechanism**: Users can withdraw (unstake) their staked tokens at any time. +4. **Reward Distribution**: The contract periodically distributes DappTokens as rewards to stakers. + +## Yield Farming Architecture Overview + +![DeFi Yield Farming](../../../../../../static/img/tutorials/defi_yield_farming/Architecture.png) + +## Prerequisites + +- [Node.js](https://nodejs.org) >= v18.0 +- [Hardhat](https://hardhat.org) >= v2.0.0 +- [npx](https://www.npmjs.com/package/npx) >= v7.1.0. +- Basic understanding of Solidity and smart contracts. + +## 1. Set Up the Hardhat Project + +First, create a new directory for the project and navigate into it: + +```bash +mkdir yield-farming +cd yield-farming +``` + +Then [bootsrap a new Hardhat project](https://hardhat.org/tutorial/creating-a-new-hardhat-project), by running: + +```bash +npx hardhat init +``` + +Follow the prompts to create a basic sample project. After that, install the necessary dependencies: + +```bash +npm install --save-dev @nomiclabs/hardhat-ethers ethers @openzeppelin/contracts dotenv +``` + +Pyth provides a [Solidity SDK](https://github.com/pyth-network/pyth-crosschain/tree/main/target_chains/ethereum/sdk/solidity) to fetch prices from Pyth contracts. The SDK exposes IPyth interface to interact with Pyth price feeds. + +```bash +npm install @pythnetwork/pyth-sdk-solidity +``` + +## 2. Write and Understand the Smart Contracts + +Create a `contracts` folder in the root of the project and add the following files under it: + +### 1. DappToken.sol + +#### Description + +This contract represents the reward token (DappToken) that users will earn as a reward for staking their IOTATokens. It is an [ERC20](https://ethereum.org/en/developers/docs/standards/tokens/erc-20/) token, which is a widely used token standard on EVM compatible blockchains. The contract inherits from [OpenZeppelin’s](https://www.openzeppelin.com/) ERC20 implementation, which provides standard functionalities for a fungible token. + +```solidity reference +https://github.com/iota-community/Defi-yield-farming/blob/main/contracts/DappToken.sol +``` + +#### Key Details + +- The constructor mints an initial supply of 1,000,000 tokens to the deployer's address. +- The token is named "DappToken" with the symbol "DAP". + +### 2. IOTAToken.sol + +#### Description + +This contract represents the token that users will stake in the yield farm (IOTAToken). Like the DappToken, this is also an [ERC20](https://ethereum.org/en/developers/docs/standards/tokens/erc-20/) token. The IOTAToken will be transferred to the TokenFarm contract when users stake their tokens. + +```solidity reference +https://github.com/iota-community/Defi-yield-farming/blob/main/contracts/IOTAToken.sol +``` + +#### Key Details + +- The constructor mints an initial supply of 1,000,000 tokens to the deployer's address. +- The token is named "IOTAToken" with the symbol "TST". + +### 3. TokenFarm.sol + +#### Description + +This is the core contract of the yield farming application. It manages the staking, unstaking, and reward distribution logic. Users can stake their IOTATokens in this contract to earn DappTokens as rewards. The contract integrates with the Pyth Oracle to fetch the IOTA/USD price, which is used to calculate rewards for stakers. + +#### Key Functionalities + +- **Staking**: Users can stake their IOTATokens in the contract by calling the `stakeTokens` function. This function transfers the tokens from the user's wallet to the contract and updates their staking balance. +- **Unstaking**: Users can un-stake their tokens by calling the unstakeTokens function, which returns their tokens and resets their staking balance. +- **Rewards Distribution**: The contract owner can call the `issueTokens` function to distribute DappToken rewards to stakers. Rewards are issued once every 60 minutes, and the reward rate is 10% of the staked amount. + +#### Key Variables + +- `dappToken` and `iotaToken`: Instances of the DappToken and IOTAToken contracts, used for staking and rewarding tokens. +- `stakingBalance`: A mapping to track each user's staked IOTATokens. +- `stakers`: An array that keeps track of all users who have staked tokens. +- `hasStaked` and `isStaking`: Mappings to track whether a user has staked before and whether they are currently staking. + +#### Functions + +- `stakeTokens(uint256 _amount)`: Allows users to stake IOTATokens in the contract. +- `unstakeTokens()`: Allows users to withdraw their staked IOTATokens. +- `issueTokens()`: Allows the owner to distribute DappToken rewards to all stakers. +- `getIOTA2USDPriceFeed`: Interacts with the Pyth Oracle network to fetch the current price of IOTA in USD. This fetched price is used within the `issueTokens` function to calculate the equivalent value of rewards in DappToken. + +```solidity reference +https://github.com/iota-community/Defi-yield-farming/blob/main/contracts/TokenFarm.sol +``` + +## 3. Create a HardHat Deploy Script + +Create a deployment script to deploy the contracts to the Shimmer EVM testnet. + +In the `scripts` folder, create a file named `deploy.js` with the following content: + +```javascript reference +https://github.com/iota-community/Defi-yield-farming/blob/main/scripts/deploy.js +``` + +## 4. Deploy to the Shimmer EVM Test + +### 1. Configure Hardhat for Shimmer EVM Testnet + +Create a `.env` file with the following content, replacing your own private key: + +```bash +PRIVATE_KEY=your-private-key +SHIMMER_EVM_TESTNET_URL=https://json-rpc.evm.testnet.shimmer.network +``` + +### 2. Install the `dotenv` Package to Manage Environment Variables + +```bash +npm install dotenv +``` + +### 3. Import the `dotenv` package in your `hardhat.config.js` + +Modify `hardhat.config.js` to include the Shimmer EVM testnet configuration: + +```javascript reference +https://github.com/iota-community/Defi-yield-farming/blob/main/hardhat.config.js +``` + +## 5. Deploy to Shimmer EVM Testnet + + + +### 1. Compile Your Contracts + +```bash +npx hardhat compile +``` + +### 2. Deploy Your Contracts to the Shimmer EVM Testnet + +```bash +npx hardhat run scripts/deploy.js --network shimmer_evm_testnet +``` + +You can verify your contract by visiting +the [Shimmmer EVM Testnet Explorer](https://explorer.evm.testnet.shimmer.network/), +and searching for the address from the previous step. If you access the `Contract` tab, you should be able to see your code and interact with your contract or you can use the below command to verify the contracts through hardhat : + +```bash +npx hardhat verify --network shimmer_evm_testnet CONTRACT_ADDRESS_HERE "CONSTRUCTOR_ARGUMENTS_IF_ANY" +``` + +Feel free to [fork this repository](https://github.com/iota-community/Defi-yield-farming), contribute with pull requests, or customize it to suit your needs. We have a React [frontend](https://github.com/iota-community/Defi-yield-farming/tree/main/frontend) on the repository that you can use to interact with Token Farm smart contract. \ No newline at end of file diff --git a/docs/build/isc/v1.1/sidebars.js b/docs/build/isc/v1.4/sidebars.js similarity index 99% rename from docs/build/isc/v1.1/sidebars.js rename to docs/build/isc/v1.4/sidebars.js index 8cdefa6cd3a..ad382407a79 100644 --- a/docs/build/isc/v1.1/sidebars.js +++ b/docs/build/isc/v1.4/sidebars.js @@ -271,6 +271,11 @@ module.exports = { }, ], }, + { + type: 'doc', + label: 'Yield Farming', + id: 'tutorials/defi-yield-farming', + }, ], }, { diff --git a/docs/maintain/wasp/v1.1/docs/how-tos/chain-management.md b/docs/maintain/wasp/v1.4/docs/how-tos/chain-management.md similarity index 100% rename from docs/maintain/wasp/v1.1/docs/how-tos/chain-management.md rename to docs/maintain/wasp/v1.4/docs/how-tos/chain-management.md diff --git a/docs/maintain/wasp/v1.1/docs/how-tos/running-a-node.md b/docs/maintain/wasp/v1.4/docs/how-tos/running-a-node.md similarity index 100% rename from docs/maintain/wasp/v1.1/docs/how-tos/running-a-node.md rename to docs/maintain/wasp/v1.4/docs/how-tos/running-a-node.md diff --git a/docs/maintain/wasp/v1.1/docs/how-tos/running-an-access-node.md b/docs/maintain/wasp/v1.4/docs/how-tos/running-an-access-node.md similarity index 100% rename from docs/maintain/wasp/v1.1/docs/how-tos/running-an-access-node.md rename to docs/maintain/wasp/v1.4/docs/how-tos/running-an-access-node.md diff --git a/docs/maintain/wasp/v1.1/docs/how-tos/setting-up-a-chain.md b/docs/maintain/wasp/v1.4/docs/how-tos/setting-up-a-chain.md similarity index 100% rename from docs/maintain/wasp/v1.1/docs/how-tos/setting-up-a-chain.md rename to docs/maintain/wasp/v1.4/docs/how-tos/setting-up-a-chain.md diff --git a/docs/maintain/wasp/v1.1/docs/how-tos/wasp-cli.md b/docs/maintain/wasp/v1.4/docs/how-tos/wasp-cli.md similarity index 100% rename from docs/maintain/wasp/v1.1/docs/how-tos/wasp-cli.md rename to docs/maintain/wasp/v1.4/docs/how-tos/wasp-cli.md diff --git a/docs/maintain/wasp/v1.1/docs/reference/configuration.md b/docs/maintain/wasp/v1.4/docs/reference/configuration.md similarity index 100% rename from docs/maintain/wasp/v1.1/docs/reference/configuration.md rename to docs/maintain/wasp/v1.4/docs/reference/configuration.md diff --git a/docs/maintain/wasp/v1.1/docs/reference/metrics.md b/docs/maintain/wasp/v1.4/docs/reference/metrics.md similarity index 100% rename from docs/maintain/wasp/v1.1/docs/reference/metrics.md rename to docs/maintain/wasp/v1.4/docs/reference/metrics.md diff --git a/docs/maintain/wasp/v1.1/sidebars.js b/docs/maintain/wasp/v1.4/sidebars.js similarity index 100% rename from docs/maintain/wasp/v1.1/sidebars.js rename to docs/maintain/wasp/v1.4/sidebars.js diff --git a/package.json b/package.json index 30bf81db999..7a23d602122 100644 --- a/package.json +++ b/package.json @@ -29,7 +29,7 @@ "write-heading-ids": "docusaurus write-heading-ids" }, "dependencies": { - "@algolia/client-search": "^4.22.1", + "@algolia/client-search": "^4.24.0", "@artsy/to-title-case": "^1.1.0", "@docusaurus/core": "2.4.3", "@docusaurus/plugin-client-redirects": "2.4.3", @@ -53,7 +53,7 @@ "hast-util-is-element": "1.1.0", "html-react-parser": "^4.2.10", "humanize-duration": "^3.30.0", - "infima": "^0.2.0-alpha.43", + "infima": "^0.2.0-alpha.45", "plugin-image-zoom": "flexanalytics/plugin-image-zoom", "raw-loader": "^4.0.2", "react": "18.2.0", @@ -65,7 +65,7 @@ "react-popper": "^2.3.0", "react-select": "^5.7.7", "recharts": "^2.12.7", - "rehype-jargon": "3.0.0", + "rehype-jargon": "3.1.0", "rehype-katex": "4", "rehype-lodash-template": "^0.2.1", "remark-code-import": "^0.4.0", @@ -77,7 +77,7 @@ "web3": "^4.2.2", "webpack": "^5.94.0", "webpack-node-externals": "^3.0.0", - "ws": "^8.17.1" + "ws": "^8.18.0" }, "resolutions": { "@types/react": "18.2.71", diff --git a/scripts/get_wasp_references.sh b/scripts/get_wasp_references.sh index a1919e76452..4be209d9594 100755 --- a/scripts/get_wasp_references.sh +++ b/scripts/get_wasp_references.sh @@ -5,18 +5,18 @@ mkdir tmp cd tmp # Download and copy docs -curl -sL https://s3.eu-central-1.amazonaws.com/files.iota.org/iota-wiki/wasp/1.1/iscmagic.tar.gz | tar xzv -cp -Rv docs/iscmagic/* ../docs/build/isc/v1.1/docs/reference/magic-contract/ - -curl -sL https://s3.eu-central-1.amazonaws.com/files.iota.org/iota-wiki/wasp/1.1/iscutils.tar.gz | tar xzv -cp -Rv docs/iscutils ../docs/build/isc/v1.1/docs/reference/ - curl -sL https://s3.eu-central-1.amazonaws.com/files.iota.org/iota-wiki/wasp/1.3/iscmagic.tar.gz | tar xzv cp -Rv docs/iscmagic/* ../docs/build/isc/v1.3/docs/reference/magic-contract/ curl -sL https://s3.eu-central-1.amazonaws.com/files.iota.org/iota-wiki/wasp/1.3/iscutils.tar.gz | tar xzv cp -Rv docs/iscutils ../docs/build/isc/v1.3/docs/reference/ +curl -sL https://s3.eu-central-1.amazonaws.com/files.iota.org/iota-wiki/wasp/1.4/iscmagic.tar.gz | tar xzv +cp -Rv docs/iscmagic/* ../docs/build/isc/v1.4/docs/reference/magic-contract/ + +curl -sL https://s3.eu-central-1.amazonaws.com/files.iota.org/iota-wiki/wasp/1.4/iscutils.tar.gz | tar xzv +cp -Rv docs/iscutils ../docs/build/isc/v1.4/docs/reference/ + # Return to root and cleanup cd - rm -rf tmp diff --git a/static/img/tutorials/cross_chain_marketplace/Architecture-V3.png b/static/img/tutorials/cross_chain_marketplace/Architecture-V3.png index 13e4b420b23..7c8d949b828 100644 Binary files a/static/img/tutorials/cross_chain_marketplace/Architecture-V3.png and b/static/img/tutorials/cross_chain_marketplace/Architecture-V3.png differ diff --git a/static/img/tutorials/defi_yield_farming/Architecture.png b/static/img/tutorials/defi_yield_farming/Architecture.png new file mode 100644 index 00000000000..c5dbcfdd84e Binary files /dev/null and b/static/img/tutorials/defi_yield_farming/Architecture.png differ diff --git a/yarn.lock b/yarn.lock index 75737f83ce5..a1cd3432e7f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -85,6 +85,13 @@ __metadata: languageName: node linkType: hard +"@algolia/cache-common@npm:4.24.0": + version: 4.24.0 + resolution: "@algolia/cache-common@npm:4.24.0" + checksum: bc1d0f8731713f7e6f10cd397b7d8f7464f14a2f4e1decc73a48e99ecbc0fe41bd4df1cc3eb0a4ecf286095e3eb3935b2ea40179de98e11676f8e7d78c622df8 + languageName: node + linkType: hard + "@algolia/cache-in-memory@npm:4.22.1": version: 4.22.1 resolution: "@algolia/cache-in-memory@npm:4.22.1" @@ -127,6 +134,16 @@ __metadata: languageName: node linkType: hard +"@algolia/client-common@npm:4.24.0": + version: 4.24.0 + resolution: "@algolia/client-common@npm:4.24.0" + dependencies: + "@algolia/requester-common": 4.24.0 + "@algolia/transporter": 4.24.0 + checksum: 19c6615f9e1b0bbda7dd8ecd285c5bdf48d7067223b06e385a6c69a20a6d6500086619fa0f9e63403cf33220d5d7a288360df55452fdf00f5feca8ca9852758a + languageName: node + linkType: hard + "@algolia/client-personalization@npm:4.22.1": version: 4.22.1 resolution: "@algolia/client-personalization@npm:4.22.1" @@ -138,7 +155,7 @@ __metadata: languageName: node linkType: hard -"@algolia/client-search@npm:4.22.1, @algolia/client-search@npm:^4.22.1": +"@algolia/client-search@npm:4.22.1": version: 4.22.1 resolution: "@algolia/client-search@npm:4.22.1" dependencies: @@ -149,6 +166,17 @@ __metadata: languageName: node linkType: hard +"@algolia/client-search@npm:^4.24.0": + version: 4.24.0 + resolution: "@algolia/client-search@npm:4.24.0" + dependencies: + "@algolia/client-common": 4.24.0 + "@algolia/requester-common": 4.24.0 + "@algolia/transporter": 4.24.0 + checksum: 2d19823994e92490885115188d75994fbcc7a407fbe14f52034b191607a51081ed476e367a65c889666f6b337b00d700203204d55666f182809f01fbd29fd1fb + languageName: node + linkType: hard + "@algolia/events@npm:^4.0.1": version: 4.0.1 resolution: "@algolia/events@npm:4.0.1" @@ -163,6 +191,13 @@ __metadata: languageName: node linkType: hard +"@algolia/logger-common@npm:4.24.0": + version: 4.24.0 + resolution: "@algolia/logger-common@npm:4.24.0" + checksum: 668fb5a2cbb6aaea7648ae522b5d088241589a9da9f8abb53e2daa89ca2d0bc04307291f57c65de7a332e092cc054cc98cc21b12af81620099632ca85c4ef074 + languageName: node + linkType: hard + "@algolia/logger-console@npm:4.22.1": version: 4.22.1 resolution: "@algolia/logger-console@npm:4.22.1" @@ -188,6 +223,13 @@ __metadata: languageName: node linkType: hard +"@algolia/requester-common@npm:4.24.0": + version: 4.24.0 + resolution: "@algolia/requester-common@npm:4.24.0" + checksum: 8f4a49ef0fb4aca42fa3703ddf97ff7f6e9c8492928aa66704ca2f54d3785d2338b64917860a01a42dedb1621279558ca7d549c5b1eb5b7f2742f952fb9865e5 + languageName: node + linkType: hard + "@algolia/requester-node-http@npm:4.22.1": version: 4.22.1 resolution: "@algolia/requester-node-http@npm:4.22.1" @@ -208,6 +250,17 @@ __metadata: languageName: node linkType: hard +"@algolia/transporter@npm:4.24.0": + version: 4.24.0 + resolution: "@algolia/transporter@npm:4.24.0" + dependencies: + "@algolia/cache-common": 4.24.0 + "@algolia/logger-common": 4.24.0 + "@algolia/requester-common": 4.24.0 + checksum: 2c026a777de5dcb6f3cc94a0cf5f4650fbc7067f56eb98a1ae9b5750815179a73eb2b1d8ae75853a99823afd13584b62430d7649c65a456b2623123f355955b1 + languageName: node + linkType: hard + "@ampproject/remapping@npm:^2.2.0": version: 2.3.0 resolution: "@ampproject/remapping@npm:2.3.0" @@ -386,15 +439,15 @@ __metadata: languageName: node linkType: hard -"@babel/generator@npm:^7.25.0": - version: 7.25.0 - resolution: "@babel/generator@npm:7.25.0" +"@babel/generator@npm:^7.25.6": + version: 7.25.6 + resolution: "@babel/generator@npm:7.25.6" dependencies: - "@babel/types": ^7.25.0 + "@babel/types": ^7.25.6 "@jridgewell/gen-mapping": ^0.3.5 "@jridgewell/trace-mapping": ^0.3.25 jsesc: ^2.5.1 - checksum: bf25649dde4068bff8e387319bf820f2cb3b1af7b8c0cfba0bd90880656427c8bad96cd5cb6db7058d20cffe93149ee59da16567018ceaa21ecaefbf780a785c + checksum: b55975cd664f5602304d868bb34f4ee3bed6f5c7ce8132cd92ff27a46a53a119def28a182d91992e86f75db904f63094a81247703c4dc96e4db0c03fd04bcd68 languageName: node linkType: hard @@ -1872,14 +1925,14 @@ __metadata: languageName: node linkType: hard -"@babel/types@npm:^7.25.0": - version: 7.25.2 - resolution: "@babel/types@npm:7.25.2" +"@babel/types@npm:^7.25.6": + version: 7.25.6 + resolution: "@babel/types@npm:7.25.6" dependencies: "@babel/helper-string-parser": ^7.24.8 "@babel/helper-validator-identifier": ^7.24.7 to-fast-properties: ^2.0.0 - checksum: f73f66ba903c6f7e38f519a33d53a67d49c07e208e59ea65250362691dc546c6da7ab90ec66ee79651ef697329872f6f97eb19a6dfcacc026fd05e76a563c5d2 + checksum: 9b2f84ff3f874ad05b0b9bf06862c56f478b65781801f82296b4cc01bee39e79c20a7c0a06959fed0ee582c8267e1cb21638318655c5e070b0287242a844d1c9 languageName: node linkType: hard @@ -2737,7 +2790,7 @@ __metadata: version: 0.0.0-use.local resolution: "@iota-wiki/cli@workspace:cli" dependencies: - "@babel/generator": ^7.25.0 + "@babel/generator": ^7.25.6 "@babel/parser": ^7.24.7 "@babel/types": ^7.23.6 "@iota-wiki/core": "workspace:^" @@ -2779,7 +2832,7 @@ __metadata: version: 0.0.0-use.local resolution: "@iota-wiki/core@workspace:." dependencies: - "@algolia/client-search": ^4.22.1 + "@algolia/client-search": ^4.24.0 "@argos-ci/cli": ^1.0.12 "@argos-ci/playwright": ^1.9.3 "@artsy/to-title-case": ^1.1.0 @@ -2820,7 +2873,7 @@ __metadata: hast-util-is-element: 1.1.0 html-react-parser: ^4.2.10 humanize-duration: ^3.30.0 - infima: ^0.2.0-alpha.43 + infima: ^0.2.0-alpha.45 plugin-image-zoom: flexanalytics/plugin-image-zoom prettier: ^2.8.8 raw-loader: ^4.0.2 @@ -2833,7 +2886,7 @@ __metadata: react-popper: ^2.3.0 react-select: ^5.7.7 recharts: ^2.12.7 - rehype-jargon: 3.0.0 + rehype-jargon: 3.1.0 rehype-katex: 4 rehype-lodash-template: ^0.2.1 remark-code-import: ^0.4.0 @@ -2847,7 +2900,7 @@ __metadata: web3: ^4.2.2 webpack: ^5.94.0 webpack-node-externals: ^3.0.0 - ws: ^8.17.1 + ws: ^8.18.0 languageName: unknown linkType: soft @@ -10704,13 +10757,20 @@ __metadata: languageName: node linkType: hard -"infima@npm:0.2.0-alpha.43, infima@npm:^0.2.0-alpha.43": +"infima@npm:0.2.0-alpha.43": version: 0.2.0-alpha.43 resolution: "infima@npm:0.2.0-alpha.43" checksum: fc5f79240e940eddd750439511767092ccb4051e5e91d253ec7630a9e7ce691812da3aa0f05e46b4c0a95dbfadeae5714fd0073f8d2df12e5aaff0697a1d6aa2 languageName: node linkType: hard +"infima@npm:^0.2.0-alpha.45": + version: 0.2.0-alpha.45 + resolution: "infima@npm:0.2.0-alpha.45" + checksum: 23e5a33b147cb3940194c23e249001e7988327bb27896b121883442bce42a532248387649eec74d008dadadcddc790fb6842f043f33c78fda35e29f0b720cf8c + languageName: node + linkType: hard + "inflight@npm:^1.0.4": version: 1.0.6 resolution: "inflight@npm:1.0.6" @@ -16169,13 +16229,13 @@ plugin-image-zoom@flexanalytics/plugin-image-zoom: languageName: node linkType: hard -"rehype-jargon@npm:3.0.0": - version: 3.0.0 - resolution: "rehype-jargon@npm:3.0.0" +"rehype-jargon@npm:3.1.0": + version: 3.1.0 + resolution: "rehype-jargon@npm:3.1.0" dependencies: hast-util-from-html: 2.0.1 unist-util-visit: 5.0.0 - checksum: 733f7ab8de68e095087f0c56795d2af11cff8f4b206312eb2ec4900993c8299b5c5f148218028d41c24bda9a1bf7cb6c0f16908fb87c446f4abe17306b27e17f + checksum: f32a06ed34cea51199fbee0d8956c257cfc3b18595ed754b6bf659e45fa7df4a0430fcbbb9548443a2e6645684c6b6480fd30d75e2e7e2983a3f61077e23e07e languageName: node linkType: hard @@ -20244,9 +20304,9 @@ plugin-image-zoom@flexanalytics/plugin-image-zoom: languageName: node linkType: hard -"ws@npm:^8.17.1": - version: 8.17.1 - resolution: "ws@npm:8.17.1" +"ws@npm:^8.18.0": + version: 8.18.0 + resolution: "ws@npm:8.18.0" peerDependencies: bufferutil: ^4.0.1 utf-8-validate: ">=5.0.2" @@ -20255,7 +20315,7 @@ plugin-image-zoom@flexanalytics/plugin-image-zoom: optional: true utf-8-validate: optional: true - checksum: 442badcce1f1178ec87a0b5372ae2e9771e07c4929a3180321901f226127f252441e8689d765aa5cfba5f50ac60dd830954afc5aeae81609aefa11d3ddf5cecf + checksum: 91d4d35bc99ff6df483bdf029b9ea4bfd7af1f16fc91231a96777a63d263e1eabf486e13a2353970efc534f9faa43bdbf9ee76525af22f4752cbc5ebda333975 languageName: node linkType: hard