From 40aa4f46176db3347de8662c8c5aec477a2ca813 Mon Sep 17 00:00:00 2001 From: Arondondon Date: Thu, 19 Jun 2025 17:44:59 +0300 Subject: [PATCH] fix: changed token name in docs --- README.md | 11 +++++----- docs/main/account.md | 10 ++++----- docs/main/service_client.md | 8 +++---- docs/mpe/mpe_contract.md | 12 +++++----- docs/mpe/payment_channel_provider.md | 8 +++---- examples/console_app.py | 22 +++++++++---------- examples/examples_docs/console_app.md | 14 ++++++------ snet/sdk/storage_provider/service_metadata.py | 2 +- 8 files changed, 44 insertions(+), 43 deletions(-) diff --git a/README.md b/README.md index 34902de..fa5dd4a 100644 --- a/README.md +++ b/README.md @@ -26,7 +26,7 @@ These instructions are for the development and use of the SingularityNET SDK for ### Usage -To call a service on a SingularityNET platform, the user must be able to deposit funds (AGIX tokens) to the +To call a service on a SingularityNET platform, the user must be able to deposit funds (FET tokens) to the [Multi-Party Escrow](https://dev.singularitynet.io/docs/products/DecentralizedAIPlatform/CoreConcepts/SmartContracts/mpe) Smart Contract. To deposit these tokens or do any other transaction on the Ethereum blockchain. @@ -196,7 +196,7 @@ managed by the SDK. But anyway you can use them if you want. #### Open channel with the specified amount of funds and expiration -`open_channel()`[[1]](#1-this-method-uses-a-call-to-a-paid-smart-contract-function) opens a payment channel with the specified amount of AGIX tokens in cogs and expiration time. +`open_channel()`[[1]](#1-this-method-uses-a-call-to-a-paid-smart-contract-function) opens a payment channel with the specified amount of FET tokens in cogs and expiration time. Expiration is payment channel's TTL in blocks. When opening a channel, funds are taken from MPE. So they must be pre-deposited on it. For this, you can use the `deposit_to_escrow_account()`[[1]](#1-this-method-uses-a-call-to-a-paid-smart-contract-function) method. @@ -207,7 +207,7 @@ service_client.open_channel(amount=123456, expiration=33333) ``` You can also use the `deposit_and_open_channel()`[[1]](#1-this-method-uses-a-call-to-a-paid-smart-contract-function) -method instead. It does the same as the previous one, but first deposits the specified amount of AGIX tokens in cogs +method instead. It does the same as the previous one, but first deposits the specified amount of FET tokens in cogs into an MPE. ```python @@ -264,7 +264,7 @@ This model is especially useful for batch inference or rapid sequential calls wi ### Train call Some of the training methods, namely `upload_and_validate` and `train_model`, are paid as well as the regular service call. -Accordingly, you need to pay some AGIX to take advantage of the training. For this, as for a regular service call, +Accordingly, you need to pay some FET to take advantage of the training. For this, as for a regular service call, you need a payment channel with the required amount of funds on it and expiration (in Python SDK, the selection, opening or adding funds to the channel is done automatically). @@ -445,7 +445,7 @@ For more detailed description please refer to Developer Portal guides: #### Prerequisites -* [Python 3.10](https://www.python.org/downloads/release/python-31012/) +* [Python 3.10+](https://www.python.org/downloads/release/python-31012/) --- @@ -469,3 +469,4 @@ $ pip install -e . This project is licensed under the MIT License - see the [LICENSE](https://github.com/singnet/snet-sdk-python/blob/master/LICENSE) file for details. + diff --git a/docs/main/account.md b/docs/main/account.md index d9202fd..b52c9b0 100644 --- a/docs/main/account.md +++ b/docs/main/account.md @@ -77,7 +77,7 @@ from `SnetSDK`. - `mpe_contract` (MPEContract): An instance of the `MPEContract` class for interacting with the MultiPartyEscrow contract. - `token_contract` (Contract): An instance of the `Contract` class from the `web3` library for interacting -with the SingularityNET AGIX Token contract. +with the SingularityNET FET Token contract. - `private_key` (str): The private key associated with the account. - `signer_private_key` (str): The private key used for signing transactions. - `address` (str): The Ethereum address associated with the account. @@ -176,11 +176,11 @@ Retrieves the escrow balance for the current account. #### `deposit_to_escrow_account` -Deposit the specified amount of AGIX tokens in cogs into the MPE account. +Deposit the specified amount of FET tokens in cogs into the MPE account. ###### args: -- `amount_in_cogs` (int): The amount of AGIX tokens in cogs to deposit. +- `amount_in_cogs` (int): The amount of FET tokens in cogs to deposit. ###### returns: @@ -188,11 +188,11 @@ Deposit the specified amount of AGIX tokens in cogs into the MPE account. #### `approve_transfer` -Approves a transfer of a specified amount of AGIX tokens in cogs to the MPE contract. +Approves a transfer of a specified amount of FET tokens in cogs to the MPE contract. ###### args: -- `amount_in_cogs` (int): The amount of AGIX tokens in cogs to approve for transfer. +- `amount_in_cogs` (int): The amount of FET tokens in cogs to approve for transfer. ###### returns: diff --git a/docs/main/service_client.md b/docs/main/service_client.md index f3f23ab..a0625ee 100644 --- a/docs/main/service_client.md +++ b/docs/main/service_client.md @@ -231,11 +231,11 @@ is the client for the payment channel state service. #### `open_channel` -Opens a payment channel with the specified amount of AGIX tokens in cogs and expiration time. +Opens a payment channel with the specified amount of FET tokens in cogs and expiration time. ###### args: -- `amount` (int): The amount of AGIX tokens in cogs to deposit into the channel. +- `amount` (int): The amount of FET tokens in cogs to deposit into the channel. - `expiration` (int): The expiration time of the payment channel in blocks. ###### returns: @@ -245,11 +245,11 @@ Opens a payment channel with the specified amount of AGIX tokens in cogs and exp #### `deposit_and_open_channel` Deposits the specified amount of tokens into the MPE smart contract and opens a payment channel -with its amount of AGIX tokens in cogs and expiration time. +with its amount of FET tokens in cogs and expiration time. ###### args: -- `amount` (int): The amount of AGIX tokens in cogs to deposit into the channel. +- `amount` (int): The amount of FET tokens in cogs to deposit into the channel. - `expiration` (int): The expiration time of the payment channel in blocks. ###### returns: diff --git a/docs/mpe/mpe_contract.md b/docs/mpe/mpe_contract.md index bffafb0..e9963bb 100644 --- a/docs/mpe/mpe_contract.md +++ b/docs/mpe/mpe_contract.md @@ -62,12 +62,12 @@ Returns the balance of the given address in the MPE contract in cogs. #### `deposit` -Deposit the specified amount of AGIX tokens in cogs into the MultiPartyEscrow contract. +Deposit the specified amount of FET tokens in cogs into the MultiPartyEscrow contract. ###### args: - `account` (Account): The account instance used to send the transaction. -- `amount_in_cogs` (int): The amount of AGIX tokens in cogs to deposit. +- `amount_in_cogs` (int): The amount of FET tokens in cogs to deposit. ###### returns: @@ -76,14 +76,14 @@ Deposit the specified amount of AGIX tokens in cogs into the MultiPartyEscrow co #### `open_channel` -Opens a payment channel with the specified amount of AGIX tokens in cogs (taken from MPE) and expiration time. +Opens a payment channel with the specified amount of FET tokens in cogs (taken from MPE) and expiration time. ###### args: - `account` (Account): The account object used to send the transaction. - `payment_address` (str): The address of the payment recipient. - `group_id` (str): The ID of the payment group. -- `amount` (int): The amount of AGIX tokens in cogs to deposit into the channel. +- `amount` (int): The amount of FET tokens in cogs to deposit into the channel. - `expiration` (int): The expiration time of the payment channel in blocks. ###### returns: @@ -92,7 +92,7 @@ Opens a payment channel with the specified amount of AGIX tokens in cogs (taken #### `deposit_and_open_channel` -Opens a payment channel with the specified amount of AGIX tokens in cogs (which are previously deposited on MPE) +Opens a payment channel with the specified amount of FET tokens in cogs (which are previously deposited on MPE) and expiration time. The account must have sufficient allowance to perform the deposit, otherwise the account first approves the transfer. @@ -101,7 +101,7 @@ first approves the transfer. - `account` (Account): The account object used to send the transaction. - `payment_address` (str): The address of the payment recipient. - `group_id` (str): The ID of the payment group. -- `amount` (int): The amount of AGIX tokens in cogs first for deposit on MPE, then for deposit on the channel. +- `amount` (int): The amount of FET tokens in cogs first for deposit on MPE, then for deposit on the channel. - `expiration` (int): The expiration time of the payment channel in blocks. ###### returns: diff --git a/docs/mpe/payment_channel_provider.md b/docs/mpe/payment_channel_provider.md index b1bbb57..7f25bf5 100644 --- a/docs/mpe/payment_channel_provider.md +++ b/docs/mpe/payment_channel_provider.md @@ -114,13 +114,13 @@ pass it to PaymentChannel instances. #### `open_channel` -Opens a payment channel with the specified amount of AGIX tokens in cogs (taken from MPE) and expiration time. +Opens a payment channel with the specified amount of FET tokens in cogs (taken from MPE) and expiration time. And then returns it. ###### args: - `account` (Account): The account object used to send the transaction. -- `amount` (int): The amount of AGIX tokens in cogs to deposit into the channel. +- `amount` (int): The amount of FET tokens in cogs to deposit into the channel. - `expiration` (int): The expiration time of the payment channel in blocks. - `payment_address` (str): The address of the payment recipient. - `group_id` (str): The ID of the payment group. @@ -133,13 +133,13 @@ pass it to PaymentChannel instances. #### `deposit_and_open_channel` -Opens a payment channel with the specified amount of AGIX tokens in cogs (which are previously deposited on MPE) +Opens a payment channel with the specified amount of FET tokens in cogs (which are previously deposited on MPE) and expiration time. And then returns it. ###### args: - `account` (Account): The account object used to send the transaction. -- `amount` (int): The amount of AGIX tokens in cogs to deposit into the channel. +- `amount` (int): The amount of FET tokens in cogs to deposit into the channel. - `expiration` (int): The expiration time of the payment channel in blocks. - `payment_address` (str): The address of the payment recipient. - `group_id` (str): The ID of the payment group. diff --git a/examples/console_app.py b/examples/console_app.py index 588bdd3..503c60c 100644 --- a/examples/console_app.py +++ b/examples/console_app.py @@ -144,21 +144,21 @@ def print_service_info(): def balance(): """ The function, which is called when the user enters the command 'balance' in the main menu. - Prints the balances of AGIX and MPE. It gets the balances using 'balance_of' and 'escrow_balance'. + Prints the balances of FET and MPE. It gets the balances using 'balance_of' and 'escrow_balance'. """ account_balance = snet_sdk.account.token_contract.functions.balanceOf(snet_sdk.account.address).call() escrow_balance = snet_sdk.account.escrow_balance() - print(f"AGIX balance: {account_balance}") + print(f"FET balance: {account_balance}") print(f"MPE balance: {escrow_balance}") def deposit(): """ The function, which is called when the user enters the command 'deposit' in the main menu. - Deposits the user-specified amount of AGIX tokens in cogs into MPE contract using 'deposit_to_escrow_account'. + Deposits the user-specified amount of FET tokens in cogs into MPE contract using 'deposit_to_escrow_account'. """ - amount = int(input("Enter amount of AGIX tokens in cogs to deposit into an MPE account: ")) + amount = int(input("Enter amount of FET tokens in cogs to deposit into an MPE account: ")) snet_sdk.account.deposit_to_escrow_account(amount) @@ -209,8 +209,8 @@ def open_channel(): """ The function, which is called when the user enters the command 'open' in the channel menu. Opens a new channel for the active service. Checks the balance of the MPE contract and asks the user - if they want to deposit AGIX tokens into it if there isn't enough funds. Opens the channel using 'open_channel' - or 'deposit_and_open_channel' with the user-specified amount of AGIX tokens in cogs and expiration time. + if they want to deposit FET tokens into it if there isn't enough funds. Opens the channel using 'open_channel' + or 'deposit_and_open_channel' with the user-specified amount of FET tokens in cogs and expiration time. """ global active_service global channels @@ -224,13 +224,13 @@ def open_channel(): if not is_continue: return None - amount = int(input("Enter amount of AGIX tokens in cogs to put into the channel: ").strip()) + amount = int(input("Enter amount of FET tokens in cogs to put into the channel: ").strip()) balance = snet_sdk.account.escrow_balance() is_deposit = False if balance < amount: print(f"Insufficient balance!\n\tCurrent MPE balance: {balance}\n\tAmount to put: {amount}") - is_deposit = input("Would you like to deposit needed amount of AGIX tokens in advance? (y/n): ").strip() == 'y' + is_deposit = input("Would you like to deposit needed amount of FET tokens in advance? (y/n): ").strip() == 'y' if not is_deposit: print("Channel is not opened!") return None @@ -265,13 +265,13 @@ def add_funds(): """ The function, which is called when the user enters the command 'add-funds' in the channel menu. Adds funds to the channel. Finds the channel by its id specified by the user and adds the user-specified amount - of AGIX tokens in cogs to it using 'add_funds'. + of FET tokens in cogs to it using 'add_funds'. """ channel_id = int(input("Enter channel id: ").strip()) exists = False for channel in channels: if channel[0].channel_id == channel_id: - amount = int(input("Enter amount of AGIX tokens in cogs to add to the channel: ").strip()) + amount = int(input("Enter amount of FET tokens in cogs to add to the channel: ").strip()) channel[0].add_funds(amount) exists = True if not exists: @@ -322,7 +322,7 @@ def extend_expiration(): "organizations": (list_organizations, "print a list of organization ids from Registry"), "services": (list_services_for_org, "print a list of service ids for an organization from Registry"), "balance": (balance, "print the account balance and the escrow balance"), - "deposit": (deposit, "deposit AGIX tokens into MPE"), + "deposit": (deposit, "deposit FET tokens into MPE"), "block": (block_number, "print the current block number"), "service": (lambda: None, "go to the services menu"), "channel": (lambda: None, "go to the channels menu"), diff --git a/examples/examples_docs/console_app.md b/examples/examples_docs/console_app.md index 7c2bb28..9cb91f8 100644 --- a/examples/examples_docs/console_app.md +++ b/examples/examples_docs/console_app.md @@ -20,7 +20,7 @@ Available commands: organizations - print a list of organization ids from Registry services - print a list of service ids for an organization from Registry balance - print the account balance and the escrow balance - deposit - deposit AGIX tokens into MPE + deposit - deposit FET tokens into MPE block - print the current block number service - go to the services menu channel - go to the channels menu @@ -42,7 +42,7 @@ Available commands: organizations - print a list of organization ids from Registry services - print a list of service ids for an organization from Registry balance - print the account balance and the escrow balance - deposit - deposit AGIX tokens into MPE + deposit - deposit FET tokens into MPE block - print the current block number service - go to the services menu channel - go to the channels menu @@ -112,7 +112,7 @@ commands = { "organizations": (list_organizations, "print a list of organization ids from Registry"), "services": (list_services_for_org, "print a list of service ids for an organization from Registry"), "balance": (balance, "print the account balance and the escrow balance"), - "deposit": (deposit, "deposit AGIX tokens into MPE"), + "deposit": (deposit, "deposit FET tokens into MPE"), "block": (block_number, "print the current block number"), "service": (lambda: None, "go to the services menu"), "channel": (lambda: None, "go to the channels menu"), @@ -338,8 +338,8 @@ Continue? (y/n): """).strip() == 'y' The function, which is called when the user enters the command 'open' in the channel menu. Opens a new channel for the active service. Checks the balance of the MPE contract and asks the user -if they want to deposit AGIX tokens into it if there isn't enough funds. Opens the channel using 'open_channel' -or 'deposit_and_open_channel' with the user-specified amount of AGIX tokens in cogs and expiration time. +if they want to deposit FET tokens into it if there isn't enough funds. Opens the channel using 'open_channel' +or 'deposit_and_open_channel' with the user-specified amount of FET tokens in cogs and expiration time. ```python def open_channel(): @@ -355,13 +355,13 @@ def open_channel(): if not is_continue: return None - amount = int(input("Enter amount of AGIX tokens in cogs to put into the channel: ").strip()) + amount = int(input("Enter amount of FET tokens in cogs to put into the channel: ").strip()) balance = snet_sdk.account.escrow_balance() is_deposit = False if balance < amount: print(f"Insufficient balance!\n\tCurrent MPE balance: {balance}\n\tAmount to put: {amount}") - is_deposit = input("Would you like to deposit needed amount of AGIX tokens in advance? (y/n): ").strip() == 'y' + is_deposit = input("Would you like to deposit needed amount of FET tokens in advance? (y/n): ").strip() == 'y' if not is_deposit: print("Channel is not opened!") return None diff --git a/snet/sdk/storage_provider/service_metadata.py b/snet/sdk/storage_provider/service_metadata.py index a49c573..5b57e47 100644 --- a/snet/sdk/storage_provider/service_metadata.py +++ b/snet/sdk/storage_provider/service_metadata.py @@ -21,7 +21,7 @@ Possible pricing models: 1. Fixed price price_model - "fixed_price" - price_in_cogs - unique fixed price in cogs for all method (1 AGIX = 10^8 cogs) + price_in_cogs - unique fixed price in cogs for all method (1 FET = 10^18 cogs) (other pricing models can be easily supported) groups [] - group is the number of endpoints which shares same payment channel; grouping strategy is defined by service provider;