public async Task <string> DeployWonka()
        {
            var web3                = GetWeb3();
            var EngineDeployment    = new Wonka.Eth.Autogen.WonkaEngine.WonkaEngineDeploymentClassic();
            var RegistryDeployment  = new Wonka.Eth.Autogen.WonkaRegistry.WonkaRegistryDeployment();
            var TestCntDeployment   = new Wonka.Eth.Autogen.WonkaTestContract.WonkaTestContractDeployment();
            var ChronoLogDeployment = new Wonka.Eth.Autogen.ChronoLog.ChronoLogDeployment();

            Nethereum.Hex.HexTypes.HexBigInteger nEngineGas  = new Nethereum.Hex.HexTypes.HexBigInteger(8388608);
            Nethereum.Hex.HexTypes.HexBigInteger nDefaultGas = new Nethereum.Hex.HexTypes.HexBigInteger(1000000);

            msEngineContractAddress =
                await EngineDeployment.DeployContractAsync(web3, msAbiWonka, msSenderAddress, nEngineGas, CONST_ONLINE_TEST_CHAIN_URL).ConfigureAwait(false);

            msRegistryContractAddress =
                await RegistryDeployment.DeployContractAsync(web3, msAbiRegistry, msSenderAddress, nDefaultGas, CONST_ONLINE_TEST_CHAIN_URL).ConfigureAwait(false);

            msTestContractAddress =
                await TestCntDeployment.DeployContractAsync(web3, msAbiOrchTest, msSenderAddress, nDefaultGas, CONST_ONLINE_TEST_CHAIN_URL).ConfigureAwait(false);

            msChronoLogAddress =
                await ChronoLogDeployment.DeployContractAsync(web3, msAbiChronoLog, msSenderAddress, nDefaultGas, CONST_ONLINE_TEST_CHAIN_URL).ConfigureAwait(false);

            return(msEngineContractAddress);
        }
        public static async Task <List <string> > DeployContracts(string psPassword, string psSenderAddress, string psWeb3HttpUrl)
        {
            var web3               = GetWeb3(psPassword, psWeb3HttpUrl);
            var EngineDeployment   = new Wonka.Eth.Autogen.WonkaEngine.WonkaEngineDeployment();
            var RegistryDeployment = new Wonka.Eth.Autogen.WonkaRegistry.WonkaRegistryDeployment();
            var TestCntDeployment  = new Wonka.Eth.Autogen.WonkaTestContract.WonkaTestContractDeployment();

            Nethereum.Hex.HexTypes.HexBigInteger nEngineGas  = new Nethereum.Hex.HexTypes.HexBigInteger(8388608);
            Nethereum.Hex.HexTypes.HexBigInteger nDefaultGas = new Nethereum.Hex.HexTypes.HexBigInteger(1000000);

            string sWonkaABI        = Wonka.Eth.Autogen.WonkaEngine.WonkaEngineDeployment.ABI;
            string sRegistryABI     = Wonka.Eth.Autogen.WonkaRegistry.WonkaRegistryDeployment.ABI;
            string sTestContractABI = Wonka.Eth.Autogen.WonkaTestContract.WonkaTestContractDeployment.ABI;

            string sEngineContractAddress =
                await EngineDeployment.DeployContractAsync(web3, sWonkaABI, psSenderAddress, nEngineGas, psWeb3HttpUrl).ConfigureAwait(false);

            string sRegistryContractAddress =
                await RegistryDeployment.DeployContractAsync(web3, sRegistryABI, psSenderAddress, nDefaultGas, psWeb3HttpUrl).ConfigureAwait(false);

            string sTestContractAddress =
                await TestCntDeployment.DeployContractAsync(web3, sTestContractABI, psSenderAddress, nDefaultGas, psWeb3HttpUrl).ConfigureAwait(false);

            return(new List <string>()
            {
                sEngineContractAddress, sRegistryContractAddress, sTestContractAddress
            });
        }
Exemplo n.º 3
0
        public string DeployWonka()
        {
            var web3               = GetWeb3();
            var EngineDeployment   = new Wonka.Eth.Autogen.WonkaEngine.WonkaEngineDeploymentClassic();
            var RegistryDeployment = new Wonka.Eth.Autogen.WonkaRegistry.WonkaRegistryDeployment();
            var TestCntDeployment  = new Wonka.Eth.Autogen.WonkaTestContract.WonkaTestContractDeployment();

            Nethereum.Hex.HexTypes.HexBigInteger nEngineGas  = new Nethereum.Hex.HexTypes.HexBigInteger(8388608);
            Nethereum.Hex.HexTypes.HexBigInteger nDefaultGas = new Nethereum.Hex.HexTypes.HexBigInteger(1000000);

            msEngineContractAddress   = EngineDeployment.DeployContract(web3, msAbiWonka, msSenderAddress, nEngineGas, CONST_ONLINE_TEST_CHAIN_URL);
            msRegistryContractAddress = RegistryDeployment.DeployContract(web3, msAbiRegistry, msSenderAddress, nDefaultGas, CONST_ONLINE_TEST_CHAIN_URL);
            msTestContractAddress     = TestCntDeployment.DeployContract(web3, msAbiOrchTest, msSenderAddress, nDefaultGas, CONST_ONLINE_TEST_CHAIN_URL);

            return(msEngineContractAddress);
        }