diff --git a/doc/doc_EN/export_validator_reward_EN.md b/doc/doc_EN/export_validator_reward_EN.md index 1d095a6..b97643a 100644 --- a/doc/doc_EN/export_validator_reward_EN.md +++ b/doc/doc_EN/export_validator_reward_EN.md @@ -1,6 +1,6 @@ ## export-validator-reward Script -* This script outputs a record of money generated by validator rewards for a specific address. +* This script outputs a reward generated by validator rewards for a specific address. * You need to specify the Validator Owner as the address. * More about Validator Owner: [Oasys Games Documentation](https://docs.oasys.games/docs/architecture/hub-layer/validator-account#validator-owner) diff --git a/doc/doc_JP/export_validator_reward_JP.md b/doc/doc_JP/export_validator_reward_JP.md index 929bd6e..4bbd113 100644 --- a/doc/doc_JP/export_validator_reward_JP.md +++ b/doc/doc_JP/export_validator_reward_JP.md @@ -1,6 +1,6 @@ ## export-validator-rewardスクリプト -* 特定のaddressのstaker rewardによって生じたお金の記録を出力するスクリプトです。 +* 特定のaddressのstaker rewardの記録を出力するスクリプトです。 * アドレスとして、Validator Ownerを指定する必要があります * Validator Ownerについて https://docs.oasys.games/docs/architecture/hub-layer/validator-account#validator-owner diff --git a/doc/user_guide.md b/doc/user_guide.md deleted file mode 100755 index 6288194..0000000 --- a/doc/user_guide.md +++ /dev/null @@ -1,300 +0,0 @@ -# user guide - - -## how to Download - -- Please download the latest release from [releases](https://github.com/oasysgames/oasfi/releases). -- It is compatible with macOS, Windows, and Linux, so please choose the one that matches your operating system. -- For macOS users, you may need to allow the application to run from your Privacy settings. - -## correct-csv script - -This script has been created to correct data inaccuracies in token transfer data obtained from Blockscout v5. It is primarily used for accounting purposes. - -To use the program, follow these steps: - -1. Download the program. -2. Place the downloaded program, the token transfer data obtained from Blockscout v5 (input.csv), and the output file for corrected data (output.csv) in the same directory. -3. Run the following command within that directory: - -Please note that this script should be executed in the directory where the program, input.csv, and output.csv files are located. - -#### MacOS: - -```bash -./oasfi-macos correct-csv -i=input.csv -o=output.csv -c=chain_name - -# example -# ./oasfi-macos correct-csv -i=blockscoutV5.csv -o=correctTransferData.csv -c=hub_mainnet -``` - -#### Windows: - -```bash -./oasfi-win.exe correct-csv -i=input.csv -o=output.csv -c=chain_name - -# example -# ./oasfi-win.exe correct-csv -i=blockscoutV5.csv -o=correctTransferData.csv -c=hub_mainnet -``` - -#### Linux: - -```bash -./oasfi-linux correct-csv -i=input.csv -o=output.csv -c=chain_name - -# example -# ./oasfi-linux correct-csv -i=blockscoutV5.csv -o=correctTransferData.csv -c=hub_mainnet -``` - -## export-validator-reward script - -* This is a script designed to generate records of money generated by validator rewards for a specific address. -* You need to specify the Validator Owner key as the address. - * about Validator Owner key https://docs.oasys.games/docs/architecture/hub-layer/validator-account#validator-owner - -* To retrieve the price of the OAS token, you need to obtain an API key from CoinGecko and execute the following command. (Please note that you should contract with CoinGecko and obtain the API key yourself.) - -```bash -export COINGECKO_API_KEY=xx -``` - -### Basic Command - -#### MacOS: - -```bash -./oasfi-macos export-validator-reward addresses -c=chain_name - -# example -# ./oasfi-macos export-validator-reward 0x272d6bd040c2b8454f4f6f43115758fbe318ee2c,0x4e5e774d3837bd9302b83cad94a112575411f07b -c=hub_mainnet -``` - -#### windows: - -```bash -./oasfi-win.exe export-validator-reward addresses -c=chain_name - -# example -# ./oasfi-win.exe export-validator-reward 0x272d6bd040c2b8454f4f6f43115758fbe318ee2c,0x4e5e774d3837bd9302b83cad94a112575411f07b -c=hub_mainnet -``` - -#### linux: - -```bash -./oasfi-linux export-validator-reward addresses -c=chain_name - -# example -# ./oasfi-linux export-validator-reward 0x272d6bd040c2b8454f4f6f43115758fbe318ee2c,0x4e5e774d3837bd9302b83cad94a112575411f07b -c=hub_mainnet -``` - -### optional command: - -#### from_date, to_date - -* Specifying --from_date and --to_date can be helpful in retrieving data for a specific time period. -* The default is the local timezone, and if you want to change the timezone, you can use --time_zone=timezone. - -```bash -./oasfi-linux export-validator-reward 0x272d6bd040c2b8454f4f6f43115758fbe318ee2c,0x4e5e774d3837bd9302b83cad94a112575411f07b -c=hub_mainnet --from_date=2023-08-16T10:00:00 --to_date=2023-10-16T10:00:00 -``` - -#### --price - -* --price specifies the currency to export. Otherwise, the default flags for --price are [jpy, usd, krw, eur, sgd]. -* You can use currencies that are compatible with CoinGecko. - -```bash - ./oasfi-linux export-validator-reward 0x272d6bd040c2b8454f4f6f43115758fbe318ee2c,0x4e5e774d3837bd9302b83cad94a112575411f07b -c=hub_mainnet --price=jpy -``` - -#### --from_epoch, --to_epoch - -* Specify a specific epoch range and export data within that range to a CSV file. - -```bash - ./oasfi-linux export-validator-reward 0x272d6bd040c2b8454f4f6f43115758fbe318ee2c,0x4e5e774d3837bd9302b83cad94a112575411f07b -c=hub_mainnet --from_epoch=246 --to_epoch=247 -``` - -#### --price_time - -* --price_time provides the time (in UTC) to fetch the price. If the --price_time flag is not set, the default is 00:00:00 UTC. - -```bash - ./oasfi-linux export-validator-reward 0x272d6bd040c2b8454f4f6f43115758fbe318ee2c,0x4e5e774d3837bd9302b83cad94a112575411f07b --price_time=10:00:00 -``` - -#### --export_csv_online - -* When you specify --export_csv_online=true, it will be exported online. If you do not set the --export_csv_online flag, it will be exported locally by default. -* However, even if you specify --export_csv_online=true, it won't be exported online unless the SPREADSHEET_ID and GOOGLE_APPLICATION_CREDENTIALS are set as environment variables. -* GOOGLE_APPLICATION_CREDENTIALS should be obtained individually from the Google Cloud Platform. - -Please execute - -``` -export SPREADSHEET_ID=xx -export GOOGLE_APPLICATION_CREDENTIALS=xx -``` - -```bash - ./oasfi-linux export-validator-reward 0x272d6bd040c2b8454f4f6f43115758fbe318ee2c,0x4e5e774d3837bd9302b83cad94a112575411f07b -c=hub_mainnet --export_csv_online=true -``` - -#### --output - -* Specify the output file destination. -* The default is commission-reward.csv (validator reward is commission-reward) - -```bash - ./oasfi-linux export-validator-reward 0x272d6bd040c2b8454f4f6f43115758fbe318ee2c,0x4e5e774d3837bd9302b83cad94a112575411f07b -c=hub_mainnet -o=output.csv -``` - -### Reference - -#### sheet API -* Used to obtain the environment variable SPREADSHEET_ID. -* https://console.cloud.google.com/apis/library/browse?hl=ja&project=nftwars-357707&q=sheet - -#### service account -* Used to obtain the environment variable GOOGLE_APPLICATION_CREDENTIALS. -* https://firebase.google.com/docs/app-distribution/authenticate-service-account?hl=ja&platform=ios -* https://docs.biztex.co.jp/cobit-docs/google_spreadsheet_settings/for_serviceaccount.html - - - - - - - - - - - - - -## export-staker-reward script - -* This is a script designed to generate records of money generated by staker rewards for a specific address. -* You need to specify the Staker Owner key as the address. -* To retrieve the price of the OAS token, you need to obtain an API key from CoinGecko and execute the following command. (Please note that you should contract with CoinGecko and obtain the API key yourself.) - -* The APY (Annual Percentage Yield) is 10%, with a breakdown of 90% for staker rewards and 10% for validator rewards. - - -```bash -export COINGECKO_API_KEY=xx -``` - -### Basic Command - -#### MacOS: - -```bash -./oasfi-macos export-staker-reward staker_addresses -c=chain_name - -# example -# ./oasfi-macos export-staker-reward staker_addresses -c=hub_mainnet -``` - -#### windows: - -```bash -./oasfi-win.exe export-staker-reward staker_addresses -c=chain_name - -# example -# ./oasfi-win.exe export-staker-reward staker_addresses -c=hub_mainnet -``` - -#### linux: - -```bash -./oasfi-linux export-staker-reward staker_addresses -c=chain_name - -# example -# ./oasfi-linux export-staker-reward staker_addresses -c=hub_mainnet -``` - -### optional command: - -#### from_date, to_date - -* Specifying --from_date and --to_date can be helpful in retrieving data for a specific time period. -* The default is the local timezone, and if you want to change the timezone, you can use --time_zone=timezone. - -```bash -./oasfi-linux export-staker-reward staker_addresses -c=hub_mainnet --from_date=2023-08-16T10:00:00 --to_date=2023-10-16T10:00:00 -``` - -#### --price - -* --price specifies the currency to export. Otherwise, the default flags for --price are [jpy, usd, krw, eur, sgd]. -* You can use currencies that are compatible with CoinGecko. - -```bash - ./oasfi-linux export-staker-reward staker_addresses -c=hub_mainnet --price=jpy -``` - -#### --from_epoch, --to_epoch - -* Specify a specific epoch range and export data within that range to a CSV file. - -```bash - ./oasfi-linux export-staker-reward staker_addresses -c=hub_mainnet --from_epoch=246 --to_epoch=247 -``` - -#### --price_time - -* --price_time provides the time (in UTC) to fetch the price. If the --price_time flag is not set, the default is 00:00:00 UTC. - -```bash - ./oasfi-linux export-staker-reward staker_addresses --price_time=10:00:00 -``` - -#### --export_csv_online - -* When you specify --export_csv_online=true, it will be exported online. If you do not set the --export_csv_online flag, it will be exported locally by default. -* However, even if you specify --export_csv_online=true, it won't be exported online unless the SPREADSHEET_ID and GOOGLE_APPLICATION_CREDENTIALS are set as environment variables. -* GOOGLE_APPLICATION_CREDENTIALS should be obtained individually from the Google Cloud Platform. - -Please execute - -``` -export SPREADSHEET_ID=xx -export GOOGLE_APPLICATION_CREDENTIALS=xx -``` - -```bash - ./oasfi-linux export-staker-reward staker_addresses -c=hub_mainnet --export_csv_online=true -``` - -#### --output - -* Specify the output file destination. -* The default is staker-reward.csv - -```bash - ./oasfi-linux export-staker-reward staker_addresses -c=hub_mainnet -o=output.csv -``` - -### Reference - -#### sheet API -* Used to obtain the environment variable SPREADSHEET_ID. -* https://console.cloud.google.com/apis/library/browse?hl=ja&project=nftwars-357707&q=sheet - -#### service account -* Used to obtain the environment variable GOOGLE_APPLICATION_CREDENTIALS. -* https://firebase.google.com/docs/app-distribution/authenticate-service-account?hl=ja&platform=ios -* https://docs.biztex.co.jp/cobit-docs/google_spreadsheet_settings/for_serviceaccount.html - - - - - - - - - - - -