From 05385f062fdee6f3f295d087cff476b50b85b5bb Mon Sep 17 00:00:00 2001 From: Severino Lorilla Jr Date: Wed, 28 Feb 2018 10:57:28 +0800 Subject: [PATCH] TL Localization #2 (#426) * Initial commit for contribution number 1. * Update api.md Filipino Translation for api.md * Update whitepaper.md - Cordeta From Line 1 to 61 A total of 1112 words. (Source codes and variables were not counted) * Update whitepaper.md changed all "alaala to memorya" few touches * Update Whitepaper.md Minor touches : Gayun din to Gayundin * Update whitepaper.md Review Changes modified review changes * * Updated commit for contribution 1. * Update api.md Updated review * Updated files for contribution no. 1 * Update for contribution #1. * Update api.md Fixed * Update api.md Fixed #2 * Update setup.md Filipino Translation for setup.md * Update exchange.md Filipino Transalation * Update api.md Updated changes * Fixes for contribution #1. * update exchange.md * Update setup.md * Update gui.md Filipino translation. Ready for review * whitepaper.md [FULL TAGALOG TRANSLATION][FOR REVIEW] From line 63 to 113 A total of 454 translated words * Update GUI.md I fixed the errors. * Update whitepaper.md Changes based from severinolorillajr * Initial TL translations for white-paper.md * Partial TL translations for white-paper.md - 1,176 words * NEO Filipino Localization #2 (part 1) * NEO Filipino Localization #2 (part 2) * Updated TL translations for white-paper.md based on review * NEO Filipino Localization #2 (Fix based on reviews) --- tl-tl/sc/getting-started-2015.md | 113 +++++++++++++++-------------- tl-tl/sc/getting-started-csharp.md | 90 +++++++++++------------ tl-tl/sc/white-paper.md | 67 ++++++++--------- 3 files changed, 136 insertions(+), 134 deletions(-) diff --git a/tl-tl/sc/getting-started-2015.md b/tl-tl/sc/getting-started-2015.md index c6ff473ca..96e63ab4a 100644 --- a/tl-tl/sc/getting-started-2015.md +++ b/tl-tl/sc/getting-started-2015.md @@ -1,124 +1,125 @@ -# How to use C # to write NEO smart contract for VS2015 +# Paano gamitin ang C # para magsulat ng NEO smart na kontrata para sa VS2015 -We currently recommend C# for developing smart contracts (though we support or plan to support Java, Kotlin, Go, C/C + +, Python, JavaScript and other programming languages) +Kami ay kasalukuyang nagrerekomenda na gumamit ng C# para mag-program ng mga smart na kontrata (bagamat kami ay sumusuporta o nagpaplanong sumuporta sa Java, Kotlin, Go, C/C + +, Python, Javascript at iba pang mga programming na lengguwahe) -This section contains a short tutorial that guides you in configuring the C# development environment for NEO smart contracts and gives you an idea of how to create a smart contract project and how to compile it. +Ang seksyon na ito ay naglalaman ng maikling tutoryal na maggagabay sa iyo para ikonpigyura ang C# development environment para sa mga NEO smart na kontrata at magbibigay sa iyo ng ideya kong papaano gumawa ng isang proyekto ng smart na kontrata at paano ito ikokompayl. -## development tools +## mga development tool ### 1. Visual Studio 2015 -Download and install method: +Pamamaraan ng Pag-download at Pag-install: -If you have already installed Visual Studio 2015 (any version) on your computer, you can skip this section. +Kung meron nang naka-install na Visual Studio 2015 (kahit anong bersyon) sa iyong kompyuter, pwede mong laktawan ang seksyon na ito. -Visual Studio 2015 has been off the official website from home, but can be downloaded. +Ang Visual Studio 2015 ay wala na sa home ng opisyal na website, pero maari pa rin itong madownload. -Open the [Visual Studio old version download page](https://www.visualstudio.com/en/vans/vs/older-downloads/) click `free to join` +Buksan ang [lumang bersyon ng Visual Studio download na pahina](https://www.visualstudio.com/en/vans/vs/older-downloads/) at i-click ang `free to join`    ![](assets/install_core_cross_platform_development_toolset.jpg) -Use your own Microsoft account login, enter Visual Studio Dev Essentials in the navigation menu, click `download` +Gamitin ang iyong sariling Microsoft account para mag-login, itala ang Visual Studio Dev Essentials sa navigation menu, i-click ang `download` -![image](assets/2017-05-10_13-47-10.jpg) +![imahe](assets/2017-05-10_13-47-10.jpg) -In the search box, enter Visual Studio Community 2015 with Update 3, and then select the search results in a good version, language, etc., click the right side of the `download` button -![image](assets/2017-05-10_13-45-48.jpg) +Sa search na kahon, itala ang Visual Studio Community 2015 with Update 3, at piliin ang resulta ng paghahanap sa tamang bersyon, lengguwahe, etc., i-click ang kanang bahagi ng `download` na pindutan. -Installation method and the general software is basically the same, the installation process without the need to select additional features, only the core part of the VS2015 can be installed +![imahe](assets/2017-05-10_13-45-48.jpg) -![image](assets/2017-05-10_9-48-54.jpg) +Ang pamamaraan ng pag-install at ang general na software ay kapareho lang, ang proseso ng pag-install na hindi kinakailangan ang pagpili ng mga karagdagang mga feature, ang core na parte ng VS2015 lamang ang pwede ma-install -### 2. NET Core tools Preview 2 for Visual Studio 2015 +![imahe](assets/2017-05-10_9-48-54.jpg) -Download and install method: +### 2. Ang NET Core tools Preview 2 para sa Visual Studio 2015 -Open the [.Net Core download page](https://www.microsoft.com/net/download/core) +Pamamaraan ng Pag-download at Pag-install: -Download and install NET Core tools Preview 2 for Visual Studio 2015 +Buksan ang [.Net Core download na pahina](https://www.microsoft.com/net/download/core) -![image](assets/2017-05-10_15-38-46.jpg) +I-download at i-install ang NET Core tools Preview 2 para sa Visual Studio 2015 + +![imahe](assets/2017-05-10_15-38-46.jpg) ### 3. NeoContractPlugin -installation method: +Pamamaraan ng pag-install: -Open Visual Studio 2015, open the tool, extended and updated, click on the left for online search for NEO installation, Neo.SmartContract +Buksan ang Visual Studio 2015, buksan ang tool, na-extend at na-update, i-click ang nasa kaliwa para sa online search para sa NEO instolasyon, Neo.SmartContract -![image](assets/2017-05-10_15-50-48.jpg) +![imahe](assets/2017-05-10_15-50-48.jpg) ### 4. neo-compiler -Installation and configuration methods: +Pamamaraan ng Pag-install at pag-konpigyura: -Download the [neo-compiler](https://github.com/neo-project/neo-compiler) project on Github, open the solution with Visual Studio 2015, compile the neon project, +I-download ang [neo-compiler](https://github.com/neo-project/neo-compiler) na proyekto sa Github, buksan ang solusyon gamit ang Visual Studio 2015, ikompayl ang neon project, -![image](assets/2017-05-10_18-22-39.jpg) +![imahe](assets/2017-05-10_18-22-39.jpg) -After the compilation is successful, the neon.exe file will be generated in `bin\Debug\netcoreapp1.0\win10-x64` -   > [!Note] -   > If your computer is a 32-bit operating system, you need to change the win10-x64 in the project.json file to win10-x86 +Pagkatapos na makompleto ang pagkompayl, ang neon.exe na file ay mabubuo sa `bin\Debug\netcoreapp1.0\win10-x64` +   > [!Tandaan] +   > Kung ang iyong kompyuter ay gumagamit ng 32-bit na operating system, kinakailangan mong baguhin ang win10-x64 sa project.json file sa win10-x86. -You now need to add a path, so that any location can access the program. To add the path method, open the computer properties (or turn on the control panel, system and security, system), open the advanced system settings, select the Advanced tab, click the environment variable button, as shown in Figure +Kinakailangan mo na ngayong magdagdag ng isang landas, para ang kahit na anong lokasyon ay makaka-akses sa programma. Para idagdag ang path na pamamaraan, buksan ang mga computer properties (o buksan ang control panel, system and security, system), buksan ang advanced system settings, piliin ang Advanced tab, i-click ang environment variable na pindutan, tulad ng ipinapakita sa Pigyur -![image](assets/2017-05-10_18-37-05.jpg) +![imahe](assets/2017-05-10_18-37-05.jpg) -Then select Path and click `Edit ' +Tapos, piliin ang Path at i-click ang `Edit ' -![image](assets/2017-05-10_18-46-05.jpg) +![imahe](assets/2017-05-10_18-46-05.jpg) -In the pop-up window, click "New" input neon.exe where the directory, click `OK`, `OK` +Sa pop-up window, i-click ang "New" input neon.exe kung saan ang direktoryo, i-click ang `OK`, `OK` -![image](assets/2017-05-10_18-48-11.jpg) +![imahe](assets/2017-05-10_18-48-11.jpg) -Add the path, run cmd test, enter neon.exe, no error, the output as shown in the figure that the environment variable configuration is successful +Idagdag ang path, patakbuhin ang cmd test, i-enter ang neon.exe, walang error, ang resulta na pinapakita sa pigyur ay nagpapakita na naging matagumpay ang pagkonpigyura -![image](assets/2017-05-10_18-52-10.jpg) +![imahe](assets/2017-05-10_18-52-10.jpg) -## Create project +## Paglikha ng proyekto -After the above four-step installation is successful, you can create an NEO smart contract project in Visual Studio 2015. +Pagkatapos ng matagumpay na apat-na-hakbang na pag-install sa itaas, pwede ka nang lumikha nga isang proyekto na NEO smart na kontrata sa Visual Studio 2015. -![image](assets/2017-05-10_16-08-48.jpg) +![imahe](assets/2017-05-10_16-08-48.jpg) -This will automatically generate a C# file, the default class inherited from the FunctionCode, as shown in the following: +Ito ay awtomatikong bubuo ng isang C# na file, ang default na class ay iinherit galing sa FunctionCode, na pinapakita sa sumusunod: -![image](assets/2017-05-10_16-25-09.jpg) +![imahe](assets/2017-05-10_16-25-09.jpg) -- Note: If the following image appears, because the project in the Neo.SmartContract.Framework did not successfully restore, you can restore the NuGet package in the following way (the process without networking) +- Tandaan: kung ang sumusunod na imahe ay lalabas, ang proyoketo na nasa Neo.SmartContract.Framework ay hindi na-irestore ng maayos, pwede mong i-restore ang Nuget package sa susunod na pamamaraan (ang proseso na walang networking) -![image](assets/2017-05-10_16-27-40.jpg) +![imahe](assets/2017-05-10_16-27-40.jpg) -In the Solution Explorer, select the solution, right-click, and click `Restore NuGet Package` +Sa Solution Explorer, piliin ang solusyon, i-right click, at i-click ang `Restore NuGet Package` -![image](assets/2017-05-10_16-28-39.jpg) +![imahe](assets/2017-05-10_16-28-39.jpg) -Then open the project reference, click `Neo.SmartContract.Framework`. A few cases still can not restore Nuget package how to do? Please restart Visual Studio 2015 or try to generate a solution directly. +Pagkatapos, buksan ang project reference, i-click ang `Neo.SmartContract.Framework`. May ilang mga kaso pa ding hindi maka-restore sa Nuget package, paano ito? Paki-restart ang Visual Studio 2015 o subukang magbuo nga soluson ng direkta. -![image](assets/2017-05-10_16-31-55.jpg) +![imahe](assets/2017-05-10_16-31-55.jpg) -## Compile the project +## Ikompayl ang proyekto -Everything is now ready to add the entry method to the project: +Ang lahat ay handa na para magdagdag ng entry na pamamaraan sa proyekto: ```c# public class Contract1: FunctionCode { -    public static void Main ()// Note that the main method to capitalize +    public static void Main ()// Tandaan na ang main na method ay dapat i-capitalize     {              } } ``` -After this compiles successfully, you will see the generated `SmartContract1.avm` file in the `bin/Debug` directory, which is the file that is generated by the NEO smart contract. +Pagkatapos nitong makompayl, makikita mo ang nabuong `SmartContract1.avm` file sa `bin/Debug` na direktoryo, na kung saan ito ang file na nabuo ng NEO smart na kontrata. -![image](/assets/compile_smart_contract.jpg) +![imahe](/assets/compile_smart_contract.jpg) -!Note: -   If you are generated, there is no output of the results of the map, it does not matter, you can also directly enter the command to compile the dll avm file +!Tandaan: +   Kung ikaw ay nakabuo, walang awtput ng mga resulta ng map, hindi ito mahalaga, pwede ka ring direktang magtala ng command para i-kompayl ang dll avm na file -   Open a command prompt, navigate to the Debug directory, enter the following highlight (SmartContract1.dll is the name of the dll generated by the previous step). +   Buksan ang command prompt, pumunta sa Debug na direktoryo, itala ang sumusunod na highlight (SmartContract1.dll ang pangalan nga dll na nabuo sa pamamagitan ng nakaraang hakbang). ``` > C: \ ... \ bin \ Debug> `./neon SmartContract1.dll` > @@ -135,4 +136,4 @@ After this compiles successfully, you will see the generated `SmartContract1.avm > C: \ ... \ bin \ Debug> ``` -Now that you have completed the configuration of the smart contract development environment, please refer to the [Art Experiment Guide for Tomids](tutorial.md) +Ngayon na nakompleto mo na ang pagkonpigyura ng development environment para sa smart na kontrata, pakipunta sa [Art Experiment na Gabay para sa Tomids](tutorial.md) diff --git a/tl-tl/sc/getting-started-csharp.md b/tl-tl/sc/getting-started-csharp.md index 84d232320..bc1efabd5 100644 --- a/tl-tl/sc/getting-started-csharp.md +++ b/tl-tl/sc/getting-started-csharp.md @@ -2,106 +2,106 @@ typora-root-url: ..\.. --- -### How to use C# to write a NEO smart contract +### Paano gamitin ang C# para magsulat ng isang NEO smart na kontrata -We currently recommend C# for developing smart contracts (though we support or plan to support Java, Kotlin, Go, C/C++, Python, JavaScript and other programming languages). +Kami ay kasalukuyang nagrerekomenda na gumamit ng C# para mag-program ng mga smart na kontrata (bagamat kami ay sumusuporta o nagplaplano na susuporta sa Java, Kotlin, Go, C/C + +, Python, Javascript at iba pang mga programming na lengguwahe) -This section contains a short tutorial that guides you in configuring the C# development environment for NEO smart contracts. It also gives you an idea of ​​how to create a smart contract project and how to compile it. +Ang seksyon na ito ay naglalaman ng maikling tutoryal na maggagabay sa iyo para ikonpigyura ang C# development environment para sa mga NEO smart na kontrata at magbibigay sa iyo ng ideya kong papaano gumawa ng isang proyekto ng smart na kontrata at paano ito ikokompayl. -   > [!Note] -   > At present, all the projects have been upgraded to the Visual Studio 2017 version. If you want to use Visual Studio 2015 to create intelligent contracts, refer to [how to use C # to write NEOs intelligent contract for VS2015](getting-started-2015.md). +   > [!Tandaan] +   > Sa kasalukuyan, ang lahat ng mga proyekto ay nai-upgrade na sa Visual Studio 2017 na bersyon. Kung gusto mong gamitin ang Visual Studio 2015 para gumawa ng mga matalinong kontrata, tumanaw sa [Paano gamitin ang C # para magsulat ng NEO smart na kontrata para sa VS2015](getting-started-2015.md). -## Development Tools +## Mga Development Tool ### 1. Visual Studio 2017 -If you have already installed Visual Studio 2017 on your computer and checked for .NET Cross-Platform Development at the time of installation, you can skip this section. +Kung mayroon ka nang naka-install na Visual Studio 2017 sa iyong kompyuter at na-check ang .NET Cross-Platform Development noong nag-iinstall pa, pwede mong laktawan ang seksyon na ito. -Download and install: +Pag-download at pag-install: -[Visual Studio download address](https://www.visualstudio.com/products/visual-studio-community-vs) +[Ang address para ma-download ang Visual Studio](https://www.visualstudio.com/products/visual-studio-community-vs) -The installation process is very simple, just follow the operation prompts step-by-step. It should be noted that you need to check the installation of `.NET Core cross-platform development`, otherwise you will not be able to open neo-vm project in step #3. The installation takes about ten minutes or up to an hour. +Ang proseso nag pag-install ay napakasimple, kailangan mo lang sundin ang bawat hakbang ng mga operation prompt. Kailangan mong tandaan na kinakailangan mong itsek ang instalasyon ng `.NET Core cross-platform development`, kung hindi hindi ka makakabukas ng neo-vm na proyekto sa ikatlong hakbang. Ang instalasyon ay magtagagal ng mga sampung minuto o hanggang sa isang oras. -![install net core cross-platform development toolset](/assets/install_core_cross_platform_development_toolset.png) +![i-install net core cross-platform development toolset](/assets/install_core_cross_platform_development_toolset.png) ### 2. NeoContractPlugin -Installation method: +Pamamaraan ng pag-install: -Open Visual Studio 2017, open Tools, click on Extensions and Updates, click on the Online tab on the left side of the window, search NEO in the search box on the top right corner of the window, download the NeoContractPlugin (this step requires internet access). +Buksan ang Visual Studio 2017, buksan ang Tools, i-click ang Extensions and Updates, i-click ang Online na tab na nasa kaliwang bahagi ng window, hanapin ang NEO sa search na kahon na nasa itaas na kanang sulok ng window, i-download ang NeoContractPlugin (ang hakbang na ito ay nangangailangan ng akses sa internet). -![download and install NEO smart contract plugin](/assets/download_and_install_smart_contract_plugin.png) +![i-download at i-install ang NEO smart contract plugin](/assets/download_and_install_smart_contract_plugin.png) ### 3. neo-compiler -Installation and configuration steps: +Mga hakbang sa pag-install at pag-konpigyura: -Download the [neo-compiler](https://github.com/neo-project/neo-compiler) project on Github, open the solution with Visual Studio 2017, and publish the neon project +I-download ang [neo-compiler](https://github.com/neo-project/neo-compiler) na proyekto sa Github, buksan ang solusyon gamit ang Visual Studio 2017, at i-publish ang neon project. -![publish NEO compiler msil project](/assets/publish_neo_compiler_msil_project.png) +![i-publish ang NEO compiler msil na proyekto](/assets/publish_neo_compiler_msil_project.png) -![publish and profile settings](/assets/publish_and_profile_settings.png) +![publish at profile na mga setting](/assets/publish_and_profile_settings.png) -> [!Note] +> [!Tandaan] > -> During the process of publishing neon, if you are prompted neon.dll cannot be copied, you can manually copy the file with the same name from the upper-layer folder. +> Sa panahon na pina-publish ang neon, kung ikaw ay prinompt na ang neon.dll ay hindi pwede makopya, pwede mong i-manu-manong kopyahin ang file na mayroong kaparehong pangalan ng upper-layer na folder. -After the release is successful, the neon.exe file is generated in `bin\Release\PublishOutput`. +Pagkatapos ng matagumpay na pag-release, ang neon.exe na file ay mabubuo sa `bin\Release\PublishOutput`. -We now need to add this directory to our execution path. The PATH is the system variable that your operating system uses to locate needed executables from the command line or Terminal window. +Kinakailangan na natin ngayong idagdag ito sa direktoryo ng iyong execution path. Ang PATH ay ang variable ng sistema na ginagmit ng iyong operating system para matagpuan ang mga kinakailangang mga executable galing sa command line o Terminal window. **Windows 10 and Windows 8:** - In Search, search for and then select: System (Control Panel) - Click the Advanced system settings link. - Click Environment Variables. In the section System Variables, find the PATH environment variable and select it. Click Edit. If the PATH environment variable does not exist, click New. - In the Edit System Variable (or New System Variable) window, specify the value of the PATH environment variable. Click OK. Close all remaining windows by clicking OK. + Sa Search, hanapin ang at pagkatapos pumili: System (Control Panel) + I-click ang Advanced system settings na link. + I-click ang Environment Variables. Sa seksyon na System Variables, hanapin ang PATH environment variable at piliin ito. I-click ang Edit. Kung walang PATH environment variable, i-click ang New. + Sa Edit System Variable (o New System Variable) na window, itukoy ang halaga ng PATH environment na variable. I-click ang OK. Isara ang lahat ng mga window sa pamamagitan ng pag-click ng OK. **Windows 7:** - From the desktop, right click the Computer icon. - Choose Properties from the context menu. - Click the Advanced system settings link. - Click Environment Variables. In the section System Variables, find the PATH environment variable and select it. Click Edit. If the PATH environment variable does not exist, click New. - In the Edit System Variable (or New System Variable) window, specify the value of the PATH environment variable. Click OK. Close all remaining windows by clicking OK. + Galing sa desktop, i-right click ang Computer icon. + Piliin ang Properties na nasa sa context menu. + I-click ang Advanced system settings na link. + I-click ang Environment Variables. Sa seksyon na System Variables, hanapin ang Path environment variable at piliin ito. I-click ang Edit. Kung wala ang PATH environment variable, i-click ang New. + Sa Edit System Variable (o sa New System Variable) na window, itukoy ang halaga ng PATH environment variable. I-click ang OK. Isara ang lahat ng mga natitirang window sa pamamagitan ng pag-click ng OK. -![edit environmental variables](/assets/edit_environmental_variables.png) +![i-edit ang mga environmental variable](/assets/edit_environmental_variables.png) -Now run Command or PowerShell, and enter neon.exe. If there is no error and the output shows the version number (as shown), then the environment variable configuration is successful. +Ngayon, patakbuhin ang Command o PowerShell, at itala ang neon.exe. Kung wala error na nangyari at ang numero ng bersyon ang pinapakita, ang environment variable ay matagumpay na nakonpigyura. -![powershell enviornment variabled updated correctly](/assets/powershell_enviornment_variabled_updated_correctly.png) +![powershell enviornment variable ay naiupdate ng tama](/assets/powershell_enviornment_variabled_updated_correctly.png) -NOTE. Windows 7 SP1 users might encounter an error "Unhandled Exception: System.DllNotFoundException: Unable to load DLL 'api-ms-win-core-console-l2-1-0.dll': The specified module could not be found". The required 'api-ms-win-core-console-l2-1-0.dll' file is only found in Windows 8 or later versions. This error can be resolved by obtaining a copy of 'api-ms-win-core-console-l2-1-0.dll' and putting it in the directory C:\Windows\System32. This dll can be found in other folders on your computer(search it, then copy it to \System32), or alternatively found online. +TANDAAN. Ang mga Windows7 SP1 na mga user ay maaring makatagpo ng error na "Unhandled Exception: System.DllNotFoundException: Unable to load DLL 'api-ms-win-core-console-l2-1-0.dll': The specified module could not be found". Ang required na 'api-ms-win-core-console-l2-1-0.dll' file ay matatagpuan lamang sa Windows 8 o mas higit pa na mga bersyon. Ang error na ito ay pwedeng maresolba sa pamamagitan ng pagkuha ng kopya ng 'api-ms-win-core-console-l2-1-0.dll' at pag lagay nito sa direktoryo na C:\Windows\System32. Ang dll ay maaring makita sa ibang mga folder sa iyong kompyuter (hanapin ito, at ikopya sa \System32), o hanapin ito online. -## Create project +## Paggawa ng proyekto -After the above installation configuration is successful, you can create a NeoContract project in Visual Studio 2017. +Pagkatapos ng matagumpay na pagkonpigyura ng instalasyon sa itaas, pwede ka nang gumawa ng isang NeoContract na proyekto sa Visual Studio 2017. -![new smart contract project](/assets/new_smart_contract_project.png) +![bagong smart contract na proyekto](/assets/new_smart_contract_project.png) -Once you create a project, it will automatically generate a C# file. The default class which inherits the SmartContract is shown in the following: +Pagkatapos mong gumawa ng isang proyekto, ito ay awtomatikong gagawa ng isang C# na file. Ang default na class ay mag-iinherita ng SmartContract ay ipapakita sa sumusunod: ![smart contract function code](/assets/smart_contract_function_code.png) -## Compile the Project +## Ikompayl ang Proyekto -Everything is now ready to add the entry method that defines the smart contract: +Ang lahat ay handa na para magdagdag ng entry na method na magdedefine sa smart na kontrata: ```c# public class Contract1 : SmartContract { -    public static void Main() // Note that the main method is capitalized +    public static void Main() // Tandaan na ang Main na method ay kina-capitalize     {              } } ``` -After you compile it successfully you will see `SmartContract1.avm` in the `bin/Debug` directory, which is the file that is generated as the NEO smart contract. +Pagkatapos mong ikompayl ito, makikita mo ang `SmartContract1.avm` sa loob ng `bin/Debug` na direktoryo, kung saan ang file na ito ang nabubuo bilang Neo smart na kontrata. -![compile smart contract](/assets/compile_smart_contract.png) +![ikompayl ang smart na kontrata](/assets/compile_smart_contract.png) -Now that you have completed the configuration of the NEO smart contract development environment, please refer to the [NEO smart contract tutorial](tutorial.md) +Ngayon na natapos mo nang i-konpigyura ang NEO smart contract development environment, pakipunta na sa [tutoryal para sa NEO smart na kontrata](tutorial.md) diff --git a/tl-tl/sc/white-paper.md b/tl-tl/sc/white-paper.md index b5a11dfef..20c99d4a4 100644 --- a/tl-tl/sc/white-paper.md +++ b/tl-tl/sc/white-paper.md @@ -1,67 +1,68 @@ -# NeoContract White Paper +# NeoContract na White Paper -## 1. Preface +## 1. Paunang Salita -Smart contracts refer to any computer program which can automatically execute the terms of its preprogrammed contract. The idea of smart contract was first proposed by the cryptographer Nick Szabo in 1994, making it as old as the Internet itself. Due to the lack of a reliable execution environment, smart contracts have not been widely used. +Ang matalinong na mga kontrata ay sumasangguni sa anumang kompyuter na program na maaaring awtomatikong magsagawa ng mga termino sa kontrata na naka-preprogram nito. Ang ideya ng matalinong kontrata ay unang iminungkahi ng kriptograper na si Nick Szabo noong 1994, ginagawa itong kasing luma sa Internet. Dahil sa kakulangan ng isang maaasahang environment ng pagpapatupad, ang matalinong mga kontrata ay hindi malawakang nagamit. -In 2008, a man under the name of Satoshi Nakamoto released Bitcoin, and outlined the foundational concepts of a blockchain. Within the Bitcoin blockchain, Nakamoto uses a set of scripting languages to help users gain more flexibility in controlling their personal accounts and the transfer process, which eventually became the embryonic form of a chain-based, smart contract system. +Sa 2008, isang tao na nasa ilalim ng pangalan na Satoshi Nakamoto ay naglabas ng Bitcoin, at bumalangkas sa pampundasyon na mga konsepto ng isang blockchain. Sa loob ng Bitcoin na blockchain, si Nakamoto ay gumagamit ng isang hanay ng mga scripting language upang tulungan ang mga gumagamit na makamit ang mas kakayahang umangkop sa pagkontrol ng kanilang personal na mga account at mag padala ng proseso, na sa kalaunan ay naging embryonic na porma ng isang nakabase sa chain, ang matalinong kontrata na sistema. -In 2014, a teenager called Vitalik Buterin released Ethereum, which provides a chain-based, Turing-complete, smart contract system that can be used to create a variety of decentralized blockchain applications. +Sa 2014, isang binatilyo na nakapangalan Vitalik Buterin ay naglabas ng Ethereum, na nagbibigay ng isang nakabase sa chain, Turing-complete, ang mataling kontrata na sistema na maaaring gamiting upang lumikha ng isang iba't ibang mga aplikasyon ng decentralized na blockchain. -NEO blockchain is a digital asset and application platform, which provides a new smart contract system, NeoContract. At the core of the Neo platform, the network provides multiples functions such as digital asset capabilities, NeoAsset, and digital identity, NeoID, allowing users to easily engage in digital businesses, and are no longer limited to just the issuance of native tokens on the blockchain. +Ang NEO na blockchain ay isang digital asset at aplikasyon na plataporma, na nagbibigay ng isang bagong matalinong kontrata na sistema, ang NeoContract. Sa kaloob-looban ng Neo na plataporma, ang network ay nagbibigay ng maramihang mga punsyon katulad ng mga kakayahan ng digital asset, ang NeoAsset, at digital na pagkakakilanlan, ang NeoID, na nagpapahintulot sa mga gumagamit na madaling makisali sa digital na mga negosyo, at hindi na limitado lamang sa pagpapalabas likas na mga token sa blockchain. -This article will introduce features of NeoContract and explore non-technical details. Please refer to the technical documentation for technical details: [docs.neo.org](http://docs.neo.org). +Ang artikulong ito ay magpapakilala sa mga tampok ng NeoContract at magsisiyasat sa hindi teknikal na mga detalye. Mangyaring sumangguni sa teknikal na dokumentasyon para sa teknikal na mga detalye: [docs.neo.org](http://docs.neo.org). -## 2. Features +## 2. Mga Tampok -### 2.1 Certainty +### 2.1 Katiyakan -If a program is running on different computers, or at different times on the same computer, the behavior of the program is deterministic if the same input is guaranteed to produce the same output, and vice versa. +Kung ang isang program ay tumatakbo sa magkaibang mga kompyuter, o sa magkaibang panahon sa parehong kompyuter, ang pagkilos ng program ay matutukoy kung ang parehong input ay garantisadong makakagawa ng parehong output, at kabaligtaran. -Blockchain is a multi-party storage, and computational method, where the data within this distributed system is the result of reliable calculations, that cannot be tampered with. Smart contracts operate within the multi-node, distributed blockchain network. If a smart contract is non-deterministic, the results of different nodes may be inconsistent. As a result, consensus between the nodes cannot be reached, and the network becomes stagnant. Therefore, in the design of a smart contract system, there is a need to rule out any factors which may lead to non-deterministic behavior. +Ang Blockchain ay isang multi-party na imbakan, at kalkulasyon na pamamaraan, kung saan ang datos sa loob nitong ipinamamahaging sistema ay ang resulta ng maasahang mga kalkulasyon, at hindi maaaring mabago. Ang matalinong mga kontrata ay gumagana sa loob ng multi-node, ang ipinamamahaging blockchain na network. Kung ang isang matalinong kontrata ay non-deterministic, ang mga resulta ng magkaibang mga node ay maaaring hindi pantay-pantay. Bilang resulta, ang pagkasunduan sa pagitan ng mga node ay hindi maaaring maabot, at ang network ay magiging hindi umuunlad. Samakatuwid, sa disenyo ng isang matalinong kontrata na sistema, mayroong isang pangangailangan na mag-alis ng anumang mga kadahilanan na maaaring magsanhi ng non-deterministic na pagkilos. -#### 2.1.1 Time +#### 2.1.1 Oras -Obtaining system-time is a very common system function, that may be heavily applied in certain time-sensitive contract procedures. However, obtaining system-time is a non-deterministic system function, and it is difficult to obtain a unified, precise time in a distributed system, as the results of different nodes will be inconsistent. NeoContract provides a block-based system-call that treats the entire blockchain, as a timestamp server, and obtains the timestamp whenever a new block is generated. On average, NEO network generates a new block every 15 seconds, so the contract runs at approximately the same time as the latest block-time, plus-minus 15 seconds. +Ang pagkakaroon ng system-time ay isang napakakaraniwang punsyon ng sistema, na maaaring mabigat na nailalapat sa tiyak na mga pamamaraan ng time-sensitive na kontrata. Gayunpaman, ang pagkakaroon ng system-time ay isang non-deterministic na punsyon ng sistema, at mahirap kumuha ng isang pinag-isa, tumpak na oras sa isang ipinamamahaging na sistema, batay sa mga resulta ng magkaibang mga node ay hindi magkakapantay. Ang NeoContract ay nagbibigay ng isang block-based na system-call na tinatrato ang buong blockchain, bilang isang timestamp na server, at kumukuha ng timestamp kailanman nabuo ang isang bagong bloke. Karaniwan, ang NEO na network ay lumilikha ng isang bagong bloke sa bawat 15 na mga segundo, kaya ang kontrata ay tumatakbo sa humigit-kumulang na parehong oras sa pinakabagong block-time, dagdag bawas ng 15 na mga segundo. -#### 2.1.2 Randomness +#### 2.1.2 Pagkasapalaran -Many smart contract programs, such as gambling contracts and small games, use random number functions. However, random number functions are a typical non-deterministic function, and each system-call will obtain different results. In a distributed system, there are many ways to solve this problem: Firstly, the same random seed can be used for all nodes, so that the return sequence of the entire random function is deterministic, but this method exposes the entire random result in advance, greatly reducing the practical value of the random number. Another possible solution, is to let all nodes communicate in a collaborative way to generate random numbers. This can be achieved by using cryptographic techniques to produce a fair random number, but the disadvantage lies in the very poor performance, and need for additional communication overhead. A centralized random number provider can be used to generate random numbers which guarantees consistency and performance, but the drawback of this approach is obvious; Users will have to unconditionally trust the centralized number provider. +Maraming matalinong kontrata na mga program, katulad ng pagsusugal na mga kontrata at maliliit na mga laro, ay gumagamit ng sapalarang numero na mga function. Gayunpaman, ang sapalarang numero na mga punsyon ay isang tipikal na hindi natutukoy na function, at bawat system-call ay kumukuha ng magkaibang mga resulta. Sa isang ipinamamahaging sistema, may maraming mga paraan upang malutas ang problemang ito: Una, ang parehong sapalaran na seed ay maaaring gamitin para sa lahat ng mga node, upang ang return na pagkakasunod-sunod ng buong sapalaran na punsyon ay matutukoy, ngunit ang paraang ito ay naglalantad sa buong sapalaran na resulta nang maaga, labis na nagbabawas ng praktikal na halaga ng sapalarang numero. Isa pang posibleng solusyon, ay hayaan ang lahat ng node na makipag-usap sa isang kolaboratibong paraan upang bumuo ng sapalarang mga numero. Maaari itong makamit sa paggamit ng cryptographic na mga pamamaraan upang lumikha ng isang patas na sapalarang numero, ngunit ang kawalan ay nakapatong sa napakababaw na pagganap, at sa pangangailangan ng karagdagang pananaw sa komunikasyon. Ang isang sentralisadong tagapagtustos ng sapalarang numero ay maaaring gamitin upang bumuo ng sapalarang mga numero na nangangako ng walang pagbabago at pagganap, ngunit ang sagabal sa ganitong paraan ay halata; Ang mga gumagamit ay kailangang walang kondisyong magtiwala sa sentralisadong tagapagtustos ng numero. -There are two ways to generate a random number in NEO: +Mayroong dalawang paraan upang makabuo ng isang sapalarang numero sa NEO: -1. When each block is generated, the consensus node will reach a consensus on a random number, and fill it into the Nonce field of the new block. The contract program can easily obtain the random number of any block, by referencing the Nonce field +1. Kapag ang bawat bloke ay nabuo, ang consensus na node ay aabot sa isang pagkakasundo sa isang sapalarang numero, at ipupuno ito sa Nonce na patlang sa bagong bloke. Ang kontrata na program ay madaling makakuha ng sapalarang numero sa anumang bloke, sa pamamagitan ng pagreperensya ng Nonce na patlang -2. The contract program can use the hash value of the block as a random number generator, because the block hash value has certain inherent randomness. This method can be used to obtain a weak random number +2. Ang kontrata na program ay maaaring gumamit ng hash na halaga sa bloke bilang isang generator ng sapalarang numero, dahil ang block hash na halaga ay may tiyak na likas na pagkasapalaran. Ang paraang ito ay maaaring gamitin upang makakuha ng isang mahinang sapalarang numero #### 2.1.3 Data Source -If a program obtains data at run-time, it might become a non-deterministic program if the data source provides non-deterministic data. For example, using different search engines to obtain the top 10 search results for a particular keyword, may yield different results, in various sort orders, if different IP addresses are used. +Kung ang isang program ay nakakuha ng datos sa run-time, ito ay maaaring maging isang non-deterministic na program kung ang data source ay nagbibigay ng non-deterministic na datos. Halimbawa, ang paggamit ng magkaibang mga search engine upang makakuha ng nangungunang 10 na mga resulta sa paghanap para sa isang partikular na keywork, ay maaaring mag-ani ng magkaibang mga resulta, sa iba't ibang paraan ng pagkakaayos, kung magkaibang mga IP address ang ginamit. -For smart contracts, NEO provides two types of deterministic data sources: +Para sa matalinong mga kontrata, ang NEO ay nagbibigay ng dalawang mga uri ng natutukoy na mga data source: -1. **Blockchain Ledger** +1. **Blockchain na Ledger** + + Ang kontrata na pamamaraan ay maaaring mag-access sa lahat ng datos sa buong chain gamit ang interoperable na mga serbisyo, kabilang ang kumpletong mga bloke at mga transaksyon, at para sa bawat patlang nila. Ang datos sa mga bloke ay natutukoy at hindi nagbabago, kaya maaari silang ligtas na ma-access gamit ang matalinong mga kontrata. - The contract procedure can access all data on the entire chain through interoperable services, including complete blocks and transactions, and each of their fields. The data on the blocks are deterministic and consistent, so they can be securely accessed by smart contracts. +2. **Ispasyo Na Imbakan ng Kontrata** -2. **Contract Storage Space** + Bawat kontratang nai-deploy sa NEO na network, ay mayroong isang pribadong ispasiyo na imbakan na maaari lamang ma-access gamit ang kontrata. Ang mekanismo sa pagkakasundo ng NEO ay sumisigurado sa hindi pagbabago ng estado ng imbakan, sa bawat node sa network. - Each contract deployed on the NEO network, has a private storage area that can only be accessed by the contract itself. NEO consensus mechanism ensures consistency of the storage status, of each node in the network. +Para sa mga sitwasyon kung saan ang pag-access sa hindi blockchain na datos ay kinakailangan, ang NEO ay hindi nagbibigay ng isang direktang paraan upang makipag-ugnayan sa mga datos na ito. +Ang hindi blockchain na datos ay kailangang ilipat sa NEO na blockchain gamit ang mga transaksyon, at pagkatapos ay isinalin sa alinmang nabanggit na mga data source, upang ma-access gamit ang matalinong mga kontrata. -For situations where access to non-blockchain data is required, NEO does not provide a direct way to interact with these data. Non-blockchain data will have to be transferred to the NEO blockchain using transactions, and subsequently translated into the either of the aforementioned data sources, in order to become accessible by the smart contracts. +#### 2.1.4 Kontrata na Pagtawag -#### 2.1.4 Contract Call +Ang matalinong mga kontrata sa NeoContract ay maaaring tumawag sa isa't isa, ngunit hindi dapat tawaging naka-recursive. Ang recursion ay maaaring makamit sa loob ng kontrata, ngunit hindi kayang tumawid sa mga hangganan ng kasalukuyang kontrata. Sa karagdagan, ang relasyon ng pagtawag sa pagitan ng mga kontrata ay dapat naka-static: Ang target ay hindi dapat tukuyin sa runtime. Ito ay nagpapahintulot ng pagkilos ng program upang maging buong determinado bago ang pagpapatupad, at ang relasyon ng pagtawag nito upang maging buong matukoy bago ito maaaring patakbuhin. Batay nito, ang maramihang mga kontrata ay maaaring dynamic na ma-partition upang makamit ang nakahilerang pagpapatupad. -Smart contracts in NeoContract can call each other, but not be recursively called. Recursion can be achieved within the contract, but it cannot cross the boundaries of the current contract. In addition, the call relationship between contracts must be static: The target cannot be specified at runtime. This allows the behavior of the program to be fully determined before execution, and its call relationship to be fully defined before it can run. Based on this, multiple contracts can be dynamically partitioned to achieve parallel execution. +### 2.2 Mataas na Pagganap -### 2.2 High performance +Ang environment ng pagpapatupad ng isang matalinong kontrata ay naglalaro ng isang mahalagang papel sa pagganap nito. Kapag ating pinag-aralan ang pagganap sa anumang environment ng pagpapatupad, may dalawang pangunahing tagapagpahiwatig na kritikal: -The execution environment of a smart contract plays an integral role in its performance. When we analyze the performance of any execution environment, there are main two indicators which are critical: +1. Bilis ng pagpapatupad ng tagubilin +2. Bilis ng startup ng environment na pagpapatupad -1. Execution speed of the instruction -2. Startup speed of the execution environment itself - -For smart contracts, the execution environment is often more important than the speed of execution of the instruction. Smart contracts are more involved in IO operation of the logic, to determine the instructions, where the implementation of these instructions can easily be optimized. Every time the smart contract is called, it must start up a new virtual machine / container. Therefore, the execution speed of the environment itself (starting a virtual machine / container) has greater impact on the performance of the smart contract system. +Para sa matalinong mga kontrata, ang environment ng pagpapatupad ay kadalasang mas importante kaysa sa bilis ng pagpapatupad ng tagubilin. Ang matalinong mga kontrata ay mas kasangkot sa IO na operasyon ng lohika, upang matukoy ang mga tagubilin, kung saan ang implementasyon ng mga tagubiling ito ay madaling mapaunlad. Sa bawat pagkakataon na tinawag nag matalinong kontrata, dapat itong magsimula ng isang panibagong birtwal na makina / container. Samakatuwid, ang bilis ng pagpapatupad sa environment (pagsisimula ng isang birtwal na makina / container) ay may mas malaking epekto sa pagganap ng matalinong kontrata na sistema. NEO uses a lightweight NeoVM (NEO Virtual Machine) as its smart contract execution environment, which has a very fast start up and takes up very little resources, perfect for short programs like smart contracts. Using the compilation and caching of hotspot smart contracts with JIT (real-time compiler) can significantly improve the efficiency of virtual machines.