<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://betaardordocs.jelurida.com/index.php?action=history&amp;feed=atom&amp;title=Asset_to_ERC1155_Bridge</id>
	<title>Asset to ERC1155 Bridge - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://betaardordocs.jelurida.com/index.php?action=history&amp;feed=atom&amp;title=Asset_to_ERC1155_Bridge"/>
	<link rel="alternate" type="text/html" href="https://betaardordocs.jelurida.com/index.php?title=Asset_to_ERC1155_Bridge&amp;action=history"/>
	<updated>2026-05-14T20:11:03Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.39.10</generator>
	<entry>
		<id>https://betaardordocs.jelurida.com/index.php?title=Asset_to_ERC1155_Bridge&amp;diff=12994&amp;oldid=prev</id>
		<title>Stefan at 14:25, 10 March 2022</title>
		<link rel="alternate" type="text/html" href="https://betaardordocs.jelurida.com/index.php?title=Asset_to_ERC1155_Bridge&amp;diff=12994&amp;oldid=prev"/>
		<updated>2022-03-10T14:25:47Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&amp;lt;languages /&amp;gt;&lt;br /&gt;
&amp;lt;translate&amp;gt;&lt;br /&gt;
{{#seo:&lt;br /&gt;
|title=Ardor Asset to ERC-1155 Bridge&lt;br /&gt;
|titlemode=replace&lt;br /&gt;
|keywords=asset, erc1155, erc, nft, blockchain, proof of stake, ardor, ignis, jelurida, development, ardor wiki, wiki, tutorials, advanced tutorials&lt;br /&gt;
|description=Detailed explanation step by step for connecting Ardor Asset with ERC1155 tokens on the Ethereum network&lt;br /&gt;
}}&lt;br /&gt;
[[Category:Advanced_guides]]&lt;br /&gt;
__TOC__&lt;br /&gt;
== Introduction ==&lt;br /&gt;
This is a tutorial for developers, who want to run a peg between Ardor assets and Ethereum tokens. It will introduce you to a new feature on Ardor platform - Asset to &amp;#039;&amp;#039;ERC-1155&amp;#039;&amp;#039; Bridge - a contract for maintaining peg of [https://eips.ethereum.org/EIPS/eip-1155 &amp;#039;&amp;#039;ERC-1155&amp;#039;&amp;#039;] tokens to [https://ardordocs.jelurida.com/Asset_exchange Assets on Ardor]. The &amp;#039;&amp;#039;ERC-1155&amp;#039;&amp;#039; tokens are considered a &amp;quot;wrapped&amp;quot; version of the Ardor assets, which exists on the Ethereum or some other EVM-compatible network. Please note that TestNet was used for the tutorial, but the steps remain the same for MainNet, where the only difference is using real currency/tokens.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Peg Initialization ==&lt;br /&gt;
&lt;br /&gt;
=== 1. Get an Ethereum full node ===&lt;br /&gt;
Install and sync an Ethereum full node,  register with [https://infura.io Infura] or similar provider.&lt;br /&gt;
Other EVM-compatible networks are also supported.&lt;br /&gt;
&lt;br /&gt;
=== 2. ERC-1155 tokens minting ===&lt;br /&gt;
Skip this step if [[#6.13._Auto-minting|auto-minting (&amp;#039;&amp;#039;&amp;#039;autoMintErc1155&amp;#039;&amp;#039;&amp;#039;)]] is going to be enabled.&lt;br /&gt;
&lt;br /&gt;
For each asset which is going to be wrapped, mint a token with some &amp;#039;&amp;#039;ERC1155&amp;#039;&amp;#039;-compatible&lt;br /&gt;
Ethereum contract. Remember that the amount of the minted &amp;#039;&amp;#039;ERC-1155&amp;#039;&amp;#039; tokens must not exceed the asset quantity in circulation on the Ardor platform.&lt;br /&gt;
&lt;br /&gt;
=== 3. Install Ardor ===&lt;br /&gt;
Go to [https://ardordocs.jelurida.com/Getting_started Ardordocs] or [https://www.jelurida.com/ardor/downloads Jelurida] website do download the latest version of Ardor.&lt;br /&gt;
&lt;br /&gt;
=== 4. Handle the missing dependencies ===&lt;br /&gt;
* Run the &amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;exportLibsMissingInArdor&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; task in this project:&lt;br /&gt;
&lt;br /&gt;
 ./gradlew exportLibsMissingInArdor&lt;br /&gt;
&lt;br /&gt;
* Copy the libraries from &amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;contract/libs-exported&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&lt;br /&gt;
[[File:LibsExportCopy.jpg|class=img-responsive|]]&lt;br /&gt;
&lt;br /&gt;
to the &amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;lib&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; directory inside the Ardor installation directory.&lt;br /&gt;
&lt;br /&gt;
[[File:LibsExportPaste.jpg|class=img-responsive]]&lt;br /&gt;
&lt;br /&gt;
=== 5. Configure the Ardor node for running the contract ===&lt;br /&gt;
Add the following configuration to the [https://ardordocs.jelurida.com/Faq#Node_configuration_using_the_nxt.properties &amp;#039;&amp;#039;&amp;#039;nxt.properties&amp;#039;&amp;#039;&amp;#039;]file of the Ardor installation.&lt;br /&gt;
&lt;br /&gt;
 nxt.addOns=nxt.addons.ContractRunner&lt;br /&gt;
 nxt.disableSecurityPolicy=true&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Warning!&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
Allowing connections to the Ardor node from outside its local machine is a bad idea. The &amp;#039;&amp;#039;&amp;#039;triggerContractByRequest&amp;#039;&amp;#039;&amp;#039; API, which is used to execute [[#Commands_reference|commands to the peg contract]], is [https://ardordocs.jelurida.com/API#Admin_Password password protected]. So executing any command requires the caller to have the [https://ardordocs.jelurida.com/API#Admin_Password Ardor node &amp;#039;&amp;#039;&amp;#039;adminPassword&amp;#039;&amp;#039;&amp;#039;], which means that he can modify the Ardor node in many ways including getting DB access to it.&lt;br /&gt;
&lt;br /&gt;
The recommended approach is to develop a small proxy backed which to run on the same server as the Ardor node and which&lt;br /&gt;
to expose only the [[#getUnwrapDepositAddress|getUnwrapDepositAddress]] and [[#processUnwrapsForAccount|processUnwrapsForAccount]] commands.&lt;br /&gt;
&lt;br /&gt;
Additionally, with Infura all requests to the Ethereum API are counted against a quota. The [[#processUnwrapsForAccount|processUnwrapsForAccount]] command calls the Ethereum API even if there is no unwrap transfer to execute. So if using Infura, the backend must also implement some restriction on the calls to [[#processUnwrapsForAccount|processUnwrapsForAccount]].&lt;br /&gt;
&lt;br /&gt;
=== 6. Create Contract Runner configuration ===&lt;br /&gt;
The configuration is a JSON file, located in &amp;#039;&amp;#039;&amp;#039;contract/src/test/resources/test_contract_config.json&amp;#039;&amp;#039;&amp;#039;. Rename it to &amp;#039;&amp;#039;&amp;#039;AssetsErc1155Peg.json&amp;#039;&amp;#039;&amp;#039; and open it.&lt;br /&gt;
&lt;br /&gt;
===== 6.1. Secrets =====&lt;br /&gt;
Generate strong secrets for &amp;#039;&amp;#039;&amp;#039;ethereumDepositAccountsSecret&amp;#039;&amp;#039;&amp;#039;, &amp;#039;&amp;#039;&amp;#039;ethereumBlockedAccountSecret&amp;#039;&amp;#039;&amp;#039; and the contract account, which will act as Ardor Blocked Account and will own all locked tokens which are in circulation on Ethereum side. Set &amp;#039;&amp;#039;&amp;#039;ethereumDepositAccountsSecret&amp;#039;&amp;#039;&amp;#039; and &amp;#039;&amp;#039;&amp;#039;ethereumBlockedAccountSecret&amp;#039;&amp;#039;&amp;#039; to the generated values.&lt;br /&gt;
&lt;br /&gt;
===== 6.2. &amp;#039;&amp;#039;&amp;#039;accountRS&amp;#039;&amp;#039;&amp;#039; =====&lt;br /&gt;
Set in &amp;#039;&amp;#039;&amp;#039;accountRS&amp;#039;&amp;#039;&amp;#039; the [https://ardordocs.jelurida.com/RS_Address_Format address] of the Ardor Blocked Account. To get the address login with the generated Ardor passphrase.&lt;br /&gt;
&lt;br /&gt;
===== 6.3. &amp;#039;&amp;#039;&amp;#039;apiUrl&amp;#039;&amp;#039;&amp;#039; =====&lt;br /&gt;
Set in &amp;#039;&amp;#039;&amp;#039;apiUrl&amp;#039;&amp;#039;&amp;#039; the URL of the HTTP API of your Ethereum full node. Other EVM-compatible networks like Polygon are also supported.&lt;br /&gt;
&lt;br /&gt;
===== 6.4. &amp;#039;&amp;#039;&amp;#039;chainId&amp;#039;&amp;#039;&amp;#039; =====&lt;br /&gt;
Set in &amp;#039;&amp;#039;&amp;#039;chainId&amp;#039;&amp;#039;&amp;#039; the chain ID of the Ethereum network as required by [https://eips.ethereum.org/EIPS/eip-1155 &amp;#039;&amp;#039;ERC-1155&amp;#039;&amp;#039;]. A list of the chain IDs of the popular EVN-compatible networks is available [https://chainlist.org here].&lt;br /&gt;
&lt;br /&gt;
===== 6.5. &amp;#039;&amp;#039;&amp;#039;ethLogsBlockRange&amp;#039;&amp;#039;&amp;#039; =====&lt;br /&gt;
Set in &amp;#039;&amp;#039;&amp;#039;ethLogsBlockRange&amp;#039;&amp;#039;&amp;#039; the max size of the block range allowed by the Ethereum full node when calling &amp;#039;&amp;#039;eth_getLogs&amp;#039;&amp;#039;. Value of 0 makes all &amp;#039;&amp;#039;eth_getLogs&amp;#039;&amp;#039; requests to be executed from the first to the latest block in the blockchain.&lt;br /&gt;
&lt;br /&gt;
===== 6.6. &amp;#039;&amp;#039;&amp;#039;ethLogsIterations&amp;#039;&amp;#039;&amp;#039; =====&lt;br /&gt;
Set &amp;#039;&amp;#039;&amp;#039;ethLogsIterations&amp;#039;&amp;#039;&amp;#039; to more than 1 to execute the calls to eth_getLogs in a loop. Each call will cover a subsequent block range of &amp;#039;&amp;#039;&amp;#039;ethLogsBlockRange&amp;#039;&amp;#039;&amp;#039;. Use this in case the full node has an unacceptable limit on the block range. The downside is that ethLogsIterations requests will be made when getting the logs in order to check for pending unwrapping or already processed wrappings. Make sure that &amp;#039;&amp;#039;&amp;#039;ethLogsBlockRange&amp;#039;&amp;#039;&amp;#039; * &amp;#039;&amp;#039;&amp;#039;ethLogsIterations&amp;#039;&amp;#039;&amp;#039; * &amp;#039;&amp;#039;&amp;#039;average_block_time&amp;#039;&amp;#039;&amp;#039; is at least 5-6 hours to allow users to process their unwrapping deposits.&lt;br /&gt;
&lt;br /&gt;
===== 6.7. Confirmations =====&lt;br /&gt;
Adjust &amp;#039;&amp;#039;&amp;#039;ardorConfirmations&amp;#039;&amp;#039;&amp;#039; and &amp;#039;&amp;#039;&amp;#039;ethereumConfirmations&amp;#039;&amp;#039;&amp;#039; - these are the number of blocks that the peg contract will wait before considering a transaction confirmed.&lt;br /&gt;
&lt;br /&gt;
===== 6.8. Fast Wrapping =====&lt;br /&gt;
Fast wrapping is enabled if &amp;#039;&amp;#039;&amp;#039;fastWrappingConfirmations&amp;#039;&amp;#039;&amp;#039; is set to less than ardorConfirmations.&lt;br /&gt;
&lt;br /&gt;
===== 6.8.1. &amp;#039;&amp;#039;&amp;#039;fastWrappingMinDeadline&amp;#039;&amp;#039;&amp;#039; =====&lt;br /&gt;
If Fast wrapping is enabled, set in &amp;#039;&amp;#039;&amp;#039;fastWrappingMinDeadline&amp;#039;&amp;#039;&amp;#039; the minimal transaction deadline required for the transaction to be eligible for fast wrapping.&lt;br /&gt;
&lt;br /&gt;
===== 6.9. Ardor Fees =====&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;ardorInitialFeeOverpayPercent&amp;#039;&amp;#039;&amp;#039; and &amp;#039;&amp;#039;&amp;#039;ardorRetryFeeOverpayPercent&amp;#039;&amp;#039;&amp;#039; are percentage with which to increase the Ardor transaction fee initially and each time a transaction expires, without being accepted in a block. The default transactions deadline is 15 min. &amp;#039;&amp;#039;&amp;#039;ardorInitialFeeOverpayPercent&amp;#039;&amp;#039;&amp;#039; is a string and may be negative, in which case the initial fee is below the automatically calculated by the node fee.&lt;br /&gt;
&lt;br /&gt;
===== 6.10. &amp;#039;&amp;#039;&amp;#039;ethereumRetryTimeout&amp;#039;&amp;#039;&amp;#039; =====&lt;br /&gt;
Time in seconds to wait for Ethereum transaction to be accepted in a block before retrying with higher fee.&lt;br /&gt;
&lt;br /&gt;
===== 6.11. Ethereum Fees =====&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;ethereumGasPriceInitialOverpay&amp;#039;&amp;#039;&amp;#039; and &amp;#039;&amp;#039;&amp;#039;ethereumGasPriceRetryOverpay&amp;#039;&amp;#039;&amp;#039; are percentage with which to increase the Ethereum transaction fee initially and each time a transaction is not accepted before &amp;#039;&amp;#039;&amp;#039;ethereumRetryTimeout&amp;#039;&amp;#039;&amp;#039;. ethereumGasPriceInitialOverpay is string and may be negative in which case the starting gas price is below the one calculated by the Ethereum node&lt;br /&gt;
&lt;br /&gt;
===== 6.12. &amp;#039;&amp;#039;&amp;#039;contractAddress&amp;#039;&amp;#039;&amp;#039; =====&lt;br /&gt;
Set in &amp;#039;&amp;#039;&amp;#039;contractAddress&amp;#039;&amp;#039;&amp;#039; the address of the contract which will manage the wrapped assets on Ethereum side. For example the contract address of OpenSea on Polygon Mumbai testnet is &amp;#039;&amp;#039;&amp;#039;0x2953399124F0cBB46d2CbACD8A89cF0599974963&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
===== 6.13. Auto-minting =====&lt;br /&gt;
To enable the auto-minting of wrapping &amp;#039;&amp;#039;ERC-1155&amp;#039;&amp;#039; tokens, set &amp;#039;&amp;#039;&amp;#039;autoMintErc1155&amp;#039;&amp;#039;&amp;#039; to true. When auto-minting is enabled, the tokens on ethereum side are automatically minted when a wrapping is complete and burned when un-wrapping is complete. For this, the contract specified in &amp;#039;&amp;#039;&amp;#039;contractAddress&amp;#039;&amp;#039;&amp;#039; must implement the [https://gitlab.com/petko/asset-to-erc1155-bridge/-/blob/master/erc1155/src/main/solidity/IERC1155MintBurn.sol &amp;#039;&amp;#039;ERC1155MintBurn&amp;#039;&amp;#039;] interface. Use the [[#deployEthContract|deployEthContract]] command before contractAddress is set to deploy a basic implementation of such auto-mintable contract provided in [https://gitlab.com/petko/asset-to-erc1155-bridge/-/blob/master/erc1155/src/main/solidity/ERC1155MintBurn.sol &amp;#039;&amp;#039;ERC1155MintBurn&amp;#039;&amp;#039;]. Then set the ID of the deployed contract in contractAddress&lt;br /&gt;
&lt;br /&gt;
===== 6.13.1 &amp;#039;&amp;#039;&amp;#039;autoMintWhitelistedIssuers&amp;#039;&amp;#039;&amp;#039; =====&lt;br /&gt;
If auto-minting is enabled, set in &amp;#039;&amp;#039;&amp;#039;autoMintWhitelistedIssuers&amp;#039;&amp;#039;&amp;#039; an array of Ardor account IDs specifying the asset issuers whose assets will be processed by &amp;#039;&amp;#039;&amp;#039;AssetsErc1155Peg&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
===== 6.14. &amp;#039;&amp;#039;&amp;#039;assetIdToErc1155IdMap&amp;#039;&amp;#039;&amp;#039; =====&lt;br /&gt;
If auto-minting is disabled, set in &amp;#039;&amp;#039;&amp;#039;assetIdToErc1155IdMap&amp;#039;&amp;#039;&amp;#039; a JSON object mapping between the known asset IDs on Ardor and the &amp;#039;&amp;#039;ERC-1155&amp;#039;&amp;#039; tokens IDs. The JSON keys must contain asset IDs as unsigned integer strings. The values must contain the corresponding &amp;#039;&amp;#039;ERC-1155&amp;#039;&amp;#039; token IDs as unsigned integer string, or a string with format &amp;#039;0x&amp;#039; followed by up to 64 hex chars (32 bytes in hex format). &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Example&amp;#039;&amp;#039;: &lt;br /&gt;
&lt;br /&gt;
[[File:JsonExample.jpg|class=img-responsive]]&lt;br /&gt;
&lt;br /&gt;
=== 7. Start and configure the Contract Runner ===&lt;br /&gt;
Start Ardor, create or use an existing [https://ardordocs.jelurida.com/Asset_exchange Asset], but make sure that the asset decimals are 0 and the asset quantity does not exceed the amount of the minted &amp;#039;&amp;#039;ERC-1155&amp;#039;&amp;#039; tokens in circulation. Set the configuration built on [[#6._Create_Contract_Runner_configuration|step 6]]. See [https://ardordocs.jelurida.com/Lightweight_Contracts#How_to_configure_the_Contract_Runner How to configure the Contract Runner] and use the Node Processes UI in order to utilize the encryption supported by it.&lt;br /&gt;
&lt;br /&gt;
If [[#6.13._Auto-minting|auto-minting]] is enabled, start Ardor with empty [[#6.12._contractAddress|contractAddress]], execute the [[#deployEthContract|deployEthContract]] command, set the result in [[#6.12._contractAddress|contractAddress]] and restart Ardor.&lt;br /&gt;
&lt;br /&gt;
=== 8. Deploy the AssetsErc1155Peg contract ===&lt;br /&gt;
Before deploying, navigate to &amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;contract/conf&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; and create &amp;#039;&amp;#039;&amp;#039;nxt-deployContract.properties&amp;#039;&amp;#039;&amp;#039; file, since the task reads the [https://ardordocs.jelurida.com/Lightweight_Contracts#Contract_Manager Contract Manager configuration] from it. Set at least &amp;#039;&amp;#039;&amp;#039;contract.manager.secretPhrase&amp;#039;&amp;#039;&amp;#039; property to the previously generated secret of the Ardor Blocked Account. The deployment can be executed remotely by setting the &amp;#039;&amp;#039;&amp;#039;contract.manager.serverAddress&amp;#039;&amp;#039;&amp;#039; property.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Warning!&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
Make sure the Ardor Blocked Account secret is secured - delete it from &amp;#039;&amp;#039;&amp;#039;nxt-deployContract.properties&amp;#039;&amp;#039;&amp;#039; or delete the&lt;br /&gt;
whole file. This file is used only by the deployContract task.&lt;br /&gt;
&lt;br /&gt;
Deploy the contract by executing the deployContract gradle task:&lt;br /&gt;
&lt;br /&gt;
  ./gradlew deployContract&lt;br /&gt;
&lt;br /&gt;
=== 9. Get the peg addresses ===&lt;br /&gt;
This step can be skipped if [[#6.13._Auto-minting|auto-minting (&amp;#039;&amp;#039;&amp;#039;autoMintErc1155&amp;#039;&amp;#039;&amp;#039;)]] is enabled.&lt;br /&gt;
&lt;br /&gt;
With the Contract Runner started on the Ardor node, call the &amp;#039;&amp;#039;triggerContractByRequest&amp;#039;&amp;#039; API with command &amp;#039;&amp;#039;getPegAddresses&amp;#039;&amp;#039; and you&amp;#039;ll get response like:&lt;br /&gt;
&lt;br /&gt;
 {&lt;br /&gt;
   &amp;quot;ardorBlockedAccount&amp;quot;: &amp;quot;ARDOR-J24K-QWD8-XHEX-36P7X&amp;quot;,&lt;br /&gt;
   &amp;quot;ethereumBlockedAccount&amp;quot;: &amp;quot;0xd1a49a09d7d1be11108f2629859695aec32f3e2b&amp;quot;,&lt;br /&gt;
   &amp;quot;requestProcessingTime&amp;quot;: 0 &lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
[[File:PegAddress.jpg|class=img-responsive]]&lt;br /&gt;
&lt;br /&gt;
See the [[#Commands_reference|Commands Reference]] section for more details about the available commands.&lt;br /&gt;
&lt;br /&gt;
=== 10. Transfer all minted ERC-1155 tokens to the Ethereum Blocked Account ===&lt;br /&gt;
This step can be skipped if [[#6.13._Auto-minting|auto-minting]] is enabled.&lt;br /&gt;
&lt;br /&gt;
The Ethereum Blocked Account address is returned in [[#9._Get_the_peg_addresses|ethereumBlockedAccount]].&lt;br /&gt;
&lt;br /&gt;
This way the peg contract is initialized in fully unwrapped state - all tokens are in circulation on Ardor side and can be wrapped into &amp;#039;&amp;#039;ERC-1155&amp;#039;&amp;#039; tokens. Alternatively if all Ardor assets are transferred to the [[#6.2._accountRS|ardorBlockedAccount]], and the &amp;#039;&amp;#039;ERC-1155&amp;#039;&amp;#039; tokens are released in circulation on Ethereum side, the contract will be in &amp;quot;fully wrapped&amp;quot; state.&lt;br /&gt;
&lt;br /&gt;
=== 11. Token Metadata ===&lt;br /&gt;
If you are deploying your own contract (which is likely the case when [[#6.13._Auto-minting|auto-mint]] is enabled), it is a good idea to allow clients to get metadata about the wrapping tokens on Ethereum side. This must be done according to the [https://eips.ethereum.org/EIPS/eip-1155#metadata &amp;#039;&amp;#039;ERC-1155&amp;#039;&amp;#039; metadata] specification.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===== URI tutorial =====&lt;br /&gt;
The &amp;#039;&amp;#039;&amp;#039;uri&amp;#039;&amp;#039;&amp;#039; is specified when executing [[#deployEthContract|&amp;#039;&amp;#039;deployEthContract&amp;#039;&amp;#039;]].&lt;br /&gt;
&lt;br /&gt;
For the purposes of the current document, IPFS will be used to host the metadata. Our goal is to be able to dynamically add new assets, without re-deploying the Ethereum contract. Therefore &amp;#039;&amp;#039;&amp;quot;ipfs://&amp;lt;CID&amp;gt;/&amp;quot;&amp;#039;&amp;#039; url scheme cannot be used here, since the CID of the folder/file changes with each edit. We need to use [https://docs.ipfs.io/concepts/ipns/ IPNS]. Unfortunately, by experimenting, we discovered that currently URLs with &amp;#039;&amp;#039;&amp;quot;ipns://&amp;quot;&amp;#039;&amp;#039; schemes are not supported by OpenSea, so our final solution is to use an IPFS gateway and set an URL with &amp;quot;https&amp;quot; schema as contract URI.&lt;br /&gt;
&lt;br /&gt;
We aim that our URI looks like this (we&amp;#039;ll use the ipfs.io gateway, this could be changed with other gateways):&lt;br /&gt;
&lt;br /&gt;
 https://ipfs.io/ipns/&amp;lt;ipfs_public_key&amp;gt;/{id}/metadata.json&lt;br /&gt;
&lt;br /&gt;
To obtain the &amp;#039;&amp;#039;ipfs_public_key&amp;#039;&amp;#039;, execute &amp;#039;&amp;#039;&amp;#039;ipfs name publish &amp;lt;CID_of_the_root_directory&amp;gt;&amp;#039;&amp;#039;&amp;#039; (nft folder in this example). Do this every time a change has happened in that directory, so the data can be published.&lt;br /&gt;
&lt;br /&gt;
 ipfs name publish QmabN9zQoLtYWCUMuGpJ9qUTc4yCSu1RmsxgqvLqDH44Xc&lt;br /&gt;
&lt;br /&gt;
[[File:Uri tutorial1.jpg|class=img-responsive]]&lt;br /&gt;
&lt;br /&gt;
[[File:Uri tutorial2.jpg|class=img-responsive]]&lt;br /&gt;
&lt;br /&gt;
You will get a response: &lt;br /&gt;
&lt;br /&gt;
 Published to k51qzi5uqu5dgjvdga00na9szdfos2asdqzm0uz2452rq1l4462fkz8t5um3rz: /ipfs/QmabN9zQoLtYWCUMuGpJ9qUTc4yCSu1RmsxgqvLqDH44Xc&lt;br /&gt;
&lt;br /&gt;
This is the public key - &amp;#039;&amp;#039;&amp;#039;k51qzi5uqu5dgjvdga00na9szdfos2asdqzm0uz2452rq1l4462fkz8t5um3rz&amp;#039;&amp;#039;&amp;#039;. So the final uri should look like this:&lt;br /&gt;
&lt;br /&gt;
 https://ipfs.io/ipns/k51qzi5uqu5dgjvdga00na9szdfos2asdqzm0uz2452rq1l4462fkz8t5um3rz/{id}/metadata.json&lt;br /&gt;
&lt;br /&gt;
==== Metadata configuration example, when auto-mint is enabled ====&lt;br /&gt;
&lt;br /&gt;
IPFS will be used to store the metadata.&lt;br /&gt;
&lt;br /&gt;
Create a json file (&amp;#039;&amp;#039;metadata.json&amp;#039;&amp;#039; for example) and populate it according to the [https://eips.ethereum.org/EIPS/eip-1155#metadata &amp;#039;&amp;#039;ERC-1155&amp;#039;&amp;#039;] specification.&lt;br /&gt;
&lt;br /&gt;
 {&lt;br /&gt;
   &amp;quot;name&amp;quot;: &amp;quot;test mint&amp;quot;,&lt;br /&gt;
   &amp;quot;description&amp;quot;: &amp;quot;test text test text test text&amp;quot;,&lt;br /&gt;
   &amp;quot;image&amp;quot;: &amp;quot;ipfs://QmXRxXD3FUeXfd24x4LUZXjZ9rEdLSg2UCa2KHYoMdg4rp/mint.jpg&amp;quot;,&lt;br /&gt;
   &amp;quot;properties&amp;quot;: {&lt;br /&gt;
     &amp;quot;simple_property&amp;quot;: &amp;quot;test value&amp;quot;,&lt;br /&gt;
     &amp;quot;rich_property&amp;quot;: {&lt;br /&gt;
       &amp;quot;name&amp;quot;: &amp;quot;test-mint&amp;quot;,&lt;br /&gt;
       &amp;quot;value&amp;quot;: &amp;quot;100&amp;quot;,&lt;br /&gt;
       &amp;quot;display_value&amp;quot;: &amp;quot;100&amp;quot;,&lt;br /&gt;
       &amp;quot;class&amp;quot;: &amp;quot;emphasis&amp;quot;,&lt;br /&gt;
       &amp;quot;css&amp;quot;: {&lt;br /&gt;
         &amp;quot;color&amp;quot;: &amp;quot;#ffffff&amp;quot;,&lt;br /&gt;
         &amp;quot;font-weight&amp;quot;: &amp;quot;bold&amp;quot;,&lt;br /&gt;
         &amp;quot;text-decoration&amp;quot;: &amp;quot;underline&amp;quot;&lt;br /&gt;
       }&lt;br /&gt;
     },&lt;br /&gt;
     &amp;quot;array_property&amp;quot;: {&lt;br /&gt;
       &amp;quot;name&amp;quot;: &amp;quot;Name&amp;quot;,&lt;br /&gt;
       &amp;quot;value&amp;quot;: [1,2,3,4],&lt;br /&gt;
       &amp;quot;class&amp;quot;: &amp;quot;emphasis&amp;quot;&lt;br /&gt;
     }&lt;br /&gt;
   }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
Deploy [https://ardordocs.jelurida.com/How_to_deploy_IPFS_node IPFS node] and create a folder - &amp;#039;&amp;#039;nft&amp;#039;&amp;#039; for example. Create another folder inside and name it to the ID of the Ardor Asset in hexadecimal format - use [[#autoMintIdConvert|&amp;#039;&amp;#039;autoMintIdConvert&amp;#039;&amp;#039;]] command to convert the decimal asset id to hex. Put the &amp;#039;&amp;#039;metadata.json&amp;#039;&amp;#039; file in the hex-named directory.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Metadata-tutorial-new.jpg|class=img-responsive]]&lt;br /&gt;
&lt;br /&gt;
Remove the [[#6.12._contractAddress|&amp;#039;&amp;#039;&amp;#039;contractAddress&amp;#039;&amp;#039;&amp;#039;]] and enable the [[#6.13._Auto-minting|&amp;#039;&amp;#039;&amp;#039;auto-minting&amp;#039;&amp;#039;&amp;#039;]] feature.&lt;br /&gt;
&lt;br /&gt;
[[File:Auto-mint-tutorial1.jpg|class=img-responsive]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Upload the contract in Ardor and execute the [[#deployEthContract|&amp;#039;&amp;#039;deployEthContract&amp;#039;&amp;#039;]] command. &lt;br /&gt;
&lt;br /&gt;
[[File:DeployEthContract example.jpg|class=img-responsive]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The uri from the [[#URI_tutorial|URI tutorial]] will be used in this example:&lt;br /&gt;
 {&amp;quot;command&amp;quot;:&amp;quot;deployEthContract&amp;quot;,&amp;quot;uri&amp;quot;:&amp;quot;https://ipfs.io/ipns/k51qzi5uqu5dgjvdga00na9szdfos2asdqzm0uz2452rq1l4462fkz8t5um3rz/{id}/metadata.json&amp;quot;}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You will get &amp;#039;&amp;#039;ethContractAddress&amp;#039;&amp;#039;:&lt;br /&gt;
&lt;br /&gt;
 {&lt;br /&gt;
    &amp;quot;requestProcessingTime&amp;quot;: 18846,&lt;br /&gt;
    &amp;quot;ethContractAddress&amp;quot;: &amp;quot;0xf32f1b4bf84dfa4a1d17722c7b502353bbc14eab&amp;quot;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Use it in the  [[#6.12._contractAddress|contractAddress]] and don&amp;#039;t forget to add [[#6.13.1_autoMintWhitelistedIssuers|autoMintWhitelistedIssuers]] Ardor accounts:&lt;br /&gt;
&lt;br /&gt;
[[File:Auto-mint-tutorial2.jpg|class=img-responsive]]&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
Re-upload the contract to Ardor again and deploy it by executing:&lt;br /&gt;
&lt;br /&gt;
 ./gradlew deployContract&lt;br /&gt;
&lt;br /&gt;
Finally, transfer some Ardor assets to the [#6.2._accountRS|Ardor Blocked Account] and add the Ethereum address as message, where to receive the freshly minted tokens.&lt;br /&gt;
&lt;br /&gt;
=== 12. Wrapping test ===&lt;br /&gt;
If [[#6.13._Auto-minting|auto-minting]] is &amp;#039;&amp;#039;&amp;#039;enabled&amp;#039;&amp;#039;&amp;#039;, wrapping happens when any asset, issued by some of the accounts in the [[#6.13.1_autoMintWhitelistedIssuers|autoMintWhitelistedIssuers]] list is transferred to the [[#6.2._accountRS|Ardor Blocked Account]]. The result is a freshly minted &amp;#039;&amp;#039;ERC-1155&amp;#039;&amp;#039; token on Ethereum side with ID equal to the asset ID.&lt;br /&gt;
&lt;br /&gt;
If [[#6.13._Auto-minting|auto-minting]] is &amp;#039;&amp;#039;&amp;#039;disabled&amp;#039;&amp;#039;&amp;#039;, wrapping happens when an asset, which is supported according to the [[#6.14._assetIdToErc1155IdMap|&amp;#039;&amp;#039;&amp;#039;assetIdToErc1155IdMap&amp;#039;&amp;#039;&amp;#039;]] configuration, is transferred to the [[#6.2._accountRS|Ardor Blocked Account].&lt;br /&gt;
&lt;br /&gt;
The transaction must contain in its message the [https://en.wikipedia.org/wiki/Ethereum#Addresses Ethereum address] which to receive the wrapped tokens. It is recommended to use the [https://ardordocs.jelurida.com/Arbitrary_messages/en#Sending_an_encrypted_message Encrypted Message] functionality in Ardor in order to preserve privacy.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Test Example:&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Note: if [[#6.13._Auto-minting|auto-mint]] is &amp;#039;&amp;#039;&amp;#039;disabled&amp;#039;&amp;#039;&amp;#039;, make sure that all minted &amp;#039;&amp;#039;ERC-1155&amp;#039;&amp;#039; tokens are transferred to the Ethereum Blocked Account.&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Issue an asset with some account. The asset must be with 0 decimals. Depending on whether auto-minting is enabled or not, add the issuer account to &amp;#039;&amp;#039;&amp;#039;autoMintWhitelistedIssuers&amp;#039;&amp;#039;&amp;#039; or map the asset id to an ERC-1155 token id in &amp;#039;&amp;#039;&amp;#039;assetIdToErc1155IdMap&amp;#039;&amp;#039;&amp;#039;. Then transfer some (or all) of the asset quantity to the [[#6.2._accountRS|Ardor Blocked Account]], adding a Message (encrypted is advised for privacy), containing the Ethereum account address, which to receive the wrapped tokens.&lt;br /&gt;
&lt;br /&gt;
[[File:TransferAssetToABA.jpg|class=img-responsive]]&lt;br /&gt;
&lt;br /&gt;
After the configured [[#6.7._Confirmations|&amp;#039;&amp;#039;&amp;#039;ardorConfirmations&amp;#039;&amp;#039;&amp;#039;]] and [[#6.7._Confirmations|&amp;#039;&amp;#039;&amp;#039;ethereumConfirmations&amp;#039;&amp;#039;&amp;#039;]] had passed, the Ethereum tokens should be transferred to the recipient Ethereum account. &lt;br /&gt;
&lt;br /&gt;
==== Fast Wrapping ====&lt;br /&gt;
A [[#6.8._Fast_Wrapping|fast wrapping]] option is available in case the pegged tokens don&amp;#039;t have significant economic value. If enabled, the wrapping transactions are confirmed after fewer blocks (configurable via [[#6.8._Fast_Wrapping|&amp;#039;&amp;#039;&amp;#039;fastWrappingConfirmations&amp;#039;&amp;#039;&amp;#039;]]) if the following conditions are met:&lt;br /&gt;
&lt;br /&gt;
* The transaction deadline is greater than [[#6.8.1._fastWrappingMinDeadline|&amp;#039;&amp;#039;&amp;#039;fastWrappingMinDeadline&amp;#039;&amp;#039;&amp;#039;]]&lt;br /&gt;
* The transaction Economic Clustering (EC) block is more than [[#6.7._Confirmations|&amp;#039;&amp;#039;&amp;#039;ardorConfirmations&amp;#039;&amp;#039;&amp;#039;]] blocks before the transaction height&lt;br /&gt;
* The transaction is not [https://ardordocs.jelurida.com/Phasing phased]&lt;br /&gt;
* The transaction is not referencing other transaction&lt;br /&gt;
&lt;br /&gt;
These restrictions are meant to reduce the chances for a transaction to become invalid in case of spontaneous blockchain reorganization. An attacker with enough forging power can still invalidate such transaction and do a double spend. So the fast confirmation mode must be used only for low-value assets.&lt;br /&gt;
&lt;br /&gt;
=== 13. Unwrapping test ===&lt;br /&gt;
Unwrapping is triggered by a call to [[#processUnwrapsForAccount|&amp;#039;&amp;#039;processUnwrapsForAccount&amp;#039;&amp;#039;]], but before this call the tokens to unwrap must be transferred to an UnwrapDepositAccount - an Ethereum account dedicated to and generated for the Ardor account which will receive the unwrapped assets.&lt;br /&gt;
&lt;br /&gt;
To get the UnwrapDepositAccount address use the [[#getUnwrapDepositAddress|&amp;#039;&amp;#039;getUnwrapDepositAddress&amp;#039;&amp;#039;]] command.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Example:&amp;#039;&amp;#039;&lt;br /&gt;
Use [[#getUnwrapDepositAddress|&amp;#039;&amp;#039;getUnwrapDepositAddress&amp;#039;&amp;#039;]] command to get the &amp;#039;&amp;#039;&amp;#039;depositAccount&amp;#039;&amp;#039;&amp;#039; address of the account, where the wrapped &amp;#039;&amp;#039;ERC-1155&amp;#039;&amp;#039; tokens to be received.&lt;br /&gt;
&lt;br /&gt;
 {&amp;quot;command&amp;quot;:&amp;quot;getUnwrapDepositAddress&amp;quot;,&amp;quot;ardorRecipientPublicKey&amp;quot;:&amp;quot;85e2097c2365d5a33a872d465dfc8425dcc394147ab69988fb937be668266f59&amp;quot;}&lt;br /&gt;
&lt;br /&gt;
 {&lt;br /&gt;
    &amp;quot;depositAddress&amp;quot;: &amp;quot;0x13ebd674b0001dd8f6cfeaba94131034524fd03f&amp;quot;,&lt;br /&gt;
    &amp;quot;requestProcessingTime&amp;quot;: 1&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Transfer the wrapped &amp;#039;&amp;#039;ERC-1155&amp;#039;&amp;#039; tokens to the &amp;#039;&amp;#039;&amp;#039;depositAccount&amp;#039;&amp;#039;&amp;#039; address and make sure they are received.&lt;br /&gt;
&lt;br /&gt;
Call [[#processUnwrapsForAccount|&amp;#039;&amp;#039;processUnwrapsForAccount&amp;#039;&amp;#039;]] for the Ardor account, where the wrapped tokens are transferred.&lt;br /&gt;
&lt;br /&gt;
 {&amp;quot;command&amp;quot;:&amp;quot;processUnwrapsForAccount&amp;quot;,&amp;quot;ardorRecipientPublicKey&amp;quot;:&amp;quot;85e2097c2365d5a33a872d465dfc8425dcc394147ab69988fb937be668266f59&amp;quot;}&lt;br /&gt;
&lt;br /&gt;
 {&lt;br /&gt;
    &amp;quot;requestProcessingTime&amp;quot;: 1397&lt;br /&gt;
    &amp;quot;starts&amp;quot;: 1&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
If started successfully, you will observe &amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;quot;starts&amp;quot;: 1&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; in the Response.&lt;br /&gt;
&lt;br /&gt;
Navigate to Ardor Dashboard where you should see an ongoing Asset transfer transaction. Then open the Ethereum Blocked Account, where the unwrapped ERC-1155 tokens are received. &lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;ERC-1155&amp;#039;&amp;#039; tokens will be burned, if [[#6.13._Auto-minting|auto-mint]] is enabled.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Commands reference ==&lt;br /&gt;
The &amp;#039;&amp;#039;&amp;#039;AssetsErc1155Peg&amp;#039;&amp;#039;&amp;#039; supports several commands through the &amp;#039;&amp;#039;&amp;#039;triggerContractByRequest&amp;#039;&amp;#039;&amp;#039; Ardor API.&lt;br /&gt;
&lt;br /&gt;
In all cases the &amp;#039;&amp;#039;&amp;#039;contractName&amp;#039;&amp;#039;&amp;#039; parameter of that API must be set to &amp;#039;&amp;#039;&amp;#039;AssetsErc1155Peg&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
The rest of the parameters can be provided either as JSON object in the &amp;#039;&amp;#039;&amp;#039;setupParams&amp;#039;&amp;#039;&amp;#039; parameter, or as separate parameters.&lt;br /&gt;
&lt;br /&gt;
A mandatory &amp;#039;&amp;#039;&amp;#039;command&amp;#039;&amp;#039;&amp;#039; parameter is used to distinguish the different operations supported by &amp;#039;&amp;#039;&amp;#039;AssetsErc1155Peg&amp;#039;&amp;#039;&amp;#039;. Each command has its own set of additional parameters. &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Example&amp;#039;&amp;#039;:&lt;br /&gt;
&lt;br /&gt;
[[File:ArdorAPI.jpg|class=img-responsive]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== The following sub-sections contain a reference of the supported commands: ====&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
==== &amp;#039;&amp;#039;getPegAddresses&amp;#039;&amp;#039; ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Returns the addresses of Ardor Blocked Account and Ethereum Blocked Account.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===== No parameters required =====&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== Response =====&lt;br /&gt;
 {&lt;br /&gt;
   &amp;quot;ardorBlockedAccount&amp;quot;: &amp;quot;ARDOR-...&amp;quot;, // The address of the Ardor Blocked Account&lt;br /&gt;
   &amp;quot;ethereumBlockedAccount&amp;quot;: &amp;quot;0x...&amp;quot;// The address of the Ethereum Blocked Account&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== &amp;#039;&amp;#039;getUnwrapDepositAddress&amp;#039;&amp;#039; ====&lt;br /&gt;
&lt;br /&gt;
Returns the address for depositing &amp;#039;&amp;#039;ERC-1155&amp;#039;&amp;#039; tokens in order to unwrap them back to Ardor. This address is specific for&lt;br /&gt;
each Ardor account.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===== Parameters =====&lt;br /&gt;
&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;ardorRecipientPublicKey&amp;#039;&amp;#039;&amp;#039; The public key of the Ardor account for which an address for unwrapping is generated&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===== Response =====&lt;br /&gt;
 {&lt;br /&gt;
  &amp;quot;depositAddress&amp;quot;: &amp;quot;0x...&amp;quot; //An Ethereum address&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== &amp;#039;&amp;#039;processUnwrapsForAccount&amp;#039;&amp;#039; ====&lt;br /&gt;
&lt;br /&gt;
# Calculate the UnwrapDepositAccount similarly to getUnwrapDepositAddress&lt;br /&gt;
# Gets all transfers to the UnwrapDepositAccount in the last 100000 blocks&lt;br /&gt;
# Filter out any transfers for which the unwrapping is currently being processed or is completed&lt;br /&gt;
# Start a background unwrap task for any transfers left&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===== Parameters =====&lt;br /&gt;
&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;ardorRecipientPublicKey&amp;#039;&amp;#039;&amp;#039; The public key of the Ardor account to which to send the unwrapped tokens&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===== Response =====&lt;br /&gt;
A JSON object with the number of tasks started or filtered out transfers by filter category. Fields with value 0 are&lt;br /&gt;
not returned&lt;br /&gt;
 {&lt;br /&gt;
   &amp;quot;starts&amp;quot;: 0123456789, //Number of tasks started by the current request&lt;br /&gt;
   &amp;quot;skippedAlreadyPending&amp;quot;: 0123456789, //Transfers skipped during the request because there is already a background task processing them&lt;br /&gt;
   &amp;quot;skippedCompleted&amp;quot;: 0123456789, //Transfers which were already completed and there is an outgoing Ardor transaction for them&lt;br /&gt;
   &amp;quot;unknownTokens&amp;quot;: 0123456789 // Transfers of tokens not in the assetIdToErc1155IdMap configuration&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==== &amp;#039;&amp;#039;processWrapsAtHeight&amp;#039;&amp;#039; ====&lt;br /&gt;
&lt;br /&gt;
Utility command to manually process the wrapping at some height. There is no check about whether the transactions at this height were already processed, so special care must be taken to not process same asset transfers twice.&lt;br /&gt;
&lt;br /&gt;
This command returns before the transaction was confirmed on Ethereum side. Use the getWrappingLog command to poll the final result of the wrapping.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===== Parameters =====&lt;br /&gt;
&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;height&amp;#039;&amp;#039;&amp;#039; Height of the ardor blockchain for which to process the wrappings&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===== Response =====&lt;br /&gt;
 {&lt;br /&gt;
    &amp;quot;transactionsLog&amp;quot;: [ //An array of objects&lt;br /&gt;
        {&lt;br /&gt;
            &amp;quot;fullHash&amp;quot;: &amp;quot;...&amp;quot;, //fullHash of the Ardor transaction which transfers assets to the Ardor Blocked Account and triggered the wrapping&lt;br /&gt;
            &amp;quot;error&amp;quot;: &amp;quot;...&amp;quot;, //Error message in case of error before the transfer was initiated on Ethereum side&lt;br /&gt;
        }&lt;br /&gt;
    ],&lt;br /&gt;
    &amp;quot;requestProcessingTime&amp;quot;: 4&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== &amp;#039;&amp;#039;getWrappingLog&amp;#039;&amp;#039; ====&lt;br /&gt;
&lt;br /&gt;
Returns a log of all wrappings processed during the current execution of the contract.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===== No parameters required =====&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== Response =====&lt;br /&gt;
 {&lt;br /&gt;
    &amp;quot;log&amp;quot;: [&lt;br /&gt;
        {&lt;br /&gt;
            &amp;quot;fullHash&amp;quot;: &amp;quot;...&amp;quot;, //fullHash of the Ardor transaction which transfers assets to the Ardor Blocked Account and triggered the wrapping&lt;br /&gt;
            &amp;quot;error&amp;quot;: &amp;quot;...&amp;quot;, //In case the wrap failed&lt;br /&gt;
            &amp;quot;success&amp;quot;: &amp;quot;0x...&amp;quot; //Transaction ID on Ethereum side&lt;br /&gt;
        }&lt;br /&gt;
    ],&lt;br /&gt;
    &amp;quot;requestProcessingTime&amp;quot;: 2&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== &amp;#039;&amp;#039;secretToEthPrivateKey&amp;#039;&amp;#039; ====&lt;br /&gt;
&lt;br /&gt;
Utility for computing the ethereum private key from secret string. The private key can then be imported in e.g. Metamask.&lt;br /&gt;
&lt;br /&gt;
To get the private key of an unwrapping deposit account, concatenate &amp;#039;&amp;#039;&amp;#039;ethereumDepositAccountsSecret&amp;#039;&amp;#039;&amp;#039; from the peg configuration and the ardor public key of the account.&lt;br /&gt;
&lt;br /&gt;
For example if &amp;#039;&amp;#039;&amp;#039;ethereumDepositAccountsSecret&amp;#039;&amp;#039;&amp;#039; is&lt;br /&gt;
&lt;br /&gt;
 harmony repeat ourselves woman empty outside liquid truth journey shiver mention curl&lt;br /&gt;
&lt;br /&gt;
and the public key of the account is&lt;br /&gt;
&lt;br /&gt;
 0507916d19b81d9f714c4f9eaf7ad4742b013c106c34cb9d2fb663d5e101df75&lt;br /&gt;
&lt;br /&gt;
Then the &amp;#039;&amp;#039;&amp;#039;secret&amp;#039;&amp;#039;&amp;#039; parameter should be&lt;br /&gt;
&lt;br /&gt;
 harmony repeat ourselves woman empty outside liquid truth journey shiver mention curl0507916d19b81d9f714c4f9eaf7ad4742b013c106c34cb9d2fb663d5e101df75&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===== Parameters =====&lt;br /&gt;
&lt;br /&gt;
* secret A string&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===== Response =====&lt;br /&gt;
 {&lt;br /&gt;
   &amp;quot;privateKeyHex&amp;quot;: &amp;quot;0x...&amp;quot;, //Private key in hex format. This can be used with Metamask&lt;br /&gt;
   &amp;quot;privateKeyNumeric&amp;quot;: &amp;quot;...&amp;quot; //Same private key as decimal string &lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== &amp;#039;&amp;#039;autoMintIdConvert&amp;#039;&amp;#039; ====&lt;br /&gt;
Utility for converting between the decimal asset IDs used in Ardor to hexadecimal format, primarily used in Ethereum. Even though the IDs of the [[#6._Create_Contract_Runner_configuration|auto-minted]] Ethereum tokens which wrap the Ardor assets are equal to the Ardor asset ID, in some cases, for example when [https://eips.ethereum.org/EIPS/eip-1155#metadata &amp;#039;&amp;#039;ERC-1155&amp;#039;&amp;#039; metadata] is handled, the ID is needed in hexadecimal format. This command simply converts from decimal to hexadecimal or vice versa.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===== Parameters =====&lt;br /&gt;
&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;assetId&amp;#039;&amp;#039;&amp;#039; ID in decimal format as used in Ardor&lt;br /&gt;
OR&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;tokenId&amp;#039;&amp;#039;&amp;#039; ID in hexadecimal format as appearing in Ethereum. The &amp;quot;0x&amp;quot; prefix is optional&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===== Response =====&lt;br /&gt;
If &amp;#039;&amp;#039;&amp;#039;assetId&amp;#039;&amp;#039;&amp;#039; is provided:&lt;br /&gt;
&lt;br /&gt;
 {&lt;br /&gt;
  &lt;br /&gt;
  &amp;quot;tokenIdHex&amp;quot;: &amp;quot;0x...&amp;quot;, //hex string&lt;br /&gt;
  &amp;quot;erc1155MetadataId&amp;quot;: &amp;quot;0000000000000000000000000000000000000000000000000123456789abcdef...&amp;quot;, //0-padded hex string as expected by the &lt;br /&gt;
   metadata specification&lt;br /&gt;
  &amp;quot;requestProcessingTime&amp;quot;: 1&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
Or if &amp;#039;&amp;#039;&amp;#039;tokenId&amp;#039;&amp;#039;&amp;#039; is provided:&lt;br /&gt;
&lt;br /&gt;
 {&lt;br /&gt;
  &amp;quot;assetId&amp;quot;: &amp;quot;...&amp;quot;, //Ardor asset ID as unsigned decimal string&lt;br /&gt;
  &amp;quot;requestProcessingTime&amp;quot;: 1&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== &amp;#039;&amp;#039;deployEthContract&amp;#039;&amp;#039; ====&lt;br /&gt;
Deploys a contract specifically developed to support auto-minting of &amp;#039;&amp;#039;ERC-1155&amp;#039;&amp;#039; tokens for wrapping Ardor assets.&lt;br /&gt;
&lt;br /&gt;
To prevent abuse or errors, this API is available only if the [[#6._Create_Contract_Runner_configuration|contractAddress]] is empty.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===== Parameters =====&lt;br /&gt;
&lt;br /&gt;
*&amp;#039;&amp;#039;&amp;#039;uri&amp;#039;&amp;#039;&amp;#039; The URI which will be returned by the contract to clients for getting tokens metadata. See the [https://eips.ethereum.org/EIPS/eip-1155#metadata &amp;#039;&amp;#039;ERC-1155&amp;#039;&amp;#039; metadata] specification.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Note that the parameter is &amp;#039;&amp;#039;&amp;#039;uri&amp;#039;&amp;#039;&amp;#039;, not &amp;#039;&amp;#039;&amp;#039;url&amp;#039;&amp;#039;&amp;#039;, please make sure it is typed correctly.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===== Response =====&lt;br /&gt;
&lt;br /&gt;
 {&lt;br /&gt;
  &amp;quot;ethContractAddress&amp;quot;:&amp;quot;0x54c8d419a5b9d2d6ff68ff826258456ee37e214b&amp;quot;,&lt;br /&gt;
  &amp;quot;requestProcessingTime&amp;quot;:16743&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/translate&amp;gt;&lt;/div&gt;</summary>
		<author><name>Stefan</name></author>
	</entry>
</feed>