From 4d3c2cc957859567d123f57793a876ea594ce484 Mon Sep 17 00:00:00 2001 From: Alexandre Ferreira Date: Mon, 17 Oct 2022 19:46:16 +0100 Subject: [PATCH] docs: reuse openzeppelin images for other documentation Signed-off-by: Alexandre Ferreira --- ...llet-faucet01.png => example-faucet01.png} | Bin ...llet-faucet02.png => example-faucet02.png} | Bin ...llet-faucet03.png => example-faucet03.png} | Bin ...png => example-openzeppelin-compile01.png} | Bin ...ng => example-openzeppelin-createfile.png} | Bin ....png => example-openzeppelin-deploy01.png} | Bin ....png => example-openzeppelin-deploy02.png} | Bin ....png => example-openzeppelin-deploy03.png} | Bin ...02.png => example-openzeppelin-flat01.png} | Bin ...er.png => example-openzeppelin-header.png} | Bin ...ng => example-openzeppelin-interact01.png} | Bin ...ng => example-openzeppelin-interact02.png} | Bin ...ng => example-openzeppelin-interact03.png} | Bin ...ng => example-openzeppelin-interact04.png} | Bin ....png => example-openzeppelin-nft-logo.png} | Bin ....png => example-openzeppelin-verify01.png} | Bin ....png => example-openzeppelin-verify02.png} | Bin ....png => example-openzeppelin-verify03.png} | Bin ....png => example-openzeppelin-verify04.png} | Bin ...> example-openzeppelin-wallet-token01.png} | Bin ...> example-openzeppelin-wallet-token02.png} | Bin ...rd.png => example-openzeppelin-wizard.png} | Bin ...ploy01.png => example-remix-connect01.png} | Bin ...e01.png => example-remix-createfile01.png} | Bin ...e02.png => example-remix-createfile02.png} | Bin ...flat01.png => example-remix-flattener.png} | Bin ...-wallet-token01.png => example-xdcpay.png} | Bin how-to/openzeppelin.md | 32 +++++++++--------- ...ct-on-the-xdc-network-using-openzepplin.md | 32 +++++++++--------- 29 files changed, 32 insertions(+), 32 deletions(-) rename .gitbook/assets/{openzeppelin-example-wallet-faucet01.png => example-faucet01.png} (100%) rename .gitbook/assets/{openzeppelin-example-wallet-faucet02.png => example-faucet02.png} (100%) rename .gitbook/assets/{openzeppelin-example-wallet-faucet03.png => example-faucet03.png} (100%) rename .gitbook/assets/{openzeppelin-example-compile.png => example-openzeppelin-compile01.png} (100%) rename .gitbook/assets/{openzeppelin-example-createfile03.png => example-openzeppelin-createfile.png} (100%) rename .gitbook/assets/{openzeppelin-example-deploy02.png => example-openzeppelin-deploy01.png} (100%) rename .gitbook/assets/{openzeppelin-example-deploy03.png => example-openzeppelin-deploy02.png} (100%) rename .gitbook/assets/{openzeppelin-example-deploy04.png => example-openzeppelin-deploy03.png} (100%) rename .gitbook/assets/{openzeppelin-example-flat02.png => example-openzeppelin-flat01.png} (100%) rename .gitbook/assets/{openzeppelin-example-header.png => example-openzeppelin-header.png} (100%) rename .gitbook/assets/{openzeppelin-example-interact01.png => example-openzeppelin-interact01.png} (100%) rename .gitbook/assets/{openzeppelin-example-interact02.png => example-openzeppelin-interact02.png} (100%) rename .gitbook/assets/{openzeppelin-example-interact03.png => example-openzeppelin-interact03.png} (100%) rename .gitbook/assets/{openzeppelin-example-interact04.png => example-openzeppelin-interact04.png} (100%) rename .gitbook/assets/{openzeppelin-example-nft-logo.png => example-openzeppelin-nft-logo.png} (100%) rename .gitbook/assets/{openzeppelin-example-verify01.png => example-openzeppelin-verify01.png} (100%) rename .gitbook/assets/{openzeppelin-example-verify02.png => example-openzeppelin-verify02.png} (100%) rename .gitbook/assets/{openzeppelin-example-verify03.png => example-openzeppelin-verify03.png} (100%) rename .gitbook/assets/{openzeppelin-example-verify04.png => example-openzeppelin-verify04.png} (100%) rename .gitbook/assets/{openzeppelin-example-wallet-token02.png => example-openzeppelin-wallet-token01.png} (100%) rename .gitbook/assets/{openzeppelin-example-wallet-token03.png => example-openzeppelin-wallet-token02.png} (100%) rename .gitbook/assets/{openzeppelin-example-wizard.png => example-openzeppelin-wizard.png} (100%) rename .gitbook/assets/{openzeppelin-example-deploy01.png => example-remix-connect01.png} (100%) rename .gitbook/assets/{openzeppelin-example-createfile01.png => example-remix-createfile01.png} (100%) rename .gitbook/assets/{openzeppelin-example-createfile02.png => example-remix-createfile02.png} (100%) rename .gitbook/assets/{openzeppelin-example-flat01.png => example-remix-flattener.png} (100%) rename .gitbook/assets/{openzeppelin-example-wallet-token01.png => example-xdcpay.png} (100%) diff --git a/.gitbook/assets/openzeppelin-example-wallet-faucet01.png b/.gitbook/assets/example-faucet01.png similarity index 100% rename from .gitbook/assets/openzeppelin-example-wallet-faucet01.png rename to .gitbook/assets/example-faucet01.png diff --git a/.gitbook/assets/openzeppelin-example-wallet-faucet02.png b/.gitbook/assets/example-faucet02.png similarity index 100% rename from .gitbook/assets/openzeppelin-example-wallet-faucet02.png rename to .gitbook/assets/example-faucet02.png diff --git a/.gitbook/assets/openzeppelin-example-wallet-faucet03.png b/.gitbook/assets/example-faucet03.png similarity index 100% rename from .gitbook/assets/openzeppelin-example-wallet-faucet03.png rename to .gitbook/assets/example-faucet03.png diff --git a/.gitbook/assets/openzeppelin-example-compile.png b/.gitbook/assets/example-openzeppelin-compile01.png similarity index 100% rename from .gitbook/assets/openzeppelin-example-compile.png rename to .gitbook/assets/example-openzeppelin-compile01.png diff --git a/.gitbook/assets/openzeppelin-example-createfile03.png b/.gitbook/assets/example-openzeppelin-createfile.png similarity index 100% rename from .gitbook/assets/openzeppelin-example-createfile03.png rename to .gitbook/assets/example-openzeppelin-createfile.png diff --git a/.gitbook/assets/openzeppelin-example-deploy02.png b/.gitbook/assets/example-openzeppelin-deploy01.png similarity index 100% rename from .gitbook/assets/openzeppelin-example-deploy02.png rename to .gitbook/assets/example-openzeppelin-deploy01.png diff --git a/.gitbook/assets/openzeppelin-example-deploy03.png b/.gitbook/assets/example-openzeppelin-deploy02.png similarity index 100% rename from .gitbook/assets/openzeppelin-example-deploy03.png rename to .gitbook/assets/example-openzeppelin-deploy02.png diff --git a/.gitbook/assets/openzeppelin-example-deploy04.png b/.gitbook/assets/example-openzeppelin-deploy03.png similarity index 100% rename from .gitbook/assets/openzeppelin-example-deploy04.png rename to .gitbook/assets/example-openzeppelin-deploy03.png diff --git a/.gitbook/assets/openzeppelin-example-flat02.png b/.gitbook/assets/example-openzeppelin-flat01.png similarity index 100% rename from .gitbook/assets/openzeppelin-example-flat02.png rename to .gitbook/assets/example-openzeppelin-flat01.png diff --git a/.gitbook/assets/openzeppelin-example-header.png b/.gitbook/assets/example-openzeppelin-header.png similarity index 100% rename from .gitbook/assets/openzeppelin-example-header.png rename to .gitbook/assets/example-openzeppelin-header.png diff --git a/.gitbook/assets/openzeppelin-example-interact01.png b/.gitbook/assets/example-openzeppelin-interact01.png similarity index 100% rename from .gitbook/assets/openzeppelin-example-interact01.png rename to .gitbook/assets/example-openzeppelin-interact01.png diff --git a/.gitbook/assets/openzeppelin-example-interact02.png b/.gitbook/assets/example-openzeppelin-interact02.png similarity index 100% rename from .gitbook/assets/openzeppelin-example-interact02.png rename to .gitbook/assets/example-openzeppelin-interact02.png diff --git a/.gitbook/assets/openzeppelin-example-interact03.png b/.gitbook/assets/example-openzeppelin-interact03.png similarity index 100% rename from .gitbook/assets/openzeppelin-example-interact03.png rename to .gitbook/assets/example-openzeppelin-interact03.png diff --git a/.gitbook/assets/openzeppelin-example-interact04.png b/.gitbook/assets/example-openzeppelin-interact04.png similarity index 100% rename from .gitbook/assets/openzeppelin-example-interact04.png rename to .gitbook/assets/example-openzeppelin-interact04.png diff --git a/.gitbook/assets/openzeppelin-example-nft-logo.png b/.gitbook/assets/example-openzeppelin-nft-logo.png similarity index 100% rename from .gitbook/assets/openzeppelin-example-nft-logo.png rename to .gitbook/assets/example-openzeppelin-nft-logo.png diff --git a/.gitbook/assets/openzeppelin-example-verify01.png b/.gitbook/assets/example-openzeppelin-verify01.png similarity index 100% rename from .gitbook/assets/openzeppelin-example-verify01.png rename to .gitbook/assets/example-openzeppelin-verify01.png diff --git a/.gitbook/assets/openzeppelin-example-verify02.png b/.gitbook/assets/example-openzeppelin-verify02.png similarity index 100% rename from .gitbook/assets/openzeppelin-example-verify02.png rename to .gitbook/assets/example-openzeppelin-verify02.png diff --git a/.gitbook/assets/openzeppelin-example-verify03.png b/.gitbook/assets/example-openzeppelin-verify03.png similarity index 100% rename from .gitbook/assets/openzeppelin-example-verify03.png rename to .gitbook/assets/example-openzeppelin-verify03.png diff --git a/.gitbook/assets/openzeppelin-example-verify04.png b/.gitbook/assets/example-openzeppelin-verify04.png similarity index 100% rename from .gitbook/assets/openzeppelin-example-verify04.png rename to .gitbook/assets/example-openzeppelin-verify04.png diff --git a/.gitbook/assets/openzeppelin-example-wallet-token02.png b/.gitbook/assets/example-openzeppelin-wallet-token01.png similarity index 100% rename from .gitbook/assets/openzeppelin-example-wallet-token02.png rename to .gitbook/assets/example-openzeppelin-wallet-token01.png diff --git a/.gitbook/assets/openzeppelin-example-wallet-token03.png b/.gitbook/assets/example-openzeppelin-wallet-token02.png similarity index 100% rename from .gitbook/assets/openzeppelin-example-wallet-token03.png rename to .gitbook/assets/example-openzeppelin-wallet-token02.png diff --git a/.gitbook/assets/openzeppelin-example-wizard.png b/.gitbook/assets/example-openzeppelin-wizard.png similarity index 100% rename from .gitbook/assets/openzeppelin-example-wizard.png rename to .gitbook/assets/example-openzeppelin-wizard.png diff --git a/.gitbook/assets/openzeppelin-example-deploy01.png b/.gitbook/assets/example-remix-connect01.png similarity index 100% rename from .gitbook/assets/openzeppelin-example-deploy01.png rename to .gitbook/assets/example-remix-connect01.png diff --git a/.gitbook/assets/openzeppelin-example-createfile01.png b/.gitbook/assets/example-remix-createfile01.png similarity index 100% rename from .gitbook/assets/openzeppelin-example-createfile01.png rename to .gitbook/assets/example-remix-createfile01.png diff --git a/.gitbook/assets/openzeppelin-example-createfile02.png b/.gitbook/assets/example-remix-createfile02.png similarity index 100% rename from .gitbook/assets/openzeppelin-example-createfile02.png rename to .gitbook/assets/example-remix-createfile02.png diff --git a/.gitbook/assets/openzeppelin-example-flat01.png b/.gitbook/assets/example-remix-flattener.png similarity index 100% rename from .gitbook/assets/openzeppelin-example-flat01.png rename to .gitbook/assets/example-remix-flattener.png diff --git a/.gitbook/assets/openzeppelin-example-wallet-token01.png b/.gitbook/assets/example-xdcpay.png similarity index 100% rename from .gitbook/assets/openzeppelin-example-wallet-token01.png rename to .gitbook/assets/example-xdcpay.png diff --git a/how-to/openzeppelin.md b/how-to/openzeppelin.md index 30892041..bf1be052 100644 --- a/how-to/openzeppelin.md +++ b/how-to/openzeppelin.md @@ -16,7 +16,7 @@ keywords: - erc721 --- -![OpenZeppelin logo](../.gitbook/assets/openzeppelin-example-header.png) +![OpenZeppelin logo](https://raw.githubusercontent.com/XDC-Community/docs/main/.gitbook/assets/example-openzeppelin-header.png) # Overview @@ -43,7 +43,7 @@ OpenZeppelin is a “battle-tested” open-source framework comprised of reusabl OpenZeppelin's [Contracts Wizard](https://wizard.openzeppelin.com/) as an interactive smart contract generator is the easiest way to get started building smart contracts based on OpenZeppelin's components.

- OpenZeppelin Contracts Wizard + OpenZeppelin Contracts Wizard

Select the kind of contract that you want, set your parameters and desired features, and the Wizard will generate all of the code necessary. The resulting code is ready to be compiled and deployed, or it can serve as a starting point and be customized further. @@ -57,7 +57,7 @@ ERC721 is a standard for **non-fungible tokens** and is defined in the [EIP-721 ## Create the contract

- Joe's Free Voucher image + Joe's Free Voucher image

Joe has a Pizza shop and for the opening day, he wants to create a one-time free voucher for each client that show with her web3 wallet. @@ -65,7 +65,7 @@ Joe has a Pizza shop and for the opening day, he wants to create a one-time free Make a simple non-fungible token contract that can be paused and minted only by the owner, we gonna use OpenZeppelin's ERC721 contract for this. Open [Remix IDE](https://remix.xinfin.network/), and let's start creating a new Solidity file named `PizzaFreeVoucher.sol` in the contracts folder:

- How to create a new file in Remix IDE How to create a new file in Remix IDE How to create a new file in Remix IDE + How to create a new file in Remix IDE How to create a new file in Remix IDE How to create a new file in Remix IDE

Most of the OpenZeppelin contracts are expected to be used via inheritance: you will inherit from them when writing your contracts. Here is a possible code for the contract, copy this code below for your `PizzaFreeVoucher.sol`: @@ -141,7 +141,7 @@ With `contract PizzaFreeVoucher is ERC721, Pausable, Ownable, ERC721Burnable` we We just need to compile the Solidity file, by changing the Remix tab to `Solidity Compiler` or just hitting `Ctrl + S` in the editor.

- Compile contract + Compile contract

## Deploy the contract @@ -153,19 +153,19 @@ For this tutorial, we gonna deploy the contract using a web3 wallet compatible w Visit the [XDC Apothem network faucet](https://faucet.apothem.network/), enter the public address of your account, and `Request 1000 XDC`. After the success message from the faucet, you can confirm if you have 1000 XDC tokens transferred to your wallet.

- Apothem Network Faucet Apothem Network Faucet Apothem Network Faucet + Apothem Network Faucet Apothem Network Faucet Apothem Network Faucet

Now that we have gas, deploy the contract we previously create. Just change to deploy tab on your Remix IDE, set the environment to `Injected Provider`, and connect Remix with your *XDCPay* account. Select the `PizzaFreeVoucher` contract and click on `Deploy`.

- Deploy Deploy Deploy + Deploy Deploy Deploy

After that, you should see a pop-up notification to accept/deny the deployment transaction, accept by clicking on `Submit`.

- Verify Verify + Verify Verify

Wait for the blockchain confirmation in the `Transactions` tab of your wallet. You can now copy the transaction hash `0xe487f01b027172ce171f5980e465307da5bdb66a0425904ff8f48f25f797b15d` :partying_face::partying_face: @@ -175,13 +175,13 @@ Wait for the blockchain confirmation in the `Transactions` tab of your wallet. Y Open the [**XDC Apothem Network Explorer**](https://explorer.apothem.network/) and search for the previously copied hash. Here, at explorer, we can check all the transactions that occur on the network, including the deployment of our contract. Check the `To` address, should be your contract address (starting with `xdc...`).

- Verify + Verify

Search for the contract address on the explorer, we can see that the contract isn't verified. Click on `Verify and Publish` that will open the verification page.

- Verify + Verify

Now, we have to submit the source code, name, address, and compiler version of the contract. With this, the final user can confirm if the contract was been verified or not, but also interact with it directly on the explorer. @@ -191,25 +191,25 @@ Now, we have to submit the source code, name, address, and compiler version of t On the bottom-left corner in Remix, open `Plugin Manager` and install the `Flattener` plugin. Change to `Flattener` tab on the left navigation bar and click on `contracts/Flattern PizzaFreeVoucher.sol` (this will copy the flat code to your clipboard).

- Flat the source code Flat the source code + Flat the source code Flat the source code

Back to the verification page, paste this code, and fill in the rest of the information. Finally, click `Submit`.

- Verify + Verify

Once the contract is verified, just navigate to `Contract` > `Read Contract` tab, and here you can perform reading actions, such as getting the balance of an account, getting the contract owner, etc.

- Interact + Interact

Let's mint our first non-fungible token by changing to the `Write Contract` tab. First, connect your web3 wallet by clicking on the `Connect to Web3` button and then call the `SafeMint` method with the address that gonna receive the NFT.

- Interact Interact + Interact Interact

Accept the action by submitting the transaction :rocket: @@ -219,13 +219,13 @@ Accept the action by submitting the transaction :rocket: If the mint transaction was confirmed, congratulations! The target address now has one free pizza voucher.

- Interact + Interact

You can pick the voucher contract address (`xdcF26E1ac69D9e173C96848FbD1bBE8759f5C71106`) and add it to the list of *XDCPay*'s tokens.

- Confirm wallet Confirm wallet Confirm wallet + Confirm wallet Confirm wallet Confirm wallet

Now you can see the voucher NFT in your wallet :rocket::rocket: \ No newline at end of file diff --git a/learn/how-to-articles/create-and-deploy-your-first-your-first-smart-contract-on-the-xdc-network-using-openzepplin.md b/learn/how-to-articles/create-and-deploy-your-first-your-first-smart-contract-on-the-xdc-network-using-openzepplin.md index 8c8a9b59..7b0d3d6d 100644 --- a/learn/how-to-articles/create-and-deploy-your-first-your-first-smart-contract-on-the-xdc-network-using-openzepplin.md +++ b/learn/how-to-articles/create-and-deploy-your-first-your-first-smart-contract-on-the-xdc-network-using-openzepplin.md @@ -18,7 +18,7 @@ description: Use OpenZeppelin's Smart Contracts to create your tokens. # Create and Deploy Your First Smart Contract on the XDC Network Using OpenZepplin and Remix -![OpenZeppelin](https://raw.githubusercontent.com/XDC-Community/docs/main/.gitbook/assets/openzeppelin-example-header.png) +![OpenZeppelin](https://raw.githubusercontent.com/XDC-Community/docs/main/.gitbook/assets/example-openzeppelin-header.png) ## Overview @@ -44,7 +44,7 @@ OpenZeppelin is a “battle-tested” open-source framework comprised of reusabl OpenZeppelin's [Contracts Wizard](https://wizard.openzeppelin.com/) as an interactive smart contract generator is the easiest way to get started building smart contracts based on OpenZeppelin's components. -![OpenZeppelin Contracts Wizard](https://raw.githubusercontent.com/XDC-Community/docs/main/.gitbook/assets/openzeppelin-example-wizard.png) +![OpenZeppelin Contracts Wizard](https://raw.githubusercontent.com/XDC-Community/docs/main/.gitbook/assets/example-openzeppelin-wizard.png) Select the kind of contract that you want, set your parameters and desired features, and the Wizard will generate all of the code necessary. The resulting code is ready to be compiled and deployed, or it can serve as a starting point and be customized further. @@ -56,13 +56,13 @@ ERC721 is a standard for **non-fungible tokens** and is defined in the [EIP-721 ### Create the contract -![Joe's Free Voucher image](https://raw.githubusercontent.com/XDC-Community/docs/main/.gitbook/assets/openzeppelin-example-nft-logo.png) +![Joe's Free Voucher image](https://raw.githubusercontent.com/XDC-Community/docs/main/.gitbook/assets/example-openzeppelin-nft-logo.png) Joe has a Pizza shop and for the opening day, he wants to create a one-time free voucher for each client that show with her web3 wallet. Make a simple non-fungible token contract that can be paused and minted only by the owner, we gonna use OpenZeppelin's ERC721 contract for this. Open [Remix IDE](https://remix.xinfin.network/), and let's start creating a new Solidity file named `PizzaFreeVoucher.sol` in the contracts folder: -![How to create a new file in Remix IDE](https://raw.githubusercontent.com/XDC-Community/docs/main/.gitbook/assets/openzeppelin-example-createfile01.png) ![How to create a new file in Remix IDE](https://raw.githubusercontent.com/XDC-Community/docs/main/.gitbook/assets/openzeppelin-example-createfile02.png) ![How to create a new file in Remix IDE](https://raw.githubusercontent.com/XDC-Community/docs/main/.gitbook/assets/openzeppelin-example-createfile03.png) +![How to create a new file in Remix IDE](https://raw.githubusercontent.com/XDC-Community/docs/main/.gitbook/assets/example-remix-createfile01.png) ![How to create a new file in Remix IDE](https://raw.githubusercontent.com/XDC-Community/docs/main/.gitbook/assets/example-remix-createfile02.png) ![How to create a new file in Remix IDE](https://raw.githubusercontent.com/XDC-Community/docs/main/.gitbook/assets/example-openzeppelin-createfile.png) Most of the OpenZeppelin contracts are expected to be used via inheritance: you will inherit from them when writing your contracts. Here is a possible code for the contract, copy this code below for your `PizzaFreeVoucher.sol`: @@ -136,7 +136,7 @@ With `contract PizzaFreeVoucher is ERC721, Pausable, Ownable, ERC721Burnable` we We just need to compile the Solidity file, by changing the Remix tab to `Solidity Compiler` or just hitting `Ctrl + S` in the editor. -![Compile contract](https://raw.githubusercontent.com/XDC-Community/docs/main/.gitbook/assets/openzeppelin-example-compile.png) +![Compile contract](https://raw.githubusercontent.com/XDC-Community/docs/main/.gitbook/assets/example-openzeppelin-compile01.png) ### Deploy the contract @@ -146,15 +146,15 @@ For this tutorial, we gonna deploy the contract using a web3 wallet compatible w Visit the [XDC Apothem network faucet](https://faucet.apothem.network/), enter the public address of your account, and `Request 1000 XDC`. After the success message from the faucet, you can confirm if you have 1000 XDC tokens transferred to your wallet. -![Apothem Network Faucet](https://raw.githubusercontent.com/XDC-Community/docs/main/.gitbook/assets/openzeppelin-example-wallet-faucet01.png) ![Apothem Network Faucet](https://raw.githubusercontent.com/XDC-Community/docs/main/.gitbook/assets/openzeppelin-example-wallet-faucet02.png) ![Apothem Network Faucet](https://raw.githubusercontent.com/XDC-Community/docs/main/.gitbook/assets/openzeppelin-example-wallet-faucet03.png) +![Apothem Network Faucet](https://raw.githubusercontent.com/XDC-Community/docs/main/.gitbook/assets/example-faucet01.png) ![Apothem Network Faucet](https://raw.githubusercontent.com/XDC-Community/docs/main/.gitbook/assets/example-faucet02.png) ![Apothem Network Faucet](https://raw.githubusercontent.com/XDC-Community/docs/main/.gitbook/assets/example-faucet03.png) Now that we have gas, deploy the contract we previously create. Just change to deploy tab on your Remix IDE, set the environment to `Injected Provider`, and connect Remix with your _XDCPay_ account. Select the `PizzaFreeVoucher` contract and click on `Deploy`. -![Deploy](https://raw.githubusercontent.com/XDC-Community/docs/main/.gitbook/assets/openzeppelin-example-deploy01.png) ![Deploy](https://raw.githubusercontent.com/XDC-Community/docs/main/.gitbook/assets/openzeppelin-example-deploy02.png) ![Deploy](https://raw.githubusercontent.com/XDC-Community/docs/main/.gitbook/assets/openzeppelin-example-deploy03.png) +![Deploy](https://raw.githubusercontent.com/XDC-Community/docs/main/.gitbook/assets/example-remix-connect01.png) ![Deploy](https://raw.githubusercontent.com/XDC-Community/docs/main/.gitbook/assets/example-openzeppelin-deploy01.png) ![Deploy](https://raw.githubusercontent.com/XDC-Community/docs/main/.gitbook/assets/example-openzeppelin-deploy02.png) After that, you should see a pop-up notification to accept/deny the deployment transaction, accept by clicking on `Submit`. -![Verify](https://raw.githubusercontent.com/XDC-Community/docs/main/.gitbook/assets/openzeppelin-example-deploy04.png) ![Verify](https://raw.githubusercontent.com/XDC-Community/docs/main/.gitbook/assets/openzeppelin-example-verify01.png) +![Verify](https://raw.githubusercontent.com/XDC-Community/docs/main/.gitbook/assets/example-openzeppelin-deploy03.png) ![Verify](https://raw.githubusercontent.com/XDC-Community/docs/main/.gitbook/assets/example-openzeppelin-verify01.png) Wait for the blockchain confirmation in the `Transactions` tab of your wallet. You can now copy the transaction hash `0xe487f01b027172ce171f5980e465307da5bdb66a0425904ff8f48f25f797b15d` :partying\_face::partying\_face: @@ -162,11 +162,11 @@ Wait for the blockchain confirmation in the `Transactions` tab of your wallet. Y Open the [**XDC Apothem Network Explorer**](https://explorer.apothem.network/) and search for the previously copied hash. Here, at explorer, we can check all the transactions that occur on the network, including the deployment of our contract. Check the `To` address, should be your contract address (starting with `xdc...`). -![Verify](https://raw.githubusercontent.com/XDC-Community/docs/main/.gitbook/assets/openzeppelin-example-verify02.png) +![Verify](https://raw.githubusercontent.com/XDC-Community/docs/main/.gitbook/assets/example-openzeppelin-verify02.png) Search for the contract address on the explorer, we can see that the contract isn't verified. Click on `Verify and Publish` that will open the verification page. -![Verify](https://raw.githubusercontent.com/XDC-Community/docs/main/.gitbook/assets/openzeppelin-example-verify03.png) +![Verify](https://raw.githubusercontent.com/XDC-Community/docs/main/.gitbook/assets/example-openzeppelin-verify03.png) Now, we have to submit the source code, name, address, and compiler version of the contract. With this, the final user can confirm if the contract was been verified or not, but also interact with it directly on the explorer. @@ -174,19 +174,19 @@ Now, we have to submit the source code, name, address, and compiler version of t On the bottom-left corner in Remix, open `Plugin Manager` and install the `Flattener` plugin. Change to `Flattener` tab on the left navigation bar and click on `contracts/Flattern PizzaFreeVoucher.sol` (this will copy the flat code to your clipboard). -![Flat the source code](https://raw.githubusercontent.com/XDC-Community/docs/main/.gitbook/assets/openzeppelin-example-flat01.png) ![Flat the source code](https://raw.githubusercontent.com/XDC-Community/docs/main/.gitbook/assets/openzeppelin-example-flat02.png) +![Flat the source code](https://raw.githubusercontent.com/XDC-Community/docs/main/.gitbook/assets/example-remix-flattener.png) ![Flat the source code](https://raw.githubusercontent.com/XDC-Community/docs/main/.gitbook/assets/example-openzeppelin-flat01.png) Back to the verification page, paste this code, and fill in the rest of the information. Finally, click `Submit`. -![Verify](https://raw.githubusercontent.com/XDC-Community/docs/main/.gitbook/assets/openzeppelin-example-verify04.png) +![Verify](https://raw.githubusercontent.com/XDC-Community/docs/main/.gitbook/assets/example-openzeppelin-verify04.png) Once the contract is verified, just navigate to `Contract` > `Read Contract` tab, and here you can perform reading actions, such as getting the balance of an account, getting the contract owner, etc. -![Interact](https://raw.githubusercontent.com/XDC-Community/docs/main/.gitbook/assets/openzeppelin-example-interact01.png) +![Interact](https://raw.githubusercontent.com/XDC-Community/docs/main/.gitbook/assets/example-openzeppelin-interact01.png) Let's mint our first non-fungible token by changing to the `Write Contract` tab. First, connect your web3 wallet by clicking on the `Connect to Web3` button and then call the `SafeMint` method with the address that gonna receive the NFT. -![Interact](https://raw.githubusercontent.com/XDC-Community/docs/main/.gitbook/assets/openzeppelin-example-interact02.png) ![Interact](https://raw.githubusercontent.com/XDC-Community/docs/main/.gitbook/assets/openzeppelin-example-interact03.png) +![Interact](https://raw.githubusercontent.com/XDC-Community/docs/main/.gitbook/assets/example-openzeppelin-interact02.png) ![Interact](https://raw.githubusercontent.com/XDC-Community/docs/main/.gitbook/assets/example-openzeppelin-interact03.png) Accept the action by submitting the transaction :rocket: @@ -194,10 +194,10 @@ Accept the action by submitting the transaction :rocket: If the mint transaction was confirmed, congratulations! The target address now has one free pizza voucher. -![Interact](https://raw.githubusercontent.com/XDC-Community/docs/main/.gitbook/assets/openzeppelin-example-interact04.png) +![Interact](https://raw.githubusercontent.com/XDC-Community/docs/main/.gitbook/assets/example-openzeppelin-interact04.png) You can pick the voucher contract address (`xdcF26E1ac69D9e173C96848FbD1bBE8759f5C71106`) and add it to the list of _XDCPay_'s tokens. -![Confirm wallet](https://raw.githubusercontent.com/XDC-Community/docs/main/.gitbook/assets/openzeppelin-example-wallet-token01.png) ![Confirm wallet](https://raw.githubusercontent.com/XDC-Community/docs/main/.gitbook/assets/openzeppelin-example-wallet-token02.png) ![Confirm wallet](https://raw.githubusercontent.com/XDC-Community/docs/main/.gitbook/assets/openzeppelin-example-wallet-token03.png) +![Confirm wallet](https://raw.githubusercontent.com/XDC-Community/docs/main/.gitbook/assets/example-xdcpay.png) ![Confirm wallet](https://raw.githubusercontent.com/XDC-Community/docs/main/.gitbook/assets/example-openzeppelin-wallet-token01.png) ![Confirm wallet](https://raw.githubusercontent.com/XDC-Community/docs/main/.gitbook/assets/example-openzeppelin-wallet-token02.png) Now you can see the voucher NFT in your wallet :rocket::rocket: