Code Monkey home page Code Monkey logo

andromeda.js's Introduction

 

About

The Andromeda.js repository contains two packages:

  • Andr.js: JavaScript SDK for writing applications that interact with the Andromeda ecosystem.
  • CLI: Used to interact with the Andromeda ecosystem and any of the chains Andromeda is deployed on.

Licensing

License

Terms and Conditions

andromeda.js's People

Contributors

crnbarr93 avatar slayeransh avatar leifasorensen avatar arun567 avatar daniel-wehbe avatar danielrea avatar cowboy0015 avatar

Stargazers

Myron Koch avatar

Watchers

Cody Marx Bailey avatar Michael avatar Jean-Michel Saulnier avatar  avatar

Forkers

0xgoerlimainnet

andromeda.js's Issues

Execute message prompts

When I run ado execute then select an execute message from the list, I am prompted for the information for the message that is above the selected one. For example if I select TransferNft from the messages, I will be prompted for a mint as it is above it in the list.

Wallet Input Passphrase Disclosed

Issue

When adding a wallet, part of the process requires inputing a passphrase into a hidden field. The output line which appears between it and the re-prompt prints the entered value (which should be private) to the terminal.

In this example (below) the passphrase of "disclosed" is visible.

Example and Version Info

Example

Screenshot 2023-04-26 at 9 48 03 PM

Version Info

ANDR.JS CLI 0.2.5
NodeJS 18.14.0

Webapp suggestion - clarify warning on the Cw20 Exchange component

