Skip to content
This repository has been archived by the owner on Nov 13, 2020. It is now read-only.

Workbook explaining pending transactions #34

Open
juanfranblanco opened this issue May 9, 2018 · 1 comment
Open

Workbook explaining pending transactions #34

juanfranblanco opened this issue May 9, 2018 · 1 comment

Comments

@juanfranblanco
Copy link
Member

Nethereum/Nethereum#279

@juanfranblanco
Copy link
Member Author

public class PendingTransactionsSample
{
public static string PrivateKey = "0xb5b1870957d373ef0eeffecc6e4812c0fd08f554b37b233526acc331bf1544f7";
public static string Address = "0x12890d2cce102216644c59daE5baed380d84830c";

    public async Task RunAsync()
    {
        var web3 = new Web3Geth(new Account(PrivateKey), "http://localhost:8545");

        await web3.Miner.Stop.SendRequestAsync();

        var pendingFilter = await web3.Eth.Filters.NewPendingTransactionFilter.SendRequestAsync();
        

        var deploymentHandler = web3.Eth.GetContractDeploymentHandler<ArrayUint256DynamicDeployment>();
        var txn1 = await deploymentHandler.SendRequestAsync();
        var txn2 = await deploymentHandler.SendRequestAsync();
        var txn3 = await deploymentHandler.SendRequestAsync();

        var filterChanges = await web3.Eth.Filters.GetFilterChangesForBlockOrTransaction.SendRequestAsync(pendingFilter);
    }
}

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant