├── .github └── workflows │ └── main.yml ├── gentx ├── Alexzender.json └── B-Harvest.json ├── gentx_checker.js └── README.md /.github/workflows/main.yml: -------------------------------------------------------------------------------- 1 | name: CI 2 | on: 3 | pull_request: 4 | branches: [ "master" ] 5 | 6 | # Allows you to run this workflow manually from the Actions tab 7 | workflow_dispatch: 8 | 9 | jobs: 10 | build: 11 | runs-on: ubuntu-latest 12 | steps: 13 | # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it 14 | - uses: actions/checkout@v3 15 | 16 | - name: Setup Node.js environment 17 | uses: actions/setup-node@v3.4.1 18 | with: 19 | node-version: 14.18.1 20 | 21 | - id: files 22 | name: Check gentx 23 | uses: jitterbit/get-changed-files@v1 24 | with: 25 | format: 'json' 26 | - run: | 27 | readarray -t added_modified_files <<<"$(jq -r '.[]' <<<'${{ steps.files.outputs.added_modified }}')" 28 | if [[ ${#added_modified_files[@]} > 1 ]]; then 29 | echo "More than one file found" 30 | exit 1 31 | fi 32 | for added_modified_file in ${added_modified_files[@]}; do 33 | node gentx_checker.js ${added_modified_file} 34 | done 35 | -------------------------------------------------------------------------------- /gentx/Alexzender.json: -------------------------------------------------------------------------------- 1 | {"body":{"messages":[{"@type":"/cosmos.staking.v1beta1.MsgCreateValidator","description":{"moniker":"Alexzender","identity":"0200AB142827A508","website":"https://t.me/alexzender777","security_contact":"","details":"Validator Haqq"},"commission":{"rate":"0.050000000000000000","max_rate":"0.200000000000000000","max_change_rate":"0.050000000000000000"},"min_self_delegation":"1","delegator_address":"haqq1rdcf8gtfhytu83majv5yr6snr0gyegsd2k54ev","validator_address":"haqqvaloper1rdcf8gtfhytu83majv5yr6snr0gyegsdx5cmad","pubkey":{"@type":"/cosmos.crypto.ed25519.PubKey","key":"zYINcz0fluj6G6xJbK5fTs8djAM21MzUsRc0uM2xQ5k="},"value":{"denom":"aISLM","amount":"10000000000000000000"}}],"memo":"07c859352f30daf8c960f49ddd884500ae13e4d7@178.18.245.30:26656","timeout_height":"0","extension_options":[],"non_critical_extension_options":[]},"auth_info":{"signer_infos":[{"public_key":{"@type":"/ethermint.crypto.v1.ethsecp256k1.PubKey","key":"Al1XnZVWj6Plk89D/b62pj7YQaEMXGwR6zUJm31E4UKN"},"mode_info":{"single":{"mode":"SIGN_MODE_DIRECT"}},"sequence":"0"}],"fee":{"amount":[],"gas_limit":"200000","payer":"","granter":""}},"signatures":["Xk7G1hFizQ1UNmWnHiVBz8FDArGYDHEPvLsl5w3cUaNEpj+oqFN+qxWw98FXFUz/56FXpRXqQqIdCVB2ermnJAE="]} 2 | -------------------------------------------------------------------------------- /gentx/B-Harvest.json: -------------------------------------------------------------------------------- 1 | {"body":{"messages":[{"@type":"/cosmos.staking.v1beta1.MsgCreateValidator","description":{"moniker":"B-Harvest","identity":"8957C5091FBF4192","website":"https://bharvest.io","security_contact":"contact@bharvest.io","details":"Provides secure validation services for dPoS networks"},"commission":{"rate":"0.050000000000000000","max_rate":"0.200000000000000000","max_change_rate":"0.050000000000000000"},"min_self_delegation":"1","delegator_address":"haqq1wltpda6tkrl8satfjmkef49fxntgtsgkwej73k","validator_address":"haqqvaloper1wltpda6tkrl8satfjmkef49fxntgtsgkzm7s4h","pubkey":{"@type":"/cosmos.crypto.ed25519.PubKey","key":"wu4NeGYF7bRGqapOYGyd03LUtyjs0CKpTwjPxMvRe4U="},"value":{"denom":"aISLM","amount":"10000000000000000000"}}],"memo":"bb0cfd3b7cbc236ab09a59a9108ef512dfad5b24@10.10.10.170:26656","timeout_height":"0","extension_options":[],"non_critical_extension_options":[]},"auth_info":{"signer_infos":[{"public_key":{"@type":"/ethermint.crypto.v1.ethsecp256k1.PubKey","key":"AwWxt3bGLfYEw3GstEY99JJeO2Pn6POTop22mb6jDT2r"},"mode_info":{"single":{"mode":"SIGN_MODE_DIRECT"}},"sequence":"0"}],"fee":{"amount":[],"gas_limit":"200000","payer":"","granter":""}},"signatures":["WDy3k2NFiNKqaxhWkpqQnuWL+/FdtItp59hpwx5P/NgBmNBxUVR39wrkzdLF3iRuh+brpWsDSC09rl5Jo8fyzwE="]} 2 | -------------------------------------------------------------------------------- /gentx_checker.js: -------------------------------------------------------------------------------- 1 | const fs = require('fs'); 2 | 3 | class GentxChecker { 4 | constructor(gentx) { 5 | this._validator_data = gentx.body.messages[0]; 6 | } 7 | 8 | isHealthyDelegatorAddress() { 9 | return this._validator_data.delegator_address.startsWith('haqq'); 10 | } 11 | 12 | isHealthyValidatorAddress() { 13 | return this._validator_data.validator_address.startsWith('haqq'); 14 | } 15 | 16 | isHealthyAmount() { 17 | return parseInt(this._validator_data.value.amount) / 10000000000000000000 === 1.0; 18 | } 19 | 20 | isHealthyDenom() { 21 | return this._validator_data.value['denom'] === 'aISLM' 22 | } 23 | } 24 | 25 | let rawData = fs.readFileSync(process.argv[2]); 26 | let gentx_json = JSON.parse(rawData); 27 | 28 | const gentxChecker = new GentxChecker(gentx_json) 29 | const str_errors = [] 30 | 31 | if (!gentxChecker.isHealthyDelegatorAddress()) 32 | str_errors.push('Incorrect delegator address.'); 33 | if (!gentxChecker.isHealthyValidatorAddress()) 34 | str_errors.push('Incorrect validator address.'); 35 | if (!gentxChecker.isHealthyAmount()) 36 | str_errors.push('Incorrect amount.'); 37 | if (!gentxChecker.isHealthyDenom()) 38 | str_errors.push('Incorrect denom.'); 39 | 40 | console.log(str_errors.length === 0 ? 'No errors found' : str_errors.join('\n')) 41 | process.exit(str_errors.length === 0 ? 0 : 1) 42 | Footer 43 | © 2022 GitHub, Inc. 44 | Footer navigation 45 | Terms 46 | Privacy 47 | Security 48 | Statu 49 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # haqq-net-konkurs 2 | # testnet Haqq 3 |