CW20 exchange ado builder: it auto-names the token component in 2 places (in the CW20 component's name, then again under the Cw20 Exchange's Token Address. However...

When path isn't changed, an error warning appears on the Cw20 Exchange component saying "not a valid local vfs path," but perhaps it should say something like "change this to the address of the cw20 token ADO you're selling."

Screenshot 2023-09-28 at 9 29 06 PM
Screenshot 2023-09-28 at 9 29 16 PM

Getting errors on CLI when changing chain or wallet

After updating CLI, when changing chains or wallets, I now get the following error

? AndromedaTest1@galileo-3> wallet use
? Select wallet to use: AndromedaTest1

  • Connecting client...TypeError: signer.getAccounts is not a function
    at CosmClient.connect (/usr/local/lib/node_modules/@andromedaprotocol/cli/node_modules/@andromedaprotocol/andromeda.js/dist/clients/CosmClient.js:17:44)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async AndromedaClient.connect (/usr/local/lib/node_modules/@andromedaprotocol/cli/node_modules/@andromedaprotocol/andromeda.js/dist/AndromedaClient.js:44:9)

Screenshot 2023-09-15 at 4 00 34 PM
Screenshot 2023-09-15 at 4 00 04 PM

Adding a BlockHeight and Timestamp queries.

To get the block height, you would need to find an rpc and check it and for the timestamp you need to use some online unix timestamp. As ive been working in CLI, I think being able to query these from CLI would be nice to have.

Attaching funds to messages

When we run ado execute, we need to attach the funds directly or the message will error in the end as no funds were provided (Fund attachment is not prompted). When using the CLI this turned out to be a bit inconvenient, so we suggest being prompted for fund attachments in messages that require so.

Add Version Number to CLI Crash Logs

Issue

If a program crash were to occur for the CLI the current information displayed (including recommended support/reporting information) is not inclusive of the current version number of the CLI. This might be critical for assistance in diagnostics if some launching conflict were to be encountered and making it more difficult for the user to determine the version which they are using.

See crash logging at:

console.log("OOPS! Looks like the program crashed");
for where to apply adjustments.

Uploading a contract to injective

Getting the following error: Transaction was not included in a block before timeout of 60000ms
This is probably a problem from the injective side, but put an issue to keep track of it.
Screen Shot 2023-07-19 at 5 51 22 PM

bank balance

When we run "bank balance" we are prompted for denom and address. If we kept the address empty, it used to query the balance for the connected wallet. I am getting the error invalid address when I keep the address field empty. If I specify it, it works fine. Not sure if we changed it to work this way or this is a bug.

Fund attachments

We are asked if we want to attach funds in all messages instead of only the ones that need funds. This might be confusing for a user.

Command: ado factory address

When we run " ado factory address" we get the factory address used by the chain. The command works for the first chain we query the address for, but if I change the chain, then running " ado factory address" gives the same factory address of the first chain we queried.
Example:
Run "ado factory address"
Run " chain use [another-chain]
Run again "ado factory address"
The address returned will be wrong.

Command: wallets rm

If I run " wallets rm" we are prompted to chose the mnemonic of the wallet we want to remove. When chosen, it error:Could not find wallet with name/address ....

ado execute prompts

when we run ado execute and select a message, we are prompted for the message above the selected one. For example if I select TransferNFT from the CW721 messages, I am prompted for a mint since it is above it in the options.

Error when executing SetValue on a primitive

When I run ado execute on a primitive and then select the Set Value execute, the CLI runs for a while then aborts with the following error: FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory

Screen Shot 2023-02-19 at 5 34 25 PM

Gas Fee Estimation

Andromeda Client using incorrect GasPrice value, gas fee estimate must match the broadcast cost approximately

Uploading a contract to terra-2

Getting the following error when trying to upload a contract to terra testnet: Query failed with (6): rpc error: code = Unknown desc = account sequence mismatch, expected 30, got 29: incorrect account sequence [cosmos/[email protected]/x/auth/ante/sigverify.go:269] With gas wanted: '50000000' and gas used: '2346768' : unknown request
Screen Shot 2023-07-19 at 4 51 00 PM

Also creating a new wallet and requesting funds from faucet do not show in CLI. It gives the error, wallet does not exist, try sending some tokens but on explorer the wallet exists and has tokens . Not sure if both problems are related.

Unable to exit a command

When you run a command, we are prompted for the required inputs. If I enter a command by mistake and start getting prompted, there is no way of canceling it or going back. This does not happen to all commands as some exit the command when a wrong input is entered (eg ado execute, ado query..) but for others it does not.
Example:
"ado create"
When promted for the type, the only way to return is inputing a correct type or exiting the CLI (Ctrl+C).

Command chain set

Part 1: If I start the CLI (Default chain used uni3) and run "chain set name uni4", the name is changed in config but when I run chain list "uni3 still appears". Now if I change chain, it works. So running
1-" chain use elgafar1"
2- "chain use uni3"
3- "chain set name uni4"
This would work and "chain list" will show uni4.
Part 2: When the name is changed, if I exit the cli and start it again, the default names are back.

Command: ado primitive set

The command fails after inputing the required information ( contract address, key, value, type). Error:insufficient fees; got: 2000uandr required: 12500ujunox: insufficient fee. This is trying it with uni3 testnet.

Extension query in CW721

Running ado query, then selecting the extension query runs for a while then crashes the CLI with error:
FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory

Infinite Prompt for Modules

When prompted " would you like to add module" for cases where modules can be added, if you input yes, you are never asked if you want to add another module but it keeps prompting the same fields.
Screen Shot 2023-02-15 at 7 21 27 PM

webapp - Blank Canvas vs Empty Project

Harmonize the terms "blank canvas" and "empty project" by simply changing the subheader in the Empty Project UI component to "a blank canvas to start from scratch with"
Screenshot 2023-09-27 at 6 03 26 PM

Command: chain rm

To delete a saved config, we should run "chain rm ". If I run "chain rm" we are prompted to chose the config to remove which works fine. If I run "chain rm I am prompted to chose the config to remove instead of removing it directly.

Default values for Bank Balance query

When querying bank balance, user has to input denom and address for the wallet he wants to know the balance. However, most of the time user wants to know his wallet balance on the current chain client is connected to. It will be better for user experience if fields for denom and address are preloaded for the current client connected so user can easily check his wallet balance.

image

Feature Request:

  • Add current chain gas fee denom as default value for bank->balance->denom field
  • Add current wallet address as default value for bank->balance->address field

Wallet Encoding Conflicts with Wallet Generation

Describe the bug
It needs to be confirmed, but it appears that there may be an encoding conflict when generating a terra wallet address in the CLI. Generated addresses do not appear to be consistent with the addresses which are seen in Keplr and TerraStation for the same key.

This is likely due to a variance in the encoding scheme used. The CLI employs bech32 for address generation, and is likely not the same as found in previously mentioned sources. A review of the encoding schema for those sources would confirm this assumption.

This can produce some interesting conflicts, as some functionality is still operable with different addresses, but likely creates conflicts in permission assignments, block explorer references, and potentially fund allocation retrievals.

Error Code
N/A

To Reproduce
Steps to reproduce the behavior:

  1. Generate a new wallet and address for Terra using CLI (retaining key phrase)
    2.Add this wallet (using the retained key phrase) to Keplr and or TerraStation
  2. Confirm that the wallet addresses do or do not match across each platform
  3. Try the inverse of this process using wallet add --recover

Expected behavior
Generation of wallet addresses, no matter which source, (from those mentioned) should be consistent.

Screenshots
N/A

Environment (please complete the following information):

  • OS: Mac OS Version 14.2.1
  • Version CLI-0.3.8
  • Chain Terra

Additional context
Closing a previous Issue reported which is believed to be related.

CLI > "chain use" load error on Juno

Describe the bug
When trying to switch to Juno using the chain use cmd there is a pre-loaded error which shows when config is loaded (screenshot attached). All operations seem to appear to work correctly even after the notice, but a review on the warning/error has not been performed at this time.

Error Code
Screenshot 2024-02-14 at 11 34 31 AM

To Reproduce
Steps to reproduce the behavior:

  1. Use chain use
  2. select juno-testnet from selection options

Expected behavior
No config errors reported on load

Screenshots
See error section above

Environment (please complete the following information):

  • OS: macOS Sonoma 14.3.1 (23D60)
  • Version: CLI 0.3.8
  • Chain:Juno Testnet / uni-6

Passphrase Mismatch Fault

Prompting failure on passphrase mismatch

When trying for wallet add prompt: failing to correctly enter the same passphrase triggers a passphrase mismatch warning, but also halts prompting and the CLI is required to be reset.

Screenshot 2023-02-09 at 8 57 05 AM

Potential Escape Mechanism Enforcement Conflict with Seed Phrase Confirmation

Describe the bug
There is an escape override conflict with wallet add <name> if the seed phrase were ever to include the word exit. This is because the current prompt escape sequence uses a single instance of exit or .exit as an escape mechanism to terminate a current prompt sequence.

This could possibly also occur with the process found with the use of the --recover flag.

This could be resolved by:

  • enforcing the also acceptable escape flag of .exit as the only valid escape flag (removing support for exit)
  • creating an exception to circumvent the escape mechanism if the call is operating within the seed phrase confirmation prompt (which may be more complicated and harder to implement and requires further tracking on our part as applying exceptions to the operational rules should be properly documented and noted).
  • reject seed phrases that have been generated with the use of the word exit (would not be able to be applied to the --recover flag)

Error Code
N/A

To Reproduce
Steps to reproduce the behavior:

  1. Setup a wallet using the wallet add command
  2. Type exit as one of the confirmation word values when prompted

Expected behavior
Being able to use the word 'exit' as a word, in the possibility that it were to be a part of generated seed phrase.

Screenshots
N/A

Environment (please complete the following information):

  • Version: CLI 0.3.8
  • Chain: Any

Additional context
Discovery credits to @daniel-wehbe

Command: chain list

The list of chains shows 2 uni3 options instead of 1.
Run "chain list"
You will see that uni3 is listed twice instead of once.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.