-
Notifications
You must be signed in to change notification settings - Fork 5.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fuelup and forc vision and development target #423
Comments
# Running a Node
forc start --local
Fuel node started...
Node w/ GraphQL Running at: http://localhost:3000/graphql
# List the Fuel nodes running
forc list
Num PID Name
[0] 647 fuel-core-plus
# Stop a Fuel node
forc stop 0 |
Different commands should be segmented instead of all being in the same namespace. E.g. instead of |
@adlerjohn was thinking the same thing, good call.
|
Largely dup of #27, should transclude example usage into there. |
@adlerjohn yes, what I propose above is somewhat lighter task wise than some of those. I.e. things we can get done within the next few months. Some of the IDE work is very specific and likely requires a lot of speciality stuff. |
Initially we can start with just private key creation, then move to seed based creation and recovery after. Forc should come with designated test keys, those test keys should be available in all SDK's and clients. All Fuel wallets should test for those keys, and prevent sending to them on main networks. This is something Ethereum didn't do, and many lost a fortune sending to test keys accidentally. # Will Create a New Wallet.
forc wallet new
Please enter a password to encrypt this private key:
[enter once]
Please re-enter:
[enter again]
# Will list the wallets available.
forc wallet list
Num. Address.
[0]. 0xabc...dbne
# Will clear a wallet from temporary storage.
forc wallet clear [number] |
Some wallet inspiration here from Foundry: Adjustments from above idea: # Generate a new Wallet.
forc wallet new
Please enter a password to encrypt this private key:
[enter once]
Please re-enter:
[enter again]
# Add a wallet from a private key.
forc wallet from <private key>
Please enter a password to encrypt this private key:
[enter once]
Please re-enter:
[enter again]
# Verify a Signature of a Specific Wallet
forc wallet verify <wallet number> <hash> <signature>
# Sign a Hash
forc wallet sign <wallet number> <hash>
# Get the Address of a Wallet
forc wallet address <wallet number>
# Will list the wallets available.
forc wallet list
Num. Address.
[0]. 0xabc...dbne
# Will clear a wallet from storage.
forc wallet clear <wallet number> |
This should probably never be allowed, as writing a private key on the CLI will make it available in the shell history, among other things. |
@adlerjohn for test keys it's actually totally fine with a warning, but I believe we could just make it a password prompt which would not save it in Shell history. So we could just have: forc wallet from
... then prompt password field for private key -- with warning... |
For password based encryption we can use a module like this:
Standard crypto for password based encryption. |
Forc should also include an address book. Design reference: https://twitter.com/gakonst/status/1479426663301754886 The above uses Etherscan, we can eventually have our own system to import and internalize foreign projects that are published. As well, adding the ability to import Forc projects, abi's and also name those and use them in Proposed / idea for bike shedding: # Add an address
forc address add <name> <address>
# List all addresses
forc address list
# Remove address
forc address rm <name>
# Import a set of addresses
forc address import <path to csv> Calling contracts proposal (similar to Foundry): forc abi import <name> <path to json file>
forc call <abi name> <address or address name> <method name> <arg[n]> <network or node ID> In use: forc abi import token token.abi.json
forc call token dai totalSupply The above requires the ABI, so it would be more build related. There is likely a better API design than above but just dreaming here a bit. |
With all these new forc functionalities, we should start putting them in helper crates. There’s no reason things like the address book need to be completely implemented in the forc crate itself. My two cents. |
Please open a separate issue for each proposal. |
@adlerjohn great idea, happy to make all these into about 10 issues. |
The text was updated successfully, but these errors were encountered: