diff --git a/.gitbook/assets/2021-11-03 16-59-42 (1) (1) (1).gif b/.gitbook/assets/2021-11-03 16-59-42 (1) (1) (1).gif deleted file mode 100644 index 851303d..0000000 Binary files a/.gitbook/assets/2021-11-03 16-59-42 (1) (1) (1).gif and /dev/null differ diff --git a/.gitbook/assets/2021-11-03 16-59-42 (1) (1) (2).gif b/.gitbook/assets/2021-11-03 16-59-42 (1) (1) (2).gif deleted file mode 100644 index 851303d..0000000 Binary files a/.gitbook/assets/2021-11-03 16-59-42 (1) (1) (2).gif and /dev/null differ diff --git a/.gitbook/assets/2021-11-03 16-59-42 (1) (1).gif b/.gitbook/assets/2021-11-03 16-59-42 (1) (1).gif deleted file mode 100644 index 851303d..0000000 Binary files a/.gitbook/assets/2021-11-03 16-59-42 (1) (1).gif and /dev/null differ diff --git a/.gitbook/assets/image (13) (1) (1) (1) (1).png b/.gitbook/assets/image (13) (1) (1) (1) (1).png deleted file mode 100644 index 31ff57d..0000000 Binary files a/.gitbook/assets/image (13) (1) (1) (1) (1).png and /dev/null differ diff --git a/.gitbook/assets/image (13) (1) (1) (1) (2).png b/.gitbook/assets/image (13) (1) (1) (1) (2).png deleted file mode 100644 index 31ff57d..0000000 Binary files a/.gitbook/assets/image (13) (1) (1) (1) (2).png and /dev/null differ diff --git a/.gitbook/assets/image (13) (1) (1) (1).png b/.gitbook/assets/image (13) (1) (1) (1).png deleted file mode 100644 index 31ff57d..0000000 Binary files a/.gitbook/assets/image (13) (1) (1) (1).png and /dev/null differ diff --git a/.gitbook/assets/image (19) (1) (1) (1).png b/.gitbook/assets/image (19) (1) (1) (1).png deleted file mode 100644 index 6387e29..0000000 Binary files a/.gitbook/assets/image (19) (1) (1) (1).png and /dev/null differ diff --git a/.gitbook/assets/image (19) (1) (1) (2).png b/.gitbook/assets/image (19) (1) (1) (2).png deleted file mode 100644 index 6387e29..0000000 Binary files a/.gitbook/assets/image (19) (1) (1) (2).png and /dev/null differ diff --git a/.gitbook/assets/image (19) (1) (1).png b/.gitbook/assets/image (19) (1) (1).png deleted file mode 100644 index 6387e29..0000000 Binary files a/.gitbook/assets/image (19) (1) (1).png and /dev/null differ diff --git a/.gitbook/assets/image (19).png b/.gitbook/assets/image (19).png index da2655e..6387e29 100644 Binary files a/.gitbook/assets/image (19).png and b/.gitbook/assets/image (19).png differ diff --git a/.gitbook/assets/image (27) (1) (1).png b/.gitbook/assets/image (27) (1) (1).png deleted file mode 100644 index b923849..0000000 Binary files a/.gitbook/assets/image (27) (1) (1).png and /dev/null differ diff --git a/.gitbook/assets/image (27) (1) (2) (1).png b/.gitbook/assets/image (27) (1) (2) (1).png deleted file mode 100644 index b923849..0000000 Binary files a/.gitbook/assets/image (27) (1) (2) (1).png and /dev/null differ diff --git a/.gitbook/assets/image (27) (1) (2) (2).png b/.gitbook/assets/image (27) (1) (2) (2).png deleted file mode 100644 index b923849..0000000 Binary files a/.gitbook/assets/image (27) (1) (2) (2).png and /dev/null differ diff --git a/.gitbook/assets/image (27) (1) (2).png b/.gitbook/assets/image (27) (1) (2).png deleted file mode 100644 index b923849..0000000 Binary files a/.gitbook/assets/image (27) (1) (2).png and /dev/null differ diff --git a/.gitbook/assets/image (27) (1).png b/.gitbook/assets/image (27) (1).png deleted file mode 100644 index b923849..0000000 Binary files a/.gitbook/assets/image (27) (1).png and /dev/null differ diff --git a/.gitbook/assets/image (27) (2).png b/.gitbook/assets/image (27) (2).png deleted file mode 100644 index b923849..0000000 Binary files a/.gitbook/assets/image (27) (2).png and /dev/null differ diff --git a/.gitbook/assets/image (27).png b/.gitbook/assets/image (27).png index d733507..b923849 100644 Binary files a/.gitbook/assets/image (27).png and b/.gitbook/assets/image (27).png differ diff --git a/.gitbook/assets/image (42).png b/.gitbook/assets/image (42).png index e236886..da2655e 100644 Binary files a/.gitbook/assets/image (42).png and b/.gitbook/assets/image (42).png differ diff --git a/.gitbook/assets/image (43).png b/.gitbook/assets/image (43).png index a13fa43..e236886 100644 Binary files a/.gitbook/assets/image (43).png and b/.gitbook/assets/image (43).png differ diff --git a/.gitbook/assets/image (44).png b/.gitbook/assets/image (44).png index 682f8f7..a13fa43 100644 Binary files a/.gitbook/assets/image (44).png and b/.gitbook/assets/image (44).png differ diff --git a/.gitbook/assets/image (45).png b/.gitbook/assets/image (45).png index b6f9923..682f8f7 100644 Binary files a/.gitbook/assets/image (45).png and b/.gitbook/assets/image (45).png differ diff --git a/.gitbook/assets/image (46).png b/.gitbook/assets/image (46).png index 7c5bea4..b6f9923 100644 Binary files a/.gitbook/assets/image (46).png and b/.gitbook/assets/image (46).png differ diff --git a/.gitbook/assets/image (47).png b/.gitbook/assets/image (47).png index 4a9f021..7c5bea4 100644 Binary files a/.gitbook/assets/image (47).png and b/.gitbook/assets/image (47).png differ diff --git a/.gitbook/assets/image (48).png b/.gitbook/assets/image (48).png index 7f276cd..4a9f021 100644 Binary files a/.gitbook/assets/image (48).png and b/.gitbook/assets/image (48).png differ diff --git a/.gitbook/assets/image (49).png b/.gitbook/assets/image (49).png index 0922ac1..7f276cd 100644 Binary files a/.gitbook/assets/image (49).png and b/.gitbook/assets/image (49).png differ diff --git a/.gitbook/assets/image (50).png b/.gitbook/assets/image (50).png index 711e243..d733507 100644 Binary files a/.gitbook/assets/image (50).png and b/.gitbook/assets/image (50).png differ diff --git a/.gitbook/assets/image (51).png b/.gitbook/assets/image (51).png index 6afc456..0922ac1 100644 Binary files a/.gitbook/assets/image (51).png and b/.gitbook/assets/image (51).png differ diff --git a/.gitbook/assets/image (52).png b/.gitbook/assets/image (52).png index e710688..711e243 100644 Binary files a/.gitbook/assets/image (52).png and b/.gitbook/assets/image (52).png differ diff --git a/.gitbook/assets/image (53).png b/.gitbook/assets/image (53).png index 2a6de60..6afc456 100644 Binary files a/.gitbook/assets/image (53).png and b/.gitbook/assets/image (53).png differ diff --git a/.gitbook/assets/image (54).png b/.gitbook/assets/image (54).png index 0ef68d4..e710688 100644 Binary files a/.gitbook/assets/image (54).png and b/.gitbook/assets/image (54).png differ diff --git a/.gitbook/assets/image (55).png b/.gitbook/assets/image (55).png index a520271..2a6de60 100644 Binary files a/.gitbook/assets/image (55).png and b/.gitbook/assets/image (55).png differ diff --git a/.gitbook/assets/image (56).png b/.gitbook/assets/image (56).png index f277d60..0ef68d4 100644 Binary files a/.gitbook/assets/image (56).png and b/.gitbook/assets/image (56).png differ diff --git a/.gitbook/assets/image (57).png b/.gitbook/assets/image (57).png index 556e67b..a520271 100644 Binary files a/.gitbook/assets/image (57).png and b/.gitbook/assets/image (57).png differ diff --git a/.gitbook/assets/image (58).png b/.gitbook/assets/image (58).png index d3ecf45..f277d60 100644 Binary files a/.gitbook/assets/image (58).png and b/.gitbook/assets/image (58).png differ diff --git a/.gitbook/assets/image (59).png b/.gitbook/assets/image (59).png index 2cc5381..556e67b 100644 Binary files a/.gitbook/assets/image (59).png and b/.gitbook/assets/image (59).png differ diff --git a/.gitbook/assets/image (60).png b/.gitbook/assets/image (60).png index 54d6111..d3ecf45 100644 Binary files a/.gitbook/assets/image (60).png and b/.gitbook/assets/image (60).png differ diff --git a/.gitbook/assets/image (61).png b/.gitbook/assets/image (61).png new file mode 100644 index 0000000..2cc5381 Binary files /dev/null and b/.gitbook/assets/image (61).png differ diff --git a/.gitbook/assets/image (62).png b/.gitbook/assets/image (62).png new file mode 100644 index 0000000..54d6111 Binary files /dev/null and b/.gitbook/assets/image (62).png differ diff --git a/README.md b/README.md index 9462c99..3679d50 100644 --- a/README.md +++ b/README.md @@ -1,81 +1,81 @@ --- -说明: 欢迎使用Dune +description: Welcome to Dune --- -# Dune介绍 +# Introduction to Dune -## 简介 +## Introduction -**Dune是一款强大的区块链研究工具。通过Dune你可以查询,导出和可视化区块链上浩如烟海的数据。Dune让公共的区块链数据对每个人都触手可及,从而使其有了无限的可能。该文档将会帮你解答类似如下的问题:** +**Dune is a powerful tool for blockchain research. Dune gives you all the tools to query, extract, and visualize vast amounts of data from the blockchain. Dune is unlocking the power of public blockchain data by making it accessible to everyone. This documentation will help you answer questions like:** -[Uniswap每天的交易资金有多少?](https://dune.xyz/queries/3) +[How much volume flows through Uniswap each day?](https://dune.xyz/queries/3) -[哪家去中心交易所的交易额最高?](https://dune.xyz/queries/1847) +[Which Dex has the highest volume?](https://dune.xyz/queries/1847) -[重要的稳定币有什么链上行为?](https://dune.xyz/hagaetc/stablecoins) +[How are important Stablecoins behaving today?](https://dune.xyz/hagaetc/stablecoins) -## Dune基础 +## Dune Basics -#### Dune应用 +#### Dune App -理解[查询](./#queries), [可视化](duneapp/visualizations/)和 [仪表盘](duneapp/dashboards.md)的概念将对你畅游Dune很有帮助。 他们是你通往区块链信息大门的基础区块。作为一名区块链分析师,你可以查询数据信息,可视化你的结果,然后进一步用仪表盘来讲述你的内容。 +While navigating Dune, it helps to have a good understanding of [queries](./#queries), [visualizations](duneapp/visualizations/), and [dashboards](duneapp/dashboards.md). These are the basic building blocks that act as your portal to the world's blockchain information. As a blockchain analyst, you can create custom queries to fetch data, visualize the results of these queries, and then tell stories with your data using dashboards. -#### Dune的数据可视化 +#### Data available on Dune -在屏幕背后,Dune将晦涩的数据转换成容易阅读的数据表。使用SQL查询,你能准确得筛选出你需要的信息。 +Behind the scenes, Dune transforms difficult-to-access data into human-readable tables. Using SQL queries, you can query for exactly the information you need. -Dune既提供原始区块链数据也提供已解码的数据。只有有用户向我们提出了合约解码的需求,我们才提供对应的解码数据。 你可以在这里提交解码需求[网页](https://dune.xyz/contracts/new).\ +Dune has raw blockchain data and decoded blockchain data available. Decoded data is only available if somebody signaled to us before that a contract needs to be decoded. You can signal a decoding request to us via our [website](https://dune.xyz/contracts/new).\ \ -目前你可以查询以下的链上数据 **Ethereum, Polygon, Binance Smart Chain, Optimism** 和 **Gnosis Chain**. +You can currently query data from **Ethereum, Polygon, Binance Smart Chain, Optimism** and **Gnosis Chain**. -Dune提取区块链上我们索引的时间和内部调用,我们不规定和存储数据。 +Dune picks up events and internal calls from the blockchains we index, we don't have state/storage data. -## 查询 +## Queries -Dune将区块链的数据聚合到易于检索的数据库中。通过查询,你可以限定输出哪些数据。 +Dune aggregates blockchain data into SQL databases that can be easily queried. Queries are used to specify what data from the blockchain should be returned. -你也许想了解 _今天所有去中心化交易所的交易额_, 或者 _今年稳定币的铸造数量_。 不管是哪个问题,你都可以通过查询来解答。 +Maybe you want to know _all the Dex trades that happened today_, or the _total value of stablecoins minted this year_. Whatever the question, the answer likely starts with a Dune query. -查询同时返回数据的行和列 (与传统的SQL查询类似),你可以用来可视化展示。 +Queries return rows and columns of data (same as traditional SQL queries) that can later be visualized and presented. ![Screen Shot 2021-04-22 at 9 56 34 AM](https://user-images.githubusercontent.com/76178256/115726979-357d1380-a351-11eb-83ee-16f0d57c6ecb.png) -一名区块链分析师(比如你)可以有很多途径开始一条查询: +There are a few ways that a blockchain analyst (ie. you!) can get started running queries: -1. 使用Dune的 _抽象表_ 来查询常用数据表。这是最简单的也是最常用的使用Dune的方式。一些常用的抽象表包括`dex.trades`,`lending.borrow`和`stablecoin.transfer` (你可以在这里找到完整的抽象表列表[这里](https://github.com/duneanalytics/abstractions)) -2. 查询区块、日志和交易在内的原始以太坊数据。 -3. 中心化交易所的数据也是可以查询的。通过使用`prices.usd`可以迅速的返回几乎任意一种加密货币的价格。 +1. Use Dune _abstractions_ to query commonly used data tables. This is the simplest and most common way to use Dune. Some popular abstractions include `dex.trades`, `lending.borrow`, and `stablecoin.transfer` (you can find a complete list of abstractions [here](https://github.com/duneanalytics/abstractions)) +2. Query the raw ethereum data including blocks, logs, and transactions. +3. It is also possible to query centralized exchange data. Use `prices.usd` to quickly return the price of almost any cryptoasset -## 可视化 +## Visualizations -表中的数据 (行和列)有时不易阅读。结果的可视化可以更清晰准确地展示信息。 +Data presented in table form (rows and columns) can be difficult to read. Visualizations take the results of a query and present the information in a clear & precise way. -你可以开始通过可视化来讲述你的内容。通过Dune你可以轻松地将: +You can use visualizations to begin to tell a story with your data. With Dune visualizations it is easy to transform this: ![Screen Shot 2021-04-22 at 10 59 48 AM](https://user-images.githubusercontent.com/76178256/115737269-fa331280-a359-11eb-9a31-c0dfe4b038e6.png) -转化为: +Into this: ![Screen Shot 2021-04-22 at 11 01 02 AM](https://user-images.githubusercontent.com/76178256/115737692-5b5ae600-a35a-11eb-8145-bdcf9396cd03.png) -这个柱状图清晰地展示了最高的交易量发生在4月19日,同时帮助观众了解了时间趋势。 +The bar chart visualization makes it clear that April 19th had the highest transfer volume, and helps the audience see the trend over time. -Dune提供了可是展示数据的一系列的可视化选择,包括柱状图,面积图,线图,饼图等等。 +Dune offers a variety of visualizations that you can use to visually present data including bar charts, area charts, line charts, pie charts, and more. -## 仪表盘 +## Dashboards -使用精心设计的视觉展示,聪明的区块链分析师可以讲述关于特定数据组的内容。例如,在下文中,[仪表盘](https://dune.xyz/hagaetc/dex-metrics) 顶部展示了'Dex'在增长。观众来可以通过下面的展示发现,哪些去中心化交易所的交易额是较高的,最终通过累积的柱状图来能发现随时间变化的趋势。只需要看这一个仪表盘,观众就能清楚地看到整个DEX市场的情况。 +Using carefully planned visuals, a clever blockchain analyst can tell a story about a particular group of data. For example, in the below[ dashboard](https://dune.xyz/hagaetc/dex-metrics) it is clear at the top that 'Dex' as a category is growing. Below, the audience sees which dex's are the most popular by volume, and finally can view a stacked bar chart that shows changes over time. By just looking at this single dashboard, the audience sees a clear picture of the entire DEX market. ![Screen Shot 2021-04-23 at 10 51 25 AM](https://user-images.githubusercontent.com/76178256/115889404-e7841080-a421-11eb-9e30-8d43e58e28f4.png) -## Dune需要协作 +## Dune is a collaborative effort -Dune默认所有查询和数据库都是公开的。 +On Dune, all queries and datasets are public by default. -这引入了一个有趣的动态,在这个动态中,用户可以轻松地分叉和混合其他创建者的查询,并在他们的知识基础上进行构建。另一方面,每次编写新查询时,你都会参与查询贡献,帮助人们查询Dune上的数据。Dune社区通过不断改进的查询范围获得共同成功,你可以轻松查询所需的统计信息。 +This introduces an interesting dynamic in which you, the user, can fork and remix the queries of other creators with ease and build on top of their knowledge. On the other side, every time you write a new query, you contribute to the collection of queries that help people query for data on dune. That way, the Dune Community succeeds together through an ever improving range of queries that allow you to easily query for just the stats you need. -如果你对查询的隐私性有需求, 你可以订阅[pro Plan](https://dune.xyz/pricing)。 +If you do need Privacy for your Queries, the [pro Plan](https://dune.xyz/pricing) has got you covered. -加入我们 [Discord社区](https://discord.gg/BJBHFR6sdy) 来获得我们团队和社区的帮助。 +Join our [Community Discord](https://discord.gg/BJBHFR6sdy) to get world class support from our team and the community. -如果有任何反馈意见,不管是功能需求还是报告错误,你都可以在这里提交[这里](https://feedback.dune.xyz/). +If you have any feedback, whether feature requests or bug reports, you can submit it [here](https://feedback.dune.xyz/). diff --git a/SUMMARY.md b/SUMMARY.md index 9a142c1..8c30513 100644 --- a/SUMMARY.md +++ b/SUMMARY.md @@ -1,100 +1,100 @@ # Table of contents -* [Dune介绍](README.md) - -## 关于Dune - -* [使用案例](about/usecases/README.md) - * [项目仪表盘](about/usecases/project-dashboards.md) - * [细分仪表盘](about/usecases/sector-dashboards.md) - * [生态仪表盘](about/usecases/ecosystem-dashboards.md) -* [教程](about/tutorials/README.md) - * [网络课程](about/tutorials/our-network-course.md) - * [Dune指南](about/tutorials/dune-guides/README.md) - * [查询技巧](about/tutorials/dune-guides/tips.md) - * [SQL指南](about/tutorials/sql-guides.md) - * [视频教程](about/tutorials/video-series.md) - * [查询模板](about/tutorials/queries/README.md) - * [钱包的ETH余额](about/tutorials/queries/eth-balance-of-a-wallet.md) - * [钱包交易的原始数据](about/tutorials/queries/tx-wallet.md) - * [钱包的矿工费指标](about/tutorials/queries/gas-metrics-per-wallet.md) - * [价格查询](about/tutorials/queries/price-queries.md) - * [代币随时间的总供应量](about/tutorials/queries/supply.md) - * [一段时间的用户和交易量](about/tutorials/queries/untitled-6.md) - * [交易事件中代币的美元价格](about/tutorials/queries/untitled-3.md) - * [Uniswap代币的美元价格](about/tutorials/queries/untitled-2.md) - * [一段时间内一个钱包的代币(和美元价值)](about/tutorials/queries/untitled-1.md) - -## 数据表 - -* [数据表](data-tables/data-tables/README.md) +* [Introduction to Dune](README.md) + +## About Dune + +* [Use Cases](about/usecases/README.md) + * [Project Dashboards](about/usecases/project-dashboards.md) + * [Sector Dashboards](about/usecases/sector-dashboards.md) + * [Ecosystem Dashboards](about/usecases/ecosystem-dashboards.md) +* [Tutorials](about/tutorials/README.md) + * [Our Network course](about/tutorials/our-network-course.md) + * [Dune Guides](about/tutorials/dune-guides/README.md) + * [Tips for querying](about/tutorials/dune-guides/tips.md) + * [SQL guides](about/tutorials/sql-guides.md) + * [Video Series](about/tutorials/video-series.md) + * [Query templates](about/tutorials/queries/README.md) + * [ETH Balance of a wallet](about/tutorials/queries/eth-balance-of-a-wallet.md) + * [raw transactions per wallet](about/tutorials/queries/tx-wallet.md) + * [gas metrics per wallet](about/tutorials/queries/gas-metrics-per-wallet.md) + * [price queries](about/tutorials/queries/price-queries.md) + * [total supply over time of a token](about/tutorials/queries/supply.md) + * [Users and amount over a trailing period](about/tutorials/queries/untitled-6.md) + * [USD value of token utilised for an event](about/tutorials/queries/untitled-3.md) + * [USD price for a token from Uniswap](about/tutorials/queries/untitled-2.md) + * [Token (and USD value) per token over time for an address](about/tutorials/queries/untitled-1.md) + +## Data Tables + +* [Data tables](data-tables/data-tables/README.md) * [nft.trades](data-tables/data-tables/nft.trading.md) - * [原始数据](data-tables/data-tables/raw-data/README.md) - * [以太坊数据](data-tables/data-tables/raw-data/ethereum-data.md) - * [xDai数据](data-tables/data-tables/raw-data/xdai-data.md) - * [已解码数据](data-tables/data-tables/decoded-data.md) - * [代币标准](data-tables/data-tables/special-tables.md) - * [ERC-20代币余额](data-tables/data-tables/erc-20-balances.md) - * [抽象表](data-tables/data-tables/abstractions.md) - * [用户生成表](data-tables/data-tables/user-generated.md) - * [价格表](data-tables/data-tables/prices.md) - * [标签](data-tables/data-tables/labels.md) - * [Solana数据](data-tables/data-tables/solana-data/README.md) - * [更新日志](data-tables/data-tables/solana-data/changelog.md) - * [第三方数据](data-tables/data-tables/community-data/README.md) + * [Raw Data](data-tables/data-tables/raw-data/README.md) + * [Ethereum data](data-tables/data-tables/raw-data/ethereum-data.md) + * [xDai Data](data-tables/data-tables/raw-data/xdai-data.md) + * [Decoded Data](data-tables/data-tables/decoded-data.md) + * [Token standards](data-tables/data-tables/special-tables.md) + * [ERC-20 balances](data-tables/data-tables/erc-20-balances.md) + * [Abstractions](data-tables/data-tables/abstractions.md) + * [User Generated](data-tables/data-tables/user-generated.md) + * [Prices](data-tables/data-tables/prices.md) + * [Labels](data-tables/data-tables/labels.md) + * [Solana Data](data-tables/data-tables/solana-data/README.md) + * [Changelog](data-tables/data-tables/solana-data/changelog.md) + * [Third Party Data](data-tables/data-tables/community-data/README.md) * [Flashbots](data-tables/data-tables/community-data/flashbots.md) -## Dune V2 (beta) +## Dune Engine V2 (beta) -* [Dune V2介绍](dune-engine-v2-beta/dunes-new-query-engine.md) -* [查询引擎](dune-engine-v2-beta/query-engine.md) -* [Dune V2抽象表](dune-engine-v2-beta/abstractions-in-dunev2.md) +* [Dune V2 Intro](dune-engine-v2-beta/dunes-new-query-engine.md) +* [Query Engine](dune-engine-v2-beta/query-engine.md) +* [Abstractions in Dune V2](dune-engine-v2-beta/abstractions-in-dunev2.md) ## Dune App -* [查询编辑器](duneapp/query-editor.md) -* [可视化](duneapp/visualizations/README.md) - * [图表](duneapp/visualizations/graphs.md) - * [计数器](duneapp/visualizations/counters.md) - * [饼图](duneapp/visualizations/pie-charts.md) -* [仪表盘](duneapp/dashboards.md) -* [参数](duneapp/parameters.md) -* [添加新合约](duneapp/adding-new-contracts.md) +* [Query Editor](duneapp/query-editor.md) +* [Visualizations](duneapp/visualizations/README.md) + * [Graphs](duneapp/visualizations/graphs.md) + * [Counters](duneapp/visualizations/counters.md) + * [Pie Charts](duneapp/visualizations/pie-charts.md) +* [Dashboards](duneapp/dashboards.md) +* [Parameters](duneapp/parameters.md) +* [Adding new contracts](duneapp/adding-new-contracts.md) ## Onboarding -* [入门Dune](onboarding/onboarding-to-dune.md) +* [Onboarding to Dune](onboarding/onboarding-to-dune.md) -## 赏金计划 +## Bounties -* [Wizard需求计划](bounties/wizard-request-program.md) +* [Wizard Request Program](bounties/wizard-request-program.md) -## 跨网站使用Dune图表 +## Dune Charts across the web -* [内容归属](sharing/attribution.md) -* [嵌入第三方平台](sharing/embeds/README.md) +* [Attribution](sharing/attribution.md) +* [Embeds](sharing/embeds/README.md) * [Discord](sharing/embeds/discord.md) * [Twitter](sharing/embeds/twitter.md) * [Webpages](sharing/embeds/webpages.md) * [Mirror.xyz](sharing/embeds/mirror.xyz.md) * [Known Issues](sharing/embeds/known-issues.md) -## 资源 +## Resources * [Press Kit](resources/press-kit.md) ## FAQ -* [Dune是如何获取数据的?](faq/how-does-dune-get-its-data.md) -* [Dune有API吗?](faq/does-dune-have-an-api.md) -* [Dune有代币吗?](faq/does-dune-have-a-token.md) -* [查询结果如何刷新?](faq/how-are-results-refreshing.md) +* [How does Dune get it's data ?](faq/how-does-dune-get-its-data.md) +* [Does Dune have an API?](faq/does-dune-have-an-api.md) +* [Does Dune have a Token?](faq/does-dune-have-a-token.md) +* [How are results refreshing?](faq/how-are-results-refreshing.md) -## 更新日志 +## Changelog -* [Dune的变化](changelog/dune-changes/README.md) - * [2021年3月](changelog/dune-changes/march-2021.md) - * [2020年8月](changelog/dune-changes/august-2020.md) - * [2020年3月](changelog/dune-changes/march-2020.md) - * [2020年1月](changelog/dune-changes/january-2020.md) - * [2019年10月](changelog/dune-changes/october-2019.md) +* [Changes to Dune](changelog/dune-changes/README.md) + * [March 2021](changelog/dune-changes/march-2021.md) + * [August 2020](changelog/dune-changes/august-2020.md) + * [March 2020](changelog/dune-changes/march-2020.md) + * [January 2020](changelog/dune-changes/january-2020.md) + * [October 2019](changelog/dune-changes/october-2019.md) diff --git a/about/tutorials/README.md b/about/tutorials/README.md index b538c03..eb7bc74 100644 --- a/about/tutorials/README.md +++ b/about/tutorials/README.md @@ -1,14 +1,14 @@ -# 教程 +# Tutorials -## 如何开始 +## How to get started -**Dune是为技术和非技术人员构建的** \ -不论你是一个经验丰富的SQL开发人员还是刚刚起步的使用者,你都可以使用我们的平台,很快的开始分析区块链数据。 +**Dune is made for technical and non-technical users alike.** \ +Whether you are a seasoned SQL developer or just starting out, you can use our platform to start analyzing Blockchain data in an instant. -Dune团队和我们的一些社区成员已经制作了很好的内容,这些内容可以帮助你成为Dune巫师(Wizard)。 +The Dune Team and several of our community members have produced great content to aid you in your journey of becoming a Dune Wizard. -你可以从观看我们的视频系列开始 [这里](video-series.md) 或者通过文字教程 [这里](dune-guides/).\ -如果你对SQL完全不熟悉,不妨先用所列的SQL指南学习一下SQL [这里](sql-guides.md). +You can either start out by watching our video series [here](video-series.md) or looking through written tutorials [here](dune-guides/).\ +If you are entirely unfamiliar with SQL, it might be good to start off by learning some SQL with the guides listed [here](sql-guides.md). {% content-ref url="video-series.md" %} [video-series.md](video-series.md) @@ -22,22 +22,23 @@ Dune团队和我们的一些社区成员已经制作了很好的内容,这些 [dune-guides](dune-guides/) {% endcontent-ref %} -## 你需要知道哪些? +## What do you need to know? -#### SQL知识 +#### SQL knowledge -要想在Dune上成功地查询到数据,需要对SQL有一个基本的了解。\ -PostgreSQL数据库几乎在各行各业都被广泛使用,你可以找到很多关于它的非Dune专用的文档。这往往有助于回答与查询有关的问题,因为大多数答案可以在互联网上很容易找到。[PostgreSQL 文档](https://www.postgresql.org/docs/12/index.html) 官方文档也很有帮助. Dune运行在 PostgreSQL 12.2上. +A fundamental understanding of SQL is needed to be able to successfully query for data on Dune.\ +PostgreSQL Database Systems are widely used across almost all walks of life and you can find a lot of non Dune specific documentation about it. This often times helps with answering query related questions since most answers can easily be found in the internet. The official [PostgreSQL documentation](https://www.postgresql.org/docs/12/index.html) is quite helpful as well. Dune runs on PostgreSQL 12.2. -#### 以太坊虚拟机(EVM)数据 +#### Ethereum Virtual Machine data -你能在链上找到的数据,在Dune的数据库中基本都能找到,这个过程在许多方面都与理解以太坊虚拟机的整体工作方式有关,还需要理解具体的智能合约是如何工作的。如果你能够阅读Etherscan中的大部分数据,你就已经在能够在dune上熟练的查询各种数据了。\ -然而目前我们真的没有一个很好的资源可以提供,因为每个智能合约都有自己的规则。我们已经在我们的网站上写了一些关于这个问题的教程。[Section "decoded data"](../../data-tables/data-tables/decoded-data.md). +The data you will find on chain and therefore in Dune's databases is in many ways connected to understanding how the Ethereum Virtual Machine works as a whole and then in more specific terms understanding how the specific smart contracts work. If you are able to read most of the data in Etherscan, you are already well on your way to being able to query for things on dune.\ +Unfortunately there really isn't one great resource we can point you to currently as each smart contract has it's own rules. We have written up a few words on this in our [Section "decoded data"](../../data-tables/data-tables/decoded-data.md). -#### 业务理解 +#### Business Understanding -以上这些对你们中的一些人来说可能是一个惊喜,但实际上了解什么样的数据对你的项目或主题是有用的,是成为一个厉害的数据分析师的基础。\ +This is something that might come as a surprise to some of you, but actually understanding what kinds of data is interesting for your project or topic is a fundamental part of becoming a great wizard. \ \ -问你自己: **哪些数据是我的项目所关心和需要的,可以帮助我的决策过程 ?** +Ask yourself: **What Data is interesting and needed for my project to make better decisions ?** + +There is a thousand ways to go about finding what metrics are interesting to your project, but talking to the community of the project or the founders usually yields good results. -有上千种方法去寻找你的项目对哪些指标感兴趣,多与项目的社区或创始人交流通常会产生好的结果。 diff --git a/about/tutorials/dune-guides/README.md b/about/tutorials/dune-guides/README.md index f9228bd..54a80a7 100644 --- a/about/tutorials/dune-guides/README.md +++ b/about/tutorials/dune-guides/README.md @@ -1,6 +1,6 @@ -# Dune 指南 +# Dune Guides -我们的一些社区成员已经为Dune制作了很棒的教程。 +Some of our Community Members have produced great written tutorials for Dune: [Andrew Hong](https://twitter.com/andrewhong5297) @@ -31,6 +31,6 @@ -这些指南都很好,我们建议阅读所有的指南。\ +These guides are all great and we recommend reading all of them.\ \ -非常**感谢**这些指南的作者,你们太了不起了! +Big **thank you** to the authors of these guides, you are amazing! diff --git a/about/tutorials/dune-guides/tips.md b/about/tutorials/dune-guides/tips.md index ae1722f..8f64ca4 100644 --- a/about/tutorials/dune-guides/tips.md +++ b/about/tutorials/dune-guides/tips.md @@ -1,34 +1,34 @@ -# 查询技巧 +# Tips for querying -你可以通过我们的界面与数据表进行互动,网址是 [dune.xyz](https://www.dune.xyz/). +You can interact with the data tables through our interface at [dune.xyz](https://www.dune.xyz/). -要创建一个新的查询,你只需点击右上角的`New Query`。 +To create a new query you simply click `New Query` in the top right corner ![](https://i.imgur.com/dMHavC8.png) -在你的左边,你可以在下拉列表中选择你要使用的数据库,然后在窗口中看到数据表。只要搜索你感兴趣的项目就可以了。 +On your left you can select which database you want to use in the dropdown list and then see the data tables in the window. Just search for the project you are interested in working with. -## 使用抽象表(abstractions) +## Use abstractions -使用Dune Analytics进行分析的最简单方法是使用准备好的[抽象表](.../.../data-tables/data-tables/abstractions.md)表,如`dex.trades`。所有的表都是经过清理的,包含了数据和元数据(如人类可读的标记符号),使它们查询会非常便捷。 +The easiest way to do great analysis with Dune Analytics is to use prepared [abstractions](../../../data-tables/data-tables/abstractions.md) tables like `dex.trades`. All tables are cleaned and contains data and metadata (like human readable token symbols) that make them very straight forward to query. -## 在查询中使用以太坊地址 +## Using Inline Ethereum addresses -在Dune中,以太坊地址被存储为postgres字节数,并以`x`前缀进行编码。这与习惯的`0x`前缀不同。如果你想使用一个地址,比如说过滤一个给定的代币,你可以这样做 +In Dune Ethereum addresses are stored as postgres bytearrays which are encoded with the `\x` prefix. This differs from the customary `0x` prefix. If you’d like to use an inline address, say to filter for a given token, you would do ```sql WHERE token = '\x6b175474e89094c44da98b954eedeac495271d0f' ``` -是下面的简洁版本 +which is simply short for ```sql WHERE token = '\x6b175474e89094c44da98b954eedeac495271d0f'::bytea ``` -## 引用驼峰字母的列名和表名 +## Quote camel case column and table names -列和表的名称大多直接取自智能合约的ABI,没有任何修改。由于大多数智能合约是用Solidity编写的,而且是用驼峰命名惯例编写的,所以Dune的许多表和列名也是如此。Postgres要求你用双引号去区分的列和表的大小写。 +Column and table names are mostly taken directly from smart contract ABIs, with no modification. Since most smart contracts are written in Solidity, and written with a camelCased naming convention, so is many of Dune’s table and column names. Postgres requires you to quote columns and tablenames that are case sensitive: ```sql SELECT “columnName” @@ -36,7 +36,7 @@ FROM projectname.”contractName_evt_EventName” LIMIT 10 ``` -在Postgres中,双引号是为表和列保留的,而单引号是为值保留的: +In Postgres, double quotes are reserved for tables and columns, whereas single quotes are reserved for values: ```sql SELECT “columnName” @@ -45,61 +45,60 @@ WHERE contract_address = '\x6B175474E89094C44Da98b954EedeAC495271d0F' LIMIT 10 ``` -模式(schemas)在Dune中总是小写的。 +Schemas are always lowercase in Dune. ## Remove decimals -以太币转账和大多数ERC-20代币都是18位数字。为了得到一个更适合人类阅读的数字,你需要去掉所有的代表小数的0。表`erc20.tokens`为你提供了流行代币的合约地址、符号和小数点的数量。然后将代币价值转移除以10的小数点幂。 +Ether transfers and most ERC-20 tokens have 18 decimal places. To get a more human readable number you need to remove all the decimals. The table `erc20.tokens` gives you contract address, symbol and number of decimals for popular tokens. Token value transfers are then divided by 10 to the power of decimals from this table: `transfer_value / 10^erc20.tokens.decimals` -## 使用`date_trunc`获得时间 +## Use `date_trunc` to get time -我们在解码的事件表中加入了`evt_block_time`,以方便你使用。使用它的一个很好的方法是与`date_trunc`函数一起使用,像这样 +We’ve added `evt_block_time` to decoded event tables for your convenience. A neat way to use it is with the `date_trunc` function like this ```sql SELECT date_trunc('week', evt_block_time) AS time ``` -你可以用minute, day, week, month. +Here you can use minute, day, week, month. -## 如何获得美元价格(USD) +## How to get USD price To get the USD volume of onchain activity you typically want to join the smart contract event you are looking at with the usd price and join on minute. Also make sure that asset matches asset. -为了获得链上活动的美元交易量,你通常要将你所看的智能合约事件与美元价格就行关联,以分钟为关联的键,还要确保资产与资产相匹配。 + ```sql LEFT JOIN prices.usd p ON p.minute = date_trunc('minute', evt_block_time) AND event."asset" = p.contract_address ``` -然后,你可以在你的`SELECT`语句中简单地将智能合约事件的价值或金额与美元价格相乘:`* p.price`。 - -## 代币符号 +Then you can simply multiply the value or amount from the smart contract event with the usd price in your `SELECT` statement: `* p.price`. -你经常想按代币地址来分组查询结果。例如,你想看到按代币查询在DEX上的交易量。然而,一大堆代币地址的列表是抽象的,难以理解的。 +## Token symbols -因此,你经常想用代币符号来代替,简单地将表`erc20.tokens`与你的事件表关联起来,使用asset=token地址。然后你就可以用代币的符号代替地址。 +You often want to group your results by token address. For instance you want to see volume on a DEX grouped by token. However, a big list of token addresses are abstract and hard to digest. -**NB** `erc20.tokens`表包含了一些流行的代币。如果你正在处理更多晦涩难懂的代币,你应该注意与该表的关联,因为不在coincap表中的代币可能被排除在你的结果之外。 +Therefore you often want to use the token symbol instead. Simply join the table `erc20.tokens` with your event table where asset = token address. You then select symbol in your select statement instead of token address. +**NB** The `erc20.tokens` table cointains a selection of popular tokens. If you are working with more obscure tokens you should be careful with joining with this table because tokens that are not in the coincap table might be excluded from your results. -## 用参数过滤查询和仪表盘 +## Filter queries and dashboards with parameters -参数可以把你的查询或仪表盘变成区块链数据的应用程序。 +Parameters can turn your query or dashboard into an app for blockchain data. -在查询编辑器页面上点击SQL编辑器右下方的`Add parameter`。 +Click `Add parameter` in the bottom right of the SQL editor on the query editor page ![](https://i.imgur.com/rYJVSqA.png) -双层大括号将出现在你的查询中`{{}}`。在这些大括号中,你可以放入你的参数名称,如 `token symbol`或`holder address`。 +Double curly bracets will appear in your query `{{}}`. Inside these you put the name of your paramter like `token symbol` or `holder address`. -注意,如果你想在你的查询中使用参数`WHERE token = '{{token symbol}}'`,你需要加上单引号。 +Note that you need to put single quotes if you want to use the parameter in your query `WHERE token = '{{token symbol}}'`. -为了使用户不必为地址输入`\x`,一个有用的地址格式化是这样的。 +To save the user from having to put in `\x` for the address a useful formatting of addresses is this one: ```sql WHERE contract_address = CONCAT('\x', substring('{{token address}}' from 3))::bytea ``` -这让你的查询用户在过滤时只需粘贴`0xc00e94cb662c3520282e6f5717214004a7f26888`而不是`\xc00e94cb662c3520282e6f5717214004a7f26888`。 +This let’s a user of your query simply paste in `0xc00e94cb662c3520282e6f5717214004a7f26888` instead of `\xc00e94cb662c3520282e6f5717214004a7f26888` when they filter. diff --git a/about/tutorials/our-network-course.md b/about/tutorials/our-network-course.md index 8400faa..2e530ce 100644 --- a/about/tutorials/our-network-course.md +++ b/about/tutorials/our-network-course.md @@ -1,14 +1,13 @@ # Our Network course -我们来自OurNetwork的朋友与Dune Analytics合作创建了一个课程,在30天内教给30人web3数据分析。 +Our friends from OurNetwork have created a course in cooperation with Dune Analytics that taught 30 people web3 data in 30 days. -该课程涵盖了成为一名的Dune创作者的所有主题,并向所有人免费提供。它由Dune上的一些最好的创作者主讲,是开始你的Dune之旅的好地方。 +The course consists of presentations around all important topics that you need to become a Dune Creator and is available for free to everyone. It was hosted by some of the best creators we have on Dune nowadays and is currently the place to start your Dune Journey. -更多的细节信息和课程资料可以从下面找到: +More details and course materials can be found here: [https://ournetwork.mirror.xyz/gP16wLY-9BA1E\_ZuOSv1EUAgYGfK9mELNza8cfgMWPQ](https://ournetwork.mirror.xyz/gP16wLY-9BA1E\_ZuOSv1EUAgYGfK9mELNza8cfgMWPQ) Please consider buying an edition of the mirror post to support the teachers of this course. -请考虑购买mirror,以支持本课程的教师。 diff --git a/about/tutorials/queries/README.md b/about/tutorials/queries/README.md index a91268e..68ab646 100644 --- a/about/tutorials/queries/README.md +++ b/about/tutorials/queries/README.md @@ -1,12 +1,13 @@ -# 查询模板 +# Query templates -**根据我们的经验,你最好在Dune周围寻找你可能感兴趣的查询,并查看这些查询的源代码来学习。** +**In our experience, you are best off looking around Dune and finding queries that you might find interesting and looking at the source code of those to learn.** -Dune是一个由用户共享的协作的平台。所有数据分析师的复合知识将使你以最快的方式获得结果。 -看到查询的结果和反馈,确实可以让你更直观地参与到内容中去,学习得更快。\ -**找到优秀的查询创建者,并将他们的查询分叉,以获得最大的效率。** +Dune is a collaborative endeavour that is shared by it's users. The compounded knowledge of all analysts will allow you to get to results the fastest way.\ +Seeing the queries live and in action does allow you to more intuitively engage with the content and learn faster. -**我们一些最好的创作者:** +**Find great query creators and fork their queries for maximum efficiency.** + +**Some of our best creators are these:** * [https://dune.xyz/hagaetc](https://dune.xyz/hagaetc) * [https://dune.xyz/rchen8](https://dune.xyz/rchen8) @@ -16,7 +17,7 @@ Dune是一个由用户共享的协作的平台。所有数据分析师的复合 * \*\*\*\*[https://dune.xyz/Siang513](https://dune.xyz/Siang513) * [https://dune.xyz/keeganead](https://dune.xyz/keeganead) -**我们在此收集了一些查询,以做简单介绍:** +**Nevertheless we have collected some queries here for a simple introduction:** {% content-ref url="untitled-6.md" %} [untitled-6.md](untitled-6.md) diff --git a/about/tutorials/queries/eth-balance-of-a-wallet.md b/about/tutorials/queries/eth-balance-of-a-wallet.md index a41e985..22bc42a 100644 --- a/about/tutorials/queries/eth-balance-of-a-wallet.md +++ b/about/tutorials/queries/eth-balance-of-a-wallet.md @@ -1,6 +1,6 @@ -# 钱包的ETH余额 +# ETH Balance of a wallet -这个查询可以得出一个钱包在一段时间内的ETH余额。 +This Query yields the ETH balance of a wallet over time. ```sql Select sum(transfer) over (order by day asc), day @@ -35,4 +35,4 @@ SELECT date_trunc('day', block_time) as day, sum(-value/1e18) as transfer ) as x ``` -原作者: [https://twitter.com/MSilb7](https://twitter.com/MSilb7) +Original author: [https://twitter.com/MSilb7](https://twitter.com/MSilb7) diff --git a/about/tutorials/queries/gas-metrics-per-wallet.md b/about/tutorials/queries/gas-metrics-per-wallet.md index 399537a..ecf3ad8 100644 --- a/about/tutorials/queries/gas-metrics-per-wallet.md +++ b/about/tutorials/queries/gas-metrics-per-wallet.md @@ -1,6 +1,6 @@ -# 每个钱包的gas花费 +# gas metrics per wallet -### 总的gas费用(USD) +### Running Total of Gas Paid in USD ```sql with alltransactions @@ -33,7 +33,7 @@ ON date_trunc('minute', block_time) = minute ORDER BY block_time DESC ``` -### 总的gas费用(ETH) +### Running Total of Gas Paid in ETH ```sql with alltransactions @@ -58,7 +58,7 @@ FROM alltransactions ORDER BY block_time DESC ``` -### 平均gas费用 +### Average Gas Price Paid ```sql with alltransactions @@ -81,7 +81,7 @@ SELECT FROM alltransactions ``` -### 平均gas费用(USD) +### Average Gas Fee in USD ```sql with alltransactions @@ -113,7 +113,7 @@ LEFT JOIN ON date_trunc('minute', block_time) = minute ``` -### 最高gas费用(USD) +### Highest Gas Fee Paid in USD ```sql with alltransactions @@ -145,7 +145,7 @@ LEFT JOIN ON date_trunc('minute', block_time) = minute ``` -### 每月gas费用(USD) +### Gas Fees Paid by Month in USD ```sql with alltransactions diff --git a/about/tutorials/queries/price-queries.md b/about/tutorials/queries/price-queries.md index d29ba7e..2577baf 100644 --- a/about/tutorials/queries/price-queries.md +++ b/about/tutorials/queries/price-queries.md @@ -1,6 +1,6 @@ -# 价格查询 +# price queries -### 中心化交易所价格数据 +### Centralized exchange price data ```sql Select @@ -14,7 +14,7 @@ WHERE symbol = '{{1. Symbol}}' and minute > now() - interval '1hour' ``` -### 去中心化交易所价格数据 +### Decentralized exchange price data ```sql Select @@ -28,9 +28,9 @@ WHERE symbol = '{{1. Symbol}}' and hour > now() - interval '1000hour' ``` -这个查询以来erc20.tokens表,当该小时内没有提交的交易时,可能会出现空隙。 +This Query depends on the erc20.tokens table and can have gaps when there are no trades that been committed in that hour. -对于一个更好但更复杂的版本,使用这个: +For a better but more complicated to navigate version use this: ```sql with dex_trades AS ( @@ -107,4 +107,4 @@ with dex_trades AS ( AND d.hour < b.next_hour -- Yields an observation for every hour after the first transfer until the next hour with transfer ``` -这将根据dex交易数据按小时返回价格,并填补没有进行过交易的空白行。你可以在第53行调整所需的交易样本量,以便获取价更好的格数据。这可以帮助修正arbritrage机器人在dexes上获得奇怪价格的异常情况。如果你有这方面的问题,请在Discord上与我们联系。 \ No newline at end of file +This will return the price by hour according to dex trading data and fill in gaps where there have been no trades commited. You can adjust the sample size of trades required to carry the price data forward in line 53. This can help ammend edge cases where arbritrage bots get weird prices on dexes. If you have issues with this, please reach out to us on Discord. diff --git a/about/tutorials/queries/supply.md b/about/tutorials/queries/supply.md index 577c288..c5ad313 100644 --- a/about/tutorials/queries/supply.md +++ b/about/tutorials/queries/supply.md @@ -1,8 +1,8 @@ -# 代币在一段时间内的总供应量 +# total supply over time of a token -你可以使用该token的合约表,只要他们被解码([decoded](../../../data-tables/data-tables/decoded-data.md)): +You can either use that token's specific tables as long as they are [decoded](../../../data-tables/data-tables/decoded-data.md): ```sql SELECT @@ -24,8 +24,9 @@ UNION ) as net; ``` -或者你可以使用一些更通用的方式查询,就像这个: -(请注意,虽然这对大多数ERC20代币都有效,但有些代币的结构有细微变化,这个查询就会不起作用。) +Or you can use a more general purpose query like this one: + +(Please note that while this works for most tokens, some tokens do have slight changes in their structure that break this query) ```sql Select diff --git a/about/tutorials/queries/tx-wallet.md b/about/tutorials/queries/tx-wallet.md index 1644b56..761d488 100644 --- a/about/tutorials/queries/tx-wallet.md +++ b/about/tutorials/queries/tx-wallet.md @@ -1,6 +1,6 @@ -# 每个钱包的原始交易 +# raw transactions per wallet -### 总交易笔数 +### Total # of Transactions ```sql with alltransactions @@ -24,7 +24,7 @@ FROM alltransactions ``` -### 交易成功率 +### Transaction Success Rate ```sql with alltransactions @@ -50,7 +50,7 @@ GROUP by success ORDER BY success DESC ``` -### 某时间的总交易笔数 +### Running Total of # of Transactions ```sql with alltransactions diff --git a/about/tutorials/queries/untitled-1.md b/about/tutorials/queries/untitled-1.md index 0e0c8ee..6ed74f4 100644 --- a/about/tutorials/queries/untitled-1.md +++ b/about/tutorials/queries/untitled-1.md @@ -1,6 +1,6 @@ -# 一个地址的每个代币(和美元价值)在一段时间内的情况 +# Token (and USD value) per token over time for an address -请注意,当在很长一段时间内有许多代币和转让时,这个查询会变得非常繁重。 +Note that this query can get very heavy when there are many tokens and transfers over a long period of time. ```sql WITH transfers AS ( diff --git a/about/tutorials/queries/untitled-2.md b/about/tutorials/queries/untitled-2.md index f1a102d..993836d 100644 --- a/about/tutorials/queries/untitled-2.md +++ b/about/tutorials/queries/untitled-2.md @@ -1,10 +1,10 @@ -# 某一代币在Uniswap上的美元价格 +# USD price for a token from Uniswap -在Dune Analytics上获取代币美元价格的最常见和最简单的方法是使用`prices.usd`表。然而,这个数据是从中心化交易所获取的,所以对于长尾(小众)的代币,最好的方法是从Uniswap获取价格。 +The most common and easiest way to get token USD prices on Dune Analytics is with the `prices.usd` table. However, this data is fetched from centralised exchanges so for a long tail of tokens the best approach is to get prices from Uniswap. -这个查询使用WETH对,用来映射到美元价格。该查询可以被修改,以适用于任何有`prices.usd`价格的代币。 +This query uses WETH pairs, which is used to map to USD price. The query can be modified to work with any token that has a price in `prices.usd` -你可以在这里找到相关内容[这里](https://explore.dune.xyz/queries/11050/source?p\_Token%20address=0xeb4c2781e4eba804ce9a9803c67d0893436bb27d). +You can find this query on Dune [here](https://explore.dune.xyz/queries/11050/source?p\_Token%20address=0xeb4c2781e4eba804ce9a9803c67d0893436bb27d). ```sql WITH weth_pairs AS ( -- Get exchange contract address and "other token" for WETH diff --git a/about/tutorials/queries/untitled-3.md b/about/tutorials/queries/untitled-3.md index 9f3d528..1a13f47 100644 --- a/about/tutorials/queries/untitled-3.md +++ b/about/tutorials/queries/untitled-3.md @@ -1,4 +1,4 @@ -# 获取一个事件(event)的代币美元价值 +# USD value of token utilised for an event ### diff --git a/about/tutorials/queries/untitled-6.md b/about/tutorials/queries/untitled-6.md index 3866102..ebe8bfb 100644 --- a/about/tutorials/queries/untitled-6.md +++ b/about/tutorials/queries/untitled-6.md @@ -1,4 +1,4 @@ -# 查询一段时间的用户和交易量 +# Users and amount over a trailing period ```sql SELECT date_trunc('day', evt_block_time), diff --git a/about/tutorials/sql-guides.md b/about/tutorials/sql-guides.md index 80ab060..f1697ff 100644 --- a/about/tutorials/sql-guides.md +++ b/about/tutorials/sql-guides.md @@ -1,16 +1,16 @@ -# SQL指南 +# SQL guides -**PostgreSQL教程** +**General PostgreSQL Tutorials** -为了成为一名成功的Dune Wizard,你需要对PostgreSQL有一个很好的了解,以便能够从我们的数据库中查询数据。 +To be a successful Dune Wizard you need to have a good understanding of PostgreSQL to be able to query data from our database. -我们已经整理了一些资源,我们认为这些资源对你成为一名Dune Wizard的旅程是有帮助的。 +We have compiled a few resources that we think are helpful in your journey to becoming a Dune Wizard. -[FreecodeCamp.org](https://www.youtube.com/watch?v=qw--VYLpxG4) 视频教程列表 (免费) +[FreecodeCamp.org](https://www.youtube.com/watch?v=qw--VYLpxG4) Video Playlist (FREE) -[Amigoscode](https://www.youtube.com/watch?v=5hzZtqCNQKk) Youtube视频 (免费) +[Amigoscode](https://www.youtube.com/watch?v=5hzZtqCNQKk) Youtube Video (FREE) [UDEMY Course SQL & PostgreSQL for Beginners](https://www.udemy.com/course/sql-and-postgresql-for-beginners/?ranMID=39197\&ranEAID=JVFxdTr9V80\&ranSiteID=JVFxdTr9V80-nnMsdWXzWeu9lqxtbEa72g\&utm\_source=aff-campaign\&LSNPUBID=JVFxdTr9V80\&utm\_medium=udemyads) ($10) -[Mode SQL Tutorial](https://mode.com/sql-tutorial/) (免费) +[Mode SQL Tutorial](https://mode.com/sql-tutorial/) (FREE) diff --git a/about/tutorials/video-series.md b/about/tutorials/video-series.md index 11f511d..d5114e2 100644 --- a/about/tutorials/video-series.md +++ b/about/tutorials/video-series.md @@ -1,32 +1,34 @@ -# 视频教程系列 +# Video Series -我们在Youtube上制作了一系列的视频教程 [Youtube频道](https://www.youtube.com/channel/UCPrm9d2hLd\_YxSExH7oRyAg). +We have produced a video tutorial series on our [Youtube Channel](https://www.youtube.com/channel/UCPrm9d2hLd\_YxSExH7oRyAg). -## Dune 5分钟入门 +## Dune Analytics 5 Minute Intro + +This Video is the quickest and best way to get an introduction to Dune, be sure to check it out. -这个视频是了解Dune的最快速和最好的方法,一定要看一看。 {% embed url="https://www.youtube.com/watch?v=S-cctFmR828" %} -## 课程介绍 +## Intro to the Course + +This Video serves as an overview and intro to the whole course. -本视频是对整个课程的概述和介绍。 {% embed url="https://youtu.be/USTIesVPk68" %} -## 第1集: 案例和应用 +## Episode 1: Usecases and Applications -本视频解释了Dune的基础知识和它可以用来做什么。 +This Video explains the basics of Dune and what it can be used for. {% embed url="https://www.youtube.com/watch?v=IHC8HAZvw_Q" %} -## 第2集: 数据库 +## Episode 2: The database -本视频介绍了Dune中的数据表以及数据库的工作方式。 +This Video goes over the Data tables in Dune and how the database works. {% embed url="https://youtu.be/UDu23Eyvo_Y" %} -## 第3集: 简单query实例以及重建Fees.wtf查询 +## Episode 3.1: Simple Queries and recreating Fees.wtf in Dune -这个视频是对Dune内部查询的一个很好的介绍。我们的社区经理Boxer在Dune中重新创建了Fees.wtf,所以视频主要集中在gas交易方面。 +This Video is a great introduction to querying inside of Dune. Our Community Manager Boxer recreates Fees.wtf inside of Dune, so the Video mostly focuses on gas transactions. {% embed url="https://youtu.be/ez3VfcfNwvc" %} diff --git a/about/usecases/README.md b/about/usecases/README.md index e01661f..e3afc81 100644 --- a/about/usecases/README.md +++ b/about/usecases/README.md @@ -1,19 +1,18 @@ --- -说明: >- - 利用Dune来为你个人,你的项目,你的机构提供洞见。 - +description: >- + Leverage Dune to generate Insights for yourself, your project or your + organisation. --- -# 使用案例 - -## Dune是一个开放平台 +# Use Cases -Dune是一个区块链数据的分析平台,它将链上数据变成用户可读的数据并免费提供给用户。用户可以使用PostgreSQL来查询链上的数据,同时可以创建多个查询组成的仪表盘来讲述故事。Dune上的查询(query)是公开的,任何人都可以查看和分叉(fork),但隐私查询(private query)是非公开的,该功能只对订阅专业计划(Pro Plan)的用户开放。 +## Dune is an open platform +Dune is a data analytics platform that surfaces blockchain data turns on chain data into human readable data available to users for free. Users can query on chain data using PostgreSQL and create dashboards that group queries together to tell a story. Queries on Dune are public goods and are available for anyone to view and fork with the exception of private queries, which are available to users who have the pro plan subscription. -## **Dune用途有哪些?** +## **What is Dune used for?** -在Dune上几乎所有的事情都是可能的,所以在链上数据的查询方面,它没有任何限制。但我们可以展示一些具体的使用案例: +Since pretty much everything is possible on Dune, there really aren't any limitations as to what you can query in regards to on-chain data. There still is some distinct Use Cases we can establish: {% content-ref url="sector-dashboards.md" %} [sector-dashboards.md](sector-dashboards.md) @@ -28,11 +27,14 @@ Dune是一个区块链数据的分析平台,它将链上数据变成用户可 {% endcontent-ref %} \ -Dune上的创作内容是哪些类型? +What type of content is generated on Dune? ------------------------------------------ -为了获得更多关于用户如何使用Dune的洞见,你可以关注我们的推特账户,我们会转发Dune上最有趣的创作内容。\ - \ -只要点击一下最近的几条推文,就可以看到用户在Dune上的最新作品了! +To get more insights into how people use Dune, you can follow our Twitter account where we retweet the most interesting things that happen on Dune.\ +\ +Just click through the last few tweets and see what people are up to on Dune currently! {% embed url="https://twitter.com/DuneAnalytics" %} + +\ +\\ diff --git a/about/usecases/ecosystem-dashboards.md b/about/usecases/ecosystem-dashboards.md index 2b18492..0ca7efc 100644 --- a/about/usecases/ecosystem-dashboards.md +++ b/about/usecases/ecosystem-dashboards.md @@ -1,22 +1,22 @@ -# 生态仪表盘 +# Ecosystem Dashboards -**Dune汇总了所有数据集,因此你也可以探索更多的一般性指标。** +**Since Dune has all the data in one place you can also check more general metrics.** -## 矿工费(Gas) +## Gas Prices [https://dune.xyz/kroeger0x/gas-prices](https://dune.xyz/kroeger0x/gas-prices) -你可以用Dune很容易地收集到每个tx的平均矿工费(gas)、矿工费上限、一个区块的总矿工费等数据。 +You can easily assemble the data on average gas spent per tx, gas limit, gas spent in total in a block etc. using Dune. ![](<../../.gitbook/assets/image (13) (2).png>) ![](<../../.gitbook/assets/image (21).png>) -花费的矿工费(gas)和类似指标的数据也可能与具体协议有关,请记住这一点。 +Data on gas spent and similar metrics can also be relevant to certain protocols, so do keep this in mind. -## **DeFi用户** +## **DeFi Adoption** -[Richard Chen](https://twitter.com/richardchen39) 整合了所有重要的DeFi协议的用户数量,并将它们纳入了一个仪表盘。 +[Richard Chen](https://twitter.com/richardchen39) has compiled the user numbers of all important DeFi Protocols and compiled them in one Dashboard. ![](<../../.gitbook/assets/image (22).png>) diff --git a/about/usecases/project-dashboards.md b/about/usecases/project-dashboards.md index 593998b..d328b04 100644 --- a/about/usecases/project-dashboards.md +++ b/about/usecases/project-dashboards.md @@ -2,25 +2,25 @@ description: Project Dashboards are a great way to track the metrics of your project. --- -# 项目仪表盘 +# Project Dashboards -**项目仪表盘使你能够轻松地将你最喜欢的项目的数据汇集到一起。**\ -**没有基础设施需要维护,你可以简单地查询你想要的数据并将其聚合在仪表盘上,为你的项目提供一个现实的数据中心。** +**Project Dashboard allow you to easily assemble data on your favorite project in one place.**\ +**Without having to maintain infrastructure or overhead, you can simply query for the data you desire and assemble it on a Dashboard to make a Datahub for your project Reality.** -**让我们通过一个例子来探索:** +**Let's explore this with an example:** \*\*\*\*[**https://dune.xyz/poma/tornado-cash\_1**](https://dune.xyz/poma/tornado-cash\_1)\*\*\*\* -这是Tornado Cash的仪表盘,有创作者将所有重要的指标集合在了一个地方。 +This is the dashboard from Tornado Cash on which someone assembled all the important metrics in one place. ![](<../../.gitbook/assets/image (18).png>) -我们可以看到,创作者向我们展示了一些一目了然的计数器,用简单的数字告诉我们最重要的信息。 +We can see that the creator is showing us a few "on a glance" counters which tell us the most important information in simple numbers. ![](<../../.gitbook/assets/image (18) (1).png>) -接着他用一些有趣的历史数据,显示了用户和体量的增长。这只是仪表盘的一部分,但从中你可以清楚地看到这些统计数字和图表可以为你的项目带来多大的价值。 +He follows this up with some interesting historical data points which show the growth in users and volume. The Dashboard continues, but you can clearly already see how much value these stats and charts can produce for your project. -拥有所有这些统计数据,将十分有助于你的项目管理并帮助它获得成功。 +Having all these stats in one place greatly helps to manage your project and help it succeed. -你可以在我们的网站上找到许多其他更强大的仪表盘:[Projects Page](https://dune.xyz/projects). +You can find many other great dashboard on our [Projects Page](https://dune.xyz/projects). diff --git a/about/usecases/sector-dashboards.md b/about/usecases/sector-dashboards.md index 8fafb2f..b2e2610 100644 --- a/about/usecases/sector-dashboards.md +++ b/about/usecases/sector-dashboards.md @@ -1,18 +1,18 @@ -# 细分仪表盘 +# Sector Dashboards -**细分仪表盘让你可以一览细分的新兴领域,并实时分析正在发生的事情。** +**Sector Dashboards allow you to glance at an entire sector of our new Economy and analyse what's happening in real time.** -让我们通过一些例子来探讨这个问题: +Let's explore this with some examples: -## Dex指标 +## Dex Metrics [**https://dune.xyz/hagaetc/dex-metrics**](https://dune.xyz/hagaetc/dex-metrics) -这个仪表盘让你可以一次看清整个去中心化交易所的情况。 +This Dashboard allows you to take a look at the entirety of decentralized exchanges at once. -你可以看到Dex交易量、市场份额、所有交易所的总交易量以及更多的统计数据,一目了然。这让你可以比较不同交易所之间的表现,同时评估整个细分领域的表现。 +You can see Dex Volume, Market share, Total Volume across all exchanges and many more stats all on one glance. This allows you to compare the performance of different dexes with each other and at the same time evaluate the performance of the entire sector. -所有这些都是实时更新的,并由社区维护,如果一个新的dex想出现在这个仪表盘上,他们所要做的就是提交他们的代码到我们的公开github。更多内容见[抽象表](../../data-tables/data-tables/abstractions.md). +All of this updates in real time and is maintained by the community, if a new dex wants to be on this dashboard, all they have to do is submit their code to our public github. More on this in [abstractions](../../data-tables/data-tables/abstractions.md). ![](<../../.gitbook/assets/image (7).png>) @@ -20,29 +20,30 @@ ![](<../../.gitbook/assets/image (9).png>) -## 指数 +## Indices [**https://dune.xyz/0xBoxer/indices-products**](https://dune.xyz/0xBoxer/indices-products) -另一个有趣的仪表盘是关于去中心化指数的仪表盘。 +Another interesting Dashboard we have is a dashboard on decentralized indices. + +Here again, you can evaluate the entire state of a sector in one glance, being able to compare different products and projects to each other with ease. -在这里,你也可以一目了然地评估一个细分领域的整体状况,能够轻松地将不同的产品和项目相互比较 ![](<../../.gitbook/assets/image (10).png>) ![](<../../.gitbook/assets/image (11).png>) ![](<../../.gitbook/assets/image (12).png>) -## 借贷 +## Lending -这同样适用于借贷协议,它让你你轻松地了解借贷协议的状况并相互比较。 +The same applies for lending protocols, it allows you to easily check the state of lending protocols and compare them to each other with ease. ![](<../../.gitbook/assets/image (13).png>) ![](<../../.gitbook/assets/image (14).png>) -## 总结 +## Summary -细分仪表盘允许你的关注者对某一新兴领域的整个情况做出假设。这对于比较不同的产品和试图发现趋势是非常有用的。 +Sector Dashboards allow your audience to make assumptions on a whole sector of this nascent Industry. This is very useful for comparing different products with each other and trying to spot trends. -大多数细分仪表盘都依赖于一个或许多[抽象表)](.../.../data-tables/data-tables/abstractions.md)表,这使得它很容易查询大量的数据并在不同的协议之间实现标准化。 +Most Sector Dashboards are relying on one or many [abstraction](../../data-tables/data-tables/abstractions.md) tables which make it easy to query for vast amounts of data and standardizing between the different protocols. diff --git a/bounties/wizard-request-program.md b/bounties/wizard-request-program.md index f89f5c1..dd09cc6 100644 --- a/bounties/wizard-request-program.md +++ b/bounties/wizard-request-program.md @@ -1,45 +1,36 @@ -# Wizard需求计划 +# Wizard Request Program -#### 对于想寻找Wizards的项目方 +#### For projects looking for Wizards -如果你是一个想要在Dune上拥有更多或者更好仪表盘的项目方,我们已经为你提供了一个途径。以下是它如何工作的说明: +If you're a project looking to have more/better dashboards on Dune, we've created this program for you. This is how it works: -1. 项目方填写这个[表格](https://bounties.dune.xyz)去详细阐明他们的全部内容以及他们想要在Dune上看到的insights类型以及他们愿意为此支付的金额。 +1. Project fills out [this form](https://bounties.dune.xyz) explaining what they're all about and the kind of insights they'd like to see surfaced on Dune and how much they're willing to pay for it.\\ +2. We share this with our community and interested wizards get in touch with you.\\ +3. Project screens wizards and chooses who to work with.\\ +4. The data flows. +As opposed to more traditional bounty programs, the Wizard Request program is meant to unlock long-lasting relationships/collaborations between the analysts and the projects at large. -2. 我们将与社区分享,感兴趣的wizards会与你联系。 +#### For Wizards looking for :moneybag::moneybag::moneybag: -3. 项目方筛选以及选择跟谁合作。 +If you are a wizard looking for bounties, make sure to join [our Discord](https://discord.gg/ErrzwBz), go to our “freelancer-listing” channel and click on the flying dollar bill emoji there. Also follow the [bounty bot](https://twitter.com/Dune\_Bounties) on Twitter. -4. 数据就流动了起来。 +**FAQs about the program** -与更传统的赏金计划相反,Wizard需求计划旨在搭建分析师与项目方之间的长期关系/合作。 - - - -#### 对于想寻找:moneybag::moneybag::moneybag:的Wizards - -如果你是寻找赏金的wizard,请务必加入[我们的 Discord](https://discord.gg/ErrzwBz),进入我们的“自由职业者列表”频道,然后单击那里美元钞票的表情符号。 你还可以在推特上关注。[赏金机器人](https://twitter.com/Dune\_Bounties) 。 - - - -**关于项目的FAQs** - -_-我需要大量的数据分析,那么应该发布多少需求??_ - -将每个需求都当作一个仪表盘。如果你想在一个仪表盘中查看所有信息,那么只需一个需求。另一方面,如果你希望看到三个不同的仪表盘,我们建议你创建三个需求。创建三个需求并不一定意味着与三个不同的分析师合作,这取决于你的想法。 +_- I need a lot of data, how many requests should I post?_ +Think of every request as a dashboard. If you’d like to see all of your information in just one dashboard, then just one request. If, on the other hand, you’d like to see three different dashboards we recommend you create three requests. Creating three requests doesn’t necessarily mean working with three different analysts, that will be up to you to decide. \ -_- 我是一名分析师。我该如何报名?_ +_- I’m an analyst. How do I enroll?_ -目前,你唯一需要做的就是加入[我们的Discord](https://discord.gg/dunecom),进入我们的“自由职业者列表”频道,然后单击那里美元钞票的表情符号,这样你就会在新请求到达时收到通知。你还应该关注 Twitter 上[的赏金机器人](https://twitter.com/Dune_Bounties) 。 -\ -_- 我想创建一个需求,但我不知道我应该为此支付/报价多少金额_ +For the moment the only thing you need to do is join [our Discord](https://discord.gg/dunecom), go to our “freelancer-listing” channel and click on the flying dollar bill emoji there, this way you’ll get notified when new requests arrive. Oh and you should definitely follow the [bounty bot](https://twitter.com/Dune\_Bounties) on Twitter. -嗯,这实际上取决于你的需求的工作量和复杂性程度,但在你可接受的范围内,我们鼓励你尽可能慷慨。如果不确定,你可以随时在我们的 Discord 上提问! +\ +_- I want to create a requests but I don’t know how much should I pay/offer for it_ -_- Dune会抽成吗??_ +Well, that really depends on how much work/complexity your request entails but to the extent that you can, we encourage you to be generous. If you ain’t sure you can always ask on our Discord! -我们不会。 事实上,Dune 不参与完成交易的过程或后续跟进,这完全是在wizard和项目之间的事情。 +_- Does Dune take a cut?_ +No we don’t. In fact, Dune does not take part in closing the deal or following up over time, this is strictly between the wizard and the project. diff --git a/changelog/dune-changes/august-2020.md b/changelog/dune-changes/august-2020.md index 6fd8079..b698c9f 100644 --- a/changelog/dune-changes/august-2020.md +++ b/changelog/dune-changes/august-2020.md @@ -2,13 +2,13 @@ -#### 价格数据源切换 -我们已将价格数据源从 Coincap 更改为 Coinpaprika,以及现在在 prices.usd 和 prices.layer1_usd 表中拥有 230 多种资产的价格! 有一点需要注意的是,以前我们有截至当前时间的所有分钟的价格,但我们现在有截至当前时间前 5 分钟的价格。 +#### Price Provider Switch -**新表prices.layer1_usd** +We’ve changed price providers from Coincap to Coinpaprika, and in turn now have prices for 230+ assets in the `prices.usd` and `prices.layer1_usd` tables! A slight caveat is that while previously we had prices for all minutes up to current time, we now have prices up to 5 minutes before current time. -我们已将所有非以太坊代币的资产移至它们的表 prices.layer1_usd。 该表按symbol分区并具有 `(symbol, minute)` +**New table prices.layer1\_usd** +We’ve moved all assets that are not tokens on Ethereum to their own table `prices.layer1_usd`. This table is partitioned on `symbol` and has `(symbol, minute)` as primary key as before. ``` Column │ Type @@ -18,20 +18,17 @@ symbol │ text ``` -#### prices schema的变化 +#### Changes to prices schema -**price.usd表新增新列decimals** +**New column decimals on prices.usd** -我们在`prices.usd`中添加了一个新的列`decimals`,这样你就可以避免与 erc20.tokens 进行额外关联来计算正确的交易量。 +We’ve added a new column `decimals` to `prices.usd` so that you can avoid the additional join with `erc20.tokens` for calculating correct volumes. +**New primary key for prices.usd** +Previously `prices.usd` was partitioned on the token `symbol`, and it’s primary key was `(symbol, minute)`. In this release we’ve made a change to this scheme to allow for multiple `contract_address`es to map to the same `symbol`. This could happen e.g. in times where a token migration is happening. `prices.usd` is now partitioned on `contract_address` and it’s primary key is `(contract_address, minute)`. -**New price.usd 的新主键** - -以前`prices.usd` 是根据代币`symbol`进行分区的 , 它的主键是 `(symbol, minute)`。在此版本中,我们对此方案进行了更改,以允许多个`contract_address`映射到同一个`symbol`。在某些场景下它会发挥作用例如在Token合约发生迁移的时候。`prices.usd`现在在`contract_address`上进行了分区,它的主键是`(contract_address, minute)`。 - -请注意,执行包含 `SELECT minute, price FROM prices.usd WHERE symbol='x'`的查询时可能会产生一些奇怪的结果。因为在某些情况下时间窗口中有两个contract映射到symbol `x`,然后你可能每分钟下会关联多多条数据。 这种情况下最好使用主键`contract_address` - +Note that this might yield some weird results for queries that rely on doing `SELECT minute, price FROM prices.usd WHERE symbol='x'` in certain cases where there are two contracts mapped to the symbol `x` in a time window. You may then receive several rows per minute. It is better to then use the primary key `contract_address` for filtering and joining. ``` Column │ Type diff --git a/changelog/dune-changes/january-2020.md b/changelog/dune-changes/january-2020.md index a749068..fd62f32 100644 --- a/changelog/dune-changes/january-2020.md +++ b/changelog/dune-changes/january-2020.md @@ -1,14 +1,12 @@ # January 2020 ## Postgres 12.1 -我们已将数据库从 postgres 11 升级到 postgres 12.1。这应该会使性能得到全面的改进。 +We’ve upgraded the database from postgres 11 to postgres 12.1. This should result in performance improvements across the board. +## ERC20 Transfer and Approval tables -##ERC20 转移和授权表 - -你现在可以查询`erc20."ERC20_evt_Transfer"`和`erc20."ERC20_evt_Approval"`表以获取解码的Token转移和授权表。这些表回包括可以使用 ERC20 标准的 ABI 解码的所有事件。这意味着所有代币的所有转账都可以通过这张表查询。该表很大(撰写本文时为240M行),因此请告诉我们你对查询性能的体验。 - +You can now query the `erc20."ERC20_evt_Transfer"` and `erc20."ERC20_evt_Approval"` tables to get decoded token transfers and approvals. These tables should include all events that could be decoded using the ABI of the ERC20 standard. This means that all transfers from all tokens can be queried through this table. The table is large (240M rows at time of writing), so please let us know your experience of the query performance. `erc20."ERC20_evt_Transfer"` schema: @@ -32,8 +30,7 @@ | `evt_tx_hash` | `bytea` | | `evt_index` | `bigint` | -这里的`contract_address`是指发出事件的合约,即代币地址,`evt_tx_hash`和`evt_index`可以方便地让你使用类似的查询关联`ethereum.logs`。 - +Here `contract_address` refers to the contract emmitting the event, i.e. the token address, while `evt_tx_hash` and `evt_index` conveniently lets you join with `ethereum.logs` using a query like ``` SELECT * @@ -43,7 +40,7 @@ ON apps.evt_tx_hash = logs.tx_hash AND apps.evt_index = logs.index LIMIT 100; ``` -另请注意,你可以将这些表与`erc20.tokens`连接起来,以获得人类可读的Token符号和小数位数,如 +Also note that you can join these tables with `erc20.tokens` to get human readable token symbols and the number of decimals like ``` SELECT value/10^decimals, tr.* @@ -54,9 +51,11 @@ WHERE symbol = 'MKR' LIMIT 10 ``` -**例子** +Note though that -**Token头部持有者** +**Examples** + +**Top token holders** ``` WITH transfers AS ( @@ -81,7 +80,7 @@ ORDER BY 2 desc LIMIT 10 ``` -**Token余额** +**Token Balances** ``` WITH transfers AS ( @@ -105,18 +104,13 @@ GROUP BY 1 ORDER BY 2 desc; ``` -## 反向解码 - -上面的表格是使用我们称为“反向解码”的新功能生成的。本质上,它能拆解为为能够被解码的日志,而无所谓事件的合约地址或合约字节码。如果你知道此解码可能有用的其他情况,请随时通过 [hello@dune.xyz](mailto:hello@dune.xyz)告诉我们 - -## 其他 - -* 现在可以分别在`gnosis_sight`、`gnosis_safe` 和`gnosis_dfusion`模式中找到 Gnosis vision、safe 和 dfusion 的数据。 -* Synthetix 代币合约现在有了正确的名称`Synthetix`并且可以在`synthetix`模式中找到 -* `prices.usd_dai`已重命名为`prices.usd_sai`,Symbol更改为 SAI - 不幸的是,我们仍然没有 DAI 价格,因为我们的价格提供者没有提供。 -* `prices.usd_rep`现在为迁移后的条目提供了正确的`REP`Token地址。以前所有条目都有旧地址。 - - +## Fallback decoding +The above tables are generated with a new feature we call “fallback decoding”. Essentially it breaks down to being able to decode logs regardless of the events contract address or contract bytecode. If you know other cases where this decoding can be useful feel free to let us know at [hello@dune.xyz](mailto:hello@dune.xyz) +## Misc +* Data for Gnosis sight, safe and dfusion can now be found in `gnosis_sight`, `gnosis_safe` and `gnosis_dfusion` schemas respectively. +* Synthetix token-contracts now have the correct name `Synthetix` and are found in the `synthetix` schema +* `prices.usd_dai` have been renamed to `prices.usd_sai`, and the symbol changed to `SAI` - we still don’t have `DAI` prices unfortunately, as our price provider has not listed it. +* `prices.usd_rep` now has the correct token address for `REP` for entries after the migration. Previsouly all entries had the old address. diff --git a/changelog/dune-changes/march-2020.md b/changelog/dune-changes/march-2020.md index 8384271..95ad1a8 100644 --- a/changelog/dune-changes/march-2020.md +++ b/changelog/dune-changes/march-2020.md @@ -2,13 +2,13 @@ -本月在数据方面有较大的更新。 +Big release on the data front this month. -#### `block_time`以及`block_number`的的非规范化 +#### Denormalization of `block_time` and `block_number` -我们为所有解码的事件和调用添加了 `block_time`和`block_number`,分别命名为 `evt_block_time`, `evt_block_number` 和`call_block_time`, `call_block_number` 这将消除平台上最痛苦的关联查询,关联`ethereum.transactions`以便在你的查询中获得时间维度。 +We’ve added `block_time` and `block_number` to all decoded events and calls, with names `evt_block_time`, `evt_block_number` and `call_block_time`, `call_block_number` respectively. This will eliminate the most painful joins on the platform, joining with `ethereum.transactions` in order to get a time dimension into your queries. -过去我们可能需要这样做 +Where previously would need to do ``` SELECT date_trunc('day', tx.block_time), count(*) @@ -17,7 +17,7 @@ INNER JOIN ethereum.transactions tx ON tp.evt_tx_hash = tx.hash GROUP BY 1; ``` -为了获得 Uniswap 上每日 `TokenPurchase`-events 的数量,你现在可以很简单地实现 +in order to get the number of daily `TokenPurchase`-events on Uniswap, you can now simply do ``` SELECT date_trunc('day', evt_block_time), count(*) @@ -25,11 +25,9 @@ FROM uniswap."Exchange_evt_TokenPurchase" GROUP BY 1; ``` -消除了令人痛苦以及消耗较大的join。通过使用`evt_block_number`或`call_block_number`,也可以在不涉及任何以太坊表的情况下完成两个解码表的连接。 +eliminating a painful and costly join. Joining across two decoded tables can also be done without involving any of the `ethereum`-tables by using `evt_block_number` or `call_block_number`. - - -####无参数解码事件 +#### Decoding events without parameters We’re also “decoding” events that are emitted without parameters. These events have their own tables, but only include Dune-added fields i.e.: @@ -41,10 +39,9 @@ We’re also “decoding” events that are emitted without parameters. These ev | `evt_block_time` | `timestamptz` | | `evt_block_number` | `bigint` | -#### 解码 Call Output +#### Decoding call outputs - -我们已将函数返回值添加到已解码的`call`table中。 每当一个有命名函数有一个返回值时,它将被解码为 `output_{{name}}`,当它没有命名时,它将被解码为`output_{{i}}`,其中 i 是一个从 0 开始的计数器。参考以下案例,计算调用 Compound CERC20 mint 函数的成功和错误代码: +We’ve added function return values to decoded `call` tables. Whenever a function has a named return value it will be decoded into `output_{{name}}`, and when it is not named it will be decoded into `output_{{i}}` where `i` is a counter that starts at 0. Consider the following case, counting success and error codes for calls to the Compound CERC20 `mint` function: ``` SELECT output_0, count(*) @@ -55,8 +52,7 @@ GROUP BY 1; #### traces.success -**TLDR**: 我们向 `ethereum.traces`添加了一个`success`字段,你可以使用它来确定确切的调用是否成功。 对例如有用 计算余额。 这是一个例子: - +**TLDR**: we’ve added a `success` field to `ethereum.traces` that you can use to figure out if an exact call was successful. Useful for e.g. calculating balances. Here’s an example: ``` SELECT sum(amount) @@ -82,13 +78,9 @@ FROM ( ; ``` -**更长的故事**: Dune 从 Parity OpenEthereum 提取交易traces。 OpenEthereum 返回一个的函数的call traces(树状数据结构),其中一些可能会有非空`error`字段。以前我们或多或少地提取过traces,今天我们在 ethereum.traces 中添加了一个`success`字段。如果在traces层次结构中有非空`error`字段但是它上面没有traces,则它的success字段为true。 - - - -我们注意到,如果父级tracese-entry有一个非空`error`字段,则子call用在 EVM 中也被视为失败。以前在 Dune 中为了正确评估给定函数调用的状态更改是否包含在区块链中,你需要编写一个稍微复杂的查询来检查跟踪树的同一分支中的任何traces 是否有错误.随着今天success字段的加入,这变得容易多了。 - +**Longer Story**: Dune ingests transaction traces from Parity OpenEthereum. OpenEthereum returns a tree-like datastructure of function call traces, where some can have a non-null `error` field. Where previously we ingested the traces more or less _as is_, today we’ve added a `success` field to `ethereum.traces`. This `success` field is `true` for a given trace if no trace above it in the trace hierarchy has a non-null `error` field. +It came to our attention that if a _parent_ trace-entry has a non-null `error` field, the _child_ call is considered failed in the EVM as well. Previously in Dune, in order to correctly assess whether or not a given function call’s state change was included in the blockchain you would’ve needed to write a slightly complex query to check if any traces in the same branch of the trace tree had an error. With the addition of the `success` field today, this has become much easier. Note that the field `tx_success` field denotes the success of the transaction as a whole, and that a `true` `tx_success`-field, does not necessarily mean that every function call in the transaction has a `true` `success` field. Here are the potential combinations @@ -98,18 +90,17 @@ Note that the field `tx_success` field denotes the success of the transaction as | `true` | `false` | | `false` | `false` | -正如你所看到的,一个成功的transaction中的一个call也可能是失败的,但在一个失败的的transaction中call都会是失败的..... - -另请注意,以前解码表上的字段 `call_success`计算为`traces.tx_success && !traces.error`,现在直接从`traces.success`复制 +As you can see a call can be _not successful_ in a _successful_ transaction, but can not be _successful_ in a _not successful_ transaction… +Also note that where previously the field `call_success` on decoded tables where calculated as `traces.tx_success && !traces.error`, it is now directly copied from `traces.success`. #### Postgresql 12.2 -将数据库升级到 postgresql 12.2。 更改日志在[这里](https://www.postgresql.org/docs/current/release-12-2.html)。 +Upgraded the databases to postgresql 12.2. Changelog [here](https://www.postgresql.org/docs/current/release-12-2.html). -#### 其他 +#### Misc -重命名了一些curvefi-contracts: +Renamed some curvefi-contracts: | schema | name | Address | | ------- | ------------ | ------------------------------------------ | @@ -120,7 +111,7 @@ Note that the field `tx_success` field denotes the success of the transaction as | curvefi | busd | 0x79a8c46dea5ada233abaffd40f3a0a2b1e5a4f27 | | curvefi | compound\_v3 | 0xa2b47e3d5c44877cca798226b7b8118f9bfb7a56 | -将onesplit的的contracts移动到它们自己的schema下. +Moved onesplit contracts to their own schema. | schema | name | address | | -------- | -------- | ------------------------------------------------------ | diff --git a/changelog/dune-changes/march-2021.md b/changelog/dune-changes/march-2021.md index 52dc1a4..12a7001 100644 --- a/changelog/dune-changes/march-2021.md +++ b/changelog/dune-changes/march-2021.md @@ -4,70 +4,68 @@ description: Dune Analytics version 2.0 # March 2021 -## 更新概览 +## Overview of changes -* 查询 - * 保存 - * 执行 -* 刷新 -* 其他各种更新 +* Queries + * Saving + * Running +* Refreshing +* Various other upgrades -新版本的Dune无论是前端上还是底层都对查询和刷新方式做了调整。 +While all the core functionality you expect from Dune is available in Dune v2 the new version of Dune brings changes to how queries and refreshing work, both on the surface and under the hood. +## Queries -## 查询 +**Saving** -**保存** +By default, **new queries are not saved** to your queries so you can play around and test various ideas quickly. If you want to keep your work, remember to hit the **Save button** and give your query a name. -默认情况下**新查询不会保存**因此你可以快速尝试以及测试各种想法。如果你想保留你的工作成果,请记住点击 **“保存”按钮**并为你的查询命名。 +This means that if you navigate away from a page without saving, your work is lost. If you allow notifications from [dune.xyz](http://dune.xyz/) in your browser, the app will notify you when you navigate away from unsaved content. -这意味着,如果你在没有保存的情况下离开页面,你的工作成果就会丢失。如果你在浏览器中允许来自[dune.xyz](http://dune.xyz/) 的通知,当你离开未保存的内容时,该应用程序会通知你。 +The same applies to forks. A fork is not saved to your queries before you click the **Save button** and give your fork a name. -这同样适用于forks。在你单击 **保存按钮**以及为你的 fork 命名之前,不会将 fork 保存到你的查询中。 +**Running** +We’ve merged the old save and execute buttons into a single button, **Run**. When you click **Run** on a saved query, any changes you’ve made to the query text is saved and the query is queued for execution. -**执行** -我们将旧的保存和执行按钮合并为一个按钮,**Run**。当你在已保存的查询上单击**Run**时,你对查询文本所做的任何更改都会被保存,并且查询会排队等待执行。 +> _**Useful tip:**_ Press `CMD / CTRL + Enter` to run your query. +**Running query snippets** -> _**有用的tip:**_ 按住 `CMD / CTRL + Enter`可以快速运行你的查询. +If you mark parts of your query, the button changes to **Run selection**, and executes the part of the query that you’ve marked. This will updates the results and visualizations in the process but _**not save**_ the query. -**运行查询部分片段** -如果你标记查询的一部分,按钮将变为**Run selection**,并执行你标记的查询部分。这将更新项目中中的结果和可视化,但**不保存**查询。 +> _**Useful tip:**_ if you want to execute the whole query without saving it, select all of the query (CMD / CTRL + A) and then hit **Run selection**. +## Refreshing +There’s also changes to how results are refreshed. Over the last months we’ve been redesigning our entire query execution backend to bring large improvements to how Dune works. -> _**有用的tip:**_ 如果你想执行整个查询而**不保存**它,选择所有查询(CMD / CTRL + A)然后点击**Run selection** +When a visualization is viewed, either on a query page or on a dashboard, the Dune backend will inspect the age of the most recent result. If the result is stale (currently defined as >3 hours old), Dune will automatically queue an execution for this query and run it in the background. -## 刷新 -结果的刷新方式也发生了变化。 在过去的几个月里,我们一直在重新设计整个查询执行后端,以极大地改进 Dune 。 +This means that your dashboards will always be kept up to date when they are being viewed. -当在查询页面或仪表盘上查看可视化时,Dune 后端将检查最新结果的年龄。 如果结果过时(当前定义为 >3 小时前),Dune 将自动排队执行此查询并在后台运行它。 +Query creators does not need to set a refresh scheduele and the scheduling feature has been deprecated as it is no longer needed to keep results fresh. -这意味着你的仪表盘在查看时将始终保持最新状态。 +## Queues -查询创建者不需要设置刷新计划,并且计划功能已被弃用,因为它不再需要一直去刷新结果。 +We’re also bringing changes to how queueing works in Dune. When you manually click **Run** on a query an execution is queued. Every user on Dune can queue 3 queries at the same time (pro users have more, see our [pricing](https://hackmd.io/YOP3YIgaRAejTPE190sOjw?view) page for more info). -## 队列 +Automatically refreshed results (as we talked about above) does not use the query creators queuing credits nor the viewing user’s. -我们还对Dune中的排队方式进行了调整。 当你在查询里手动单击**Run**按钮时,一个查询会进入队列。Dune 上的每个用户都可以同时排队3个查询(专业用户有更多,请参阅我们的[定价](https://hackmd.io/YOP3YIgaRAejTPE190sOjw?view) 页面了解更多信息) +## Other updates -## 其他更新 +**A faster and better looking Dune** - the whole Dune app including all the charts have gotten a big facelift. The app is now also many times faster. -**一个更快、更好看的Dune** -包括所有图表在内的整个Dune应用程序都进行了重大改造。这个应用比之前快了很多倍。 +**Query parameters** - what is probably Dune’s most underrated feature has gotten a major upgrade. It’s now super easy to filter any query or dashboard for a token, address or anything really. Meaning you can turn your queries and dashboards into interactive apps for onchain data. -**查询参数** -这个可能是 Dune 最被低估的功能已经得到了重大升级。现在通过Token、地址或任何东西筛选任何查询或仪表盘都非常容易。这意味着你可以将查询和仪表盘变成用于链上数据的交互式应用程序。 +**See all content without having to log in** - simply copy and share the link from the page you are on. The exception is for paid users that make their content private, more details on our [pricing page](https://hackmd.io/YOP3YIgaRAejTPE190sOjw?view). +**Errors show on the relevant line** - when running your queries you will see error messages directly on the relevant line in your code. -**无需登录即可查看所有内容** - 只需复制并分享你所在页面的链接即可。将内容设为私有的付费用户除外,详情请参阅我们的[定价](https://hackmd.io/YOP3YIgaRAejTPE190sOjw?view) 页面。 - -**错误显示在相关行** -运行查询时,你将直接在代码的相关行上看到错误消息。 - -**单击查询标题以从仪表盘进行查询** - -我们很乐意在[Discord](https://discord.com/invite/ErrzwBz)的#feedback 频道中获得你对 Dune v2 体验的反馈。如果你遇到任何问题,也可以联系 [support@dune.xyz](mailto:support@dune.xyz)。 +**Click query title to go to query from a dashboard** +We’d love to get your feedback on your experience with Dune v2 in the #feedback channel in our [Discord](https://discord.com/invite/ErrzwBz). You can also contact [support@dune.xyz](mailto:support@dune.xyz) if you face any issues. Happy querying! -**PS.** Dune v2 目前不支持一些可视化类型:数据透视、队列、漏斗、热图和气泡。我们已向受影响的用户发送电子邮件。如果你没有收到电子邮件,你的所有查询和可视化应该在 v2 中正常运行。 +**PS.** There are a few visualisation types that are currently not supported in Dune v2: pivot, cohort, funnel, heatmap and bubble. We’ve emailed the users that are affected. If you have not been emailed all your queries and visualisations should work seamlessly in v2. diff --git a/changelog/dune-changes/october-2019.md b/changelog/dune-changes/october-2019.md index 5e288b1..6387652 100644 --- a/changelog/dune-changes/october-2019.md +++ b/changelog/dune-changes/october-2019.md @@ -1,12 +1,12 @@ # October 2019 -#### 新的数据结构 +#### New data structure -如果你要分叉旧查询,则需要注意这些变化,你可以用新的替换旧的表和列名。 +If you are forking old queries you need to be aware of these changes to you can replace old table and column names with new ones. +#### USD price tables -#### USD价格表 -以前美元价格表被命名为`coincap."tokens/usd"`现在改为`prices.usd`。 +Previously the usd price table was named `coincap."tokens/usd"` this is now changed to `prices.usd` with the fields ``` symbol -- unchanged @@ -15,9 +15,6 @@ price -- previously "average" minute -- previously "time" ``` -#### Dune生成的列 +#### Dune generated columns We add some data fields to all decoded tables for `calls` and `events`. These are now named `evt_index, evt_tx_hash, contract_address`. Previously these were simplt named `index, tx_hash, address` but we wanted to make it clear that these are added by Dune and not extracted directly from the blockchain. - -我们为`calls`和`events`的所有解码表添加了一些数据字段。 这些现在被命名为 `evt_index, evt_tx_hash, contract_address`。以前这些是简单命名的index、tx_hash、address,但我们想明确指出,这些是由 Dune 添加的,而不是直接从区块链中提取的。 - diff --git a/duneapp/adding-new-contracts.md b/duneapp/adding-new-contracts.md index 7578400..648ee10 100644 --- a/duneapp/adding-new-contracts.md +++ b/duneapp/adding-new-contracts.md @@ -1,113 +1,113 @@ --- -说明: >- - 你应该知道的关于成功解码新合约的全部提交过程 +description: >- + Everything you should know about the submission process to successfully decode + new contracts --- -# 添加新合约 +# Adding new contracts -Dune包含了大量的[调用和事件表](../data-tables/data-tables/decoded-data.md#decoded-smart-contract-data)形式的解码合约,这些合约通常经过[解码](../data-tables/data-tables/decoded-data.md)的过程来到Dune中。 +The Dune App contains an extensive catalog of decoded contracts in the form of [call and event tables](../data-tables/data-tables/decoded-data.md#decoded-smart-contract-data). These contracts are brought into Dune by wizards through a process commonly referred to as [Decoding](../data-tables/data-tables/decoded-data.md). -## 快速浏览 +## Quick tour {% embed url="https://www.youtube.com/watch?v=4v9zEYZvv34" %} -## 提交一个新的合约 +## Submitting a new contract -解码一个新的合约可以通过提交新合约表格,在 [我的创作> 合约](https://dune.xyz/browse/contracts/authored) 或在查询编辑器的侧边栏的数据集探索器中访问: +Contracts can be submitted for decoding through the New contract form, which can be accessed via [My Creations > Contracts](https://dune.xyz/browse/contracts/authored) or within the dataset explorer in the query editor's sidebar: ![](<../.gitbook/assets/Screen Shot 2022-01-03 at 15.46.22.png>) -点击那里将弹出一个新的浏览器标签,上面有合同提交表,其中包括2个步骤: +Clicking there will pop up a new browser tab with the contract submission form, which consists of 2 steps: -### 1. 区块链和地址 +### 1. Blockchain and address -我们首先要提供合约的地址和所在链。首先要求这些数据有两个目的:预测潜在的重复合约和待提交的合约,以及在可以的情况下尽量将提交过程的一部分自动化。后者通常是通过从Dune或其他相关的第三方数据源获取潜在的有用元数据(Metadata)来实现的。 +We first ask for the contract's address and blockchain. Requesting this data first has two purposes: to anticipate potential duplicate contracts and pending submissions, and to automate parts of the submission process where we can. The latter is usually accomplished by fetching potentially useful metadata from Dune and other third party sources where relevant. -例如,下面我们用提交Optimism上的USDT合约 (`0x94b008aA00579c1307B0EF2c499aD98a8ce58e58`): +For instance, below we submit the USDT contract (`0x94b008aA00579c1307B0EF2c499aD98a8ce58e58`) in Optimism: ![](<../.gitbook/assets/Screen Shot 2022-01-03 at 16.02.19.png>) -如果我们能通过第三方来源找到合约,我们会在地址栏旁边显示一个绿色的复选标记。这意味着我们能够获取合同的名称和ABI。 +If we can find the contract through a third party source, we will show a green check mark next to the address field. This means we were able to fetch information such as the contract's name and ABI. -### 2. 合约细节 +### 2. Contract details -接下来在点击 "下一步 "后,会提示你提供我们需要的关于合约的其他信息,以便对其进行解码: +Then, after pressing Next, you will be prompted for other information about the contract that we need in order to decode it: ![](<../.gitbook/assets/Screen Shot 2022-01-03 at 16.05.07.png>) -如果我们通过其他第三方来源找到了合约,你只需要填上项目名称。我们对此有一些命名惯例,部分是由于我们的技术设置,也是为了使寻找数据更有预见性。 +If we found the contract through other third party sources, you will only have to fill in the project name. We have some naming conventions on that, partly due to our technical setup and also to make finding data more predictable. -一旦你提交了它,就完成了! 合约将被储存在我们的队列中,为了保证质量,我们会人工审查。你的提交可能需要几天的时间才能得到处理。 +Once you submit it, you are done! The contract will be stored in our queue, which we manually review for quality assurance purposes. Your submission might take a few days to get processed. -### 高级选项 +### Advanced options -在某些情况下,Dune可以自动检测和索引同一提交下的多个合约地址。这对于像AMM池这样的例子很有用,一个合约地址对应一个交易对。 +In some instances, Dune can automatically detect and index multiple contract addresses under the same submission. This is useful for examples such as AMM pools where there often exists one contract instance per pair. -我们有两种策略来检测其他合同进行解码: +We have two strategies for detecting other contracts for decoding: -1. **字节码匹配。** 我们使用提交的合约地址的字节码在整个链的历史中寻找与之匹配的。 - -2. **工厂实例。** 我们找到与负责创建提交的合约的地址相同的所有其他合约。 +1. **Bytecode match.** We use the bytecode of the contract address in the submission to find other matches in the whole chain history. +2. **Factory instances.** We find all other contracts created by the same address as the one responsible for creating the submitted contract. -在这两种情况下,我们认定通过这两种方法找到的所有合约都对应于同一个区块链、项目名称、合约名称和ABI。 +In both cases, we assume that all the contracts found through either method correspond to the same blockchain, project name, contract name and ABI. -如果你想让我们索引一个以上的合同,请切换到高级选项,对第一个问题选择 "是"。然后,对于 "它是由工厂合同创建的吗?"的问题,选择 "否 "来索引所有其他具有相同字节码的合同,或者选择 "是 "来索引所有其他源于同一创建者的合约。 +If you want us to index more than one contract, toggle on Advanced options and select "Yes" to the first question. Then, to the question of "Is it created by a factory contract?" select "No" to index all other contracts with the same bytecode or "Yes" to index all other contracts originating from the same creator. {% hint style="warning" %} -只有在你清楚你在做什么,并且非常熟悉项目的架构和部署层次的情况下,才能使用这些选项。 +Only use these options if you know what you're doing and are extremely familiar with the project's architecture and deployment hierarchy. -不正确地应用这些设置可能导致提交被拒绝。 +Incorrectly applying these settings may lead to a rejected submission. {% endhint %} -## 追踪你的提交 +## Tracking your submissions -你可以在任何时候通过浏览[我的创作 > 合约]来查看你的提交和他们的处理状态。(https://dune.xyz/browse/contracts/authored): +You can view your submissions and their processing status at any time by navigating to [My Creations > Contracts](https://dune.xyz/browse/contracts/authored): ![](<../.gitbook/assets/Screen Shot 2022-01-03 at 14.43.07.png>) -## 常见的问题 +## Frequently Asked Questions -### 手动提交合约信息 +### Submitting contract information manually -尽管我们试图获取合同信息,如ABI,但有时这些信息可能无法通过我们的来源获得。 +Although we try to fetch contract information such as the ABI, sometimes this information might not be available through our sources. -这种情况下,你需要手动输入合约的名称和它的ABI。如果合约在[Etherscan](http://etherscan.io/)或[Blockscout](https://blockscout.com/)等区块浏览器中得到验证,那么这些信息应该可以得到。 +In those instances, you will need to manually input the contract's name and its ABI. This information should be available in block explorers such as [Etherscan](http://etherscan.io/) or [Blockscout](https://blockscout.com/) if the contract is verified in any of those sites. {% hint style="info" %} -如果手动提交的合约是一个代理合约,我们建议你进入下一节。 +If the contract being manually submitted is a Proxy contract, we recommend you to move on to the next section. {% endhint %} -### 提交代理合约 +### Submitting a Proxy contract -为了对符合Proxy模式的合同进行正确的交易解码,Dune需要将Proxy合同的地址与实现合同的ABI进行映射。 +In order to properly decode transactions towards contracts that fit the Proxy pattern, Dune needs to map the Proxy contract's address with the implementation contract's ABI. -我们避免监控合约地址的实现,因为它的逻辑是通过使用事务中的Delegatecall来访问的。这会导致我们错过实现合约逻辑中的任何事件日志,因为这些事件实际上是由调用者(本例中的代理)在通过Delegatecall调用一个函数时触发。 +We avoid monitoring the implementation contract's address because its logic is accessed via usage of Delegatecall in transactions. This would cause us to miss out on any event logs in the implementation contract's logic, since these are actually fired by the caller (the Proxy in this case) when calling a function through Delegatecall. -**在向Dune提交代理合约时,你应该输入代理合约的地址。** 然后我们将尝试获取代理的合约名称和它所指向的实现地址。之后,我们将尝试获取实现合约的ABI来源。 +**When submitting proxy contracts to Dune, you should input the address of the Proxy contract.** We then will attempt to fetch the proxy's contract name and the implementation address it's pointing towards. After, we will attempt to source the implementation contract's ABI. {% hint style="info" %} -为了正确解码一个代理合约,Dune需要**代理地址** and the **实现ABI**. +For correctly decoding a Proxy contract, Dune needs the **Proxy address** and the **Implementation ABI**. {% endhint %} -### 重新提交一个合约 +### Re-submitting a contract -Dune认为区块链中的每个地址最多可以映射到一个合约。出于这个原因,提交一个地址已经存在于“ethereum.contracts”中的合约,将为解码目的覆盖它会有几个潜在的危险: +Dune assumes each address in the blockchain can map to at most 1 contract. For this reason, submitting a contract with an address that already exists in `ethereum.contracts` will override it for Decoding purposes. This has a couple potential dangerous side effects: -* 如果项目或合约名称已经改变,我们将为合约的所有方法和事件生成新的表格。反过来,以前的表将停止更新,数据将被分割,查询将停止工作。 -* 如果ABI发生了变化导致现有表的参数变化,依赖该表的查询可能会中断或变得不准确。 +* If the project or contract name has changed, we will generate new tables for all of the contract's methods and events. In turn, previous tables will stop updating, data will be fragmented, and queries will stop working. +* If the ABI has changed in a way that modifies an existing table's parameters, queries that depend on such table might break or become inaccurate. -如果你想提交一个已经存在的合约,请确保提交的内容包含额外的前后文,这样我们可以评估是否值得覆盖合约的数据。 +If you attempt to submit an already existent contract, make sure to include extra context as part of the submission so we can assess whether it's worth overriding the contract's data. -有时接受重新提交的风险高于我们认为的价值,就会被拒绝。如果你不同意,请随时与我们联系,在Dune Discord的#decoding,我们会看看我们能做什么。 +Sometimes, the risk of accepting a re-submission is higher than the perceived value by us, and my result in a rejection. If you disagree, feel free to reach out to us at #decoding in the Dune Discord and we'll see what we can do. -### 钻石代理合同的解码 +### Decoding of Diamond Proxy contracts -与普通的代理合约类似[EIP-2535](https://eips.ethereum.org/EIPS/eip-2535)合约可以通过传入钻石代理的地址以及**一个代表所有接口的ABI来支持**. +Similar to vanilla Proxy contracts, [EIP-2535](https://eips.ethereum.org/EIPS/eip-2535) contracts can be supported by passing in the address of the Diamond Proxy as well as **a single ABI representing the totality of all the facets interfaces**. -### 我的提交为什么被拒绝了? +### My submission got rejected, why? -为了保证数据质量,我们拒绝重复的、不正确的或低质量的提交。为了避免这种情况,请确保提交准确的合约信息。 +In the interest of data quality, we reject duplicative, incorrect or low quality submissions. To avoid that, make sure to submit accurate contract information. -### 其他问题 +### Other questions -请到我们[Discord](https://discord.gg/ErrzwBz)的#decodingand来,我们很乐意提供帮助! +Head over to #decoding on our [Discord](https://discord.gg/ErrzwBz) and we'll be happy to help! diff --git a/duneapp/dashboards.md b/duneapp/dashboards.md index 357e0e0..2d074ec 100644 --- a/duneapp/dashboards.md +++ b/duneapp/dashboards.md @@ -1,83 +1,83 @@ --- -说明: Dune的仪表盘(dashboard)让你轻松汇总 +description: Dune's Dashboards allow you to easily aggre --- -# 仪表盘 +# Dashboards -### 仪表盘是存放汇总信息并供人参考的地方 +### Dashboards are where Dune's content lives and gets discovered. -Dune的仪表盘由小组件组成。小组件可以是可视化结果,也可以是一个文本框,也可以在文本框内嵌入图片或者gif。 +Dashboards on Dune consist of widgets. Widgets can either be visualizations or a text box. It is also possible to embed images/gifs inside of the text box. -你可以自由地调整每个部件的大小,以符合你想要创建的布局。 +You can freely resize every widget to match the layout you want to create. -### 创建一个仪表盘 +### Creating a Dashboard -你可以通过浏览我们的 "发现 "页面并点击右侧的 "新仪表盘 "按钮来创建一个新的仪表盘。 +You can create a new dashboard by navigating to our "Discover" page and clicking on the "new dashboard" button on the right. -你给仪表盘最初起的名字也将是它URL的一部分,之后就不可以改变URL的这部分后缀名了,所以一开始要注意。不过改变仪表盘的名字,总是会正确显示的。 +The initial name that you give to your dashboard will also be the url slug. You can't change the url slug afterwards, so be mindful of the name you choose. Changing the dashboards display name is always possible though. -![creating a dashboard](<../.gitbook/assets/2021-11-03 16-59-42 (1) (1) (2).gif>) +![creating a dashboard](<../.gitbook/assets/2021-11-03 16-59-42 (2).gif>) -### 添加可视化 +### Adding Visualizations -你可以通过进入编辑模式并点击相应的按钮,简单地将可视化内容添加到你的仪表盘中。要进入编辑模式,首先打开你自己的一个仪表盘,点击右上方的编辑按钮。 +You can simply add visualizations to your dashboard by going into the editor mode and clicking on the corresponding button. To go into editor mode first open one of your own dashboards and click on the edit button on the top right. ![](<../.gitbook/assets/2021-11-09 13-17-41.gif>) -### 添加文本框 +### Adding text boxes -要在仪表盘上添加文本框,你必须先进入编辑器模式,然后可以点击 "添加文本小部件"。这将打开一个简单的文本编辑器窗口。 +To add text boxes to your dashboard you have to go into editor mode first and can afterwards click on "add text widget". This will open a simple text editor window. ![](<../.gitbook/assets/2021-11-09 13-20-39.gif>) -文本框支持markdown的一个子集,你可以编辑文本并嵌入图像和gif。 +Text boxes support a subset of markdown. You can manipulate text and embed images and gifs. -#### 文本编辑 +#### Text manipulation -这是一个关于markdown语法的简短清单。更高级的markdown指南可以在[这里](dashboards.md#dashboards-are-where-dunes-content-lives-and-gets-discovered.)找到。 +This is a short list to markdown syntax. A more advanced markdown guide can be found [here](dashboards.md#dashboards-are-where-dunes-content-lives-and-gets-discovered.). -| 元素 | Markdown语法 | +| Element | Markdown Syntax | | ------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- | -| [标题](https://www.markdownguide.org/basic-syntax/#headings) |
# H1
## H2
### H3
1. First item
2. Second item
3. Third item
- First item
- Second item
- Third item
# H1
## H2
### H3
1. First item
2. Second item
3. Third item
- First item
- Second item
- Third item
以缩略格式显示数值 /p>
根据小数点后的零数显示缩略数的小数点
| -| 1256784.3745 | $0\[.]0a | $1.2m | 遵循与之前相同的方法,但添加了$前缀 | +| 1256784.3745 | left blank | 1256784,3745000 | Display the full number and 7 decimals | +| 1256784.3745 | 0 | 1256784 | Only Display whole numbers | +| 1256784.3745 | 0,0 | 1,256,784 | Only displays whole numbers with comma separator | +| 1256784.3745 | 0,0.00 | 1,256,784.38 | Displays the value with decimals points according to the count of zeroes after the dot | +| 1256784.3745 | 0\[.]0a | 1.2m |Displays the value in an abbreviated format.
Will display decimals of the abbreviated number according to count of zeroes after the dot.
| +| 1256784.3745 | $0\[.]0a | $1.2m | Adheres to the same methods as before, but adds a $ prefix. | diff --git a/duneapp/visualizations/README.md b/duneapp/visualizations/README.md index a5d12d5..e2abe39 100644 --- a/duneapp/visualizations/README.md +++ b/duneapp/visualizations/README.md @@ -1,25 +1,35 @@ --- -说明: 可视化让你的数据更加生动形象! +description: Visualizations make your data come alive! --- -# 可视化 +# Visualizations -可视化你的查询结果,会使结果易于理解,并有效地将你的发现传达给观看者。 +Visualizing your query results makes the results accessible and allows you to effectively communicate your findings to your audience. -Dune为你提供了各种不同的可视化选项。 +Dune offers you a variety of different visualization options: -* 条形图 -* 面积图 -* 散点图 -* 线图 -* 饼状图 -* 计数器 +* bar charts +* area charts +* scatter charts +* line charts +* pie charts +* counters + +Combining these in a thoughtful manner allows you to best communicate your data to your audience. + +### Creating Visualizations + +You can create visualizations from any query results in seconds using our visualization engine. + +Simply click on the `New visualization` button and configure the visualization to your needs. + +One query can have multiple visualizations. ![](<../../.gitbook/assets/2021-11-26 13-08-16.gif>) -**关于可视化的更多选项:** +**Read more about the different visualization options here:** {% content-ref url="graphs.md" %} [graphs.md](graphs.md) @@ -33,7 +43,7 @@ Dune为你提供了各种不同的可视化选项。 [pie-charts.md](pie-charts.md) {% endcontent-ref %} -## 怎么使用可视化? +## What you can do with Visualizations -可视化结果可以添加到你的[仪表盘](../dashboards.md)上或者使用[嵌入功能](../../sharing/embeds/)嵌入。 +Visualizations can either live on your [dashboard](../dashboards.md) or be embedded on their own using the [embedd function](../../sharing/embeds/) diff --git a/duneapp/visualizations/counters.md b/duneapp/visualizations/counters.md index 514c743..6000991 100644 --- a/duneapp/visualizations/counters.md +++ b/duneapp/visualizations/counters.md @@ -1,55 +1,57 @@ -# 计数器 +# Counters -#### 计数器是能让你的观众“一目了然”的数据统计的好方法。 +#### Counters are a great way to provide your audience with immediate "on a glance" stats. !["on a glance" stats in https://dune.xyz/0xBoxer/NFT](<../../.gitbook/assets/image (41).png>) -## 设置你的计数器 -![](<../../.gitbook/assets/image (48).png>) +## Configuring your counter -### 计数器选项 +![](<../../.gitbook/assets/image (49).png>) -你可以通过这部分内容了解计数器适用于可视化哪种数据。 +### Counter options -#### 标题 +In this section you can define what kind of data the counter should display. -* 标题将出现在该图表的所有实例中的顶部醒目位置。 -* 如果不填,查询的名称将是唯一留下的东西。 +#### Title -#### 列 +* The Title will appear in all instances of this graph prominently at the top +* If left blank the query name will be the only thing that is left standing -* 通过列设置,你可以定义计数器应该显示哪一列。 +#### Column -#### 行 +* In this field you can define which column the counter should show. -* 通过行设置,可以定义你想要显示的底层数据表格的哪一行,例如第1行。 -* 这通常需要你进行排序或者限定结果来确保第一行是你想展示的内容 +#### Row -### 格式化 +* This field can be used to define which row of the underlying datatable you want displayed e.g. row 1 +* Usually this requires you to sort or limit your query results in order for row 1 to show the wanted results. -**前缀** +### Formatting -* 可以为你的计数器值定义一个前缀。 -* 比如: `$`, `€`, `Ξ`, `฿` +**Prefix** -**后缀** +* This field allows you to define a prefix for your counter value. +* e.g.: `$`, `€`, `Ξ`, `฿` -* 可以为你的计数器值定义一个后缀。 +**Suffix** -**标签** +* This field allows you to define a suffix for your counter value. -* 可以为你的计数器值定义一个标签。 -* 标签将以文本形式出现在计数器值的下方。 +**Label** -**小数** +* This field allows you to define a label for your counter value. +* The label will appear beneath the counter value as text. -* 可以选择让你的计数器显示多少位小数。 +**Decimals** -### 计数器解释 +* In this field you can choose how many decimals you want displayed for your counter +* This is currently limited to 3 decimal places. -通过这个例子可以更好理解前面介绍的内容。 +### Counters explained + +Here is an example to bring some points explained earlier home. ![label](<../../.gitbook/assets/image (39).png>) -![label configuration](<../../.gitbook/assets/image (55).png>) +![label configuration](<../../.gitbook/assets/image (57).png>) diff --git a/duneapp/visualizations/graphs.md b/duneapp/visualizations/graphs.md index d10f549..08c9c37 100644 --- a/duneapp/visualizations/graphs.md +++ b/duneapp/visualizations/graphs.md @@ -1,184 +1,185 @@ --- -说明:图形有利于将数据浓缩到一个可视化中。 +description: Graphs are good for condensing data points into a visualization. --- -# 图形 +# Graphs -**图形是将数据点浓缩到一个可视化的好办法。** +**Graphs are great for condensing data points into a visualization.** -![a graph with mixed line and scatter graphs](<../../.gitbook/assets/image (47).png>) +![a graph with mixed line and scatter graphs](<../../.gitbook/assets/image (48).png>) -![a stacked bar chart](<../../.gitbook/assets/image (58).png>) +![a stacked bar chart](<../../.gitbook/assets/image (60).png>) -### Dune提供的图形样式: +### Dune offers you to create the following graph types: -* 柱状图 -* 面积图 -* 散点图 -* 线状图 +* bar charts +* area charts +* scatter charts +* line charts -你可以在一个可视化中混合所有这些图形类型。 +You can mix all of these graph types together in one visualization**.**\ **** -### 设置你的可视化 +### Configuring your visualizations -所有的图形可视化都有一个共同的编辑模式。 +All graph visualizations share a common editing schema. -实质上,你可以在这里详细地定义你的可视化。下面将解释其中的三个不同部分。 +In essence, you can define your visualization in detail here. The three different sections of this are explained below. ![](<../../.gitbook/assets/image (34).png>) -### 图表选项 +### Chart options -这部分允许你定义如何显示你的数据。 +This section allows you to define how to display your data. -![see explanations below](<../../.gitbook/assets/image (57).png>) +![see explanations below](<../../.gitbook/assets/image (59).png>) -**标题** +**Title** -* 标题将出现在该图的所有实例的顶部,非常醒目。 -* 图形将始终保持查询的名称,即使你编辑它。 +* The title will appear in all instances of this graph prominently at the top. +* The graph will always keep the name of the query, even if you edit this. -* [ ] **显示图表图例** +* [ ] **Show chart legend** -* 勾选此框将启用或禁用图表的图例。 +* Ticking this box will enable or disable the legend for the chart. -* [ ] **启用堆叠功能** +* [ ] **Enable stacking** -* 勾选此框,将在X轴数值的基础上,将图表数值堆叠在一起。 -* 如果没有打开,这些值将被单独绘制在Y轴上。 -* 支持这个功能的计算将总是把对应于X轴上的数值分组。确保你的数据是干净的,这样才能发挥作用(避免你的数据出现空隙)。 +* If applicable, ticking this box will stack the chart values on top of each other based on the x-axis values. +* If this is not turned on, the values will be plotted individually on the y-axis. +* The calculation underpinning this will always group the value corresponding to one value on the x-axis. Make sure your data is clean in able for this to work (avoid gaps in your data). -* [ ] **归一化为百分比数据** +* [ ] **Normalize to percentage data** -* 图表归一化并显示所选数据的百分比值。 -* 支持这个功能的计算将总是把对应于X轴上的数值分组。确保你的数据是干净的,这样才能发挥作用(避免你的数据出现空隙)。 +* This will normalize the chart to display percentage values of the chosen data table. +* The calculation underpinning this will always group the value corresponding to one value on the x-axis. Make sure your data is clean in able for this to work (avoid gaps in your data). + -* [ ] **显示数据标签** +* [ ] **Show data labels** -* 勾选这个框,就可以在图中显示各个数据点。 -* 这只有在你的数据点很少,而且相互之间分布得很远,不会重叠的情况下才有意义。 +* Ticking this box leads to the display of the individual datapoints inside of the graph. +* This only makes sense in cases where you have few datapoints that are spread out far enough from each other to not overlap. -### 结果数据 +### Result data -在这里你可以挑选要显示的数据点。 +Here you can pick the data points that are to be displayed. -![see explanations below](<../../.gitbook/assets/image (46).png>) +![see explanations below](<../../.gitbook/assets/image (47).png>) -你可以选择一个**x-axis**和多个**y-axis。** +You can choose one **x-axis** and multiple **y-axis.** -另外,你也可以在Y轴上选择一个数据系列,并选择按表格的不同列进行分组(如上例所示)。 +Alternatively, you can also choose one data series on the y-axis and choose to group it by a different column of your table (as shown in the example above). -### **X轴选项** +### **X-axis options** -使用这些选项,你可以改变X轴数据的显示方式。 +Using these options you can influence how your x-axis data gets displayed. ![see explanations below](<../../.gitbook/assets/image (37).png>) -**坐标轴名称** +**Axis title** -* 这里可以修改X轴的名称。 +* This field allows you to specify a title for your x-axis. -* [ ] **排序值** +* [ ] **Sort Values** -* 通过勾选这个框,你可以指定你是否希望图表中的数值被排序。 -* 如果你的X轴是一个时间序列,这将自动发生。 +* by ticking this box you can specify if you want the values in your chart to be ordered. +* If your x-axis is a timeseries, this will automatically happen. -* [ ] **数值反序** +* [ ] **Reverse value** -* 勾选此框将反转X轴上数值的顺序。 +* Ticking this box will reverse the order of the values on the x-axis. -* [ ] **对数** +* [ ] **Logarithmic** -* 勾选此框将使你的X轴数值按对数显示。 +* Ticking this box will make your x-axis values display __ logarithmically. -### **Y轴选项** +### **Y-axis options** -使用这些选项,你可以改变Y轴数据的显示方式。 +With these options you can influence how your x-axis data gets displayed. ![see explanations below](<../../.gitbook/assets/image (40).png>) -**坐标轴名称** +**Axis title** -* 这里可以修改Y轴的名称。 +* This field allows you to specify a title for your y-axis. -* [ ] **对数** +* [ ] **Logarithmic** -* 勾选此框将使你的Y轴数值按对数显示 +* Ticking this box will make your x-axis values display __ logarithmically. -* [ ] **启用右Y轴** +* [ ] **Enable right y-axis** -* 勾选此框将启用一个额外的Y轴,你可以在上面绘制数值。 -* 你可以再[图表部分](graphs.md#ordering-your-series)选择你想在左右轴上显示的内容。 +* Ticking this box will enable an additional y-axis that you can plot values on. +* You can choose in the [chart series section](graphs.md#ordering-your-series) what you want to be displayed on the left and right axis. -### **勾选格式** +### **Tick formats** -****![](<../../.gitbook/assets/image (59).png>)**** +****![](<../../.gitbook/assets/image (61).png>)**** -勾选格式会改变你的图表中的数值和轴标签的显示方式。 +Tick formats will change how values in your chart and the axis labels will get displayed. -它遵循这样的逻辑: +It follows this logic: -| 值 | 勾选格式 | 输出 | 说明 | +| Value | Tick format | Output | Description | | ------------ | ----------- | --------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- | -| 1256784.3745 | 空白 | 1256784,3745000 | 显示全部7位数字 | -| 1256784.3745 | 0 | 1256784 | 只显示整数 | -| 1256784.3745 | 0,0 | 1,256,784 | 只显示带有逗号分隔符的整数 | -| 1256784.3745 | 0,0.00 | 1,256,784.38 | 根据点后的零数显示带小数点的数值 | -| 1256784.3745 | 0\[.]0a | 1.2m |以简略的格式显示该值。
将根据点后的零数显示缩略数的小数。
| -| 1256784.3745 | $0\[.]0a | $1.2m | 遵循与之前相同的方法,但增加了一个 $ 前缀。 | +| 1256784.3745 | left blank | 1256784,3745000 | Display the full number and 7 decimals | +| 1256784.3745 | 0 | 1256784 | Only Display whole numbers | +| 1256784.3745 | 0,0 | 1,256,784 | Only displays whole numbers with comma separator | +| 1256784.3745 | 0,0.00 | 1,256,784.38 | Displays the value with decimals points according to the count of zeroes after the dot | +| 1256784.3745 | 0\[.]0a | 1.2m |Displays the value in an abbreviated format.
Will display decimals of the abbreviated number according to count of zeroes after the dot.
| +| 1256784.3745 | $0\[.]0a | $1.2m | Adheres to the same methods as before, but adds a $ prefix. | -### 整理系列 +### Ordering your series -![](<../../.gitbook/assets/image (50).png>) +![](<../../.gitbook/assets/image (52).png>) -在可视化编辑器的这一部分,你可以最终确定你的图表。 +In this section of the visualization editor you can finalize your graph. -* 你可以通过简单地点击字段来重新命名 "系列"。 -* 你可以通过点击下拉菜单来改变图表类型。 -* 你可以通过点击颜色框来改变颜色。 -* 最后你还可以改变系列的顺序。 +* You can rename the "series" by simply clicking into the field. +* You can change the chart type by clicking into the dropdown. +* You can change the colors by clicking into the color box. +* Finally you can also change the order of the series. -### 选择颜色 +### Picking Colors -你可以用你的浏览器本地颜色选择器来挑选颜色。 +You can pick colors with your browser native color selector. -这对每个人来说可能略有不同,这取决于你使用的浏览器。 +This might look slightly different for you depending on which browser you use. diff --git a/duneapp/visualizations/pie-charts.md b/duneapp/visualizations/pie-charts.md index 8bb50e8..1585e25 100644 --- a/duneapp/visualizations/pie-charts.md +++ b/duneapp/visualizations/pie-charts.md @@ -1,38 +1,39 @@ -# 饼图 +# Pie Charts -**饼状图能很好地显示某物的构成。** +**Pie charts are great for showing the composition of something.** -![Marketshare of different decentralized exchanges on https://dune.xyz/hagaetc/dex-metrics](<../../.gitbook/assets/image (49).png>) +![Marketshare of different decentralized exchanges on https://dune.xyz/hagaetc/dex-metrics](<../../.gitbook/assets/image (51).png>) -## 设置你的饼图 -![](<../../.gitbook/assets/image (53).png>) +## Configuring your pie chart -### 图表选项 +![](<../../.gitbook/assets/image (55).png>) -#### 标题 +### Chart Options + +#### Title + +* The Title will appear in all instances of this graph prominently at the top +* If left blank the query name will be the only thing that is left standing -* 标题将出现在该图的所有实例中,并在顶部醒目位置。 -* 如果留空,查询名称将是唯一留下的东西。 -* -* [ ] **显示数据标签** +* [ ] **Show data labels** -* 勾选此框会导致在图表中显示单个数据点。 -* 这只有在你的数据点很少,而且彼此之间的距离足够远,不会重叠的情况下才有意义。 +* Ticking this box leads to the display of the individual datapoints inside of the graph. +* This only makes sense in cases where you have few datapoints that are spread out far enough from each other to not overlap. -### 结果数据 +### Result data -这里你可以挑选要显示的数据点。 +Here you can pick the data points that are to be displayed. ![The configuration for the chart above](<../../.gitbook/assets/image (33).png>) -你可以选择一个**X轴**和一个Y轴。 +You can choose one **x-axis** and one y-axis. -### 饼图选项 +### Pie Options -**标签格式** +**Label format** -* 这部分允许你定义数据标签的[勾选格式](https://docs.dune.xyz/duneapp/visualizations#tick-formats)。 +* This field allows you to define the [tick format](https://docs.dune.xyz/duneapp/visualizations#tick-formats) of the data labels. diff --git a/faq/does-dune-have-a-token.md b/faq/does-dune-have-a-token.md index ee61c33..dcd51c8 100644 --- a/faq/does-dune-have-a-token.md +++ b/faq/does-dune-have-a-token.md @@ -1,3 +1,3 @@ -# Dune有发行代币吗? +# Does Dune have a Token? -**Dune没有代币。** +**Dune does not have token.** diff --git a/faq/does-dune-have-an-api.md b/faq/does-dune-have-an-api.md index de23bfa..3a8032f 100644 --- a/faq/does-dune-have-an-api.md +++ b/faq/does-dune-have-an-api.md @@ -1,7 +1,7 @@ -# Dune有API吗? +# Does Dune have an API? -**Dune正在开发API!** +**Dune is currently working on an API!** -如果你想获得API的早期访问,并愿意告诉我们更多关于你期望如何使用API的信息——请填写我们的[API意愿表](https://docs.google.com/forms/d/e/1FAIpQLSdoF4\_LC1BdPumRq1TJguxAsKC-g5i6u2f7-sac5v14EubLsw/viewform). +If you'd like to express interest in receiving early access and would be willing to tell us more on how you expect to use the API - please complete our [API Interest form](https://docs.google.com/forms/d/e/1FAIpQLSdoF4\_LC1BdPumRq1TJguxAsKC-g5i6u2f7-sac5v14EubLsw/viewform). -在此之前,[付费用户](https://dune.com/pricing) 可以将结果导出为CSV,任何人都可以通过点击任何查询可视化的"[嵌入](../sharing/embeds/)",免费将Dune图表嵌入到他们的页面。 +Until then, [paid plan users](https://dune.com/pricing) can export results as CSV and anyone can embed Dune charts on their page for free by clicking "[Embed](../sharing/embeds/)" on any query visualisation. diff --git a/faq/how-are-results-refreshing.md b/faq/how-are-results-refreshing.md index 18c5c86..83f27d7 100644 --- a/faq/how-are-results-refreshing.md +++ b/faq/how-are-results-refreshing.md @@ -1,7 +1,7 @@ -# 结果如何刷新? +# How are results refreshing? -当一个可视化结果被查看时,无论是在查询页面还是在仪表盘上,Dune后端将检查最近的结果运行时间。如果结果是比较老的(目前定义为>3小时),Dune将自动执行这个查询并在后台运行。 +When a visualisation is viewed, either on a query page or on a dashboard, the Dune backend will inspect the age of the most recent result. If the result is stale (currently defined as >3 hours old), Dune will automatically queue an execution for this query and run it in the background. -这意味着仪表盘在被查看时将始终保持最新状态,查询创建者不需要设置刷新时间。 +This means that dashboards will always be kept up to date when they are being viewed and the query creator does not need to set a refresh schedule. -请注意,结果刷新的执行队列与每个用户在查询编辑器中创建和运行查询的队列是分开的。 +Note that the query execution queue is separate from each individual users queue when they create and run queries in the query editor. diff --git a/faq/how-does-dune-get-its-data.md b/faq/how-does-dune-get-its-data.md index cf8bd83..fbbe601 100644 --- a/faq/how-does-dune-get-its-data.md +++ b/faq/how-does-dune-get-its-data.md @@ -1,6 +1,7 @@ -# Dune怎么获取数据源? +# How does Dune get it's data ? -我们正在与整个行业的节点供应商合作,将数据纳入我们的数据库。包括来自这些区块链的所有原始历史数据,但不包括状态数据。 +We are working together with node providers across the Industry to ingest data into our database. This includes all raw historical data from these blockchains. It does not include state data.\ -我们对任何智能合约一视同仁,你可以通过我们的[解码页面](.../data-tables/data-tables/decoded-data.md)提交任何合约,并在几个小时内使用它。该过程唯一的前提条件是要提供ABI以便我们能真正地解码合约(通常ABI已经在etherscan上,但也有特殊情况)。 +We don't discriminate against any smart contract, you can submit any contract via our [decoding page](../data-tables/data-tables/decoded-data.md) and work with it in a matter of hours. The only prerequisite for this is an ABI so we can actually decode the contract (usually the ABI is already on etherscan, but there are edge cases). + diff --git a/onboarding/onboarding-to-dune.md b/onboarding/onboarding-to-dune.md index 658fd21..95b6146 100644 --- a/onboarding/onboarding-to-dune.md +++ b/onboarding/onboarding-to-dune.md @@ -1,26 +1,28 @@ -# 入门Dune +# Onboarding to Dune +### Dune is an open platform that anyone can build on -### Dune是任何人都可以在上边Build的开放平台 - -Dune团队经常被问到关于”可能的合作”以及“合作方式”.我们感谢所有这些善意的请求,但是如果你想要在Dune上展示自己的数据,你确实不需要任何来自Dune核心团队的许可或者同意。 \ +Team Dune often gets asked about "possible cooperation" and "ways to work together" and while we appreciate all these kind requests, there really isn't anything you need from the core team to be able to surface your data on dune. \ \ -我们的平台是免费的、开放的以及无需许可的,任何人都按照他们认为适合的方式去使用这个平台。\ -你所需要的只是一名熟练的自由职业者或你的一个团队成员来处理实际要展示的数据。 +Our platform is free, open and permissionless and anyone can use the platform as they see fit. \ +All you need is either a skilled freelancer or one of your team members to take care of the actually surfacing the data. -**过程如下:** +**The Process looks like this:** -1. **整理一份所有相关合约的清单并把他们提交**[**解码**](../duneapp/adding-new-contracts.md)**。** -2. **使用SQL Queries查询数据** -3. **把查询结果给可视化** -4. **在Dashboard上把可视化的结果组装起来.** -5. **把看板做得更美观** -6. **享受你的数据** +1. **Compile a List of all relevant contracts and submit them for** [**decoding**](../duneapp/adding-new-contracts.md)**.** +2. **Surface the data using SQL queries** +3. **Visualize the results** +4. **Assemble visualizations on a dashboard.** +5. **Make the dashboard pretty** +6. **Enjoy your data** **** -### 如何找到一个自由职业者 +### How to find a freelancer + +There is quite a few people in the web3 scene which either specialized in building on dune or have the skillset in their repertoire. To reach out to this pool of freelancers, you can **fill in this** [**form**](http://bounties.dune.xyz/) **** and freelancers will get back to you in little to no time. Alternatively, you could also use platforms like gitcoin or layer3.xyz to find suitable freelancers. + +If hiring a freelancer for the first time, please make sure to check their past works and dashboards to verify that they are indeed capable of solving the task at hand. + -Web3场景中有很多这样的人,他们要么专职在Dune上building,要么在他们本身有这个技能点。如果你想要联系这群自由职业者,**你可以填写这个**[**表格**](http://bounties.dune.xyz/) 自由职业者会很快回复你。或者你也可以使用 gitcoin 或 layer3.xyz 等平台来寻找合适的自由职业者。 -如果你是第一次聘请自由职业者,请务必查看他们过去的作品和仪表盘,以确认他们确实有能力解决手头的任务。 diff --git a/sharing/attribution.md b/sharing/attribution.md index 1a3cc55..30b1852 100644 --- a/sharing/attribution.md +++ b/sharing/attribution.md @@ -1,19 +1,19 @@ --- -说明: Dune上的内容是社区创作的,所以也归属于社区。 +description: Content on Dune is community created and should be attributed accordingly! --- -# 内容归属 +# Attribution -### 内容归属 +### Attribution -Dune上的创作内容毫无疑问地是平台创作者的成果。\ -在任何其他平台引用Dune上的分析内容,不仅要归功于Dune,还要归功于引用内容的创作者。\ +Content on Dune is first and foremost the product of the creators on the platform. \ +Any mention of analysis published on our platform outside of the platform should credit the creators of this specific piece of analysis and not just "Dune". \ \ -引用图标和仪表盘可以这样归功于创作者: +Crediting charts and dashboards should be done in the following way: _"@eliasmos via_ [_https://dune.com/queries/610591_](https://dune.com/queries/610591)_"._ -你可以在创作者的个人页面中找到他们的推特和更多信息[个人页面](https://dune.xyz/rchen8)。 +You can find the twitter tags and more information of most creators in their [profile page](https://dune.xyz/rchen8). diff --git a/sharing/embeds/README.md b/sharing/embeds/README.md index 63dc8fa..a6e75a0 100644 --- a/sharing/embeds/README.md +++ b/sharing/embeds/README.md @@ -1,41 +1,41 @@ --- -说明: 嵌入功能使你能跨网站地使用实时更新的Dune图表! +description: Embeds allow you to enjoy beautiful, updating dune charts across the web! --- -# 嵌入功能 +# Embeds -## 使用嵌入功能 +## Using Embeds -**截图是无趣和过时的。** +**Screenshots are boring and tech of the past.** -Dune自带可以跨平台使用的嵌入功能,而不是使用形式不一的截图功能。 +Instead of using static screenshots in varying forms of quality, Dune has a native embed function that works across most platforms. -你可以在查询标题生成嵌入链接或者选择右上角的嵌入功能。 +You can generate embed links by clicking on any query title and selecting the embed function in the top right corner. ![generating an embedd link](<../../.gitbook/assets/2021-11-01 14-30-33.gif>) -### 参数化嵌入 +### Parameterized embeds -参数化的查询也是可以实现的,但这需要一点技巧: +Embed links also work with parameterized queries, but it is a bit tricky to get them to work: -生成的嵌入链接并不包含必要的参数,尽管查询已经被执行过。我们正在致力于实现自动化的生成链接,但是目前仅有这一条途径能够做到。 +The embed link that gets generated does not include the necessary parameters yet, even if you have ran the query with it. We are already working on automating the link generation, but for now the is the only way for us to handle this. -现在你需要在链接前手动输入参数。 +For now you need to manually prefix the parameter link with the parameters. -输入参数的写法是这样的: +The syntax for this is: `link?name_of_parameter1=xxxx&?name_of_parameter2=yyyy&...` __ -一个示例: +An example of this would be: `>https://dune.xyz/embeds/118220/238460/aa002dd3-f9e2-4d63-86c8-b765569306c6NFT?address=0xff9c1b15b16263c61d017ee9f65c50e4ae0113d7&rolling_n_trades=500`\ `` -### 在不同平台上嵌入 +### Embeds across different platforms -这里有几个使用Dune嵌入的示例: +Here is a couple of exemplary use cases for Dune embeds: {% content-ref url="discord.md" %} [discord.md](discord.md) @@ -55,9 +55,9 @@ Dune自带可以跨平台使用的嵌入功能,而不是使用形式不一的 -### 已知问题 +### Known Issues -然而嵌入功能在一些比较流行的网站上还不能实现,这包括: +Unfortunately, embeds do not work in a couple of fairly popular sites, this includes: * substack * medium diff --git a/sharing/embeds/discord.md b/sharing/embeds/discord.md index cc54744..6c4c434 100644 --- a/sharing/embeds/discord.md +++ b/sharing/embeds/discord.md @@ -1,14 +1,14 @@ --- -说明: Dune可以完美地嵌入Discord展示! +description: Dune's embeds display beautifully in Discord! --- # Discord -Dune嵌入功能在discord上的效果非常好: +Dune embeds work very well in Discord: -你可以简单地在聊天框里发送链接,相应的可视化内容就会被展示。 +You can simply drop the link in the chat and the corresponding visualization will get displayed. -这也非常适合编程一个机器人,以便在命令中返回相应的图表。 +This also lends itself very well to programming a bot to return the corresponding charts on command. ![](<../../.gitbook/assets/2021-11-02 18-39-01.gif>) diff --git a/sharing/embeds/known-issues.md b/sharing/embeds/known-issues.md index d5e9b5f..c9b8ade 100644 --- a/sharing/embeds/known-issues.md +++ b/sharing/embeds/known-issues.md @@ -1,10 +1,10 @@ --- -说明: 并不是所有网站有想要嵌入功能。 +description: Sadly not every website wants to make it. --- -# 已知问题 +# Known Issues -这些网站目前还不支持Dune的嵌入功能: +These websites currently sadly do not support dune embeds: * substack * medium diff --git a/sharing/embeds/mirror.xyz.md b/sharing/embeds/mirror.xyz.md index 8ee786e..feb56a9 100644 --- a/sharing/embeds/mirror.xyz.md +++ b/sharing/embeds/mirror.xyz.md @@ -1,11 +1,11 @@ --- -说明: Dune嵌入功能可以在Mirror.xyz上使用! +description: Dune embedds work in Mirror.xyz! --- # Mirror.xyz -Dune的图表可以很轻松地嵌入mirror.xyz的文章。生成一个嵌入链接然后加上`?display=iframe`的后缀就会实现。 +Dune charts can easily be embedded into articles on mirror.xyz. Simply generate an embed link and postfix it with `?display=iframe` -一个示例: +An example of this would be: `https://dune.xyz/embeds/208941/391702/34ee3319-1cac-40e1-a08d-160bd93693cc?display=iframe` diff --git a/sharing/embeds/twitter.md b/sharing/embeds/twitter.md index d293102..83e670a 100644 --- a/sharing/embeds/twitter.md +++ b/sharing/embeds/twitter.md @@ -1,15 +1,16 @@ --- -说明: >- - 在推特上分享是Dune的可视化内容最常见的使用场景了。 +description: >- + Sharing data on Twitter is probably the most common use case of Dune's + Visualizations. --- -# 推特 +# Twitter -你可以使用嵌入功能在推特上分享可视化内容。 +You can use embeds to share Dune's visualizations on Twitter. -推特将自动呈现可视化效果,并随着时间的推移自动更新。 +Twitter will render the visualizations automatically and they will update automatically as time progresses. -与静态的截图相比这绝对是更好的体验! +Definitely a better experience compared to static screenshots! ![Twitter automatically renders the embed link correctly](<../../.gitbook/assets/2021-11-01 14-45-28.gif>) diff --git a/sharing/embeds/webpages.md b/sharing/embeds/webpages.md index 292e996..a56031e 100644 --- a/sharing/embeds/webpages.md +++ b/sharing/embeds/webpages.md @@ -1,20 +1,20 @@ --- -说明: 你可以在把Dune的可视化内容嵌入大多数网站上。 +description: You can embedd Dune's Visualizations on most Websites with ease. --- -# 网页 +# Webpages -### Dune的图表可以在你的网站上实时更新! +### Dune Charts can live in your website! -你可以使用Dune的嵌入功能来在你的网站上展示Dune上的内容。 +You can use Dune's embed function to embed the charts usually displayed on Dune Analytics Dashboards into your website. -这是一段代码示例: +Here is a code snippet example: `` -我们已经看到这个功能在很多网站上被使用了,比如项目网站,研究者的网站等等,现在唯一的限制就是你的想象力了! +We have seen this feature used on project websites, websites of researchers and basically everywhere by now, the limit really is just your imagination. -这里有一个很好的展示 [cryptoart.io](https://cryptoart.io/data) 网页。 +A great showcase for this is the [cryptoart.io](https://cryptoart.io/data) website.