private void ManageRequestCastedCallback(EthScanRequest_GetBalance requestReceived) { Debug.Log(">" + requestReceived.ToString()); if (walletStateListener != null) { walletStateListener(requestReceived.m_walletAddressTarget, requestReceived.m_wei); } }
// Start is called before the first frame update IEnumerator Start() { m_etherSupply = new EthScanRequest_SupplyOfEther(m_etherScanApiToken); m_requestSender.AddRequest(m_etherSupply); m_etherLastPrice = new EthScanRequest_EtherLastPrice(m_etherScanApiToken); m_requestSender.AddRequest(m_etherLastPrice); m_etherNodeCount = new EthScanRequest_EtheriumNodeCount(m_etherScanApiToken); m_requestSender.AddRequest(m_etherNodeCount); m_etherGasOracle = new EthScanRequest_GasOracle(m_etherScanApiToken); m_requestSender.AddRequest(m_etherGasOracle); m_etherBlocks = new EthScanRequest_GetBlockNumberByTimestamp(m_etherScanApiToken); m_requestSender.AddRequest(m_etherBlocks); m_transactionStateFail = new EthScanRequest_CheckContarctStatus(m_etherScanApiToken, m_targetTransactionFail); m_requestSender.AddRequest(m_transactionStateFail); m_transactionStateValide = new EthScanRequest_CheckContarctStatus(m_etherScanApiToken, m_targetTransactionValide); m_requestSender.AddRequest(m_transactionStateValide); m_walletBalance = new EthScanRequest_GetBalance(m_etherScanApiToken, m_addressWallet); m_requestSender.AddRequest(m_walletBalance); m_walletErc20 = new EthScanRequest_ERC20ByAddress(m_etherScanApiToken, m_addressWallet); m_requestSender.AddRequest(m_walletErc20); m_walletErc721 = new EthScanRequest_ERC721ByAddress(m_etherScanApiToken, m_addressWallet); m_requestSender.AddRequest(m_walletErc721); m_walletTransaction = new EthScanRequest_GetWalletTransaction(m_etherScanApiToken, m_addressWallet); m_requestSender.AddRequest(m_walletTransaction); m_etherWallets = new EthScanRequest_GetBalanceOfWallets(m_etherScanApiToken, m_address20Max); m_requestSender.AddRequest(m_etherWallets); yield return(new WaitForSeconds(10)); m_ehterGasEstimationTime = new EthScanRequest_EstimationOfConfirmationTIme(m_etherScanApiToken, m_etherGasOracle.m_gazProposeInGWei + "000000000"); m_requestSender.AddRequest(m_ehterGasEstimationTime); m_contact = new EthScanRequest_ERC20TokenSupplyByContract(m_etherScanApiToken, ercContractAddress); m_requestSender.AddRequest(m_contact); m_linkedContact = new EthScanRequest_ERC20TokenAccountBalanceForTokenContractAddress(m_etherScanApiToken, ercContractAddress, ercContractLinkedAddress); m_requestSender.AddRequest(m_linkedContact); }
public void CheckWalletState(string walletAddress) { m_walletBalance = new EthScanRequest_GetBalance(m_etherScanApiToken.GetKey(), walletAddress); AddListenToAndPush(m_walletBalance); }