//public EthScanRequest_EtherLastPrice m_etherLastPrice; //public EthScanRequest_EtheriumNodeCount m_etherNodeCount; //public EthScanRequest_GasOracle m_etherGasOracle; //public EthScanRequest_GetBlockNumberByTimestamp m_etherBlocks; //public EthScanRequest_EstimationOfConfirmationTIme m_ehterGasEstimationTime; //public string m_targetTransactionFail; //public EthScanRequest_CheckContarctStatus m_transactionStateFail; //public string m_targetTransactionValide; //public EthScanRequest_CheckContarctStatus m_transactionStateValide; //public string m_addressWallet; //public EthScanRequest_GetBalance m_walletBalance; //public EthScanRequest_GetWalletTransaction m_walletTransaction; //public EthScanRequest_ERC20ByAddress m_walletErc20; //public EthScanRequest_ERC721ByAddress m_walletErc721; //public string[] m_address20Max = new string[20]; //public EthScanRequest_GetBalanceOfWallets m_etherWallets; //public string ercContractAddress; //public string ercContractLinkedAddress; //public EthScanRequest_ERC20TokenSupplyByContract m_contact; //public EthScanRequest_ERC20TokenAccountBalanceForTokenContractAddress m_linkedContact; //public SupplyOfEtherChange supplyOfEtherListener; //public EtherLastPriceChange lastPriceListener; //public EtherNodeCount nodeCountListener; //public EhterCurrentBlockNumber blockNumberListener; //public EtherGasOracle gasOracleListener; //public WalletBalanceState walletStateListener; //public delegate void SupplyOfEtherChange(decimal supplyOfEther); //public delegate void EtherLastPriceChange(double lastPriceInBitcont, double lastPriceInDollar); //public delegate void EtherNodeCount(decimal nodeCount); //public delegate void EhterCurrentBlockNumber(decimal currentBlockNumber); //public delegate void EtherGasOracle(decimal safeGWei, decimal proposedInGwei, decimal fastInGwei); //public delegate void WalletBalanceState(string address, string weiState); //IEnumerator Start() //{ // m_etherSupply = new EthScanRequest_SupplyOfEther(m_etherScanApiToken); // AddListenToAndPush(m_etherSupply); // m_etherLastPrice = new EthScanRequest_EtherLastPrice(m_etherScanApiToken); // AddListenToAndPush(m_etherLastPrice); // m_etherNodeCount = new EthScanRequest_EtheriumNodeCount(m_etherScanApiToken); // AddListenToAndPush(m_etherNodeCount); // m_etherGasOracle = new EthScanRequest_GasOracle(m_etherScanApiToken); // AddListenToAndPush(m_etherGasOracle); // m_etherBlocks = new EthScanRequest_GetBlockNumberByTimestamp(m_etherScanApiToken); // AddListenToAndPush(m_etherBlocks); // CheckWalletState(m_addressWallet); // CheckWalletStateMax20Accounts(m_address20Max); // CheckWalletStateMoreThat20Accounts(m_address20Max); // m_transactionStateFail = new EthScanRequest_CheckContarctStatus(m_etherScanApiToken, m_targetTransactionFail); // AddListenToAndPush(m_transactionStateFail); // m_transactionStateValide = new EthScanRequest_CheckContarctStatus(m_etherScanApiToken, m_targetTransactionValide); // AddListenToAndPush(m_transactionStateValide); // m_walletErc20 = new EthScanRequest_ERC20ByAddress(m_etherScanApiToken, m_addressWallet); // AddListenToAndPush(m_walletErc20); // m_walletErc721 = new EthScanRequest_ERC721ByAddress(m_etherScanApiToken, m_addressWallet); // AddListenToAndPush(m_walletErc721); // m_walletTransaction = new EthScanRequest_GetWalletTransaction(m_etherScanApiToken, m_addressWallet); // AddListenToAndPush(m_walletTransaction); // yield return new WaitForSeconds(10); // m_ehterGasEstimationTime = new EthScanRequest_EstimationOfConfirmationTIme(m_etherScanApiToken, 80 + "000000000"); // CheckTransactionTimeForInGwei(m_etherGasOracle.m_gazProposeInGWei.ToString()); // m_contact = new EthScanRequest_ERC20TokenSupplyByContract(m_etherScanApiToken, ercContractAddress); // AddListenToAndPush(m_etherWallets); // m_linkedContact = new EthScanRequest_ERC20TokenAccountBalanceForTokenContractAddress(m_etherScanApiToken, ercContractAddress, ercContractLinkedAddress); // AddListenToAndPush(m_etherWallets); //} //public void CheckTransactionTimeForInGwei(string gwei) //{ // AddListenToAndPush(new EthScanRequest_EstimationOfConfirmationTIme(m_etherScanApiToken, gwei + "000000000")); //} //public void CheckTransactionTimeForInWei(string wei) //{ // AddListenToAndPush(new EthScanRequest_EstimationOfConfirmationTIme(m_etherScanApiToken, wei)); //} //public void CheckERC20(string address) //{ // AddListenToAndPush(new EthScanRequest_ERC20ByAddress(m_etherScanApiToken, m_addressWallet)); //} //public void CheckERC721(string address) //{ // AddListenToAndPush(new EthScanRequest_ERC721ByAddress(m_etherScanApiToken, m_addressWallet)); //} //public void CheckTransaction(string address) //{ // AddListenToAndPush(new EthScanRequest_GetWalletTransaction(m_etherScanApiToken, m_addressWallet)); //} //public void CheckWalletState(string walletAddress) //{ // m_walletBalance = new EthScanRequest_GetBalance(m_etherScanApiToken, walletAddress); // AddListenToAndPush(m_walletBalance); //} //public void CheckWalletStateMax20Accounts(params string[] walletAddress) //{ // m_etherWallets = new EthScanRequest_GetBalanceOfWallets(m_etherScanApiToken, walletAddress); // AddListenToAndPush(m_etherWallets); //} //public void CheckWalletStateMoreThat20Accounts(params string[] walletAddress) //{ // int i = 0; // List<string> addressStack = new List<string>(); // while (i < walletAddress.Length) // { // addressStack.Add(walletAddress[i]); // if (addressStack.Count == 20) // { // AddListenToAndPush(new EthScanRequest_GetBalanceOfWallets(m_etherScanApiToken, addressStack.ToArray())); // addressStack.Clear(); // } // if (addressStack.Count > 20) // { // Debug.LogError("Big problem here. Contact developer, the spliting of address by group of 20 did not work properly."); // } // i++; // } // if (addressStack.Count > 0) // { // AddListenToAndPush(new EthScanRequest_GetBalanceOfWallets(m_etherScanApiToken, addressStack.ToArray())); // addressStack.Clear(); // } //} private void AddListenerTo(PublicRestRequest request) { request.AddListener(ManageRequestCallback); }
private void AddListenToAndPush(PublicRestRequest request) { request.AddListener(ManageRequestCallback); m_requestSender.AddRequest(request); }
public void Push(PublicRestRequest toPush) { toPush.AddListener(Callback); m_antiSpamRequest.AddRequest(toPush); }