Forum Discussion

Stefano Tempesta's avatar
Jun 24, 2018

Making ETH transfers in Azure Blockchain Workbench

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");
    }
    • 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.
      • AaronSnobel's avatar
        AaronSnobel
        Copper Contributor

        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???

Resources