{"id":20812684,"url":"https://github.com/coti-io/coti-sdk-python-examples","last_synced_at":"2025-09-28T13:30:51.957Z","repository":{"id":240570223,"uuid":"802970587","full_name":"coti-io/coti-sdk-python-examples","owner":"coti-io","description":null,"archived":false,"fork":false,"pushed_at":"2024-10-31T09:40:57.000Z","size":67,"stargazers_count":5,"open_issues_count":2,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-11-17T20:56:41.456Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/coti-io.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-05-19T18:43:56.000Z","updated_at":"2024-10-07T19:58:12.000Z","dependencies_parsed_at":null,"dependency_job_id":"e82f1cda-da9c-4fe7-a9ac-ec608b947c6f","html_url":"https://github.com/coti-io/coti-sdk-python-examples","commit_stats":null,"previous_names":["coti-io/coti-sdk-python-examples"],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coti-io%2Fcoti-sdk-python-examples","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coti-io%2Fcoti-sdk-python-examples/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coti-io%2Fcoti-sdk-python-examples/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coti-io%2Fcoti-sdk-python-examples/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/coti-io","download_url":"https://codeload.github.com/coti-io/coti-sdk-python-examples/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":234520631,"owners_count":18846097,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-17T20:56:55.067Z","updated_at":"2025-09-28T13:30:46.687Z","avatar_url":"https://github.com/coti-io.png","language":null,"readme":"\u003e [!WARNING]\n\u003e This repository has been deprecated and moved to [coti-python-examples](https://github.com/coti-io/coti-python-examples)\n\n# COTI V2 Confidentiality Preserving L2 | SDKs and Examples\n\n\u003e [!NOTE]\n\u003e Please refer to the latest [tags](https://github.com/coti-io/coti-sdk-python-examples/tags) to find the most stable\nversion to use.\n\nAll repositories specified below contain smart contracts that implement confidentiality features using the COTI V2 protocol.\nThe contracts provide examples for various use cases, such as Non-Fungible Tokens (NFTs), ERC20 tokens, Auction, and Identity management.\n\nThese contracts demonstrate how to leverage the confidentiality features of the COTI V2 protocol to enhance privacy and security in decentralized applications.\nThe contracts are of Solidity and can be compiled and deployed using popular development tools like Hardhat and Foundry (Work in progress).\n\n#### Important Links:\n\n[Docs](https://docs.coti.io) | [Testnet Explorer](https://testnet.cotiscan.io) | [Discord](https://discord.gg/cuCykh8P4m) | [Faucet](https://faucet.coti.io)\n\nInteract with the network using any of the following:\n\n1. [Python SDK](https://github.com/coti-io/coti-sdk-python) | [Python SDK Examples](https://github.com/coti-io/coti-sdk-python-examples)\n2. [Typescript SDK](https://github.com/coti-io/coti-sdk-typescript) | [Typescript Examples](https://github.com/coti-io/coti-typescript-examples)\n3. [COTI Contracts](https://github.com/coti-io/coti-contracts) | [COTI Contracts Examples](https://github.com/coti-io/coti-contracts-examples)\n\nThe following contracts are available in each of the packages:\n\n| Contract                       |            | python sdk | hardhat sdk | typescript sdk | Contract Description                                                                                                                          |\n|--------------------------------|------------|------------|-------------|----------------|-----------------------------------------------------------------------------------------------------------------------------------------------|\n| `AccountOnboard`               | deployment | ✅ *        | ✅           | ❌              | Onboard a EOA account - During onboard network creates AES unique for that EOA which is used for decrypting values sent back from the network |\n| `AccountOnboard`               | execution  | ✅          | ✅           | ✅              | \"                                                                                                                                             |\n| `ERC20Example`                 | deployment | ✅          | ✅           | ❌              | Confidential ERC20 - deploy and transfer encrypted amount of funds                                                                            |\n| `ERC20Example`                 | execution  | ✅          | ✅           | ✅              | \"                                                                                                                                             |\n| `NFTExample`                   | deployment | ❌          | ✅           | ❌              | Confidential NFT example - saving encrypted data                                                                                              |\n| `NFTExample`                   | execution  | ❌          | ✅           | ❌              | \"                                                                                                                                             |\n| `ConfidentialAuction`          | deployment | ❌          | ✅           | ❌              | Confidential auction - encrypted bid amount                                                                                                   |\n| `ConfidentialAuction`          | execution  | ❌          | ✅           | ❌              | \"                                                                                                                                             |\n| `ConfidentialIdentityRegistry` | deployment | ❌          | ✅           | ❌              | Confidential Identity Registry - Encrypted identity data                                                                                      |\n| `ConfidentialIdentityRegistry` | execution  | ❌          | ✅           | ❌              | \"                                                                                                                                             |\n| `DataOnChain`                  | deployment | ✅          | ❌           | ❌              | Basic encryption and decryption - Good place to start explorining network capabilties                                                         |\n| `DataOnChain`                  | execution  | ✅          | ❌           | ✅              | \"                                                                                                                                             |\n| `Precompile`                   | deployment | ✅          | ✅           | ❌              | Thorough examples of the precompile functionality                                                                                             |\n| `Precompile`                   | execution  | ✅          | ✅           | ❌              | \"                                                                                                                                             |-              |              \n\n(*) no deployment needed (system contract)\n\n\u003e [!NOTE]  \n\u003e Due to the nature of ongoing development, future version might break existing functionality\n\n### Faucet\n\n🤖 To request devnet/testnet funds use our [faucet](https://faucet.coti.io)\n\n# COTI v2 Python SDK Examples\n\n\u003e [!NOTE]\n\u003e Please refer to the latest [tags](https://github.com/coti-io/coti-sdk-python-examples/tags) to find the most stable version to use. \n\nThe examples project contains scripts covering various use cases, such as Non-Fungible Tokens (NFTs), ERC20 tokens, Auction, and Identity management. It contains smart contracts that implement confidentiality features using the COTI V2 protocol. These contracts demonstrate how to leverage the confidentiality features of the COTI V2 protocol to implement privacy and enhance security in decentralized applications.\n\nThe contracts are written in Solidity and can be compiled and deployed using popular development frameworks such as\nHardhat and Foundry.\n\nThe following example contracts are available in the Python SDK for deployment and execution:\n\n| Contract       | Contract Description                                                                                                                          |\n|----------------|-----------------------------------------------------------------------------------------------------------------------------------------------|\n| AccountOnboard | Onboard a EOA account - During onboard network creates AES unique for that EOA which is used for decrypting values sent back from the network |\n| ERC20Example   | Confidential ERC20 - deploy and transfer encrypted amount of funds                                                                            |\n| DataOnChain    | Basic encryption and decryption - Good place to start exploring network capabilities                                                          |\n\n\u003e [!NOTE]  \n\u003e Due to the nature of ongoing development, future versions might break existing functionality\n\n## Getting initial funds from the COTI Faucet\n\nThe COTI faucet provides devnet/testnet funds for developers. To request devnet/testnet tokens:\n\n1. Head to https://faucet.coti.io/\n2. Send a message to the bot in the following format:\n\n```\ntestnet \u003cyour_eoa_address\u003e \n```\n\nFor Example:\n\n```\ntestnet 0x71C7656EC7ab88b098defB751B7401B5f6d8976F\n```\n\n## Python SDK Usage\n\nThe sample scripts described above reside in the [coti-sdk-python-examples/examples](/examples/) directory, while the solidity contracts are in the [coti-contracts-examples](https://github.com/coti-io/coti-contracts-examples) repository.\n\nWhen a script executed (for example `data_on_chain.py`) it will deploy the contract.\n\nInspect the `.env` file for more details.\n\n## Pre-requisites\n\n1. [Git](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git)\n2. [Python \u003e= 3.9, \u003c= 3.10](https://www.python.org/downloads/)\n3. [pip](https://pip.pypa.io/en/stable/installation/)\n\n## Getting Started\n\n### Native Transfer\n\nThe following process will help you deploy the [**`native_transfer.py`**](https://github.com/coti-io/coti-sdk-python-examples/blob/master/examples/basics/native\\_transfer.py) example from the [**COTI Python SDK Examples**](https://github.com/coti-io/coti-sdk-python-examples) project. This script will transfer native funds from your wallet account to a random wallet. It will also:\n\n* Create a EOA (Externally Owned Account)\n* Validate minimum balance\n\n\u003e [!TIP]\n\u003e Ensure your environment meets all the pre-requisites. Visit the [pre-requisites section of the readme](https://github.com/coti-io/coti-sdk-python/tree/main?tab=readme-ov-file#python-sdk-coti-sdk-python---usage). Alternatively, use an editor like [PyCharm](https://www.jetbrains.com/pycharm/download/) to take care of the pre-requisites for you.\n\n1.  Clone the Python examples repo along with its submodules into your desired location\n\n    ```bash\n    git clone --recurse-submodules https://github.com/coti-io/coti-sdk-python-examples.git\n    ```\n\n\n2.  Change directory to the newly create one\n\n    ```bash\n    cd coti-sdk-python-examples\n    ```\n\n\n3.  Install the project's requirements\n\n    ```bash\n    python3 -m pip install -r requirements.txt\n    ```\n\n\n4.  Set the python path as following\n\n    ```bash\n    export PYTHONPATH=$PWD\n    ```\n\n\n5.  Run the `native_transfer.py` script\n\n    ```bash\n    python3 examples/basics/native_transfer.py\n    ```\n\n    Running the script will automatically create an account and a key/value pair with name: `ACCOUNT_PRIVATE_KEY` (visible in the `.env` file). The script will output something like this:\n\n\n\n    ```bash\n    So you dont have an account yet, dont worry... lets create one right now!\n    Creation done!\n    provider:  https://testnet.coti.io\n    chain-id:  13068200\n    latest block:  0xc9ec7259bad015c46a0bef9b0988cac70a62e2abaed7459b5265e425bc5cecb8\n    account address: 0x0287a7A5bD5f4802D4A6048730a11B2713A16bd4\n    account balance:  0 wei ( 0  ether)\n    account nonce:  0\n    Traceback (most recent call last):\n      File \"/Users/user/projects/coti-sdk-python/examples/basics/native_transfer.py\", line 24, in \u003cmodule\u003e\n        main()\n      File \"/Users/user/projects/coti-sdk-python/examples/basics/native_transfer.py\", line 12, in main\n        validate_minimum_balance(web3)  # validate minimum balance\n      File \"/Users/user/projects/coti-sdk-python/examples/basics/utils.py\", line 69, in validate_minimum_balance\n        raise Exception(\n    Exception: Not enough balance!, head to discord faucet and getsome...https://discord.com/channels/386571547508473876/1235539223595978752 , ask the BOT:testnet 0x0287a7A5bD5f4802D4A6048730a11B2713A16bd4\n\n    Process finished with exit code 1\n\n    ```\n\n    \\\n    It is normal to receive the exception `Not enough balance!` on the first run. This will be resolved once the account is funded.\n\n6. Head to the faucet at [**https://faucet.coti.io**](https://faucet.coti.io) to get testnet funds. \\\n   Send the following message to the BOT using your newly created `account address`:\\\n   \\\n   `testnet \u003caccount address\u003e`\\\n   \\\n   The bot will reply with the message:\\\n   \\\n   `\u003cusername\u003e faucet transferred 5 COTIv2 (testnet)` \\\n   \u0026#x20;\n7.  Run the `native_transfer.py` script once more\n\n    ```bash\n    python3 examples/basics/native_transfer.py\n    ```\n\n    \\\n    The script will output as following:\n\n    ```bash\n    provider:  https://testnet.coti.io\n    chain-id:  13068200\n    latest block:  0x4f5b68d9ef7debc0f86b4fc4c50a81020c8de315d65b4ce12b4372ebedef4f95\n    account address: 0x0287a7A5bD5f4802D4A6048730a11B2713A16bd4\n    account balance:  10000000000000000000 wei ( 10  ether)\n    account nonce:  0\n    AttributeDict({'blockHash': HexBytes('0x3e0534655361da10c9ee6454d622609c900e3f552435acc9cc963e370ca1d36b'), 'blockNumber': 3395902, 'contractAddress': None, 'cumulativeGasUsed': 21000, 'effectiveGasPrice': 1000000000, 'from': '0x0287a7A5bD5f4802D4A6048730a11B2713A16bd4', 'gasUsed': 21000, 'logs': [], 'logsBloom': HexBytes('0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'), 'status': 1, 'to': '0x4A68774D7679e63Ea42599Fe076a899036B3642B', 'transactionHash': HexBytes('0x99ad02f33a146945ac3a671857ab5134965b1f3e78fd53a97710bcdcb99dfee7'), 'transactionIndex': 0, 'type': 0})\n    ```\n\n    \\\n    Now that your account is created and funded, you can now onboard the account to get your new network key.\n\n## On-board Account\n\nThe following process will help you deploy the [**`onboard_account.py`**](https://github.com/coti-io/coti-sdk-python/blob/main/examples/onboard/onboard\\_account.py) example from the [**COTI Python SDK Examples**](https://github.com/coti-io/coti-sdk-python-examples) repo. This script onboards an EOA into the network. It will also:\n\n* Trigger the network to create a unique AES key for the user\n* Encrypt the unique user-specific AES key using the Public key so that its value can be viewed only by the EOA owner.\n\nThis is a mandatory script for any operation executed in any contract requiring encrypt/decrypt operations which are part of the new EVM precompiles actions.\n\n1.  Run the `onboard_account.py` script\n\n    ```bash\n    python3 examples/onboard/onboard_account.py\n    ```\n\n    \\\n    Running the script will automatically create an account and an `ACCOUNT_ENCRYPTION_KEY` (visible in the `.env` file as well as the output). The script output will look something like this:\n\n\n    ```bash\n    provider:  https://testnet.coti.io\n    chain-id:  13068200\n    latest block:  0x31f5e889a74777e514abcf83ece21839d96c465419b66b6b977f65d052062c2a\n    account address: 0x0287a7A5bD5f4802D4A6048730a11B2713A16bd4\n    account balance:  9999936985000000000 wei ( 9.999936985  ether)\n    account nonce:  3\n    tx receipt:  AttributeDict({'blockHash': HexBytes('0x94dac5f2cf57639fe934457cb33354399567cfad233c2fb3d6a271ecd47830a3'), 'blockNumber': 3399673, 'contractAddress': None, 'cumulativeGasUsed': 225968, 'effectiveGasPrice': 30000000000, 'from': '0x0287a7A5bD5f4802D4A6048730a11B2713A16bd4', 'gasUsed': 225968, 'logs': [AttributeDict({'address': '0xbFC922C10B03EA5dbC90b98dfc8fb334849ccB78', 'topics': [HexBytes('0xb67504ecfeef0230a06f661ea388c2947b4125a35e918ebff5889e3553c29c04'), HexBytes('0x0000000000000000000000000287a7a5bd5f4802d4a6048730a11b2713a16bd4')], 'data': HexBytes('0x00000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000100702c1a6221b95f4730a6ff7e7e96d4362d75558386340a381714a64ac40cb4100e5e27e5f9606fbc5e89b2064062d15d4a7ad671428ac128eb76eaed7534f36e0829fb4e4cf090db7ae6e1ba3728e6870fe29617c80ec1d0fcfd5c5b39eec6b7252e2d0a1e8f89cf786d9abd288c74e2cad8006f8c8065e6f3ff73bf164d2d9a0e708f26ff938890ea7191655ef6f0a5ffe9acaddaf9f614b2ecc9faf86cfc041b6704cc4865429b069c0fbc02b83ecc5c45f54501542de2c08b85d7c2a88370503c5d7f04ca6e7b0fffeb89dc7b3c8e5834943e93899bab6bc0ac9ce58e8d59247ab8dd7c096c1fe5e65f48a5c3fb6e85e2a6d43f829ebc5da0c75740df33fd'), 'blockNumber': 3399673, 'transactionHash': HexBytes('0x69af701a8f65ebf6c007e512ce6bc5e801884c3ae49ad744f47069053e2ed81e'), 'transactionIndex': 0, 'blockHash': HexBytes('0x94dac5f2cf57639fe934457cb33354399567cfad233c2fb3d6a271ecd47830a3'), 'logIndex': 0, 'removed': False})], 'logsBloom': HexBytes('0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000400000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000008000000000000000000000000000000000440000000000000000000000000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000040000000000000000000000000000000'), 'status': 1, 'to': '0xbFC922C10B03EA5dbC90b98dfc8fb334849ccB78', 'transactionHash': HexBytes('0x69af701a8f65ebf6c007e512ce6bc5e801884c3ae49ad744f47069053e2ed81e'), 'transactionIndex': 0, 'type': 0})\n    (True, 'ACCOUNT_ENCRYPTION_KEY', 'fd3d781ddcbd1e1cedd2d75460f30636')\n    ```\n\n\u003e [!CAUTION]\n\u003e This encryption key is **sensitive.** Ensure it is not uploaded to public places and keep it safe. This key is produced per EOA wallet, meaning a unique wallet/EOA combination will have a unique encryption key.\n\n\nThe `.env` file will also have other useful information, such as the node address, websocket address, and the contract directories.  \n\nNow that the account is onboarded, let's deploy a contract on-chain.\n\n## Deploy Data On-Chain\n\nThe following process will help you deploy the [**`data_on_chain.py`**](https://github.com/coti-io/coti-sdk-python-examples/blob/master/examples/data\\_onchain/data\\_on\\_chain.py) example from the [**COTI Python SDK Examples**](https://github.com/coti-io/coti-sdk-python-examples) repo. As its name suggests, the contract will compile and deploy the corresponding [**`DataOnChain.sol`**](https://github.com/coti-io/coti-contracts-examples/blob/main/contracts/DataOnChain.sol) contract, located in the `coti-contracts-examples` directory.\n\nThis contract can be used in order to browse and get a feel of the COTI network. The contract allows for the secure handling of encrypted data, enabling storage, transformation, and arithmetic operations on encrypted values using the [**`MpcCore`**](https://github.com/coti-io/coti-contracts/blob/main/contracts/utils/mpc/MpcCore.sol) library. It supports operations where values are encrypted using both network and user keys, ensuring data privacy and security on-chain.\n\n\n1.  Run the `data_on_chain.py` script\n\n    ```bash\n    python3 examples/data_onchain/data_on_chain.py\n    ```\n\n    \\\n    Running the script will deploy the contract and output the address where the contract was deployed. The script output will look something like this (with some omitted block hashes at the end of ther response):\\\n\n\n    ```bash\n    provider:  https://testnet.coti.io/rpc\n    chain-id:  13068200\n    latest block:  0x75a2f9d10db48fdc53f14d9ce565420e680b06231cd34e3c194f14fbd0c5f999\n    account address: 0xB101fbd6938AaE2e472E247e36555528d7ff4A89\n    account balance:  4993201875000000000 wei ( 4.993201875  ether)\n    account nonce:  2\n    Compiling DataOnChain...\n    Deploying DataOnChain...\n    Contract deployed at address: 0x91Af1CD8Bbc3b7dCcd5fF19f522cd9A49067F928\n    contract address:  0x91Af1CD8Bbc3b7dCcd5fF19f522cd9A49067F928\n    ```\n\n    \\\n    The deployment will include the transaction data as well as the address the contract was deployed to:\n\n    ```bash\n    Contract deployed at address: 0x91Af1CD8Bbc3b7dCcd5fF19f522cd9A49067F928\n    ```\n\n    \\\n    You can now view the contract on testnet explorer using the following convention:\\\n    `https://testnet.cotiscan.io/address/\u003ccontract deployment address\u003e` \\\n    \\\n    In our case: \\\n    [**https://testnet.cotiscan.io/contract/0x91af1cd8bbc3b7dccd5ff19f522cd9a49067f928**](https://testnet.cotiscan.io/contract/0x91af1cd8bbc3b7dccd5ff19f522cd9a49067f928)\n\nLet's note the following facts about the contract and the script:\n\n*   When the contract was deployed, the `uint64 private clearValue` variable was assigned a value of `5` as evidenced by [lines 15-17](https://github.com/coti-io/coti-contracts-examples/blob/befb346932dcf2feb380a8493f85faf0962bdb7b/contracts/DataOnChain.sol#L9) of the contract:\u0026#x20;\n\n    ```solidity\n     constructor () {\n            clearValue = 5;\n        }\n    ```\n* The function [`getSomeValue`](https://github.com/coti-io/coti-contracts-examples/blob/befb346932dcf2feb380a8493f85faf0962bdb7b/contracts/DataOnChain.sol#L89) of the contract will then return the value of `clearValue`\n\nNow let's take a look on at the basic flow that sends a clear value, encrypts it, and decrypts it.\n\n* The python function [`basic_clear_encrypt_decrypt`](https://github.com/coti-io/coti-sdk-python-examples/blob/master/examples/data\\_onchain/data\\_on\\_chain.py#L429) initiates the process, calling other functions as necessary.\n* The python function [`save_clear_value_network_encrypted_in_contract`](https://github.com/coti-io/coti-sdk-python-examples/blob/master/examples/data\\_onchain/data\\_on\\_chain.py#L504) is used to pass a clear value from the user.\u0026#x20;\n* Once the value is populated, the script will call the Solidity contract and use its [`setSomeEncryptedValue`](https://github.com/coti-io/confidentiality-contracts/blob/main/contracts/examples/DataOnChain.sol#L41-L43) function. This function in turn calls `setPublic64` from the [`MpcCore`](https://github.com/coti-io/coti-contracts/blob/main/contracts/utils/mpc/MpcCore.sol)  library, which turns the value into GarbledText and then into CipherText using the network key. This value is now encrypted in a network block.\n* In order to validate the block had a ClearText input, the block details from the transaction are extracted using the [`validate_block_has_tx_input_encrypted_value`](https://github.com/coti-io/coti-sdk-python-examples/blob/master/examples/data\\_onchain/data\\_on\\_chain.py#L528) function.\n* The value is then encrypted using the function [`save_network_encrypted_to_user_encrypted_input_in_contract`](https://github.com/coti-io/coti-sdk-python-examples/blob/master/examples/data\\_onchain/data\\_on\\_chain.py#L602)  , this function saves the network-encrypted value to the user-encrypted input in the contract.\n* The encrypted value is retrieved from the contract using the function [`get_user_encrypted_from_contract`](https://github.com/coti-io/coti-sdk-python-examples/blob/master/examples/data\\_onchain/data\\_on\\_chain.py#L563) to ensure the encrypted value can be successfully retrieved with the user's AES key.\n\n## Pending enhancements\n\n* Extending examples such as confidential ERC20 minting, confidential NFT (deployment and actions) and more.\n\n#### To report issues, please create a [github issue](https://github.com/coti-io/coti-sdk-python-examples/issues)","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcoti-io%2Fcoti-sdk-python-examples","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcoti-io%2Fcoti-sdk-python-examples","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcoti-io%2Fcoti-sdk-python-examples/lists"}