Exemple #1
0
        public static async Task <List <PaymentDetails> > GetPaymentDetails()
        {
            try
            {
                var filterInput = new Nethereum.RPC.Eth.Filters.NewFilterInput();
                filterInput.FromBlock = new BlockParameter(0);
                filterInput.Address   = new string[] { App.mainWindow.paymentaddress };
                var paymentEvent   = App.mainWindow.paymentContract.GetEvent("Pay");
                var paymentDetails = await paymentEvent.GetAllChanges <PaymentDetails>(filterInput);

                return(paymentDetails.ToList().Select(p => p.Event).ToList());
            }
            catch (Exception ex)
            {
                throw;
            }
        }
        private async Task <bool> DeployContracts()
        {
            Console.WriteLine("Deploying Contract...");
            var UnblockAccountRes = await web3.Personal.UnlockAccount.SendRequestAsync(senderAddress, password, 600);//(senderAddress, password, new HexBigInteger(120),new object[] { });

            if (UnblockAccountRes != true)
            {
                throw new Exception("Acccount not unlocked");
            }

            string trackingabi = @"[{""constant"":false,""inputs"":[{""name"":""containerId"",""type"":""address""},{""name"":""weight"",""type"":""int256""},{""name"":""desc"",""type"":""string""},{""name"":""date"",""type"":""string""},{""name"":""status"",""type"":""int256""},{""name"":""name"",""type"":""string""},{""name"":""source"",""type"":""string""},{""name"":""destination"",""type"":""string""}],""name"":""ShipmentTracking"",""outputs"":[],""type"":""function""},{""inputs"":[],""type"":""constructor""},{""anonymous"":false,""inputs"":[{""indexed"":false,""name"":""containerId"",""type"":""address""},{""indexed"":false,""name"":""weight"",""type"":""int256""},{""indexed"":false,""name"":""desc"",""type"":""string""},{""indexed"":false,""name"":""date"",""type"":""string""},{""indexed"":false,""name"":""status"",""type"":""int256""},{""indexed"":false,""name"":""name"",""type"":""string""},{""indexed"":false,""name"":""source"",""type"":""string""},{""indexed"":false,""name"":""destination"",""type"":""string""}],""name"":""TrackShipment"",""type"":""event""}]";

            //string trackingbytecode = "60606040525b5b61040e806100146000396000f360606040526000357c010000000000000000000000000000000000000000000000000000000090048063beb9e9691461003957610037565b005b6101c46004808035906020019091908035906020019091908035906020019082018035906020019191908080601f016020809104026020016040519081016040528093929190818152602001838380828437820191505050505050909091908035906020019082018035906020019191908080601f016020809104026020016040519081016040528093929190818152602001838380828437820191505050505050909091908035906020019091908035906020019082018035906020019191908080601f016020809104026020016040519081016040528093929190818152602001838380828437820191505050505050909091908035906020019082018035906020019191908080601f016020809104026020016040519081016040528093929190818152602001838380828437820191505050505050909091908035906020019082018035906020019191908080601f0160208091040260200160405190810160405280939291908181526020018383808284378201915050505050509090919050506101c6565b005b7f732908c7051e53dc06cea383b4d0a3d6403fdf052abfb627c5943172e5afb3f68888888888888888604051808973ffffffffffffffffffffffffffffffffffffffff168152602001888152602001806020018060200187815260200180602001806020018060200186810386528c8181518152602001915080519060200190808383829060006004602084601f0104600302600f01f150905090810190601f1680156102875780820380516001836020036101000a031916815260200191505b5086810385528b8181518152602001915080519060200190808383829060006004602084601f0104600302600f01f150905090810190601f1680156102e05780820380516001836020036101000a031916815260200191505b508681038452898181518152602001915080519060200190808383829060006004602084601f0104600302600f01f150905090810190601f1680156103395780820380516001836020036101000a031916815260200191505b508681038352888181518152602001915080519060200190808383829060006004602084601f0104600302600f01f150905090810190601f1680156103925780820380516001836020036101000a031916815260200191505b508681038252878181518152602001915080519060200190808383829060006004602084601f0104600302600f01f150905090810190601f1680156103eb5780820380516001836020036101000a031916815260200191505b509d505050505050505050505050505060405180910390a15b505050505050505056";
            //var trackingtransactionHash = await web3.Eth.DeployContract.SendRequestAsync(trackingabi, trackingbytecode, senderAddress, new Nethereum.Hex.HexTypes.HexBigInteger("0x3d0900"));

            //var receipt = await MineAndGetReceiptAsync(web3, trackingtransactionHash);
            //trackingaddress = receipt.ContractAddress;
            trackingContract = web3.Eth.GetContract(trackingabi, trackingaddress);


            string shipmentabi = @"[{""constant"":false,""inputs"":[{""name"":""containerId"",""type"":""address""},{""name"":""weight"",""type"":""int256""},{""name"":""date"",""type"":""string""},{""name"":""desc"",""type"":""string""},{""name"":""status"",""type"":""int256""},{""name"":""trackingaddress"",""type"":""address""},{""name"":""name"",""type"":""string""},{""name"":""source"",""type"":""string""},{""name"":""destination"",""type"":""string""}],""name"":""ShipmentStatus"",""outputs"":[],""type"":""function""},{""constant"":true,""inputs"":[{""name"":"""",""type"":""address""}],""name"":""Weight"",""outputs"":[{""name"":"""",""type"":""int256""}],""type"":""function""},{""constant"":true,""inputs"":[{""name"":"""",""type"":""address""}],""name"":""Supplier"",""outputs"":[{""name"":"""",""type"":""string""}],""type"":""function""},{""constant"":false,""inputs"":[{""name"":""containerId"",""type"":""address""},{""name"":""unit"",""type"":""int256""},{""name"":""supplier"",""type"":""string""},{""name"":""containerName"",""type"":""string""}],""name"":""ShipmentDetail"",""outputs"":[],""type"":""function""},{""constant"":true,""inputs"":[{""name"":"""",""type"":""address""}],""name"":""Unit"",""outputs"":[{""name"":"""",""type"":""int256""}],""type"":""function""},{""constant"":true,""inputs"":[{""name"":"""",""type"":""address""}],""name"":""CStatus"",""outputs"":[{""name"":"""",""type"":""int256""}],""type"":""function""},{""constant"":true,""inputs"":[{""name"":"""",""type"":""address""}],""name"":""Time"",""outputs"":[{""name"":"""",""type"":""string""}],""type"":""function""},{""inputs"":[],""type"":""constructor""},{""anonymous"":false,""inputs"":[{""indexed"":false,""name"":""containerId"",""type"":""address""},{""indexed"":false,""name"":""date"",""type"":""string""},{""indexed"":false,""name"":""status"",""type"":""int256""},{""indexed"":false,""name"":""name"",""type"":""string""},{""indexed"":false,""name"":""source"",""type"":""string""},{""indexed"":false,""name"":""destination"",""type"":""string""},{""indexed"":false,""name"":""weight"",""type"":""int256""}],""name"":""TrackShipmentStatus"",""type"":""event""},{""anonymous"":false,""inputs"":[{""indexed"":false,""name"":""containerId"",""type"":""address""},{""indexed"":false,""name"":""unit"",""type"":""int256""},{""indexed"":false,""name"":""supplier"",""type"":""string""},{""indexed"":false,""name"":""containerName"",""type"":""string""}],""name"":""TrackShipmentDetail"",""type"":""event""}]";

            //string shipmentbytecode = "60606040525b5b610dcd806100146000396000f36060604052361561007f576000357c0100000000000000000000000000000000000000000000000000000000900480630dcab1d11461008157806339b457f9146102175780634b297269146102435780636787e27f146102c757806367a5f12b14610376578063da9a9601146103a2578063db907128146103ce5761007f565b005b6102156004808035906020019091908035906020019091908035906020019082018035906020019191908080601f016020809104026020016040519081016040528093929190818152602001838380828437820191505050505050909091908035906020019082018035906020019191908080601f016020809104026020016040519081016040528093929190818152602001838380828437820191505050505050909091908035906020019091908035906020019091908035906020019082018035906020019191908080601f016020809104026020016040519081016040528093929190818152602001838380828437820191505050505050909091908035906020019082018035906020019191908080601f016020809104026020016040519081016040528093929190818152602001838380828437820191505050505050909091908035906020019082018035906020019191908080601f016020809104026020016040519081016040528093929190818152602001838380828437820191505050505050909091905050610452565b005b61022d6004808035906020019091905050610c31565b6040518082815260200191505060405180910390f35b6102596004808035906020019091905050610c4c565b60405180806020018281038252838181518152602001915080519060200190808383829060006004602084601f0104600302600f01f150905090810190601f1680156102b95780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6103746004808035906020019091908035906020019091908035906020019082018035906020019191908080601f016020809104026020016040519081016040528093929190818152602001838380828437820191505050505050909091908035906020019082018035906020019191908080601f0160208091040260200160405190810160405280939291908181526020018383808284378201915050505050509090919050506109ef565b005b61038c6004808035906020019091905050610db2565b6040518082815260200191505060405180910390f35b6103b86004808035906020019091905050610c16565b6040518082815260200191505060405180910390f35b6103e46004808035906020019091905050610cff565b60405180806020018281038252838181518152602001915080519060200190808383829060006004602084601f0104600302600f01f150905090810190601f1680156104445780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b600087600160005060008c73ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000509080519060200190828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106104cd57805160ff19168380011785556104fe565b828001600101855582156104fe579182015b828111156104fd5782518260005055916020019190600101906104df565b5b509050610529919061050b565b80821115610525576000818150600090555060010161050b565b5090565b505085600460005060008c73ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000508190555088600060005060008c73ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600050819055507fcf533b0aacdfd86cd633267c41eac12ec09989ed16f4985421c69fcbbfc535e18a89888787878f604051808873ffffffffffffffffffffffffffffffffffffffff1681526020018060200187815260200180602001806020018060200186815260200185810385528b8181518152602001915080519060200190808383829060006004602084601f0104600302600f01f150905090810190601f16801561064f5780820380516001836020036101000a031916815260200191505b508581038452898181518152602001915080519060200190808383829060006004602084601f0104600302600f01f150905090810190601f1680156106a85780820380516001836020036101000a031916815260200191505b508581038352888181518152602001915080519060200190808383829060006004602084601f0104600302600f01f150905090810190601f1680156107015780820380516001836020036101000a031916815260200191505b508581038252878181518152602001915080519060200190808383829060006004602084601f0104600302600f01f150905090810190601f16801561075a5780820380516001836020036101000a031916815260200191505b509b50505050505050505050505060405180910390a18490508073ffffffffffffffffffffffffffffffffffffffff1663beb9e9698b8b8a8c8b8a8a8a604051897c0100000000000000000000000000000000000000000000000000000000028152600401808973ffffffffffffffffffffffffffffffffffffffff168152602001888152602001806020018060200187815260200180602001806020018060200186810386528c8181518152602001915080519060200190808383829060006004602084601f0104600302600f01f150905090810190601f1680156108545780820380516001836020036101000a031916815260200191505b5086810385528b8181518152602001915080519060200190808383829060006004602084601f0104600302600f01f150905090810190601f1680156108ad5780820380516001836020036101000a031916815260200191505b508681038452898181518152602001915080519060200190808383829060006004602084601f0104600302600f01f150905090810190601f1680156109065780820380516001836020036101000a031916815260200191505b508681038352888181518152602001915080519060200190808383829060006004602084601f0104600302600f01f150905090810190601f16801561095f5780820380516001836020036101000a031916815260200191505b508681038252878181518152602001915080519060200190808383829060006004602084601f0104600302600f01f150905090810190601f1680156109b85780820380516001836020036101000a031916815260200191505b509d50505050505050505050505050506000604051808303816000876161da5a03f115610002575050505b50505050505050505050565b82600260005060008673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000508190555081600360005060008673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000509080519060200190828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10610a9c57805160ff1916838001178555610acd565b82800160010185558215610acd579182015b82811115610acc578251826000505591602001919060010190610aae565b5b509050610af89190610ada565b80821115610af45760008181506000905550600101610ada565b5090565b50507fe2b3e9d751e4e327d06572d61d8bc963ae16d1ce3651536886c3808768888eed84848484604051808573ffffffffffffffffffffffffffffffffffffffff16815260200184815260200180602001806020018381038352858181518152602001915080519060200190808383829060006004602084601f0104600302600f01f150905090810190601f168015610ba55780820380516001836020036101000a031916815260200191505b508381038252848181518152602001915080519060200190808383829060006004602084601f0104600302600f01f150905090810190601f168015610bfe5780820380516001836020036101000a031916815260200191505b50965050505050505060405180910390a15b50505050565b60046000506020528060005260406000206000915090505481565b60006000506020528060005260406000206000915090505481565b60036000506020528060005260406000206000915090508054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015610cf75780601f10610ccc57610100808354040283529160200191610cf7565b820191906000526020600020905b815481529060010190602001808311610cda57829003601f168201915b505050505081565b60016000506020528060005260406000206000915090508054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015610daa5780601f10610d7f57610100808354040283529160200191610daa565b820191906000526020600020905b815481529060010190602001808311610d8d57829003601f168201915b505050505081565b6002600050602052806000526040600020600091509050548156";
            //var shipmenttransactionHash = await web3.Eth.DeployContract.SendRequestAsync(shipmentabi, shipmentbytecode, senderAddress, new Nethereum.Hex.HexTypes.HexBigInteger("0x3d0900"));

            //receipt = await MineAndGetReceiptAsync(web3, shipmenttransactionHash);
            //shipmentaddress = receipt.ContractAddress;
            shipmentContract = web3.Eth.GetContract(shipmentabi, shipmentaddress);

            string approvalsabi = @"[{""constant"":false,""inputs"":[{""name"":""containerId"",""type"":""address""},{""name"":""doc"",""type"":""string""},{""name"":""status"",""type"":""int256""},{""name"":""date"",""type"":""string""},{""name"":""docurl"",""type"":""string""},{""name"":""docid"",""type"":""int256""}],""name"":""UpdateApprovalStatus"",""outputs"":[],""type"":""function""},{""inputs"":[],""type"":""constructor""},{""anonymous"":false,""inputs"":[{""indexed"":false,""name"":""containerId"",""type"":""address""},{""indexed"":false,""name"":""doc"",""type"":""string""},{""indexed"":false,""name"":""status"",""type"":""int256""},{""indexed"":false,""name"":""date"",""type"":""string""},{""indexed"":false,""name"":""docurl"",""type"":""string""},{""indexed"":false,""name"":""docid"",""type"":""int256""}],""name"":""docstatus"",""type"":""event""}]";

            //string approvalsbytecode = "60606040525b5b6102be806100146000396000f360606040526000357c01000000000000000000000000000000000000000000000000000000009004806393f9f1b01461003957610037565b005b6101366004808035906020019091908035906020019082018035906020019191908080601f016020809104026020016040519081016040528093929190818152602001838380828437820191505050505050909091908035906020019091908035906020019082018035906020019191908080601f016020809104026020016040519081016040528093929190818152602001838380828437820191505050505050909091908035906020019082018035906020019191908080601f016020809104026020016040519081016040528093929190818152602001838380828437820191505050505050909091908035906020019091905050610138565b005b7fd59d6243b211729212133a621936e23fd9841d7fff8b0696e84dad22d051ca0c868686868686604051808773ffffffffffffffffffffffffffffffffffffffff1681526020018060200186815260200180602001806020018581526020018481038452898181518152602001915080519060200190808383829060006004602084601f0104600302600f01f150905090810190601f1680156101ef5780820380516001836020036101000a031916815260200191505b508481038352878181518152602001915080519060200190808383829060006004602084601f0104600302600f01f150905090810190601f1680156102485780820380516001836020036101000a031916815260200191505b508481038252868181518152602001915080519060200190808383829060006004602084601f0104600302600f01f150905090810190601f1680156102a15780820380516001836020036101000a031916815260200191505b50995050505050505050505060405180910390a15b50505050505056";
            //var approvalstransactionHash = await web3.Eth.DeployContract.SendRequestAsync(approvalsabi, approvalsbytecode, senderAddress, new Nethereum.Hex.HexTypes.HexBigInteger("0x3d0900"));

            //receipt = await MineAndGetReceiptAsync(web3, approvalstransactionHash);
            //approvalsaddress = receipt.ContractAddress;
            approvalsContract = web3.Eth.GetContract(approvalsabi, approvalsaddress);

            string weighingabi = @"[{""constant"":false,""inputs"":[{""name"":""containerId"",""type"":""address""},{""name"":""weight"",""type"":""int256""},{""name"":""date"",""type"":""string""},{""name"":""shipmentaddress"",""type"":""address""},{""name"":""trackingaddress"",""type"":""address""},{""name"":""name"",""type"":""string""},{""name"":""source"",""type"":""string""},{""name"":""destination"",""type"":""string""}],""name"":""VerifyWeight"",""outputs"":[],""type"":""function""},{""inputs"":[],""type"":""constructor""}]";

            //string weighingbytecode = "60606040525b5b61078c806100146000396000f360606040526000357c0100000000000000000000000000000000000000000000000000000000900480631c8013de1461003957610037565b005b6101866004808035906020019091908035906020019091908035906020019082018035906020019191908080601f016020809104026020016040519081016040528093929190818152602001838380828437820191505050505050909091908035906020019091908035906020019091908035906020019082018035906020019191908080601f016020809104026020016040519081016040528093929190818152602001838380828437820191505050505050909091908035906020019082018035906020019191908080601f016020809104026020016040519081016040528093929190818152602001838380828437820191505050505050909091908035906020019082018035906020019191908080601f016020809104026020016040519081016040528093929190818152602001838380828437820191505050505050909091905050610188565b005b60008590508073ffffffffffffffffffffffffffffffffffffffff166339b457f98a604051827c0100000000000000000000000000000000000000000000000000000000028152600401808273ffffffffffffffffffffffffffffffffffffffff1681526020019150506020604051808303816000876161da5a03f115610002575050506040518051906020015088141515610515578073ffffffffffffffffffffffffffffffffffffffff16630dcab1d18a8373ffffffffffffffffffffffffffffffffffffffff166339b457f98d604051827c0100000000000000000000000000000000000000000000000000000000028152600401808273ffffffffffffffffffffffffffffffffffffffff1681526020019150506020604051808303816000876161da5a03f11561000257505050604051805190602001508a60068a8a8a8a604051897c0100000000000000000000000000000000000000000000000000000000028152600401808973ffffffffffffffffffffffffffffffffffffffff16815260200188815260200180602001806020018881526020018773ffffffffffffffffffffffffffffffffffffffff16815260200180602001806020018060200186810386528c8181518152602001915080519060200190808383829060006004602084601f0104600302600f01f150905090810190601f1680156103a45780820380516001836020036101000a031916815260200191505b508681038552601f8152602001807f436f6e7461696e6572207765696768696e6720636865636b206661696c6564008152602001506020018681038452898181518152602001915080519060200190808383829060006004602084601f0104600302600f01f150905090810190601f1680156104345780820380516001836020036101000a031916815260200191505b508681038352888181518152602001915080519060200190808383829060006004602084601f0104600302600f01f150905090810190601f16801561048d5780820380516001836020036101000a031916815260200191505b508681038252878181518152602001915080519060200190808383829060006004602084601f0104600302600f01f150905090810190601f1680156104e65780820380516001836020036101000a031916815260200191505b509d50505050505050505050505050506000604051808303816000876161da5a03f11561000257505050610780565b8073ffffffffffffffffffffffffffffffffffffffff16630dcab1d18a8a8a60028a8a8a8a604051897c0100000000000000000000000000000000000000000000000000000000028152600401808973ffffffffffffffffffffffffffffffffffffffff16815260200188815260200180602001806020018881526020018773ffffffffffffffffffffffffffffffffffffffff16815260200180602001806020018060200186810386528c8181518152602001915080519060200190808383829060006004602084601f0104600302600f01f150905090810190601f1680156106135780820380516001836020036101000a031916815260200191505b508681038552601f8152602001807f436f6e7461696e6572207765696768696e6720636865636b20706173736564008152602001506020018681038452898181518152602001915080519060200190808383829060006004602084601f0104600302600f01f150905090810190601f1680156106a35780820380516001836020036101000a031916815260200191505b508681038352888181518152602001915080519060200190808383829060006004602084601f0104600302600f01f150905090810190601f1680156106fc5780820380516001836020036101000a031916815260200191505b508681038252878181518152602001915080519060200190808383829060006004602084601f0104600302600f01f150905090810190601f1680156107555780820380516001836020036101000a031916815260200191505b509d50505050505050505050505050506000604051808303816000876161da5a03f115610002575050505b5b50505050505050505056";
            //var weighingtransactionHash = await web3.Eth.DeployContract.SendRequestAsync(weighingabi, weighingbytecode, senderAddress, new Nethereum.Hex.HexTypes.HexBigInteger("0x3d0900"));

            //receipt = await MineAndGetReceiptAsync(web3, weighingtransactionHash);
            //weighingaddress = receipt.ContractAddress;
            weighingContract = web3.Eth.GetContract(weighingabi, weighingaddress);

            string paymentabi = @"[{""constant"":false,""inputs"":[],""name"":""MapSupplierIds"",""outputs"":[],""type"":""function""},{""constant"":false,""inputs"":[{""name"":""qty"",""type"":""int256""},{""name"":""supplierName"",""type"":""string""},{""name"":""containerId"",""type"":""address""},{""name"":""units"",""type"":""int256""},{""name"":""containerName"",""type"":""string""},{""name"":""time"",""type"":""string""}],""name"":""CalculatePayments"",""outputs"":[],""type"":""function""},{""constant"":false,""inputs"":[{""name"":""supplierName"",""type"":""string""}],""name"":""MapSupplierBanks"",""outputs"":[],""type"":""function""},{""constant"":true,""inputs"":[{""name"":"""",""type"":""address""}],""name"":""Bank"",""outputs"":[{""name"":"""",""type"":""string""}],""type"":""function""},{""inputs"":[],""type"":""constructor""},{""anonymous"":false,""inputs"":[{""indexed"":false,""name"":""qty"",""type"":""int256""},{""indexed"":false,""name"":""supplierName"",""type"":""string""},{""indexed"":false,""name"":""containerId"",""type"":""address""},{""indexed"":false,""name"":""bank"",""type"":""string""},{""indexed"":false,""name"":""units"",""type"":""int256""},{""indexed"":false,""name"":""containerName"",""type"":""string""},{""indexed"":false,""name"":""time"",""type"":""string""}],""name"":""Pay"",""type"":""event""}]";

            //string paymentbytecode = "60606040525b6001600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908302179055506002600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908302179055505b6109cc8061006c6000396000f360606040526000357c0100000000000000000000000000000000000000000000000000000000900480634f6545c51461005a5780636ddb62ce14610069578063879533581461016857806391d1a764146101be57610058565b005b6100676004805050610643565b005b6101666004808035906020019091908035906020019082018035906020019191908080601f016020809104026020016040519081016040528093929190818152602001838380828437820191505050505050909091908035906020019091908035906020019091908035906020019082018035906020019191908080601f016020809104026020016040519081016040528093929190818152602001838380828437820191505050505050909091908035906020019082018035906020019191908080601f016020809104026020016040519081016040528093929190818152602001838380828437820191505050505050909091905050610646565b005b6101bc6004808035906020019082018035906020019191908080601f0160208091040260200160405190810160405280939291908181526020018383808284378201915050505050509090919050506102f5565b005b6101d46004808035906020019091905050610242565b60405180806020018281038252838181518152602001915080519060200190808383829060006004602084601f0104600302600f01f150905090810190601f1680156102345780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b60006000506020528060005260406000206000915090508054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156102ed5780601f106102c2576101008083540402835291602001916102ed565b820191906000526020600020905b8154815290600101906020018083116102d057829003601f168201915b505050505081565b60405180807f4f545200000000000000000000000000000000000000000000000000000000008152602001506003019050604051809103902081604051808280519060200190808383829060006004602084601f0104600302600f01f1509050019150506040518091039020141561049a57604060405190810160405280600381526020017f424f41000000000000000000000000000000000000000000000000000000000081526020015060006000506000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000509080519060200190828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061043b57805160ff191683800117855561046c565b8280016001018555821561046c579182015b8281111561046b57825182600050559160200191906001019061044d565b5b5090506104979190610479565b808211156104935760008181506000905550600101610479565b5090565b50505b60405180807f4d524600000000000000000000000000000000000000000000000000000000008152602001506003019050604051809103902081604051808280519060200190808383829060006004602084601f0104600302600f01f1509050019150506040518091039020141561063f57604060405190810160405280600381526020017f534249000000000000000000000000000000000000000000000000000000000081526020015060006000506000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000509080519060200190828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106105e057805160ff1916838001178555610611565b82800160010185558215610611579182015b828111156106105782518260005055916020019190600101906105f2565b5b50905061063c919061061e565b80821115610638576000818150600090555060010161061e565b5090565b50505b5b50565b5b565b6000600060405180807f4d524600000000000000000000000000000000000000000000000000000000008152602001506003019050604051809103902087604051808280519060200190808383829060006004602084601f0104600302600f01f150905001915050604051809103902014156106e857600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1691508150610783565b60405180807f4f545200000000000000000000000000000000000000000000000000000000008152602001506003019050604051809103902087604051808280519060200190808383829060006004602084601f0104600302600f01f1509050019150506040518091039020141561078257600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16915081505b5b6103e8905080507f44cd3f3748226faa7ae403fc438d943c3ced80cc0ff3adfaa55659b4614cc7688189028888600060005060008773ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060005089898960405180888152602001806020018773ffffffffffffffffffffffffffffffffffffffff16815260200180602001868152602001806020018060200185810385528b8181518152602001915080519060200190808383829060006004602084601f0104600302600f01f150905090810190601f1680156108765780820380516001836020036101000a031916815260200191505b508581038452898181546001816001161561010002031660029004815260200191508054600181600116156101000203166002900480156108f85780601f106108cd576101008083540402835291602001916108f8565b820191906000526020600020905b8154815290600101906020018083116108db57829003601f168201915b50508581038352878181518152602001915080519060200190808383829060006004602084601f0104600302600f01f150905090810190601f1680156109525780820380516001836020036101000a031916815260200191505b508581038252868181518152602001915080519060200190808383829060006004602084601f0104600302600f01f150905090810190601f1680156109ab5780820380516001836020036101000a031916815260200191505b509b50505050505050505050505060405180910390a15b505050505050505056";
            //string paymenttransactioHash = await web3.Eth.DeployContract.SendRequestAsync(paymentabi, paymentbytecode, senderAddress, new Nethereum.Hex.HexTypes.HexBigInteger("0x3d0900"));

            //receipt = await MineAndGetReceiptAsync(web3, paymenttransactioHash);
            //paymentaddress = receipt.ContractAddress;
            paymentContract = web3.Eth.GetContract(paymentabi, paymentaddress);


            Payment.MapSupplierBanks("OTR");
            Payment.MapSupplierBanks("MRF");
            Console.WriteLine("Contract Deployed Successfully...");
            filterInput           = new Nethereum.RPC.Eth.Filters.NewFilterInput();
            filterInput.FromBlock = new BlockParameter(0);
            return(true);
        }