diff --git a/public/content/translations/de/developers/tutorials/a-developers-guide-to-ethereum-part-one/index.md b/public/content/translations/de/developers/tutorials/a-developers-guide-to-ethereum-part-one/index.md index 9d19e536037..c69f7ca6d1a 100644 --- a/public/content/translations/de/developers/tutorials/a-developers-guide-to-ethereum-part-one/index.md +++ b/public/content/translations/de/developers/tutorials/a-developers-guide-to-ethereum-part-one/index.md @@ -143,14 +143,14 @@ Transaktionen in Ether werden in ähnlicher Weise verwaltet. Aber statt z Versuchen Sie, einige Werte nach und von Wei zu konvertieren. [Beachten Sie](https://web3py.readthedocs.io/en/stable/troubleshooting.html#how-do-i-convert-currency-denominations), dass es zwischen Ether und Wei noch andere Einheiten gibt. Eine der bekanntesten ist **Gwei**, da Transaktionsgebühren in dieser Einheit angegeben werden. ```python -In [2]: Web3.toWei(1, 'ether') +In [2]: Web3.to_wei(1, 'ether') Out[2]: 1000000000000000000 -In [3]: Web3.fromWei(500000000, 'gwei') +In [3]: Web3.from_wei(500000000, 'gwei') Out[3]: Decimal('0.5') ``` -Das Web3-Modul enthält außerdem einen Datenformatkonvertierer (z. B. [`toHex`](https://web3py.readthedocs.io/en/stable/web3.main.html#web3.Web3.toHex)), Adresse (z. B., [`isAddress`](https://web3py.readthedocs.io/en/stable/web3.main.html#web3.Web3.isAddress)), und Hashfunktionen (z. B., [`keccak`](https://web3py.readthedocs.io/en/stable/web3.main.html#web3.Web3.keccak)). Viele davon werden hier genauer erklärt. Um alle verfügbaren Funktionen und Eigenschaften anzuzeigen, können Sie die Autovervollständigung in IPython nutzen. Geben Sie dafür den folgenden Code ein: `Web3`. Anschließend drücken Sie bitte zweimal die Tab-Taste. +Das Web3-Modul enthält außerdem einen Datenformatkonvertierer (z. B. [`to_hex`](https://web3py.readthedocs.io/en/stable/web3.main.html#web3.Web3.to_hex)), Adresse (z. B., [`is_address`](https://web3py.readthedocs.io/en/stable/web3.main.html#web3.Web3.is_address)), und Hashfunktionen (z. B., [`keccak`](https://web3py.readthedocs.io/en/stable/web3.main.html#web3.Web3.keccak)). Viele davon werden hier genauer erklärt. Um alle verfügbaren Funktionen und Eigenschaften anzuzeigen, können Sie die Autovervollständigung in IPython nutzen. Geben Sie dafür den folgenden Code ein: `Web3`. Anschließend drücken Sie bitte zweimal die Tab-Taste. ## Kommunikation mit der Blockchain {#talk-to-the-chain} @@ -182,7 +182,7 @@ Jetzt können Sie mit der Blockchain kommunizieren. Wie das genau funktioniert? Zuallererst eine Zuverlässigkeitsüberprüfung: ```python -In [5]: w3.isConnected() +In [5]: w3.is_connected() Out[5]: True ``` @@ -213,7 +213,7 @@ Out[7]: 1000000000000000000000000 Das sind viele Nullen. Bevor Sie vor Freude in die Luft springen, erinnern Sie sich bitte an unsere vorherige Lektion über die Schreibweise von Währungen. Ether wird in der kleinsten Einheit Wei angegeben. Rechnen Sie dies in Ether um: ```python -In [8]: w3.fromWei(1000000000000000000000000, 'ether') +In [8]: w3.from_wei(1000000000000000000000000, 'ether') Out[8]: Decimal('1000000') ``` @@ -248,7 +248,7 @@ Wir verharren bei Block Null bis es eine Transaktion zum Minen gibt, also geben In [10]: tx_hash = w3.eth.send_transaction({ 'from': w3.eth.accounts[0], 'to': w3.eth.accounts[1], - 'value': w3.toWei(3, 'ether'), + 'value': w3.to_wei(3, 'ether'), 'gas': 21000 }) ``` diff --git a/public/content/translations/id/developers/tutorials/a-developers-guide-to-ethereum-part-one/index.md b/public/content/translations/id/developers/tutorials/a-developers-guide-to-ethereum-part-one/index.md index f4149eb7fd8..3d73353a164 100644 --- a/public/content/translations/id/developers/tutorials/a-developers-guide-to-ethereum-part-one/index.md +++ b/public/content/translations/id/developers/tutorials/a-developers-guide-to-ethereum-part-one/index.md @@ -143,14 +143,14 @@ Pola yang sama digunakan ketika menangani transaksi dalam ether. Namun, a Cobalah untuk mengubah beberapa nilai ke dan dari wei. Perhatikan bahwa [ada nama untuk banyak denominasi](https://web3py.readthedocs.io/en/stable/troubleshooting.html#how-do-i-convert-currency-denominations) di antara ether dan wei. Salah satu yang lebih dikenal di antaranya adalah **gwei**, karena sering menjadi cara mewakili biaya transaksi. ```python -In [2]: Web3.toWei(1, 'ether') +In [2]: Web3.to_wei(1, 'ether') Out[2]: 1000000000000000000 -In [3]: Web3.fromWei(500000000, 'gwei') +In [3]: Web3.from_wei(500000000, 'gwei') Out[3]: Decimal('0.5') ``` -Metode utilitas lainnya di modul Web3 memasukkan pengubah format data (misalnya, [`toHex`](https://web3py.readthedocs.io/en/stable/web3.main.html#web3.Web3.toHex)), pembantu alamat (misalnya, [`isAddress`](https://web3py.readthedocs.io/en/stable/web3.main.html#web3.Web3.isAddress)), dan fungsi hash (misalnya, [`keccak`](https://web3py.readthedocs.io/en/stable/web3.main.html#web3.Web3.keccak)). Beberapa di antaranya akan dibahas nanti dalam seri. Untuk melihat semua metode dan properti yang tersedia, manfaatkan fitur pelengkap otomatis IPython dengan mengetik `Web3`. dan menekan tombol tab dua kali setelah tanda titik. +Metode utilitas lainnya di modul Web3 memasukkan pengubah format data (misalnya, [`to_hex`](https://web3py.readthedocs.io/en/stable/web3.main.html#web3.Web3.to_hex)), pembantu alamat (misalnya, [`is_address`](https://web3py.readthedocs.io/en/stable/web3.main.html#web3.Web3.is_address)), dan fungsi hash (misalnya, [`keccak`](https://web3py.readthedocs.io/en/stable/web3.main.html#web3.Web3.keccak)). Beberapa di antaranya akan dibahas nanti dalam seri. Untuk melihat semua metode dan properti yang tersedia, manfaatkan fitur pelengkap otomatis IPython dengan mengetik `Web3`. dan menekan tombol tab dua kali setelah tanda titik. ## Berbicara dengan rantai {#talk-to-the-chain} @@ -182,7 +182,7 @@ Sekarang Anda siap untuk berselancar di atas rantai! Itu bukanlah sesuatu yang d Pertama-tama, pemeriksaan kewarasan: ```python -In [5]: w3.isConnected() +In [5]: w3.is_connected() Out[5]: True ``` @@ -213,7 +213,7 @@ Out[7]: 1000000000000000000000000 Itu berangka nol sangat banyak! Sebelum Anda menuju ke bank palsunya sambil tertawa, coba ingat kembali pelajaran tentang denominasi mata uang dari bagian sebelumnya. Nilai ether diwakilkan dalam denominasi terkecil, wei. Ubah itu ke ether: ```python -In [8]: w3.fromWei(1000000000000000000000000, 'ether') +In [8]: w3.from_wei(1000000000000000000000000, 'ether') Out[8]: Decimal('1000000') ``` @@ -248,7 +248,7 @@ Kita akan terhenti pada blok nol sampai ada transaksi yang akan ditambang, jadi In [10]: tx_hash = w3.eth.send_transaction({ 'from': w3.eth.accounts[0], 'to': w3.eth.accounts[1], - 'value': w3.toWei(3, 'ether'), + 'value': w3.to_wei(3, 'ether'), 'gas': 21000 }) ``` diff --git a/public/content/translations/ro/developers/tutorials/a-developers-guide-to-ethereum-part-one/index.md b/public/content/translations/ro/developers/tutorials/a-developers-guide-to-ethereum-part-one/index.md index b90ca78b5ed..29953d35507 100644 --- a/public/content/translations/ro/developers/tutorials/a-developers-guide-to-ethereum-part-one/index.md +++ b/public/content/translations/ro/developers/tutorials/a-developers-guide-to-ethereum-part-one/index.md @@ -143,14 +143,14 @@ Un model similar este utilizat la gestionarea tranzacțiilor în ether. N Încercați să convertiți câteva valori în și din wei. Rețineți că [există și alte denumiri pentru numeroasele denominații](https://web3py.readthedocs.io/en/stable/troubleshooting.html#how-do-i-convert-currency-denominations) între ether și wei. Una din cele mai cunoscute dintre ele este **gwei**, deoarece este adesea modalitatea de reprezentare a taxelor de tranzacție. ```python -In [2]: Web3.toWei(1, 'ether') +In [2]: Web3.to_wei(1, 'ether') Out[2]: 1000000000000000000 -In [3]: Web3.fromWei(500000000, 'gwei') +In [3]: Web3.from_wei(500000000, 'gwei') Out[3]: Decimal('0.5') ``` -Alte metode utilitare din modulul Web3 cuprind convertoare de formate de date (de exemplu, [`toHex`](https://web3py.readthedocs.io/en/stable/web3.main.html#web3.Web3.toHex)), ajutoare de adrese (de exemplu, [`isAddress`](https://web3py.readthedocs.io/en/stable/web3.main.html#web3.Web3.isAddress)) și funcții hash (de exemplu, [`keccak`](https://web3py.readthedocs.io/en/stable/web3.main.html#web3.Web3.keccak)). Multe dintre acestea vor fi abordate mai târziu în această serie. Pentru a vizualiza toate metodele și proprietățile disponibile, utilizați autocompletarea IPython, tastând `Web3`. și apăsând tasta „Tab” de două ori după punct. +Alte metode utilitare din modulul Web3 cuprind convertoare de formate de date (de exemplu, [`to_hex`](https://web3py.readthedocs.io/en/stable/web3.main.html#web3.Web3.to_hex)), ajutoare de adrese (de exemplu, [`is_address`](https://web3py.readthedocs.io/en/stable/web3.main.html#web3.Web3.is_address)) și funcții hash (de exemplu, [`keccak`](https://web3py.readthedocs.io/en/stable/web3.main.html#web3.Web3.keccak)). Multe dintre acestea vor fi abordate mai târziu în această serie. Pentru a vizualiza toate metodele și proprietățile disponibile, utilizați autocompletarea IPython, tastând `Web3`. și apăsând tasta „Tab” de două ori după punct. ## Comunicaţi cu lanțul {#talk-to-the-chain} @@ -182,7 +182,7 @@ Acum sunteți gata pentru a naviga în lanț! Unii oameni spun că acest lucru n Să începem cu începutul, o verificare a sănătății: ```python -In [5]: w3.isConnected() +In [5]: w3.is_connected() Out[5]: True ``` @@ -213,7 +213,7 @@ Out[7]: 1000000000000000000000000 Asta înseamnă o mulțime de zerouri! Înainte de a vă bucura că aveți o tonă de bani, amintiți-vă de lecția dinainte despre denominaţiile monetare. Valorile etherului sunt reprezentate în cea mai mică denominaţie, wei. Convertiți-o în ether: ```python -In [8]: w3.fromWei(1000000000000000000000000, 'ether') +In [8]: w3.from_wei(1000000000000000000000000, 'ether') Out[8]: Decimal('1000000') ``` @@ -248,7 +248,7 @@ Suntem blocați la blocul zero până când va exista o tranzacție de minat, a In [10]: tx_hash = w3.eth.sendTransaction({ 'from': w3.eth.accounts[0], 'to': w3.eth.accounts[1], - 'value': w3.toWei(3, 'ether') + 'value': w3.to_wei(3, 'ether') }) ``` diff --git a/public/content/translations/zh/developers/tutorials/a-developers-guide-to-ethereum-part-one/index.md b/public/content/translations/zh/developers/tutorials/a-developers-guide-to-ethereum-part-one/index.md index d92aa5ede8c..d370ead2438 100644 --- a/public/content/translations/zh/developers/tutorials/a-developers-guide-to-ethereum-part-one/index.md +++ b/public/content/translations/zh/developers/tutorials/a-developers-guide-to-ethereum-part-one/index.md @@ -143,14 +143,14 @@ In [1]: from web3 import Web3 试一下将一些数值转换为 wei 或反向转换。 请注意, [ETH 和 wei 之间还有其他面额](https://web3py.readthedocs.io/en/stable/troubleshooting.html#how-do-i-convert-currency-denominations)名称。 其中比较有名的是 **gwei**,因为它通常用于表示交易费用。 ```python -In [2]: Web3.toWei(1, 'ether') +In [2]: Web3.to_wei(1, 'ether') Out[2]: 1000000000000000000 -In [3]: Web3.fromWei(500000000, 'gwei') +In [3]: Web3.from_wei(500000000, 'gwei') Out[3]: Decimal('0.5') ``` -Web3 模块上的其他实用方法包括数据格式转换器(例如 [`toHex`](https://web3py.readthedocs.io/en/stable/web3.main.html#web3.Web3.toHex)),地址助手,(例如 [`is address`](https://web3py.readthedocs.io/en/stable/web3.main.html#web3.Web3.isAddress)),以及哈希函数(例如 [`keccak`](https://web3py.readthedocs.io/en/stable/web3.main.html#web3.Web3.keccak))。 其中许多内容将在后面的系列文章中介绍。 要查看所有可用的方法和属性,可以利用 IPython 的自动补全功能,输入 `Web3`。 然后在点号后面按两次 tab 键。 +Web3 模块上的其他实用方法包括数据格式转换器(例如 [`to_hex`](https://web3py.readthedocs.io/en/stable/web3.main.html#web3.Web3.to_hex)),地址助手,(例如 [`is_address`](https://web3py.readthedocs.io/en/stable/web3.main.html#web3.Web3.is_address)),以及哈希函数(例如 [`keccak`](https://web3py.readthedocs.io/en/stable/web3.main.html#web3.Web3.keccak))。 其中许多内容将在后面的系列文章中介绍。 要查看所有可用的方法和属性,可以利用 IPython 的自动补全功能,输入 `Web3`。 然后在点号后面按两次 tab 键。 ## 与链交互 {#talk-to-the-chain} @@ -182,7 +182,7 @@ In [4]: w3 = Web3(Web3.EthereumTesterProvider()) 第一件事,先进行连接检查。 ```python -In [5]: w3.isConnected() +In [5]: w3.is_connected() Out[5]: True ``` @@ -213,7 +213,7 @@ Out[7]: 1000000000000000000000000 好多零啊! 在你一路笑醒之前,先回忆一下之前关于货币面额的介绍。 ETH 币值用最小的面额 wei 来表示。 将其转换为 ETH: ```python -In [8]: w3.fromWei(1000000000000000000000000, 'ether') +In [8]: w3.from_wei(1000000000000000000000000, 'ether') Out[8]: Decimal('1000000') ``` @@ -248,7 +248,7 @@ Out[9]: AttributeDict({ In [10]: tx_hash = w3.eth.send_transaction({ 'from': w3.eth.accounts[0], 'to': w3.eth.accounts[1], - 'value': w3.toWei(3, 'ether'), + 'value': w3.to_wei(3, 'ether'), 'gas': 21000 }) ```