Making ETH transfers in Azure Blockchain Workbench

MVP

Has anybody done a payment on ABC Workbench?

I mean, <address>.transfer(amount)

 

When trying a transfer, I get this error message:

This is taking longer than expected.

 

Questions:

  • How do I find the address of a user account so I can check their ETH balance with Metamask?
  • What is the Ethereum RPC endpoint that I can use in Metamask to access my Ethereum ledger?
  • How do I transfer ETH from a user to another one?

 

The code I'm using is:

 

address public Gambler;
address public Bookmaker;

function PlaceBet(string score, uint256 amount) public payable
    {
        if (amount == 0)
        {
            revert();
        }

        if (msg.sender.balance < amount)
        {
            revert();
        }

        if (msg.sender == Bookmaker)
        {
            revert();
        }

        BetScore = score;
        BetAmount = amount;
        State = StateType.BetPlaced;

        Gambler = msg.sender;

        // THESE BOTH FAIL
        // Transfer amount to the Smart Contract account
        address(this).transfer(amount);

       // Transfer amount to the Bookmaker
       Bookmaker.transfer(amount);
       
        ContractUpdated("PlaceBet");
    }
9 Replies

Did you figure out how to do? I could not connect via metamask 

You can't. There is no wallet in Azure Blockchain Workbench as it runs on Ethereum PoA (Proof of Authority) consensus, instead of PoW. Thus, there is no mining of blocks and, therefore, no need for currency compensation. Payments in ETH are not possible.

@Stefano TempestaWhen using the istanbul consensus default setup for the azure blockchain service... (poa) it should still have access to blocks.. or "eth" even though deploying contracts is 0 gas.. What if in the use case that an end user needs to purchase tokens on this network? I should be able to send them 'eth' and then they can choose which tokens on the chain they want to purchase.. via smart contracts etc. Right now as owner of the chain I cannot do that. The member has 0 'eth' and the blocks that are minted go absolutely no where in the default setup. Why is that???

Hi @AaronSnobel from what I know, this version of Ethereum has been deprecated by Microsoft and no longer available as an option in Azure. Also Azure Blockchain Workbench has moved away from Ethereum PoS, so at this point making ETH payments in Azure Blockchain doesn't seem to be an option at all.

I guess the overall rationale is that crypto payments on a private blockchain network is not a requirement for businesses, which is the target audience for Azure Blockchain.

@Stefano TempestaThanks! But that doesn't really answer my question here. The problem is not the workbench but the service itself. The blockchain has its own currency if you will I will call it "ETH" in quotes. That currency is the base value of the private chain.. without it all users are supposed to do is receive tokens.. Or other biz use cases.. But shouldnt the chain be able to provide base currency??! I mean isn't that what the blockchain was first designed for? BTC much? For quorum I under the poa/pow concepts quite well.. but still it doesnt make any sense for their to be transaction nodes minting blocks unless those blocks are put to use.. like traded back n forth in a transactional sense. Maybe my take on the istanbul consensus and quorum is warped...or the service as provided in its default config is not at all on par with the expectations of the users?

...To be clear the question by the op doesn't make sense.. It is not the workbench that is the issue here but the blockchain service . the one in preview.. not deprecated. Utilizing the istanbul consensus...the default genesis block does not preallocate accounts nor does it offer the ability. So if you hook metamask up tot he secure rpc endpoint all you'll ever see is 0 eth in that wallet/account. In a poa chain that might not be necessary but I still see a point where access to those minted blocks would be needed. Please enlighten me if you truly understand my problem here...

..And more importantly if you were to take a look at the goeth - consensys/cakeshop app by default in a poa setup it does preallocate accounts.
The use cases azure expects for the public to use the 'azure blockchain service (preview)' is for businesses that intend to use just contracts and just for their own purposes.. as in no primary blocks. Such that companies will only ever store and retrieve data from the chain as opposed to making transactions on the chain.


@AaronSnobel  I think you nailed the problem here. Azure Blockchain is not designed for cryptocurrency transactions. I don't know why the Microsoft product group took this decision, I can only think that they want to avoid resource intensive mining.

I wish someone from Microsoft could read this thread and answer...