From f4660c26e226d614b6afc754e1bc317608ffd67e Mon Sep 17 00:00:00 2001 From: Jiri Date: Mon, 3 Jun 2024 12:19:31 +0200 Subject: [PATCH 1/7] eridanus config --- cosmpy/aerial/config.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/cosmpy/aerial/config.py b/cosmpy/aerial/config.py index bb5ba9a0..44ca20dc 100644 --- a/cosmpy/aerial/config.py +++ b/cosmpy/aerial/config.py @@ -91,6 +91,21 @@ def fetchai_dorado_testnet(cls) -> "NetworkConfig": faucet_url="https://faucet-dorado.fetch.ai", ) + @classmethod + def asi_eridanus_testnet(cls) -> "NetworkConfig": + """ASI Eridanus testnet. + + :return: Network configuration + """ + return NetworkConfig( + chain_id="eridanus-1", + url="grpc+https://grpc-eridanus-1.fetch.ai", + fee_minimum_gas_price=5000000000, + fee_denomination="atestasi", + staking_denomination="atestasi", + faucet_url="https://faucet-eridanus-1.fetch.ai", + ) + @classmethod def fetchai_alpha_testnet(cls): """Get the fetchai alpha testnet. From 7523d8305c984d10cdd5c8dcadf467ec831ce874 Mon Sep 17 00:00:00 2001 From: Jiri Date: Mon, 10 Jun 2024 13:38:01 +0200 Subject: [PATCH 2/7] Renaming --- .wordlist.txt | 1 + DEVELOPING.md | 2 +- README.md | 2 +- cosmpy/aerial/config.py | 4 +- cosmpy/crypto/address.py | 2 +- docs/liquidity-pool.md | 24 ++++++------ docs/low-level-api.md | 2 +- docs/oracles.md | 4 +- docs/query-balance.md | 6 +-- docs/send-tokens.md | 6 +-- docs/stake-optimizer.md | 4 +- docs/swap-automation.md | 38 +++++++++---------- docs/wallet-topup.md | 4 +- examples/aerial_authz.py | 2 +- examples/aerial_compounder.py | 2 +- examples/aerial_liquidity_pool.py | 14 +++---- examples/aerial_oracle.py | 2 +- examples/aerial_oracle_client.py | 2 +- examples/aerial_send_tokens.py | 2 +- examples/aerial_stake_optimizer.py | 4 +- examples/aerial_swap_automation.py | 26 ++++++------- examples/aerial_topup.py | 2 +- scripts/setup_fetchd.sh | 2 +- tests/integration/test_contract.py | 10 ++--- tests/integration/test_tx.py | 12 +++--- tests/unit/test_aerial/coins_test.py | 10 ++--- .../contract/test_cosmwasm_handlers.py | 18 ++++----- tests/unit/test_staking/test_rest_client.py | 8 ++-- 28 files changed, 108 insertions(+), 107 deletions(-) diff --git a/.wordlist.txt b/.wordlist.txt index 90fe9184..9ee27559 100644 --- a/.wordlist.txt +++ b/.wordlist.txt @@ -64,6 +64,7 @@ pb cosmoshub validator atestfet +aasi denom wasm blockapsis diff --git a/DEVELOPING.md b/DEVELOPING.md index 0919269c..1d3343f9 100644 --- a/DEVELOPING.md +++ b/DEVELOPING.md @@ -204,7 +204,7 @@ You require [Docker](https://docs.docker.com/get-docker/) for your platform. export PASSWORD="12345678" export CHAIN_ID=testing export DENOM_1=stake - export DENOM_2=atestfet + export DENOM_2=atestasi export MONIKER=some-moniker diff --git a/README.md b/README.md index 9eb2b1ee..b3616eff 100644 --- a/README.md +++ b/README.md @@ -46,7 +46,7 @@ from cosmpy.aerial.client import LedgerClient, NetworkConfig # connect to Fetch.ai network using default parameters ledger_client = LedgerClient(NetworkConfig.fetchai_mainnet()) -alice: str = 'fetch12q5gw9l9d0yyq2th77x6pjsesczpsly8h5089x' +alice: str = 'asi12q5gw9l9d0yyq2th77x6pjsesczpsly8vk5n89' balances = ledger_client.query_bank_all_balances(alice) # show all coin balances diff --git a/cosmpy/aerial/config.py b/cosmpy/aerial/config.py index 44ca20dc..0ca5887c 100644 --- a/cosmpy/aerial/config.py +++ b/cosmpy/aerial/config.py @@ -128,7 +128,7 @@ def fetchai_stable_testnet(cls): :return: fetchai stable testnet. For now dorado is fetchai stable testnet. """ - return cls.fetchai_dorado_testnet() + return cls.asi_eridanus_testnet() @classmethod def fetchai_mainnet(cls) -> "NetworkConfig": @@ -167,4 +167,4 @@ def latest_stable_testnet(cls) -> "NetworkConfig": "latest_stable_testnet is deprecated, use fetchai_stable_testnet instead", DeprecationWarning, ) - return cls.fetchai_stable_testnet() + return cls.asi_eridanus_testnet() diff --git a/cosmpy/crypto/address.py b/cosmpy/crypto/address.py index 8fd90a42..6b0daa6f 100644 --- a/cosmpy/crypto/address.py +++ b/cosmpy/crypto/address.py @@ -28,7 +28,7 @@ from cosmpy.crypto.keypairs import PublicKey -DEFAULT_PREFIX = "fetch" +DEFAULT_PREFIX = "asi" def _to_bech32(prefix: str, data: bytes) -> str: diff --git a/docs/liquidity-pool.md b/docs/liquidity-pool.md index 647c84ea..3f8a7f2c 100644 --- a/docs/liquidity-pool.md +++ b/docs/liquidity-pool.md @@ -1,6 +1,6 @@ ## Swap Tokens -You can interact with a liquidity pool by swapping atestfet for CW20 tokens or vice versa. +You can interact with a liquidity pool by swapping atestasi for CW20 tokens or vice versa. First, perform all the necessary imports: ```python @@ -28,13 +28,13 @@ Define the CW20, pair, and liquidity token contracts with the following addresse ```python # Define cw20, pair and liquidity token contracts token_contract_address = ( - "fetch1qr8ysysnfxmqzu7cu7cq7dsq5g2r0kvkg5e2wl2fnlkqss60hcjsxtljxl" + "asi1qr8ysysnfxmqzu7cu7cq7dsq5g2r0kvkg5e2wl2fnlkqss60hcjshnau6q" ) pair_contract_address = ( - "fetch1vgnx2d46uvyxrg9pc5mktkcvkp4uflyp3j86v68pq4jxdc8j4y0s6ulf2a" + "asi1vgnx2d46uvyxrg9pc5mktkcvkp4uflyp3j86v68pq4jxdc8j4y0stya8kz" ) liq_token_contract_address = ( - "fetch1alzhf9yhghud3qhucdjs895f3aek2egfq44qm0mfvahkv4jukx4qd0ltxx" + "asi1alzhf9yhghud3qhucdjs895f3aek2egfq44qm0mfvahkv4jukx4quha96e" ) token_contract = LedgerContract( @@ -48,12 +48,12 @@ liq_token_contract = LedgerContract( ) ``` -Swap the defined `swap_amount`of atestfet for CW20 tokens +Swap the defined `swap_amount`of atestasi for CW20 tokens ```python -# Swap atestfet for CW20 tokens +# Swap atestasi for CW20 tokens swap_amount = "10000" -native_denom = "atestfet" +native_denom = "atestasi" tx = pair_contract.execute( { @@ -76,7 +76,7 @@ You can query your CW20 balance using the following code: token_contract.query({"balance": {"address": str(wallet.address())}}) ``` -To trade 10 CW20 tokens for atestfet you can use the following: +To trade 10 CW20 tokens for atestasi you can use the following: ```python tx = token_contract.execute({ @@ -91,7 +91,7 @@ tx.wait_to_complete() ``` ## Add and Remove Liquidity -You need to increase your wallet's allowance to provide CW20 tokens to the liquidity pool. You don't need to increase the allowance to provide atestfet +You need to increase your wallet's allowance to provide CW20 tokens to the liquidity pool. You don't need to increase the allowance to provide atestasi ```python # Set the amount of CW20 tokens to be added to liquidity pool @@ -111,17 +111,17 @@ tx = token_contract.execute( tx.wait_to_complete() ``` -To set the amount of atestfet to be added to the liquidity pool and not influence the existing token prices, we need to choose an amount that matches the atestfet:CW20 token ratio already existing in the pool. For this reason, we will query the `pair_contract` pool to observe the atestfet:CW20 token ratio +To set the amount of atestasi to be added to the liquidity pool and not influence the existing token prices, we need to choose an amount that matches the atestasi:CW20 token ratio already existing in the pool. For this reason, we will query the `pair_contract` pool to observe the atestasi:CW20 token ratio ```python # Query Liquidity Pool pair_contract.query({"pool": {}}) ``` -At the moment the code was run, the ratio was close to 247:10 atestfet:CW20, and since we defined above the amount of CW20 tokens to provide to the liquidity pool as 100, we will match the LP pool ratio by setting the atestfet amount as 2470. It will be difficult to exactly match the current ratio of the pool, but when adding liquidity to the pool, there is a slippage_tolerance parameter that allows a certain percentage change in the price. +At the moment the code was run, the ratio was close to 247:10 atestasi:CW20, and since we defined above the amount of CW20 tokens to provide to the liquidity pool as 100, we will match the LP pool ratio by setting the atestasi amount as 2470. It will be difficult to exactly match the current ratio of the pool, but when adding liquidity to the pool, there is a slippage_tolerance parameter that allows a certain percentage change in the price. ```python -# Set the amount of atestfet tokens to be added to liquidity pool +# Set the amount of atestasi tokens to be added to liquidity pool native_liquidity_amount = "2470" # Provide Liquidity diff --git a/docs/low-level-api.md b/docs/low-level-api.md index 4df1b82d..7a2f1b68 100644 --- a/docs/low-level-api.md +++ b/docs/low-level-api.md @@ -108,7 +108,7 @@ tx.wait_to_complete() Before running the above, the necessary `authz` grant must first be put in place. For Ledger Nano users (other hardware wallets are also available) that might mean an excursion to the command line. For the Fetchai network using [FetchD](https://docs.fetch.ai/ledger_v2/): ```bash -fetchd tx authz grant $(fetchd keys show grantee --output json | jq -r .address) generic --msg-type "/cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission" --from=$(fetchd keys show grantor --output json | jq -r .address) --gas auto --gas-adjustment 1.5 --gas-prices 5000000000atestfet +fetchd tx authz grant $(fetchd keys show grantee --output json | jq -r .address) generic --msg-type "/cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission" --from=$(fetchd keys show grantor --output json | jq -r .address) --gas auto --gas-adjustment 1.5 --gas-prices 5000000000atestasi ``` By default, the above provides one year's worth of authorization to withdraw validator commission using accounts already present in the keyring. diff --git a/docs/oracles.md b/docs/oracles.md index 0f755d88..4e1bb5eb 100644 --- a/docs/oracles.md +++ b/docs/oracles.md @@ -46,7 +46,7 @@ contract = LedgerContract("oracle.wasm", ledger) To deploy the oracle contract, add the fee amount to the instantiation message and call the `deploy` function: ```python instantiation_message = {"fee": "100"} -contract.deploy(instantiation_message, wallet, funds="1atestfet") +contract.deploy(instantiation_message, wallet, funds="1atestasi") print(f"Oracle contract deployed at: {contract.address}") ``` @@ -107,7 +107,7 @@ REQUEST_INTERVAL_SECONDS = 10 while True: request_message = {"query_oracle_value": {}} contract.execute( - request_message, wallet, funds="100atestfet" + request_message, wallet, funds="100atestasi" ).wait_to_complete() result = contract.query({"oracle_value": {}}) print(f"Oracle value successfully retrieved: {result}") diff --git a/docs/query-balance.md b/docs/query-balance.md index bb517435..6649b7ba 100644 --- a/docs/query-balance.md +++ b/docs/query-balance.md @@ -1,7 +1,7 @@ A [`LedgerClient`](connect-to-network.md) object can be used to query the balances associated with a particular address: ```python -address: str = 'fetch12q5gw9l9d0yyq2th77x6pjsesczpsly8h5089x' +address: str = 'asi12q5gw9l9d0yyq2th77x6pjsesczpsly8vk5n89' balances = ledger_client.query_bank_all_balances(address) ``` @@ -9,13 +9,13 @@ This will return a `List` of `Coin` objects that contain `amount` and `denom` v ```python >>> balances -[Coin(amount='29263221445595384075', denom='afet')] +[Coin(amount='29263221445595384075', denom='aasi')] ``` It's also possible to query the funds associated with a particular denomination by calling ```python -balance = ledger_client.query_bank_balance(address, denom='afet') +balance = ledger_client.query_bank_balance(address, denom='aasi') ``` which will return the value of the (integer) funds held by the address with the specified denomination. If the `denom` argument is omitted the function will return the fee denomination specified in the `NetworkConfig` object used to initialise the `LedgerClient`. diff --git a/docs/send-tokens.md b/docs/send-tokens.md index 2c5d913b..5a3901d0 100644 --- a/docs/send-tokens.md +++ b/docs/send-tokens.md @@ -1,9 +1,9 @@ -Once you have your [`wallet`](wallets-and-keys.md) configured, you can send transactions to the network. The `LedgerClient` object provides useful utilities to do common operations. The following example shows how to send `10` `atestfet` to another address: +Once you have your [`wallet`](wallets-and-keys.md) configured, you can send transactions to the network. The `LedgerClient` object provides useful utilities to do common operations. The following example shows how to send `10` `atestasi` to another address: ```python -destination_address = 'fetch1h2l3cnu7e23whmd5yrfeunacez9tv0plv5rxqy' +destination_address = 'asi1h2l3cnu7e23whmd5yrfeunacez9tv0plhkcjz8' -tx = ledger_client.send_tokens(destination_address, 10, "atestfet", wallet) +tx = ledger_client.send_tokens(destination_address, 10, "atestasi", wallet) # block until the transaction has been successful or failed tx.wait_to_complete() diff --git a/docs/stake-optimizer.md b/docs/stake-optimizer.md index e8302cd3..95f0dfcf 100644 --- a/docs/stake-optimizer.md +++ b/docs/stake-optimizer.md @@ -87,7 +87,7 @@ alice_address = Address(key)._display tx = Transaction() # Add delegate msg -tx.add_message(create_delegate_msg(alice_address,validator.address,initial_stake,"atestfet")) +tx.add_message(create_delegate_msg(alice_address,validator.address,initial_stake,"atestasi")) # Add claim reward msg tx.add_message(create_withdraw_delegator_reward(alice_address, validator.address)) @@ -103,7 +103,7 @@ _, str_tx_fee = ledger.estimate_gas_and_fee_for_tx(tx) Since the output of this function is a string, we will convert it to an int and round it up to get a more conservative estimate for the `fee` ```python -denom = "atestfet" +denom = "atestasi" tx_fee = str_tx_fee[:-len(denom)] # Add a 20% to the fee estimation to get a more conservative estimate diff --git a/docs/swap-automation.md b/docs/swap-automation.md index 035d9a77..6f0aa717 100644 --- a/docs/swap-automation.md +++ b/docs/swap-automation.md @@ -1,4 +1,4 @@ -A mean-reversion strategy expects the prices to return to “normal” levels or a certain moving average following a temporary price spike. We can construct a similar strategy using the Liquidity Pool, where we will set upper and lower bound prices that will trigger a sell and a buy transaction respectively. If the behavior of the LP prices works as expected always returning to a certain moving average, we could profit by selling high and buying low. We will do this by swapping atestfet and CW20 with the Liquidity Pool, we refer to a sell transaction when we sell atestfet and get CW20 tokens, a buy transaction would be exactly the opposite. +A mean-reversion strategy expects the prices to return to “normal” levels or a certain moving average following a temporary price spike. We can construct a similar strategy using the Liquidity Pool, where we will set upper and lower bound prices that will trigger a sell and a buy transaction respectively. If the behavior of the LP prices works as expected always returning to a certain moving average, we could profit by selling high and buying low. We will do this by swapping atestasi and CW20 with the Liquidity Pool, we refer to a sell transaction when we sell atestasi and get CW20 tokens, a buy transaction would be exactly the opposite. The code will require the following imports: @@ -10,7 +10,7 @@ from cosmpy.aerial.faucet import FaucetApi from cosmpy.aerial.wallet import LocalWallet ``` -We will define the *swap_native_for_cw20* function that trades `swap_amount` of atestfet from `wallet` for CW20 tokens by executing a `pair_contract`: +We will define the *swap_native_for_cw20* function that trades `swap_amount` of atestasi from `wallet` for CW20 tokens by executing a `pair_contract`: ```python @@ -20,17 +20,17 @@ def swap_native_for_cw20(swap_amount, pair_contract, wallet): "offer_asset": { "info": { "native_token": { - "denom": "atestfet" + "denom": "atestasi" } }, "amount": str(swap_amount) } } - },sender= wallet, funds= str(swap_amount) + "atestfet") + },sender= wallet, funds= str(swap_amount) + "atestasi") print("swapping native for cw20 tokens") tx.wait_to_complete() ``` -Now, we will define the *swap_cw20_for_native* function that does exactly the opposite of the function defined above: trades `swap_amount` of CW20 tokens from `wallet` for atestfet. This time the CW20 `token_contract` is executed using the `pair_contract_address`. Finally, you need to include the {"swap":{}} message in the "msg" field. However, this swap message has to be encoded into base64. When you encode {"swap":{}} message into base64 you get: eyJzd2FwIjp7fX0= +Now, we will define the *swap_cw20_for_native* function that does exactly the opposite of the function defined above: trades `swap_amount` of CW20 tokens from `wallet` for atestasi. This time the CW20 `token_contract` is executed using the `pair_contract_address`. Finally, you need to include the {"swap":{}} message in the "msg" field. However, this swap message has to be encoded into base64. When you encode {"swap":{}} message into base64 you get: eyJzd2FwIjp7fX0= ```python def swap_cw20_for_native(swap_amount, pair_contract_address, token_contract, wallet): @@ -68,13 +68,13 @@ Define the CW20, pair, and liquidity token contracts with the following addresse ```python # Define cw20, pair and liquidity token contracts token_contract_address = ( - "fetch1qr8ysysnfxmqzu7cu7cq7dsq5g2r0kvkg5e2wl2fnlkqss60hcjsxtljxl" + "asi1qr8ysysnfxmqzu7cu7cq7dsq5g2r0kvkg5e2wl2fnlkqss60hcjshnau6q" ) pair_contract_address = ( - "fetch1vgnx2d46uvyxrg9pc5mktkcvkp4uflyp3j86v68pq4jxdc8j4y0s6ulf2a" + "asi1vgnx2d46uvyxrg9pc5mktkcvkp4uflyp3j86v68pq4jxdc8j4y0stya8kz" ) liq_token_contract_address = ( - "fetch1alzhf9yhghud3qhucdjs895f3aek2egfq44qm0mfvahkv4jukx4qd0ltxx" + "asi1alzhf9yhghud3qhucdjs895f3aek2egfq44qm0mfvahkv4jukx4quha96e" ) token_contract = LedgerContract( path=None, client=ledger, address=token_contract_address @@ -87,15 +87,15 @@ liq_token_contract = LedgerContract( ) ``` -We will define a trading wallet named `tokens` that will keep track of the amount of atestfet or CW20 tokens we hold at each moment. The `currency` variable will keep track of the token type. We will never have a mixed trading wallet since in this strategy, every time we perform a swap, we sell all the current tokens. +We will define a trading wallet named `tokens` that will keep track of the amount of atestasi or CW20 tokens we hold at each moment. The `currency` variable will keep track of the token type. We will never have a mixed trading wallet since in this strategy, every time we perform a swap, we sell all the current tokens. ```python # Trading Wallet tokens = 1000000 -currency = "atestfet" +currency = "atestasi" ``` -Now we will define the upper and lower price bounds (atestfet/CW20) that will trigger a buy and a sell transaction of atestfet. We also define the commission rate (0.3% in [`Terraswap`](https://docs.terraswap.io/docs/introduction/trading-fees/)) and the `interval` time step to query the pool's price. +Now we will define the upper and lower price bounds (atestasi/CW20) that will trigger a buy and a sell transaction of atestasi. We also define the commission rate (0.3% in [`Terraswap`](https://docs.terraswap.io/docs/introduction/trading-fees/)) and the `interval` time step to query the pool's price. ```python upper_bound = 26 @@ -112,8 +112,8 @@ Finally, we will initialize a loop, in every step it will: * Query the Liquidity Pool status * Check if current trading wallet's `currency` -* Calculate the *atestfet/CW20* price using the tokens received `tokens_out` if the whole trading wallet's balance `tokens` was to be swapped with the liquidity pool -* If atestfet sell/buy price is equal or lower/higher than the lower/upper bound, it will trigger a sell/buy transaction of atestfet to buy/sell CW20 tokens. +* Calculate the *atestasi/CW20* price using the tokens received `tokens_out` if the whole trading wallet's balance `tokens` was to be swapped with the liquidity pool +* If atestasi sell/buy price is equal or lower/higher than the lower/upper bound, it will trigger a sell/buy transaction of atestasi to buy/sell CW20 tokens. * Update trading wallet `token` balance and `currency` * Sleep `interval` and repeat @@ -125,13 +125,13 @@ while True: native_amount = int(pool["assets"][1]["amount"]) cw20_amount = int(pool["assets"][0]["amount"]) - if currency == "atestfet": + if currency == "atestasi": # Calculate received tokens if tokens amount is given to LP tokens_out = round(((cw20_amount*tokens)/(native_amount+tokens))*(1-commission)) - # Sell price of atestfet => give atestfet, get cw20 + # Sell price of atestasi => give atestasi, get cw20 sell_price = tokens/tokens_out - print("atestfet sell price: ", sell_price) + print("atestasi sell price: ", sell_price) if sell_price <= lower_bound: swap_native_for_cw20(tokens, pair_contract, wallet) tokens = int(token_contract.query({"balance": {"address": str(wallet.address())}})["balance"]) @@ -140,13 +140,13 @@ while True: # Calculate received tokens if tokens amount is given to LP tokens_out = round(((native_amount*tokens)/(cw20_amount+tokens))*(1-commission)) - # Buy price of atestfet => give cw20, get atestfet + # Buy price of atestasi => give cw20, get atestasi buy_price = tokens_out/tokens - print("atestfet buy price: ", buy_price) + print("atestasi buy price: ", buy_price) if buy_price >= upper_bound: swap_cw20_for_native(tokens, pair_contract_address, token_contract, wallet) tokens = tokens_out - currency = "atestfet" + currency = "atestasi" sleep(interval) ``` diff --git a/docs/wallet-topup.md b/docs/wallet-topup.md index 6c99c18b..5fb4038e 100644 --- a/docs/wallet-topup.md +++ b/docs/wallet-topup.md @@ -34,7 +34,7 @@ from cosmpy.protos.cosmos.bank.v1beta1.authz_pb2 import SendAuthorization # Set total authorization time and spend amount total_authz_time = 10000 amount = 1000000000000000000 -spend_amount = Coin(amount=str(amount), denom="atestfet") +spend_amount = Coin(amount=str(amount), denom="atestasi") # Authorize authz_wallet to send tokens from wallet authz_any = any_pb2.Any() @@ -66,7 +66,7 @@ Next, you will need to define the amount to top-up, the threshold that will trig # Top-up amount amount = 10000000000000000 -top_up_amount = Coin(amount=str(amount), denom="atestfet") +top_up_amount = Coin(amount=str(amount), denom="atestasi") # Minimum balance for task_wallet minimum_balance = 1000000000000000 diff --git a/examples/aerial_authz.py b/examples/aerial_authz.py index b29eb45d..82dcc111 100644 --- a/examples/aerial_authz.py +++ b/examples/aerial_authz.py @@ -79,7 +79,7 @@ def main(): faucet_api.get_wealth(wallet.address()) wallet_balance = ledger.query_bank_balance(wallet.address()) - spend_amount = Coin(amount=str(amount), denom="atestfet") + spend_amount = Coin(amount=str(amount), denom="atestasi") # Authorize authz_wallet to send tokens from wallet authz_any = any_pb2.Any() diff --git a/examples/aerial_compounder.py b/examples/aerial_compounder.py index 6a604c80..461191ae 100644 --- a/examples/aerial_compounder.py +++ b/examples/aerial_compounder.py @@ -34,7 +34,7 @@ def _parse_commandline(): type=int, nargs="?", default=9000000000000000000, - help="Initial amount of atestfet to delegate to validator", + help="Initial amount of atestasi to delegate to validator", ) parser.add_argument( "time_limit", diff --git a/examples/aerial_liquidity_pool.py b/examples/aerial_liquidity_pool.py index 4a4aaa5c..711a6024 100644 --- a/examples/aerial_liquidity_pool.py +++ b/examples/aerial_liquidity_pool.py @@ -34,7 +34,7 @@ def _parse_commandline(): type=int, nargs="?", default=10000, - help="atestfet swap amount to get some cw20 tokens on wallet's address", + help="atestasi swap amount to get some cw20 tokens on wallet's address", ) parser.add_argument( "cw20_liquidity_amount", @@ -48,7 +48,7 @@ def _parse_commandline(): type=int, nargs="?", default=2470, - help="amount of atestfet tokens that will be provided to LP", + help="amount of atestasi tokens that will be provided to LP", ) return parser.parse_args() @@ -69,13 +69,13 @@ def main(): # Define cw20, pair and liquidity token contracts token_contract_address = ( - "fetch1qr8ysysnfxmqzu7cu7cq7dsq5g2r0kvkg5e2wl2fnlkqss60hcjsxtljxl" + "asi1qr8ysysnfxmqzu7cu7cq7dsq5g2r0kvkg5e2wl2fnlkqss60hcjshnau6q" ) pair_contract_address = ( - "fetch1vgnx2d46uvyxrg9pc5mktkcvkp4uflyp3j86v68pq4jxdc8j4y0s6ulf2a" + "asi1vgnx2d46uvyxrg9pc5mktkcvkp4uflyp3j86v68pq4jxdc8j4y0stya8kz" ) liq_token_contract_address = ( - "fetch1alzhf9yhghud3qhucdjs895f3aek2egfq44qm0mfvahkv4jukx4qd0ltxx" + "asi1alzhf9yhghud3qhucdjs895f3aek2egfq44qm0mfvahkv4jukx4quha96e" ) token_contract = LedgerContract( @@ -91,9 +91,9 @@ def main(): print("Pool (initial state): ") print(pair_contract.query({"pool": {}}), "\n") - # Swap atestfet for CW20 tokens + # Swap atestasi for CW20 tokens swap_amount = str(args.swap_amount) - native_denom = "atestfet" + native_denom = "atestasi" tx = pair_contract.execute( { diff --git a/examples/aerial_oracle.py b/examples/aerial_oracle.py index 5021ba36..2dcedc76 100644 --- a/examples/aerial_oracle.py +++ b/examples/aerial_oracle.py @@ -72,7 +72,7 @@ def main(): if not args.contract_address: instantiation_message = {"fee": "100"} - contract.deploy(instantiation_message, wallet, funds="1atestfet") + contract.deploy(instantiation_message, wallet, funds="1atestasi") print(f"Oracle contract deployed at: {contract.address}") diff --git a/examples/aerial_oracle_client.py b/examples/aerial_oracle_client.py index ab035de6..d903b127 100644 --- a/examples/aerial_oracle_client.py +++ b/examples/aerial_oracle_client.py @@ -79,7 +79,7 @@ def main(): while True: request_message = {"query_oracle_value": {}} contract.execute( - request_message, wallet, funds="100atestfet" + request_message, wallet, funds="100atestasi" ).wait_to_complete() result = contract.query({"oracle_value": {}}) diff --git a/examples/aerial_send_tokens.py b/examples/aerial_send_tokens.py index bb997022..e6ae9b5a 100644 --- a/examples/aerial_send_tokens.py +++ b/examples/aerial_send_tokens.py @@ -45,7 +45,7 @@ def main(): f"Bob Address: {bob.address()} Balance: {ledger.query_bank_balance(bob.address())}" ) - tx = ledger.send_tokens(bob.address(), 10, "atestfet", alice) + tx = ledger.send_tokens(bob.address(), 10, "atestasi", alice) print(f"TX {tx.tx_hash} waiting to complete...") tx.wait_to_complete() diff --git a/examples/aerial_stake_optimizer.py b/examples/aerial_stake_optimizer.py index 2bd0cd7b..e515bdd1 100644 --- a/examples/aerial_stake_optimizer.py +++ b/examples/aerial_stake_optimizer.py @@ -142,7 +142,7 @@ def main(): # Add delegate msg tx.add_message( - create_delegate_msg(alice_address, validator.address, initial_stake, "atestfet") + create_delegate_msg(alice_address, validator.address, initial_stake, "atestasi") ) # Add claim reward msg @@ -159,7 +159,7 @@ def main(): # simulate the fee for the transaction _, str_tx_fee = ledger.estimate_gas_and_fee_for_tx(tx) - denom = "atestfet" + denom = "atestasi" tx_fee = str_tx_fee[: -len(denom)] # Add a 20% to the fee estimation to get a more conservative estimate diff --git a/examples/aerial_swap_automation.py b/examples/aerial_swap_automation.py index 0953a628..2f63ec12 100644 --- a/examples/aerial_swap_automation.py +++ b/examples/aerial_swap_automation.py @@ -41,13 +41,13 @@ def swap_native_for_cw20(swap_amount, pair_contract, wallet): { "swap": { "offer_asset": { - "info": {"native_token": {"denom": "atestfet"}}, + "info": {"native_token": {"denom": "atestasi"}}, "amount": str(swap_amount), } } }, sender=wallet, - funds=str(swap_amount) + "atestfet", + funds=str(swap_amount) + "atestasi", ) print("swapping native for cw20 tokens") tx.wait_to_complete() @@ -86,7 +86,7 @@ def _parse_commandline(): type=int, nargs="?", default=1000000, - help="initial atestfet balance to perform swaps using the liquidity pool", + help="initial atestasi balance to perform swaps using the liquidity pool", ) parser.add_argument( "upper_bound", @@ -155,8 +155,8 @@ def main(): path=None, client=ledger, address=pair_contract_address ) - # tokens in trading wallet (currency will vary [atestfet,cw20] ) - currency = "atestfet" + # tokens in trading wallet (currency will vary [atestasi,cw20] ) + currency = "atestasi" tokens = args.trading_wallet # Swap thresholds @@ -176,15 +176,15 @@ def main(): native_amount = int(pool["assets"][1]["amount"]) cw20_amount = int(pool["assets"][0]["amount"]) - if currency == "atestfet": - # Calculate received cw20 tokens if atestfet tokens are given to LP + if currency == "atestasi": + # Calculate received cw20 tokens if atestasi tokens are given to LP tokens_out = round( ((cw20_amount * tokens) / (native_amount + tokens)) * (1 - commission) ) - # Sell price of atestfet => give atestfet, get cw20 + # Sell price of atestasi => give atestasi, get cw20 sell_price = tokens / tokens_out - print("atestfet sell price: ", sell_price) + print("atestasi sell price: ", sell_price) if sell_price <= lower_bound: swap_native_for_cw20(tokens, pair_contract, wallet) tokens = int( @@ -196,14 +196,14 @@ def main(): # Trading wallet currency changed to cw20 currency = "CW20" else: - # Calculate received atestfet tokens if cw20 tokens are given to LP + # Calculate received atestasi tokens if cw20 tokens are given to LP tokens_out = round( ((native_amount * tokens) / (cw20_amount + tokens)) * (1 - commission) ) - # Buy price of atestfet => give cw20, get atestfet + # Buy price of atestasi => give cw20, get atestasi buy_price = tokens_out / tokens - print("atestfet buy price: ", buy_price) + print("atestasi buy price: ", buy_price) if buy_price >= upper_bound: swap_cw20_for_native( tokens, pair_contract_address, token_contract, wallet @@ -211,7 +211,7 @@ def main(): tokens = tokens_out # Trading wallet currency changed to cw20 - currency = "atestfet" + currency = "atestasi" sleep(interval) diff --git a/examples/aerial_topup.py b/examples/aerial_topup.py index a70d0d50..c6dd8a6e 100644 --- a/examples/aerial_topup.py +++ b/examples/aerial_topup.py @@ -88,7 +88,7 @@ def main(): # Top-up amount amount = args.top_up_amount - top_up_amount = Coin(amount=str(amount), denom="atestfet") + top_up_amount = Coin(amount=str(amount), denom="atestasi") # Minimum balance for task_wallet minimum_balance = args.minimum_balance diff --git a/scripts/setup_fetchd.sh b/scripts/setup_fetchd.sh index 65879016..7f0907d0 100644 --- a/scripts/setup_fetchd.sh +++ b/scripts/setup_fetchd.sh @@ -30,7 +30,7 @@ echo "account snack twist chef razor sing gain birth check identify unable vendo # Configure node fetchd init --chain-id=testing testing fetchd add-genesis-account $(fetchd keys show validator -a) 100000000000000000000000stake -fetchd add-genesis-account $(fetchd keys show bob -a) 100000000000000000000000atestfet +fetchd add-genesis-account $(fetchd keys show bob -a) 100000000000000000000000atestasi fetchd gentx validator 10000000000000000000000stake --chain-id testing fetchd collect-gentxs diff --git a/tests/integration/test_contract.py b/tests/integration/test_contract.py index 808e96f5..5d28b27f 100644 --- a/tests/integration/test_contract.py +++ b/tests/integration/test_contract.py @@ -177,12 +177,12 @@ class TestContractRestAPI(TestContract): def _get_network_config(self): return NetworkConfig( - chain_id="dorado-1", - url="rest+https://rest-dorado.fetch.ai:443", + chain_id="eridanus-1", + url="rest+https://rest-eridanus-1.fetch.ai:443", fee_minimum_gas_price=5000000000, - fee_denomination="atestfet", - staking_denomination="atestfet", - faucet_url="https://faucet-dorado.fetch.ai", + fee_denomination="atestasi", + staking_denomination="atestasi", + faucet_url="https://faucet-eridanus-1.fetch.ai", ) diff --git a/tests/integration/test_tx.py b/tests/integration/test_tx.py index d98aaf34..27f49453 100644 --- a/tests/integration/test_tx.py +++ b/tests/integration/test_tx.py @@ -34,7 +34,7 @@ class TestTx: """Test Basic Transaction""" - COIN = "atestfet" + COIN = "atestasi" GAS_LIMIT: Optional[int] = None def _get_network_config(self): @@ -88,12 +88,12 @@ class TestTxRestAPI(TestTx): def _get_network_config(self): return NetworkConfig( - chain_id="dorado-1", - url="rest+https://rest-dorado.fetch.ai:443", + chain_id="eridanus-1", + url="rest+https://rest-eridanus-1.fetch.ai:443", fee_minimum_gas_price=5000000000, - fee_denomination="atestfet", - staking_denomination="atestfet", - faucet_url="https://faucet-dorado.fetch.ai", + fee_denomination="atestasi", + staking_denomination="atestasi", + faucet_url="https://faucet-eridanus-1.fetch.ai", ) diff --git a/tests/unit/test_aerial/coins_test.py b/tests/unit/test_aerial/coins_test.py index 87b37b91..7132d1d7 100644 --- a/tests/unit/test_aerial/coins_test.py +++ b/tests/unit/test_aerial/coins_test.py @@ -29,11 +29,11 @@ [ ("", []), (" ", []), - ("50000atestfet", [Coin(amount="50000", denom="atestfet")]), + ("50000atestasi", [Coin(amount="50000", denom="atestasi")]), ( - "50000atestfet, 200foobar", + "50000atestasi, 200foobar", [ - Coin(amount="50000", denom="atestfet"), + Coin(amount="50000", denom="atestasi"), Coin(amount="200", denom="foobar"), ], ), @@ -47,13 +47,13 @@ ], ), ( - "500ibc/0471F1C4E7AFD3F07702BEF6DC365268D64570F7C1FDC98EA6098DD6DE59817B, 50000atestfet", + "500ibc/0471F1C4E7AFD3F07702BEF6DC365268D64570F7C1FDC98EA6098DD6DE59817B, 50000atestasi", [ Coin( amount="500", denom="ibc/0471F1C4E7AFD3F07702BEF6DC365268D64570F7C1FDC98EA6098DD6DE59817B", ), - Coin(amount="50000", denom="atestfet"), + Coin(amount="50000", denom="atestasi"), ], ), ], diff --git a/tests/unit/test_aerial/contract/test_cosmwasm_handlers.py b/tests/unit/test_aerial/contract/test_cosmwasm_handlers.py index e4c623c0..748ec962 100644 --- a/tests/unit/test_aerial/contract/test_cosmwasm_handlers.py +++ b/tests/unit/test_aerial/contract/test_cosmwasm_handlers.py @@ -29,9 +29,9 @@ def test_create_instantiate_msg(): """Test create instantiate message.""" - sender = Address("fetch1r3d4azhlak4w00c5n02t9l35a3n6462vrnunel") + sender = Address("asi1r3d4azhlak4w00c5n02t9l35a3n6462vc388mu") msg = create_cosmwasm_instantiate_msg( - 1, {}, "init-label", sender, funds="10atestfet", admin_address=sender + 1, {}, "init-label", sender, funds="10atestasi", admin_address=sender ) assert msg.sender == str(sender) @@ -40,24 +40,24 @@ def test_create_instantiate_msg(): assert msg.label == "init-label" assert msg.admin == str(sender) assert len(msg.funds) == 1 - assert msg.funds[0].denom == "atestfet" + assert msg.funds[0].denom == "atestasi" assert msg.funds[0].amount == "10" def test_create_execute_msg(): """Test create execute message.""" - sender = Address("fetch1r3d4azhlak4w00c5n02t9l35a3n6462vrnunel") - contract = Address("fetch1faucet4p2h432pxlh9ez8jfcl9jyr2ndlx2992") + sender = Address("asi1r3d4azhlak4w00c5n02t9l35a3n6462vc388mu") + contract = Address("asi1faucet4p2h432pxlh9ez8jfcl9jyr2ndyy338f") msg = create_cosmwasm_execute_msg( - sender, contract, {}, funds="15atestfet,42another" + sender, contract, {}, funds="15atestasi,42another" ) assert msg.sender == str(sender) assert msg.contract == str(contract) assert msg.msg == b"{}" assert len(msg.funds) == 2 - assert msg.funds[0].denom == "atestfet" + assert msg.funds[0].denom == "atestasi" assert msg.funds[0].amount == "15" assert msg.funds[1].denom == "another" assert msg.funds[1].amount == "42" @@ -65,9 +65,9 @@ def test_create_execute_msg(): def test_create_migrate_msg(): """Test create migrate message.""" - sender = Address("fetch1r3d4azhlak4w00c5n02t9l35a3n6462vrnunel") + sender = Address("asi1r3d4azhlak4w00c5n02t9l35a3n6462vc388mu") contract_address = Address( - "fetch1j4t8vtg8dus7tpy6xrk9xnz5z4644qljeqtee2yw73ksvj3tqaeqp4pcec" + "asi1j4t8vtg8dus7tpy6xrk9xnz5z4644qljeqtee2yw73ksvj3tqaeqsdrk98" ) msg = create_cosmwasm_migrate_msg(1, {}, contract_address, sender) diff --git a/tests/unit/test_staking/test_rest_client.py b/tests/unit/test_staking/test_rest_client.py index 5d6c0004..362f361d 100644 --- a/tests/unit/test_staking/test_rest_client.py +++ b/tests/unit/test_staking/test_rest_client.py @@ -152,7 +152,7 @@ def test_ValidatorDelegations(): "validator_address": "fetchvalidator", "shares": "123", }, - "balance": {"denom": "atestfet", "amount": "12345"}, + "balance": {"denom": "atestasi", "amount": "12345"}, } ], "pagination": {"next_key": "", "total": "0"}, @@ -225,7 +225,7 @@ def test_Delegation(): "validator_address": "fetchvalidator", "shares": "123", }, - "balance": {"denom": "atestfet", "amount": "123"}, + "balance": {"denom": "atestasi", "amount": "123"}, } } mock_client = MockRestClient(json_encode(content)) @@ -294,7 +294,7 @@ def test_DelegatorDelegations(): "validator_address": "fetchvalidator", "shares": "123", }, - "balance": {"denom": "atestfet", "amount": "123"}, + "balance": {"denom": "atestasi", "amount": "123"}, } ], "pagination": {"next_key": "", "total": "0"}, @@ -600,7 +600,7 @@ def test_Params(): "max_validators": 0, "max_entries": 0, "historical_entries": 0, - "bond_denom": "atestfet", + "bond_denom": "atestasi", } } From f4c0d23d1b6f44c82663a0a3e4a6babf1d0c2575 Mon Sep 17 00:00:00 2001 From: Jiri Date: Mon, 10 Jun 2024 15:00:57 +0200 Subject: [PATCH 3/7] Changes --- .wordlist.txt | 3 ++- docs/staking.md | 2 +- docs/wallet-topup.md | 2 +- examples/aerial_swap_automation.py | 4 ++-- tests/integration/test_contract.py | 2 +- tests/unit/test_auth/test_rest_client.py | 2 +- tests/unit/test_clients/test_cosmos_ledger.py | 2 +- tests/unit/test_cosmwasm/test_rest_client.py | 2 +- tests/unit/test_crypto/test_address.py | 12 ++++++------ 9 files changed, 16 insertions(+), 15 deletions(-) diff --git a/.wordlist.txt b/.wordlist.txt index 9ee27559..e3c0f921 100644 --- a/.wordlist.txt +++ b/.wordlist.txt @@ -64,7 +64,7 @@ pb cosmoshub validator atestfet -aasi +atestasi denom wasm blockapsis @@ -82,6 +82,7 @@ Validators delegator validators afet +aasi ibcprotocol natively CosmWasm diff --git a/docs/staking.md b/docs/staking.md index 2e593332..aab3735a 100644 --- a/docs/staking.md +++ b/docs/staking.md @@ -72,7 +72,7 @@ tx.wait_to_complete() At any point you can query the stake information of any particular address. This can be done using the `LedgerClient` as shown in the example below: ```python -address = 'fetch1h2l3cnu7e23whmd5yrfeunacez9tv0plv5rxqy' +address = 'asi1h2l3cnu7e23whmd5yrfeunacez9tv0plhkcjz8' s = ledger_client.query_staking_summary(address) print(f"Summary: Staked: {s.total_staked} Unbonding: {s.total_unbonding} Rewards: {s.total_rewards}") diff --git a/docs/wallet-topup.md b/docs/wallet-topup.md index 5fb4038e..3b7aa19a 100644 --- a/docs/wallet-topup.md +++ b/docs/wallet-topup.md @@ -15,7 +15,7 @@ authz_wallet = LocalWallet( ) # Define any task_wallet address -task_wallet_address = 'fetch1ay6grfwhlm00wydwa3nw0x2u44qz4hg2uku8dc' +task_wallet_address = 'asi1ay6grfwhlm00wydwa3nw0x2u44qz4hg2858n0m' ``` Wallet will need to have enough tokens available to top-up task_wallet, and authz_wallet will need enough tokens to pay for transaction fees. Now you will need to give authorization to authz_wallet to send tokens from wallet. You will define the expiration and the spend limit of the authorization in `total_authz_time` and `spend_amount`. The code below shows how to perform this kind of transaction: diff --git a/examples/aerial_swap_automation.py b/examples/aerial_swap_automation.py index 2f63ec12..e60733c8 100644 --- a/examples/aerial_swap_automation.py +++ b/examples/aerial_swap_automation.py @@ -142,10 +142,10 @@ def main(): # Define cw20, pair and liquidity token contracts token_contract_address = ( - "fetch1qr8ysysnfxmqzu7cu7cq7dsq5g2r0kvkg5e2wl2fnlkqss60hcjsxtljxl" + "asi1qr8ysysnfxmqzu7cu7cq7dsq5g2r0kvkg5e2wl2fnlkqss60hcjshnau6q" ) pair_contract_address = ( - "fetch1vgnx2d46uvyxrg9pc5mktkcvkp4uflyp3j86v68pq4jxdc8j4y0s6ulf2a" + "asi1vgnx2d46uvyxrg9pc5mktkcvkp4uflyp3j86v68pq4jxdc8j4y0stya8kz" ) token_contract = LedgerContract( diff --git a/tests/integration/test_contract.py b/tests/integration/test_contract.py index 5d28b27f..4928517a 100644 --- a/tests/integration/test_contract.py +++ b/tests/integration/test_contract.py @@ -145,7 +145,7 @@ def test_contract_schema_validation(self): contract = LedgerContract( CONTRACT_PATH, self.get_ledger(), schema_path=SCHEMA_PATH ) - contract._address = "fetch1r3d4azhlak4w00c5n02t9l35a3n6462vrnunel" # pylint: disable=protected-access + contract._address = "asi1r3d4azhlak4w00c5n02t9l35a3n6462vc388mu" # pylint: disable=protected-access try: bad_query = {"get_count": 0} diff --git a/tests/unit/test_auth/test_rest_client.py b/tests/unit/test_auth/test_rest_client.py index dea183ff..918517a5 100644 --- a/tests/unit/test_auth/test_rest_client.py +++ b/tests/unit/test_auth/test_rest_client.py @@ -46,7 +46,7 @@ def test_query_account(): content = { "account": { "@type": "/cosmos.auth.v1beta1.BaseAccount", - "address": "fetch1h6974x4dspft29r9gyegtajyzaht2cdh0rt93w", + "address": "asi1h6974x4dspft29r9gyegtajyzaht2cdh5ps3nd", "pub_key": { "@type": "/cosmos.crypto.secp256k1.PubKey", "key": "A2BjpEo54gBpulf9CrA+6tGBASFC8okaO1DYTimk/Jwp", diff --git a/tests/unit/test_clients/test_cosmos_ledger.py b/tests/unit/test_clients/test_cosmos_ledger.py index 596ff609..d4eb784f 100644 --- a/tests/unit/test_clients/test_cosmos_ledger.py +++ b/tests/unit/test_clients/test_cosmos_ledger.py @@ -536,7 +536,7 @@ # content = { # "account": { # "@type": "/cosmos.auth.v1beta1.BaseAccount", -# "address": "fetch1h6974x4dspft29r9gyegtajyzaht2cdh0rt93w", +# "address": "asi1h6974x4dspft29r9gyegtajyzaht2cdh5ps3nd", # "pub_key": { # "@type": "/cosmos.crypto.secp256k1.PubKey", # "key": "A2BjpEo54gBpulf9CrA+6tGBASFC8okaO1DYTimk/Jwp", diff --git a/tests/unit/test_cosmwasm/test_rest_client.py b/tests/unit/test_cosmwasm/test_rest_client.py index bb0e8c30..aad91df1 100644 --- a/tests/unit/test_cosmwasm/test_rest_client.py +++ b/tests/unit/test_cosmwasm/test_rest_client.py @@ -188,7 +188,7 @@ def test_query_contract_info(): def test_query_contract_by_code(): """Test query contract by code for positive result.""" content = { - "contracts": ["fetch18vd8fpwxzck93qlwghaj6arh4p7c5n890l3amr"], + "contracts": ["asi18vd8fpwxzck93qlwghaj6arh4p7c5n895a2feq"], "pagination": {"total": "1"}, } diff --git a/tests/unit/test_crypto/test_address.py b/tests/unit/test_crypto/test_address.py index fb7510b8..b5d92587 100644 --- a/tests/unit/test_crypto/test_address.py +++ b/tests/unit/test_crypto/test_address.py @@ -36,8 +36,8 @@ def test_create_from_public_key(self): b"\x02W\xbe\xe2\x08\xdc\x80(\xd2\xd0C\xbe\xe0{\x02\x81\xa6\xf9Y\x19\x0e\xd1\x8a*\x99\x84\xd6e\x07\x99\x8d\x96h" ) address = Address(pk) - self.assertEqual(str(address), "fetch12hyw0z8za0sc9wwfhkdz2qrc89a87z42py23vn") - self.assertEqual(address, "fetch12hyw0z8za0sc9wwfhkdz2qrc89a87z42py23vn") + self.assertEqual(str(address), "asi12hyw0z8za0sc9wwfhkdz2qrc89a87z426x39ws") + self.assertEqual(address, "asi12hyw0z8za0sc9wwfhkdz2qrc89a87z426x39ws") self.assertEqual( bytes(address), b"U\xc8\xe7\x88\xe2\xeb\xe1\x82\xb9\xc9\xbd\x9a%\x00x9z\x7f\n\xaa", @@ -56,11 +56,11 @@ def test_create_from_bytes(self): address = Address( b"U\xc8\xe7\x88\xe2\xeb\xe1\x82\xb9\xc9\xbd\x9a%\x00x9z\x7f\n\xaa" ) - self.assertEqual(str(address), "fetch12hyw0z8za0sc9wwfhkdz2qrc89a87z42py23vn") + self.assertEqual(str(address), "asi12hyw0z8za0sc9wwfhkdz2qrc89a87z426x39ws") def test_create_from_str(self): """Test create Address from string with positive result.""" - address = Address("fetch12hyw0z8za0sc9wwfhkdz2qrc89a87z42py23vn") + address = Address("asi12hyw0z8za0sc9wwfhkdz2qrc89a87z426x39ws") self.assertEqual( bytes(address), b"U\xc8\xe7\x88\xe2\xeb\xe1\x82\xb9\xc9\xbd\x9a%\x00x9z\x7f\n\xaa", @@ -78,7 +78,7 @@ def test_invalid_bech32_address(self): def test_address_from_address_with_custom_prefix(self): """Test create an Address from another but with a custom prefix.""" - address = Address("fetch12hyw0z8za0sc9wwfhkdz2qrc89a87z42py23vn") + address = Address("asi12hyw0z8za0sc9wwfhkdz2qrc89a87z426x39ws") val_address = Address(address, prefix="fetchvaloper") self.assertEqual( str(val_address), "fetchvaloper12hyw0z8za0sc9wwfhkdz2qrc89a87z42yq4jl5" @@ -86,7 +86,7 @@ def test_address_from_address_with_custom_prefix(self): def test_string_compatible_address(self): """Test address can be dumped to json using json_encode utility method.""" - address = Address("fetch12hyw0z8za0sc9wwfhkdz2qrc89a87z42py23vn") + address = Address("asi12hyw0z8za0sc9wwfhkdz2qrc89a87z426x39ws") json_data = json_encode({"address": address}) restored_address = Address(json.loads(json_data)["address"]) assert restored_address == address From fadff40ce52e9a0cb0444bfa9d7fafd650722b06 Mon Sep 17 00:00:00 2001 From: Jiri Date: Mon, 10 Jun 2024 15:26:33 +0200 Subject: [PATCH 4/7] apidocs --- docs/api/aerial/config.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/docs/api/aerial/config.md b/docs/api/aerial/config.md index aa4444f6..27c1e220 100644 --- a/docs/api/aerial/config.md +++ b/docs/api/aerial/config.md @@ -63,6 +63,21 @@ Fetchai dorado testnet. Network configuration + + +#### asi`_`eridanus`_`testnet + +```python +@classmethod +def asi_eridanus_testnet(cls) -> "NetworkConfig" +``` + +ASI Eridanus testnet. + +**Returns**: + +Network configuration + #### fetchai`_`alpha`_`testnet From 5892f1b429c88cae5b91a1c287c2849b2a1e22fc Mon Sep 17 00:00:00 2001 From: Jiri Date: Mon, 10 Jun 2024 15:36:38 +0200 Subject: [PATCH 5/7] wordlist fix --- .wordlist.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.wordlist.txt b/.wordlist.txt index e3c0f921..db465930 100644 --- a/.wordlist.txt +++ b/.wordlist.txt @@ -55,6 +55,7 @@ hashlib mainnet chain_id dorado +eridanus ibc tendermint tx @@ -258,6 +259,8 @@ december mykeyname xxd fetchvaloper +asivaloper +asi PyCQA blueviolet lightgrey From 9f9ef9942b1ea0b87da949771c26aeeda3a747d8 Mon Sep 17 00:00:00 2001 From: Jiri Date: Mon, 10 Jun 2024 16:00:00 +0200 Subject: [PATCH 6/7] Changed fetchhub config denoms --- cosmpy/aerial/config.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cosmpy/aerial/config.py b/cosmpy/aerial/config.py index 0ca5887c..079ddc3c 100644 --- a/cosmpy/aerial/config.py +++ b/cosmpy/aerial/config.py @@ -140,8 +140,8 @@ def fetchai_mainnet(cls) -> "NetworkConfig": chain_id="fetchhub-4", url="grpc+https://grpc-fetchhub.fetch.ai", fee_minimum_gas_price=0, - fee_denomination="afet", - staking_denomination="afet", + fee_denomination="aasi", + staking_denomination="aasi", faucet_url=None, ) From 2b8f84959aaacb11d5f0c01fada6b7252c9778f1 Mon Sep 17 00:00:00 2001 From: Jiri Date: Tue, 18 Jun 2024 12:06:23 +0200 Subject: [PATCH 7/7] fetchhub to asi change --- cosmpy/aerial/config.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cosmpy/aerial/config.py b/cosmpy/aerial/config.py index 079ddc3c..788697cf 100644 --- a/cosmpy/aerial/config.py +++ b/cosmpy/aerial/config.py @@ -137,8 +137,8 @@ def fetchai_mainnet(cls) -> "NetworkConfig": :return: fetch mainnet configuration """ return NetworkConfig( - chain_id="fetchhub-4", - url="grpc+https://grpc-fetchhub.fetch.ai", + chain_id="asi-1", + url="grpc+https://grpc-asi.fetch.ai", fee_minimum_gas_price=0, fee_denomination="aasi", staking_denomination="aasi",