Code Monkey home page Code Monkey logo

Comments (9)

caleteeter avatar caleteeter commented on May 22, 2024 1

Thanks for the additional details @xtianus79. We are actually tracking some changes to a dependent extension that is cause some exception. We should have this resolved by tomorrow.

On the wallet, the goal we were striving for was to make this as easy as possible, which is not easy, to allow it work with zero configuration. That being said, it does then create a black box as you mentioned. Basically what we are doing is just automating the use of the truffle-hdwallet-provider. So if you are using the Basic Project type, it will download a basic project template (unbox for a template that we created) and it will then install the hdwallet-provider. Then when a user deployed to a non-local network it will prompt for a mnemonic (to keep this out of the configuration file).

To install this manually, you can simply use unbox or create your own project (or use basic as a good starting point). You can then do this:

  • Create a fresh package.json configuration file: npm init -y
  • Install the truffle-hdwallet-provider: npm i --save @truffle/hdwalletprovider
  • Create you own mnemonic or import from wallets such as MetaMask.

Keep in mind the goal here is rapid developer productivity but setting up a configuration that can be adjusted for production. Likely developers will not be pushing changes directly from an IDE such as VS Code to production. So the goal is make this fast and allow the configuration to be open to plugging in other wallets for key management.

I will keep you posted on the breaking update (and we have a new update to our extension in the next few days as well).

from vscode-azure-blockchain-ethereum.

caleteeter avatar caleteeter commented on May 22, 2024

Hi @xtianus79, this sounds like the extension didn't activate successfully. Few things:

  • When you start the VS Code and this extension is activated ( you can activate by expanding the Azure Blockchain view on the left left navigation pane ), are you prompted with our requirements page that it does not see all prerequisites installed?
  • If you are seeing node-gyp errors (and running Windows), it could be possible the C++ compiler required for the wallet is conflicting. The underlying package in keccak is causing this, but should revert back to JS version and work.

Few things we can do here to check more:

  • What version of the extension are you running?
  • What version of Windows are you running?
  • What version of Truffle and Ganache are you running:
truffle version
ganache-cli --version
node --version
  • Which box were you unboxing that errored?

from vscode-azure-blockchain-ethereum.

xtianus79 avatar xtianus79 commented on May 22, 2024

@caleteeter These are the versions you asked for:
Truffle v5.1.18
Ganache CLI v6.9.1 (ganache-core: 2.10.2)
node: v10.16.0

Also, how do I setup the wallet myself? It's completely black-boxed from my interaction with it. The problem with this workflow is I can't even interact with a user based on a wallet because I don't have knowledge of how the wallet is setup and used and with what ethereum?

The workflow can't be the workbench app ui. That's just not a feasible abstraction. However, what is good from it is the users from AD credentials and role assignments. Still, the inner workings of how that occurs shouldn't be black-boxed away from the developer.

I am getting the gyp-error. I've followed the instructions to use the kit but it's failing for every box. The only box the works is the digital locker.

And my issue with even using the VS code abstractions is that there is not understanding of users with addresses and keys in order to role them into the application when it does work.

from vscode-azure-blockchain-ethereum.

xtianus79 avatar xtianus79 commented on May 22, 2024

@caleteeter That's great thank you. Can you explain how to use the hdwallet with the blockchain service? Is there any type of visualizer for this? And when the contract is deployed either locally or to the network service is there is just 1 address that is acting upon the contract? The reason why I ask is there is not a real way to do roles at that point. Is this the correct way to think about that.

What I wish is that the metamask wallet interacted with the local VS code development and then when you deploy you can use an official wallet.

*** The reason for the ask is this and it's my other question. How can I provide a wallet for people to authenticate against? Again, the way workbench does it is really convenient but I don't know what's going on to achieve a like system. Meaning, I would like to have people authenticate in and be assigned a role with a public address and private keys I assume to their wallet. In the block-chain abstraction it just looks like AD credentials.

I don't mind setting up a data store to track public keys/addresses and roles which is what I think you would have to do. Again, how can I on my private network get people into the wallet so they can be apart of my network if they authenticate in.

from vscode-azure-blockchain-ethereum.

PatAltimore avatar PatAltimore commented on May 22, 2024

Hi @xtianus79,

I don't know if this will work for your scenario. For AD authentication with Azure Blockchain Service, see https://docs.microsoft.com/en-us/azure/blockchain/service/configure-aad.

Thanks,
Pat

from vscode-azure-blockchain-ethereum.

xtianus79 avatar xtianus79 commented on May 22, 2024

Hi @PatAltimore / @caleteeter I've gone through the source code for the truffle hdwallet and essentially it is just using ethereum wallet. One quick comment about the npm package that is downloaded for version 1.0.17 <<< this npm package is totally different than the github repo. That's not really open-source as you can't even fork it and run it. It's actually kind of bizarre. I know it's not your repo but it is a dependency needed to deploy a contract onto the network.

So with a mnemonic I got it working and I can connect a metamask wallet and interact with a contract on the network. However, assigning roles to a said wallet that has either a printout of accounts which effectively be something akin to this parameter setting.

class HDWalletProvider {
  constructor(
    mnemonic,
    provider,
    address_index = 0,
    **num_addresses = 1,**

But I don't know what the addresses would be if I choose per se multiple addresses. Also, assigning the metamask wallet to the rpc network will create accounts on the fly but I am not sure how those are exactly created and why there allowed to interact on the network. Again, assigning a particular user a role is what I am looking to do.

from vscode-azure-blockchain-ethereum.

caleteeter avatar caleteeter commented on May 22, 2024

Yes I believe Truffle has moved to a mono repo and this package we are using has been deprecated (https://www.npmjs.com/package/truffle-hdwallet-provider). We need a bit of time to move this over there as well.

Keep in mind using the technique like mnemonics you can create as many accounts as you like, because they are not really "created", they are just a function of the math used by the seed phrase. So using the right curve you can find key pairs to use. The net result is the ability to have as many accounts as you like but you don't even need to the network until you need to do a transaction.

For the dynamic addresses sure, but the goal here was again to make this easy for deployment. We have been thinking about this as part of the Infura work because once you get to public networks you will need Eth and hence will need to know the address to fund it. One thing we have been discussing is using a faucet to drip some ether there so that your transactions in the IDE will have enough to perform transactions.

On the role assignment you are asking about, do you mean you would like to have dev "profiles" that have static address/ether to be used by the developer? A specific mnemonic is the account. So you have multiple of these if you like and use them when you like. We will inject the file path to where they live to the network configuration.

Also, we pushed some changes to both our extension today (mostly new features) and Juan pushed some changes to the Solidity extension which was breaking the extension a few days back. Wondering if you get the latest on these if all is working ok now (missing commands).

from vscode-azure-blockchain-ethereum.

caleteeter avatar caleteeter commented on May 22, 2024

@xtianus79 just touching base, can you let us know if you are still having problems with the extension. Again, thanks for the feedback and we will get the wallet updated to latest truffle version as well!

from vscode-azure-blockchain-ethereum.

caleteeter avatar caleteeter commented on May 22, 2024

Closing for now, please reopen if you have this issue persist.

from vscode-azure-blockchain-ethereum.

Related Issues (20)

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.