-
Notifications
You must be signed in to change notification settings - Fork 0
Notes for Circle Team
WIP
Should contain the following:
- GOOGLE_APPLICATION_CREDENTIALS=./google-credentials.json
- PURESTAKE_API_KEY=[API Key for Algorand calls]
- USDC_CONTRACT_ADDRESS=[desired usdc contract address depending on the network (i.e. Mainnet, Ropsten)]
Required for Google BigQuery calls, such as querying for minters on the Ethereum (root) page.
Our component hierarchy, described in more detail in our Component Hierarchy Page, enables new blockchains to be added simply by adding a new page route /[blockchain-name] in the pages directory, and the desired pages within this new route, such as /transactions. All logic for the root page should go in an index.vue file in this new page route, and can use the same format and code as other index.vue files for already implemented blockchains, except for replacing the logic to query and fetch information. Similarly, pages on other blockchains such as the Accounts page, can be implemented similarly for new blockchains, but with modification to any API logic when requesting information. Our Component Hierarchy Page walks through more specific examples.
Our accounts/transaction pages on Ethereum uses binary search and makes repeated calls to web3. This can take a (very) long time, and is likely unacceptable in the context of user experience. It may be optimized by tweaking parameters or by fetching and caching the data via a backend. It might also be solved by switching queries from Web3 to Google BigQuery instead
Currently, we fetch minters from the Google BigQuery dataset for Ethereum Mainnet. However, there is currently no support for Ropsten or other nets for the same data. As of now, we've hidden information that we can't query for, but it is a possible feature in the future if the data becomes available.
Currently, the transaction tables on the /algorand/** pages don't show the age of transactions. Our API endpoints, which use Purestake, did not provide the age in their transactions responses, and querying a separate transaction call for each transaction was far too expensive, especially since Purestake limits queries to either 5 requests/min or 1 request/min depending on the specific API queried. We did not get the chance to exploring alternative options, so there may also be other solutions.
Currently, the /algorand/** pages only show content for the mainnet ledger, and there is no support to "switch" to testnet at the moment. To do this, you can change the subdomain of the base server that we use for our api calls in algorand-rest.js to
https://testent-algorand.api.purestake.io. To have support for both ledgers, we were thinking of adding an environment variable that provides the ledger (mainnet vs testnet).