Proposal details
Project Name
[XPDIEM Foundation Ltd
3 FRASER STREET
#05-25 DUO TOWER
SINGAPORE
189352]
Project Type
[ Integrate IoTeX ]
Proposal Description
[ Our NFT Multi-chain bridge (https://bridge.xp.network) already connects Ethereum, BSC, Polygon, Avalanche, Algorand, Elrond, Tron, Fantom, xDai, Fuse. Tezos & Solana are developed and are waiting to be audited. We’ve recently received a grant for bridging Velas.]
Milestones
[ Split your project into milestones: each one must have its own verifiable deliverables]
- Milestone 1:
- Duration (weeks): 2 weeks
- Deliverables: smart contracts adjustment to IoTeX token standards, building NFT Listing on IoTeX, Adding IoTeX to XPJS library, Updating relay validators for IoTeX
- Funds request (USD): 17,500 USD
- Milestone 2:
- Duration (weeks): 2 weeks
- Deliverables: Backens & Frontend. Integration of IoTeX in the:
1. NFT Index Requires JWT
2. TX Fee Estimator
3. Crypto-currency converter
4. Heartbeat - checks whether the IoTeX Node & validators areup and operating properly
Integration of IoTeX in the:
5. User Interface
6. Wallets (Metamask, TrustWallet, WalletConnect)
7. The basic tutorial that can interact with the deployed smart contracts and backend service. - Funds request (USD): 17,500 USD
Total funds requested
[ USD 35,000 ]
About your Team
[ XP.NETWORK · GitHub, LinkedIn Login, Sign in | LinkedIn ]
Metrics
[We expect hundreds or thousands of transactions per day once the NFT ecosystem is properly informed about the opportunities this integration brings]
Links
=== Do not change this section ===
By posting a proposal, you accept the rules below:
https://community.iotex.io/t/grant-issuance-rules/3839
Community voting
- I Like this proposal
- I Don’t like this proposal
=== Please add Milestone Reports below ===
IoTeX Grant Delivery
Project Name
XP Network Multi-Chain NFT Bridge
Project Type
NFT Infrastructure
Description
1.1 Bridge Architecture Overview
- The first of the kind NFT multi-chain bridge connecting a wide range of EVM to a number of Non-EVM chains. The bridge allows transferring NFTs to and from:
- Ethereum
- Binance Smart Chain
- Avalanche
- Polygon
- Algorand
- Fantom
- Tron
- Tezos
- Elrond
- Gnosis Chain (former xDai)
- Harmony
- Aurora
- Fuse
1.2 Tech stack
Bridge Component | Stack |
---|---|
Smart Contracts | Solidity, Rust, TEAL, Michelson |
Validators (Oracles) | TypeScript |
Backend | TypeScript |
Frontend | React (JSX, TypeScript) |
1.3. Bridge Architecture
2 Frontend
-
Initial View of the Bridge
Initial Page -
Departure / Destination chain list
IoTeX Among Integrated Chains
3 Backend + Token Conversion Oracles
- Nft-Index (Returns a list of NFTs an account owns on a supported blockchain)
- Transaction Fee Estimator - provides the TX fee on the target chain
- Crypto-Currency Converter (Oracle) converts the target fee to the native tokens of the original chain via USDT equivalent.
4 Relay Validators (Oracles)
- Private (SK) & Public (PK) key pairs for all the connected chains
- Validation logic
- Chain Event catching
- Event deserialization
- Transaction composition
- Transaction submition to the target chain
=== Please add Milestone Reports below ===
5. Milestone Deliverables
Number | Deliverable | Specification |
---|---|---|
5.1 | Documentation | The basic tutorial that can interact with the deployed smart contracts and backend service can be found below. |
5.2 | Smart Contracts | We have deployed smart contracts on IoTeX mainnet that are able to: 1. Support ERC-721 0x81e1Fdad0658b69914801aBaDA7Aa0Abb31653E5 2. Support ERC-1155 0xD87755CCeaab0edb28b3f0CD7D6405E1bB827B65 3. Bridge SC 0x4bA4ADdc803B04b71412439712cB1911103380D6 4. Freeze/Unfreeze Native NFTs in batches 5. Mint/Burn wrapped NFTs in batches 6. Pay the TX fees on the target chain in native tokens 7. Send / Receive NFTs in batches 8. Withdraw TX fees in the native tokens for the target chain |
5.3 | Backend | Integration of IoTeX in the: 1. NFT Index Requires JWT 2. TX Fee Estimator 3. Crypto-currency converter 4. Heartbeat - checks whether the IoTeX Node & validators areup and operating properly |
5.4 | Frontend | Integration of IoTeX in the: 1. User Interface 2. Wallets (Metamask, TrustWallet, WalletConnect) |
5.6 Testnet Smart contracts
Contract | Address |
---|---|
UserNftMinter | 0xC3dB3dBcf007961541BE1ddF15cD4ECc0Fc758d5 |
Erc1155Minter | 0x5df32A2F15D021DeF5086cF94fbCaC4594208A26 |
XPNft1155 | 0x941972fa041F507eBb8CfD5d11C05Eb1a51f2E95 |
XPNft | 0x5D822bA2a0994434392A0f947C83310328CFB0DE |
Minter | 0xE657b66d683bF4295325c5E66F6bb0fb6D1F7551 |
6. Future Plans
Our long term plans include:
- Running a IoTeX Node for listening to the chain events and submitting bridge transactions
- Mainnet integration to Cardano, Solana, Polkadot ecosystem, Cosmos ecosystem, EOS compatible chains, NEO
- ERC-721A New smart contract support (allows minting and burning in batches)
- Forged NFT detection on all the bridged chains
- NFT explorer for finding NFT’s with deleted storage
- NFT meta backup to secure transactions
- Distributed NFT’s hosting (better than IPFS)
- NFT Search (search by any parameter)
- Retention protection tool
7. Proof Links & Screens
Sending from IoTeX to Ethereum:
Native NFT ID: 4847
IoTeX NFT on Ethereum in OpenSea:
https://opensea.io/https://github.com/XP-NETWORK/IoTeX-Grant-Delivery/blob/master/assets/0xc254a8d4ef5f825fd31561bdc69551ed2b8db134/30366210949921613079214926160
The Origin of the NFT: IoTeX
Chain nonce: 20 (nonce of IoTeX in the NFT Bridge)
The URI of the original on OpenSea links to the original NFT ID: 4847
8. Trying IoTeX in Testnet
8.1. Initiating a Node.js project
Initiate a JS/TS project
mkdir your_project
cd your_project/
yarn init -y
8.2. Installing the libraries
To test/use the latest commits of the library install directly from github
yarn add "git+https://github.com/xp-network/xpjs#bleeding-edge" @elrondnetwork/erdjs ethers @taquito/taquito @temple-wallet/dapp dotenv
8.3. Importing the Dependencies
import {
ChainFactoryConfigs, ChainFactory,
ElrondHelper, ElrondParams,
TronHelper, TronParams,
Web3Helper, Web3Params,
AppConfigs,
NftMintArgs, Chain
} from "xp.network";
import {config} from 'dotenv';
config();
// Instantiate the chain factory for the TESTNET
const testnetConfig = ChainFactoryConfigs.TestNet();
const factory = ChainFactory(AppConfigs.TestNet(), testnetConfig);
6.4. Creating a signer object
Add a .env
file and populate it with the Private Key of the signer
touch .env
echo "SK=<replace with your Provate Key>" >> .env
Add the signer object:
// EVM chains compatible wallet:
import { Wallet } from "ethers";
// EVM signer for testing in the BE
const signer = new Wallet(
// Private Key Of the Signer
process.env.SK!,
testnetConfig.iotexParams?.provider
);
// Print out your signer object to see that it matches the expected wallet
console.log("signer", signer);
8.5. Creating inner Blockchain objects
(async () => {
// Inner Object ============= Chain Nonce == Chain Nonce ==
// IOTEX:
const iotex = await factory.inner<20>(Chain.IOTEX);
// Other EVM-compatible chains:
const bsc = await factory.inner<4>(Chain.BSC);
const ethereum = await factory.inner<5>(Chain.ETHEREUM);
const avax = await factory.inner<6>(Chain.AVALANCHE);
const polygon = await factory.inner<7>(Chain.POLYGON);
const fantom = await factory.inner<8>(Chain.FANTOM);
const IoTeX = await factory.inner<19>(Chain.IoTeX);
const gnosis = await factory.inner<14>(Chain.XDAI);
const harmony = await factory.inner<12>(Chain.HARMONY);
// Non-EVM chains:
const tron = await factory.inner<9>(Chain.TRON);
const elrond = await factory.inner<2>(Chain.ELROND);
const avalanche = await factory.inner<15>(Chain.ALGORAND);
const tezos = await factory.inner<18>(Chain.TEZOS);
// To view an inner object:
console.log("iotex:", iotex);
})();
8.6. Minting NFTs for testing
(async () => {
const nftResult = await factory.mint(
iotex,
process.env.SK!,
{
contract: "0xC3dB3dBcf007961541BE1ddF15cD4ECc0Fc758d5",
uris:["<Replace with your metadata URI>"]
} as NftMintArgs
);
console.log("Minting result:", nftResult);
})();
8.7. Getting a list of NFTs a user owns on a Blockchain
(async () => {
// Getting a list of NFTs
const iotexNFTs = await factory.nftList(
IoTeX, // The inner chain object
signer.address // The public key of the user
);
// To view a list of NFTs:
console.log("NFTs:", iotexNFTs);
})();
8.8. Transferring an NFT
(async () => {
// Calling the function:
const web3Result = await factory.transferNft(
iotex, // The Source Chain.
ethereum, // The Destination Chain.
bscNFTs[0], // The NFT selected by the index.
signer, // The web3 signer object.
"ADDRESS OF THE RECEIVER" // The address who you are transferring the NFT to.
);
console.log(web3Result);
})();
Addendum
Milestone reports
Once we award a grant, you must edit your post on every completed milestone , adding the details for the completed milestone.
Milestones Report:
Invoice form has been filled out correctly for this milestone.
Deliverable Name : ALL Milestones
Proof : See Below
Note : See Below
Payment tx : IoTeXScan Transaction Hash | IoTeXScan
Milestones | Deliverable | Specification |
---|---|---|
Milestone 1.1 | Testnet Smart Contracts | We have deployed smart contracts on IoTeX MAINNET that are able to: 1. Support ERC-721 0xC3dB3dBcf007961541BE1ddF15cD4ECc0Fc758d5 2. Support ERC-1155 0x5df32A2F15D021DeF5086cF94fbCaC4594208A26 3. Bridge SC 0xE657b66d683bF4295325c5E66F6bb0fb6D1F7551 4. Freeze/Unfreeze Native NFTs in batches 5. Mint/Burn wrapped NFTs in batches 6. Pay the TX fees on the target chain in native tokens 7. Send / Receive NFTs in batches 8. Withdraw TX fees in the native tokens for the target chain |
Milestone 1.2 | Mainnet Smart Contracts | We have deployed smart contracts on IoTeX MAINNET that are able to: 1. Support ERC-721 0x81e1Fdad0658b69914801aBaDA7Aa0Abb31653E5 2. Support ERC-1155 0xD87755CCeaab0edb28b3f0CD7D6405E1bB827B65 3. Bridge SC 0x4bA4ADdc803B04b71412439712cB1911103380D6 4. Freeze/Unfreeze Native NFTs in batches 5. Mint/Burn wrapped NFTs in batches 6. Pay the TX fees on the target chain in native tokens 7. Send / Receive NFTs in batches 8. Withdraw TX fees in the native tokens for the target chain |
Milestone 2.1 | Backend Integration | Integration of IoTeX in the: 1. NFT Index Requires JWT 2. TX Fee Estimator 3. Crypto-currency converter 4. Heartbeat - checks whether the IoTeX Node & validators areup and operating properly |
Milestone 2.2 | Frontend Mainnet & Testnet & Documentation | Integration of IoTeX in the: 1. User Interface 2. Wallets (Metamask, TrustWallet, WalletConnect) 3. The basic tutorial that can interact with the deployed smart contracts and backend service can be found above. |