diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index cbbb5c5ba..6cb874f67 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -18,95 +18,95 @@ jobs: container: image: ghcr.io/kiracore/docker/base-image:v0.13.14 steps: - # Work around https://github.com/actions/checkout/issues/760 - - name: Add safe.directory - run: | - git config --global --add safe.directory /github/workspace - git config --global --add safe.directory $PWD - # ref.: https://github.com/actions/checkout, v3.0.0 - - name: Checkout repository - uses: actions/checkout@a12a3943b4bdde767164f792f33f40b04645d846 - - name: Checking dependency versions & packaging source files - run: | - echo "(current dir): $PWD" && ls -l ./ - cd ../ && tar -czvf src.tar.gz -C ./sekai . && cp ./src.tar.gz ./sekai/src.tar.gz - cd ./sekai - . /etc/profile && echo "Utils Version: $(bash-utils bashUtilsVersion)" - go version - echo "ENVS: $(env)" - echo "HOME: $HOME" - echo " PWD: $PWD" - - name: Extract branch name on push - if: github.event_name == 'push' - shell: bash - run: | - echo "SOURCE_BRANCH=$(echo ${GITHUB_REF#refs/heads/})" >> $GITHUB_ENV - echo "DESTINATION_BRANCH=$(echo ${GITHUB_REF#refs/heads/})" >> $GITHUB_ENV - - name: Extract branch name on pull request - if: github.event_name == 'pull_request' - env: - REF_BRANCH: ${{ github.event.pull_request.head.ref }} - BASE_REF_BRANCH: ${{ github.base_ref }} - shell: bash - run: | - echo "SOURCE_BRANCH=$(echo ${{ env.REF_BRANCH }})" >> $GITHUB_ENV - echo "DESTINATION_BRANCH=$(echo ${{ env.BASE_REF_BRANCH }})" >> $GITHUB_ENV - - name: Inspecting & organizing artifacts - run: | - echo "(current dir): $PWD" && ls -l ./ - chmod -Rv 555 ./scripts - RELEASE_VER="$(./scripts/version.sh)" && echo "RELEASE_VER=$RELEASE_VER" >> $GITHUB_ENV - RELEASE_BRANCH="release/$RELEASE_VER" && echo "RELEASE_BRANCH=$RELEASE_BRANCH" >> $GITHUB_ENV - REPOSITORY_NAME="${{ github.event.repository.name }}" && echo "REPOSITORY_NAME=$REPOSITORY_NAME" >> $GITHUB_ENV - git ls-remote https://github.com/kiracore/$REPOSITORY_NAME | egrep -q "refs/tags/${RELEASE_VER}$" && echo "RELEASE_EXISTS=true" >> $GITHUB_ENV || echo "RELEASE_EXISTS=false" >> $GITHUB_ENV - if [[ "$RELEASE_VER" =~ $VERSION_REGEX ]] && [[ "$SOURCE_BRANCH" =~ $VERSION_REGEX ]] && [ "$SOURCE_BRANCH" != "$RELEASE_VER" ] ; then - echo "ERROR: Version branch name MUST be the same as the app version, run scripts/version.sh to check app version!" - exit 1 - else - echo "INFO: Variables setup succeeded" - fi - - name: Print debug data before testing - run: | - echo " Source branch: ${{ env.SOURCE_BRANCH }}" - echo "Destination branch: ${{ env.DESTINATION_BRANCH }}" - echo " Release branch: ${{ env.RELEASE_BRANCH }}" - echo " Event name: ${{ github.event_name }}" - echo " Repository name: ${{ env.REPOSITORY_NAME }}" - echo " Release version: ${{ env.RELEASE_VER }}" - echo " Release exists: ${{ env.RELEASE_EXISTS }}" - - name: Testing SEKAI - run: | - make test - make install - sekaid version - make test-local - - name: Publishing SEKAID binaries - shell: bash - run: | - make publish - touch ./RELEASE.md - cp -fv ./RELEASE.md ./bin/RELEASE.md - cp -fv ./src.tar.gz ./bin/source-code.tar.gz - chmod -Rv 777 ./bin - echo -e "\n\r\n\r\`\`\`" >> ./bin/RELEASE.md - echo -e " Release Versions: $RELEASE_VER\n\r" >> ./bin/RELEASE.md - echo -e " Release Date Time: $(date --rfc-2822)" >> ./bin/RELEASE.md - echo " sekai-darwin-amd64.deb: sha256:$(sha256sum ./bin/sekai-darwin-amd64.deb | awk '{ print $1 }')" >> ./bin/RELEASE.md - echo " sekai-darwin-arm64.deb: sha256:$(sha256sum ./bin/sekai-darwin-arm64.deb | awk '{ print $1 }')" >> ./bin/RELEASE.md - echo " sekai-linux-amd64.deb: sha256:$(sha256sum ./bin/sekai-linux-amd64.deb | awk '{ print $1 }')" >> ./bin/RELEASE.md - echo " sekai-linux-arm64.deb: sha256:$(sha256sum ./bin/sekai-linux-arm64.deb | awk '{ print $1 }')" >> ./bin/RELEASE.md - echo "sekai-windows-amd64.exe: sha256:$(sha256sum ./bin/sekai-windows-amd64.exe | awk '{ print $1 }')" >> ./bin/RELEASE.md - echo "sekai-windows-arm64.exe: sha256:$(sha256sum ./bin/sekai-windows-arm64.exe | awk '{ print $1 }')" >> ./bin/RELEASE.md - echo " source-code.tar.gz: sha256:$(sha256sum ./bin/source-code.tar.gz | awk '{ print $1 }')" >> ./bin/RELEASE.md - echo " sekai-utils.sh: sha256:$(sha256sum ./bin/sekai-utils.sh | awk '{ print $1 }')" >> ./bin/RELEASE.md - echo " sekai-env.sh: sha256:$(sha256sum ./bin/sekai-env.sh | awk '{ print $1 }')" >> ./bin/RELEASE.md - echo -e "\`\`\`" >> ./bin/RELEASE.md - tar -czvf deb.tar.gz -C ./bin . - - name: Uploading artifacts - uses: actions/upload-artifact@v3.0.0 - with: - name: sekai-bin-deb - path: ./deb.tar.gz + # Work around https://github.com/actions/checkout/issues/760 + - name: Add safe.directory + run: | + git config --global --add safe.directory /github/workspace + git config --global --add safe.directory $PWD + # ref.: https://github.com/actions/checkout, v3.0.0 + - name: Checkout repository + uses: actions/checkout@a12a3943b4bdde767164f792f33f40b04645d846 + - name: Checking dependency versions & packaging source files + run: | + echo "(current dir): $PWD" && ls -l ./ + cd ../ && tar -czvf src.tar.gz -C ./sekai . && cp ./src.tar.gz ./sekai/src.tar.gz + cd ./sekai + . /etc/profile && echo "Utils Version: $(bash-utils bashUtilsVersion)" + go version + echo "ENVS: $(env)" + echo "HOME: $HOME" + echo " PWD: $PWD" + - name: Extract branch name on push + if: github.event_name == 'push' + shell: bash + run: | + echo "SOURCE_BRANCH=$(echo ${GITHUB_REF#refs/heads/})" >> $GITHUB_ENV + echo "DESTINATION_BRANCH=$(echo ${GITHUB_REF#refs/heads/})" >> $GITHUB_ENV + - name: Extract branch name on pull request + if: github.event_name == 'pull_request' + env: + REF_BRANCH: ${{ github.event.pull_request.head.ref }} + BASE_REF_BRANCH: ${{ github.base_ref }} + shell: bash + run: | + echo "SOURCE_BRANCH=$(echo ${{ env.REF_BRANCH }})" >> $GITHUB_ENV + echo "DESTINATION_BRANCH=$(echo ${{ env.BASE_REF_BRANCH }})" >> $GITHUB_ENV + - name: Inspecting & organizing artifacts + run: | + echo "(current dir): $PWD" && ls -l ./ + chmod -Rv 555 ./scripts + RELEASE_VER="$(./scripts/version.sh)" && echo "RELEASE_VER=$RELEASE_VER" >> $GITHUB_ENV + RELEASE_BRANCH="release/$RELEASE_VER" && echo "RELEASE_BRANCH=$RELEASE_BRANCH" >> $GITHUB_ENV + REPOSITORY_NAME="${{ github.event.repository.name }}" && echo "REPOSITORY_NAME=$REPOSITORY_NAME" >> $GITHUB_ENV + git ls-remote https://github.com/kiracore/$REPOSITORY_NAME | egrep -q "refs/tags/${RELEASE_VER}$" && echo "RELEASE_EXISTS=true" >> $GITHUB_ENV || echo "RELEASE_EXISTS=false" >> $GITHUB_ENV + if [[ "$RELEASE_VER" =~ $VERSION_REGEX ]] && [[ "$SOURCE_BRANCH" =~ $VERSION_REGEX ]] && [ "$SOURCE_BRANCH" != "$RELEASE_VER" ] ; then + echo "ERROR: Version branch name MUST be the same as the app version, run scripts/version.sh to check app version!" + exit 1 + else + echo "INFO: Variables setup succeeded" + fi + - name: Print debug data before testing + run: | + echo " Source branch: ${{ env.SOURCE_BRANCH }}" + echo "Destination branch: ${{ env.DESTINATION_BRANCH }}" + echo " Release branch: ${{ env.RELEASE_BRANCH }}" + echo " Event name: ${{ github.event_name }}" + echo " Repository name: ${{ env.REPOSITORY_NAME }}" + echo " Release version: ${{ env.RELEASE_VER }}" + echo " Release exists: ${{ env.RELEASE_EXISTS }}" + - name: Testing SEKAI + run: | + make test + make install + sekaid version + make test-local + - name: Publishing SEKAID binaries + shell: bash + run: | + make publish + touch ./RELEASE.md + cp -fv ./RELEASE.md ./bin/RELEASE.md + cp -fv ./src.tar.gz ./bin/source-code.tar.gz + chmod -Rv 777 ./bin + echo -e "\n\r\n\r\`\`\`" >> ./bin/RELEASE.md + echo -e " Release Versions: $RELEASE_VER\n\r" >> ./bin/RELEASE.md + echo -e " Release Date Time: $(date --rfc-2822)" >> ./bin/RELEASE.md + echo " sekai-darwin-amd64.deb: sha256:$(sha256sum ./bin/sekai-darwin-amd64.deb | awk '{ print $1 }')" >> ./bin/RELEASE.md + echo " sekai-darwin-arm64.deb: sha256:$(sha256sum ./bin/sekai-darwin-arm64.deb | awk '{ print $1 }')" >> ./bin/RELEASE.md + echo " sekai-linux-amd64.deb: sha256:$(sha256sum ./bin/sekai-linux-amd64.deb | awk '{ print $1 }')" >> ./bin/RELEASE.md + echo " sekai-linux-arm64.deb: sha256:$(sha256sum ./bin/sekai-linux-arm64.deb | awk '{ print $1 }')" >> ./bin/RELEASE.md + echo "sekai-windows-amd64.exe: sha256:$(sha256sum ./bin/sekai-windows-amd64.exe | awk '{ print $1 }')" >> ./bin/RELEASE.md + echo "sekai-windows-arm64.exe: sha256:$(sha256sum ./bin/sekai-windows-arm64.exe | awk '{ print $1 }')" >> ./bin/RELEASE.md + echo " source-code.tar.gz: sha256:$(sha256sum ./bin/source-code.tar.gz | awk '{ print $1 }')" >> ./bin/RELEASE.md + echo " sekai-utils.sh: sha256:$(sha256sum ./bin/sekai-utils.sh | awk '{ print $1 }')" >> ./bin/RELEASE.md + echo " sekai-env.sh: sha256:$(sha256sum ./bin/sekai-env.sh | awk '{ print $1 }')" >> ./bin/RELEASE.md + echo -e "\`\`\`" >> ./bin/RELEASE.md + tar -czvf deb.tar.gz -C ./bin . + - name: Uploading artifacts + uses: actions/upload-artifact@v3.0.0 + with: + name: sekai-bin-deb + path: ./deb.tar.gz release: name: Create Release runs-on: ubuntu-20.04 @@ -117,154 +117,154 @@ jobs: id-token: write pull-requests: write steps: - # Install the cosign tool - # ref.: https://github.com/sigstore/cosign-installer, v3.2.0 - - name: Install cosign - uses: sigstore/cosign-installer@1fc5bd396d372bee37d608f955b336615edf79c8 - with: - cosign-release: 'v2.0.0' - - name: Confirm installation! - run: cosign version - - name: Download artifacts - uses: actions/download-artifact@v3.0.0 - with: - name: sekai-bin-deb - - name: Inspecting & organizing artifacts - run: | - echo "(current dir): $PWD" && ls -l ./ - tar xvf ./deb.tar.gz - chmod -Rv 777 ./ - RELEASE_VER=$(cat ./RELEASE.md | tac | grep -Fn -m 1 'Release Versions: ' | rev | cut -d ":" -f1 | rev | xargs | tr -dc '[:alnum:]\-\.' || echo '') - RELEASE_BRANCH="release/$RELEASE_VER" && echo "RELEASE_BRANCH=$RELEASE_BRANCH" >> $GITHUB_ENV - echo "RELEASE_VER=$RELEASE_VER" >> $GITHUB_ENV - REPOSITORY_NAME="${{ github.event.repository.name }}" - echo "REPOSITORY_NAME=$REPOSITORY_NAME" >> $GITHUB_ENV - git ls-remote https://github.com/kiracore/$REPOSITORY_NAME | egrep -q "refs/tags/${RELEASE_VER}$" && echo "RELEASE_EXISTS=true" >> $GITHUB_ENV || echo "RELEASE_EXISTS=false" >> $GITHUB_ENV - [[ "$RELEASE_VER" == *"-rc"* ]] && echo "PRE_RELEASE=true" >> $GITHUB_ENV || echo "PRE_RELEASE=false" >> $GITHUB_ENV - # Branch name is also a version of the release - # ref: https://stackoverflow.com/questions/58033366/how-to-get-the-current-branch-within-github-actions - - name: Extract branch name on push - if: github.event_name == 'push' - shell: bash - run: | - echo "SOURCE_BRANCH=$(echo ${GITHUB_REF#refs/heads/})" >> $GITHUB_ENV - echo "DESTINATION_BRANCH=$(echo ${GITHUB_REF#refs/heads/})" >> $GITHUB_ENV - - name: Extract branch name on pull request - if: github.event_name == 'pull_request' - env: - REF_BRANCH: ${{ github.event.pull_request.head.ref }} - BASE_REF_BRANCH: ${{ github.base_ref }} - shell: bash - run: | - echo "SOURCE_BRANCH=$(echo ${{ env.REF_BRANCH }})" >> $GITHUB_ENV - echo "DESTINATION_BRANCH=$(echo ${{ env.BASE_REF_BRANCH }})" >> $GITHUB_ENV - - name: Print debug data before publishing - run: | - echo " Source branch: ${{ env.SOURCE_BRANCH }}" - echo " Dest. branch: ${{ env.DESTINATION_BRANCH }}" - echo "Release branch: ${{ env.RELEASE_BRANCH }}" - echo " Repo Name: ${{ env.REPOSITORY_NAME }}" - echo " Event name: ${{ github.event_name }}" - echo " Release ver.: ${{ env.RELEASE_VER }}" - echo "Release exists: ${{ env.RELEASE_EXISTS }}" - echo " Pre-release: ${{ env.PRE_RELEASE }}" - - name: Reject on error - # ref.: https://github.com/andrewslotin/rummelsnuff, v1.1.0 - uses: andrewslotin/rummelsnuff@a0c9c1929f44eefff922aced1ee4dd64eddf12d6 - if: ${{ failure() }} - with: - spam_label: "Build Errors" - close_spam_prs: "yes" - access_token: ${{ secrets.GITHUB_TOKEN }} - # ref: https://github.com/softprops/action-gh-release, v0.1.14 - # Release on merge only (push action) - this should run only once - - name: Signing release files - if: | - github.event_name == 'push' && - ( env.RELEASE_EXISTS == false || env.RELEASE_EXISTS == 'false' ) && - ( startsWith(env.SOURCE_BRANCH, 'release/v') && contains(env.SOURCE_BRANCH, '.') ) - shell: bash - env: - KEY: ${{ secrets.COSIGN_PRIVATE_KEY }} - COSIGN_PASSWORD: ${{ secrets.COSIGN_PASSWORD }} - run: | - echo "$KEY" > ../cosign.key - for FILE in *; do FILE_NAME=$(basename $FILE); cosign sign-blob --yes --key=../cosign.key --output-signature=./${FILE_NAME}.sig ./$FILE_NAME; done - rm -fv ../cosign.key - # ref: https://github.com/softprops/action-gh-release, v0.1.14 - # Release on merge only (push action) - this should run only once - - name: Publish release - if: | - github.event_name == 'push' && - ( env.RELEASE_EXISTS == false || env.RELEASE_EXISTS == 'false' ) && - ( startsWith(env.SOURCE_BRANCH, 'release/v') && contains(env.SOURCE_BRANCH, '.') ) - uses: softprops/action-gh-release@1e07f4398721186383de40550babbdf2b84acfc5 - with: - body_path: RELEASE.md - tag_name: ${{ env.RELEASE_VER }} - name: ${{ env.RELEASE_VER }} - prerelease: ${{ env.PRE_RELEASE }} - draft: false - fail_on_unmatched_files: true - files: | - ./sekai-linux-amd64.deb - ./sekai-linux-amd64.deb.sig - ./sekai-linux-arm64.deb - ./sekai-linux-arm64.deb.sig - ./sekai-darwin-amd64.deb - ./sekai-darwin-amd64.deb.sig - ./sekai-darwin-arm64.deb - ./sekai-darwin-arm64.deb.sig - ./sekai-windows-amd64.exe - ./sekai-windows-amd64.exe.sig - ./sekai-windows-arm64.exe - ./sekai-windows-arm64.exe.sig - ./sekai-utils.sh - ./sekai-utils.sh.sig - ./sekai-env.sh - ./sekai-env.sh.sig - ./source-code.tar.gz - ./source-code.tar.gz.sig - # ref.: https://github.com/hmarr/auto-approve-action, v2.1.0 - # Do NOT approve IF release exists and the source branch is NOT a version branch - - name: Approve pull request on success - uses: hmarr/auto-approve-action@5d04a5ca6da9aeb8ca9f31a5239b96fc3e003029 - if: | - ( github.event_name == 'pull_request' ) && - ( env.SOURCE_BRANCH == env.RELEASE_BRANCH || env.DESTINATION_BRANCH == env.RELEASE_BRANCH ) - with: - github-token: "${{ secrets.GITHUB_TOKEN }}" - - name: Cleanup all resources - shell: bash - run: | - rm -rfv ./* - echo "(current dir): $PWD" && ls -l ./ - # Work around https://github.com/actions/checkout/issues/760 - - name: Add safe.directory - run: | - git config --global --add safe.directory /github/workspace - git config --global --add safe.directory $PWD - # ref.: https://github.com/actions/checkout, v3.0.0 - - name: Checkout repository - uses: actions/checkout@a12a3943b4bdde767164f792f33f40b04645d846 - - name: Create PR from a version branch to latest - # ref. repo-sync/pull-request is broken, using cea2aj/pull-request instead - uses: cea2aj/pull-request@84eb0c3478f13651e5649367941b867ca02d7926 - if: | - github.event_name == 'push' && - ( startsWith(env.SOURCE_BRANCH, 'release/v') && contains(env.SOURCE_BRANCH, '.') ) - with: - github_token: ${{ secrets.REPO_ACCESS }} - source_branch: ${{ env.SOURCE_BRANCH }} - destination_branch: 'latest' - pr_title: "${{ env.SOURCE_BRANCH }} -> latest" - pr_label: "kira-automation,automerge" - pr_allow_empty: true - - name: Auto-merge version branch to latest branch - uses: pascalgn/automerge-action@04dfc9eae2586d19b7362d4f6413c48135d9c25a - if: github.event_name == 'pull_request' && env.DESTINATION_BRANCH == 'latest' && - ( startsWith(env.SOURCE_BRANCH, 'release/v') && contains(env.SOURCE_BRANCH, '.') ) - env: - MERGE_LABELS: "automerge" - GITHUB_TOKEN: "${{ secrets.REPO_ACCESS }}" - LOG: "TRACE" + # Install the cosign tool + # ref.: https://github.com/sigstore/cosign-installer, v3.4.0 + - name: Install cosign + uses: sigstore/cosign-installer@e1523de7571e31dbe865fd2e80c5c7c23ae71eb4 # v3.4.0 + with: + cosign-release: 'v2.2.3' + - name: Confirm installation! + run: cosign version + - name: Download artifacts + uses: actions/download-artifact@v3.0.0 + with: + name: sekai-bin-deb + - name: Inspecting & organizing artifacts + run: | + echo "(current dir): $PWD" && ls -l ./ + tar xvf ./deb.tar.gz + chmod -Rv 777 ./ + RELEASE_VER=$(cat ./RELEASE.md | tac | grep -Fn -m 1 'Release Versions: ' | rev | cut -d ":" -f1 | rev | xargs | tr -dc '[:alnum:]\-\.' || echo '') + RELEASE_BRANCH="release/$RELEASE_VER" && echo "RELEASE_BRANCH=$RELEASE_BRANCH" >> $GITHUB_ENV + echo "RELEASE_VER=$RELEASE_VER" >> $GITHUB_ENV + REPOSITORY_NAME="${{ github.event.repository.name }}" + echo "REPOSITORY_NAME=$REPOSITORY_NAME" >> $GITHUB_ENV + git ls-remote https://github.com/kiracore/$REPOSITORY_NAME | egrep -q "refs/tags/${RELEASE_VER}$" && echo "RELEASE_EXISTS=true" >> $GITHUB_ENV || echo "RELEASE_EXISTS=false" >> $GITHUB_ENV + [[ "$RELEASE_VER" == *"-rc"* ]] && echo "PRE_RELEASE=true" >> $GITHUB_ENV || echo "PRE_RELEASE=false" >> $GITHUB_ENV + # Branch name is also a version of the release + # ref: https://stackoverflow.com/questions/58033366/how-to-get-the-current-branch-within-github-actions + - name: Extract branch name on push + if: github.event_name == 'push' + shell: bash + run: | + echo "SOURCE_BRANCH=$(echo ${GITHUB_REF#refs/heads/})" >> $GITHUB_ENV + echo "DESTINATION_BRANCH=$(echo ${GITHUB_REF#refs/heads/})" >> $GITHUB_ENV + - name: Extract branch name on pull request + if: github.event_name == 'pull_request' + env: + REF_BRANCH: ${{ github.event.pull_request.head.ref }} + BASE_REF_BRANCH: ${{ github.base_ref }} + shell: bash + run: | + echo "SOURCE_BRANCH=$(echo ${{ env.REF_BRANCH }})" >> $GITHUB_ENV + echo "DESTINATION_BRANCH=$(echo ${{ env.BASE_REF_BRANCH }})" >> $GITHUB_ENV + - name: Print debug data before publishing + run: | + echo " Source branch: ${{ env.SOURCE_BRANCH }}" + echo " Dest. branch: ${{ env.DESTINATION_BRANCH }}" + echo "Release branch: ${{ env.RELEASE_BRANCH }}" + echo " Repo Name: ${{ env.REPOSITORY_NAME }}" + echo " Event name: ${{ github.event_name }}" + echo " Release ver.: ${{ env.RELEASE_VER }}" + echo "Release exists: ${{ env.RELEASE_EXISTS }}" + echo " Pre-release: ${{ env.PRE_RELEASE }}" + - name: Reject on error + # ref.: https://github.com/andrewslotin/rummelsnuff, v1.1.0 + uses: andrewslotin/rummelsnuff@a0c9c1929f44eefff922aced1ee4dd64eddf12d6 + if: ${{ failure() }} + with: + spam_label: "Build Errors" + close_spam_prs: "yes" + access_token: ${{ secrets.GITHUB_TOKEN }} + # ref: https://github.com/softprops/action-gh-release, v0.1.14 + # Release on merge only (push action) - this should run only once + - name: Signing release files + if: | + github.event_name == 'push' && + ( env.RELEASE_EXISTS == false || env.RELEASE_EXISTS == 'false' ) && + ( startsWith(env.SOURCE_BRANCH, 'release/v') && contains(env.SOURCE_BRANCH, '.') ) + shell: bash + env: + KEY: ${{ secrets.COSIGN_PRIVATE_KEY }} + COSIGN_PASSWORD: ${{ secrets.COSIGN_PASSWORD }} + run: | + echo "$KEY" > ../cosign.key + for FILE in *; do FILE_NAME=$(basename $FILE); cosign sign-blob --yes --key=../cosign.key --output-signature=./${FILE_NAME}.sig ./$FILE_NAME; done + rm -fv ../cosign.key + # ref: https://github.com/softprops/action-gh-release, v0.1.14 + # Release on merge only (push action) - this should run only once + - name: Publish release + if: | + github.event_name == 'push' && + ( env.RELEASE_EXISTS == false || env.RELEASE_EXISTS == 'false' ) && + ( startsWith(env.SOURCE_BRANCH, 'release/v') && contains(env.SOURCE_BRANCH, '.') ) + uses: softprops/action-gh-release@1e07f4398721186383de40550babbdf2b84acfc5 + with: + body_path: RELEASE.md + tag_name: ${{ env.RELEASE_VER }} + name: ${{ env.RELEASE_VER }} + prerelease: ${{ env.PRE_RELEASE }} + draft: false + fail_on_unmatched_files: true + files: | + ./sekai-linux-amd64.deb + ./sekai-linux-amd64.deb.sig + ./sekai-linux-arm64.deb + ./sekai-linux-arm64.deb.sig + ./sekai-darwin-amd64.deb + ./sekai-darwin-amd64.deb.sig + ./sekai-darwin-arm64.deb + ./sekai-darwin-arm64.deb.sig + ./sekai-windows-amd64.exe + ./sekai-windows-amd64.exe.sig + ./sekai-windows-arm64.exe + ./sekai-windows-arm64.exe.sig + ./sekai-utils.sh + ./sekai-utils.sh.sig + ./sekai-env.sh + ./sekai-env.sh.sig + ./source-code.tar.gz + ./source-code.tar.gz.sig + # ref.: https://github.com/hmarr/auto-approve-action, v2.1.0 + # Do NOT approve IF release exists and the source branch is NOT a version branch + - name: Approve pull request on success + uses: hmarr/auto-approve-action@5d04a5ca6da9aeb8ca9f31a5239b96fc3e003029 + if: | + ( github.event_name == 'pull_request' ) && + ( env.SOURCE_BRANCH == env.RELEASE_BRANCH || env.DESTINATION_BRANCH == env.RELEASE_BRANCH ) + with: + github-token: "${{ secrets.GITHUB_TOKEN }}" + - name: Cleanup all resources + shell: bash + run: | + rm -rfv ./* + echo "(current dir): $PWD" && ls -l ./ + # Work around https://github.com/actions/checkout/issues/760 + - name: Add safe.directory + run: | + git config --global --add safe.directory /github/workspace + git config --global --add safe.directory $PWD + # ref.: https://github.com/actions/checkout, v3.0.0 + - name: Checkout repository + uses: actions/checkout@a12a3943b4bdde767164f792f33f40b04645d846 + - name: Create PR from a version branch to latest + # ref. repo-sync/pull-request is broken, using cea2aj/pull-request instead + uses: cea2aj/pull-request@84eb0c3478f13651e5649367941b867ca02d7926 + if: | + github.event_name == 'push' && + ( startsWith(env.SOURCE_BRANCH, 'release/v') && contains(env.SOURCE_BRANCH, '.') ) + with: + github_token: ${{ secrets.REPO_ACCESS }} + source_branch: ${{ env.SOURCE_BRANCH }} + destination_branch: 'latest' + pr_title: "${{ env.SOURCE_BRANCH }} -> latest" + pr_label: "kira-automation,automerge" + pr_allow_empty: true + - name: Auto-merge version branch to latest branch + uses: pascalgn/automerge-action@04dfc9eae2586d19b7362d4f6413c48135d9c25a + if: github.event_name == 'pull_request' && env.DESTINATION_BRANCH == 'latest' && + ( startsWith(env.SOURCE_BRANCH, 'release/v') && contains(env.SOURCE_BRANCH, '.') ) + env: + MERGE_LABELS: "automerge" + GITHUB_TOKEN: "${{ secrets.REPO_ACCESS }}" + LOG: "TRACE" diff --git a/.github/workflows/merge_hook.yml b/.github/workflows/merge_hook.yml new file mode 100644 index 000000000..a26393c4b --- /dev/null +++ b/.github/workflows/merge_hook.yml @@ -0,0 +1,43 @@ + +name: Release Merged Hook + +on: + pull_request: + types: [closed] + branches: + - master + +jobs: + trigger-dispatch: + if: github.event.pull_request.merged == true && startsWith(github.event.pull_request.head.ref, 'release/v') + runs-on: ubuntu-latest + steps: + - name: Extract Version from Branch Name + id: version-extract + run: | + VERSION=$(echo "${{ github.event.pull_request.head.ref }}" | sed 's|release/v||') + echo "VERSION=$VERSION" >> $GITHUB_ENV + + - name: Trigger Repository Dispatch Event + env: + VERSION: ${{ env.VERSION }} + run: | + curl -X POST -H "Accept: application/vnd.github.v3+json" \ + -H "Authorization: Bearer ${{ secrets.REPO_ACCESS }}" \ + "https://api.github.com/repos/KiraCore/sekin/dispatches" \ + -d @- < $KIRA_COSIGN_PUB && \ + wget "https://github.com/KiraCore/tools/releases/download/$TOOLS_VERSION/${FILE_NAME}" -O ./$FILE_NAME && \ + wget "https://github.com/KiraCore/tools/releases/download/$TOOLS_VERSION/${FILE_NAME}.sig" -O ./${FILE_NAME}.sig && \ + cosign verify-blob --key="$KIRA_COSIGN_PUB" --signature=./${FILE_NAME}.sig ./$FILE_NAME && \ + chmod -v 555 ./$FILE_NAME && ./$FILE_NAME bashUtilsSetup "/var/kiraglob" && . /etc/profile && \ + echoInfo "Installed bash-utils $(bash-utils bashUtilsVersion)" +``` + +## Quick setup from Releases + +```bash +# TBD +``` + +## Set environment variables + +```sh +sh env.sh +``` + +# Get version info + +[scripts/commands/version.sh](scripts/commands/version.sh) + +# Adding more validators + +[scripts/commands/adding-validators.sh](scripts/commands/adding-validators.sh) + +## Set ChangeTxFee permission + +[scripts/commands/set-permission.sh](scripts/commands/set-permission.sh) + +## Set network properties + +[scripts/commands/set-network-properties.sh](scripts/commands/set-network-properties.sh) + +## Set Execution Fee + +[scripts/commands/set-execution-fee.sh](scripts/commands/set-execution-fee.sh) + +## Upsert token rates + +[scripts/commands/upsert-token-rates.sh](scripts/commands/upsert-token-rates.sh) + +## Upsert token alias + +[scripts/commands/upsert-token-alias.sh](scripts/commands/upsert-token-alias.sh) + +# Fee payment in foreign currency + +[scripts/commands/foreign-fee-payments.sh](scripts/commands/foreign-fee-payments.sh) + +# Fee payment in foreign currency returning failure - execution fee in foreign currency + +[scripts/commands/foreign-fee-payments-failure-return.sh](scripts/commands/foreign-fee-payments-failure-return.sh) + +## Query permission of an address + +[scripts/commands/query-permission.sh](scripts/commands/query-permission.sh) + +## Query network properties + +[scripts/commands/query-network-properties.sh](scripts/commands/query-network-properties.sh) + +## Query execution fee + +[scripts/commands/query-execution-fee.sh](scripts/commands/query-execution-fee.sh) + +# Query token alias + +[scripts/commands/query-token-alias.sh](scripts/commands/query-token-alias.sh) + +# Query token rate + +[scripts/commands/query-token-rate.sh](scripts/commands/query-token-rate.sh) + +# Query validator account + +[scripts/commands/query-validator.sh](scripts/commands/query-validator.sh) + +# Query for current frozen / unfronzen tokens + +**Notes**: these values are valid only when specific network property is enabled +[scripts/commands/query-frozen-token.sh](scripts/commands/query-frozen-token.sh) + +# Query poor network messages + +[scripts/commands/query-poor-network-messages.sh](scripts/commands/query-poor-network-messages.sh) + +# Query signing infos per validator's consensus address + +[scripts/commands/query-signing-infos.sh](scripts/commands/query-signing-infos.sh) + +# Common commands for governance process + +[scripts/commands/governance/common.sh](scripts/commands/governance/common.sh) + +### Set permission via governance process + +[scripts/commands/governance/assign-permission.sh](scripts/commands/governance/assign-permission.sh) + +## Upsert token alias via governance process + +[scripts/commands/governance/upsert-token-alias.sh](scripts/commands/governance/upsert-token-alias.sh) + +## Upsert token rates via governance process + +[scripts/commands/governance/upsert-token-rates.sh](scripts/commands/governance/upsert-token-rates.sh) + +# Commands for poor network management via governance process + +[scripts/commands/governance/poor-network-messages.sh](scripts/commands/governance/poor-network-messages.sh) + +# Freeze / unfreeze tokens via governance process + +[scripts/commands/governance/token-freeze.sh](scripts/commands/governance/token-freeze.sh) + +# Set network property proposal via governance process + +[scripts/commands/governance/set-network-property.sh](scripts/commands/governance/set-network-property.sh) + +# Set application upgrade proposal via governance process + +[scripts/commands/governance/upgrade-plan.sh](scripts/commands/governance/upgrade-plan.sh) + +Export the status of chain before halt (should kill the daemon process at the time of genesis export) +[scripts/commands/export-state.sh](scripts/commands/export-state.sh) + +The script for creating new chain from exported state should be written or manual edition process is required. +`ChainId` should be modified in this process. + +For now, upgrade process requires manual conversion from old genesis to new genesis. +At each time of upgrade, genesis upgrade command will be built and infra could run the command like `sekaid genesis-migrate` + +Note: state export command is not exporting the upgrade plan and if all validators run with exported genesis with the previous binary, consensus failure won't happen. + +# Identity registrar + +[scripts/commands/identity-registrar.sh](scripts/commands/identity-registrar.sh) + +# Unjail via governance process + +Modify genesis json to have jailed validator for Unjail testing +Add jailed validator key to kms. + +```sh + sekaid keys add jailed_validator --keyring-backend=test --home=$HOME/.sekaid --recover + "dish rather zoo connect cross inhale security utility occur spell price cute one catalog coconut sort shuffle palm crop surface label foster slender inherit" +``` + +[scripts/commands/governance/unjail-validator.sh](scripts/commands/governance/unjail-validator.sh) + +# New genesis file generation process from exported version + +In order to manually generate new genesis file when the hard fork is activated, following steps should be taken: + +1. Export current genesis, e.g: sekaid export --home= +2. Change chain-id to new_chain_id as indicated by the upgrade plan +3. Replace current upgrade plan in the app_state.upgrade with next plan and set next plan to null + +Using a command it can be done in this way. + +1. sekaid export > exported-genesis.json +2. sekaid new-genesis-from-exported exported-genesis.json new-genesis.json --json-minimize=true diff --git a/Makefile b/Makefile index fb64a643f..160c75cac 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ DOCKER := $(shell which docker) -.PHONY: all install go.sum test test-local lint proto-gen proto-gen-local build start publish +.PHONY: all install go.sum test test-local lint proto-gen proto-gen-local build build-static start publish all: install install: @@ -54,6 +54,9 @@ proto-check-breaking: build: ./scripts/build.sh +build-static: + ./scripts/sbuild.sh + start: go run ./cmd/sekaid/main.go @@ -66,4 +69,4 @@ network-start: ./scripts/test-local/network-start.sh network-stop: - ./scripts/test-local/network-stop.sh \ No newline at end of file + ./scripts/test-local/network-stop.sh diff --git a/README.md b/README.md index d79262e5a..2e28659b3 100644 --- a/README.md +++ b/README.md @@ -1,215 +1,93 @@ -# sekai +# SEKAI -KIRA Relay Chain +SEKAI is KIRA Network's base layer (L1) blockchain application sometimes referred to as “backend”. The role of SEKAI is to be a source of shared security as well as a governance and settlement layer for all KIRA RollApps (L2). KIRA Blockchain preserves information such as user account balances, governance permissions, and RollApp state roots as well as other essential data for coordinating both L1 and L2 operations. -## Quick setup from Github +## Documentation -```bash -# dont forget to specify branch name or hash -cd $HOME && rm -fvr ./sekai && SEKAI_BRANCH="" && \ - git clone https://github.com/KiraCore/sekai.git -b $SEKAI_BRANCH && \ - cd ./sekai && chmod -R 777 ./scripts && make proto-gen && \ - make install && echo "SUCCESS installed sekaid $(sekaid version)" || echo "FAILED" -``` +For the most up to date documentation please visit [docs.kira.network](https://docs.kira.network/) -## Signatures +## Quick Installation Guide -All files in KIRA repositories are always signed with [cosign](https://github.com/sigstore/cosign/releases), you should NEVER install anything on your machine unless you verified integrity of the files! +### Required Tools -Cosign requires simple initial setup of the signer keys described more precisely [here](https://dev.to/n3wt0n/sign-your-container-images-with-cosign-github-actions-and-github-container-registry-3mni) - -```bash -# install cosign -COSIGN_VERSION="v1.7.2" && \ -if [[ "$(uname -m)" == *"ar"* ]] ; then ARCH="arm64"; else ARCH="amd64" ; fi && echo $ARCH && \ -PLATFORM=$(uname) && FILE=$(echo "cosign-${PLATFORM}-${ARCH}" | tr '[:upper:]' '[:lower:]') && \ - wget https://github.com/sigstore/cosign/releases/download/${COSIGN_VERSION}/$FILE && chmod +x -v ./$FILE && \ - mv -fv ./$FILE /usr/local/bin/cosign && cosign version - -# save KIRA public cosign key -KEYS_DIR="/usr/keys" && KIRA_COSIGN_PUB="${KEYS_DIR}/kira-cosign.pub" && \ -mkdir -p $KEYS_DIR && cat > ./cosign.pub << EOL ------BEGIN PUBLIC KEY----- -MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE/IrzBQYeMwvKa44/DF/HB7XDpnE+ -f+mU9F/Qbfq25bBWV2+NlYMJv3KvKHNtu3Jknt6yizZjUV4b8WGfKBzFYw== ------END PUBLIC KEY----- -EOL - -# download desired files and the corresponding .sig file from: https://github.com/KiraCore/tools/releases - -# verify signature of downloaded files -cosign verify-blob --key=$KIRA_COSIGN_PUB--signature=./.sig ./ -``` +KIRA requires the installation of two tools, [Cosign](https://docs.kira.network/docs/cosign) and [Bash-utils](https://docs.kira.network/docs/bash-utils), in order to secure the network and simplify the execution of various tasks. +All files in KIRA repositories are always signed with cosign, you should NEVER install anything on your machine unless you verified integrity of the files! -## Install bash-utils +### Installation -Bash-utils is a KIRA tool that helps to simplify shell scripts and various bash commands that you might need to run +Login as admin & load environment variables. -``` -# Install bash-utils.sh KIRA tool to make downloads faster and easier -TOOLS_VERSION="v0.0.12.4" && mkdir -p /usr/keys && FILE_NAME="bash-utils.sh" && \ - if [ -z "$KIRA_COSIGN_PUB" ] ; then KIRA_COSIGN_PUB=/usr/keys/kira-cosign.pub ; fi && \ - echo -e "-----BEGIN PUBLIC KEY-----\nMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE/IrzBQYeMwvKa44/DF/HB7XDpnE+\nf+mU9F/Qbfq25bBWV2+NlYMJv3KvKHNtu3Jknt6yizZjUV4b8WGfKBzFYw==\n-----END PUBLIC KEY-----" > $KIRA_COSIGN_PUB && \ - wget "https://github.com/KiraCore/tools/releases/download/$TOOLS_VERSION/${FILE_NAME}" -O ./$FILE_NAME && \ - wget "https://github.com/KiraCore/tools/releases/download/$TOOLS_VERSION/${FILE_NAME}.sig" -O ./${FILE_NAME}.sig && \ - cosign verify-blob --key="$KIRA_COSIGN_PUB" --signature=./${FILE_NAME}.sig ./$FILE_NAME && \ - chmod -v 555 ./$FILE_NAME && ./$FILE_NAME bashUtilsSetup "/var/kiraglob" && . /etc/profile && \ - echoInfo "Installed bash-utils $(bash-utils bashUtilsVersion)" -``` +sudo -s -## Quick setup from Releases +Set desired SEKAI release version and binaries repo as env variables within `/etc/profile` (with `bash-utils` or manually). Sourcing `/etc/profile` is necessary. +Check latest SEKAI release's version [here](https://github.com/KiraCore/sekai/releases). ```bash -# TBD +setGlobEnv SEKAI_VERSION "v0.3.39" && \ +setGlobEnv SEKAI_REPO "$HOME/sekai" && \ +setGlobEnv NETWORK_NAME "test" && \ +setGlobEnv SEKAID_HOME "~/.sekaid-$NETWORK_NAME" && \ +loadGlobEnvs ``` -## Set environment variables +Clone repository and install -```sh -sh env.sh +```bash +rm -rf $SEKAI_REPO && rm -fr $GOBIN/sekaid && mkdir $SEKAI_REPO && cd $SEKAI_REPO && \ +git clone https://github.com/KiraCore/sekai.git -b $SEKAI_VERSION $SEKAI_REPO && \ +chmod -R 777 ./scripts && make install && \ +echo "SUCCESS installed sekaid $(sekaid version)" || echo "FAILED" ``` -# Get version info - -[scripts/commands/version.sh](scripts/commands/version.sh) - -# Adding more validators - -[scripts/commands/adding-validators.sh](scripts/commands/adding-validators.sh) - -## Set ChangeTxFee permission - -[scripts/commands/set-permission.sh](scripts/commands/set-permission.sh) - -## Set network properties - -[scripts/commands/set-network-properties.sh](scripts/commands/set-network-properties.sh) - -## Set Execution Fee - -[scripts/commands/set-execution-fee.sh](scripts/commands/set-execution-fee.sh) - -## Upsert token rates - -[scripts/commands/upsert-token-rates.sh](scripts/commands/upsert-token-rates.sh) - -## Upsert token alias - -[scripts/commands/upsert-token-alias.sh](scripts/commands/upsert-token-alias.sh) - -# Fee payment in foreign currency - -[scripts/commands/foreign-fee-payments.sh](scripts/commands/foreign-fee-payments.sh) - -# Fee payment in foreign currency returning failure - execution fee in foreign currency - -[scripts/commands/foreign-fee-payments-failure-return.sh](scripts/commands/foreign-fee-payments-failure-return.sh) - -## Query permission of an address - -[scripts/commands/query-permission.sh](scripts/commands/query-permission.sh) - -## Query network properties - -[scripts/commands/query-network-properties.sh](scripts/commands/query-network-properties.sh) +Verify successful installation -## Query execution fee - -[scripts/commands/query-execution-fee.sh](scripts/commands/query-execution-fee.sh) - -# Query token alias - -[scripts/commands/query-token-alias.sh](scripts/commands/query-token-alias.sh) - -# Query token rate - -[scripts/commands/query-token-rate.sh](scripts/commands/query-token-rate.sh) - -# Query validator account - -[scripts/commands/query-validator.sh](scripts/commands/query-validator.sh) - -# Query for current frozen / unfronzen tokens - -**Notes**: these values are valid only when specific network property is enabled -[scripts/commands/query-frozen-token.sh](scripts/commands/query-frozen-token.sh) - -# Query poor network messages - -[scripts/commands/query-poor-network-messages.sh](scripts/commands/query-poor-network-messages.sh) - -# Query signing infos per validator's consensus address - -[scripts/commands/query-signing-infos.sh](scripts/commands/query-signing-infos.sh) - -# Common commands for governance process - -[scripts/commands/governance/common.sh](scripts/commands/governance/common.sh) - -### Set permission via governance process - -[scripts/commands/governance/assign-permission.sh](scripts/commands/governance/assign-permission.sh) - -## Upsert token alias via governance process - -[scripts/commands/governance/upsert-token-alias.sh](scripts/commands/governance/upsert-token-alias.sh) - -## Upsert token rates via governance process - -[scripts/commands/governance/upsert-token-rates.sh](scripts/commands/governance/upsert-token-rates.sh) - -# Commands for poor network management via governance process - -[scripts/commands/governance/poor-network-messages.sh](scripts/commands/governance/poor-network-messages.sh) - -# Freeze / unfreeze tokens via governance process - -[scripts/commands/governance/token-freeze.sh](scripts/commands/governance/token-freeze.sh) +```bash +sekaid version --long +``` -# Set network property proposal via governance process +## SEKAI Modules -[scripts/commands/governance/set-network-property.sh](scripts/commands/governance/set-network-property.sh) +### Consensus -# Set application upgrade proposal via governance process +- [staking](https://github.com/KiraCore/sekai/tree/master/x/staking) +- [slashing](https://github.com/KiraCore/sekai/tree/master/x/slashing) +- [evidence](https://github.com/KiraCore/sekai/tree/master/x/evidence) +- [distributor](https://github.com/KiraCore/sekai/tree/master/x/distributor) -[scripts/commands/governance/upgrade-plan.sh](scripts/commands/governance/upgrade-plan.sh) +### Basic modules -Export the status of chain before halt (should kill the daemon process at the time of genesis export) -[scripts/commands/export-state.sh](scripts/commands/export-state.sh) +- [spending](https://github.com/KiraCore/sekai/tree/master/x/spending) +- [tokens](https://github.com/KiraCore/sekai/tree/master/x/tokens) +- [ubi](https://github.com/KiraCore/sekai/tree/master/x/ubi) -The script for creating new chain from exported state should be written or manual edition process is required. -`ChainId` should be modified in this process. +### Liquid Staking -For now, upgrade process requires manual conversion from old genesis to new genesis. -At each time of upgrade, genesis upgrade command will be built and infra could run the command like `sekaid genesis-migrate` +- [multistaking](https://github.com/KiraCore/sekai/tree/master/x/multistaking) -Note: state export command is not exporting the upgrade plan and if all validators run with exported genesis with the previous binary, consensus failure won't happen. +### Derivatives -# Identity registrar +- [basket](https://github.com/KiraCore/sekai/tree/master/x/basket) +- [collectives](https://github.com/KiraCore/sekai/tree/master/x/collectives) -[scripts/commands/identity-registrar.sh](scripts/commands/identity-registrar.sh) +### Governance -# Unjail via governance process +- [gov](https://github.com/KiraCore/sekai/tree/master/x/gov) -Modify genesis json to have jailed validator for Unjail testing -Add jailed validator key to kms. +### Layer2 -```sh - sekaid keys add jailed_validator --keyring-backend=test --home=$HOME/.sekaid --recover - "dish rather zoo connect cross inhale security utility occur spell price cute one catalog coconut sort shuffle palm crop surface label foster slender inherit" -``` +- [layer2](https://github.com/KiraCore/sekai/tree/master/x/layer2) -[scripts/commands/governance/unjail-validator.sh](scripts/commands/governance/unjail-validator.sh) +### Fees -# New genesis file generation process from exported version +- [feeprocessing](https://github.com/KiraCore/sekai/tree/master/x/feeprocessing) -In order to manually generate new genesis file when the hard fork is activated, following steps should be taken: +### Utilities & Upgrade -1. Export current genesis, e.g: sekaid export --home= -2. Change chain-id to new_chain_id as indicated by the upgrade plan -3. Replace current upgrade plan in the app_state.upgrade with next plan and set next plan to null +- [custody](https://github.com/KiraCore/sekai/tree/master/x/custody) +- [recovery](https://github.com/KiraCore/sekai/tree/master/x/recovery) +- [genutil](https://github.com/KiraCore/sekai/tree/master/x/genutil) +- [upgrade](https://github.com/KiraCore/sekai/tree/master/x/upgrade) -Using a command it can be done in this way. +## Contributing -1. sekaid export > exported-genesis.json -2. sekaid new-genesis-from-exported exported-genesis.json new-genesis.json --json-minimize=true +Check out [contributing.md](./CONTRIBUTING.md) for our guidelines & policies for how we develop the Kira chain. Thank you to all those who have contributed! diff --git a/RELEASE.md b/RELEASE.md index ec2467c46..14ddf3b3b 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -1,3 +1,3 @@ Features: -- Add flag for filtering only required modules for migration #630 +- Fix legacy tx signing diff --git a/app/ante/ante.go b/app/ante/ante.go index 3ced16cc4..40d97ef61 100644 --- a/app/ante/ante.go +++ b/app/ante/ante.go @@ -7,6 +7,7 @@ import ( bridgetypes "github.com/KiraCore/sekai/x/bridge/types" "time" + errorsmod "cosmossdk.io/errors" kiratypes "github.com/KiraCore/sekai/types" bridgekeeper "github.com/KiraCore/sekai/x/bridge/keeper" custodykeeper "github.com/KiraCore/sekai/x/custody/keeper" @@ -16,6 +17,7 @@ import ( customgovkeeper "github.com/KiraCore/sekai/x/gov/keeper" customstakingkeeper "github.com/KiraCore/sekai/x/staking/keeper" tokenskeeper "github.com/KiraCore/sekai/x/tokens/keeper" + codectypes "github.com/cosmos/cosmos-sdk/codec/types" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" "github.com/cosmos/cosmos-sdk/x/auth/ante" @@ -42,6 +44,7 @@ func NewAnteHandler( sigGasConsumer ante.SignatureVerificationGasConsumer, signModeHandler signing.SignModeHandler, txFeeChecker ante.TxFeeChecker, + interfaceRegistry codectypes.InterfaceRegistry, ) sdk.AnteHandler { return sdk.ChainAnteDecorators( ante.NewSetUpContextDecorator(), // outermost AnteDecorator. SetUpContext must be called first @@ -55,7 +58,7 @@ func NewAnteHandler( ante.NewConsumeGasForTxSizeDecorator(ak), // custom fee range validator NewValidateFeeRangeDecorator(sk, cgk, tk, ak), - ante.NewSetPubKeyDecorator(ak), // SetPubKeyDecorator must be called before all signature verification decorators + NewSetPubKeyDecorator(ak), // SetPubKeyDecorator must be called before all signature verification decorators ante.NewValidateSigCountDecorator(ak), ante.NewDeductFeeDecorator(ak, bk, feegrantKeeper, txFeeChecker), // poor network management decorator @@ -64,7 +67,7 @@ func NewAnteHandler( // custom execution fee consume decorator NewExecutionFeeRegistrationDecorator(ak, cgk, fk), ante.NewSigGasConsumeDecorator(ak, sigGasConsumer), - ante.NewSigVerificationDecorator(ak, signModeHandler), + NewSigVerificationDecorator(ak, signModeHandler, interfaceRegistry), ante.NewIncrementSequenceDecorator(ak), ) } @@ -98,7 +101,7 @@ func (bd BridgeDecorator) AnteHandle(ctx sdk.Context, tx sdk.Tx, simulate bool, } if msg.Addr.String() != properties.BridgeAddress { - return ctx, sdkerrors.Wrap(bridgetypes.ErrWrongBridgeAddr, "Bridge module") + return ctx, sdkerrors.Wrap(bridgetypes.ErrWrongBridgeAddr, "Not valid bridge sender") } } } @@ -121,7 +124,7 @@ func NewCustodyDecorator(ck custodykeeper.Keeper, gk customgovkeeper.Keeper) Cus func (cd CustodyDecorator) AnteHandle(ctx sdk.Context, tx sdk.Tx, simulate bool, next sdk.AnteHandler) (newCtx sdk.Context, err error) { feeTx, ok := tx.(sdk.FeeTx) if !ok { - return ctx, sdkerrors.Wrap(sdkerrors.ErrTxDecode, "invalid transaction type") + return ctx, errorsmod.Wrap(sdkerrors.ErrTxDecode, "invalid transaction type") } for _, msg := range feeTx.GetMsgs() { @@ -133,126 +136,126 @@ func (cd CustodyDecorator) AnteHandle(ctx sdk.Context, tx sdk.Tx, simulate bool, { msg, ok := msg.(*custodytypes.MsgCreateCustodyRecord) if !ok { - return ctx, sdkerrors.Wrap(sdkerrors.ErrInvalidType, "Not a MsgCreateCustodyRecord") + return ctx, errorsmod.Wrap(sdkerrors.ErrInvalidType, "Not a MsgCreateCustodyRecord") } hash := sha256.Sum256([]byte(msg.OldKey)) hashString := hex.EncodeToString(hash[:]) if msg.TargetAddress != "" && msg.TargetAddress != settings.NextController { - return ctx, sdkerrors.Wrap(custodytypes.ErrWrongTargetAddr, "Custody module") + return ctx, errorsmod.Wrap(custodytypes.ErrWrongTargetAddr, "Custody module") } if hashString != settings.Key { - return ctx, sdkerrors.Wrap(custodytypes.ErrWrongKey, "Custody module") + return ctx, errorsmod.Wrap(custodytypes.ErrWrongKey, "Custody module") } } case kiratypes.MsgTypeAddToCustodyWhiteList: { msg, ok := msg.(*custodytypes.MsgAddToCustodyWhiteList) if !ok { - return ctx, sdkerrors.Wrap(sdkerrors.ErrInvalidType, "Not a MsgCreateCustodyRecord") + return ctx, errorsmod.Wrap(sdkerrors.ErrInvalidType, "Not a MsgCreateCustodyRecord") } hash := sha256.Sum256([]byte(msg.OldKey)) hashString := hex.EncodeToString(hash[:]) if msg.TargetAddress != "" && msg.TargetAddress != settings.NextController { - return ctx, sdkerrors.Wrap(custodytypes.ErrWrongTargetAddr, "Custody module") + return ctx, errorsmod.Wrap(custodytypes.ErrWrongTargetAddr, "Custody module") } if hashString != settings.Key { - return ctx, sdkerrors.Wrap(custodytypes.ErrWrongKey, "Custody module") + return ctx, errorsmod.Wrap(custodytypes.ErrWrongKey, "Custody module") } } case kiratypes.MsgTypeAddToCustodyCustodians: { msg, ok := msg.(*custodytypes.MsgAddToCustodyCustodians) if !ok { - return ctx, sdkerrors.Wrap(sdkerrors.ErrInvalidType, "Not a MsgCreateCustodyRecord") + return ctx, errorsmod.Wrap(sdkerrors.ErrInvalidType, "Not a MsgCreateCustodyRecord") } hash := sha256.Sum256([]byte(msg.OldKey)) hashString := hex.EncodeToString(hash[:]) if msg.TargetAddress != "" && msg.TargetAddress != settings.NextController { - return ctx, sdkerrors.Wrap(custodytypes.ErrWrongTargetAddr, "Custody module") + return ctx, errorsmod.Wrap(custodytypes.ErrWrongTargetAddr, "Custody module") } if hashString != settings.Key { - return ctx, sdkerrors.Wrap(custodytypes.ErrWrongKey, "Custody module") + return ctx, errorsmod.Wrap(custodytypes.ErrWrongKey, "Custody module") } } case kiratypes.MsgTypeRemoveFromCustodyCustodians: { msg, ok := msg.(*custodytypes.MsgRemoveFromCustodyCustodians) if !ok { - return ctx, sdkerrors.Wrap(sdkerrors.ErrInvalidType, "Not a MsgCreateCustodyRecord") + return ctx, errorsmod.Wrap(sdkerrors.ErrInvalidType, "Not a MsgCreateCustodyRecord") } hash := sha256.Sum256([]byte(msg.OldKey)) hashString := hex.EncodeToString(hash[:]) if msg.TargetAddress != "" && msg.TargetAddress != settings.NextController { - return ctx, sdkerrors.Wrap(custodytypes.ErrWrongTargetAddr, "Custody module") + return ctx, errorsmod.Wrap(custodytypes.ErrWrongTargetAddr, "Custody module") } if hashString != settings.Key { - return ctx, sdkerrors.Wrap(custodytypes.ErrWrongKey, "Custody module") + return ctx, errorsmod.Wrap(custodytypes.ErrWrongKey, "Custody module") } } case kiratypes.MsgTypeDropCustodyCustodians: { msg, ok := msg.(*custodytypes.MsgDropCustodyCustodians) if !ok { - return ctx, sdkerrors.Wrap(sdkerrors.ErrInvalidType, "Not a MsgCreateCustodyRecord") + return ctx, errorsmod.Wrap(sdkerrors.ErrInvalidType, "Not a MsgCreateCustodyRecord") } hash := sha256.Sum256([]byte(msg.OldKey)) hashString := hex.EncodeToString(hash[:]) if msg.TargetAddress != "" && msg.TargetAddress != settings.NextController { - return ctx, sdkerrors.Wrap(custodytypes.ErrWrongTargetAddr, "Custody module") + return ctx, errorsmod.Wrap(custodytypes.ErrWrongTargetAddr, "Custody module") } if hashString != settings.Key { - return ctx, sdkerrors.Wrap(custodytypes.ErrWrongKey, "Custody module") + return ctx, errorsmod.Wrap(custodytypes.ErrWrongKey, "Custody module") } } case kiratypes.MsgTypeRemoveFromCustodyWhiteList: { msg, ok := msg.(*custodytypes.MsgRemoveFromCustodyWhiteList) if !ok { - return ctx, sdkerrors.Wrap(sdkerrors.ErrInvalidType, "Not a MsgCreateCustodyRecord") + return ctx, errorsmod.Wrap(sdkerrors.ErrInvalidType, "Not a MsgCreateCustodyRecord") } hash := sha256.Sum256([]byte(msg.OldKey)) hashString := hex.EncodeToString(hash[:]) if msg.TargetAddress != "" && msg.TargetAddress != settings.NextController { - return ctx, sdkerrors.Wrap(custodytypes.ErrWrongTargetAddr, "Custody module") + return ctx, errorsmod.Wrap(custodytypes.ErrWrongTargetAddr, "Custody module") } if hashString != settings.Key { - return ctx, sdkerrors.Wrap(custodytypes.ErrWrongKey, "Custody module") + return ctx, errorsmod.Wrap(custodytypes.ErrWrongKey, "Custody module") } } case kiratypes.MsgTypeDropCustodyWhiteList: { msg, ok := msg.(*custodytypes.MsgDropCustodyWhiteList) if !ok { - return ctx, sdkerrors.Wrap(sdkerrors.ErrInvalidType, "Not a MsgCreateCustodyRecord") + return ctx, errorsmod.Wrap(sdkerrors.ErrInvalidType, "Not a MsgCreateCustodyRecord") } hash := sha256.Sum256([]byte(msg.OldKey)) hashString := hex.EncodeToString(hash[:]) if msg.TargetAddress != "" && msg.TargetAddress != settings.NextController { - return ctx, sdkerrors.Wrap(custodytypes.ErrWrongTargetAddr, "Custody module") + return ctx, errorsmod.Wrap(custodytypes.ErrWrongTargetAddr, "Custody module") } if hashString != settings.Key { - return ctx, sdkerrors.Wrap(custodytypes.ErrWrongKey, "Custody module") + return ctx, errorsmod.Wrap(custodytypes.ErrWrongKey, "Custody module") } } case kiratypes.MsgTypeSend: @@ -263,15 +266,15 @@ func (cd CustodyDecorator) AnteHandle(ctx sdk.Context, tx sdk.Tx, simulate bool, count := uint64(len(custodians.Addresses)) if len(msg.Reward) < 1 { - return ctx, sdkerrors.Wrap(custodytypes.ErrNotEnoughReward, "no reward") + return ctx, errorsmod.Wrap(custodytypes.ErrNotEnoughReward, "no reward") } if msg.Reward[0].Amount.Uint64() < properties.MinCustodyReward*count { - return ctx, sdkerrors.Wrap(custodytypes.ErrNotEnoughReward, "to small reward") + return ctx, errorsmod.Wrap(custodytypes.ErrNotEnoughReward, "to small reward") } if msg.Reward[0].Denom != cd.ck.DefaultDenom(ctx) { - return ctx, sdkerrors.Wrap(custodytypes.ErrNotEnoughReward, "wrong reward denom") + return ctx, errorsmod.Wrap(custodytypes.ErrNotEnoughReward, "wrong reward denom") } } } @@ -285,7 +288,7 @@ func (cd CustodyDecorator) AnteHandle(ctx sdk.Context, tx sdk.Tx, simulate bool, custodians := cd.ck.GetCustodyCustodiansByAddress(ctx, msg.GetSigners()[0]) if len(custodians.Addresses) > 0 { - return ctx, sdkerrors.Wrap(sdkerrors.ErrConflict, "Custody module is enabled. Please use custody send instead.") + return ctx, errorsmod.Wrap(sdkerrors.ErrConflict, "Custody module is enabled. Please use custody send instead.") } } @@ -357,7 +360,7 @@ func NewValidateFeeRangeDecorator( func (svd ValidateFeeRangeDecorator) AnteHandle(ctx sdk.Context, tx sdk.Tx, simulate bool, next sdk.AnteHandler) (newCtx sdk.Context, err error) { feeTx, ok := tx.(sdk.FeeTx) if !ok { - return ctx, sdkerrors.Wrap(sdkerrors.ErrTxDecode, "Tx must be a FeeTx") + return ctx, errorsmod.Wrap(sdkerrors.ErrTxDecode, "Tx must be a FeeTx") } properties := svd.cgk.GetNetworkProperties(ctx) @@ -367,15 +370,15 @@ func (svd ValidateFeeRangeDecorator) AnteHandle(ctx sdk.Context, tx sdk.Tx, simu feeCoins := feeTx.GetFee() tokensBlackWhite := svd.tk.GetTokenBlackWhites(ctx) for _, feeCoin := range feeCoins { - rate := svd.tk.GetTokenRate(ctx, feeCoin.Denom) + rate := svd.tk.GetTokenInfo(ctx, feeCoin.Denom) if !properties.EnableForeignFeePayments && feeCoin.Denom != defaultDenom { - return ctx, sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, fmt.Sprintf("foreign fee payments is disabled by governance")) + return ctx, errorsmod.Wrap(sdkerrors.ErrInvalidRequest, fmt.Sprintf("foreign fee payments is disabled by governance")) } - if rate == nil || !rate.FeePayments { - return ctx, sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, fmt.Sprintf("currency you are trying to use was not whitelisted as fee payment")) + if rate == nil || !rate.FeeEnabled { + return ctx, errorsmod.Wrap(sdkerrors.ErrInvalidRequest, fmt.Sprintf("currency you are trying to use was not whitelisted as fee payment")) } if tokensBlackWhite.IsFrozen(feeCoin.Denom, defaultDenom, properties.EnableTokenBlacklist, properties.EnableTokenWhitelist) { - return ctx, sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, fmt.Sprintf("currency you are trying to use as fee is frozen")) + return ctx, errorsmod.Wrap(sdkerrors.ErrInvalidRequest, fmt.Sprintf("currency you are trying to use as fee is frozen")) } feeAmount = feeAmount.Add(sdk.NewDecFromInt(feeCoin.Amount).Mul(rate.FeeRate)) } @@ -394,11 +397,11 @@ func (svd ValidateFeeRangeDecorator) AnteHandle(ctx sdk.Context, tx sdk.Tx, simu } if feeAmount.LT(sdk.NewDec(int64(properties.MinTxFee))) || feeAmount.GT(sdk.NewDec(int64(properties.MaxTxFee))) { - return ctx, sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, fmt.Sprintf("fee %+v(%d) is out of range [%d, %d]%s", feeTx.GetFee(), feeAmount.RoundInt().Int64(), properties.MinTxFee, properties.MaxTxFee, defaultDenom)) + return ctx, errorsmod.Wrap(sdkerrors.ErrInvalidRequest, fmt.Sprintf("fee %+v(%d) is out of range [%d, %d]%s", feeTx.GetFee(), feeAmount.RoundInt().Int64(), properties.MinTxFee, properties.MaxTxFee, defaultDenom)) } if feeAmount.LT(sdk.NewDec(int64(executionMaxFee))) { - return ctx, sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, fmt.Sprintf("fee %+v(%d) is less than max execution fee %d%s", feeTx.GetFee(), feeAmount.RoundInt().Int64(), executionMaxFee, defaultDenom)) + return ctx, errorsmod.Wrap(sdkerrors.ErrInvalidRequest, fmt.Sprintf("fee %+v(%d) is less than max execution fee %d%s", feeTx.GetFee(), feeAmount.RoundInt().Int64(), executionMaxFee, defaultDenom)) } return next(ctx, tx, simulate) @@ -424,7 +427,7 @@ func NewExecutionFeeRegistrationDecorator(ak keeper.AccountKeeper, cgk customgov func (sgcd ExecutionFeeRegistrationDecorator) AnteHandle(ctx sdk.Context, tx sdk.Tx, simulate bool, next sdk.AnteHandler) (newCtx sdk.Context, err error) { sigTx, ok := tx.(sdk.FeeTx) if !ok { - return ctx, sdkerrors.Wrap(sdkerrors.ErrTxDecode, "invalid transaction type") + return ctx, errorsmod.Wrap(sdkerrors.ErrTxDecode, "invalid transaction type") } // execution fee consume gas @@ -467,7 +470,7 @@ func findString(a []string, x string) int { func (pnmd PoorNetworkManagementDecorator) AnteHandle(ctx sdk.Context, tx sdk.Tx, simulate bool, next sdk.AnteHandler) (newCtx sdk.Context, err error) { sigTx, ok := tx.(sdk.FeeTx) if !ok { - return ctx, sdkerrors.Wrap(sdkerrors.ErrTxDecode, "invalid transaction type") + return ctx, errorsmod.Wrap(sdkerrors.ErrTxDecode, "invalid transaction type") } // if not poor network, skip this process @@ -481,10 +484,10 @@ func (pnmd PoorNetworkManagementDecorator) AnteHandle(ctx sdk.Context, tx sdk.Tx // on poor network, we introduce POOR_NETWORK_MAX_BANK_TX_SEND network property to limit transaction send amount msg := msg.(*bank.MsgSend) if len(msg.Amount) > 1 || msg.Amount[0].Denom != pnmd.csk.DefaultDenom(ctx) { - return ctx, sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, "only bond denom is allowed on poor network") + return ctx, errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "only bond denom is allowed on poor network") } if msg.Amount[0].Amount.Uint64() > pnmd.cgk.GetNetworkProperties(ctx).PoorNetworkMaxBankSend { - return ctx, sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, "only restricted amount send is allowed on poor network") + return ctx, errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "only restricted amount send is allowed on poor network") } // TODO: we could do restriction to send only when target account does not exist on chain yet for more restriction return next(ctx, tx, simulate) @@ -492,7 +495,7 @@ func (pnmd PoorNetworkManagementDecorator) AnteHandle(ctx sdk.Context, tx sdk.Tx if findString(pnmsgs.Messages, kiratypes.MsgType(msg)) >= 0 { return next(ctx, tx, simulate) } - return ctx, sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, "invalid transaction type on poor network") + return ctx, errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "invalid transaction type on poor network") } return next(ctx, tx, simulate) @@ -518,7 +521,7 @@ func NewBlackWhiteTokensCheckDecorator(cgk customgovkeeper.Keeper, csk customsta func (pnmd BlackWhiteTokensCheckDecorator) AnteHandle(ctx sdk.Context, tx sdk.Tx, simulate bool, next sdk.AnteHandler) (newCtx sdk.Context, err error) { sigTx, ok := tx.(sdk.FeeTx) if !ok { - return ctx, sdkerrors.Wrap(sdkerrors.ErrTxDecode, "invalid transaction type") + return ctx, errorsmod.Wrap(sdkerrors.ErrTxDecode, "invalid transaction type") } defaultDenom := pnmd.csk.DefaultDenom(ctx) @@ -529,7 +532,7 @@ func (pnmd BlackWhiteTokensCheckDecorator) AnteHandle(ctx sdk.Context, tx sdk.Tx msg := msg.(*bank.MsgSend) for _, amt := range msg.Amount { if tokensBlackWhite.IsFrozen(amt.Denom, defaultDenom, properties.EnableTokenBlacklist, properties.EnableTokenWhitelist) { - return ctx, sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, "token is frozen") + return ctx, errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "token is frozen") } } } diff --git a/app/ante/ante_test.go b/app/ante/ante_test.go index 8d09f927e..31109cb9a 100644 --- a/app/ante/ante_test.go +++ b/app/ante/ante_test.go @@ -4,6 +4,7 @@ import ( "errors" "fmt" + "cosmossdk.io/math" customante "github.com/KiraCore/sekai/app/ante" "github.com/KiraCore/sekai/types" govtypes "github.com/KiraCore/sekai/x/gov/types" @@ -33,11 +34,12 @@ func (suite *AnteTestSuite) TestCustomAnteHandlerExecutionFee() { Timeout: 0, DefaultParameters: 0, }) - suite.app.CustomGovKeeper.SetNetworkProperties(suite.ctx, &govtypes.NetworkProperties{ - MinTxFee: 2, - MaxTxFee: 10000, - EnableForeignFeePayments: true, - }) + properties := suite.app.CustomGovKeeper.GetNetworkProperties(suite.ctx) + properties.MinTxFee = 2 + properties.MaxTxFee = 10000 + properties.EnableForeignFeePayments = true + err := suite.app.CustomGovKeeper.SetNetworkProperties(suite.ctx, properties) + suite.Require().NoError(err) // Same data for every test cases accounts := suite.CreateTestAccounts(5) @@ -59,11 +61,7 @@ func (suite *AnteTestSuite) TestCustomAnteHandlerExecutionFee() { "insufficient max execution fee set", func() ([]sdk.Msg, []cryptotypes.PrivKey, []uint64, []uint64, sdk.Coins) { msgs := []sdk.Msg{ - govtypes.NewMsgSetNetworkProperties(accounts[0].acc.GetAddress(), &govtypes.NetworkProperties{ - MinTxFee: 2, - MaxTxFee: 10000, - EnableForeignFeePayments: true, - }), + govtypes.NewMsgSetNetworkProperties(accounts[0].acc.GetAddress(), properties), } return msgs, privs[0:1], accNums[0:1], []uint64{0}, defaultFee }, @@ -75,11 +73,7 @@ func (suite *AnteTestSuite) TestCustomAnteHandlerExecutionFee() { "execution failure fee deduction", func() ([]sdk.Msg, []cryptotypes.PrivKey, []uint64, []uint64, sdk.Coins) { msgs := []sdk.Msg{ - govtypes.NewMsgSetNetworkProperties(accounts[1].acc.GetAddress(), &govtypes.NetworkProperties{ - MinTxFee: 2, - MaxTxFee: 10000, - EnableForeignFeePayments: true, - }), + govtypes.NewMsgSetNetworkProperties(accounts[1].acc.GetAddress(), properties), } return msgs, privs[1:2], accNums[1:2], []uint64{0}, sdk.NewCoins(sdk.NewInt64Coin("ukex", 10000)) }, @@ -147,11 +141,12 @@ func (suite *AnteTestSuite) TestCustomAnteHandlerExecutionFee() { { "foreign currency as fee payment when EnableForeignFeePayments is enabled by governance", func() ([]sdk.Msg, []cryptotypes.PrivKey, []uint64, []uint64, sdk.Coins) { - suite.app.CustomGovKeeper.SetNetworkProperties(suite.ctx, &govtypes.NetworkProperties{ - MinTxFee: 2, - MaxTxFee: 10000, - EnableForeignFeePayments: true, - }) + properties := suite.app.CustomGovKeeper.GetNetworkProperties(suite.ctx) + properties.MinTxFee = 2 + properties.MaxTxFee = 10000 + properties.EnableForeignFeePayments = true + err := suite.app.CustomGovKeeper.SetNetworkProperties(suite.ctx, properties) + suite.Require().NoError(err) msgs := []sdk.Msg{ govtypes.NewMsgSetExecutionFee( types.MsgTypeSetNetworkProperties, @@ -171,11 +166,12 @@ func (suite *AnteTestSuite) TestCustomAnteHandlerExecutionFee() { { "foreign currency as fee payment when EnableForeignFeePayments is disabled by governance", func() ([]sdk.Msg, []cryptotypes.PrivKey, []uint64, []uint64, sdk.Coins) { - suite.app.CustomGovKeeper.SetNetworkProperties(suite.ctx, &govtypes.NetworkProperties{ - MinTxFee: 2, - MaxTxFee: 10000, - EnableForeignFeePayments: false, - }) + properties := suite.app.CustomGovKeeper.GetNetworkProperties(suite.ctx) + properties.MinTxFee = 2 + properties.MaxTxFee = 10000 + properties.EnableForeignFeePayments = false + err := suite.app.CustomGovKeeper.SetNetworkProperties(suite.ctx, properties) + suite.Require().NoError(err) msgs := []sdk.Msg{ govtypes.NewMsgSetExecutionFee( types.MsgTypeSetNetworkProperties, @@ -195,12 +191,14 @@ func (suite *AnteTestSuite) TestCustomAnteHandlerExecutionFee() { { "try sending non bond denom coins on poor network", func() ([]sdk.Msg, []cryptotypes.PrivKey, []uint64, []uint64, sdk.Coins) { - suite.app.CustomGovKeeper.SetNetworkProperties(suite.ctx, &govtypes.NetworkProperties{ - MinTxFee: 2, - MaxTxFee: 10000, - EnableForeignFeePayments: true, - MinValidators: 100, - }) + properties := suite.app.CustomGovKeeper.GetNetworkProperties(suite.ctx) + properties.MinTxFee = 2 + properties.MaxTxFee = 10000 + properties.EnableForeignFeePayments = true + properties.MinValidators = 100 + err := suite.app.CustomGovKeeper.SetNetworkProperties(suite.ctx, properties) + suite.Require().NoError(err) + msgs := []sdk.Msg{ bank.NewMsgSend( accounts[4].acc.GetAddress(), @@ -217,13 +215,15 @@ func (suite *AnteTestSuite) TestCustomAnteHandlerExecutionFee() { { "try sending more bond denom than restricted amount on poor network", func() ([]sdk.Msg, []cryptotypes.PrivKey, []uint64, []uint64, sdk.Coins) { - suite.app.CustomGovKeeper.SetNetworkProperties(suite.ctx, &govtypes.NetworkProperties{ - MinTxFee: 2, - MaxTxFee: 10000, - EnableForeignFeePayments: true, - MinValidators: 100, - PoorNetworkMaxBankSend: 1000, - }) + properties := suite.app.CustomGovKeeper.GetNetworkProperties(suite.ctx) + properties.MinTxFee = 2 + properties.MaxTxFee = 10000 + properties.EnableForeignFeePayments = true + properties.MinValidators = 100 + properties.PoorNetworkMaxBankSend = 1000 + err := suite.app.CustomGovKeeper.SetNetworkProperties(suite.ctx, properties) + suite.Require().NoError(err) + msgs := []sdk.Msg{ bank.NewMsgSend( accounts[4].acc.GetAddress(), @@ -240,13 +240,15 @@ func (suite *AnteTestSuite) TestCustomAnteHandlerExecutionFee() { { "try sending lower than restriction amount on poor network", func() ([]sdk.Msg, []cryptotypes.PrivKey, []uint64, []uint64, sdk.Coins) { - suite.app.CustomGovKeeper.SetNetworkProperties(suite.ctx, &govtypes.NetworkProperties{ - MinTxFee: 2, - MaxTxFee: 10000, - EnableForeignFeePayments: true, - MinValidators: 100, - PoorNetworkMaxBankSend: 1000, - }) + properties := suite.app.CustomGovKeeper.GetNetworkProperties(suite.ctx) + properties.MinTxFee = 2 + properties.MaxTxFee = 10000 + properties.EnableForeignFeePayments = true + properties.MinValidators = 100 + properties.PoorNetworkMaxBankSend = 1000 + err := suite.app.CustomGovKeeper.SetNetworkProperties(suite.ctx, properties) + suite.Require().NoError(err) + msgs := []sdk.Msg{ bank.NewMsgSend( accounts[4].acc.GetAddress(), @@ -263,12 +265,14 @@ func (suite *AnteTestSuite) TestCustomAnteHandlerExecutionFee() { { "try sending enabled message on poor network", func() ([]sdk.Msg, []cryptotypes.PrivKey, []uint64, []uint64, sdk.Coins) { - suite.app.CustomGovKeeper.SetNetworkProperties(suite.ctx, &govtypes.NetworkProperties{ - MinTxFee: 2, - MaxTxFee: 10000, - EnableForeignFeePayments: true, - MinValidators: 100, - }) + properties := suite.app.CustomGovKeeper.GetNetworkProperties(suite.ctx) + properties.MinTxFee = 2 + properties.MaxTxFee = 10000 + properties.EnableForeignFeePayments = true + properties.MinValidators = 100 + err := suite.app.CustomGovKeeper.SetNetworkProperties(suite.ctx, properties) + suite.Require().NoError(err) + msgs := []sdk.Msg{ govtypes.NewMsgSetNetworkProperties( accounts[4].acc.GetAddress(), @@ -289,12 +293,14 @@ func (suite *AnteTestSuite) TestCustomAnteHandlerExecutionFee() { { "try sending not enabled message on poor network", func() ([]sdk.Msg, []cryptotypes.PrivKey, []uint64, []uint64, sdk.Coins) { - suite.app.CustomGovKeeper.SetNetworkProperties(suite.ctx, &govtypes.NetworkProperties{ - MinTxFee: 2, - MaxTxFee: 10000, - EnableForeignFeePayments: true, - MinValidators: 100, - }) + properties := suite.app.CustomGovKeeper.GetNetworkProperties(suite.ctx) + properties.MinTxFee = 2 + properties.MaxTxFee = 10000 + properties.EnableForeignFeePayments = true + properties.MinValidators = 100 + err := suite.app.CustomGovKeeper.SetNetworkProperties(suite.ctx, properties) + suite.Require().NoError(err) + msgs := []sdk.Msg{ govtypes.NewMsgSetExecutionFee( types.MsgTypeSetNetworkProperties, @@ -348,14 +354,14 @@ func (suite *AnteTestSuite) TestValidateFeeRangeDecorator() { // Same data for every test cases accounts := suite.CreateTestAccounts(5) - suite.SetBalance(accounts[0].acc.GetAddress(), sdk.NewInt64Coin("ukex", 10000)) - suite.SetBalance(accounts[0].acc.GetAddress(), sdk.NewInt64Coin("frozen", 10000)) - suite.SetBalance(accounts[0].acc.GetAddress(), sdk.NewInt64Coin("nofeetoken", 10000)) - suite.SetBalance(accounts[1].acc.GetAddress(), sdk.NewInt64Coin("ukex", 10000)) - suite.SetBalance(accounts[2].acc.GetAddress(), sdk.NewInt64Coin("ukex", 10000)) + suite.SetBalance(accounts[0].acc.GetAddress(), sdk.NewInt64Coin("ukex", 100000)) + suite.SetBalance(accounts[0].acc.GetAddress(), sdk.NewInt64Coin("frozen", 100000)) + suite.SetBalance(accounts[0].acc.GetAddress(), sdk.NewInt64Coin("nofeetoken", 100000)) + suite.SetBalance(accounts[1].acc.GetAddress(), sdk.NewInt64Coin("ukex", 100000)) + suite.SetBalance(accounts[2].acc.GetAddress(), sdk.NewInt64Coin("ukex", 100000)) suite.SetBalance(accounts[3].acc.GetAddress(), sdk.NewInt64Coin("ukex", 1)) - suite.SetBalance(accounts[4].acc.GetAddress(), sdk.NewInt64Coin("ukex", 10000)) - suite.SetBalance(accounts[4].acc.GetAddress(), sdk.NewInt64Coin("ubtc", 10000)) + suite.SetBalance(accounts[4].acc.GetAddress(), sdk.NewInt64Coin("ukex", 100000)) + suite.SetBalance(accounts[4].acc.GetAddress(), sdk.NewInt64Coin("ubtc", 100000)) gasLimit := testdata.NewTestGasLimit() privs := []cryptotypes.PrivKey{accounts[0].priv, accounts[1].priv, accounts[2].priv, accounts[3].priv, accounts[4].priv} accNums := []uint64{0, 1, 2, 3, 4} @@ -414,14 +420,14 @@ func (suite *AnteTestSuite) TestValidateFeeRangeDecorator() { { "fee out of range for low amount", func() ([]sdk.Msg, []cryptotypes.PrivKey, []uint64, []uint64, sdk.Coins) { - err := suite.app.CustomGovKeeper.SetNetworkProperty(suite.ctx, govtypes.EnableForeignFeePayments, govtypes.NetworkPropertyValue{Value: 0}) + properties := suite.app.CustomGovKeeper.GetNetworkProperties(suite.ctx) + properties.MinTxFee = 2 + properties.MaxTxFee = 10000 + properties.EnableForeignFeePayments = false + err := suite.app.CustomGovKeeper.SetNetworkProperties(suite.ctx, properties) suite.Require().NoError(err) msgs := []sdk.Msg{ - govtypes.NewMsgSetNetworkProperties(accounts[4].acc.GetAddress(), &govtypes.NetworkProperties{ - MinTxFee: 2, - MaxTxFee: 10000, - EnableForeignFeePayments: true, - }), + govtypes.NewMsgSetNetworkProperties(accounts[4].acc.GetAddress(), properties), } return msgs, privs[0:1], accNums[0:1], []uint64{0}, sdk.NewCoins(sdk.NewInt64Coin("ukex", 1)) }, @@ -432,14 +438,14 @@ func (suite *AnteTestSuite) TestValidateFeeRangeDecorator() { { "fee out of range for big amount", func() ([]sdk.Msg, []cryptotypes.PrivKey, []uint64, []uint64, sdk.Coins) { - err := suite.app.CustomGovKeeper.SetNetworkProperty(suite.ctx, govtypes.EnableForeignFeePayments, govtypes.NetworkPropertyValue{Value: 0}) + properties := suite.app.CustomGovKeeper.GetNetworkProperties(suite.ctx) + properties.MinTxFee = 2 + properties.MaxTxFee = 10000 + properties.EnableForeignFeePayments = false + err := suite.app.CustomGovKeeper.SetNetworkProperties(suite.ctx, properties) suite.Require().NoError(err) msgs := []sdk.Msg{ - govtypes.NewMsgSetNetworkProperties(accounts[4].acc.GetAddress(), &govtypes.NetworkProperties{ - MinTxFee: 2, - MaxTxFee: 10000, - EnableForeignFeePayments: true, - }), + govtypes.NewMsgSetNetworkProperties(accounts[4].acc.GetAddress(), properties), } return msgs, privs[0:1], accNums[0:1], []uint64{0}, sdk.NewCoins(sdk.NewInt64Coin("ukex", 10001)) }, @@ -450,7 +456,11 @@ func (suite *AnteTestSuite) TestValidateFeeRangeDecorator() { { "fee should be bigger than max of execution and failure fee", func() ([]sdk.Msg, []cryptotypes.PrivKey, []uint64, []uint64, sdk.Coins) { - err := suite.app.CustomGovKeeper.SetNetworkProperty(suite.ctx, govtypes.EnableForeignFeePayments, govtypes.NetworkPropertyValue{Value: 0}) + properties := suite.app.CustomGovKeeper.GetNetworkProperties(suite.ctx) + properties.MinTxFee = 2 + properties.MaxTxFee = 10000 + properties.EnableForeignFeePayments = false + err := suite.app.CustomGovKeeper.SetNetworkProperties(suite.ctx, properties) suite.Require().NoError(err) msgs := []sdk.Msg{ govtypes.NewMsgSetNetworkProperties(accounts[4].acc.GetAddress(), &govtypes.NetworkProperties{ @@ -482,17 +492,18 @@ func (suite *AnteTestSuite) TestValidateFeeRangeDecorator() { func (suite *AnteTestSuite) TestPoorNetworkManagementDecorator() { suite.SetupTest(false) // reset - // set execution fee for set network properties - suite.app.CustomGovKeeper.SetNetworkProperties(suite.ctx, &govtypes.NetworkProperties{ - MinTxFee: 2, - MaxTxFee: 10000, - EnableForeignFeePayments: true, - EnableTokenBlacklist: true, - EnableTokenWhitelist: false, - MinValidators: 10, - PoorNetworkMaxBankSend: 1000, - }) + properties := suite.app.CustomGovKeeper.GetNetworkProperties(suite.ctx) + properties.MinTxFee = 2 + properties.MaxTxFee = 10000 + properties.EnableForeignFeePayments = true + properties.EnableTokenBlacklist = true + properties.EnableTokenWhitelist = false + properties.MinValidators = 10 + properties.PoorNetworkMaxBankSend = 1000 + err := suite.app.CustomGovKeeper.SetNetworkProperties(suite.ctx, properties) + suite.Require().NoError(err) + // set execution fee for set network properties suite.app.CustomGovKeeper.SetExecutionFee(suite.ctx, govtypes.ExecutionFee{ TransactionType: types.MsgTypeSetNetworkProperties, ExecutionFee: 10000, @@ -535,7 +546,7 @@ func (suite *AnteTestSuite) TestPoorNetworkManagementDecorator() { msgs := []sdk.Msg{ bank.NewMsgSend(accounts[4].acc.GetAddress(), accounts[3].acc.GetAddress(), sdk.Coins{sdk.NewInt64Coin("ukex", 2000)}), } - return msgs, privs[0:1], accNums[0:1], []uint64{0}, sdk.NewCoins(sdk.NewInt64Coin("ukex", 100)) + return msgs, privs[0:1], accNums[0:1], []uint64{1}, sdk.NewCoins(sdk.NewInt64Coin("ukex", 100)) }, true, false, @@ -545,18 +556,22 @@ func (suite *AnteTestSuite) TestPoorNetworkManagementDecorator() { "invalid transaction type on poor network", func() ([]sdk.Msg, []cryptotypes.PrivKey, []uint64, []uint64, sdk.Coins) { msgs := []sdk.Msg{ - tokenstypes.NewMsgUpsertTokenRate( + tokenstypes.NewMsgUpsertTokenInfo( accounts[4].acc.GetAddress(), + "adr20", "foo", - sdk.NewDec(1), - true, - sdk.ZeroDec(), - sdk.ZeroInt(), - false, - false, + sdk.NewDec(1), true, + sdk.ZeroInt(), sdk.ZeroInt(), + sdk.ZeroDec(), sdk.ZeroInt(), + false, false, + "FOO", + "Foo", + "", + 6, + "", "", "", 0, math.ZeroInt(), "", false, "", "", ), } - return msgs, privs[0:1], accNums[0:1], []uint64{0}, sdk.NewCoins(sdk.NewInt64Coin("ukex", 100)) + return msgs, privs[0:1], accNums[0:1], []uint64{1}, sdk.NewCoins(sdk.NewInt64Coin("ukex", 100)) }, true, false, diff --git a/app/ante/sigverify.go b/app/ante/sigverify.go new file mode 100644 index 000000000..d547d2139 --- /dev/null +++ b/app/ante/sigverify.go @@ -0,0 +1,447 @@ +package ante + +import ( + "bytes" + "encoding/base64" + "encoding/hex" + "encoding/json" + "errors" + "fmt" + + kiratypes "github.com/KiraCore/sekai/types" + tokenstypes "github.com/KiraCore/sekai/x/tokens/types" + "github.com/cosmos/cosmos-sdk/crypto/keys/secp256k1" + cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" + sdk "github.com/cosmos/cosmos-sdk/types" + sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" + sdktx "github.com/cosmos/cosmos-sdk/types/tx" + "github.com/cosmos/cosmos-sdk/types/tx/signing" + ante "github.com/cosmos/cosmos-sdk/x/auth/ante" + authsigning "github.com/cosmos/cosmos-sdk/x/auth/signing" + "github.com/cosmos/cosmos-sdk/x/auth/types" + "github.com/gogo/protobuf/proto" + + codectypes "github.com/cosmos/cosmos-sdk/codec/types" + "github.com/ethereum/go-ethereum/common" + ethmath "github.com/ethereum/go-ethereum/common/math" + "github.com/ethereum/go-ethereum/crypto" + apitypes "github.com/ethereum/go-ethereum/signer/core/apitypes" +) + +var ( + // simulation signature values used to estimate gas consumption + key = make([]byte, secp256k1.PubKeySize) + simSecp256k1Pubkey = &secp256k1.PubKey{Key: key} + EthChainID = uint64(8789) +) + +func init() { + // This decodes a valid hex string into a sepc256k1Pubkey for use in transaction simulation + bz, _ := hex.DecodeString("035AD6810A47F073553FF30D2FCC7E0D3B1C0B74B61A1AAA2582344037151E143A") + copy(key, bz) + simSecp256k1Pubkey.Key = key +} + +// SetPubKeyDecorator sets PubKeys in context for any signer which does not already have pubkey set +// PubKeys must be set in context for all signers before any other sigverify decorators run +// CONTRACT: Tx must implement SigVerifiableTx interface +type SetPubKeyDecorator struct { + ak ante.AccountKeeper +} + +func NewSetPubKeyDecorator(ak ante.AccountKeeper) SetPubKeyDecorator { + return SetPubKeyDecorator{ + ak: ak, + } +} + +func (spkd SetPubKeyDecorator) AnteHandle(ctx sdk.Context, tx sdk.Tx, simulate bool, next sdk.AnteHandler) (sdk.Context, error) { + sigTx, ok := tx.(authsigning.SigVerifiableTx) + if !ok { + return ctx, sdkerrors.Wrap(sdkerrors.ErrTxDecode, "invalid tx type") + } + + pubkeys, err := sigTx.GetPubKeys() + if err != nil { + return ctx, err + } + signers := sigTx.GetSigners() + + for i, pk := range pubkeys { + // PublicKey was omitted from slice since it has already been set in context + if pk == nil { + if !simulate { + continue + } + pk = simSecp256k1Pubkey + } + // Only make check if simulate=false + // if !simulate && !bytes.Equal(pk.Address(), signers[i]) { + // return ctx, sdkerrors.Wrapf(sdkerrors.ErrInvalidPubKey, + // "pubKey does not match signer address %s with signer index: %d", signers[i], i) + // } + + acc, err := GetSignerAcc(ctx, spkd.ak, signers[i]) + if err != nil { + return ctx, err + } + // account already has pubkey set,no need to reset + if acc.GetPubKey() != nil { + continue + } + err = acc.SetPubKey(pk) + if err != nil { + return ctx, sdkerrors.Wrap(sdkerrors.ErrInvalidPubKey, err.Error()) + } + spkd.ak.SetAccount(ctx, acc) + } + + // Also emit the following events, so that txs can be indexed by these + // indices: + // - signature (via `tx.signature=''`), + // - concat(address,"/",sequence) (via `tx.acc_seq='cosmos1abc...def/42'`). + sigs, err := sigTx.GetSignaturesV2() + if err != nil { + return ctx, err + } + + var events sdk.Events + for i, sig := range sigs { + events = append(events, sdk.NewEvent(sdk.EventTypeTx, + sdk.NewAttribute(sdk.AttributeKeyAccountSequence, fmt.Sprintf("%s/%d", signers[i], sig.Sequence)), + )) + + sigBzs, err := signatureDataToBz(sig.Data) + if err != nil { + return ctx, err + } + for _, sigBz := range sigBzs { + events = append(events, sdk.NewEvent(sdk.EventTypeTx, + sdk.NewAttribute(sdk.AttributeKeySignature, base64.StdEncoding.EncodeToString(sigBz)), + )) + } + } + + ctx.EventManager().EmitEvents(events) + + return next(ctx, tx, simulate) +} + +// SignatureVerificationGasConsumer is the type of function that is used to both +// consume gas when verifying signatures and also to accept or reject different types of pubkeys +// This is where apps can define their own PubKey +type SignatureVerificationGasConsumer = func(meter sdk.GasMeter, sig signing.SignatureV2, params types.Params) error + +// Verify all signatures for a tx and return an error if any are invalid. Note, +// +// CONTRACT: Pubkeys are set in context for all signers before this decorator runs +// CONTRACT: Tx must implement SigVerifiableTx interface +type SigVerificationDecorator struct { + ak ante.AccountKeeper + signModeHandler authsigning.SignModeHandler + interfaceRegistry codectypes.InterfaceRegistry +} + +func NewSigVerificationDecorator(ak ante.AccountKeeper, signModeHandler authsigning.SignModeHandler, interfaceRegistry codectypes.InterfaceRegistry) SigVerificationDecorator { + return SigVerificationDecorator{ + ak: ak, + signModeHandler: signModeHandler, + interfaceRegistry: interfaceRegistry, + } +} + +// OnlyLegacyAminoSigners checks SignatureData to see if all +// signers are using SIGN_MODE_LEGACY_AMINO_JSON. If this is the case +// then the corresponding SignatureV2 struct will not have account sequence +// explicitly set, and we should skip the explicit verification of sig.Sequence +// in the SigVerificationDecorator's AnteHandler function. +func OnlyLegacyAminoSigners(sigData signing.SignatureData) bool { + switch v := sigData.(type) { + case *signing.SingleSignatureData: + return v.SignMode == signing.SignMode_SIGN_MODE_LEGACY_AMINO_JSON + case *signing.MultiSignatureData: + for _, s := range v.Signatures { + if !OnlyLegacyAminoSigners(s) { + return false + } + } + return true + default: + return false + } +} + +func (svd SigVerificationDecorator) AnteHandle(ctx sdk.Context, tx sdk.Tx, simulate bool, next sdk.AnteHandler) (newCtx sdk.Context, err error) { + sigTx, ok := tx.(authsigning.SigVerifiableTx) + if !ok { + return ctx, sdkerrors.Wrap(sdkerrors.ErrTxDecode, "invalid transaction type") + } + + // stdSigs contains the sequence number, account number, and signatures. + // When simulating, this would just be a 0-length slice. + sigs, err := sigTx.GetSignaturesV2() + if err != nil { + return ctx, err + } + + signerAddrs := sigTx.GetSigners() + + // check that signer length and signature length are the same + if len(sigs) != len(signerAddrs) { + return ctx, sdkerrors.Wrapf(sdkerrors.ErrUnauthorized, "invalid number of signer; expected: %d, got %d", len(signerAddrs), len(sigs)) + } + + for i, sig := range sigs { + acc, err := GetSignerAcc(ctx, svd.ak, signerAddrs[i]) + if err != nil { + return ctx, err + } + + // retrieve pubkey + pubKey := acc.GetPubKey() + if !simulate && pubKey == nil { + return ctx, sdkerrors.Wrap(sdkerrors.ErrInvalidPubKey, "pubkey on account is not set") + } + + // Check account sequence number. + if sig.Sequence != acc.GetSequence() { + return ctx, sdkerrors.Wrapf( + sdkerrors.ErrWrongSequence, + "account sequence mismatch, expected %d, got %d", acc.GetSequence(), sig.Sequence, + ) + } + + // retrieve signer data + genesis := ctx.BlockHeight() == 0 + chainID := ctx.ChainID() + var accNum uint64 + if !genesis { + accNum = acc.GetAccountNumber() + } + + signerData := authsigning.SignerData{ + Address: acc.GetAddress().String(), + ChainID: chainID, + AccountNumber: accNum, + Sequence: acc.GetSequence(), + PubKey: pubKey, + } + + if !simulate { + if !bytes.Equal(pubKey.Address(), acc.GetAddress()) { + // try verifying ethereum signature + if ethErr := VerifyEthereumSignature(pubKey, signerData, sig.Data, svd.signModeHandler, tx, svd.interfaceRegistry); ethErr == nil { + return next(ctx, tx, simulate) + } else { + errMsg := fmt.Sprintf("ethereum signature verification failed; %s", ethErr.Error()) + return ctx, sdkerrors.Wrap(sdkerrors.ErrUnauthorized, errMsg) + } + } + + err := authsigning.VerifySignature(pubKey, signerData, sig.Data, svd.signModeHandler, tx) + if err != nil { + var errMsg string + if OnlyLegacyAminoSigners(sig.Data) { + // If all signers are using SIGN_MODE_LEGACY_AMINO, we rely on VerifySignature to check account sequence number, + // and therefore communicate sequence number as a potential cause of error. + errMsg = fmt.Sprintf("signature verification failed; please verify account number (%d), sequence (%d) and chain-id (%s)", accNum, acc.GetSequence(), chainID) + } else { + errMsg = fmt.Sprintf("signature verification failed; please verify account number (%d) and chain-id (%s)", accNum, chainID) + } + return ctx, sdkerrors.Wrap(sdkerrors.ErrUnauthorized, errMsg) + } + } + } + + return next(ctx, tx, simulate) +} + +func VerifyEthereumSignature(pubKey cryptotypes.PubKey, signerData authsigning.SignerData, sigData signing.SignatureData, handler authsigning.SignModeHandler, tx sdk.Tx, interfaceRegistry codectypes.InterfaceRegistry) error { + switch data := sigData.(type) { + case *signing.SingleSignatureData: + signBytes, err := handler.GetSignBytes(data.SignMode, signerData, tx) + if err != nil { + return err + } + + if data.SignMode == signing.SignMode_SIGN_MODE_DIRECT { + signDoc := sdktx.SignDoc{} + err = signDoc.Unmarshal(signBytes) + if err != nil { + return err + } + + txBody := &sdktx.TxBody{} + err = proto.Unmarshal(signDoc.BodyBytes, txBody) + if err != nil { + return err + } + + if len(txBody.Messages) != 1 { + return errors.New("only one message's enabled for EIP712 signature") + } + msg := txBody.Messages[0] + err := txBody.UnpackInterfaces(interfaceRegistry) + if err != nil { + return err + } + + switch msg.TypeUrl { + case "/kira.tokens.MsgEthereumTx": + msg := msg.GetCachedValue().(*tokenstypes.MsgEthereumTx) + tx := msg.AsTransaction() + if signerData.Sequence != tx.Nonce() { + return sdkerrors.Wrapf( + sdkerrors.ErrWrongSequence, + "ethereum account sequence mismatch, expected %d, got %d", signerData.Sequence, tx.Nonce(), + ) + } + + if EthChainID != tx.ChainId().Uint64() { + return fmt.Errorf("invalid ethereum chain ID, expected %d, got %d", EthChainID, tx.ChainId().Uint64()) + } + return msg.ValidateBasic() + default: + msg := msg.GetCachedValue().(sdk.Msg) + signBytes, err = GenEIP712SignBytesFromMsg(msg, signerData.Sequence) + if err != nil { + return err + } + } + } + + signatureData := data.Signature + if len(signatureData) <= crypto.RecoveryIDOffset { + return fmt.Errorf("not a correct ethereum signature") + } + signatureData[crypto.RecoveryIDOffset] -= 27 // Transform yellow paper V from 27/28 to 0/1 + recovered, err := crypto.SigToPub(signBytes, signatureData) + if err != nil { + return err + } + recoveredAddr := crypto.PubkeyToAddress(*recovered) + + sigTx, ok := tx.(authsigning.SigVerifiableTx) + if !ok { + return sdkerrors.Wrap(sdkerrors.ErrTxDecode, "invalid transaction type") + } + + signerAddrs := sigTx.GetSigners() + if len(signerAddrs) != 1 { + return fmt.Errorf("only 1 signer transaction supported: got %d", len(signerAddrs)) + } + + address := signerAddrs[0] + + if recoveredAddr.String() != common.BytesToAddress(address).String() { + return fmt.Errorf("mismatching recovered address and sender: %s != %s", recoveredAddr.String(), common.BytesToAddress(address).String()) + } + return nil + default: + return fmt.Errorf("unexpected SignatureData %T", sigData) + } +} + +func GenEIP712SignBytesFromMsg(msg sdk.Msg, nonce uint64) ([]byte, error) { + msgName := kiratypes.MsgType(msg) + msgData, err := json.Marshal(msg) + if err != nil { + return nil, err + } + + types := apitypes.Types{ + "EIP712Domain": { + {Name: "name", Type: "string"}, + {Name: "version", Type: "string"}, + {Name: "chainId", Type: "uint256"}, + }, + msgName: { + {Name: "param", Type: "string"}, + {Name: "nonce", Type: "uint256"}, + }, + } + + chainId := ethmath.NewHexOrDecimal256(int64(EthChainID)) + nonceEth := ethmath.NewHexOrDecimal256(int64(nonce)) + + domain := apitypes.TypedDataDomain{ + Name: "Kira", + Version: "1", + ChainId: chainId, + // VerifyingContract: "0xdef1c0ded9bec7f1a1670819833240f027b25eff", + } + + typedData := apitypes.TypedData{ + Types: types, + PrimaryType: msgName, + Domain: domain, + Message: apitypes.TypedDataMessage{ + "param": string(msgData), + "nonce": nonceEth, + }, + } + + typedDataHash, err := typedData.HashStruct(typedData.PrimaryType, typedData.Message) + if err != nil { + return nil, err + } + + domainSeparator, err := typedData.HashStruct("EIP712Domain", typedData.Domain.Map()) + if err != nil { + return nil, err + } + + rawData := []byte(fmt.Sprintf("\x19\x01%s%s", string(domainSeparator), string(typedDataHash))) + hashBytes := crypto.Keccak256(rawData) + + return hashBytes, nil +} + +// GetSignerAcc returns an account for a given address that is expected to sign +// a transaction. +func GetSignerAcc(ctx sdk.Context, ak ante.AccountKeeper, addr sdk.AccAddress) (types.AccountI, error) { + if acc := ak.GetAccount(ctx, addr); acc != nil { + return acc, nil + } + + return nil, sdkerrors.Wrapf(sdkerrors.ErrUnknownAddress, "account %s does not exist", addr) +} + +// signatureDataToBz converts a SignatureData into raw bytes signature. +// For SingleSignatureData, it returns the signature raw bytes. +// For MultiSignatureData, it returns an array of all individual signatures, +// as well as the aggregated signature. +func signatureDataToBz(data signing.SignatureData) ([][]byte, error) { + if data == nil { + return nil, fmt.Errorf("got empty SignatureData") + } + + switch data := data.(type) { + case *signing.SingleSignatureData: + return [][]byte{data.Signature}, nil + case *signing.MultiSignatureData: + sigs := [][]byte{} + var err error + + for _, d := range data.Signatures { + nestedSigs, err := signatureDataToBz(d) + if err != nil { + return nil, err + } + sigs = append(sigs, nestedSigs...) + } + + multisig := cryptotypes.MultiSignature{ + Signatures: sigs, + } + aggregatedSig, err := multisig.Marshal() + if err != nil { + return nil, err + } + sigs = append(sigs, aggregatedSig) + + return sigs, nil + default: + return nil, sdkerrors.ErrInvalidType.Wrapf("unexpected signature data type %T", data) + } +} diff --git a/app/ante/sigverify_test.go b/app/ante/sigverify_test.go new file mode 100644 index 000000000..6c8f19457 --- /dev/null +++ b/app/ante/sigverify_test.go @@ -0,0 +1,72 @@ +package ante_test + +import ( + "encoding/hex" + "fmt" + + "github.com/KiraCore/sekai/app/ante" + ethmath "github.com/ethereum/go-ethereum/common/math" + "github.com/ethereum/go-ethereum/crypto" + apitypes "github.com/ethereum/go-ethereum/signer/core/apitypes" +) + +func GenerateEIP712SignBytes() ([]byte, error) { + types := apitypes.Types{ + "EIP712Domain": { + {Name: "name", Type: "string"}, + {Name: "version", Type: "string"}, + {Name: "chainId", Type: "uint256"}, + }, + "delegate": { + {Name: "param", Type: "string"}, + }, + } + + chainId := ethmath.NewHexOrDecimal256(int64(ante.EthChainID)) + + domain := apitypes.TypedDataDomain{ + Name: "Kira", + Version: "1", + ChainId: chainId, + // VerifyingContract: "0xdef1c0ded9bec7f1a1670819833240f027b25eff", + } + + typedData := apitypes.TypedData{ + Types: types, + PrimaryType: "delegate", + Domain: domain, + Message: apitypes.TypedDataMessage{ + "param": `{"amount":"100000000ukex","to":"kiravaloper13j3w9pdc47e54z2gj4uh37rnnfwxcfcmjh4ful"}`, + }, + } + + typedDataHash, err := typedData.HashStruct(typedData.PrimaryType, typedData.Message) + if err != nil { + return nil, err + } + + domainSeparator, err := typedData.HashStruct("EIP712Domain", typedData.Domain.Map()) + if err != nil { + return nil, err + } + + rawData := []byte(fmt.Sprintf("\x19\x01%s%s", string(domainSeparator), string(typedDataHash))) + hashBytes := crypto.Keccak256(rawData) + + return hashBytes, nil +} + +func (suite *AnteTestSuite) TestGenerateEIP712SignBytes() { + suite.SetupTest(false) // reset + + bytes, err := GenerateEIP712SignBytes() + suite.Require().NoError(err) + + signatureData, err := hex.DecodeString("0a59681b3be1c26a71072989a43cca378ba2726f7183078865117715b9634f7d4c4c31fc008c411bb75739d44afd68a4f561b8176eb6cd38184a762ec83550e31b") + suite.Require().NoError(err) + signatureData[crypto.RecoveryIDOffset] -= 27 // Transform yellow paper V from 27/28 to 0/1 + recovered, err := crypto.SigToPub(bytes, signatureData) + suite.Require().NoError(err) + recoveredAddr := crypto.PubkeyToAddress(*recovered) + suite.Require().Equal(hex.EncodeToString(recoveredAddr[:]), "3f48fdb5ee16f729b16f4084ed1577557b6855cf") +} diff --git a/app/ante/testutil/expected_keepers_mocks.go b/app/ante/testutil/expected_keepers_mocks.go new file mode 100644 index 000000000..ff2803af0 --- /dev/null +++ b/app/ante/testutil/expected_keepers_mocks.go @@ -0,0 +1,127 @@ +// Code generated by MockGen. DO NOT EDIT. +// Source: x/auth/ante/expected_keepers.go + +// Package testutil is a generated GoMock package. +package testutil + +import ( + reflect "reflect" + + types "github.com/cosmos/cosmos-sdk/types" + types0 "github.com/cosmos/cosmos-sdk/x/auth/types" + gomock "github.com/golang/mock/gomock" +) + +// MockAccountKeeper is a mock of AccountKeeper interface. +type MockAccountKeeper struct { + ctrl *gomock.Controller + recorder *MockAccountKeeperMockRecorder +} + +// MockAccountKeeperMockRecorder is the mock recorder for MockAccountKeeper. +type MockAccountKeeperMockRecorder struct { + mock *MockAccountKeeper +} + +// NewMockAccountKeeper creates a new mock instance. +func NewMockAccountKeeper(ctrl *gomock.Controller) *MockAccountKeeper { + mock := &MockAccountKeeper{ctrl: ctrl} + mock.recorder = &MockAccountKeeperMockRecorder{mock} + return mock +} + +// EXPECT returns an object that allows the caller to indicate expected use. +func (m *MockAccountKeeper) EXPECT() *MockAccountKeeperMockRecorder { + return m.recorder +} + +// GetAccount mocks base method. +func (m *MockAccountKeeper) GetAccount(ctx types.Context, addr types.AccAddress) types0.AccountI { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "GetAccount", ctx, addr) + ret0, _ := ret[0].(types0.AccountI) + return ret0 +} + +// GetAccount indicates an expected call of GetAccount. +func (mr *MockAccountKeeperMockRecorder) GetAccount(ctx, addr interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAccount", reflect.TypeOf((*MockAccountKeeper)(nil).GetAccount), ctx, addr) +} + +// GetModuleAddress mocks base method. +func (m *MockAccountKeeper) GetModuleAddress(moduleName string) types.AccAddress { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "GetModuleAddress", moduleName) + ret0, _ := ret[0].(types.AccAddress) + return ret0 +} + +// GetModuleAddress indicates an expected call of GetModuleAddress. +func (mr *MockAccountKeeperMockRecorder) GetModuleAddress(moduleName interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetModuleAddress", reflect.TypeOf((*MockAccountKeeper)(nil).GetModuleAddress), moduleName) +} + +// GetParams mocks base method. +func (m *MockAccountKeeper) GetParams(ctx types.Context) types0.Params { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "GetParams", ctx) + ret0, _ := ret[0].(types0.Params) + return ret0 +} + +// GetParams indicates an expected call of GetParams. +func (mr *MockAccountKeeperMockRecorder) GetParams(ctx interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetParams", reflect.TypeOf((*MockAccountKeeper)(nil).GetParams), ctx) +} + +// SetAccount mocks base method. +func (m *MockAccountKeeper) SetAccount(ctx types.Context, acc types0.AccountI) { + m.ctrl.T.Helper() + m.ctrl.Call(m, "SetAccount", ctx, acc) +} + +// SetAccount indicates an expected call of SetAccount. +func (mr *MockAccountKeeperMockRecorder) SetAccount(ctx, acc interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetAccount", reflect.TypeOf((*MockAccountKeeper)(nil).SetAccount), ctx, acc) +} + +// MockFeegrantKeeper is a mock of FeegrantKeeper interface. +type MockFeegrantKeeper struct { + ctrl *gomock.Controller + recorder *MockFeegrantKeeperMockRecorder +} + +// MockFeegrantKeeperMockRecorder is the mock recorder for MockFeegrantKeeper. +type MockFeegrantKeeperMockRecorder struct { + mock *MockFeegrantKeeper +} + +// NewMockFeegrantKeeper creates a new mock instance. +func NewMockFeegrantKeeper(ctrl *gomock.Controller) *MockFeegrantKeeper { + mock := &MockFeegrantKeeper{ctrl: ctrl} + mock.recorder = &MockFeegrantKeeperMockRecorder{mock} + return mock +} + +// EXPECT returns an object that allows the caller to indicate expected use. +func (m *MockFeegrantKeeper) EXPECT() *MockFeegrantKeeperMockRecorder { + return m.recorder +} + +// UseGrantedFees mocks base method. +func (m *MockFeegrantKeeper) UseGrantedFees(ctx types.Context, granter, grantee types.AccAddress, fee types.Coins, msgs []types.Msg) error { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "UseGrantedFees", ctx, granter, grantee, fee, msgs) + ret0, _ := ret[0].(error) + return ret0 +} + +// UseGrantedFees indicates an expected call of UseGrantedFees. +func (mr *MockFeegrantKeeperMockRecorder) UseGrantedFees(ctx, granter, grantee, fee, msgs interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UseGrantedFees", reflect.TypeOf((*MockFeegrantKeeper)(nil).UseGrantedFees), ctx, granter, grantee, fee, msgs) +} diff --git a/app/ante/testutil_test.go b/app/ante/testutil_test.go index cb5ad19b0..c50296c68 100644 --- a/app/ante/testutil_test.go +++ b/app/ante/testutil_test.go @@ -75,7 +75,9 @@ func (suite *AnteTestSuite) SetupTest(isCheckTx bool) { nil, ante.DefaultSigVerificationGasConsumer, encodingConfig.TxConfig.SignModeHandler(), - nil) + nil, + suite.app.InterfaceRegistry(), + ) } // CreateTestAccounts creates `numAccs` accounts, and return all relevant diff --git a/app/app.go b/app/app.go index 800aa5e6b..f3cb3a0e8 100644 --- a/app/app.go +++ b/app/app.go @@ -242,7 +242,7 @@ func NewInitApp( custodytypes.StoreKey, bridgetypes.StoreKey, collectivestypes.ModuleName, - layer2types.ModuleName, + layer2types.StoreKey, consensusparamtypes.StoreKey, ) tKeys := sdk.NewTransientStoreKeys(paramstypes.TStoreKey) @@ -275,7 +275,7 @@ func NewInitApp( authtypes.NewModuleAddress(govtypes.ModuleName).String(), ) - app.TokensKeeper = tokenskeeper.NewKeeper(keys[tokenstypes.ModuleName], appCodec) + app.TokensKeeper = tokenskeeper.NewKeeper(keys[tokenstypes.ModuleName], appCodec, app.BankKeeper) app.CustomGovKeeper = customgovkeeper.NewKeeper(keys[govtypes.ModuleName], appCodec, app.BankKeeper) customStakingKeeper := customstakingkeeper.NewKeeper(keys[stakingtypes.ModuleName], cdc, app.CustomGovKeeper) multiStakingKeeper := multistakingkeeper.NewKeeper(keys[multistakingtypes.ModuleName], appCodec, app.BankKeeper, app.TokensKeeper, app.CustomGovKeeper, customStakingKeeper) @@ -285,7 +285,6 @@ func NewInitApp( &customStakingKeeper, multiStakingKeeper, app.CustomGovKeeper, - app.GetSubspace(slashingtypes.ModuleName), ) app.BasketKeeper = basketkeeper.NewKeeper( @@ -319,11 +318,12 @@ func NewInitApp( ) app.Layer2Keeper = layer2keeper.NewKeeper( - keys[collectivestypes.StoreKey], appCodec, + keys[layer2types.StoreKey], appCodec, app.BankKeeper, app.CustomStakingKeeper, app.CustomGovKeeper, app.SpendingKeeper, + app.TokensKeeper, ) app.UpgradeKeeper = upgradekeeper.NewKeeper(keys[upgradetypes.StoreKey], appCodec, app.CustomStakingKeeper) @@ -346,7 +346,7 @@ func NewInitApp( app.RecoveryKeeper = recoverykeeper.NewKeeper( appCodec, - keys[slashingtypes.StoreKey], + keys[recoverytypes.StoreKey], app.AccountKeeper, app.BankKeeper, &customStakingKeeper, @@ -355,15 +355,23 @@ func NewInitApp( app.CollectivesKeeper, app.SpendingKeeper, app.CustodyKeeper, + app.TokensKeeper, ) app.DistrKeeper = distributorkeeper.NewKeeper( keys[distributortypes.ModuleName], appCodec, app.AccountKeeper, app.BankKeeper, app.CustomStakingKeeper, app.CustomGovKeeper, - app.MultiStakingKeeper, app.RecoveryKeeper) + app.MultiStakingKeeper, app.RecoveryKeeper, app.TokensKeeper) app.MultiStakingKeeper.SetDistrKeeper(app.DistrKeeper) - app.UbiKeeper = ubikeeper.NewKeeper(keys[ubitypes.ModuleName], appCodec, app.BankKeeper, app.SpendingKeeper, app.DistrKeeper) + app.UbiKeeper = ubikeeper.NewKeeper( + keys[ubitypes.ModuleName], + appCodec, + app.BankKeeper, + app.SpendingKeeper, + app.DistrKeeper, + app.TokensKeeper, + ) proposalRouter := govtypes.NewProposalRouter( []govtypes.ProposalHandler{ @@ -378,8 +386,8 @@ func NewInitApp( customgov.NewApplySetPoorNetworkMessagesProposalHandler(app.CustomGovKeeper), customgov.NewApplyResetWholeCouncilorRankProposalHandler(app.CustomGovKeeper), customgov.NewApplyJailCouncilorProposalHandler(app.CustomGovKeeper), - tokens.NewApplyUpsertTokenAliasProposalHandler(app.TokensKeeper), - tokens.NewApplyUpsertTokenRatesProposalHandler(app.TokensKeeper), + customgov.NewApplySetExecutionFeesProposalHandler(app.CustomGovKeeper), + tokens.NewApplyUpsertTokenInfosProposalHandler(app.TokensKeeper), tokens.NewApplyWhiteBlackChangeProposalHandler(app.TokensKeeper), customstaking.NewApplyUnjailValidatorProposalHandler(app.CustomStakingKeeper, app.CustomGovKeeper), customslashing.NewApplyResetWholeValidatorRankProposalHandler(app.CustomSlashingKeeper), @@ -544,6 +552,7 @@ func NewInitApp( ante.DefaultSigVerificationGasConsumer, encodingConfig.TxConfig.SignModeHandler(), nil, + encodingConfig.InterfaceRegistry, ), ) app.SetEndBlocker(app.EndBlocker) diff --git a/app/posthandler/exec.go b/app/posthandler/exec.go index d52256aa0..c0ac38185 100644 --- a/app/posthandler/exec.go +++ b/app/posthandler/exec.go @@ -1,6 +1,7 @@ package posthandler import ( + errorsmod "cosmossdk.io/errors" kiratypes "github.com/KiraCore/sekai/types" feeprocessingkeeper "github.com/KiraCore/sekai/x/feeprocessing/keeper" customgovkeeper "github.com/KiraCore/sekai/x/gov/keeper" @@ -27,7 +28,7 @@ func NewExecutionDecorator( func (d ExecutionDecorator) PostHandle(ctx sdk.Context, tx sdk.Tx, simulate, success bool, next sdk.PostHandler) (sdk.Context, error) { feeTx, ok := tx.(sdk.FeeTx) if !ok { - return ctx, sdkerrors.Wrap(sdkerrors.ErrTxDecode, "Tx must be a FeeTx") + return ctx, errorsmod.Wrap(sdkerrors.ErrTxDecode, "Tx must be a FeeTx") } // execution fee should be prepaid diff --git a/go.mod b/go.mod index 58df50563..ce1ae8eea 100644 --- a/go.mod +++ b/go.mod @@ -4,6 +4,7 @@ go 1.19 require ( cosmossdk.io/depinject v1.0.0-alpha.4 + cosmossdk.io/errors v1.0.0 cosmossdk.io/math v1.2.0 cosmossdk.io/tools/rosetta v0.2.1 github.com/armon/go-metrics v0.4.1 @@ -13,7 +14,9 @@ require ( github.com/cosmos/cosmos-sdk v0.47.6 github.com/cosmos/go-bip39 v1.0.0 github.com/cosmos/gogoproto v1.4.10 + github.com/ethereum/go-ethereum v1.10.21 github.com/gogo/protobuf v1.3.2 + github.com/golang/mock v1.6.0 github.com/golang/protobuf v1.5.3 github.com/gorilla/mux v1.8.0 github.com/grpc-ecosystem/grpc-gateway v1.16.0 @@ -25,6 +28,7 @@ require ( github.com/spf13/pflag v1.0.5 github.com/stretchr/testify v1.8.4 github.com/tendermint/go-amino v0.16.0 + github.com/tendermint/tendermint v0.35.9 golang.org/x/exp v0.0.0-20230711153332-06a737ee72cb google.golang.org/genproto/googleapis/api v0.0.0-20231002182017-d307bd883b97 google.golang.org/grpc v1.58.3 @@ -34,7 +38,6 @@ require ( require ( cosmossdk.io/api v0.3.1 // indirect cosmossdk.io/core v0.5.1 // indirect - cosmossdk.io/errors v1.0.0 // indirect cosmossdk.io/log v1.2.1 // indirect filippo.io/edwards25519 v1.0.0 // indirect github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 // indirect @@ -42,7 +45,7 @@ require ( github.com/ChainSafe/go-schnorrkel v0.0.0-20200405005733-88cbf1b4c40d // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/bgentry/speakeasy v0.1.1-0.20220910012023-760eaf8b6816 // indirect - github.com/btcsuite/btcd v0.21.0-beta // indirect + github.com/btcsuite/btcd v0.22.1 // indirect github.com/btcsuite/btcd/btcec/v2 v2.3.2 // indirect github.com/cenkalti/backoff/v4 v4.1.3 // indirect github.com/cespare/xxhash v1.1.0 // indirect @@ -76,7 +79,6 @@ require ( github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2 // indirect github.com/gogo/googleapis v1.4.1 // indirect github.com/golang/glog v1.1.2 // indirect - github.com/golang/mock v1.6.0 // indirect github.com/golang/snappy v0.0.4 // indirect github.com/google/btree v1.1.2 // indirect github.com/google/go-cmp v0.5.9 // indirect @@ -108,6 +110,7 @@ require ( github.com/minio/highwayhash v1.0.2 // indirect github.com/mitchellh/mapstructure v1.5.0 // indirect github.com/mtibben/percent v0.2.1 // indirect + github.com/oasisprotocol/curve25519-voi v0.0.0-20210609091139-0a56a4bca00b // indirect github.com/pelletier/go-toml v1.9.5 // indirect github.com/pelletier/go-toml/v2 v2.0.7 // indirect github.com/petermattis/goid v0.0.0-20230317030725-371a4b8eda08 // indirect diff --git a/go.sum b/go.sum index de37c536a..bbcea1a2c 100644 --- a/go.sum +++ b/go.sum @@ -1,3 +1,5 @@ +4d63.com/gochecknoglobals v0.1.0/go.mod h1:wfdC5ZjKSPr7CybKEcgJhUOgeAQW1+7WcyK8OvUilfo= +bitbucket.org/creachadair/shell v0.0.6/go.mod h1:8Qqi/cYk7vPnsOePHroKXDJYmb5x7ENhtiFtfZq8K+M= cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= @@ -12,29 +14,52 @@ cloud.google.com/go v0.53.0/go.mod h1:fp/UouUEsRkN6ryDKNW/Upv/JBKnv6WDthjR6+vze6 cloud.google.com/go v0.54.0/go.mod h1:1rq2OEkV3YMf6n/9ZvGWI3GWw0VoqH/1x2nd8Is/bPc= cloud.google.com/go v0.56.0/go.mod h1:jr7tqZxxKOVYizybht9+26Z/gUq7tiRzu+ACVAMbKVk= cloud.google.com/go v0.57.0/go.mod h1:oXiQ6Rzq3RAkkY7N6t3TcE6jE+CIBBbA36lwQ1JyzZs= +cloud.google.com/go v0.60.0/go.mod h1:yw2G51M9IfRboUH61Us8GqCeF1PzPblB823Mn2q2eAU= cloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOYc= cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHObY= cloud.google.com/go v0.72.0/go.mod h1:M+5Vjvlc2wnp6tjzE102Dw08nGShTscUx2nZMufOKPI= cloud.google.com/go v0.74.0/go.mod h1:VV1xSbzvo+9QJOxLDaJfTjx5e+MePCpCWwvftOeQmWk= cloud.google.com/go v0.75.0/go.mod h1:VGuuCn7PG0dwsd5XPVm2Mm3wlh3EL55/79EKB6hlPTY= +cloud.google.com/go v0.78.0/go.mod h1:QjdrLG0uq+YwhjoVOLsS1t7TW8fs36kLs4XO5R5ECHg= +cloud.google.com/go v0.79.0/go.mod h1:3bzgcEeQlzbuEAYu4mrWhKqWjmpprinYgKJLgKHnbb8= +cloud.google.com/go v0.81.0/go.mod h1:mk/AM35KwGk/Nm2YSeZbxXdrNK3KZOYHmLkOqC2V6E0= +cloud.google.com/go v0.83.0/go.mod h1:Z7MJUsANfY0pYPdw0lbnivPx4/vhy/e2FEkSkF7vAVY= +cloud.google.com/go v0.84.0/go.mod h1:RazrYuxIK6Kb7YrzzhPoLmCVzl7Sup4NrbKPg8KHSUM= +cloud.google.com/go v0.87.0/go.mod h1:TpDYlFy7vuLzZMMZ+B6iRiELaY7z/gJPaqbMx6mlWcY= +cloud.google.com/go v0.90.0/go.mod h1:kRX0mNRHe0e2rC6oNakvwQqzyDmg57xJ+SZU1eT2aDQ= +cloud.google.com/go v0.93.3/go.mod h1:8utlLll2EF5XMAV15woO4lSbWQlk8rer9aLOfLh7+YI= +cloud.google.com/go v0.94.1/go.mod h1:qAlAugsXlC+JWO+Bke5vCtc9ONxjQT3drlTTnAplMW4= +cloud.google.com/go v0.97.0/go.mod h1:GF7l59pYBVlXQIBLx3a761cZ41F9bBH3JUlihCt2Udc= +cloud.google.com/go v0.98.0/go.mod h1:ua6Ush4NALrHk5QXDWnjvZHN93OuF0HfuEPq9I1X0cM= +cloud.google.com/go v0.99.0/go.mod h1:w0Xx2nLzqWJPuozYQX+hFfCSI8WioryfRDzkoI/Y2ZA= +cloud.google.com/go v0.100.2/go.mod h1:4Xra9TjzAeYHrl5+oeLlzbM2k3mjVhZh4UqTZ//w99A= cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg= cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc= cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ= +cloud.google.com/go/compute v0.1.0/go.mod h1:GAesmwr110a34z04OlxYkATPBEfVhkymfTBXtfbBFow= +cloud.google.com/go/compute v1.3.0/go.mod h1:cCZiE1NHEtai4wiufUhW8I8S1JKkAnhnQJWM7YD99wM= +cloud.google.com/go/compute v1.5.0/go.mod h1:9SMHyhJlzhlkJqrPAc839t2BZFTSk6Jdj6mkzQJeu0M= +cloud.google.com/go/compute v1.6.0/go.mod h1:T29tfhtVbq1wvAPo0E3+7vhgmkOYeXjhFvz/FMzPu0s= +cloud.google.com/go/compute v1.6.1/go.mod h1:g85FgpzFvNULZ+S8AYq87axRKuf2Kh7deLqV/jJ3thU= cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= +cloud.google.com/go/firestore v1.6.1/go.mod h1:asNXNOzBdyVQmEU+ggO8UPodTkEVFW5Qx+rwHnAz+EY= cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= cloud.google.com/go/pubsub v1.3.1/go.mod h1:i+ucay31+CNRpDW4Lu78I4xXG+O1r/MAHgjpRVR+TSU= +cloud.google.com/go/pubsub v1.5.0/go.mod h1:ZEwJccE3z93Z2HWvstpri00jOg7oO4UZDtKhwDwqF0w= +cloud.google.com/go/spanner v1.7.0/go.mod h1:sd3K2gZ9Fd0vMPLXzeCrF6fq4i63Q7aTLW/lBIfBkIk= cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos= cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= cloud.google.com/go/storage v1.14.0/go.mod h1:GrKmX003DSIwi9o29oFT7YDnHYwZoctc3fOKtUw0Xmo= +contrib.go.opencensus.io/exporter/stackdriver v0.13.4/go.mod h1:aXENhDJ1Y4lIg4EUaVTwzvYETVNZk10Pu26tevFKLUc= cosmossdk.io/api v0.3.1 h1:NNiOclKRR0AOlO4KIqeaG6PS6kswOMhHD0ir0SscNXE= cosmossdk.io/api v0.3.1/go.mod h1:DfHfMkiNA2Uhy8fj0JJlOCYOBp4eWUUJ1te5zBGNyIw= cosmossdk.io/core v0.5.1 h1:vQVtFrIYOQJDV3f7rw4pjjVqc1id4+mE0L9hHP66pyI= @@ -54,42 +79,90 @@ filippo.io/edwards25519 v1.0.0 h1:0wAIcmJUqRdI8IJ/3eGi5/HwXZWPujYXXlkrQogz0Ek= filippo.io/edwards25519 v1.0.0/go.mod h1:N1IkdkCkiLB6tki+MYJoSx2JTY9NUlxZE7eHn5EwJns= github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 h1:/vQbFIOMbk2FiG/kXiLl8BRyzTWDw7gX/Hz7Dd5eDMs= github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4/go.mod h1:hN7oaIRCjzsZ2dE+yG5k+rsdt3qcwykqK6HVGcKwsw4= +github.com/Antonboom/errname v0.1.7/go.mod h1:g0ONh16msHIPgJSGsecu1G/dcF2hlYR/0SddnIAGavU= +github.com/Antonboom/nilnil v0.1.1/go.mod h1:L1jBqoWM7AOeTD+tSquifKSesRHs4ZdaxvZR+xdJEaI= +github.com/Azure/azure-sdk-for-go/sdk/azcore v0.19.0/go.mod h1:h6H6c8enJmmocHUbLiiGY6sx7f9i+X3m1CHdd5c6Rdw= +github.com/Azure/azure-sdk-for-go/sdk/azidentity v0.11.0/go.mod h1:HcM1YX14R7CJcghJGOYCgdezslRSVzqwLf/q+4Y2r/0= +github.com/Azure/azure-sdk-for-go/sdk/internal v0.7.0/go.mod h1:yqy467j36fJxcRV2TzfVZ1pCb5vxm4BtZPUdYWe/Xo8= +github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78/go.mod h1:LmzpDX56iTiv29bbRTIsUNlaFfuhWRQBWjQdVyAevI8= github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 h1:UQHMgLO+TxOElx5B5HZ4hJQsoJ/PvUvKRhJHDQXO8P8= +github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= +github.com/BurntSushi/toml v0.4.1/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ= +github.com/BurntSushi/toml v1.1.0/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= github.com/ChainSafe/go-schnorrkel v0.0.0-20200405005733-88cbf1b4c40d h1:nalkkPQcITbvhmL4+C4cKA87NW0tfm3Kl9VXRoPywFg= github.com/ChainSafe/go-schnorrkel v0.0.0-20200405005733-88cbf1b4c40d/go.mod h1:URdX5+vg25ts3aCh8H5IFZybJYKWhJHYMTnf+ULtoC4= +github.com/DATA-DOG/go-sqlmock v1.5.0/go.mod h1:f/Ixk793poVmq4qj/V1dPUg2JEAKC73Q5eFN3EC/SaM= github.com/DataDog/datadog-go v3.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ= +github.com/DataDog/zstd v1.4.1/go.mod h1:1jcaCB/ufaK+sKp1NBhlGmpz41jOoPQ35bpF36t7BBo= +github.com/Djarvur/go-err113 v0.0.0-20210108212216-aea10b59be24/go.mod h1:4UJr5HIiMZrwgkSPdsjy2uOQExX/WEILpIrO9UPGuXs= +github.com/GaijinEntertainment/go-exhaustruct/v2 v2.2.0/go.mod h1:n/vLeA7V+QY84iYAGwMkkUUp9ooeuftMEvaDrSVch+Q= +github.com/HdrHistogram/hdrhistogram-go v1.1.0/go.mod h1:yDgFjdqOqDEKOvasDdhWNXYg9BVp4O+o5f6V/ehm6Oo= +github.com/HdrHistogram/hdrhistogram-go v1.1.2/go.mod h1:yDgFjdqOqDEKOvasDdhWNXYg9BVp4O+o5f6V/ehm6Oo= github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible/go.mod h1:r7JcOSlj0wfOMncg0iLm8Leh48TZaKVeNIfJntJ2wa0= +github.com/Masterminds/goutils v1.1.0/go.mod h1:8cTjp+g8YejhMuvIA5y2vz3BpJxksy863GQaJW2MFNU= +github.com/Masterminds/semver v1.4.2/go.mod h1:MB6lktGJrhw8PrUyiEoblNEGEQ+RzHPF078ddwwvV3Y= +github.com/Masterminds/semver v1.5.0/go.mod h1:MB6lktGJrhw8PrUyiEoblNEGEQ+RzHPF078ddwwvV3Y= +github.com/Masterminds/sprig v2.15.0+incompatible/go.mod h1:y6hNFY5UBTIWBxnzTeuNhlNS5hqE0NB0E6fgfo2Br3o= +github.com/Masterminds/sprig v2.22.0+incompatible/go.mod h1:y6hNFY5UBTIWBxnzTeuNhlNS5hqE0NB0E6fgfo2Br3o= +github.com/Microsoft/go-winio v0.5.2/go.mod h1:WpS1mjBmmwHBEWmogvA2mj8546UReBk4v8QkMxJ6pZY= github.com/Microsoft/go-winio v0.6.0 h1:slsWYD/zyx7lCXoZVlvQrj0hPTM1HI4+v1sIda2yDvg= github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5 h1:TngWCqHvy9oXAN6lEVMRuU21PR1EtLVZJmdB18Gu3Rw= +github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5/go.mod h1:lmUJ/7eu/Q8D7ML55dXQrVaamCz2vxCfdQBasLZfHKk= github.com/OneOfOne/xxhash v1.2.2 h1:KMrpdQIwFcEqXDklaen+P1axHaj9BSKzvpUUfnHldSE= github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= +github.com/OpenPeeDeeP/depguard v1.1.0/go.mod h1:JtAMzWkmFEzDPyAd+W0NHl1lvpQKTvT9jnRVsohBKpc= github.com/Shopify/sarama v1.19.0/go.mod h1:FVkBWblsNy7DGZRfXLU0O9RCGt5g3g3yEuWXgklEdEo= github.com/Shopify/toxiproxy v2.1.4+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMxUHB2q5Ap20/P/eIdh4G0pI= +github.com/StackExchange/wmi v0.0.0-20180116203802-5d049714c4a6 h1:fLjPD/aNc3UIOA6tDi6QXUemppXK3P9BI7mr2hd6gx8= +github.com/VictoriaMetrics/fastcache v1.6.0 h1:C/3Oi3EiBCqufydp1neRZkqcwmEiuRT9c3fqvvgKm5o= github.com/VividCortex/gohistogram v1.0.0 h1:6+hBz+qvs0JOrrNhhmR7lFxo5sINxBCGXrdtl/UvroE= github.com/VividCortex/gohistogram v1.0.0/go.mod h1:Pf5mBqqDxYaXu3hDrrU+w6nw50o/4+TcAqDqk/vUH7g= +github.com/Workiva/go-datastructures v1.0.53/go.mod h1:1yZL+zfsztete+ePzZz/Zb1/t5BnDuE2Ya2MMGhzP6A= github.com/adlio/schema v1.3.3 h1:oBJn8I02PyTB466pZO1UZEn1TV5XLlifBSyMrmHl/1I= +github.com/adlio/schema v1.3.3/go.mod h1:1EsRssiv9/Ce2CMzq5DoL7RiMshhuigQxrR4DMV9fHg= github.com/aead/siphash v1.0.1/go.mod h1:Nywa3cDsYNNK3gaciGTWPwHt0wlpNV15vwmswBAUSII= github.com/afex/hystrix-go v0.0.0-20180502004556-fa1af6a1f4f5/go.mod h1:SkGFH1ia65gfNATL8TAiHDNxPzPdmEL5uirI2Uyuz6c= +github.com/ajstarks/svgo v0.0.0-20180226025133-644b8db467af/go.mod h1:K08gAheRH3/J6wwsYMMT4xOr94bZjxIelGM0+d/wbFw= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= +github.com/alexkohler/prealloc v1.0.0/go.mod h1:VetnK3dIgFBBKmg0YnD9F9x6Icjd+9cvfHR56wJVlKE= +github.com/alingse/asasalint v0.0.10/go.mod h1:nCaoMhw7a9kSJObvQyVzNTPBDbNpdocqrSP7t/cW5+I= +github.com/andybalholm/brotli v1.0.2/go.mod h1:loMXtMfwqflxFJPmdbJO0a3KNoPuLBgiu3qAvBg8x/Y= +github.com/andybalholm/brotli v1.0.3/go.mod h1:fO7iG3H7G2nSZ7m0zPUDn85XEX2GTukHGRSepvi9Eig= +github.com/antihax/optional v0.0.0-20180407024304-ca021399b1a6/go.mod h1:V8iCPQYkqmusNa815XgQio277wI47sdRh1dUOLdyC6Q= github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= +github.com/aokoli/goutils v1.0.1/go.mod h1:SijmP0QR8LtwsmDs8Yii5Z/S4trXFGFC2oO5g9DP+DQ= github.com/apache/thrift v0.12.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= github.com/apache/thrift v0.13.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= +github.com/armon/go-metrics v0.3.9/go.mod h1:4O98XIr/9W0sxpJ8UaYkvjk10Iff7SnFrb4QAOwNTFc= +github.com/armon/go-metrics v0.3.10/go.mod h1:4O98XIr/9W0sxpJ8UaYkvjk10Iff7SnFrb4QAOwNTFc= github.com/armon/go-metrics v0.4.1 h1:hR91U9KYmb6bLBYLQjyM+3j+rcd/UhE+G78SFnF8gJA= github.com/armon/go-metrics v0.4.1/go.mod h1:E6amYzXo6aW1tqzoZGT755KkbgrJsSdpwZ+3JqfkOG4= github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= +github.com/armon/go-radix v1.0.0/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= github.com/aryann/difflib v0.0.0-20170710044230-e206f873d14a/go.mod h1:DAHtR1m6lCRdSC2Tm3DSWRPvIPr6xNKyeHdqDQSQT+A= +github.com/ashanbrown/forbidigo v1.3.0/go.mod h1:vVW7PEdqEFqapJe95xHkTfB1+XvZXBFg8t0sG2FIxmI= +github.com/ashanbrown/makezero v1.1.1/go.mod h1:i1bJLCRSCHOcOa9Y6MyF2FTfMZMFdHvxKHxgO5Z1axI= github.com/aws/aws-lambda-go v1.13.3/go.mod h1:4UKl9IzQMoD+QF79YdCuzCwp8VbmG4VAQwij/eHl5CU= +github.com/aws/aws-sdk-go v1.23.20/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= +github.com/aws/aws-sdk-go v1.25.37/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= github.com/aws/aws-sdk-go v1.27.0/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= +github.com/aws/aws-sdk-go v1.36.30/go.mod h1:hcU610XS61/+aQV88ixoOzUoG7v3b31pl2zKMmprdro= +github.com/aws/aws-sdk-go v1.40.45/go.mod h1:585smgzpB/KqRA+K3y/NL/oYRqQvpNJYvLm+LY1U59Q= github.com/aws/aws-sdk-go-v2 v0.18.0/go.mod h1:JWVYvqSMppoMJC0x5wdwiImzgXTI9FuZwxzkQq9wy+g= +github.com/aws/aws-sdk-go-v2 v1.9.1/go.mod h1:cK/D0BBs0b/oWPIcX/Z/obahJK1TT7IPVjy53i/mX/4= +github.com/aws/aws-sdk-go-v2/service/cloudwatch v1.8.1/go.mod h1:CM+19rL1+4dFWnOQKwDc7H1KwXTz+h61oUSHyhV0b3o= +github.com/aws/smithy-go v1.8.0/go.mod h1:SObp3lf9smib00L/v3U2eAKG8FyQ7iLrJnQiAmR5n+E= +github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= +github.com/benbjohnson/clock v1.3.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= @@ -97,15 +170,23 @@ github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6r github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= github.com/bgentry/speakeasy v0.1.1-0.20220910012023-760eaf8b6816 h1:41iFGWnSlI2gVpmOtVTJZNodLdLQLn/KsJqFvXwnd/s= github.com/bgentry/speakeasy v0.1.1-0.20220910012023-760eaf8b6816/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= +github.com/bkielbasa/cyclop v1.2.0/go.mod h1:qOI0yy6A7dYC4Zgsa72Ppm9kONl0RoIlPbzot9mhmeI= +github.com/blizzy78/varnamelen v0.8.0/go.mod h1:V9TzQZ4fLJ1DSrjVDfl89H7aMnTvKkApdHeyESmyR7k= +github.com/bombsimon/wsl/v3 v3.3.0/go.mod h1:st10JtZYLE4D5sC7b8xV4zTKZwAQjCH/Hy2Pm1FNZIc= +github.com/breml/bidichk v0.2.3/go.mod h1:8u2C6DnAy0g2cEq+k/A2+tr9O1s+vHGxWn0LTc70T2A= +github.com/breml/errchkjson v0.3.0/go.mod h1:9Cogkyv9gcT8HREpzi3TiqBxCqDzo8awa92zSDFcofU= github.com/btcsuite/btcd v0.20.1-beta/go.mod h1:wVuoA8VJLEcwgqHBwHmzLRazpKxTv13Px/pDuV7OomQ= -github.com/btcsuite/btcd v0.21.0-beta h1:At9hIZdJW0s9E/fAz28nrz6AmcNlSVucCH796ZteX1M= -github.com/btcsuite/btcd v0.21.0-beta/go.mod h1:ZSWyehm27aAuS9bvkATT+Xte3hjHZ+MRgMY/8NJ7K94= +github.com/btcsuite/btcd v0.22.1 h1:CnwP9LM/M9xuRrGSCGeMVs9iv09uMqwsVX7EeIpgV2c= +github.com/btcsuite/btcd v0.22.1/go.mod h1:wqgTSL29+50LRkmOVknEdmt8ZojIzhuWvgu/iptuN7Y= github.com/btcsuite/btcd/btcec/v2 v2.3.2 h1:5n0X6hX0Zk+6omWcihdYvdAlGf2DfasC0GMf7DClJ3U= github.com/btcsuite/btcd/btcec/v2 v2.3.2/go.mod h1:zYzJ8etWJQIv1Ogk7OzpWjowwOdXY1W/17j2MW85J04= github.com/btcsuite/btcd/btcutil v1.1.2 h1:XLMbX8JQEiwMcYft2EGi8zPUkoa0abKIU6/BJSRsjzQ= +github.com/btcsuite/btcd/chaincfg/chainhash v1.0.1 h1:q0rUy8C/TYNBQS1+CGKw68tLOFYSNEs0TFnxxnS9+4U= +github.com/btcsuite/btcd/chaincfg/chainhash v1.0.1/go.mod h1:7SFka0XMvUgj3hfZtydOrQY2mwhPclbT2snogU7SQQc= github.com/btcsuite/btclog v0.0.0-20170628155309-84c8d2346e9f/go.mod h1:TdznJufoqS23FtqVCzL0ZqgP5MqXbb4fg/WgDys70nA= github.com/btcsuite/btcutil v0.0.0-20190425235716-9e5f4b9a998d/go.mod h1:+5NJ2+qvTyV9exUAL/rxXi3DcLg2Ts+ymUAY5y4NvMg= -github.com/btcsuite/btcutil v1.0.2/go.mod h1:j9HUFwoQRsZL3V4n+qG+CUnEGHOarIxfC3Le2Yhbcts= +github.com/btcsuite/btcutil v1.0.3-0.20201208143702-a53e38424cce h1:YtWJF7RHm2pYCvA5t0RPmAaLUhREsKuKd+SLhxFbFeQ= +github.com/btcsuite/btcutil v1.0.3-0.20201208143702-a53e38424cce/go.mod h1:0DVlHczLPewLcPGEIeUEzfOJhqGPQ0mJJRDBtD307+o= github.com/btcsuite/go-socks v0.0.0-20170105172521-4720035b7bfd/go.mod h1:HHNXQzUsZCxOoE+CPiyCTO6x34Zs86zZUiwtpXoGdtg= github.com/btcsuite/goleveldb v0.0.0-20160330041536-7834afc9e8cd/go.mod h1:F+uVaaLLH7j4eDXPRvw78tMflu7Ie2bzYOH4Y8rRKBY= github.com/btcsuite/goleveldb v1.0.0/go.mod h1:QiK9vBlgftBg6rWQIj6wFzbPfRjiykIEhBH4obrXJ/I= @@ -113,22 +194,30 @@ github.com/btcsuite/snappy-go v0.0.0-20151229074030-0bdef8d06723/go.mod h1:8woku github.com/btcsuite/snappy-go v1.0.0/go.mod h1:8woku9dyThutzjeg+3xrA5iCpBRH8XEEg3lh6TiUghc= github.com/btcsuite/websocket v0.0.0-20150119174127-31079b680792/go.mod h1:ghJtEyQwv5/p4Mg4C0fgbePVuGr935/5ddU9Z3TmDRY= github.com/btcsuite/winsvc v1.0.0/go.mod h1:jsenWakMcC0zFBFurPLEAyrnc/teJEM1O46fmI40EZs= +github.com/bufbuild/buf v1.3.1/go.mod h1:CTRUb23N+zlm1U8ZIBKz0Sqluk++qQloB2i/MZNZHIs= github.com/bufbuild/protocompile v0.4.0 h1:LbFKd2XowZvQ/kajzguUp2DC9UEIQhIq77fZZlaQsNA= +github.com/butuzov/ireturn v0.1.1/go.mod h1:Wh6Zl3IMtTpaIKbmwzqi6olnM9ptYQxxVacMsOEFPoc= github.com/bytedance/sonic v1.5.0/go.mod h1:ED5hyg4y6t3/9Ku1R6dU/4KyJ48DZ4jPhfY1O2AihPM= github.com/bytedance/sonic v1.8.0 h1:ea0Xadu+sHlu7x5O3gKhRpQ1IKiMrSiHttPF0ybECuA= github.com/bytedance/sonic v1.8.0/go.mod h1:i736AoUSYt75HyZLoJW9ERYxcy6eaN6h4BZXU064P/U= github.com/casbin/casbin/v2 v2.1.2/go.mod h1:YcPU1XXisHhLzuxH9coDNf2FbKpjGlbCg3n9yuLkIJQ= +github.com/casbin/casbin/v2 v2.37.0/go.mod h1:vByNa/Fchek0KZUgG5wEsl7iFsiviAYKRtgrQfcJqHg= github.com/cenkalti/backoff v2.2.1+incompatible h1:tNowT99t7UNflLxfYYSlKYsBpXdEet03Pg2g16Swow4= github.com/cenkalti/backoff v2.2.1+incompatible/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM= github.com/cenkalti/backoff/v4 v4.1.1/go.mod h1:scbssz8iZGpm3xbr14ovlUdkxfGXNInqkPWOWmG2CLw= github.com/cenkalti/backoff/v4 v4.1.3 h1:cFAlzYUlVYDysBEH2T5hyJZMh3+5+WCBvSnK6Q8UtC4= github.com/cenkalti/backoff/v4 v4.1.3/go.mod h1:scbssz8iZGpm3xbr14ovlUdkxfGXNInqkPWOWmG2CLw= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= +github.com/census-instrumentation/opencensus-proto v0.3.0/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko= github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/charithe/durationcheck v0.0.9/go.mod h1:SSbRIBVfMjCi/kEB6K65XEA83D6prSM8ap1UCpNKtgg= +github.com/chavacava/garif v0.0.0-20220316182200-5cad0b5181d4/go.mod h1:W8EnPSQ8Nv4fUjc/v1/8tHFqhuOJXnRub0dTfuAQktU= +github.com/checkpoint-restore/go-criu/v5 v5.3.0/go.mod h1:E/eQpaFtUKGOOSEBZgmKAcn+zUUwWxqcaKZlF54wK8E= github.com/chenzhuoyu/base64x v0.0.0-20211019084208-fb5309c8db06/go.mod h1:DH46F32mSOjUmXrMHnKwZdA8wcEefY7UVqBKYGjpdQY= github.com/chenzhuoyu/base64x v0.0.0-20221115062448-fe3a3abad311 h1:qSGYFH7+jGhDF8vLC+iwCD4WpbV1EBDSzWkJODFLams= github.com/chenzhuoyu/base64x v0.0.0-20221115062448-fe3a3abad311/go.mod h1:b583jCggY9gE99b6G5LEC39OIiVsWj+R97kbl5odCEk= @@ -136,18 +225,22 @@ github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWR github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= github.com/chzyer/readline v1.5.1 h1:upd/6fQk4src78LMRzh5vItIt361/o4uq553V8B5sGI= github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= +github.com/cilium/ebpf v0.7.0/go.mod h1:/oI2+1shJiTGAMgl6/RgJr36Eo1jzrRcAWbcXO2usCA= github.com/circonus-labs/circonus-gometrics v2.3.1+incompatible/go.mod h1:nmEj6Dob7S7YxXgwXpfOuvO54S+tGdZdw9fuRZt25Ag= github.com/circonus-labs/circonusllhist v0.1.3/go.mod h1:kMXHVDlOchFAehlya5ePtbp5jckzBHf4XRpQvBOLI+I= +github.com/clbanning/mxj v1.8.4/go.mod h1:BVjHeAH+rl9rs6f+QIpeRl0tfu10SXn1pUSa5PVGJng= github.com/clbanning/x2j v0.0.0-20191024224557-825249438eec/go.mod h1:jMjuTZXRI4dUb/I5gc9Hdhagfvm9+RyrPryS/auMzxE= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/cncf/udpa/go v0.0.0-20210930031921-04548b0d99d4/go.mod h1:6pvJx4me5XPnfI9Z40ddWsdw2W/uZgQLFXToKeRcDiI= +github.com/cncf/xds/go v0.0.0-20210312221358-fbca930ec8ed/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20210805033703-aa0b78936158/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20211001041855-01bcc9b48dfe/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20211130200136-a8f946100490/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cockroachdb/apd/v2 v2.0.2 h1:weh8u7Cneje73dDh+2tEVLUvyBc89iwepWCD8b8034E= github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8= github.com/cockroachdb/errors v1.10.0 h1:lfxS8zZz1+OjtV4MtNWgboi/W5tyLEB6VQZBXN+0VUU= @@ -165,13 +258,20 @@ github.com/cometbft/cometbft-db v0.7.0 h1:uBjbrBx4QzU0zOEnU8KxoDl18dMNgDh+zZRUE0 github.com/cometbft/cometbft-db v0.7.0/go.mod h1:yiKJIm2WKrt6x8Cyxtq9YTEcIMPcEe4XPxhgX59Fzf0= github.com/confio/ics23/go v0.9.0 h1:cWs+wdbS2KRPZezoaaj+qBleXgUk5WOQFMP3CQFGTr4= github.com/confio/ics23/go v0.9.0/go.mod h1:4LPZ2NYqnYIVRklaozjNR1FScgDJ2s5Xrp+e/mYVRak= +github.com/containerd/console v1.0.3/go.mod h1:7LqA/THxQ86k76b8c/EMSiaJ3h1eZkMkXar0TQ1gf3U= github.com/containerd/continuity v0.3.0 h1:nisirsYROK15TAMVukJOUyGJjz4BNQJBVsNvAXZJ/eg= +github.com/containerd/continuity v0.3.0/go.mod h1:wJEAIwKOm/pBZuBd0JmeTvnLquTB1Ag8espWhkykbPM= github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= github.com/coreos/go-etcd v2.0.0+incompatible/go.mod h1:Jez6KQU2B/sWsbdaef3ED8NzMklzPG4d5KIOhIy30Tk= github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= +github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= github.com/coreos/go-systemd v0.0.0-20180511133405-39ca1b05acc7/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= +github.com/coreos/go-systemd v0.0.0-20190620071333-e64a0ec8b42a/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= +github.com/coreos/go-systemd/v22 v22.3.2/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= +github.com/coreos/go-systemd/v22 v22.3.3-0.20220203105225-a9a7ef127534/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= github.com/coreos/go-systemd/v22 v22.5.0/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= +github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= github.com/cosmos/btcutil v1.0.5 h1:t+ZFcX77LpKtDBhjucvnOH8C2l2ioGsBNEQ3jef8xFk= github.com/cosmos/btcutil v1.0.5/go.mod h1:IyB7iuqZMJlthe2tkIFL33xPyzbFYP0XVdS8P5lUPis= github.com/cosmos/cosmos-proto v1.0.0-beta.2 h1:X3OKvWgK9Gsejo0F1qs5l8Qn6xJV/AzgIWR2wZ8Nua8= @@ -196,13 +296,22 @@ github.com/cosmos/rosetta-sdk-go v0.10.0 h1:E5RhTruuoA7KTIXUcMicL76cffyeoyvNybzU github.com/cosmos/rosetta-sdk-go v0.10.0/go.mod h1:SImAZkb96YbwvoRkzSMQB6noNJXFgWl/ENIznEoYQI4= github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE= github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= +github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= +github.com/cpuguy83/go-md2man/v2 v2.0.1/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= +github.com/creachadair/atomicfile v0.2.6/go.mod h1:BRq8Une6ckFneYXZQ+kO7p1ZZP3I2fzVzf28JxrIkBc= +github.com/creachadair/command v0.0.0-20220426235536-a748effdf6a1/go.mod h1:bAM+qFQb/KwWyCc9MLC4U1jvn3XyakqP5QRkds5T6cY= github.com/creachadair/taskgroup v0.3.2 h1:zlfutDS+5XG40AOxcHDSThxKzns8Tnr9jnr6VqkYlkM= github.com/creachadair/taskgroup v0.3.2/go.mod h1:wieWwecHVzsidg2CsUnFinW1faVN4+kq+TDlRJQ0Wbk= +github.com/creachadair/tomledit v0.0.22/go.mod h1:cIu/4x5L855oSRejIqr+WRFh+mv9g4fWLiUFaApYn/Y= github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= +github.com/creack/pty v1.1.11/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= +github.com/cyphar/filepath-securejoin v0.2.3/go.mod h1:aPGpWjXOXUn2NCNjFvBE6aRxGGx79pTxQpKOJNYHHl4= +github.com/daixiang0/gci v0.4.2/go.mod h1:d0f+IJhr9loBtIq+ebwhRoTt1LGbPH96ih8bKlsRT9E= github.com/danieljoos/wincred v1.1.2 h1:QLdCxFs1/Yl4zduvBdcHB8goaYk9RARS2SgLLRuAyr0= github.com/danieljoos/wincred v1.1.2/go.mod h1:GijpziifJoIBfYh+S7BbkdUTU4LfM+QnGqR5Vl2tAx0= +github.com/davecgh/go-spew v0.0.0-20161028175848-04cdfd42973b/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v0.0.0-20171005155431-ecdeabc65495/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= @@ -211,8 +320,11 @@ github.com/decred/dcrd/crypto/blake256 v1.0.0 h1:/8DMNYp9SGi5f0w7uCm6d6M4OU2rGFK github.com/decred/dcrd/dcrec/secp256k1/v4 v4.1.0 h1:HbphB4TFFXpv7MNrT52FGrrgVXF1owhMVTHFZIlnvd4= github.com/decred/dcrd/dcrec/secp256k1/v4 v4.1.0/go.mod h1:DZGJHZMqrU4JJqFAWUS2UO1+lbSKsdiOoYi9Zzey7Fc= github.com/decred/dcrd/lru v1.0.0/go.mod h1:mxKOwFd7lFjN2GZYsiz/ecgqR6kkYAl+0pz0tEMk218= +github.com/denis-tingaikin/go-header v0.4.3/go.mod h1:0wOCWuN71D5qIgE2nz9KrKmuYBAC2Mra5RassOIQ2/c= +github.com/denisenkom/go-mssqldb v0.12.0/go.mod h1:iiK0YP1ZeepvmBQk/QpLEhhTNJgfzrpArPY/aFvc9yU= github.com/desertbit/timer v0.0.0-20180107155436-c41aec40b27f h1:U5y3Y5UE0w7amNe7Z5G/twsBW0KEalRQXZzf8ufSh9I= github.com/desertbit/timer v0.0.0-20180107155436-c41aec40b27f/go.mod h1:xH/i4TFMt8koVQZ6WFms69WAsDWr2XsYL3Hkl7jkoLE= +github.com/dgraph-io/badger/v2 v2.2007.2/go.mod h1:26P/7fbL4kUZVEVKLAKXkBXKOydDmM2p1e+NhhnBCAE= github.com/dgraph-io/badger/v2 v2.2007.4 h1:TRWBQg8UrlUhaFdco01nO2uXwzKS7zd+HVdwV/GHc4o= github.com/dgraph-io/badger/v2 v2.2007.4/go.mod h1:vSw/ax2qojzbN6eXHIx6KPKtCSHJN/Uz0X0VPruTIhk= github.com/dgraph-io/ristretto v0.0.3-0.20200630154024-f66de99634de/go.mod h1:KPxhHT9ZxKefz+PCeOGsrHpl1qZ7i70dGTu2u+Ahh6E= @@ -221,7 +333,14 @@ github.com/dgraph-io/ristretto v0.1.1/go.mod h1:S1GPSBCYCIhmVNfcth17y2zZtQT6wzkz github.com/dgryski/go-farm v0.0.0-20190423205320-6a90982ecee2/go.mod h1:SqUrOPUnsFjfmXRMNPybcSiG0BgUW2AuFH8PAnS2iTw= github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13 h1:fAjc9m62+UWV/WAFKLNi6ZS0675eEUC9y3AlwSbQu1Y= github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13/go.mod h1:SqUrOPUnsFjfmXRMNPybcSiG0BgUW2AuFH8PAnS2iTw= +github.com/dnaeon/go-vcr v1.2.0/go.mod h1:R4UdLID7HZT3taECzJs4YgbbH6PIGXB6W/sc5OLb6RQ= +github.com/docker/cli v20.10.14+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8= +github.com/docker/cli v20.10.17+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8= +github.com/docker/docker v20.10.7+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= +github.com/docker/docker v20.10.17+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/go-connections v0.4.0 h1:El9xVISelRB7BuFusrZozjnkIM5YnzCViNKohAFqRJQ= +github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec= +github.com/docker/go-units v0.4.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4= github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= @@ -239,24 +358,52 @@ github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.m github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= github.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5ynNVH9qI8YYLbd1fK2po= github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= +github.com/envoyproxy/go-control-plane v0.9.9-0.20210217033140-668b12f5399d/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= +github.com/envoyproxy/go-control-plane v0.9.9-0.20210512163311-63b5d3c536b0/go.mod h1:hliV/p42l8fGbc6Y9bQ70uLwIvmJyVE5k4iMKlh8wCQ= github.com/envoyproxy/go-control-plane v0.9.10-0.20210907150352-cf90f659a021/go.mod h1:AFq3mo9L8Lqqiid3OhADV3RfLJnjiw63cSpi+fDTRC0= +github.com/envoyproxy/go-control-plane v0.10.1/go.mod h1:AY7fTTXNdv/aJ2O5jwpxAPOWUZ7hQAEvzN5Pf27BkQQ= github.com/envoyproxy/go-control-plane v0.10.2-0.20220325020618-49ff273808a1/go.mod h1:KJwIaB5Mv44NWtYuAOFCVOjcI94vtpEz2JU/D2v6IjE= +github.com/envoyproxy/protoc-gen-validate v0.0.14/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= +github.com/envoyproxy/protoc-gen-validate v0.6.2/go.mod h1:2t7qjJNvHPx8IjnBOzl9E9/baC+qXE/TeeyBRzgJDws= +github.com/esimonov/ifshort v1.0.4/go.mod h1:Pe8zjlRrJ80+q2CxHLfEOfTwxCZ4O+MuhcHcfgNWTk0= +github.com/ethereum/go-ethereum v1.10.21 h1:5lqsEx92ZaZzRyOqBEXux4/UR06m296RGzN3ol3teJY= +github.com/ethereum/go-ethereum v1.10.21/go.mod h1:EYFyF19u3ezGLD4RqOkLq+ZCXzYbLoNDdZlMt7kyKFg= +github.com/ettle/strcase v0.1.1/go.mod h1:hzDLsPC7/lwKyBOywSHEP89nt2pDgdy+No1NBA9o9VY= +github.com/facebookgo/ensure v0.0.0-20160127193407-b4ab57deab51/go.mod h1:Yg+htXGokKKdzcwhuNDwVvN+uBxDGXJ7G/VN1d8fa64= github.com/facebookgo/ensure v0.0.0-20200202191622-63f1cf65ac4c h1:8ISkoahWXwZR41ois5lSJBSVw4D0OV19Ht/JSTzvSv0= github.com/facebookgo/stack v0.0.0-20160209184415-751773369052 h1:JWuenKqqX8nojtoVVWjGfOF9635RETekkoH6Cc9SX0A= +github.com/facebookgo/stack v0.0.0-20160209184415-751773369052/go.mod h1:UbMTZqLaRiH3MsBH8va0n7s1pQYcu3uTb8G4tygF4Zg= +github.com/facebookgo/subset v0.0.0-20150612182917-8dac2c3c4870/go.mod h1:5tD+neXqOorC30/tWg0LCSkrqj/AR6gu8yY8/fpw1q0= github.com/facebookgo/subset v0.0.0-20200203212716-c811ad88dec4 h1:7HZCaLC5+BZpmbhCOZJ293Lz68O7PYrF2EzeiFMwCLk= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= +github.com/fatih/color v1.9.0/go.mod h1:eQcE1qtQxscV5RaZvpXrrb8Drkc3/DdQ+uUYCNjL+zU= +github.com/fatih/color v1.10.0/go.mod h1:ELkj/draVOlAH/xkhN6mQ50Qd0MPOk5AAr3maGEBuJM= +github.com/fatih/color v1.12.0/go.mod h1:ELkj/draVOlAH/xkhN6mQ50Qd0MPOk5AAr3maGEBuJM= +github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk= +github.com/fatih/structtag v1.2.0/go.mod h1:mBJUNpUnHmRKrKlQQlmCrh5PuhftFbNv8Ys4/aAZl94= github.com/felixge/httpsnoop v1.0.1/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= github.com/felixge/httpsnoop v1.0.2 h1:+nS9g82KMXccJ/wp0zyRW9ZBHFETmMGtkk+2CTTrW4o= github.com/felixge/httpsnoop v1.0.2/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= +github.com/firefart/nonamedreturns v1.0.4/go.mod h1:TDhe/tjI1BXo48CmYbUduTV7BdIga8MAO/xbKdcVsGI= +github.com/fogleman/gg v1.2.1-0.20190220221249-0403632d5b90/go.mod h1:R/bRT+9gY/C5z7JzPU0zXsXHKM4/ayA+zqcVNZzPa1k= github.com/fortytw2/leaktest v1.3.0 h1:u8491cBMTQ8ft8aeV+adlcytMZylmA5nnwwkRZjI8vw= +github.com/fortytw2/leaktest v1.3.0/go.mod h1:jDsjWgpAGjm2CA7WthBh/CdZYEPF31XHquHwclZch5g= github.com/franela/goblin v0.0.0-20200105215937-c9ffbefa60db/go.mod h1:7dvUGVsVBjqR7JHJk0brhHOZYGmfBYOrK0ZhYMEtBr4= +github.com/franela/goblin v0.0.0-20210519012713-85d372ac71e2/go.mod h1:VzmDKDJVZI3aJmnRI9VjAn9nJ8qPPsN1fqzr9dqInIo= github.com/franela/goreq v0.0.0-20171204163338-bcd34c9993f8/go.mod h1:ZhphrRTfi2rbfLwlschooIH4+wKKDR4Pdxhh+TRoA20= +github.com/frankban/quicktest v1.11.3/go.mod h1:wRf/ReqHper53s+kmmSZizM8NamnL3IM0I9ntUbOk+k= +github.com/frankban/quicktest v1.14.2/go.mod h1:mgiwOwqx65TmIk1wJ6Q7wvnVMocbUorkibMOrVTHZps= github.com/frankban/quicktest v1.14.3 h1:FJKSZTDHjyhriyC81FLQ0LY93eSai0ZyR/ZIkd3ZUKE= +github.com/frankban/quicktest v1.14.3/go.mod h1:mgiwOwqx65TmIk1wJ6Q7wvnVMocbUorkibMOrVTHZps= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= +github.com/fsnotify/fsnotify v1.5.1/go.mod h1:T3375wBYaZdLLcVNkcVbzGHY7f1l/uK5T5Ai1i3InKU= +github.com/fsnotify/fsnotify v1.5.4/go.mod h1:OVB6XrOHzAwXMpEM7uPOzcehqUV2UqJxmVXmkdnm1bU= github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4HY= github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw= +github.com/fullstorydev/grpcurl v1.6.0/go.mod h1:ZQ+ayqbKMJNhzLmbpCiurTVlaK2M/3nqZCxaQ2Ze/sM= +github.com/fzipp/gocyclo v0.6.0/go.mod h1:rXPyn8fnlpa0R2csP/31uerbiVBugk5whMdlyaLkLoA= github.com/getsentry/sentry-go v0.23.0 h1:dn+QRCeJv4pPt9OjVXiMcGIBIefaTJPw/h0bZWO05nE= github.com/getsentry/sentry-go v0.23.0/go.mod h1:lc76E2QywIyW8WuBnwl8Lc4bkmQH4+w1gwTf25trprY= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= @@ -264,6 +411,7 @@ github.com/gin-contrib/sse v0.1.0 h1:Y/yl/+YNO8GZSjAhjMsSuLt29uWRFHdHYUb5lYOV9qE github.com/gin-contrib/sse v0.1.0/go.mod h1:RHrZQHXnP2xjPF+u1gW/2HnVO7nvIa9PG3Gm+fLHvGI= github.com/gin-gonic/gin v1.9.0 h1:OjyFBKICoexlu99ctXNR2gg+c5pKrKMuyjgARg9qeY8= github.com/gin-gonic/gin v1.9.0/go.mod h1:W1Me9+hsUSyj3CePGrd1/QrKJMSJ1Tu/0hFEH89961k= +github.com/go-critic/go-critic v0.6.3/go.mod h1:c6b3ZP1MQ7o6lPR7Rv3lEf7pYQUmAcx8ABHgdZCQt/k= github.com/go-errors/errors v1.4.2 h1:J6MZopCL4uSllY1OfXM374weqZFFItUbrImctkmUxIA= github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= @@ -273,6 +421,8 @@ github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2 github.com/go-kit/kit v0.10.0/go.mod h1:xUsJbQ/Fp4kEt7AFgCuvyX4a71u8h9jB8tj/ORgOZ7o= github.com/go-kit/kit v0.12.0 h1:e4o3o3IsBfAKQh5Qbbiqyfu97Ku7jrO/JbohvztANh4= github.com/go-kit/kit v0.12.0/go.mod h1:lHd+EkCZPIwYItmGDDRdhinkzX2A1sj+M9biaEaizzs= +github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY= +github.com/go-kit/log v0.2.0/go.mod h1:NwTd00d/i8cPZ3xOwwiv2PO5MOcx78fFErGNcVmBjv0= github.com/go-kit/log v0.2.1 h1:MRVx0/zhvdseW+Gza6N9rVzU/IVzaeE1SFI4raAhmBU= github.com/go-kit/log v0.2.1/go.mod h1:NwTd00d/i8cPZ3xOwwiv2PO5MOcx78fFErGNcVmBjv0= github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= @@ -280,6 +430,8 @@ github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= github.com/go-logfmt/logfmt v0.5.1 h1:otpy5pqBCBZ1ng9RQ0dPu4PN7ba75Y/aA+UpowDyNVA= github.com/go-logfmt/logfmt v0.5.1/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs= +github.com/go-ole/go-ole v1.2.6 h1:/Fpf6oFPoeFik9ty7siob0G6Ke8QvQEuVcuChpwXzpY= +github.com/go-ole/go-ole v1.2.6/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0= github.com/go-playground/assert/v2 v2.2.0/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4= github.com/go-playground/locales v0.14.1 h1:EWaQ/wswjilfKLTECiXz7Rh+3BjFhfDFKv/oXslEjJA= github.com/go-playground/locales v0.14.1/go.mod h1:hxrqLVvrK65+Rwrd5Fc6F2O76J/NuW9t0sjnWqG1slY= @@ -287,8 +439,25 @@ github.com/go-playground/universal-translator v0.18.1 h1:Bcnm0ZwsGyWbCzImXv+pAJn github.com/go-playground/universal-translator v0.18.1/go.mod h1:xekY+UJKNuX9WP91TpwSH2VMlDf28Uj24BCp08ZFTUY= github.com/go-playground/validator/v10 v10.11.2 h1:q3SHpufmypg+erIExEKUmsgmhDTyhcJ38oeKGACXohU= github.com/go-playground/validator/v10 v10.11.2/go.mod h1:NieE624vt4SCTJtD87arVLvdmjPAeV8BQlHtMnw9D7s= +github.com/go-redis/redis v6.15.8+incompatible/go.mod h1:NAIEuMOZ/fxfXJIrKDQDz8wamY7mA7PouImQ2Jvg6kA= github.com/go-sql-driver/mysql v1.4.0/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= +github.com/go-sql-driver/mysql v1.5.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg= +github.com/go-sql-driver/mysql v1.6.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg= +github.com/go-stack/stack v1.8.0 h1:5SgMzNM5HxrEjV0ww2lTmX6E2Izsfxas4+YHWRs3Lsk= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= +github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE= +github.com/go-toolsmith/astcast v1.0.0/go.mod h1:mt2OdQTeAQcY4DQgPSArJjHCcOwlX+Wl/kwN+LbLGQ4= +github.com/go-toolsmith/astcopy v1.0.0/go.mod h1:vrgyG+5Bxrnz4MZWPF+pI4R8h3qKRjjyvV/DSez4WVQ= +github.com/go-toolsmith/astequal v1.0.0/go.mod h1:H+xSiq0+LtiDC11+h1G32h7Of5O3CYFJ99GVbS5lDKY= +github.com/go-toolsmith/astequal v1.0.1/go.mod h1:4oGA3EZXTVItV/ipGiOx7NWkY5veFfcsOJVS2YxltLw= +github.com/go-toolsmith/astfmt v1.0.0/go.mod h1:cnWmsOAuq4jJY6Ct5YWlVLmcmLMn1JUPuQIHCY7CJDw= +github.com/go-toolsmith/astp v1.0.0/go.mod h1:RSyrtpVlfTFGDYRbrjyWP1pYu//tSFcvdYrA8meBmLI= +github.com/go-toolsmith/pkgload v1.0.2-0.20220101231613-e814995d17c5/go.mod h1:3NAwwmD4uY/yggRxoEjk/S00MIV3A+H7rrE3i87eYxM= +github.com/go-toolsmith/strparse v1.0.0/go.mod h1:YI2nUKP9YGZnL/L1/DLFBfixrcjslWct4wyljWhSRy8= +github.com/go-toolsmith/typep v1.0.2/go.mod h1:JSQCQMUPdRlMZFswiq3TGpNp1GMktqkR2Ns5AIQkATU= +github.com/go-xmlfmt/xmlfmt v0.0.0-20191208150333-d5b6f63a941b/go.mod h1:aUCEOzzezBEjDBbFBoSiya/gduyIiWYRP6CnSFIV8AM= +github.com/go-zookeeper/zk v1.0.2/go.mod h1:nOB03cncLtlp4t+UAkGSV+9beXP/akpekBwL+UX1Qcw= +github.com/gobwas/glob v0.2.3/go.mod h1:d3Ez4x06l9bZtSvzIay5+Yzi0fmZzPgnTbPcKjJAkT8= github.com/gobwas/httphead v0.0.0-20180130184737-2c6c146eadee h1:s+21KNqlpePfkah2I+gwHF8xmJWRjooY+5248k6m4A0= github.com/gobwas/httphead v0.0.0-20180130184737-2c6c146eadee/go.mod h1:L0fX3K22YWvt/FAX9NnzrNzcI4wNYi9Yku4O0LKYflo= github.com/gobwas/pool v0.2.0 h1:QEmUOlnSjWtnpRGHF3SauEiOsy82Cup83Vf2LcMlnc8= @@ -300,6 +469,9 @@ github.com/goccy/go-json v0.10.0/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MG github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2 h1:ZpnhV/YsD2/4cESfV5+Hoeu/iUR3ruzNvZ+yQfO03a0= github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2/go.mod h1:bBOAhwG1umN6/6ZUMtDFBMQR8jRg9O75tm9K00oMsK4= github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= +github.com/godbus/dbus/v5 v5.0.6/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= +github.com/gofrs/flock v0.8.1/go.mod h1:F1TvTiK9OcQqauNUHlbJvyl9Qa1QvF/gOUDKA14jxHU= +github.com/gofrs/uuid v4.2.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= github.com/gogo/googleapis v1.1.0/go.mod h1:gf4bu3Q80BeJ6H1S1vYPm8/ELATdvryBaNFGgqEef3s= github.com/gogo/googleapis v1.4.1-0.20201022092350-68b0159b7869/go.mod h1:5YRNX2z1oM5gXdAkurHa942MDgEJyk02w4OecKY87+c= github.com/gogo/googleapis v1.4.1 h1:1Yx4Myt7BxzvUr5ldGSbwYiZG6t9wGBZ+8/fX3Wvtq0= @@ -307,10 +479,15 @@ github.com/gogo/googleapis v1.4.1/go.mod h1:2lpHqI5OcWCtVElxXnPt+s8oJvMpySlOyM6x github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= github.com/gogo/protobuf v1.2.0/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= +github.com/gogo/protobuf v1.3.0/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= +github.com/golang-jwt/jwt/v4 v4.0.0/go.mod h1:/xlHOz8bRuivTWchD4jCa+NbatV+wEUSzwAxVc6locg= github.com/golang-jwt/jwt/v4 v4.4.2/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0= +github.com/golang-sql/civil v0.0.0-20190719163853-cb61b32ac6fe/go.mod h1:8vg3r2VgvsThLBIFL93Qb5yWzgyZWhEmBwUJWevAkK0= +github.com/golang-sql/sqlexp v0.0.0-20170517235910-f1bb20e5a188/go.mod h1:vXjM/+wXQnTPR4KqTKDgJukSZ6amVRtWMPEjE6sQoK8= +github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0/go.mod h1:E/TSTwGwJL78qG/PmXZO1EjYhfJinVAhrmmHX6Z8B9k= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= github.com/golang/glog v1.1.2 h1:DVjP2PbBOzHyzA+dn3WhHIq4NdVu3Q+pvivFICf/7fo= github.com/golang/glog v1.1.2/go.mod h1:zR+okUeTbrL6EL3xHUDxZuEtGv04p5shwip1+mL/rLQ= @@ -318,6 +495,7 @@ github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903/go.mod h1:cIg4er github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= @@ -325,8 +503,10 @@ github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4= +github.com/golang/mock v1.5.0/go.mod h1:CWnOUgYIOo4TcNZ0wHX3YZCqsaM1I1Jvs6v3mP3KVu8= github.com/golang/mock v1.6.0 h1:ErTB+efbowRARo13NNdxyJji2egdxLGQhRaY+DUumQc= github.com/golang/mock v1.6.0/go.mod h1:p6yTPP+5HYm5mzsMV8JkE6ZKdX+/wYM6Hr+LicevLPs= +github.com/golang/protobuf v1.1.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.0/go.mod h1:Qd/q+1AKNOZr9uGQzbzCmRO6sUih6GTPZv6a1/R87v0= github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= @@ -343,17 +523,31 @@ github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QD github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= +github.com/golang/protobuf v1.5.1/go.mod h1:DopwsBzvsk0Fs44TXzsVbJyPhcCPeIwnvohx4u74HPM= github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= +github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM= github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= +github.com/golangci/check v0.0.0-20180506172741-cfe4005ccda2/go.mod h1:k9Qvh+8juN+UKMCS/3jFtGICgW8O96FVaZsaxdzDkR4= +github.com/golangci/dupl v0.0.0-20180902072040-3e9179ac440a/go.mod h1:ryS0uhF+x9jgbj/N71xsEqODy9BN81/GonCZiOzirOk= +github.com/golangci/go-misc v0.0.0-20220329215616-d24fe342adfe/go.mod h1:gjqyPShc/m8pEMpk0a3SeagVb0kaqvhscv+i9jI5ZhQ= +github.com/golangci/gofmt v0.0.0-20190930125516-244bba706f1a/go.mod h1:9qCChq59u/eW8im404Q2WWTrnBUQKjpNYKMbU4M7EFU= +github.com/golangci/golangci-lint v1.47.0/go.mod h1:3TZhfF5KolbIkXYjUFvER6G9CoxzLEaafr/u/QI1S5A= +github.com/golangci/lint-1 v0.0.0-20191013205115-297bf364a8e0/go.mod h1:66R6K6P6VWk9I95jvqGxkqJxVWGFy9XlDwLwVz1RCFg= +github.com/golangci/maligned v0.0.0-20180506175553-b1d89398deca/go.mod h1:tvlJhZqDe4LMs4ZHD0oMUlt9G2LWuDGoisJTBzLMV9o= +github.com/golangci/misspell v0.3.5/go.mod h1:dEbvlSfYbMQDtrpRMQU675gSDLDNa8sCPPChZ7PhiVA= +github.com/golangci/revgrep v0.0.0-20210930125155-c22e5001d4f2/go.mod h1:LK+zW4MpyytAWQRz0M4xnzEk50lSvqDQKfx304apFkY= +github.com/golangci/unconvert v0.0.0-20180507085042-28b1c447d1f4/go.mod h1:Izgrg8RkN3rCIMLGE9CyYmU9pY2Jer6DgANEnZ/L/cQ= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.1.2 h1:xf4v41cLI2Z6FxbKm+8Bu+m8ifhj15JuZ9sa0jZCMUU= github.com/google/btree v1.1.2/go.mod h1:qOPhT0dTNdNzV6Z/lhRX0YXUafgPLFUh+gZMl761Gm4= +github.com/google/certificate-transparency-go v1.0.21/go.mod h1:QeJfpSbVSfYc7RgB3gJFj9cbuQMMchQxrWXz8Ruopmg= +github.com/google/certificate-transparency-go v1.1.1/go.mod h1:FDKqPvSXawb2ecErVRrD+nfy23RCzyl7eqVCEmlT1Zs= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= @@ -362,9 +556,12 @@ github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.7/go.mod h1:n+brtR0CgQNWTVd5ZUFpTBC8YFBDLK/h/bpaJ8/DtOE= +github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/gofuzz v0.0.0-20170612174753-24818f796faf/go.mod h1:HP5RmnzzSNb993RKQDq4+1A4ia9nllfqcQFTQJedwGI= @@ -373,6 +570,7 @@ github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0= github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= github.com/google/martian/v3 v3.1.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= +github.com/google/martian/v3 v3.2.1/go.mod h1:oBOf6HBosgwRXnUGWUB05QECsc6uvmMiJ3+6W4l/CUk= github.com/google/orderedcode v0.0.1 h1:UzfcAexk9Vhv8+9pNOgRu41f16lHq725vPwnSeiG/Us= github.com/google/orderedcode v0.0.1/go.mod h1:iVyU4/qPKHY5h/wSd6rZZCDcLJNxiWO6dvsYES2Sb20= github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= @@ -381,17 +579,39 @@ github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hf github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200507031123-427632fa3b1c/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20201023163331-3e6fc7fc9c4c/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20201203190320-1bf35d6f28c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20201218002935-b9804c9f04c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20210122040257-d980be63207e/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20210226084205-cbba55b83ad5/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20210601050228-01bbb1931b22/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20210609004039-a478d1d731e9/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= +github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510/go.mod h1:pupxD2MaaD3pAXIBCelhxNneeOaAeabZDe5s4K6zSpQ= +github.com/google/trillian v1.3.11/go.mod h1:0tPraVHrSDkA3BO6vKX67zgLXs6SsOAbHEivX+9mPgw= +github.com/google/uuid v0.0.0-20161128191214-064e2069ce9c/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I= +github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= +github.com/googleapis/gax-go/v2 v2.1.0/go.mod h1:Q3nei7sK6ybPYH7twZdmQpAd1MKb7pfu6SK+H1/DsU0= +github.com/googleapis/gax-go/v2 v2.1.1/go.mod h1:hddJymUZASv3XPyGkUpKj8pPO47Rmb0eJc8R6ouapiM= +github.com/googleapis/gax-go/v2 v2.2.0/go.mod h1:as02EH8zWkzwUoLbBaFeQ+arQaj/OthfcblKl4IGNaM= +github.com/googleapis/gax-go/v2 v2.3.0/go.mod h1:b8LNqSzNabLiUpXKkY7HAR5jr6bIT99EXz9pXxye9YM= +github.com/googleapis/gax-go/v2 v2.4.0/go.mod h1:XOTVJ59hdnfJLIP/dh8n5CGryZR2LxK9wbMD5+iXC6c= github.com/googleapis/google-cloud-go-testing v0.0.0-20200911160855-bcd43fbb19e8/go.mod h1:dvDLG8qkwmyD9a/MJJN3XJcT3xFxOKAvTZGvuZmac9g= +github.com/gookit/color v1.5.1/go.mod h1:wZFzea4X8qN6vHOSP2apMb4/+w/orMznEzYsIHPaqKM= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= +github.com/gordonklaus/ineffassign v0.0.0-20200309095847-7953dde2c7bf/go.mod h1:cuNKsD1zp2v6XfE/orVX2QE1LC+i254ceGcVeDT3pTU= +github.com/gordonklaus/ineffassign v0.0.0-20210914165742-4cc7213b9bc8/go.mod h1:Qcp2HIAYhR7mNUVSIxZww3Guk4it82ghYcEXIAk+QT0= +github.com/gorhill/cronexpr v0.0.0-20180427100037-88b0669f7d75/go.mod h1:g2644b03hfBX9Ov0ZBDgXXens4rxSxmqFBbhvKv2yVA= github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg= github.com/gorilla/handlers v1.5.1 h1:9lRY6j8DEeeBT10CvO9hGW0gmky0BprnvDI5vfhUHH4= github.com/gorilla/handlers v1.5.1/go.mod h1:t8XrUpc4KVXb7HGyJ4/cEnwQiaxrX/hz1Zv/4g96P1Q= @@ -403,12 +623,27 @@ github.com/gorilla/websocket v0.0.0-20170926233335-4201258b820c/go.mod h1:E7qHFY github.com/gorilla/websocket v1.4.1/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWmnc= github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= +github.com/gostaticanalysis/analysisutil v0.0.0-20190318220348-4088753ea4d3/go.mod h1:eEOZF4jCKGi+aprrirO9e7WKB3beBRtWgqGunKl6pKE= +github.com/gostaticanalysis/analysisutil v0.0.3/go.mod h1:eEOZF4jCKGi+aprrirO9e7WKB3beBRtWgqGunKl6pKE= +github.com/gostaticanalysis/analysisutil v0.1.0/go.mod h1:dMhHRU9KTiDcuLGdy87/2gTR8WruwYZrKdRq9m1O6uw= +github.com/gostaticanalysis/analysisutil v0.4.1/go.mod h1:18U/DLpRgIUd459wGxVHE0fRgmo1UgHDcbw7F5idXu0= +github.com/gostaticanalysis/analysisutil v0.7.1/go.mod h1:v21E3hY37WKMGSnbsw2S/ojApNWb6C1//mXO48CXbVc= +github.com/gostaticanalysis/comment v1.3.0/go.mod h1:xMicKDx7XRXYdVwY9f9wQpDJVnqWxw9wCauCMKp+IBI= +github.com/gostaticanalysis/comment v1.4.1/go.mod h1:ih6ZxzTHLdadaiSnF5WY3dxUoXfXAlTaRzuaNDlSado= +github.com/gostaticanalysis/comment v1.4.2/go.mod h1:KLUTGDv6HOCotCH8h2erHKmpci2ZoR8VPu34YA2uzdM= +github.com/gostaticanalysis/forcetypeassert v0.1.0/go.mod h1:qZEedyP/sY1lTGV1uJ3VhWZ2mqag3IkWsDHVbplHXak= +github.com/gostaticanalysis/nilerr v0.1.1/go.mod h1:wZYb6YI5YAxxq0i1+VJbY0s2YONW0HU0GPE3+5PWN4A= +github.com/gostaticanalysis/testutil v0.3.1-0.20210208050101-bfb5c8eec0e4/go.mod h1:D+FIZ+7OahH3ePw/izIEeH5I06eKs1IKI4Xr64/Am3M= +github.com/gostaticanalysis/testutil v0.4.0/go.mod h1:bLIoPefWXrRi/ssLFWX1dx7Repi5x3CuviD3dgAZaBU= +github.com/gotestyourself/gotestyourself v2.2.0+incompatible/go.mod h1:zZKM6oeNM8k+FRljX1mnzVYeS8wiGgQyvST1/GafPbY= +github.com/gregjones/httpcache v0.0.0-20190611155906-901d90724c79/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= github.com/grpc-ecosystem/go-grpc-middleware v1.0.1-0.20190118093823-f849b5445de4/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= github.com/grpc-ecosystem/go-grpc-middleware v1.2.2/go.mod h1:EaizFBKfUKtMIF5iaDEhniwNedqGo9FuLFzppDr3uwI= github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 h1:+9834+KizmvFV7pXQGSXQTsaWhq2GjuNUt0aUU0YBYw= github.com/grpc-ecosystem/go-grpc-middleware v1.3.0/go.mod h1:z0ButlSOZa5vEBq9m2m2hlwIgKw+rp3sdCBRoJY+30Y= github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= github.com/grpc-ecosystem/grpc-gateway v1.9.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= +github.com/grpc-ecosystem/grpc-gateway v1.12.1/go.mod h1:8XEsbTttt/W+VvjtQhLACqCisSPWTxCZ7sBRjU6iH9c= github.com/grpc-ecosystem/grpc-gateway v1.16.0 h1:gmcG1KaJ57LophUzW0Hy8NmPhnMZb4M0+kPpLofRdBo= github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c h1:6rhixN/i8ZofjG1Y75iExal34USq5p+wiN1tpie8IrU= @@ -419,59 +654,102 @@ github.com/gtank/merlin v0.1.1/go.mod h1:T86dnYJhcGOh5BjZFCJWTDeTK7XW8uE+E21Cy/b github.com/gtank/ristretto255 v0.1.2 h1:JEqUCPA1NvLq5DwYtuzigd7ss8fwbYay9fi4/5uMzcc= github.com/gtank/ristretto255 v0.1.2/go.mod h1:Ph5OpO6c7xKUGROZfWVLiJf9icMDwUeIvY4OmlYW69o= github.com/hashicorp/consul/api v1.3.0/go.mod h1:MmDNSzIMUjNpY/mQ398R4bk2FnqQLoPndWW5VkKPlCE= +github.com/hashicorp/consul/api v1.10.1/go.mod h1:XjsvQN+RJGWI2TWy1/kqaE16HrR2J/FWgkYjdZQsX9M= +github.com/hashicorp/consul/api v1.11.0/go.mod h1:XjsvQN+RJGWI2TWy1/kqaE16HrR2J/FWgkYjdZQsX9M= +github.com/hashicorp/consul/api v1.12.0/go.mod h1:6pVBMo0ebnYdt2S3H87XhekM/HHrUoTD2XXb/VrZVy0= github.com/hashicorp/consul/sdk v0.3.0/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8= +github.com/hashicorp/consul/sdk v0.8.0/go.mod h1:GBvyrGALthsZObzUGsfgHZQDXjg4lOjagTIwIR1vPms= github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= github.com/hashicorp/go-cleanhttp v0.5.0/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= +github.com/hashicorp/go-cleanhttp v0.5.2/go.mod h1:kO/YDlP8L1346E6Sodw+PrpBSV4/SoxCXGY6BqNFT48= +github.com/hashicorp/go-hclog v0.12.0/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ= +github.com/hashicorp/go-hclog v0.16.2/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ= +github.com/hashicorp/go-hclog v1.0.0/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ= +github.com/hashicorp/go-hclog v1.2.0/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ= github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= github.com/hashicorp/go-immutable-radix v1.3.1 h1:DKHmCUm2hRBK510BaiZlwvpD40f8bJFeZnpfm2KLowc= github.com/hashicorp/go-immutable-radix v1.3.1/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= +github.com/hashicorp/go-multierror v1.1.0/go.mod h1:spPvp8C1qA32ftKqdAHm4hHTbPw+vmowP0z+KUhOZdA= +github.com/hashicorp/go-multierror v1.1.1/go.mod h1:iw975J/qwKPdAO1clOe2L8331t/9/fmwbPZ6JB6eMoM= github.com/hashicorp/go-retryablehttp v0.5.3/go.mod h1:9B5zBasrRhHXnJnui7y6sL7es7NDiJgTc6Er0maI1Xs= github.com/hashicorp/go-rootcerts v1.0.0/go.mod h1:K6zTfqpRlCUIjkwsN4Z+hiSfzSTQa6eBIzfwKfwNnHU= +github.com/hashicorp/go-rootcerts v1.0.2/go.mod h1:pqUvnprVnM5bf7AOirdbb01K4ccR319Vf4pU3K5EGc8= github.com/hashicorp/go-sockaddr v1.0.0/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerXegt+ozgdvDeDU= github.com/hashicorp/go-syslog v1.0.0/go.mod h1:qPfqrKkXGihmCqbJM2mZgkZGvKG1dFdvsLplgctolz4= github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= github.com/hashicorp/go-uuid v1.0.1 h1:fv1ep09latC32wFoVwnqcnKJGnMSdBanPczbHAYm1BE= github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= github.com/hashicorp/go-version v1.2.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= +github.com/hashicorp/go-version v1.2.1/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= +github.com/hashicorp/go-version v1.6.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/hashicorp/go.net v0.0.1/go.mod h1:hjKkEWcCURg++eb33jQU7oqQcI9XDCnUzHA0oac0k90= github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= +github.com/hashicorp/golang-lru v0.5.4/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= github.com/hashicorp/golang-lru v0.5.5-0.20210104140557-80c98217689d h1:dg1dEPuWpEqDnvIw251EVy4zlP8gWbsGj4BsUKCRpYs= github.com/hashicorp/golang-lru v0.5.5-0.20210104140557-80c98217689d/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4= github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64= github.com/hashicorp/mdns v1.0.0/go.mod h1:tL+uN++7HEJ6SQLQ2/p+z2pH24WQKWjBPkE0mNTz8vQ= +github.com/hashicorp/mdns v1.0.1/go.mod h1:4gW7WsVCke5TE7EPeYliwHlRUyBtfCwuFwuMg2DmyNY= +github.com/hashicorp/mdns v1.0.4/go.mod h1:mtBihi+LeNXGtG8L9dX59gAEa12BDtBQSp4v/YAJqrc= github.com/hashicorp/memberlist v0.1.3/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2pPBoIllUwCN7I= +github.com/hashicorp/memberlist v0.2.2/go.mod h1:MS2lj3INKhZjWNqd3N0m3J+Jxf3DAOnAH9VT3Sh9MUE= +github.com/hashicorp/memberlist v0.3.0/go.mod h1:MS2lj3INKhZjWNqd3N0m3J+Jxf3DAOnAH9VT3Sh9MUE= github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc= +github.com/hashicorp/serf v0.9.5/go.mod h1:UWDWwZeL5cuWDJdl0C6wrvrUwEqtQ4ZKBKKENpqIUyk= +github.com/hashicorp/serf v0.9.6/go.mod h1:TXZNMjZQijwlDvp+r0b63xZ45H7JmCmgg4gpTwn9UV4= +github.com/hashicorp/serf v0.9.7/go.mod h1:TXZNMjZQijwlDvp+r0b63xZ45H7JmCmgg4gpTwn9UV4= github.com/hdevalence/ed25519consensus v0.1.0 h1:jtBwzzcHuTmFrQN6xQZn6CQEO/V9f7HsjsjeEZ6auqU= github.com/hdevalence/ed25519consensus v0.1.0/go.mod h1:w3BHWjwJbFU29IRHL1Iqkw3sus+7FctEyM4RqDxYNzo= +github.com/hexops/gotextdiff v1.0.3/go.mod h1:pSWU5MAI3yDq+fZBTazCSJysOMbxWL1BSow5/V2vxeg= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= github.com/huandu/go-assert v1.1.5 h1:fjemmA7sSfYHJD7CUqs9qTwwfdNAx7/j2/ZlHXzNB3c= github.com/huandu/go-assert v1.1.5/go.mod h1:yOLvuqZwmcHIC5rIzrBhT7D3Q9c3GFnd0JrPVhn/06U= github.com/huandu/skiplist v1.2.0 h1:gox56QD77HzSC0w+Ws3MH3iie755GBJU1OER3h5VsYw= github.com/huandu/skiplist v1.2.0/go.mod h1:7v3iFjLcSAzO4fN5B8dvebvo/qsfumiLiDXMrPiHF9w= +github.com/huandu/xstrings v1.0.0/go.mod h1:4qWG/gcEcfX4z/mBDHJ++3ReCw9ibxbsNJbcucJdbSo= +github.com/huandu/xstrings v1.2.0/go.mod h1:DvyZB1rfVYsBIigL8HwpZgxHwXozlTgGqn63UyNX5k4= github.com/hudl/fargo v1.3.0/go.mod h1:y3CKSmjA+wD2gak7sUSXTAoopbhU08POFhmITJgmKTg= +github.com/hudl/fargo v1.4.0/go.mod h1:9Ai6uvFy5fQNq6VPKtg+Ceq1+eTY4nKUlR2JElEOcDo= github.com/iancoleman/strcase v0.2.0 h1:05I4QRnGpI0m37iZQRuskXh+w77mr6Z41lwQzuHLwW0= github.com/iancoleman/strcase v0.2.0/go.mod h1:iwCmte+B7n89clKwxIoIXy/HfoL7AsD47ZCWhYzw7ho= github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= +github.com/imdario/mergo v0.3.4/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= +github.com/imdario/mergo v0.3.8/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= +github.com/imdario/mergo v0.3.12/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= +github.com/imdario/mergo v0.3.13/go.mod h1:4lJ1jqUDcsbIECGy0RUJAXNIhg+6ocWgb1ALK2O4oXg= github.com/improbable-eng/grpc-web v0.15.0 h1:BN+7z6uNXZ1tQGcNAuaU1YjsLTApzkjt2tzCixLaUPQ= github.com/improbable-eng/grpc-web v0.15.0/go.mod h1:1sy9HKV4Jt9aEs9JSnkWlRJPuPtwNr0l57L4f878wP8= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= github.com/inconshreveable/mousetrap v1.0.1 h1:U3uMjPSQEBMNp1lFxmllqCPM6P5u/Xq7Pgzkat/bFNc= github.com/inconshreveable/mousetrap v1.0.1/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= github.com/influxdata/influxdb1-client v0.0.0-20191209144304-8bf82d3c094d/go.mod h1:qj24IKcXYK6Iy9ceXlo3Tc+vtHo9lIhSX5JddghvEPo= +github.com/influxdata/influxdb1-client v0.0.0-20200827194710-b269163b24ab/go.mod h1:qj24IKcXYK6Iy9ceXlo3Tc+vtHo9lIhSX5JddghvEPo= +github.com/jdxcode/netrc v0.0.0-20210204082910-926c7f70242a/go.mod h1:Zi/ZFkEqFHTm7qkjyNJjaWH4LQA9LQhGJyF0lTYGpxw= github.com/jessevdk/go-flags v0.0.0-20141203071132-1679536dcc89/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= +github.com/jgautheron/goconst v1.5.1/go.mod h1:aAosetZ5zaeC/2EfMeRswtxUFBpe2Hr7HzkgX4fanO4= +github.com/jhump/protocompile v0.0.0-20220216033700-d705409f108f/go.mod h1:qr2b5kx4HbFS7/g4uYO5qv9ei8303JMsC7ESbYiqr2Q= +github.com/jhump/protoreflect v1.6.1/go.mod h1:RZQ/lnuN+zqeRVpQigTwO6o0AJUkxbnSnpuG7toUTG4= +github.com/jhump/protoreflect v1.11.1-0.20220213155251-0c2aedc66cf4/go.mod h1:U7aMIjN0NWq9swDP7xDdoMfRHb35uiuTd3Z9nFXJf5E= github.com/jhump/protoreflect v1.15.1 h1:HUMERORf3I3ZdX05WaQ6MIpd/NJ434hTp5YiKgfCL6c= +github.com/jingyugao/rowserrcheck v1.1.1/go.mod h1:4yvlZSDb3IyDTUZJUmpZfm2Hwok+Dtp+nu2qOq+er9c= +github.com/jirfag/go-printf-func-name v0.0.0-20200119135958-7558a9eaa5af/go.mod h1:HEWGJkRDzjJY2sqdDwxccsGicWEf9BQOZsq2tV+xzM0= github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= +github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= +github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U= github.com/jmhodges/levigo v1.0.0 h1:q5EC36kV79HWeTBWsod3mG11EgStG3qArTKcvlksN1U= github.com/jmhodges/levigo v1.0.0/go.mod h1:Q6Qx+uH3RAqyK4rFQroq9RL7mdkABMcfhEI+nNuzMJQ= +github.com/jmoiron/sqlx v1.2.0/go.mod h1:1FEQNm3xlJgrMD+FBdI9+xvCksHtbpVBBw5dYhBSsks= github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= +github.com/jonboulle/clockwork v0.2.0/go.mod h1:Pkfl5aHPm1nk2H9h0bjmnJD/BcgbGXUBGnn1kMkgxc8= +github.com/josharian/txtarfs v0.0.0-20210218200122-0702f000015a/go.mod h1:izVPOvVRsHiKkeGCT6tYBNWyDVuzj9wAaBb5R9qamfw= github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= github.com/jrick/logrotate v1.0.0/go.mod h1:LNinyqDIJnpAur+b8yyulnQw/wDuN1+BYKlTRt3OuAQ= github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= @@ -479,30 +757,43 @@ github.com/json-iterator/go v1.1.7/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/u github.com/json-iterator/go v1.1.8/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +github.com/json-iterator/go v1.1.11/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= +github.com/juju/ratelimit v1.0.1/go.mod h1:qapgC/Gy+xNh9UxzV13HGGl/6UXNN+ct+vwSgWNm/qk= github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= +github.com/julz/importas v0.1.0/go.mod h1:oSFU2R4XK/P7kNBrnL/FEQlDGN1/6WoxXEjSSXO0DV0= +github.com/jung-kurt/gofpdf v1.0.3-0.20190309125859-24315acbbda5/go.mod h1:7Id9E/uU8ce6rXgefFLlgrJj/GYY22cpxn+r32jIOes= +github.com/k0kubun/colorstring v0.0.0-20150214042306-9440f1994b88/go.mod h1:3w7q1U84EfirKl04SVQ/s7nPm1ZPhiXd34z40TNz36k= github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= +github.com/kisielk/errcheck v1.6.1/go.mod h1:nXw/i/MfnvRHqXa7XXmQMUB0oNFGuBrNI8d8NLy0LPw= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/kkdai/bstream v0.0.0-20161212061736-f391b8402d23/go.mod h1:J+Gs4SYgM6CZQHDETBtE9HaSEkGmuNXF86RwHhHUvq4= github.com/klauspost/compress v1.10.3/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= github.com/klauspost/compress v1.11.7/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= github.com/klauspost/compress v1.12.3/go.mod h1:8dP1Hq4DHOhN9w426knH3Rhby4rFm6D8eO+e+Dq5Gzg= +github.com/klauspost/compress v1.13.4/go.mod h1:8dP1Hq4DHOhN9w426knH3Rhby4rFm6D8eO+e+Dq5Gzg= +github.com/klauspost/compress v1.13.5/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk= +github.com/klauspost/compress v1.13.6/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk= +github.com/klauspost/compress v1.15.1/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk= github.com/klauspost/compress v1.16.7 h1:2mk3MPGNzKyxErAw8YaohYh69+pa4sIQSC0fPGCFR9I= github.com/klauspost/compress v1.16.7/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE= github.com/klauspost/cpuid/v2 v2.0.9 h1:lgaqFMSdTdQYdZ04uHyN2d/eKdOMyi2YLSvlQIBFYa4= github.com/klauspost/cpuid/v2 v2.0.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= +github.com/klauspost/pgzip v1.2.5/go.mod h1:Ch1tH69qFZu15pkjo5kYi6mth2Zzwzt50oCQKQE9RUs= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= +github.com/konsorten/go-windows-terminal-sequences v1.0.2/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg= github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= +github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pretty v0.3.0/go.mod h1:640gp4NfQd8pI5XOwp5fnNeVWj67G7CFk/SaSQn7NBk= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= @@ -511,50 +802,106 @@ github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= +github.com/kulti/thelper v0.6.3/go.mod h1:DsqKShOvP40epevkFrvIwkCMNYxMeTNjdWL4dqWHZ6I= +github.com/kunwardeep/paralleltest v1.0.6/go.mod h1:Y0Y0XISdZM5IKm3TREQMZ6iteqn1YuwCsJO/0kL9Zes= +github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= +github.com/kyoh86/exportloopref v0.1.8/go.mod h1:1tUcJeiioIs7VWe5gcOObrux3lb66+sBqGZrRkMwPgg= +github.com/ldez/gomoddirectives v0.2.3/go.mod h1:cpgBogWITnCfRq2qGoDkKMEVSaarhdBr6g8G04uz6d0= +github.com/ldez/tagliatelle v0.3.1/go.mod h1:8s6WJQwEYHbKZDsp/LjArytKOG8qaMrKQQ3mFukHs88= github.com/leodido/go-urn v1.2.1 h1:BqpAaACuzVSgi/VLzGZIobT2z4v53pjosyNd9Yv6n/w= github.com/leodido/go-urn v1.2.1/go.mod h1:zt4jvISO2HfUBqxjfIshjdMTYS56ZS/qv49ictyFfxY= +github.com/leonklingele/grouper v1.1.0/go.mod h1:uk3I3uDfi9B6PeUjsCKi6ndcf63Uy7snXgR4yDYQVDY= +github.com/letsencrypt/pkcs11key/v4 v4.0.0/go.mod h1:EFUvBDay26dErnNb70Nd0/VW3tJiIbETBPTl9ATXQag= +github.com/lib/pq v0.0.0-20180327071824-d34b9ff171c2/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= +github.com/lib/pq v1.0.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= +github.com/lib/pq v1.8.0/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= +github.com/lib/pq v1.9.0/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= +github.com/lib/pq v1.10.4/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= +github.com/lib/pq v1.10.6/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= github.com/lib/pq v1.10.7 h1:p7ZhMD+KsSRozJr34udlUrhboJwWAgCg34+/ZZNvZZw= github.com/lib/pq v1.10.7/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= github.com/libp2p/go-buffer-pool v0.1.0 h1:oK4mSFcQz7cTQIfqbe4MIj9gLW+mnanjyFtc6cdF0Y8= github.com/libp2p/go-buffer-pool v0.1.0/go.mod h1:N+vh8gMqimBzdKkSMVuydVDq+UV5QTWy5HSiZacSbPg= github.com/lightstep/lightstep-tracer-common/golang/gogo v0.0.0-20190605223551-bc2310a04743/go.mod h1:qklhhLq1aX+mtWk9cPHPzaBjWImj5ULL6C7HFJtXQMM= github.com/lightstep/lightstep-tracer-go v0.18.1/go.mod h1:jlF1pusYV4pidLvZ+XD0UBX0ZE6WURAspgAczcDHrL4= +github.com/lufeee/execinquery v1.2.1/go.mod h1:EC7DrEKView09ocscGHC+apXMIaorh4xqSxS/dy8SbM= +github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0/go.mod h1:zJYVVT2jmtg6P3p1VtQj7WsuWi/y4VnjVBn7F8KPB3I= +github.com/lyft/protoc-gen-star v0.5.3/go.mod h1:V0xaHgaf5oCCqmcxYcWiDfTiKsZsRc87/1qhoTACD8w= github.com/lyft/protoc-gen-validate v0.0.13/go.mod h1:XbGvPuh87YZc5TdIa2/I4pLk0QoUACkjt2znoq26NVQ= github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= +github.com/magiconair/properties v1.8.5/go.mod h1:y3VJvCyxH9uVvJTWEGAELF3aiYNyPKd5NZ3oSwXrF60= github.com/magiconair/properties v1.8.6 h1:5ibWZ6iY0NctNGWo87LalDlEZ6R41TqbbDamhfG/Qzo= github.com/magiconair/properties v1.8.6/go.mod h1:y3VJvCyxH9uVvJTWEGAELF3aiYNyPKd5NZ3oSwXrF60= github.com/manifoldco/promptui v0.9.0 h1:3V4HzJk1TtXW1MTZMP7mdlwbBpIinw3HztaIlYthEiA= +github.com/maratori/testpackage v1.1.0/go.mod h1:PeAhzU8qkCwdGEMTEupsHJNlQu2gZopMC6RjbhmHeDc= +github.com/matoous/godox v0.0.0-20210227103229-6504466cf951/go.mod h1:1BELzlh859Sh1c6+90blK8lbYy0kwQf1bYlBhBysy1s= +github.com/matryer/is v1.4.0/go.mod h1:8I/i5uYgLzgsgEloJE1U6xx5HkBQpAZvepWuujKwMRU= github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= +github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= +github.com/mattn/go-colorable v0.1.6/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= +github.com/mattn/go-colorable v0.1.8/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= +github.com/mattn/go-colorable v0.1.9/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= github.com/mattn/go-colorable v0.1.12/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= +github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= +github.com/mattn/go-isatty v0.0.10/go.mod h1:qgIWMr58cqv1PHHyhnkY9lrL7etaEgOFcMEpPG5Rm84= +github.com/mattn/go-isatty v0.0.11/go.mod h1:PhnuNfih5lzO57/f3n+odYbM4JtupLOxQOAqxQCu2WE= +github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= github.com/mattn/go-isatty v0.0.17/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= github.com/mattn/go-isatty v0.0.19 h1:JITubQf0MOLdlGRuRq+jtsDlekdYPia9ZFsB8h/APPA= github.com/mattn/go-isatty v0.0.19/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= +github.com/mattn/go-runewidth v0.0.4/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= +github.com/mattn/go-runewidth v0.0.6/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= +github.com/mattn/go-runewidth v0.0.9 h1:Lm995f3rfxdpd6TSmuVCHVb/QhupuXlYr8sCI/QdE+0= +github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= +github.com/mattn/go-sqlite3 v1.9.0/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc= +github.com/mattn/go-sqlite3 v1.14.9/go.mod h1:NyWgC/yNuGj7Q9rpYnZvas74GogHl5/Z4A/KQRfk6bU= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= github.com/matttproud/golang_protobuf_extensions v1.0.4 h1:mmDVorXM7PCGKw94cs5zkfA9PSy5pEvNWRP0ET0TIVo= github.com/matttproud/golang_protobuf_extensions v1.0.4/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= +github.com/mbilski/exhaustivestruct v1.2.0/go.mod h1:OeTBVxQWoEmB2J2JCHmXWPJ0aksxSUOUy+nvtVEfzXc= +github.com/mgechev/dots v0.0.0-20210922191527-e955255bf517/go.mod h1:KQ7+USdGKfpPjXk4Ga+5XxQM4Lm4e3gAogrreFAYpOg= +github.com/mgechev/revive v1.2.1/go.mod h1:+Ro3wqY4vakcYNtkBWdZC7dBg1xSB6sp054wWwmeFm0= github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= +github.com/miekg/dns v1.1.26/go.mod h1:bPDLeHnStXmXAq1m/Ch/hvfNHr14JKNPMBo3VZKjuso= +github.com/miekg/dns v1.1.35/go.mod h1:KNUDUusw/aVsxyTYZM1oqvCicbwhgbNgztCETuNZ7xM= +github.com/miekg/dns v1.1.41/go.mod h1:p6aan82bvRIyn+zDIv9xYNUpwa73JcSh9BKwknJysuI= +github.com/miekg/dns v1.1.43/go.mod h1:+evo5L0630/F6ca/Z9+GAqzhjGyn8/c+TBaOyfEl0V4= +github.com/miekg/pkcs11 v1.0.2/go.mod h1:XsNlhZGX73bx86s2hdc/FuaLm2CPZJemRLMA+WTFxgs= +github.com/miekg/pkcs11 v1.0.3/go.mod h1:XsNlhZGX73bx86s2hdc/FuaLm2CPZJemRLMA+WTFxgs= github.com/mimoo/StrobeGo v0.0.0-20181016162300-f8f6d4d2b643/go.mod h1:43+3pMjjKimDBf5Kr4ZFNGbLql1zKkbImw+fZbw3geM= github.com/mimoo/StrobeGo v0.0.0-20210601165009-122bf33a46e0 h1:QRUSJEgZn2Snx0EmT/QLXibWjSUDjKWvXIT19NBVp94= github.com/mimoo/StrobeGo v0.0.0-20210601165009-122bf33a46e0/go.mod h1:43+3pMjjKimDBf5Kr4ZFNGbLql1zKkbImw+fZbw3geM= +github.com/minio/highwayhash v1.0.1/go.mod h1:BQskDq+xkJ12lmlUUi7U0M5Swg3EWR+dLTk+kldvVxY= github.com/minio/highwayhash v1.0.2 h1:Aak5U0nElisjDCfPSG79Tgzkn2gl66NxOMspRrKnA/g= github.com/minio/highwayhash v1.0.2/go.mod h1:BQskDq+xkJ12lmlUUi7U0M5Swg3EWR+dLTk+kldvVxY= github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc= +github.com/mitchellh/cli v1.1.0/go.mod h1:xcISNoH86gajksDmfB23e/pu+B+GeFRMYmoHXxx3xhI= +github.com/mitchellh/copystructure v1.0.0/go.mod h1:SNtv71yrdKgLRyLFxmLdkAbkKEFWgYaq1OVrnRcwhnw= github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= +github.com/mitchellh/go-ps v1.0.0/go.mod h1:J4lOc8z8yJs6vUwklHw2XEIiT4z4C40KtWVN3nvg8Pg= github.com/mitchellh/go-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI= github.com/mitchellh/gox v0.4.0/go.mod h1:Sd9lOJ0+aimLBi73mGofS1ycjY8lL3uZM3JPS42BGNg= github.com/mitchellh/iochan v1.0.0/go.mod h1:JwYml1nuB7xOzsp52dPpHFffvOCDupsG0QubkSMEySY= github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= +github.com/mitchellh/mapstructure v1.4.1/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= +github.com/mitchellh/mapstructure v1.4.2/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= +github.com/mitchellh/mapstructure v1.4.3/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY= github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= +github.com/mitchellh/reflectwalk v1.0.0/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= +github.com/mitchellh/reflectwalk v1.0.1/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= +github.com/moby/sys/mountinfo v0.5.0/go.mod h1:3bMD3Rg+zkqx8MRYPi7Pyb0Ie97QEBmdxbhnCLlSvSU= +github.com/moby/term v0.0.0-20201216013528-df9cb8a40635/go.mod h1:FBS0z0QWA44HXygs7VXDUOGoN/1TV3RuWkLO04am3wc= +github.com/moby/term v0.0.0-20210619224110-3f7ff695adc6/go.mod h1:E2VnQOmVuvZB6UYnnDB0qG5Nq/1tD9acaOpo6xmt0Kw= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= @@ -562,82 +909,153 @@ github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lN github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= +github.com/modocache/gover v0.0.0-20171022184752-b58185e213c5/go.mod h1:caMODM3PzxT8aQXRPkAt8xlV/e7d7w8GM5g0fa5F0D8= +github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826/go.mod h1:TaXosZuwdSHYgviHp1DAtfrULt5eUgsSMsZf+YrPgl8= +github.com/moricho/tparallel v0.2.1/go.mod h1:fXEIZxG2vdfl0ZF8b42f5a78EhjjD5mX8qUplsoSU4k= +github.com/mozilla/scribe v0.0.0-20180711195314-fb71baf557c1/go.mod h1:FIczTrinKo8VaLxe6PWTPEXRXDIHz2QAwiaBaP5/4a8= +github.com/mozilla/tls-observatory v0.0.0-20210609171429-7bc42856d2e5/go.mod h1:FUqVoUPHSEdDR0MnFM3Dh8AU0pZHLXUD127SAJGER/s= +github.com/mroth/weightedrand v0.4.1/go.mod h1:3p2SIcC8al1YMzGhAIoXD+r9olo/g/cdJgAD905gyNE= +github.com/mrunalp/fileutils v0.5.0/go.mod h1:M1WthSahJixYnrXQl/DFQuteStB1weuxD2QJNHXfbSQ= github.com/mtibben/percent v0.2.1 h1:5gssi8Nqo8QU/r2pynCm+hBQHpkB/uNK7BJCFogWdzs= github.com/mtibben/percent v0.2.1/go.mod h1:KG9uO+SZkUp+VkRHsCdYQV3XSZrrSpR3O9ibNBTZrns= github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f h1:KUppIJq7/+SVif2QVs3tOP0zanoHgBEVAwHxUSIzRqU= github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= +github.com/mwitkow/go-proto-validators v0.0.0-20180403085117-0950a7990007/go.mod h1:m2XC9Qq0AlmmVksL6FktJCdTYyLk7V3fKyp0sl1yWQo= +github.com/mwitkow/go-proto-validators v0.2.0/go.mod h1:ZfA1hW+UH/2ZHOWvQ3HnQaU0DtnpXu850MZiy+YUgcc= github.com/mwitkow/grpc-proxy v0.0.0-20181017164139-0f1106ef9c76/go.mod h1:x5OoJHDHqxHS801UIuhqGl6QdSAEJvtausosHSdazIo= +github.com/nakabonne/nestif v0.3.1/go.mod h1:9EtoZochLn5iUprVDmDjqGKPofoUEBL8U4Ngq6aY7OE= github.com/nats-io/jwt v0.3.0/go.mod h1:fRYCDE99xlTsqUzISS1Bi75UBJ6ljOJQOAAu5VglpSg= github.com/nats-io/jwt v0.3.2/go.mod h1:/euKqTS1ZD+zzjYrY7pseZrTtWQSjujC7xjPc8wL6eU= +github.com/nats-io/jwt v1.2.2/go.mod h1:/xX356yQA6LuXI9xWW7mZNpxgF2mBmGecH+Fj34sP5Q= +github.com/nats-io/jwt/v2 v2.0.3/go.mod h1:VRP+deawSXyhNjXmxPCHskrR6Mq50BqpEI5SEcNiGlY= github.com/nats-io/nats-server/v2 v2.1.2/go.mod h1:Afk+wRZqkMQs/p45uXdrVLuab3gwv3Z8C4HTBu8GD/k= +github.com/nats-io/nats-server/v2 v2.5.0/go.mod h1:Kj86UtrXAL6LwYRA6H4RqzkHhK0Vcv2ZnKD5WbQ1t3g= github.com/nats-io/nats.go v1.9.1/go.mod h1:ZjDU1L/7fJ09jvUSRVBR2e7+RnLiiIQyqyzEE/Zbp4w= +github.com/nats-io/nats.go v1.12.1/go.mod h1:BPko4oXsySz4aSWeFgOHLZs3G4Jq4ZAyE6/zMCxRT6w= github.com/nats-io/nkeys v0.1.0/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w= github.com/nats-io/nkeys v0.1.3/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w= +github.com/nats-io/nkeys v0.2.0/go.mod h1:XdZpAbhgyyODYqjTawOnIOI7VlbKSarI9Gfy1tqEu/s= +github.com/nats-io/nkeys v0.3.0/go.mod h1:gvUNGjVcM2IPr5rCsRsC6Wb3Hr2CQAm08dsxtV6A5y4= github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OSON2c= +github.com/nbutton23/zxcvbn-go v0.0.0-20210217022336-fa2cb2858354/go.mod h1:KSVJerMDfblTH7p5MZaTt+8zaT2iEk3AkVb9PQdZuE8= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= +github.com/nishanths/exhaustive v0.8.1/go.mod h1:qj+zJJUgJ76tR92+25+03oYUhzF4R7/2Wk7fGTfCHmg= +github.com/nishanths/predeclared v0.0.0-20190419143655-18a43bb90ffc/go.mod h1:62PewwiQTlm/7Rj+cxVYqZvDIUc+JjZq6GHAC1fsObQ= +github.com/nishanths/predeclared v0.2.2/go.mod h1:RROzoN6TnGQupbC+lqggsOlcgysk3LMK/HI84Mp280c= github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE= +github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU= +github.com/oasisprotocol/curve25519-voi v0.0.0-20210609091139-0a56a4bca00b h1:MKwruh+HeCSKWphkxuzvRzU4QzDkg7yiPkDVV0cDFgI= +github.com/oasisprotocol/curve25519-voi v0.0.0-20210609091139-0a56a4bca00b/go.mod h1:TLJifjWF6eotcfzDjKZsDqWJ+73Uvj/N85MvVyrvynM= github.com/oklog/oklog v0.3.2/go.mod h1:FCV+B7mhrz4o+ueLpx+KqkyXRGMWOYEvfiXtdGtbWGs= github.com/oklog/run v1.0.0/go.mod h1:dlhp/R75TPv97u0XWUtDeV/lRKWPKSdTuV0TZvrmrQA= +github.com/oklog/ulid/v2 v2.0.2/go.mod h1:mtBL0Qe/0HAx6/a4Z30qxVIAL1eQDweXq5lxOEiwQ68= github.com/olekukonko/tablewriter v0.0.0-20170122224234-a0225b3f23b5/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo= +github.com/olekukonko/tablewriter v0.0.1/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo= +github.com/olekukonko/tablewriter v0.0.2/go.mod h1:rSAaSIOAGT9odnlyGlUfAJaoc5w2fSBUmeGDbRWPxyQ= +github.com/olekukonko/tablewriter v0.0.5 h1:P2Ga83D34wi1o9J6Wh1mRuqd4mF/x/lgBS7N7AbDhec= +github.com/olekukonko/tablewriter v0.0.5/go.mod h1:hPp6KlRPjbx+hW8ykQs1w3UBbZlj6HuIJcUGPhkA7kY= github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/ginkgo v1.10.3/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= github.com/onsi/ginkgo v1.14.0/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY= +github.com/onsi/ginkgo v1.16.2/go.mod h1:CObGmKUOKaSC0RjmoAK7tKyn4Azo5P2IWuoMnvwxz1E= github.com/onsi/ginkgo v1.16.4 h1:29JGrr5oVBm5ulCWet69zQkzWipVXIol6ygQUe/EzNc= +github.com/onsi/ginkgo v1.16.4/go.mod h1:dX+/inL/fNMqNlz0e9LfyB9TswhZpCVdJM/Z6Vvnwo0= +github.com/onsi/ginkgo/v2 v2.1.3/go.mod h1:vw5CSIxN1JObi/U8gcbwft7ZxR2dgaR70JSE3/PpL4c= +github.com/onsi/ginkgo/v2 v2.1.4/go.mod h1:um6tUpWM/cxCK3/FK8BXqEiUMUwRgSM4JXG47RKZmLU= github.com/onsi/gomega v1.4.1/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= +github.com/onsi/gomega v1.13.0/go.mod h1:lRk9szgn8TxENtWd0Tp4c3wjlRfMTMH27I+3Je41yGY= +github.com/onsi/gomega v1.17.0/go.mod h1:HnhC7FXeEQY45zxNK3PPoIUhzk/80Xly9PcubAlGdZY= +github.com/onsi/gomega v1.19.0/go.mod h1:LY+I3pBVzYsTBU1AnDwOSxaYi9WoWiqgwooUqq9yPro= github.com/onsi/gomega v1.20.0 h1:8W0cWlwFkflGPLltQvLRB7ZVD5HuP6ng320w2IS245Q= github.com/op/go-logging v0.0.0-20160315200505-970db520ece7/go.mod h1:HzydrMdWErDVzsI23lYNej1Htcns9BCg93Dk0bBINWk= github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= +github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= +github.com/opencontainers/image-spec v1.0.2/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0= github.com/opencontainers/image-spec v1.1.0-rc2 h1:2zx/Stx4Wc5pIPDvIxHXvXtQFW/7XWJGmnM7r3wg034= +github.com/opencontainers/runc v1.1.2/go.mod h1:Tj1hFw6eFWp/o33uxGf5yF2BX5yz2Z6iptFpuvbbKqc= github.com/opencontainers/runc v1.1.3 h1:vIXrkId+0/J2Ymu2m7VjGvbSlAId9XNRPhn2p4b+d8w= +github.com/opencontainers/runc v1.1.3/go.mod h1:1J5XiS+vdZ3wCyZybsuxXZWGrgSr8fFJHLXuG2PsnNg= +github.com/opencontainers/runtime-spec v1.0.3-0.20210326190908-1c3f411f0417/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= +github.com/opencontainers/selinux v1.10.0/go.mod h1:2i0OySw99QjzBBQByd1Gr9gSjvuho1lHsJxIJ3gGbJI= github.com/opentracing-contrib/go-observer v0.0.0-20170622124052-a52f23424492/go.mod h1:Ngi6UdF0k5OKD5t5wlmGhe/EDKPoUM3BXZSSfIuJbis= github.com/opentracing/basictracer-go v1.0.0/go.mod h1:QfBfYuafItcjQuMwinw9GhYKwFXS9KnPs5lxoYwgW74= github.com/opentracing/opentracing-go v1.0.2/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= +github.com/opentracing/opentracing-go v1.2.0/go.mod h1:GxEUsuufX4nBwe+T+Wl9TAgYrxe9dPLANfrWvHYVTgc= github.com/openzipkin-contrib/zipkin-go-opentracing v0.4.5/go.mod h1:/wsWhb9smxSfWAKL3wpBW7V8scJMt8N8gnaMCS9E/cA= github.com/openzipkin/zipkin-go v0.1.6/go.mod h1:QgAqvLzwWbR/WpD4A3cGpPtJrZXNIiJc5AZX7/PBEpw= github.com/openzipkin/zipkin-go v0.2.1/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnhQw8ySjnjRyN4= github.com/openzipkin/zipkin-go v0.2.2/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnhQw8ySjnjRyN4= +github.com/openzipkin/zipkin-go v0.2.5/go.mod h1:KpXfKdgRDnnhsxw4pNIH9Md5lyFqKUa4YDFlwRYAMyE= github.com/ory/dockertest v3.3.5+incompatible h1:iLLK6SQwIhcbrG783Dghaaa3WPzGc+4Emza6EbVUUGA= +github.com/ory/dockertest v3.3.5+incompatible/go.mod h1:1vX4m9wsvi00u5bseYwXaSnhNrne+V0E6LAcBILJdPs= +github.com/ory/dockertest/v3 v3.9.1/go.mod h1:42Ir9hmvaAPm0Mgibk6mBPi7SFvTXxEcnztDYOJ//uM= +github.com/otiai10/copy v1.2.0/go.mod h1:rrF5dJ5F0t/EWSYODDu4j9/vEeYHMkc8jt0zJChqQWw= +github.com/otiai10/curr v0.0.0-20150429015615-9b4961190c95/go.mod h1:9qAhocn7zKJG+0mI8eUu6xqkFDYS2kb2saOteoSB3cE= +github.com/otiai10/curr v1.0.0/go.mod h1:LskTG5wDwr8Rs+nNQ+1LlxRjAtTZZjtJW4rMXl6j4vs= +github.com/otiai10/mint v1.3.0/go.mod h1:F5AjcsTsWUqX+Na9fpHb52P8pcRX2CI6A3ctIT91xUo= +github.com/otiai10/mint v1.3.1/go.mod h1:/yxELlJQ0ufhjUwhshSj+wFjZ78CnZ48/1wtmBH1OTc= github.com/pact-foundation/pact-go v1.0.4/go.mod h1:uExwJY4kCzNPcHRj+hCR/HBbOOIwwtUjcrb0b5/5kLM= github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= github.com/pascaldekloe/goe v0.1.0 h1:cBOtyMzM9HTpWjXfbbunk26uA6nG3a8n06Wieeh0MwY= github.com/pascaldekloe/goe v0.1.0/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= +github.com/pborman/getopt v0.0.0-20170112200414-7148bc3a4c30/go.mod h1:85jBQOZwpVEaDAr341tbn15RS4fCAsIst0qp7i8ex1o= github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k= github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= +github.com/pelletier/go-toml v1.9.4/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c= github.com/pelletier/go-toml v1.9.5 h1:4yBQzkHv+7BHq2PQUZF3Mx0IYxG7LsP222s7Agd3ve8= github.com/pelletier/go-toml v1.9.5/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c= +github.com/pelletier/go-toml/v2 v2.0.1/go.mod h1:r9LEWfGN8R5k0VXJ+0BkIe7MYkRdwZOjgMj2KwnJFUo= +github.com/pelletier/go-toml/v2 v2.0.2/go.mod h1:MovirKjgVRESsAvNZlAjtFwV867yGuwRkXbG66OzopI= github.com/pelletier/go-toml/v2 v2.0.6/go.mod h1:eumQOmlWiOPt5WriQQqoM5y18pDHwha2N+QD+EUNTek= github.com/pelletier/go-toml/v2 v2.0.7 h1:muncTPStnKRos5dpVKULv2FVd4bMOhNePj9CjgDb8Us= github.com/pelletier/go-toml/v2 v2.0.7/go.mod h1:eumQOmlWiOPt5WriQQqoM5y18pDHwha2N+QD+EUNTek= github.com/performancecopilot/speed v3.0.0+incompatible/go.mod h1:/CLtqpZ5gBg1M9iaPbIdPPGyKcA8hKdoy6hAWba7Yac= +github.com/performancecopilot/speed/v4 v4.0.0/go.mod h1:qxrSyuDGrTOWfV+uKRFhfxw6h/4HXRGUiZiufxo49BM= +github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= github.com/petermattis/goid v0.0.0-20180202154549-b0b1615b78e5/go.mod h1:jvVRKCrJTQWu0XVbaOlby/2lO20uSCHEMzzplHXte1o= github.com/petermattis/goid v0.0.0-20230317030725-371a4b8eda08 h1:hDSdbBuw3Lefr6R18ax0tZ2BJeNB3NehB3trOwYBsdU= github.com/petermattis/goid v0.0.0-20230317030725-371a4b8eda08/go.mod h1:pxMtw7cyUw6B2bRH0ZBANSPg+AoSud1I1iyJHI69jH4= +github.com/phayes/checkstyle v0.0.0-20170904204023-bfd46e6a821d/go.mod h1:3OzsM7FXDQlpCiw2j81fOmAwQLnZnLGXVKUzeKQXIAw= +github.com/philhofer/fwd v1.1.1/go.mod h1:gk3iGcWd9+svBvR0sR+KPcfE+RNWozjowpeBVG3ZVNU= github.com/pierrec/lz4 v1.0.2-0.20190131084431-473cd7ce01a1/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc= github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= github.com/pingcap/errors v0.11.4 h1:lFuQV/oaUMGcD2tqt+01ROSmJs75VG1ToEOkZIZ4nE4= +github.com/pkg/browser v0.0.0-20180916011732-0a3d74bf9ce4/go.mod h1:4OwLy04Bl9Ef3GJJCoec+30X3LQs/0/m4HFRt/2LUSA= +github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8/go.mod h1:HKlIX3XHQyzLZPlr7++PzdhaXEj94dEiJgZDTsxEqUI= github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA= github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/profile v1.2.1/go.mod h1:hJw3o1OdXxsrSjjVksARp5W95eeEaEfptyVZyv6JUPA= +github.com/pkg/profile v1.6.0/go.mod h1:qBsxPvzyUincmltOk6iyRVxHYg4adc0OFOv72ZdLa18= +github.com/pkg/sftp v1.10.1/go.mod h1:lYOWFsE0bwd1+KfKJaKeuokY15vzFx25BLbzYYoAxZI= github.com/pkg/sftp v1.13.1/go.mod h1:3HaPG6Dq1ILlpPZRO0HVMrsydcdLt6HRDccSgb87qRg= +github.com/pmezard/go-difflib v0.0.0-20151028094244-d8ed2627bdf0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/polyfloyd/go-errorlint v1.0.0/go.mod h1:KZy4xxPJyy88/gldCe5OdW6OQRtNO3EZE7hXzmnebgA= github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= +github.com/posener/complete v1.2.3/go.mod h1:WZIdtGGp+qx0sLrYKtIRAruyNpv6hFCicSgv7Sy7s/s= +github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c/go.mod h1:OmDBASR4679mdNQnz2pUhc2G8CO2JrUAVFDRBDP/hJE= github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= github.com/prometheus/client_golang v0.9.3-0.20190127221311-3c4408c8b829/go.mod h1:p2iRAGwDERtqlqzRXnrOVns+ignqQo//hLXqYxZYVNs= github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= github.com/prometheus/client_golang v1.3.0/go.mod h1:hJaj2vgQTGQmVCsAACORcieXFeDPbaTKGT+JTgUa3og= github.com/prometheus/client_golang v1.4.0/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3OK1iX/F2sw+iXX5zU= github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= +github.com/prometheus/client_golang v1.11.0/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= +github.com/prometheus/client_golang v1.11.1/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= +github.com/prometheus/client_golang v1.12.1/go.mod h1:3Z9XVyYiZYEO+YQWt3RD2R3jrbd179Rt297l4aS6nDY= +github.com/prometheus/client_golang v1.12.2/go.mod h1:3Z9XVyYiZYEO+YQWt3RD2R3jrbd179Rt297l4aS6nDY= github.com/prometheus/client_golang v1.14.0 h1:nJdhIvne2eSX/XRAFV9PcvFFRbrjbcTUj0VP62TMhnw= github.com/prometheus/client_golang v1.14.0/go.mod h1:8vpkKitgIVNcqrRBWh1C4TIUQgYNtG/XQE4E/Zae36Y= github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= @@ -654,6 +1072,9 @@ github.com/prometheus/common v0.7.0/go.mod h1:DjGbpBbp5NYNiECxcL/VnbXCCaQpKd3tt2 github.com/prometheus/common v0.9.1/go.mod h1:yhUN8i9wzaXS3w1O07YhxHEBxD+W35wd8bs7vj7HSQ4= github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= github.com/prometheus/common v0.15.0/go.mod h1:U+gB1OBLb1lF3O42bTCL+FK18tX9Oar16Clt/msog/s= +github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9VFqTh1DIvc= +github.com/prometheus/common v0.30.0/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= +github.com/prometheus/common v0.32.1/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= github.com/prometheus/common v0.42.0 h1:EKsfXEYo4JpWMHH5cg+KOUWeuJSov1Id8zGR8eeI1YM= github.com/prometheus/common v0.42.0/go.mod h1:xBwqVerjNdUDjgODMpudtOMwlOwf2SaTr1yjz4b7Zbc= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= @@ -662,56 +1083,107 @@ github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsT github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A= github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= github.com/prometheus/procfs v0.3.0/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= +github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= +github.com/prometheus/procfs v0.7.3/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= github.com/prometheus/procfs v0.9.0 h1:wzCHvIvM5SxWqYvwgVL7yJY8Lz3PKn49KQtpgMYJfhI= github.com/prometheus/procfs v0.9.0/go.mod h1:+pB4zwohETzFnmlpe6yd2lSc+0/46IYZRB/chUwxUZY= +github.com/prometheus/tsdb v0.7.1 h1:YZcsG11NqnK4czYLrWd9mpEuAJIHVQLwdrleYfszMAA= +github.com/pseudomuto/protoc-gen-doc v1.3.2/go.mod h1:y5+P6n3iGrbKG+9O04V5ld71in3v/bX88wUwgt+U8EA= +github.com/pseudomuto/protokit v0.2.0/go.mod h1:2PdH30hxVHsup8KpBTOXTBeMVhJZVio3Q8ViKSAXT0Q= +github.com/quasilyte/go-ruleguard v0.3.1-0.20210203134552-1b5a410e1cc8/go.mod h1:KsAh3x0e7Fkpgs+Q9pNLS5XpFSvYCEVl5gP9Pp1xp30= +github.com/quasilyte/go-ruleguard v0.3.16-0.20220213074421-6aa060fab41a/go.mod h1:VMX+OnnSw4LicdiEGtRSD/1X8kW7GuEscjYNr4cOIT4= +github.com/quasilyte/go-ruleguard/dsl v0.3.0/go.mod h1:KeCP03KrjuSO0H1kTuZQCWlQPulDV6YMIXmpQss17rU= +github.com/quasilyte/go-ruleguard/dsl v0.3.16/go.mod h1:KeCP03KrjuSO0H1kTuZQCWlQPulDV6YMIXmpQss17rU= +github.com/quasilyte/go-ruleguard/dsl v0.3.21/go.mod h1:KeCP03KrjuSO0H1kTuZQCWlQPulDV6YMIXmpQss17rU= +github.com/quasilyte/go-ruleguard/rules v0.0.0-20201231183845-9e62ed36efe1/go.mod h1:7JTjp89EGyU1d6XfBiXihJNG37wB2VRkd125Q1u7Plc= +github.com/quasilyte/go-ruleguard/rules v0.0.0-20211022131956-028d6511ab71/go.mod h1:4cgAphtvu7Ftv7vOT2ZOYhC6CvBxZixcasr8qIOTA50= +github.com/quasilyte/gogrep v0.0.0-20220120141003-628d8b3623b5/go.mod h1:wSEyW6O61xRV6zb6My3HxrQ5/8ke7NE2OayqCHa3xRM= +github.com/quasilyte/regex/syntax v0.0.0-20200407221936-30656e2c4a95/go.mod h1:rlzQ04UMyJXu/aOvhd8qT+hvDrFpiwqp8MRXDY9szc0= +github.com/quasilyte/stdinfo v0.0.0-20220114132959-f7386bf02567/go.mod h1:DWNGW8A4Y+GyBgPuaQJuWiy0XYftx4Xm/y5Jqk9I6VQ= github.com/rakyll/statik v0.1.7 h1:OF3QCZUuyPxuGEP7B4ypUa7sB/iHtqOTDYZXGM8KOdQ= github.com/rakyll/statik v0.1.7/go.mod h1:AlZONWzMtEnMs7W4e/1LURLiI49pIMmp6V9Unghqrcc= github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= +github.com/rcrowley/go-metrics v0.0.0-20200313005456-10cdbea86bc0/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 h1:N/ElC8H3+5XpJzTSTfLsJV/mx9Q9g7kxmchpfZyxgzM= github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= +github.com/remyoudompheng/go-dbus v0.0.0-20121104212943-b7232d34b1d5/go.mod h1:+u151txRmLpwxBmpYn9z3d1sdJdjRPQpsXuYeY9jNls= +github.com/remyoudompheng/go-liblzma v0.0.0-20190506200333-81bf2d431b96/go.mod h1:90HvCY7+oHHUKkbeMCiHt1WuFR2/hPJ9QrljDG+v6ls= +github.com/remyoudompheng/go-misc v0.0.0-20190427085024-2d6ac652a50e/go.mod h1:80FQABjoFzZ2M5uEa6FUaJYEmqU2UOKojlFVak1UAwI= github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= github.com/rogpeppe/go-internal v1.8.0/go.mod h1:WmiCO8CzOY8rg0OYDC4/i/2WRWAB6poM+XZ2dLUbcbE= +github.com/rogpeppe/go-internal v1.8.1/go.mod h1:JeRgkft04UBgHMgCIwADu4Pn6Mtm5d4nPKWu0nJ5d+o= github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs= github.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDNXVBh4M= github.com/rogpeppe/go-internal v1.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUzkipdSkR5nkCZA= github.com/rs/cors v1.7.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= github.com/rs/cors v1.8.2 h1:KCooALfAYGs415Cwu5ABvv9n9509fSiG5SQJn/AQo4U= github.com/rs/cors v1.8.2/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU= +github.com/rs/xid v1.3.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= github.com/rs/xid v1.5.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= +github.com/rs/zerolog v1.27.0/go.mod h1:7frBqO0oezxmnO7GF86FY++uy8I0Tk/If5ni1G9Qc0U= github.com/rs/zerolog v1.30.0 h1:SymVODrcRsaRaSInD9yQtKbtWqwsfoPcRff/oRXLj4c= github.com/rs/zerolog v1.30.0/go.mod h1:/tk+P47gFdPXq4QYjvCmT5/Gsug2nagsFWBWhAiSi1w= github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= +github.com/ryancurrah/gomodguard v1.2.3/go.mod h1:rYbA/4Tg5c54mV1sv4sQTP5WOPBcoLtnBZ7/TEhXAbg= +github.com/ryanrolds/sqlclosecheck v0.3.0/go.mod h1:1gREqxyTGR3lVtpngyFo3hZAgk0KCtEdgEkHwDbigdA= github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= +github.com/sagikazarmark/crypt v0.3.0/go.mod h1:uD/D+6UF4SrIR1uGEv7bBNkNqLGqUr43MRiaGWX1Nig= +github.com/sagikazarmark/crypt v0.6.0/go.mod h1:U8+INwJo3nBv1m6A/8OBXAq7Jnpspk5AxSgDyEQcea8= github.com/samuel/go-zookeeper v0.0.0-20190923202752-2cc03de413da/go.mod h1:gi+0XIa01GRL2eRQVjQkKGqKF3SF9vZR/HnPullcV2E= +github.com/sanposhiho/wastedassign/v2 v2.0.6/go.mod h1:KyZ0MWTwxxBmfwn33zh3k1dmsbF2ud9pAAGfoLfjhtI= +github.com/sasha-s/go-deadlock v0.2.1-0.20190427202633-1595213edefa/go.mod h1:F73l+cr82YSh10GxyRI6qZiCgK64VaZjwesgfQ1/iLM= github.com/sasha-s/go-deadlock v0.3.1 h1:sqv7fDNShgjcaxkO0JNcOAlr8B9+cV5Ey/OB71efZx0= github.com/sasha-s/go-deadlock v0.3.1/go.mod h1:F73l+cr82YSh10GxyRI6qZiCgK64VaZjwesgfQ1/iLM= github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= +github.com/seccomp/libseccomp-golang v0.9.2-0.20210429002308-3879420cc921/go.mod h1:JA8cRccbGaA1s33RQf7Y1+q9gHmZX1yB/z9WDN1C6fg= +github.com/seccomp/libseccomp-golang v0.9.2-0.20220502022130-f33da4d89646/go.mod h1:JA8cRccbGaA1s33RQf7Y1+q9gHmZX1yB/z9WDN1C6fg= +github.com/securego/gosec/v2 v2.12.0/go.mod h1:iTpT+eKTw59bSgklBHlSnH5O2tNygHMDxfvMubA4i7I= +github.com/sergi/go-diff v1.1.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM= +github.com/shazow/go-diff v0.0.0-20160112020656-b6b7b6733b8c/go.mod h1:/PevMnwAxekIXwN8qQyfc5gl2NlkB3CQlkizAbOkeBs= +github.com/shirou/gopsutil v3.21.4-0.20210419000835-c7a38de76ee5+incompatible h1:Bn1aCHHRnjv4Bl16T8rcaFjYSrGrIZvpiGO6P3Q4GpU= +github.com/shirou/gopsutil/v3 v3.22.6/go.mod h1:EdIubSnZhbAvBS1yJ7Xi+AShB/hxwLHOMz4MCYz7yMs= +github.com/shurcooL/go v0.0.0-20180423040247-9e1955d9fb6e/go.mod h1:TDJrrUr11Vxrven61rcy3hJMUqaf/CLWYhHNPmT14Lk= +github.com/shurcooL/go-goon v0.0.0-20170922171312-37c2f522c041/go.mod h1:N5mDOmsrJOB+vfqUK+7DmDyjhSLIIBnXo9lvZJj3MWQ= github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= +github.com/sirupsen/logrus v1.8.1/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= github.com/sirupsen/logrus v1.9.0 h1:trlNQbNUG3OdDrDil03MCb1H2o9nJ1x4/5LYw7byDE0= +github.com/sivchari/containedctx v1.0.2/go.mod h1:PwZOeqm4/DLoJOqMSIJs3aKqXRX4YO+uXww087KZ7Bw= +github.com/sivchari/nosnakecase v1.5.0/go.mod h1:CwDzrzPea40/GB6uynrNLiorAlgFRvRbFSgJx2Gs+QY= +github.com/sivchari/tenv v1.6.0/go.mod h1:64yStXKSOxDfX47NlhVwND4dHwfZDdbp2Lyl018Icvg= github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= +github.com/snikch/goodman v0.0.0-20171125024755-10e37e294daa/go.mod h1:oJyF+mSPHbB5mVY2iO9KV3pTt/QbIkGaO8gQ2WrDbP4= github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= +github.com/sonatard/noctx v0.0.1/go.mod h1:9D2D/EoULe8Yy2joDHJj7bv3sZoq9AaSb8B4lqBjiZI= github.com/sony/gobreaker v0.4.1/go.mod h1:ZKptC7FHNvhBz7dN2LGjPVBz2sZJmc0/PkyDJOjmxWY= +github.com/sourcegraph/go-diff v0.6.1/go.mod h1:iBszgVvyxdc8SFZ7gm69go2KDdt3ag071iBaWPF6cjs= github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= github.com/spaolacci/murmur3 v1.1.0 h1:7c1g84S4BPRrfL5Xrdp6fOJ206sU9y293DDHaoy0bLI= github.com/spaolacci/murmur3 v1.1.0/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= +github.com/spf13/afero v1.3.3/go.mod h1:5KUK8ByomD5Ti5Artl0RtHeI5pTF7MIDuXL3yY520V4= +github.com/spf13/afero v1.6.0/go.mod h1:Ai8FlHk4v/PARR026UzYexafAt9roJ7LcLMAmO6Z93I= +github.com/spf13/afero v1.8.2/go.mod h1:CtAatgMJh6bJEIs48Ay/FOnkljP3WeGUG0MC1RfAqwo= github.com/spf13/afero v1.9.2 h1:j49Hj62F0n+DaZ1dDCvhABaPNSGNkt32oRFxI33IEMw= github.com/spf13/afero v1.9.2/go.mod h1:iUV7ddyEEZPO5gA3zD4fJt6iStLlL+Lg4m2cihcDf8Y= github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= +github.com/spf13/cast v1.4.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= github.com/spf13/cast v1.5.0 h1:rj3WzYc11XZaIZMPKmwP96zkFEnnAmV8s6XbB2aY32w= github.com/spf13/cast v1.5.0/go.mod h1:SpXXQ5YoyJw6s3/6cMTQuxvgRl3PCJiyaX9p6b155UU= github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= github.com/spf13/cobra v0.0.5/go.mod h1:3K3wKZymM7VvHMDS9+Akkh4K60UwM26emMESw8tLCHU= +github.com/spf13/cobra v1.3.0/go.mod h1:BrRVncBjOJa/eUcVVm9CE+oC6as8k+VYr4NY7WCi9V4= +github.com/spf13/cobra v1.4.0/go.mod h1:Wo4iy3BUC+X2Fybo0PDqwJIv3dNRiZLHQymsfxlB84g= +github.com/spf13/cobra v1.5.0/go.mod h1:dWXEIy2H428czQCjInthrTRUg7yKbok+2Qi/yBIJoUM= github.com/spf13/cobra v1.6.1 h1:o94oiPyS4KD1mPy2fmcYYHHfCxLqYjJOhGsCHFZtEzA= github.com/spf13/cobra v1.6.1/go.mod h1:IOw/AERYS7UzyrGinqmz6HLUo219MORXGxhbaJUqzrY= github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= @@ -722,16 +1194,24 @@ github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnIn github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/spf13/viper v1.3.2/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DMA2s= +github.com/spf13/viper v1.10.0/go.mod h1:SoyBPwAtKDzypXNDFKN5kzH7ppppbGZtls1UpIy5AsM= +github.com/spf13/viper v1.12.0/go.mod h1:b6COn30jlNxbm/V2IqWiNWkJ+vZNiMNksliPCiuKtSI= github.com/spf13/viper v1.14.0 h1:Rg7d3Lo706X9tHsJMUjdiwMpHB7W8WnSVOssIY+JElU= github.com/spf13/viper v1.14.0/go.mod h1:WT//axPky3FdvXHzGw33dNdXXXfFQqmEalje+egj8As= +github.com/ssgreg/nlreturn/v2 v2.2.1/go.mod h1:E/iiPB78hV7Szg2YfRgyIrk1AD6JVMTRkkxBiELzh2I= +github.com/stbenjam/no-sprintf-host-port v0.1.1/go.mod h1:TLhvtIvONRzdmkFiio4O8LHsN9N74I+PhRquPsxpL0I= github.com/streadway/amqp v0.0.0-20190404075320-75d898a42a94/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= github.com/streadway/amqp v0.0.0-20190827072141-edfb9018d271/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= +github.com/streadway/amqp v1.0.0/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= github.com/streadway/handy v0.0.0-20190108123426-d5acb3125c2a/go.mod h1:qNTQ5P5JnDBl6z3cMAg/SywNDC5ABu5ApDIw6lUbRmI= +github.com/streadway/handy v0.0.0-20200128134331-0f66f006fb2e/go.mod h1:qNTQ5P5JnDBl6z3cMAg/SywNDC5ABu5ApDIw6lUbRmI= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= github.com/stretchr/objx v0.5.0 h1:1zr/of2m5FGMsad5YfcqgdqdWrIhu+EBEJRhR1U7z/c= github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= +github.com/stretchr/testify v0.0.0-20170130113145-4d4bfba8f1d1/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= +github.com/stretchr/testify v1.1.4/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= @@ -739,45 +1219,112 @@ github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5 github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.7.2/go.mod h1:R6va5+xMeoiuVRoj+gSkQ7d3FALtqAAGI1FQKckRals= +github.com/stretchr/testify v1.7.5/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= +github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= +github.com/subosito/gotenv v1.3.0/go.mod h1:YzJjq/33h7nrwdY+iHMhEOEEbW0ovIz0tB6t6PwAXzs= +github.com/subosito/gotenv v1.4.0/go.mod h1:mZd6rFysKEcUhUHXJk0C/08wAgyDBFuwEYL7vWWGaGo= github.com/subosito/gotenv v1.4.1 h1:jyEFiXpy21Wm81FBN71l9VoMMV8H8jG+qIK3GCpY6Qs= github.com/subosito/gotenv v1.4.1/go.mod h1:ayKnFf/c6rvx/2iiLrJUk1e6plDbT3edrFNGqEflhK0= +github.com/sylvia7788/contextcheck v1.0.4/go.mod h1:vuPKJMQ7MQ91ZTqfdyreNKwZjyUg6KO+IebVyQDedZQ= +github.com/syndtr/gocapability v0.0.0-20200815063812-42c35b437635/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww= github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 h1:epCh84lMvA70Z7CTTCmYQn2CKbY8j86K7/FAIr141uY= github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7/go.mod h1:q4W45IWZaF22tdD+VEXcAWRA037jwmWEB5VWYORlTpc= +github.com/tdakkota/asciicheck v0.1.1/go.mod h1:yHp0ai0Z9gUljN3o0xMhYJnH/IcvkdTBOX2fmJ93JEM= github.com/tecbot/gorocksdb v0.0.0-20191217155057-f0fad39f321c h1:g+WoO5jjkqGAzHWCjJB1zZfXPIAaDpzXIEJ0eS6B5Ok= github.com/tecbot/gorocksdb v0.0.0-20191217155057-f0fad39f321c/go.mod h1:ahpPrc7HpcfEWDQRZEmnXMzHY03mLDYMCxeDzy46i+8= github.com/tendermint/go-amino v0.16.0 h1:GyhmgQKvqF82e2oZeuMSp9JTN0N09emoSZlb2lyGa2E= github.com/tendermint/go-amino v0.16.0/go.mod h1:TQU0M1i/ImAo+tYpZi73AU3V/dKeCoMC9Sphe2ZwGME= +github.com/tendermint/tendermint v0.35.9 h1:yUEgfkcNHWSidsU8wHjRDbYPVijV4cHxCclKVITGRAQ= +github.com/tendermint/tendermint v0.35.9/go.mod h1:FYvzUDkmVv1awfFl9V85yl5NKyjxz6XLZGX132+ftAY= +github.com/tendermint/tm-db v0.6.6/go.mod h1:wP8d49A85B7/erz/r4YbKssKw6ylsO/hKtFk7E1aWZI= +github.com/tenntenn/modver v1.0.1/go.mod h1:bePIyQPb7UeioSRkw3Q0XeMhYZSMx9B8ePqg6SAMGH0= +github.com/tenntenn/text/transform v0.0.0-20200319021203-7eef512accb3/go.mod h1:ON8b8w4BN/kE1EOhwT0o+d62W65a6aPw1nouo9LMgyY= +github.com/tetafro/godot v1.4.11/go.mod h1:LR3CJpxDVGlYOWn3ZZg1PgNZdTUvzsZWu8xaEohUpn8= github.com/tidwall/btree v1.6.0 h1:LDZfKfQIBHGHWSwckhXI0RPSXzlo+KYdjK7FWSqOzzg= github.com/tidwall/btree v1.6.0/go.mod h1:twD9XRA5jj9VUQGELzDO4HPQTNJsoWWfYEL+EUQ2cKY= +github.com/timakin/bodyclose v0.0.0-20210704033933-f49887972144/go.mod h1:Qimiffbc6q9tBWlVV6x0P9sat/ao1xEkREYPPj9hphk= +github.com/tinylib/msgp v1.1.5/go.mod h1:eQsjooMTnV42mHu917E26IogZ2930nFyBQdofk10Udg= +github.com/tj/assert v0.0.3/go.mod h1:Ne6X72Q+TB1AteidzQncjw9PabbMp4PBMZ1k+vd1Pvk= +github.com/tklauser/go-sysconf v0.3.10 h1:IJ1AZGZRWbY8T5Vfk04D9WOA5WSejdflXxP03OUqALw= +github.com/tklauser/go-sysconf v0.3.10/go.mod h1:C8XykCvCb+Gn0oNCWPIlcb0RuglQTYaQ2hGm7jmxEFk= +github.com/tklauser/numcpus v0.4.0 h1:E53Dm1HjH1/R2/aoCtXtPgzmElmn51aOkhCFSuZq//o= +github.com/tklauser/numcpus v0.4.0/go.mod h1:1+UI3pD8NW14VMwdgJNJ1ESk2UnwhAnz5hMwiKKqXCQ= github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= +github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= +github.com/tmc/grpc-websocket-proxy v0.0.0-20200427203606-3cfed13b9966/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= +github.com/tomarrell/wrapcheck/v2 v2.6.2/go.mod h1:ao7l5p0aOlUNJKI0qVwB4Yjlqutd0IvAB9Rdwyilxvg= +github.com/tomasen/realip v0.0.0-20180522021738-f0c99a92ddce/go.mod h1:o8v6yHRoik09Xen7gje4m9ERNah1d1PPsVq1VEx9vE4= +github.com/tommy-muehle/go-mnd/v2 v2.5.0/go.mod h1:WsUAkMJMYww6l/ufffCD3m+P7LEvr8TnZn9lwVDlgzw= +github.com/ttacon/chalk v0.0.0-20160626202418-22c06c80ed31/go.mod h1:onvgF043R+lC5RZ8IT9rBXDaEDnpnw/Cl+HFiw+v/7Q= github.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926/go.mod h1:9ESjWnEqriFuLhtthL60Sar/7RFoluCcXsuvEwTV5KM= github.com/twitchyliquid64/golang-asm v0.15.1 h1:SU5vSMR7hnwNxj24w34ZyCi/FmDZTkS4MhqMhdFk5YI= github.com/twitchyliquid64/golang-asm v0.15.1/go.mod h1:a1lVb/DtPvCB8fslRZhAngC2+aY1QWCk3Cedj/Gdt08= github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0= github.com/ugorji/go/codec v1.2.9 h1:rmenucSohSTiyL09Y+l2OCk+FrMxGMzho2+tjr5ticU= github.com/ugorji/go/codec v1.2.9/go.mod h1:UNopzCgEMSXjBc6AOMqYvWC1ktqTAfzJZUZgYf6w6lg= +github.com/ultraware/funlen v0.0.3/go.mod h1:Dp4UiAus7Wdb9KUZsYWZEWiRzGuM2kXM1lPbfaF6xhA= +github.com/ultraware/whitespace v0.0.5/go.mod h1:aVMh/gQve5Maj9hQ/hg+F75lr/X5A89uZnzAmWSineA= github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= github.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= +github.com/uudashr/gocognit v1.0.6/go.mod h1:nAIUuVBnYU7pcninia3BHOvQkpQCeO76Uscky5BOwcY= +github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc= +github.com/valyala/fasthttp v1.30.0/go.mod h1:2rsYD01CKFrjjsvFxx75KlEUNpWNBY9JWD3K/7o2Cus= +github.com/valyala/quicktemplate v1.7.0/go.mod h1:sqKJnoaOF88V07vkO+9FL8fb9uZg/VPSJnLYn+LmLk8= +github.com/valyala/tcplisten v1.0.0/go.mod h1:T0xQ8SeCZGxckz9qRXTfG43PvQ/mcWh7FwZEA7Ioqkc= +github.com/vektra/mockery/v2 v2.14.0/go.mod h1:bnD1T8tExSgPD1ripLkDbr60JA9VtQeu12P3wgLZd7M= +github.com/viki-org/dnscache v0.0.0-20130720023526-c70c1f23c5d8/go.mod h1:dniwbG03GafCjFohMDmz6Zc6oCuiqgH6tGNyXTkHzXE= +github.com/vishvananda/netlink v1.1.0/go.mod h1:cTgwzPIzzgDAYoQrMm0EdrjRUBkTqKYppBueQtXaqoE= +github.com/vishvananda/netns v0.0.0-20191106174202-0a2b9b5464df/go.mod h1:JP3t17pCcGlemwknint6hfoeCVQrEMVwxRLRjXpq+BU= +github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= +github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= +github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415/go.mod h1:GwrjFmJcFw6At/Gs6z4yjiIwzuJ1/+UwLxMQDVQXShQ= +github.com/xeipuuv/gojsonschema v1.2.0/go.mod h1:anYRn/JVcOK2ZgGU+IjEV4nwlhoK5sQluxsYJ78Id3Y= github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= +github.com/xo/terminfo v0.0.0-20210125001918-ca9a967f8778/go.mod h1:2MuV+tbUrU1zIOPMxZ5EncGwgmMJsa+9ucAQZXxsObs= github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= +github.com/yagipy/maintidx v1.0.0/go.mod h1:0qNf/I/CCZXSMhsRsrEPDZ+DkekpKLXAJfsTACwgXLk= +github.com/yeya24/promlinter v0.2.0/go.mod h1:u54lkmBOZrpEbQQ6gox2zWKKLKu2SGe+2KOiextY+IA= +github.com/yudai/gojsondiff v1.0.0/go.mod h1:AY32+k2cwILAkW1fbgxQ5mUmMiZFgLIV+FBNExI05xg= +github.com/yudai/golcs v0.0.0-20170316035057-ecda9a501e82/go.mod h1:lgjkn3NuSvDfVJdfcVVdX+jpBxNmX4rDAzaS45IcYoM= +github.com/yudai/pp v2.0.1+incompatible/go.mod h1:PuxR/8QJ7cyCkFp/aUDS+JY727OFEZkTdatxwunjIkc= github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= +github.com/yuin/goldmark v1.4.0/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= +github.com/yuin/goldmark v1.4.1/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= +github.com/yusufpapurcu/wmi v1.2.2/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= github.com/zondax/hid v0.9.2 h1:WCJFnEDMiqGF64nlZz28E9qLVZ0KSJ7xpc5DLEyma2U= github.com/zondax/hid v0.9.2/go.mod h1:l5wttcP0jwtdLjqjMMWFVEE7d1zO0jvSPA9OPZxWpEM= github.com/zondax/ledger-go v0.14.3 h1:wEpJt2CEcBJ428md/5MgSLsXLBos98sBOyxNmCjfUCw= github.com/zondax/ledger-go v0.14.3/go.mod h1:IKKaoxupuB43g4NxeQmbLXv7T9AlQyie1UpHb342ycI= +gitlab.com/bosi/decorder v0.2.2/go.mod h1:9K1RB5+VPNQYtXtTDAzd2OEftsZb1oV0IrJrzChSdGE= go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= +go.etcd.io/bbolt v1.3.4/go.mod h1:G5EMThwa9y8QZGBClrRx5EY+Yw9kAhnjy3bSjsnlVTQ= +go.etcd.io/bbolt v1.3.6/go.mod h1:qXsaaIqmgQH0T+OPdb99Bf+PKfBBQVAdyD6TY9G8XM4= go.etcd.io/bbolt v1.3.7 h1:j+zJOnnEjF/kyHlDDgGnVL/AIqIJPq8UoB2GSNfkUfQ= go.etcd.io/bbolt v1.3.7/go.mod h1:N9Mkw9X8x5fupy0IKsmuqVtoGDyxsaDlbk4Rd05IAQw= go.etcd.io/etcd v0.0.0-20191023171146-3cf2f69b5738/go.mod h1:dnLIgRNXwCJa5e+c6mIZCrds/GIG4ncV9HhK5PX7jPg= +go.etcd.io/etcd v0.0.0-20200513171258-e048e166ab9c/go.mod h1:xCI7ZzBfRuGgBXyXO6yfWfDmlWd35khcWpUa4L0xI/k= +go.etcd.io/etcd/api/v3 v3.5.0/go.mod h1:cbVKeC6lCfl7j/8jBhAK6aIYO9XOjdptoxU/nLQcPvs= +go.etcd.io/etcd/api/v3 v3.5.1/go.mod h1:cbVKeC6lCfl7j/8jBhAK6aIYO9XOjdptoxU/nLQcPvs= +go.etcd.io/etcd/api/v3 v3.5.4/go.mod h1:5GB2vv4A4AOn3yk7MftYGHkUfGtDHnEraIjym4dYz5A= +go.etcd.io/etcd/client/pkg/v3 v3.5.0/go.mod h1:IJHfcCEKxYu1Os13ZdwCwIUTUVGYTSAM3YSwc9/Ac1g= +go.etcd.io/etcd/client/pkg/v3 v3.5.1/go.mod h1:IJHfcCEKxYu1Os13ZdwCwIUTUVGYTSAM3YSwc9/Ac1g= +go.etcd.io/etcd/client/pkg/v3 v3.5.4/go.mod h1:IJHfcCEKxYu1Os13ZdwCwIUTUVGYTSAM3YSwc9/Ac1g= +go.etcd.io/etcd/client/v2 v2.305.0/go.mod h1:h9puh54ZTgAKtEbut2oe9P4L/oqKCVB6xsXlzd7alYQ= +go.etcd.io/etcd/client/v2 v2.305.1/go.mod h1:pMEacxZW7o8pg4CrFE7pquyCJJzZvkvdD2RibOCCCGs= +go.etcd.io/etcd/client/v2 v2.305.4/go.mod h1:Ud+VUwIi9/uQHOMA+4ekToJ12lTxlv0zB/+DHwTGEbU= +go.etcd.io/etcd/client/v3 v3.5.0/go.mod h1:AIKXXVX/DQXtfTEqBryiLTUXwON+GuvO6Z7lLS/oTh0= +go.etcd.io/etcd/client/v3 v3.5.4/go.mod h1:ZaRkVgBZC+L+dLCjTcF1hRXpgZXQPOvnA/Ak/gq3kiY= +go.mozilla.org/mozlog v0.0.0-20170222151521-4bb13139d403/go.mod h1:jHoPAGnDrCy6kaI2tAze5Prf0Nr0w/oNkROt2lw3n3o= go.opencensus.io v0.20.1/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= go.opencensus.io v0.20.2/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= @@ -786,18 +1333,31 @@ go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= +go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= +go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= +go.uber.org/atomic v1.9.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= +go.uber.org/goleak v1.1.11-0.20210813005559-691160354723/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ= +go.uber.org/goleak v1.1.11/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ= go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= go.uber.org/multierr v1.3.0/go.mod h1:VgVr7evmIr6uPjLBxg28wmKNXyqE9akIJ5XnfpiKl+4= +go.uber.org/multierr v1.4.0/go.mod h1:VgVr7evmIr6uPjLBxg28wmKNXyqE9akIJ5XnfpiKl+4= +go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU= +go.uber.org/multierr v1.7.0/go.mod h1:7EAYxJLBy9rStEaz58O2t4Uvip6FSURkq8/ppBp95ak= +go.uber.org/multierr v1.8.0/go.mod h1:7EAYxJLBy9rStEaz58O2t4Uvip6FSURkq8/ppBp95ak= go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9Ejo0C68/HhF8uaILCdgjnY+goOA= go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= go.uber.org/zap v1.13.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM= +go.uber.org/zap v1.17.0/go.mod h1:MXVU+bhUf/A7Xi2HNOnopQOrmycQ5Ih87HtOu4q5SSo= +go.uber.org/zap v1.19.1/go.mod h1:j3DNczoxDZroyBnOT1L/Q79cfUMGZxlv/9dzN7SM1rI= +go.uber.org/zap v1.21.0/go.mod h1:wjWOCqI0f2ZZrJF/UufIOkiC8ii6tm1iqIsLo76RfJw= golang.org/x/arch v0.0.0-20210923205945-b76863e36670 h1:18EFjUmQOcUvxNYSkA6jO9VAiXCnxFY6NyDX0bHDmkU= golang.org/x/arch v0.0.0-20210923205945-b76863e36670/go.mod h1:5om86z9Hs0C8fWVUuoMHwpExlXzs5Tkyp9hOrfG7pp8= golang.org/x/crypto v0.0.0-20170930174604-9419663f5a44/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/crypto v0.0.0-20180501155221-613d6eafa307/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20181203042331-505ab145d0a9/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= @@ -805,19 +1365,34 @@ golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACk golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190820162420-60c769a6c586/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190923035154-9ee001bba392/go.mod h1:/lpIB1dKB+9EgE3H3cr1v9wB50oz8l4C4h62xy7jSTY= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191206172530-e9b2fee46413/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200115085410-6d4e4cb37c7d/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20200323165209-0ec3e9974c59/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200510223506-06a226fb4e37/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200728195943-123391ffb6de/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20201016220609-9e8e0b390897/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20201221181555-eec23a3978ad/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= +golang.org/x/crypto v0.0.0-20210314154223-e6e6c4f2bb5b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= +golang.org/x/crypto v0.0.0-20210513164829-c07d793c2f9a/go.mod h1:P+XmwS30IXTQdn5tA2iutPOUgjI07+tq3H3K9MVA1s8= +golang.org/x/crypto v0.0.0-20210616213533-5ff15b29337e/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= +golang.org/x/crypto v0.0.0-20210817164053-32db794688a5/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= +golang.org/x/crypto v0.0.0-20210915214749-c084706c2272/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20211108221036-ceb1ce70b4fa/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= +golang.org/x/crypto v0.0.0-20220411220226-7b82a4e95df4/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= +golang.org/x/crypto v0.0.0-20220525230936-793ad666bf5e/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.5.0/go.mod h1:NK/OQwhpMQP3MwtdjgLlYHnH9ebylxKWv3e0fK+mkQU= golang.org/x/crypto v0.14.0 h1:wBqGXzWJW6m1XrIKlAH0Hs1JJ7+9KBwnIO8v66Q9cHc= golang.org/x/crypto v0.14.0/go.mod h1:MVFd36DqK4CsrnJYDkBA3VC4m2GkXAM0PvzMCn4JQf4= +golang.org/x/exp v0.0.0-20180321215751-8460e604b9de/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20180807140117-3d87b88a115f/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20190125153040-c74c464bbbf2/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek= @@ -830,6 +1405,8 @@ golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMk golang.org/x/exp v0.0.0-20200331195152-e8c3332aa8e5/go.mod h1:4M0jN8W1tt0AVLNr8HDosyJCDCDuyL9N9+3m7wDWgKw= golang.org/x/exp v0.0.0-20230711153332-06a737ee72cb h1:xIApU0ow1zwMa2uL1VDNeQlNVFTWMQxZUZCMDy0Q4Us= golang.org/x/exp v0.0.0-20230711153332-06a737ee72cb/go.mod h1:FXUEEKJgO7OQYeo8N01OfiKP8RXMtf6e8aTskBGqWdc= +golang.org/x/exp/typeparams v0.0.0-20220218215828-6cf2b201936e/go.mod h1:AbB0pIl9nAr9wVwH+Z2ZpaocVmF5I4GyWCDIsVjR0bk= +golang.org/x/image v0.0.0-20180708004352-c73c2afc3b81/go.mod h1:ux5Hcp/YLpHSI86hEcLt0YII63i6oz57MZXIpbrjZUs= golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= @@ -843,6 +1420,7 @@ golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRu golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/lint v0.0.0-20210508222113-6edffad5e616/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= @@ -854,6 +1432,9 @@ golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.5.0/go.mod h1:5OXOZSfqPIIbmVBIIKWRFfZjPR0E5r58TLhUjH0a2Ro= +golang.org/x/mod v0.5.1/go.mod h1:5OXOZSfqPIIbmVBIIKWRFfZjPR0E5r58TLhUjH0a2Ro= +golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3/go.mod h1:3p9vT2HGsQu2K1YbXdKPJLVgG5VJdoTa1poYQBtP1AY= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= golang.org/x/mod v0.11.0 h1:bUO06HqtnRcc/7l71XBe4WcqTZ+3AH1J59zWDDwLKgU= golang.org/x/net v0.0.0-20180719180050-a680a1efc54d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -877,6 +1458,8 @@ golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLL golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190813141303-74dc4d7220e7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190923162816-aa69164e4478/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20191002035440-2ec189313ef0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= @@ -896,12 +1479,32 @@ golang.org/x/net v0.0.0-20200813134508-3edf25e44fcc/go.mod h1:/O7V0waA8r7cgGh81R golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201031054903-ff519b6c9102/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201209123823-ac852fbbde11/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20201224014010-6772e930b67b/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20210119194325-5f4716e94777/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20210316092652-d523dce5a7f4/go.mod h1:RBQZq4jEuRlivfhVLdyRGr576XBO4/greRjx4P4O3yc= golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= +golang.org/x/net v0.0.0-20210410081132-afb366fc7cd1/go.mod h1:9tjilg8BloeKEkVJvy7fQ90B1CfIiPueXVOjqfkSzI8= +golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT/9KSuxbyM7479/AVlXFRxuMCk= +golang.org/x/net v0.0.0-20210503060351-7fd8e65b6420/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20210510120150-4163338589ed/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20210610132358-84b48f89b13b/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20210614182718-04defd469f4e/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20210813160813-60bc85c4be6d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20210917221730-978cfadd31cf/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= +golang.org/x/net v0.0.0-20220325170049-de3da57026de/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= +golang.org/x/net v0.0.0-20220412020605-290c469a71a5/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= +golang.org/x/net v0.0.0-20220425223048-2871e0cb64e4/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= +golang.org/x/net v0.0.0-20220520000938-2e3eb7b945c2/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= +golang.org/x/net v0.0.0-20220617184016-355a448f1bc9/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/net v0.5.0/go.mod h1:DivGGAXEgPSlEBzxGzZI+ZLohi+xUj054jfeKui00ws= golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= @@ -916,10 +1519,22 @@ golang.org/x/oauth2 v0.0.0-20200902213428-5d25da1a8d43/go.mod h1:KelEdhl1UZF7XfJ golang.org/x/oauth2 v0.0.0-20201109201403-9fd604954f58/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20201208152858-08078c50e5b5/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210218202405-ba52d332ba99/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210220000619-9bb904979d93/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210313182246-cd4f82c27b84/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210628180205-a41e5a781914/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210805134026-6f1e6394065a/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210819190943-2bc19b11175f/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20211005180243-6b3c2da341f1/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= +golang.org/x/oauth2 v0.0.0-20220309155454-6242fa91716a/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= +golang.org/x/oauth2 v0.0.0-20220411215720-9780585627b5/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190412183630-56d357773e84/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -927,6 +1542,8 @@ golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20220513210516-0976fa681c29/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20220601150217-0de741cfad7f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -939,27 +1556,36 @@ golang.org/x/sys v0.0.0-20181122145206-62eef0e2fa9b/go.mod h1:STP8DvDyc/dI5b8T5h golang.org/x/sys v0.0.0-20181205085412-a5c9d58dba9a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190130150945-aca44879d564/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190606203320-7fc4e5ec1444/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190626221950-04f50cda93cb/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190826190057-c7b8b68b1456/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190922100055-0a153f010e69/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190924154521-2837fb4f24fe/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191008105621-543471e840be/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191115151921-52ab43148777/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191220142924-d4481acd189f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200124204421-9fbb57f87de9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -976,25 +1602,70 @@ golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200814200057-3d37ad5750ed/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200831180312-196b9ba8737a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200905004654-be1d3432aa8f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200923182605-d9f96fdee20d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201201145000-ef89a241ccb3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201204225414-ed752295db88/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210104204734-6f8348627aad/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210112080510-489259a85091/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210220050731-9a76102bfb43/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210225134936-a50acf3fe073/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210303074136-134d130e1a04/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210305230114-8fe3ee5dd75b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210315160823-c6e025ad8005/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210320140829-1e4c9ba3b0c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210403161142-5e06dd20ab57/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423185535-09eb48e85fd7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210514084401-e8d321eab015/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210603125802-9665404d3644/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210616045830-e2b7044e8c71/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210806184541-e5e7981a1069/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210809222454-d867a43fc93e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210816183151-1e6c022a8912/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210819135213-f52c844e1c1c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210823070655-63515b42dcdf/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210906170528-6f6e22806c34/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210908233432-aa78b53d3365/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210917161153-d61c044b1678/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211007075335-d3039528d8ac/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211019181941-9d821ace8654/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211025201205-69cdffdb9359/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211105183446-c75c47738b0c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211116061358-0a5406a5449c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211124211545-fe61309f8881/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211205182925-97ca703d548d/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211210111614-af8b64212486/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211213223007-03aa0b5f6827/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220114195835-da31bd327af9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220128215802-99c3d69c2c27/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220209214540-3681064d5158/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220227234510-4e6760a101f9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220315194320-039c03cc5b86/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220319134239-a9b59b0215f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220328115105-d36c6a25d886/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220405210540-1e041c57c461/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220406163625-3f8b81556e12/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220412211240-33da011f77ad/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220502124256-b6088ccd6cba/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220610221304-9f5ed59c137d/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220615213510-4f61da869c0c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220624220833-87e55d714810/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220702020025-31831981b65f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -1004,8 +1675,10 @@ golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.13.0 h1:Af8nKPmuFypiUBjVoU9V20FiaFXOcuZI21p0ycVYYGE= golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= +golang.org/x/term v0.0.0-20220526004731-065cf7ba2467/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.4.0/go.mod h1:9P2UbLfCdcvo3p/nzKvsmas4TnlujnuoV9hGgYzW1lQ= golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= golang.org/x/term v0.13.0 h1:bb+I9cTfFazGW51MZqBVmZy7+JEJMouUHTUSKVQLBek= @@ -1028,36 +1701,53 @@ golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxb golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20200416051211-89c76fbcd5d1/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20180525024113-a5b4c53f6e8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180828015842-6cd1fcedba52/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190206041539-40960b6deb8e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= +golang.org/x/tools v0.0.0-20190228203856-589c23e65e65/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= +golang.org/x/tools v0.0.0-20190307163923-6a08e3108db3/go.mod h1:25r3+/G6/xytQM8iWZKq3Hn0kr0rgFKPUNVEL/dr3z4= golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190311215038-5c2858a9cfe5/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190321232350-e250d351ecad/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190322203728-c1a832b0ad89/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190624222133-a101b041ded4/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20190907020128-2ca718005c18/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20190910044552-dd2b5c81c578/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20190916130336-e45ffcd953cc/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191010075000-0337d82405ff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191029041327-9cc4af7d6b2c/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191029190741-b9c20aec41a5/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191108193012-7d206e10da11/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191216052735-49a3e744a425/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20191216173652-a0e659d51361/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200103221440-774c71fcf114/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200117161641-43d50277825c/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200117220505-0cba7a3a9ee9/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200122220014-bf1340f18c4a/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200204074204-1cc6d1ef6c74/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= @@ -1067,35 +1757,76 @@ golang.org/x/tools v0.0.0-20200224181240-023911ca70b2/go.mod h1:TB2adYChydJhpapK golang.org/x/tools v0.0.0-20200227222343-706bc42d1f0d/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= +golang.org/x/tools v0.0.0-20200324003944-a576cf524670/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= +golang.org/x/tools v0.0.0-20200329025819-fd4102a86c65/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= +golang.org/x/tools v0.0.0-20200414032229-332987a829c3/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200426102838-f3a5411a4c3b/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200622203043-20e05c1c8ffa/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200624225443-88f3c62a19ff/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200625211823-6506e20df31f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200626171337-aa94e735be7f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200630154851-b2d8b0336632/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200706234117-b22de6825cf7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.0.0-20200724022722-7017fd6b1305/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.0.0-20200812195022-5ae4c3c160a0/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.0.0-20200820010801-b793a1359eac/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.0.0-20200831203904-5a2aa26beb65/go.mod h1:Cj7w3i3Rnn0Xh82ur9kSqwfTHTeVxaDqrfMjpcNT6bE= golang.org/x/tools v0.0.0-20200904185747-39188db58858/go.mod h1:Cj7w3i3Rnn0Xh82ur9kSqwfTHTeVxaDqrfMjpcNT6bE= +golang.org/x/tools v0.0.0-20201001104356-43ebab892c4c/go.mod h1:z6u4i615ZeAfBE4XtMziQW1fSVJXACjjbWkB/mvPzlU= +golang.org/x/tools v0.0.0-20201002184944-ecd9fd270d5d/go.mod h1:z6u4i615ZeAfBE4XtMziQW1fSVJXACjjbWkB/mvPzlU= +golang.org/x/tools v0.0.0-20201022035929-9cf592e881e9/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20201023174141-c8cfbd0f21e6/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20201028025901-8cd080b735b3/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20201110124207-079ba7bd75cd/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20201201161351-ac6f37ff4c2a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20201208233053-a543418bbed2/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20201224043029-2b0845dc783e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20201230224404-63754364767c/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20210105154028-b0ab187a4818/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20210108195828-e2f9c7f1fc8e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= +golang.org/x/tools v0.1.1-0.20210205202024-ef80cdb6ec6d/go.mod h1:9bzcO0MWcOuT0tm1iBGzDVPshzfwoVvREIui8C+MHqU= +golang.org/x/tools v0.1.1-0.20210302220138-2ac05c832e1a/go.mod h1:9bzcO0MWcOuT0tm1iBGzDVPshzfwoVvREIui8C+MHqU= golang.org/x/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= +golang.org/x/tools v0.1.2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= +golang.org/x/tools v0.1.3/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= +golang.org/x/tools v0.1.4/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= +golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= +golang.org/x/tools v0.1.7/go.mod h1:LGqMHiF4EqQNHR1JncWGqT5BVaXmza+X+BDGol+dOxo= +golang.org/x/tools v0.1.8/go.mod h1:nABZi5QlRsZVlzPpHl034qft6wpY4eDcsTt5AaioBiU= +golang.org/x/tools v0.1.9-0.20211228192929-ee1ca4ffc4da/go.mod h1:nABZi5QlRsZVlzPpHl034qft6wpY4eDcsTt5AaioBiU= +golang.org/x/tools v0.1.9/go.mod h1:nABZi5QlRsZVlzPpHl034qft6wpY4eDcsTt5AaioBiU= +golang.org/x/tools v0.1.10/go.mod h1:Uh6Zz+xoGYZom868N8YTex3t7RhtHDBrE8Gzo9bV56E= +golang.org/x/tools v0.1.11-0.20220513221640-090b14e8501f/go.mod h1:SgwaegtQh8clINPpECJMqnxLv9I09HLqnW3RMqW0CA4= +golang.org/x/tools v0.1.11/go.mod h1:SgwaegtQh8clINPpECJMqnxLv9I09HLqnW3RMqW0CA4= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= golang.org/x/tools v0.6.0 h1:BOw41kyTf3PuCW1pVQf8+Cyg8pMlkYB1oo9iJ6D/lKM= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20220411194840-2f41105eb62f/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20220517211312-f3a8303e98df/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= +gonum.org/v1/gonum v0.0.0-20180816165407-929014505bf4/go.mod h1:Y+Yx5eoAFn32cQvJDxZx5Dpnq+c3wtXuadVZAcxbbBo= +gonum.org/v1/gonum v0.8.2/go.mod h1:oe/vMfY3deqTw+1EZJhuvEW2iwGF1bW9wwu7XCu0+v0= +gonum.org/v1/netlib v0.0.0-20190313105609-8cb42192e0e0/go.mod h1:wa6Ws7BG/ESfp6dHfk7C6KdzKA7wR7u/rKwOGE66zvw= +gonum.org/v1/plot v0.0.0-20190515093506-e2840ee46a6b/go.mod h1:Wt8AAjI+ypCyYX3nZBvf6cAIx93T+c/OS2HFAYskSZc= google.golang.org/api v0.3.1/go.mod h1:6wY9I6uQWHQ8EM57III9mq/AjF+i8G65rmVagqKMtkk= google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= +google.golang.org/api v0.10.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= google.golang.org/api v0.13.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= google.golang.org/api v0.14.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= google.golang.org/api v0.15.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= @@ -1111,16 +1842,40 @@ google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz513 google.golang.org/api v0.35.0/go.mod h1:/XrVsuzM0rZmrsbjJutiuftIzeuTQcEeaYcSk/mQ1dg= google.golang.org/api v0.36.0/go.mod h1:+z5ficQTmoYpPn8LCUNVpK5I7hwkpjbcgqA7I34qYtE= google.golang.org/api v0.40.0/go.mod h1:fYKFpnQN0DsDSKRVRcQSDQNtqWPfM9i+zNPxepjRCQ8= +google.golang.org/api v0.41.0/go.mod h1:RkxM5lITDfTzmyKFPt+wGrCJbVfniCr2ool8kTBzRTU= +google.golang.org/api v0.43.0/go.mod h1:nQsDGjRXMo4lvh5hP0TKqF244gqhGcr/YSIykhUk/94= +google.golang.org/api v0.47.0/go.mod h1:Wbvgpq1HddcWVtzsVLyfLp8lDg6AA241LmgIL59tHXo= +google.golang.org/api v0.48.0/go.mod h1:71Pr1vy+TAZRPkPs/xlCf5SsU8WjuAWv1Pfjbtukyy4= +google.golang.org/api v0.50.0/go.mod h1:4bNT5pAuq5ji4SRZm+5QIkjny9JAyVD/3gaSihNefaw= +google.golang.org/api v0.51.0/go.mod h1:t4HdrdoNgyN5cbEfm7Lum0lcLDLiise1F8qDKX00sOU= +google.golang.org/api v0.54.0/go.mod h1:7C4bFFOvVDGXjfDTAsgGwDgAxRDeQ4X8NvUedIt6z3k= +google.golang.org/api v0.55.0/go.mod h1:38yMfeP1kfjsl8isn0tliTjIb1rJXcQi4UXlbqivdVE= +google.golang.org/api v0.56.0/go.mod h1:38yMfeP1kfjsl8isn0tliTjIb1rJXcQi4UXlbqivdVE= +google.golang.org/api v0.57.0/go.mod h1:dVPlbZyBo2/OjBpmvNdpn2GRm6rPy75jyU7bmhdrMgI= +google.golang.org/api v0.59.0/go.mod h1:sT2boj7M9YJxZzgeZqXogmhfmRWDtPzT31xkieUbuZU= +google.golang.org/api v0.61.0/go.mod h1:xQRti5UdCmoCEqFxcz93fTl338AVqDgyaDRuOZ3hg9I= +google.golang.org/api v0.62.0/go.mod h1:dKmwPCydfsad4qCH08MSdgWjfHOyfpd4VtDGgRFdavw= +google.golang.org/api v0.63.0/go.mod h1:gs4ij2ffTRXwuzzgJl/56BdwJaA194ijkfn++9tDuPo= +google.golang.org/api v0.67.0/go.mod h1:ShHKP8E60yPsKNw/w8w+VYaj9H6buA5UqDp8dhbQZ6g= +google.golang.org/api v0.70.0/go.mod h1:Bs4ZM2HGifEvXwd50TtW70ovgJffJYw2oRCOFU/SkfA= +google.golang.org/api v0.71.0/go.mod h1:4PyU6e6JogV1f9eA4voyrTY2batOLdgZ5qZ5HOCc4j8= +google.golang.org/api v0.74.0/go.mod h1:ZpfMZOVRMywNyvJFeqL9HRWBgAuRfSjJFpe9QtRRyDs= +google.golang.org/api v0.75.0/go.mod h1:pU9QmyHLnzlpar1Mjt4IbapUCy8J+6HD6GeELN69ljA= +google.golang.org/api v0.78.0/go.mod h1:1Sg78yoMLOhlQTeF+ARBoytAcH1NNyyl390YMy6rKmw= +google.golang.org/api v0.81.0/go.mod h1:FA6Mb/bZxj706H2j+j2d6mHEEaHBmbbWnkfvmorOCko= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.2.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= +google.golang.org/appengine v1.6.2/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= +google.golang.org/genproto v0.0.0-20170818010345-ee236bd376b0/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20180831171423-11092d34479b/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= +google.golang.org/genproto v0.0.0-20181107211654-5fc9ac540362/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= @@ -1129,6 +1884,7 @@ google.golang.org/genproto v0.0.0-20190530194941-fb225487d101/go.mod h1:z3L6/3dT google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= +google.golang.org/genproto v0.0.0-20190927181202-20e1ac93f88c/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= google.golang.org/genproto v0.0.0-20191115194625-c23dd37a84c9/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= google.golang.org/genproto v0.0.0-20191216164720-4f79533eabd1/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= @@ -1149,6 +1905,8 @@ google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfG google.golang.org/genproto v0.0.0-20200515170657-fc4c6c6a6587/go.mod h1:YsZOwe1myG/8QRHRsmBRE1LrgQY60beZKjly0O1fX9U= google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA= +google.golang.org/genproto v0.0.0-20200626011028-ee7919e894b5/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20200707001353-8e8330bf89df/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= @@ -1159,14 +1917,59 @@ google.golang.org/genproto v0.0.0-20201210142538-e3217bee35cc/go.mod h1:FWY/as6D google.golang.org/genproto v0.0.0-20201214200347-8c77b98c765d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210108203827-ffc7fda8c3d7/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210126160654-44e461bb6506/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210222152913-aa3ee6e6a81c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210226172003-ab064af71705/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210303154014-9728d6b83eeb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210310155132-4ce2db91004e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210319143718-93e7006c17a6/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210402141018-6c239bbf2bb1/go.mod h1:9lPAdzaEmUacj36I+k7YKbEc5CXzPIeORRgDAUOu28A= +google.golang.org/genproto v0.0.0-20210513213006-bf773b8c8384/go.mod h1:P3QM42oQyzQSnHPnZ/vqoCdDmzH28fzWByN9asMeM8A= +google.golang.org/genproto v0.0.0-20210602131652-f16073e35f0c/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= +google.golang.org/genproto v0.0.0-20210604141403-392c879c8b08/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= +google.golang.org/genproto v0.0.0-20210608205507-b6d2f5bf0d7d/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= +google.golang.org/genproto v0.0.0-20210624195500-8bfb893ecb84/go.mod h1:SzzZ/N+nwJDaO1kznhnlzqS8ocJICar6hYhVyhi++24= +google.golang.org/genproto v0.0.0-20210713002101-d411969a0d9a/go.mod h1:AxrInvYm1dci+enl5hChSFPOmmUF1+uAa/UsgNRWd7k= +google.golang.org/genproto v0.0.0-20210716133855-ce7ef5c701ea/go.mod h1:AxrInvYm1dci+enl5hChSFPOmmUF1+uAa/UsgNRWd7k= +google.golang.org/genproto v0.0.0-20210728212813-7823e685a01f/go.mod h1:ob2IJxKrgPT52GcgX759i1sleT07tiKowYBGbczaW48= +google.golang.org/genproto v0.0.0-20210805201207-89edb61ffb67/go.mod h1:ob2IJxKrgPT52GcgX759i1sleT07tiKowYBGbczaW48= +google.golang.org/genproto v0.0.0-20210813162853-db860fec028c/go.mod h1:cFeNkxwySK631ADgubI+/XFU/xp8FD5KIVV4rj8UC5w= +google.golang.org/genproto v0.0.0-20210821163610-241b8fcbd6c8/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= +google.golang.org/genproto v0.0.0-20210828152312-66f60bf46e71/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= +google.golang.org/genproto v0.0.0-20210831024726-fe130286e0e2/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= +google.golang.org/genproto v0.0.0-20210903162649-d08c68adba83/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= +google.golang.org/genproto v0.0.0-20210909211513-a8c4777a87af/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= +google.golang.org/genproto v0.0.0-20210917145530-b395a37504d4/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= +google.golang.org/genproto v0.0.0-20210924002016-3dee208752a0/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20211008145708-270636b82663/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20211028162531-8db9c33dc351/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20211118181313-81c1377c94b1/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20211129164237-f09f9a12af12/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20211203200212-54befc351ae9/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20211206160659-862468c7d6e0/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20211208223120-3a66f561d7aa/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20211221195035-429b39de9b1c/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20220126215142-9970aeb2e350/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20220207164111-0872dc986b00/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20220218161850-94dd64e39d7c/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= +google.golang.org/genproto v0.0.0-20220222213610-43724f9ea8cf/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= +google.golang.org/genproto v0.0.0-20220304144024-325a89244dc8/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= +google.golang.org/genproto v0.0.0-20220310185008-1973136f34c6/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= google.golang.org/genproto v0.0.0-20220314164441-57ef72a4c106/go.mod h1:hAL49I2IFola2sVEjAn7MEwsja0xp51I0tlGAf9hz4E= +google.golang.org/genproto v0.0.0-20220324131243-acbaeb5b85eb/go.mod h1:hAL49I2IFola2sVEjAn7MEwsja0xp51I0tlGAf9hz4E= +google.golang.org/genproto v0.0.0-20220407144326-9054f6ed7bac/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= +google.golang.org/genproto v0.0.0-20220413183235-5e96e2839df9/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= +google.golang.org/genproto v0.0.0-20220414192740-2d67ff6cf2b4/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= +google.golang.org/genproto v0.0.0-20220421151946-72621c1f0bd3/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= +google.golang.org/genproto v0.0.0-20220429170224-98d788798c3e/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= +google.golang.org/genproto v0.0.0-20220505152158-f39f71e6c8f3/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= +google.golang.org/genproto v0.0.0-20220519153652-3a47de7e79bd/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= google.golang.org/genproto v0.0.0-20231012201019-e917dd12ba7a h1:fwgW9j3vHirt4ObdHoYNwuO24BEZjSzbh+zPaNWoiY8= google.golang.org/genproto v0.0.0-20231012201019-e917dd12ba7a/go.mod h1:EMfReVxb80Dq1hhioy0sOsY9jCE46YDgHlJ7fWVUWRE= google.golang.org/genproto/googleapis/api v0.0.0-20231002182017-d307bd883b97 h1:W18sezcAYs+3tDZX4F80yctqa12jcP1PUS2gQu1zTPU= google.golang.org/genproto/googleapis/api v0.0.0-20231002182017-d307bd883b97/go.mod h1:iargEX0SFPm3xcfMI0d1domjg0ZF4Aa0p2awqyxhvF0= google.golang.org/genproto/googleapis/rpc v0.0.0-20231016165738-49dd2c1f3d0b h1:ZlWIi1wSK56/8hn4QcBp/j9M7Gt3U/3hZw3mC7vDICo= google.golang.org/genproto/googleapis/rpc v0.0.0-20231016165738-49dd2c1f3d0b/go.mod h1:swOH3j0KzcDDgGUWr+SNpyTen5YrXjS3eyPzFYKc6lc= +google.golang.org/grpc v1.8.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= google.golang.org/grpc v1.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.0/go.mod h1:chYK+tFQF0nDUGJgXMSgLCQk3phJEuONr2DCgLDdAQM= @@ -1176,11 +1979,13 @@ google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ij google.golang.org/grpc v1.22.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.23.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= +google.golang.org/grpc v1.24.0/go.mod h1:XDChyiUovWa60DnaeDeZmSW86xtLtjtZbwvSiRnRtcA= google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60= +google.golang.org/grpc v1.29.0/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= @@ -1191,10 +1996,24 @@ google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv google.golang.org/grpc v1.34.0/go.mod h1:WotjhfgOW/POjDeRt8vscBtXq+2VjORFy659qA51WJ8= google.golang.org/grpc v1.35.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= +google.golang.org/grpc v1.36.1/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= +google.golang.org/grpc v1.37.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= +google.golang.org/grpc v1.37.1/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= +google.golang.org/grpc v1.38.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= +google.golang.org/grpc v1.39.0/go.mod h1:PImNr+rS9TWYb2O4/emRugxiyHZ5JyHW5F+RPnDzfrE= +google.golang.org/grpc v1.39.1/go.mod h1:PImNr+rS9TWYb2O4/emRugxiyHZ5JyHW5F+RPnDzfrE= +google.golang.org/grpc v1.40.0/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= +google.golang.org/grpc v1.40.1/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= +google.golang.org/grpc v1.42.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ590SU= +google.golang.org/grpc v1.44.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ590SU= google.golang.org/grpc v1.45.0/go.mod h1:lN7owxKUQEqMfSyQikvvk5tf/6zMPsrK+ONuO11+0rQ= +google.golang.org/grpc v1.46.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= +google.golang.org/grpc v1.46.2/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= +google.golang.org/grpc v1.47.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= google.golang.org/grpc v1.49.0/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= google.golang.org/grpc v1.58.3 h1:BjnpXut1btbtgN/6sp+brB2Kbm2LjNXnidYujAVbSoQ= google.golang.org/grpc v1.58.3/go.mod h1:tgX3ZQDlNJGU96V6yHh1T/JeoBQ2TXdr43YbYSsCJk0= +google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= @@ -1207,7 +2026,9 @@ google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGj google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= +google.golang.org/protobuf v1.27.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= +google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= @@ -1215,13 +2036,18 @@ gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLks gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20200902074654-038fdea0a05b/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= gopkg.in/cheggaaa/pb.v1 v1.0.25/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw= +gopkg.in/cheggaaa/pb.v1 v1.0.28/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= gopkg.in/gcfg.v1 v1.2.3/go.mod h1:yesOnuUOFQAhST5vPY4nbZsb/huCgGGXlipJsBn0b3o= +gopkg.in/ini.v1 v1.66.2/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= +gopkg.in/ini.v1 v1.66.4/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= +gopkg.in/ini.v1 v1.66.6/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/ini.v1 v1.67.0 h1:Dgnx+6+nfE+IfzjUEISNeydPJh9AXNNsWbGP9KzCsOA= gopkg.in/ini.v1 v1.67.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= @@ -1234,14 +2060,21 @@ gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.6/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.0-20200605160147-a5ece683394c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.0/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gotest.tools v2.2.0+incompatible h1:VsBPFP1AI068pPrMxtb/S8Zkgf9xEmTLJjfM+P5UIEo= +gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw= +gotest.tools/v3 v3.0.2/go.mod h1:3SzNCllyD9/Y+b5r9JIKQ474KzkZyqLqEfYqMsX94Bk= +gotest.tools/v3 v3.2.0/go.mod h1:Mcr9QNxkg0uMvy/YElmo4SpXgJKWgQvYrT7Kw5RzJ1A= gotest.tools/v3 v3.5.0 h1:Ljk6PdHdOhAb5aDMWXjDLMMhph+BpztA4v1QdqEW2eY= honnef.co/go/tools v0.0.0-20180728063816-88497007e858/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= @@ -1251,8 +2084,14 @@ honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWh honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= +honnef.co/go/tools v0.3.2/go.mod h1:jzwdWgg7Jdq75wlfblQxO4neNaFFSvgc1tD5Wv8U0Yw= +mvdan.cc/gofumpt v0.3.1/go.mod h1:w3ymliuxvzVx8DAutBnVyDqYb1Niy/yCJt/lk821YCE= +mvdan.cc/interfacer v0.0.0-20180901003855-c20040233aed/go.mod h1:Xkxe497xwlCKkIaQYRfC7CSLworTXY9RMqwhhCm+8Nc= +mvdan.cc/lint v0.0.0-20170908181259-adc824a0674b/go.mod h1:2odslEg/xrtNQqCYg2/jCoyKnw3vv5biOc3JnIcYfL4= +mvdan.cc/unparam v0.0.0-20211214103731-d0ef000c54e5/go.mod h1:b8RRCBm0eeiWR8cfN88xeq2G5SG3VKGO+5UPWi5FSOY= nhooyr.io/websocket v1.8.6 h1:s+C3xAMLwGmlI31Nyn/eAehUlZPwfYZu2JXM621Q5/k= nhooyr.io/websocket v1.8.6/go.mod h1:B70DZP8IakI65RVQ51MsWP/8jndNma26DVA/nFSCgW0= +pgregory.net/rapid v0.4.8/go.mod h1:Z5PbWqjvWR1I3UGjvboUuan4fe4ZYEYNLNQLExzCoUs= pgregory.net/rapid v0.5.5 h1:jkgx1TjbQPD/feRoK+S/mXw9e1uj6WilpHrXJowi6oA= pgregory.net/rapid v0.5.5/go.mod h1:PY5XlDGj0+V1FCq0o192FdRhpKHGTRIWBgqjDBTrq04= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= @@ -1260,6 +2099,7 @@ rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o= +sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc= sigs.k8s.io/yaml v1.3.0 h1:a2VclLzOGrwOHDiV8EfBGhvjHvP46CtW5j6POvhYGGo= sigs.k8s.io/yaml v1.3.0/go.mod h1:GeOyir5tyXNByN85N/dRIT9es5UQNerPYEKK56eTBm8= sourcegraph.com/sourcegraph/appdash v0.0.0-20190731080439-ebfcffb1b5c0/go.mod h1:hI742Nqp5OhwiqlzhgfbWU4mW4yO10fP+LoT9WOswdU= diff --git a/proto/kira/collectives/collective.proto b/proto/kira/collectives/collective.proto index 5b20d10a0..5c26fbe74 100644 --- a/proto/kira/collectives/collective.proto +++ b/proto/kira/collectives/collective.proto @@ -1,93 +1,96 @@ -syntax = "proto3"; -package kira.collectives; - -import "gogoproto/gogo.proto"; -import "google/protobuf/any.proto"; -import "cosmos_proto/cosmos.proto"; -import "google/protobuf/timestamp.proto"; - -option go_package = "github.com/KiraCore/sekai/x/collectives/types"; - -message DepositWhitelist { - option (gogoproto.equal) = true; - - bool any = 1; // allow/prevent anyone who is not explicitly specified by role or address to bond to this collective - repeated uint64 roles = 2; // list of specific roles allowed to deposit to this collective - repeated string accounts = 3; // addresses allowed to deposit to this collective -} -message OwnersWhitelist { - option (gogoproto.equal) = true; - - repeated uint64 roles = 1; - repeated string accounts = 2; -} -message WeightedSpendingPool { - option (gogoproto.equal) = true; - - string name = 1; // spending pool to which staking rewards will be sent - string weight = 2 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; // A decimal (0-1) defining what percentage of all rewards should be sent to this specific spending pool -} - -enum CollectiveStatus { - option (gogoproto.goproto_enum_prefix) = false; - - // Active status - ACTIVE = 0 [ (gogoproto.enumvalue_customname) = "CollectiveActive" ]; - - // Inactive status - INACTIVE = 1 [ (gogoproto.enumvalue_customname) = "CollectiveInactive" ]; - - // Paused status - PAUSED = 2 [ (gogoproto.enumvalue_customname) = "CollectivePaused" ]; -} - - -message Collective { - option (gogoproto.equal) = true; - - string name = 1; - string description = 2; // max 256 characters - CollectiveStatus status = 3; // defines whether or not a collective should actively collect and distribute rewards or not - DepositWhitelist deposit_whitelist = 4 [(gogoproto.nullable) = false]; // deposit-whitelist defines who is allowed to bond tokens - OwnersWhitelist owners_whitelist = 5 [ (gogoproto.nullable) = false ]; // list of accounts/roles controlling the collective via “governance-like” proposals - repeated WeightedSpendingPool spending_pools = 6 - [ (gogoproto.nullable) = false ]; // list of spending pools to which share of rewards - uint64 claim_start = 7; // (optional) timestamp defining when rewards claiming should start - uint64 claim_period = 8; // (optional) period in seconds defining every what period of time reward claim should be triggered - uint64 claim_end = 9; // (optional) timestamp defining when rewards claiming should end - uint64 vote_quorum = 10; // percentage - default: 51%, collective-specific % of owner accounts that must vote YES or NO for any of the collective proposals to be valid - uint64 vote_period = 11; // seconds - default: 600s, period of time in seconds that any of the collective proposals must last before passing or being rejected - uint64 vote_enactment = 12; // seconds - default: 300s, period of time that must pass before any of the collective proposals is enacted - repeated string donations = 13 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Coin", - (gogoproto.nullable) = false - ]; // rewards that the collective can control (e.g. transfer) - repeated string rewards = 14 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Coin", - (gogoproto.nullable) = false - ]; // rewards waiting to be distributed to the spending pool once the claim-period elapses - uint64 last_distribution = 15; // timestamp of the block in which tokens were last distributed - repeated string bonds = 16 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Coin", - (gogoproto.nullable) = false - ]; // total bonds put on the collective - uint64 creation_time = 17; // collective creation time -} - -message CollectiveContributor { - string address = 1; - string name = 2; - repeated string bonds = 3 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Coin", - (gogoproto.nullable) = false - ]; // list of staking DERIVATIVE tokens sent alongside tx (those tokens will be deduced from the user account) - uint64 locking = 4; // time at which deposited tokens will become transferable - string donation = 5 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; // a percentage of rewards that will be re-deposited to the collective - bool donation_lock = 6; // defines if changing the donation percentage should not be allowed during the locking period -} +syntax = "proto3"; +package kira.collectives; + +import "gogoproto/gogo.proto"; +import "google/protobuf/any.proto"; +import "cosmos_proto/cosmos.proto"; +import "google/protobuf/timestamp.proto"; + +option go_package = "github.com/KiraCore/sekai/x/collectives/types"; + +message DepositWhitelist { + option (gogoproto.equal) = true; + + bool any = 1; // allow/prevent anyone who is not explicitly specified by role or address to bond to this collective + repeated uint64 roles = 2; // list of specific roles allowed to deposit to this collective + repeated string accounts = 3; // addresses allowed to deposit to this collective +} +message OwnersWhitelist { + option (gogoproto.equal) = true; + + repeated uint64 roles = 1; + repeated string accounts = 2; +} +message WeightedSpendingPool { + option (gogoproto.equal) = true; + + string name = 1; // spending pool to which staking rewards will be sent + string weight = 2 [ + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", + (gogoproto.nullable) = false + ]; // A decimal (0-1) defining what percentage of all rewards should be sent to this specific spending pool +} + +enum CollectiveStatus { + option (gogoproto.goproto_enum_prefix) = false; + + // Active status + ACTIVE = 0 [ (gogoproto.enumvalue_customname) = "CollectiveActive" ]; + + // Inactive status + INACTIVE = 1 [ (gogoproto.enumvalue_customname) = "CollectiveInactive" ]; + + // Paused status + PAUSED = 2 [ (gogoproto.enumvalue_customname) = "CollectivePaused" ]; +} + + +message Collective { + option (gogoproto.equal) = true; + + string name = 1; + string description = 2; // max 256 characters + CollectiveStatus status = 3; // defines whether or not a collective should actively collect and distribute rewards or not + DepositWhitelist deposit_whitelist = 4 [(gogoproto.nullable) = false]; // deposit-whitelist defines who is allowed to bond tokens + OwnersWhitelist owners_whitelist = 5 [ (gogoproto.nullable) = false ]; // list of accounts/roles controlling the collective via “governance-like” proposals + repeated WeightedSpendingPool spending_pools = 6 + [ (gogoproto.nullable) = false ]; // list of spending pools to which share of rewards + uint64 claim_start = 7; // (optional) timestamp defining when rewards claiming should start + uint64 claim_period = 8; // (optional) period in seconds defining every what period of time reward claim should be triggered + uint64 claim_end = 9; // (optional) timestamp defining when rewards claiming should end + string vote_quorum = 10 [ + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", + (gogoproto.nullable) = false + ]; // percentage - default: 51%, collective-specific % of owner accounts that must vote YES or NO for any of the collective proposals to be valid + uint64 vote_period = 11; // seconds - default: 600s, period of time in seconds that any of the collective proposals must last before passing or being rejected + uint64 vote_enactment = 12; // seconds - default: 300s, period of time that must pass before any of the collective proposals is enacted + repeated string donations = 13 [ + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Coin", + (gogoproto.nullable) = false + ]; // rewards that the collective can control (e.g. transfer) + repeated string rewards = 14 [ + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Coin", + (gogoproto.nullable) = false + ]; // rewards waiting to be distributed to the spending pool once the claim-period elapses + uint64 last_distribution = 15; // timestamp of the block in which tokens were last distributed + repeated string bonds = 16 [ + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Coin", + (gogoproto.nullable) = false + ]; // total bonds put on the collective + uint64 creation_time = 17; // collective creation time +} + +message CollectiveContributor { + string address = 1; + string name = 2; + repeated string bonds = 3 [ + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Coin", + (gogoproto.nullable) = false + ]; // list of staking DERIVATIVE tokens sent alongside tx (those tokens will be deduced from the user account) + uint64 locking = 4; // time at which deposited tokens will become transferable + string donation = 5 [ + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", + (gogoproto.nullable) = false + ]; // a percentage of rewards that will be re-deposited to the collective + bool donation_lock = 6; // defines if changing the donation percentage should not be allowed during the locking period +} diff --git a/proto/kira/collectives/proposal.proto b/proto/kira/collectives/proposal.proto index 591dbb2e4..7fb9c561f 100644 --- a/proto/kira/collectives/proposal.proto +++ b/proto/kira/collectives/proposal.proto @@ -1,49 +1,52 @@ -syntax = "proto3"; -package kira.collectives; - -import "gogoproto/gogo.proto"; -import "cosmos_proto/cosmos.proto"; -import "kira/collectives/collective.proto"; - -option go_package = "github.com/KiraCore/sekai/x/collectives/types"; - -// proposal to transfer accumulated donations to a specific account -message ProposalCollectiveSendDonation { - option (cosmos_proto.implements_interface) = "Content"; - option (gogoproto.equal) = true; - - string name = 1; - string address = 2; - repeated string amounts = 3 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Coin", - (gogoproto.nullable) = false - ]; -} - -// proposal to update staking collective, e.g. change description, owners, contributors, spending-pool list, claim period, etc. -message ProposalCollectiveUpdate { - option (cosmos_proto.implements_interface) = "Content"; - option (gogoproto.equal) = true; - - string name = 1; - string description = 2; // max 256 characters - CollectiveStatus status = 3; // defines whether or not a collective should actively collect and distribute rewards or not - DepositWhitelist deposit_whitelist = 4 [(gogoproto.nullable) = false]; // deposit-whitelist defines who is allowed to bond tokens - OwnersWhitelist owners_whitelist = 5 [ (gogoproto.nullable) = false ]; // list of accounts/roles controlling the collective via “governance-like” proposals - repeated WeightedSpendingPool spending_pools = 6 - [ (gogoproto.nullable) = false ]; // list of spending pools to which share of rewards - uint64 claim_start = 7; // (optional) timestamp defining when rewards claiming should start - uint64 claim_period = 8; // (optional) period in seconds defining every what period of time reward claim should be triggered - uint64 claim_end = 9; // (optional) timestamp defining when rewards claiming should end - uint64 vote_quorum = 10; // percentage - default: 51%, collective-specific % of owner accounts that must vote YES or NO for any of the collective proposals to be valid - uint64 vote_period = 11; // seconds - default: 600s, period of time in seconds that any of the collective proposals must last before passing or being rejected - uint64 vote_enactment = 12; // seconds - default: 300s, period of time that must pass before any of the collective proposals is enacted -} - -// proposal to remove/delete Staking Collective from registry -message ProposalCollectiveRemove { - option (cosmos_proto.implements_interface) = "Content"; - option (gogoproto.equal) = true; - - string name = 1; -} +syntax = "proto3"; +package kira.collectives; + +import "gogoproto/gogo.proto"; +import "cosmos_proto/cosmos.proto"; +import "kira/collectives/collective.proto"; + +option go_package = "github.com/KiraCore/sekai/x/collectives/types"; + +// proposal to transfer accumulated donations to a specific account +message ProposalCollectiveSendDonation { + option (cosmos_proto.implements_interface) = "Content"; + option (gogoproto.equal) = true; + + string name = 1; + string address = 2; + repeated string amounts = 3 [ + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Coin", + (gogoproto.nullable) = false + ]; +} + +// proposal to update staking collective, e.g. change description, owners, contributors, spending-pool list, claim period, etc. +message ProposalCollectiveUpdate { + option (cosmos_proto.implements_interface) = "Content"; + option (gogoproto.equal) = true; + + string name = 1; + string description = 2; // max 256 characters + CollectiveStatus status = 3; // defines whether or not a collective should actively collect and distribute rewards or not + DepositWhitelist deposit_whitelist = 4 [(gogoproto.nullable) = false]; // deposit-whitelist defines who is allowed to bond tokens + OwnersWhitelist owners_whitelist = 5 [ (gogoproto.nullable) = false ]; // list of accounts/roles controlling the collective via “governance-like” proposals + repeated WeightedSpendingPool spending_pools = 6 + [ (gogoproto.nullable) = false ]; // list of spending pools to which share of rewards + uint64 claim_start = 7; // (optional) timestamp defining when rewards claiming should start + uint64 claim_period = 8; // (optional) period in seconds defining every what period of time reward claim should be triggered + uint64 claim_end = 9; // (optional) timestamp defining when rewards claiming should end + string vote_quorum = 10 [ + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", + (gogoproto.nullable) = false + ]; // percentage - default: 51%, collective-specific % of owner accounts that must vote YES or NO for any of the collective proposals to be valid + uint64 vote_period = 11; // seconds - default: 600s, period of time in seconds that any of the collective proposals must last before passing or being rejected + uint64 vote_enactment = 12; // seconds - default: 300s, period of time that must pass before any of the collective proposals is enacted +} + +// proposal to remove/delete Staking Collective from registry +message ProposalCollectiveRemove { + option (cosmos_proto.implements_interface) = "Content"; + option (gogoproto.equal) = true; + + string name = 1; +} diff --git a/proto/kira/collectives/tx.proto b/proto/kira/collectives/tx.proto index c2602ee58..d2cf99d5e 100644 --- a/proto/kira/collectives/tx.proto +++ b/proto/kira/collectives/tx.proto @@ -1,88 +1,91 @@ -syntax = "proto3"; -package kira.collectives; - -import "gogoproto/gogo.proto"; -import "google/protobuf/any.proto"; -import "cosmos_proto/cosmos.proto"; -import "google/protobuf/timestamp.proto"; -import "kira/collectives/collective.proto"; - -option go_package = "github.com/KiraCore/sekai/x/collectives/types"; - -// Msg defines the collectives Msg service. -service Msg { - // CreateCollective defines a method for creating collective. - // allow ANY user to create Staking Collective even if they have no roles or - // permissions enabling that - rpc CreateCollective(MsgCreateCollective) returns (MsgCreateCollectiveResponse); - // ContributeCollective defines a method for putting bonds on collective. - // can be sent by any whitelisted “contributor” account that wants to add - // tokens to the Staking Collective during or after creation process - rpc ContributeCollective(MsgBondCollective) returns (MsgBondCollectiveResponse); - // DonateCollective defines a method to set lock and donation for bonds on the - // collection - allows to lock staking derivatives for a specific time period - // and donating a defined percentage of staking rewards to the collective. - rpc DonateCollective(MsgDonateCollective) returns (MsgDonateCollectiveResponse); - // WithdrawCollective can be sent by any whitelisted “contributor” to withdraw - // their tokens (unless locking is enabled) - rpc WithdrawCollective(MsgWithdrawCollective) returns (MsgWithdrawCollectiveResponse); -} - -message MsgCreateCollective { - option (gogoproto.equal) = true; - - string sender = 1; - string name = 2; // collective name - unique and follow the same rules as councilor or validator moniker) - string description = 3; // max 256 characters - repeated string bonds = 4 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Coin", - (gogoproto.nullable) = false - ]; // list of staking DERIVATIVE tokens sent alongside tx (those tokens will be deduced from the user account) - DepositWhitelist deposit_whitelist = 5 [(gogoproto.nullable) = false]; // deposit-whitelist defines who is allowed to bond tokens - OwnersWhitelist owners_whitelist = 6 [ (gogoproto.nullable) = false ]; // list of accounts/roles controlling the collective via “governance-like” proposals - repeated WeightedSpendingPool spending_pools = 7 - [ (gogoproto.nullable) = false ]; // list of spending pools to which share of rewards - uint64 claim_start = 8; // (optional) timestamp defining when rewards claiming should start - uint64 claim_period = 9; // (optional) period in seconds defining every what period of time reward claim should be triggered - uint64 claim_end = 10; // (optional) timestamp defining when rewards claiming should end - uint64 vote_quorum = 11; // percentage - default: 51%, collective-specific % of owner accounts that must vote YES or NO for any of the collective proposals to be valid - uint64 vote_period = 12; // seconds - default: 600s, period of time in seconds that any of the collective proposals must last before passing or being rejected - uint64 vote_enactment = 13; // seconds - default: 300s, period of time that must pass before any of the collective proposals is enacted -} - -// MsgClaimValidatorResponse defines the Msg/CreateCollective response type. -message MsgCreateCollectiveResponse {} - -message MsgBondCollective { - string sender = 1; - string name = 2; - repeated string bonds = 3 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Coin", - (gogoproto.nullable) = false - ]; // list of STAKING tokens sent alongside tx (those tokens will be deduced from the user account) -} - -// MsgBondCollectiveResponse defines the Msg/BondCollective response type. -message MsgBondCollectiveResponse {} - -message MsgDonateCollective { - string sender = 1; - string name = 2; // collective name - uint64 locking = 3; // time at which deposited tokens will become transferable - string donation = 4 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; // a percentage of rewards that will be re-deposited to the collective - bool donation_lock = 5; // defines if changing the donation percentage should not be allowed during the locking period -} - -// MsgDonateCollectiveResponse defines the Msg/LockBondWithDonation response type. -message MsgDonateCollectiveResponse {} - -message MsgWithdrawCollective { - string sender = 1; - string name = 2; // collective name -} - -// MsgWithdrawCollectiveResponse defines the Msg/LockBondWithDonation response type. -message MsgWithdrawCollectiveResponse {} +syntax = "proto3"; +package kira.collectives; + +import "gogoproto/gogo.proto"; +import "google/protobuf/any.proto"; +import "cosmos_proto/cosmos.proto"; +import "google/protobuf/timestamp.proto"; +import "kira/collectives/collective.proto"; + +option go_package = "github.com/KiraCore/sekai/x/collectives/types"; + +// Msg defines the collectives Msg service. +service Msg { + // CreateCollective defines a method for creating collective. + // allow ANY user to create Staking Collective even if they have no roles or + // permissions enabling that + rpc CreateCollective(MsgCreateCollective) returns (MsgCreateCollectiveResponse); + // ContributeCollective defines a method for putting bonds on collective. + // can be sent by any whitelisted “contributor” account that wants to add + // tokens to the Staking Collective during or after creation process + rpc ContributeCollective(MsgBondCollective) returns (MsgBondCollectiveResponse); + // DonateCollective defines a method to set lock and donation for bonds on the + // collection - allows to lock staking derivatives for a specific time period + // and donating a defined percentage of staking rewards to the collective. + rpc DonateCollective(MsgDonateCollective) returns (MsgDonateCollectiveResponse); + // WithdrawCollective can be sent by any whitelisted “contributor” to withdraw + // their tokens (unless locking is enabled) + rpc WithdrawCollective(MsgWithdrawCollective) returns (MsgWithdrawCollectiveResponse); +} + +message MsgCreateCollective { + option (gogoproto.equal) = true; + + string sender = 1; + string name = 2; // collective name - unique and follow the same rules as councilor or validator moniker) + string description = 3; // max 256 characters + repeated string bonds = 4 [ + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Coin", + (gogoproto.nullable) = false + ]; // list of staking DERIVATIVE tokens sent alongside tx (those tokens will be deduced from the user account) + DepositWhitelist deposit_whitelist = 5 [(gogoproto.nullable) = false]; // deposit-whitelist defines who is allowed to bond tokens + OwnersWhitelist owners_whitelist = 6 [ (gogoproto.nullable) = false ]; // list of accounts/roles controlling the collective via “governance-like” proposals + repeated WeightedSpendingPool spending_pools = 7 + [ (gogoproto.nullable) = false ]; // list of spending pools to which share of rewards + uint64 claim_start = 8; // (optional) timestamp defining when rewards claiming should start + uint64 claim_period = 9; // (optional) period in seconds defining every what period of time reward claim should be triggered + uint64 claim_end = 10; // (optional) timestamp defining when rewards claiming should end + string vote_quorum = 11 [ + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", + (gogoproto.nullable) = false + ]; // percentage - default: 51%, collective-specific % of owner accounts that must vote YES or NO for any of the collective proposals to be valid + uint64 vote_period = 12; // seconds - default: 600s, period of time in seconds that any of the collective proposals must last before passing or being rejected + uint64 vote_enactment = 13; // seconds - default: 300s, period of time that must pass before any of the collective proposals is enacted +} + +// MsgClaimValidatorResponse defines the Msg/CreateCollective response type. +message MsgCreateCollectiveResponse {} + +message MsgBondCollective { + string sender = 1; + string name = 2; + repeated string bonds = 3 [ + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Coin", + (gogoproto.nullable) = false + ]; // list of STAKING tokens sent alongside tx (those tokens will be deduced from the user account) +} + +// MsgBondCollectiveResponse defines the Msg/BondCollective response type. +message MsgBondCollectiveResponse {} + +message MsgDonateCollective { + string sender = 1; + string name = 2; // collective name + uint64 locking = 3; // time at which deposited tokens will become transferable + string donation = 4 [ + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", + (gogoproto.nullable) = false + ]; // a percentage of rewards that will be re-deposited to the collective + bool donation_lock = 5; // defines if changing the donation percentage should not be allowed during the locking period +} + +// MsgDonateCollectiveResponse defines the Msg/LockBondWithDonation response type. +message MsgDonateCollectiveResponse {} + +message MsgWithdrawCollective { + string sender = 1; + string name = 2; // collective name +} + +// MsgWithdrawCollectiveResponse defines the Msg/LockBondWithDonation response type. +message MsgWithdrawCollectiveResponse {} diff --git a/proto/kira/gov/network_properties.proto b/proto/kira/gov/network_properties.proto index b70e9c985..62cc764ec 100644 --- a/proto/kira/gov/network_properties.proto +++ b/proto/kira/gov/network_properties.proto @@ -76,9 +76,8 @@ enum NetworkProperty { MINTING_NFT_FEE = 58 [ (gogoproto.enumvalue_customname) = "MintingNftFee" ]; VETO_THRESHOLD = 59 [ (gogoproto.enumvalue_customname) = "VetoThreshold" ]; AUTOCOMPOUND_INTERVAL_NUM_BLOCKS = 60 [ (gogoproto.enumvalue_customname) = "AutocompoundIntervalNumBlocks" ]; - BRIDGE_ADDRESS = 61 [ (gogoproto.enumvalue_customname) = "BridgeAddress" ]; - BRIDGE_COSMOS_ETHEREUM_EXCHANGE_RATE = 62 [ (gogoproto.enumvalue_customname) = "BridgeCosmosEthereumExchangeRate" ]; - BRIDGE_ETHEREUM_COSMOS_EXCHANGE_RATE = 63 [ (gogoproto.enumvalue_customname) = "BridgeEthereumCosmosExchangeRate" ]; + DOWNTIME_INACTIVE_DURATION = 61 [ (gogoproto.enumvalue_customname) = "DowntimeInactiveDuration" ]; + BRIDGE_ADDRESS = 62 [ (gogoproto.enumvalue_customname) = "BridgeAddress" ]; } message NetworkPropertyValue { @@ -91,7 +90,10 @@ message NetworkPropertyValue { message NetworkProperties { uint64 min_tx_fee = 1; // minimum transaction fee uint64 max_tx_fee = 2; // maximum transaction fee - uint64 vote_quorum = 3; // vote quorum to reach to move to enactment + string vote_quorum = 3 [ + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", + (gogoproto.nullable) = false + ]; // vote quorum to reach to move to enactment uint64 minimum_proposal_end_time = 4; // the minimum duration to start processing the proposal uint64 proposal_enactment_time = 5; // the duration to wait for enactment after proposal processing uint64 min_proposal_end_blocks = 6; // minimum blocks required for proposal voting @@ -165,7 +167,10 @@ message NetworkProperties { uint64 dapp_auto_denounce_time = 53; // in seconds (default 60), time the dapp leader allowed to send `execute-dapp-tx` uint64 dapp_mischance_rank_decrease_amount = 54; uint64 dapp_max_mischance = 55; - uint64 dapp_inactive_rank_decrease_percent = 56; + string dapp_inactive_rank_decrease_percent = 56 [ + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", + (gogoproto.nullable) = false + ]; string dapp_pool_slippage_default = 57 [ (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", (gogoproto.nullable) = false @@ -177,13 +182,6 @@ message NetworkProperties { (gogoproto.nullable) = false ]; uint64 autocompound_interval_num_blocks = 61; // default 17280 - once per day - string bridge_address = 62; - string bridge_cosmos_ethereum_exchange_rate = 63 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; - string bridge_ethereum_cosmos_exchange_rate = 64 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; + uint64 downtime_inactive_duration = 62; // default 600s - 10min + string bridge_address = 63; } diff --git a/proto/kira/gov/permission.proto b/proto/kira/gov/permission.proto index 363a89346..15727b221 100644 --- a/proto/kira/gov/permission.proto +++ b/proto/kira/gov/permission.proto @@ -1,229 +1,226 @@ -syntax = "proto3"; -package kira.gov; - -import "gogoproto/gogo.proto"; - -option go_package = "github.com/KiraCore/sekai/x/gov/types"; - -enum PermValue { - option (gogoproto.goproto_enum_prefix) = false; - - // PERMISSION_ZERO is a no-op permission. - PERMISSION_ZERO = 0 [(gogoproto.enumvalue_customname) = "PermZero"]; - - // PERMISSION_SET_PERMISSIONS defines the permission that allows to Set Permissions to other actors. - PERMISSION_SET_PERMISSIONS = 1 [(gogoproto.enumvalue_customname) = "PermSetPermissions"]; - - // PERMISSION_CLAIM_VALIDATOR defines the permission that allows to Claim a validator Seat. - PERMISSION_CLAIM_VALIDATOR = 2 [(gogoproto.enumvalue_customname) = "PermClaimValidator"]; - - // PERMISSION_CLAIM_COUNCILOR defines the permission that allows to Claim a Councilor Seat. - PERMISSION_CLAIM_COUNCILOR = 3 [(gogoproto.enumvalue_customname) = "PermClaimCouncilor"]; - - // PERMISSION_WHITELIST_ACCOUNT_PERMISSION_PROPOSAL defines the permission needed to create proposals for whitelisting an account permission. - PERMISSION_WHITELIST_ACCOUNT_PERMISSION_PROPOSAL = 4 [(gogoproto.enumvalue_customname) = "PermWhitelistAccountPermissionProposal"]; - - // PERMISSION_VOTE_WHITELIST_ACCOUNT_PERMISSION_PROPOSAL defines the permission that an actor must have in order to vote a - // Proposal to whitelist account permission. - PERMISSION_VOTE_WHITELIST_ACCOUNT_PERMISSION_PROPOSAL = 5 [(gogoproto.enumvalue_customname) = "PermVoteWhitelistAccountPermissionProposal"]; - - // PERMISSION_UPSERT_TOKEN_ALIAS - PERMISSION_UPSERT_TOKEN_ALIAS = 6 [(gogoproto.enumvalue_customname) = "PermUpsertTokenAlias"]; - - // PERMISSION_CHANGE_TX_FEE - PERMISSION_CHANGE_TX_FEE = 7 [(gogoproto.enumvalue_customname) = "PermChangeTxFee"]; - - // PERMISSION_UPSERT_TOKEN_RATE - PERMISSION_UPSERT_TOKEN_RATE = 8 [(gogoproto.enumvalue_customname) = "PermUpsertTokenRate"]; - - // PERMISSION_UPSERT_ROLE makes possible to add, modify and assign roles. - PERMISSION_UPSERT_ROLE = 9 [(gogoproto.enumvalue_customname) = "PermUpsertRole"]; - - // PERMISSION_CREATE_UPSERT_DATA_REGISTRY_PROPOSAL makes possible to create a proposal to change the Data Registry. - PERMISSION_CREATE_UPSERT_DATA_REGISTRY_PROPOSAL = 10 [(gogoproto.enumvalue_customname) = "PermCreateUpsertDataRegistryProposal"]; - - // PERMISSION_VOTE_UPSERT_DATA_REGISTRY_PROPOSAL makes possible to create a proposal to change the Data Registry. - PERMISSION_VOTE_UPSERT_DATA_REGISTRY_PROPOSAL = 11 [(gogoproto.enumvalue_customname) = "PermVoteUpsertDataRegistryProposal"]; - - // PERMISSION_CREATE_SET_NETWORK_PROPERTY_PROPOSAL defines the permission needed to create proposals for setting network property. - PERMISSION_CREATE_SET_NETWORK_PROPERTY_PROPOSAL = 12 [(gogoproto.enumvalue_customname) = "PermCreateSetNetworkPropertyProposal"]; - - // PERMISSION_VOTE_SET_NETWORK_PROPERTY_PROPOSAL defines the permission that an actor must have in order to vote a - // Proposal to set network property. - PERMISSION_VOTE_SET_NETWORK_PROPERTY_PROPOSAL = 13 [(gogoproto.enumvalue_customname) = "PermVoteSetNetworkPropertyProposal"]; - - // PERMISSION_CREATE_UPSERT_TOKEN_ALIAS_PROPOSAL defines the permission needed to create proposals for upsert token Alias. - PERMISSION_CREATE_UPSERT_TOKEN_ALIAS_PROPOSAL = 14 [(gogoproto.enumvalue_customname) = "PermCreateUpsertTokenAliasProposal"]; - - // PERMISSION_VOTE_UPSERT_TOKEN_ALIAS_PROPOSAL defines the permission needed to vote proposals for upsert token. - PERMISSION_VOTE_UPSERT_TOKEN_ALIAS_PROPOSAL = 15 [(gogoproto.enumvalue_customname) = "PermVoteUpsertTokenAliasProposal"]; - - // PERMISSION_CREATE_SET_POOR_NETWORK_MESSAGES defines the permission needed to create proposals for setting poor network messages - PERMISSION_CREATE_SET_POOR_NETWORK_MESSAGES = 16 [(gogoproto.enumvalue_customname) = "PermCreateSetPoorNetworkMessagesProposal"]; - - // PERMISSION_VOTE_SET_POOR_NETWORK_MESSAGES_PROPOSAL defines the permission needed to vote proposals to set poor network messages - PERMISSION_VOTE_SET_POOR_NETWORK_MESSAGES_PROPOSAL = 17 [(gogoproto.enumvalue_customname) = "PermVoteSetPoorNetworkMessagesProposal"]; - - // PERMISSION_CREATE_UPSERT_TOKEN_RATE_PROPOSAL defines the permission needed to create proposals for upsert token rate. - PERMISSION_CREATE_UPSERT_TOKEN_RATE_PROPOSAL = 18 [(gogoproto.enumvalue_customname) = "PermCreateUpsertTokenRateProposal"]; - - // PERMISSION_VOTE_UPSERT_TOKEN_RATE_PROPOSAL defines the permission needed to vote proposals for upsert token rate. - PERMISSION_VOTE_UPSERT_TOKEN_RATE_PROPOSAL = 19 [(gogoproto.enumvalue_customname) = "PermVoteUpsertTokenRateProposal"]; - - // PERMISSION_CREATE_UNJAIL_VALIDATOR_PROPOSAL defines the permission needed to create a proposal to unjail a validator. - PERMISSION_CREATE_UNJAIL_VALIDATOR_PROPOSAL = 20 [(gogoproto.enumvalue_customname) = "PermCreateUnjailValidatorProposal"]; - - // PERMISSION_VOTE_UNJAIL_VALIDATOR_PROPOSAL defines the permission needed to vote a proposal to unjail a validator. - PERMISSION_VOTE_UNJAIL_VALIDATOR_PROPOSAL = 21 [(gogoproto.enumvalue_customname) = "PermVoteUnjailValidatorProposal"]; - - // PERMISSION_CREATE_CREATE_ROLE_PROPOSAL defines the permission needed to create a proposal to create a role. - PERMISSION_CREATE_CREATE_ROLE_PROPOSAL = 22 [(gogoproto.enumvalue_customname) = "PermCreateRoleProposal"]; - - // PERMISSION_VOTE_CREATE_ROLE_PROPOSAL defines the permission needed to vote a proposal to create a role. - PERMISSION_VOTE_CREATE_ROLE_PROPOSAL = 23 [(gogoproto.enumvalue_customname) = "PermVoteCreateRoleProposal"]; - - // PERMISSION_CREATE_TOKENS_WHITE_BLACK_CHANGE_PROPOSAL defines the permission needed to create a proposal to blacklist/whitelisted tokens - PERMISSION_CREATE_TOKENS_WHITE_BLACK_CHANGE_PROPOSAL = 24 [(gogoproto.enumvalue_customname) = "PermCreateTokensWhiteBlackChangeProposal"]; - - // PERMISSION_VOTE_TOKENS_WHITE_BLACK_CHANGE_PROPOSAL defines the permission needed to vote on blacklist/whitelisted tokens proposal - PERMISSION_VOTE_TOKENS_WHITE_BLACK_CHANGE_PROPOSAL = 25 [(gogoproto.enumvalue_customname) = "PermVoteTokensWhiteBlackChangeProposal"]; - - // PERMISSION_CREATE_RESET_WHOLE_VALIDATOR_RANK_PROPOSAL defines the permission needed to create a proposal to reset whole validator rank - PERMISSION_CREATE_RESET_WHOLE_VALIDATOR_RANK_PROPOSAL = 26 [(gogoproto.enumvalue_customname) = "PermCreateResetWholeValidatorRankProposal"]; - - // PERMISSION_VOTE_RESET_WHOLE_VALIDATOR_RANK_PROPOSAL defines the permission needed to vote on reset whole validator rank proposal - PERMISSION_VOTE_RESET_WHOLE_VALIDATOR_RANK_PROPOSAL = 27 [(gogoproto.enumvalue_customname) = "PermVoteResetWholeValidatorRankProposal"]; - - // PERMISSION_CREATE_SOFTWARE_UPGRADE_PROPOSAL defines the permission needed to create a proposal for software upgrade - PERMISSION_CREATE_SOFTWARE_UPGRADE_PROPOSAL = 28 [(gogoproto.enumvalue_customname) = "PermCreateSoftwareUpgradeProposal"]; - - // PERMISSION_SOFTWARE_UPGRADE_PROPOSAL defines the permission needed to vote on software upgrade proposal - PERMISSION_SOFTWARE_UPGRADE_PROPOSAL = 29 [(gogoproto.enumvalue_customname) = "PermVoteSoftwareUpgradeProposal"]; - - // PERMISSION_SET_PERMISSIONS defines the permission that allows to Set ClaimValidatorPermission to other actors. - PERMISSION_SET_CLAIM_VALIDATOR_PERMISSION = 30 [ (gogoproto.enumvalue_customname) = "PermSetClaimValidatorPermission" ]; - - // PERMISSION_CREATE_SET_PROPOSAL_DURATION_PROPOSAL defines the permission needed to create a proposal to set proposal duration. - PERMISSION_CREATE_SET_PROPOSAL_DURATION_PROPOSAL = 31 [(gogoproto.enumvalue_customname) = "PermCreateSetProposalDurationProposal"]; - - // PERMISSION_VOTE_SET_PROPOSAL_DURATION_PROPOSAL defines the permission needed to vote a proposal to set proposal duration. - PERMISSION_VOTE_SET_PROPOSAL_DURATION_PROPOSAL = 32 [(gogoproto.enumvalue_customname) = "PermVoteSetProposalDurationProposal"]; - - // PERMISSION_BLACKLIST_ACCOUNT_PERMISSION_PROPOSAL defines the permission needed to create proposals for blacklisting an account permission. - PERMISSION_BLACKLIST_ACCOUNT_PERMISSION_PROPOSAL = 33 [(gogoproto.enumvalue_customname) = "PermBlacklistAccountPermissionProposal"]; - - // PERMISSION_VOTE_BLACKLIST_ACCOUNT_PERMISSION_PROPOSAL defines the permission that an actor must have in order to vote a - // Proposal to blacklist account permission. - PERMISSION_VOTE_BLACKLIST_ACCOUNT_PERMISSION_PROPOSAL = 34 [(gogoproto.enumvalue_customname) = "PermVoteBlacklistAccountPermissionProposal"]; - - // PERMISSION_REMOVE_WHITELISTED_ACCOUNT_PERMISSION_PROPOSAL defines the permission needed to create proposals for removing whitelisted permission from an account. - PERMISSION_REMOVE_WHITELISTED_ACCOUNT_PERMISSION_PROPOSAL = 35 [(gogoproto.enumvalue_customname) = "PermRemoveWhitelistedAccountPermissionProposal"]; - - // PERMISSION_VOTE_REMOVE_WHITELISTED_ACCOUNT_PERMISSION_PROPOSAL defines the permission that an actor must have in order to vote a - // Proposal to remove a whitelisted account permission. - PERMISSION_VOTE_REMOVE_WHITELISTED_ACCOUNT_PERMISSION_PROPOSAL = 36 [(gogoproto.enumvalue_customname) = "PermVoteRemoveWhitelistedAccountPermissionProposal"]; - - // PERMISSION_REMOVE_BLACKLISTED_ACCOUNT_PERMISSION_PROPOSAL defines the permission needed to create proposals for removing blacklisted permission from an account. - PERMISSION_REMOVE_BLACKLISTED_ACCOUNT_PERMISSION_PROPOSAL = 37 [(gogoproto.enumvalue_customname) = "PermRemoveBlacklistedAccountPermissionProposal"]; - - // PERMISSION_VOTE_REMOVE_BLACKLISTED_ACCOUNT_PERMISSION_PROPOSAL defines the permission that an actor must have in order to vote a - // Proposal to remove a blacklisted account permission. - PERMISSION_VOTE_REMOVE_BLACKLISTED_ACCOUNT_PERMISSION_PROPOSAL = 38 [(gogoproto.enumvalue_customname) = "PermVoteRemoveBlacklistedAccountPermissionProposal"]; - - - // PERMISSION_WHITELIST_ROLE_PERMISSION_PROPOSAL defines the permission needed to create proposals for whitelisting an role permission. - PERMISSION_WHITELIST_ROLE_PERMISSION_PROPOSAL = 39 [(gogoproto.enumvalue_customname) = "PermWhitelistRolePermissionProposal"]; - - // PERMISSION_VOTE_WHITELIST_ROLE_PERMISSION_PROPOSAL defines the permission that an actor must have in order to vote a - // Proposal to whitelist role permission. - PERMISSION_VOTE_WHITELIST_ROLE_PERMISSION_PROPOSAL = 40 [(gogoproto.enumvalue_customname) = "PermVoteWhitelistRolePermissionProposal"]; - - // PERMISSION_BLACKLIST_ROLE_PERMISSION_PROPOSAL defines the permission needed to create proposals for blacklisting an role permission. - PERMISSION_BLACKLIST_ROLE_PERMISSION_PROPOSAL = 41 [(gogoproto.enumvalue_customname) = "PermBlacklistRolePermissionProposal"]; - - // PERMISSION_VOTE_BLACKLIST_ROLE_PERMISSION_PROPOSAL defines the permission that an actor must have in order to vote a - // Proposal to blacklist role permission. - PERMISSION_VOTE_BLACKLIST_ROLE_PERMISSION_PROPOSAL = 42 [(gogoproto.enumvalue_customname) = "PermVoteBlacklistRolePermissionProposal"]; - - // PERMISSION_REMOVE_WHITELISTED_ROLE_PERMISSION_PROPOSAL defines the permission needed to create proposals for removing whitelisted permission from a role. - PERMISSION_REMOVE_WHITELISTED_ROLE_PERMISSION_PROPOSAL = 43 [(gogoproto.enumvalue_customname) = "PermRemoveWhitelistedRolePermissionProposal"]; - - // PERMISSION_VOTE_REMOVE_WHITELISTED_ROLE_PERMISSION_PROPOSAL defines the permission that an actor must have in order to vote a - // Proposal to remove a whitelisted role permission. - PERMISSION_VOTE_REMOVE_WHITELISTED_ROLE_PERMISSION_PROPOSAL = 44 [(gogoproto.enumvalue_customname) = "PermVoteRemoveWhitelistedRolePermissionProposal"]; - - // PERMISSION_REMOVE_BLACKLISTED_ROLE_PERMISSION_PROPOSAL defines the permission needed to create proposals for removing blacklisted permission from a role. - PERMISSION_REMOVE_BLACKLISTED_ROLE_PERMISSION_PROPOSAL = 45 [(gogoproto.enumvalue_customname) = "PermRemoveBlacklistedRolePermissionProposal"]; - - // PERMISSION_VOTE_REMOVE_BLACKLISTED_ROLE_PERMISSION_PROPOSAL defines the permission that an actor must have in order to vote a - // Proposal to remove a blacklisted role permission. - PERMISSION_VOTE_REMOVE_BLACKLISTED_ROLE_PERMISSION_PROPOSAL = 46 [(gogoproto.enumvalue_customname) = "PermVoteRemoveBlacklistedRolePermissionProposal"]; - - - // PERMISSION_ASSIGN_ROLE_TO_ACCOUNT_PROPOSAL defines the permission needed to create proposals to assign role to an account - PERMISSION_ASSIGN_ROLE_TO_ACCOUNT_PROPOSAL = 47 [(gogoproto.enumvalue_customname) = "PermAssignRoleToAccountProposal"]; - - // PERMISSION_VOTE_ASSIGN_ROLE_TO_ACCOUNT_PROPOSAL defines the permission that an actor must have in order to vote a - // Proposal to assign role to an account - PERMISSION_VOTE_ASSIGN_ROLE_TO_ACCOUNT_PROPOSAL = 48 [(gogoproto.enumvalue_customname) = "PermVoteAssignRoleToAccountProposal"]; - - - // PERMISSION_UNASSIGN_ROLE_FROM_ACCOUNT_PROPOSAL defines the permission needed to create proposals to unassign role from an account - PERMISSION_UNASSIGN_ROLE_FROM_ACCOUNT_PROPOSAL = 49 [(gogoproto.enumvalue_customname) = "PermUnassignRoleFromAccountProposal"]; - - // PERMISSION_VOTE_UNASSIGN_ROLE_FROM_ACCOUNT_PROPOSAL defines the permission that an actor must have in order to vote a - // Proposal to unassign role from an account - PERMISSION_VOTE_UNASSIGN_ROLE_FROM_ACCOUNT_PROPOSAL = 50 [(gogoproto.enumvalue_customname) = "PermVoteUnassignRoleFromAccountProposal"]; - - // PERMISSION_CREATE_REMOVE_ROLE_PROPOSAL defines the permission needed to create a proposal to remove a role. - PERMISSION_CREATE_REMOVE_ROLE_PROPOSAL = 51 [(gogoproto.enumvalue_customname) = "PermRemoveRoleProposal"]; - - // PERMISSION_VOTE_REMOVE_ROLE_PROPOSAL defines the permission needed to vote a proposal to remove a role. - PERMISSION_VOTE_REMOVE_ROLE_PROPOSAL = 52 [(gogoproto.enumvalue_customname) = "PermVoteRemoveRoleProposal"]; - - // PERMISSION_CREATE_UPSERT_UBI_PROPOSAL defines the permission needed to create proposals to upsert ubi - PERMISSION_CREATE_UPSERT_UBI_PROPOSAL = 53 [(gogoproto.enumvalue_customname) = "PermCreateUpsertUBIProposal"]; - - // PERMISSION_VOTE_UPSERT_UBI_PROPOSAL defines the permission that an actor must have in order to vote a - // Proposal to upsert ubi - PERMISSION_VOTE_UPSERT_UBI_PROPOSAL = 54 [(gogoproto.enumvalue_customname) = "PermVoteUpsertUBIProposal"]; - - // PERMISSION_CREATE_REMOVE_UBI_PROPOSAL defines the permission needed to create a proposal to remove ubi. - PERMISSION_CREATE_REMOVE_UBI_PROPOSAL = 55 [(gogoproto.enumvalue_customname) = "PermCreateRemoveUBIProposal"]; - - // PERMISSION_VOTE_REMOVE_UBI_PROPOSAL defines the permission needed to vote a proposal to remove ubi. - PERMISSION_VOTE_REMOVE_UBI_PROPOSAL = 56 [(gogoproto.enumvalue_customname) = "PermVoteRemoveUBIProposal"]; - - // PERMISSION_CREATE_SLASH_VALIDATOR_PROPOSAL defines the permission needed to create a proposal to slash validator. - PERMISSION_CREATE_SLASH_VALIDATOR_PROPOSAL = 57 [(gogoproto.enumvalue_customname) = "PermCreateSlashValidatorProposal"]; - - // PERMISSION_VOTE_SLASH_VALIDATOR_PROPOSAL defines the permission needed to vote a proposal to slash validator. - PERMISSION_VOTE_SLASH_VALIDATOR_PROPOSAL = 58 [(gogoproto.enumvalue_customname) = "PermVoteSlashValidatorProposal"]; - - // PERMISSION_CREATE_BASKET_PROPOSAL defines the permission needed to create a proposal related to basket. - PERMISSION_CREATE_BASKET_PROPOSAL = 59 [(gogoproto.enumvalue_customname) = "PermCreateBasketProposal"]; - - // PERMISSION_VOTE_BASKET_PROPOSAL defines the permission needed to vote a proposal related to basket. - PERMISSION_VOTE_BASKET_PROPOSAL = 60 [(gogoproto.enumvalue_customname) = "PermVoteBasketProposal"]; - - // PERMISSION_HANDLE_BASKET_EMERGENCY defines the permission needed to handle emergency issues on basket. - PERMISSION_HANDLE_BASKET_EMERGENCY = 61 [(gogoproto.enumvalue_customname) = "PermHandleBasketEmergency"]; - - // PERMISSION_CREATE_RESET_WHOLE_COUNCILOR_RANK_PROPOSAL defines the permission needed to create a proposal to reset whole councilor rank - PERMISSION_CREATE_RESET_WHOLE_COUNCILOR_RANK_PROPOSAL = 62 [(gogoproto.enumvalue_customname) = "PermCreateResetWholeCouncilorRankProposal"]; - - // PERMISSION_VOTE_RESET_WHOLE_COUNCILOR_RANK_PROPOSAL defines the permission needed to vote on reset whole councilor rank proposal - PERMISSION_VOTE_RESET_WHOLE_COUNCILOR_RANK_PROPOSAL = 63 [(gogoproto.enumvalue_customname) = "PermVoteResetWholeCouncilorRankProposal"]; - - // PERMISSION_CREATE_JAIL_COUNCILOR_PROPOSAL defines the permission needed to create a proposal to jail councilors - PERMISSION_CREATE_JAIL_COUNCILOR_PROPOSAL = 64 [(gogoproto.enumvalue_customname) = "PermCreateJailCouncilorProposal"]; - - // PERMISSION_VOTE_JAIL_COUNCILOR_PROPOSAL defines the permission needed to vote on jail councilors proposal - PERMISSION_VOTE_JAIL_COUNCILOR_PROPOSAL = 65 [(gogoproto.enumvalue_customname) = "PermVoteJailCouncilorProposal"]; - - // PERMISSION_CREATE_POLL_PROPOSAL defines the permission needed to create a poll proposal. - PERMISSION_CREATE_POLL_PROPOSAL = 66 [(gogoproto.enumvalue_customname) = "PermCreatePollProposal"]; - - // PERMISSION_CREATE_DAPP_PROPOSAL_WITHOUT_BOND defines the permission needed to create a dapp proposal without bond - PERMISSION_CREATE_DAPP_PROPOSAL_WITHOUT_BOND = 67 [(gogoproto.enumvalue_customname) = "PermCreateDappProposalWithoutBond"]; -} +syntax = "proto3"; +package kira.gov; + +import "gogoproto/gogo.proto"; + +option go_package = "github.com/KiraCore/sekai/x/gov/types"; + +enum PermValue { + option (gogoproto.goproto_enum_prefix) = false; + + // PERMISSION_ZERO is a no-op permission. + PERMISSION_ZERO = 0 [(gogoproto.enumvalue_customname) = "PermZero"]; + + // PERMISSION_SET_PERMISSIONS defines the permission that allows to Set Permissions to other actors. + PERMISSION_SET_PERMISSIONS = 1 [(gogoproto.enumvalue_customname) = "PermSetPermissions"]; + + // PERMISSION_CLAIM_VALIDATOR defines the permission that allows to Claim a validator Seat. + PERMISSION_CLAIM_VALIDATOR = 2 [(gogoproto.enumvalue_customname) = "PermClaimValidator"]; + + // PERMISSION_CLAIM_COUNCILOR defines the permission that allows to Claim a Councilor Seat. + PERMISSION_CLAIM_COUNCILOR = 3 [(gogoproto.enumvalue_customname) = "PermClaimCouncilor"]; + + // PERMISSION_WHITELIST_ACCOUNT_PERMISSION_PROPOSAL defines the permission needed to create proposals for whitelisting an account permission. + PERMISSION_WHITELIST_ACCOUNT_PERMISSION_PROPOSAL = 4 [(gogoproto.enumvalue_customname) = "PermWhitelistAccountPermissionProposal"]; + + // PERMISSION_VOTE_WHITELIST_ACCOUNT_PERMISSION_PROPOSAL defines the permission that an actor must have in order to vote a + // Proposal to whitelist account permission. + PERMISSION_VOTE_WHITELIST_ACCOUNT_PERMISSION_PROPOSAL = 5 [(gogoproto.enumvalue_customname) = "PermVoteWhitelistAccountPermissionProposal"]; + + // PERMISSION_CHANGE_TX_FEE + PERMISSION_CHANGE_TX_FEE = 7 [(gogoproto.enumvalue_customname) = "PermChangeTxFee"]; + + // PERMISSION_UPSERT_TOKEN_RATE + PERMISSION_UPSERT_TOKEN_RATE = 8 [(gogoproto.enumvalue_customname) = "PermUpsertTokenInfo"]; + + // PERMISSION_UPSERT_ROLE makes possible to add, modify and assign roles. + PERMISSION_UPSERT_ROLE = 9 [(gogoproto.enumvalue_customname) = "PermUpsertRole"]; + + // PERMISSION_CREATE_UPSERT_DATA_REGISTRY_PROPOSAL makes possible to create a proposal to change the Data Registry. + PERMISSION_CREATE_UPSERT_DATA_REGISTRY_PROPOSAL = 10 [(gogoproto.enumvalue_customname) = "PermCreateUpsertDataRegistryProposal"]; + + // PERMISSION_VOTE_UPSERT_DATA_REGISTRY_PROPOSAL makes possible to create a proposal to change the Data Registry. + PERMISSION_VOTE_UPSERT_DATA_REGISTRY_PROPOSAL = 11 [(gogoproto.enumvalue_customname) = "PermVoteUpsertDataRegistryProposal"]; + + // PERMISSION_CREATE_SET_NETWORK_PROPERTY_PROPOSAL defines the permission needed to create proposals for setting network property. + PERMISSION_CREATE_SET_NETWORK_PROPERTY_PROPOSAL = 12 [(gogoproto.enumvalue_customname) = "PermCreateSetNetworkPropertyProposal"]; + + // PERMISSION_VOTE_SET_NETWORK_PROPERTY_PROPOSAL defines the permission that an actor must have in order to vote a + // Proposal to set network property. + PERMISSION_VOTE_SET_NETWORK_PROPERTY_PROPOSAL = 13 [(gogoproto.enumvalue_customname) = "PermVoteSetNetworkPropertyProposal"]; + + // PERMISSION_CREATE_SET_POOR_NETWORK_MESSAGES defines the permission needed to create proposals for setting poor network messages + PERMISSION_CREATE_SET_POOR_NETWORK_MESSAGES = 16 [(gogoproto.enumvalue_customname) = "PermCreateSetPoorNetworkMessagesProposal"]; + + // PERMISSION_VOTE_SET_POOR_NETWORK_MESSAGES_PROPOSAL defines the permission needed to vote proposals to set poor network messages + PERMISSION_VOTE_SET_POOR_NETWORK_MESSAGES_PROPOSAL = 17 [(gogoproto.enumvalue_customname) = "PermVoteSetPoorNetworkMessagesProposal"]; + + // PERMISSION_CREATE_UPSERT_TOKEN_RATE_PROPOSAL defines the permission needed to create proposals for upsert token rate. + PERMISSION_CREATE_UPSERT_TOKEN_RATE_PROPOSAL = 18 [(gogoproto.enumvalue_customname) = "PermCreateUpsertTokenInfoProposal"]; + + // PERMISSION_VOTE_UPSERT_TOKEN_RATE_PROPOSAL defines the permission needed to vote proposals for upsert token rate. + PERMISSION_VOTE_UPSERT_TOKEN_RATE_PROPOSAL = 19 [(gogoproto.enumvalue_customname) = "PermVoteUpsertTokenInfoProposal"]; + + // PERMISSION_CREATE_UNJAIL_VALIDATOR_PROPOSAL defines the permission needed to create a proposal to unjail a validator. + PERMISSION_CREATE_UNJAIL_VALIDATOR_PROPOSAL = 20 [(gogoproto.enumvalue_customname) = "PermCreateUnjailValidatorProposal"]; + + // PERMISSION_VOTE_UNJAIL_VALIDATOR_PROPOSAL defines the permission needed to vote a proposal to unjail a validator. + PERMISSION_VOTE_UNJAIL_VALIDATOR_PROPOSAL = 21 [(gogoproto.enumvalue_customname) = "PermVoteUnjailValidatorProposal"]; + + // PERMISSION_CREATE_CREATE_ROLE_PROPOSAL defines the permission needed to create a proposal to create a role. + PERMISSION_CREATE_CREATE_ROLE_PROPOSAL = 22 [(gogoproto.enumvalue_customname) = "PermCreateRoleProposal"]; + + // PERMISSION_VOTE_CREATE_ROLE_PROPOSAL defines the permission needed to vote a proposal to create a role. + PERMISSION_VOTE_CREATE_ROLE_PROPOSAL = 23 [(gogoproto.enumvalue_customname) = "PermVoteCreateRoleProposal"]; + + // PERMISSION_CREATE_TOKENS_WHITE_BLACK_CHANGE_PROPOSAL defines the permission needed to create a proposal to blacklist/whitelisted tokens + PERMISSION_CREATE_TOKENS_WHITE_BLACK_CHANGE_PROPOSAL = 24 [(gogoproto.enumvalue_customname) = "PermCreateTokensWhiteBlackChangeProposal"]; + + // PERMISSION_VOTE_TOKENS_WHITE_BLACK_CHANGE_PROPOSAL defines the permission needed to vote on blacklist/whitelisted tokens proposal + PERMISSION_VOTE_TOKENS_WHITE_BLACK_CHANGE_PROPOSAL = 25 [(gogoproto.enumvalue_customname) = "PermVoteTokensWhiteBlackChangeProposal"]; + + // PERMISSION_CREATE_RESET_WHOLE_VALIDATOR_RANK_PROPOSAL defines the permission needed to create a proposal to reset whole validator rank + PERMISSION_CREATE_RESET_WHOLE_VALIDATOR_RANK_PROPOSAL = 26 [(gogoproto.enumvalue_customname) = "PermCreateResetWholeValidatorRankProposal"]; + + // PERMISSION_VOTE_RESET_WHOLE_VALIDATOR_RANK_PROPOSAL defines the permission needed to vote on reset whole validator rank proposal + PERMISSION_VOTE_RESET_WHOLE_VALIDATOR_RANK_PROPOSAL = 27 [(gogoproto.enumvalue_customname) = "PermVoteResetWholeValidatorRankProposal"]; + + // PERMISSION_CREATE_SOFTWARE_UPGRADE_PROPOSAL defines the permission needed to create a proposal for software upgrade + PERMISSION_CREATE_SOFTWARE_UPGRADE_PROPOSAL = 28 [(gogoproto.enumvalue_customname) = "PermCreateSoftwareUpgradeProposal"]; + + // PERMISSION_SOFTWARE_UPGRADE_PROPOSAL defines the permission needed to vote on software upgrade proposal + PERMISSION_SOFTWARE_UPGRADE_PROPOSAL = 29 [(gogoproto.enumvalue_customname) = "PermVoteSoftwareUpgradeProposal"]; + + // PERMISSION_SET_PERMISSIONS defines the permission that allows to Set ClaimValidatorPermission to other actors. + PERMISSION_SET_CLAIM_VALIDATOR_PERMISSION = 30 [ (gogoproto.enumvalue_customname) = "PermSetClaimValidatorPermission" ]; + + // PERMISSION_CREATE_SET_PROPOSAL_DURATION_PROPOSAL defines the permission needed to create a proposal to set proposal duration. + PERMISSION_CREATE_SET_PROPOSAL_DURATION_PROPOSAL = 31 [(gogoproto.enumvalue_customname) = "PermCreateSetProposalDurationProposal"]; + + // PERMISSION_VOTE_SET_PROPOSAL_DURATION_PROPOSAL defines the permission needed to vote a proposal to set proposal duration. + PERMISSION_VOTE_SET_PROPOSAL_DURATION_PROPOSAL = 32 [(gogoproto.enumvalue_customname) = "PermVoteSetProposalDurationProposal"]; + + // PERMISSION_BLACKLIST_ACCOUNT_PERMISSION_PROPOSAL defines the permission needed to create proposals for blacklisting an account permission. + PERMISSION_BLACKLIST_ACCOUNT_PERMISSION_PROPOSAL = 33 [(gogoproto.enumvalue_customname) = "PermBlacklistAccountPermissionProposal"]; + + // PERMISSION_VOTE_BLACKLIST_ACCOUNT_PERMISSION_PROPOSAL defines the permission that an actor must have in order to vote a + // Proposal to blacklist account permission. + PERMISSION_VOTE_BLACKLIST_ACCOUNT_PERMISSION_PROPOSAL = 34 [(gogoproto.enumvalue_customname) = "PermVoteBlacklistAccountPermissionProposal"]; + + // PERMISSION_REMOVE_WHITELISTED_ACCOUNT_PERMISSION_PROPOSAL defines the permission needed to create proposals for removing whitelisted permission from an account. + PERMISSION_REMOVE_WHITELISTED_ACCOUNT_PERMISSION_PROPOSAL = 35 [(gogoproto.enumvalue_customname) = "PermRemoveWhitelistedAccountPermissionProposal"]; + + // PERMISSION_VOTE_REMOVE_WHITELISTED_ACCOUNT_PERMISSION_PROPOSAL defines the permission that an actor must have in order to vote a + // Proposal to remove a whitelisted account permission. + PERMISSION_VOTE_REMOVE_WHITELISTED_ACCOUNT_PERMISSION_PROPOSAL = 36 [(gogoproto.enumvalue_customname) = "PermVoteRemoveWhitelistedAccountPermissionProposal"]; + + // PERMISSION_REMOVE_BLACKLISTED_ACCOUNT_PERMISSION_PROPOSAL defines the permission needed to create proposals for removing blacklisted permission from an account. + PERMISSION_REMOVE_BLACKLISTED_ACCOUNT_PERMISSION_PROPOSAL = 37 [(gogoproto.enumvalue_customname) = "PermRemoveBlacklistedAccountPermissionProposal"]; + + // PERMISSION_VOTE_REMOVE_BLACKLISTED_ACCOUNT_PERMISSION_PROPOSAL defines the permission that an actor must have in order to vote a + // Proposal to remove a blacklisted account permission. + PERMISSION_VOTE_REMOVE_BLACKLISTED_ACCOUNT_PERMISSION_PROPOSAL = 38 [(gogoproto.enumvalue_customname) = "PermVoteRemoveBlacklistedAccountPermissionProposal"]; + + + // PERMISSION_WHITELIST_ROLE_PERMISSION_PROPOSAL defines the permission needed to create proposals for whitelisting an role permission. + PERMISSION_WHITELIST_ROLE_PERMISSION_PROPOSAL = 39 [(gogoproto.enumvalue_customname) = "PermWhitelistRolePermissionProposal"]; + + // PERMISSION_VOTE_WHITELIST_ROLE_PERMISSION_PROPOSAL defines the permission that an actor must have in order to vote a + // Proposal to whitelist role permission. + PERMISSION_VOTE_WHITELIST_ROLE_PERMISSION_PROPOSAL = 40 [(gogoproto.enumvalue_customname) = "PermVoteWhitelistRolePermissionProposal"]; + + // PERMISSION_BLACKLIST_ROLE_PERMISSION_PROPOSAL defines the permission needed to create proposals for blacklisting an role permission. + PERMISSION_BLACKLIST_ROLE_PERMISSION_PROPOSAL = 41 [(gogoproto.enumvalue_customname) = "PermBlacklistRolePermissionProposal"]; + + // PERMISSION_VOTE_BLACKLIST_ROLE_PERMISSION_PROPOSAL defines the permission that an actor must have in order to vote a + // Proposal to blacklist role permission. + PERMISSION_VOTE_BLACKLIST_ROLE_PERMISSION_PROPOSAL = 42 [(gogoproto.enumvalue_customname) = "PermVoteBlacklistRolePermissionProposal"]; + + // PERMISSION_REMOVE_WHITELISTED_ROLE_PERMISSION_PROPOSAL defines the permission needed to create proposals for removing whitelisted permission from a role. + PERMISSION_REMOVE_WHITELISTED_ROLE_PERMISSION_PROPOSAL = 43 [(gogoproto.enumvalue_customname) = "PermRemoveWhitelistedRolePermissionProposal"]; + + // PERMISSION_VOTE_REMOVE_WHITELISTED_ROLE_PERMISSION_PROPOSAL defines the permission that an actor must have in order to vote a + // Proposal to remove a whitelisted role permission. + PERMISSION_VOTE_REMOVE_WHITELISTED_ROLE_PERMISSION_PROPOSAL = 44 [(gogoproto.enumvalue_customname) = "PermVoteRemoveWhitelistedRolePermissionProposal"]; + + // PERMISSION_REMOVE_BLACKLISTED_ROLE_PERMISSION_PROPOSAL defines the permission needed to create proposals for removing blacklisted permission from a role. + PERMISSION_REMOVE_BLACKLISTED_ROLE_PERMISSION_PROPOSAL = 45 [(gogoproto.enumvalue_customname) = "PermRemoveBlacklistedRolePermissionProposal"]; + + // PERMISSION_VOTE_REMOVE_BLACKLISTED_ROLE_PERMISSION_PROPOSAL defines the permission that an actor must have in order to vote a + // Proposal to remove a blacklisted role permission. + PERMISSION_VOTE_REMOVE_BLACKLISTED_ROLE_PERMISSION_PROPOSAL = 46 [(gogoproto.enumvalue_customname) = "PermVoteRemoveBlacklistedRolePermissionProposal"]; + + + // PERMISSION_ASSIGN_ROLE_TO_ACCOUNT_PROPOSAL defines the permission needed to create proposals to assign role to an account + PERMISSION_ASSIGN_ROLE_TO_ACCOUNT_PROPOSAL = 47 [(gogoproto.enumvalue_customname) = "PermAssignRoleToAccountProposal"]; + + // PERMISSION_VOTE_ASSIGN_ROLE_TO_ACCOUNT_PROPOSAL defines the permission that an actor must have in order to vote a + // Proposal to assign role to an account + PERMISSION_VOTE_ASSIGN_ROLE_TO_ACCOUNT_PROPOSAL = 48 [(gogoproto.enumvalue_customname) = "PermVoteAssignRoleToAccountProposal"]; + + + // PERMISSION_UNASSIGN_ROLE_FROM_ACCOUNT_PROPOSAL defines the permission needed to create proposals to unassign role from an account + PERMISSION_UNASSIGN_ROLE_FROM_ACCOUNT_PROPOSAL = 49 [(gogoproto.enumvalue_customname) = "PermUnassignRoleFromAccountProposal"]; + + // PERMISSION_VOTE_UNASSIGN_ROLE_FROM_ACCOUNT_PROPOSAL defines the permission that an actor must have in order to vote a + // Proposal to unassign role from an account + PERMISSION_VOTE_UNASSIGN_ROLE_FROM_ACCOUNT_PROPOSAL = 50 [(gogoproto.enumvalue_customname) = "PermVoteUnassignRoleFromAccountProposal"]; + + // PERMISSION_CREATE_REMOVE_ROLE_PROPOSAL defines the permission needed to create a proposal to remove a role. + PERMISSION_CREATE_REMOVE_ROLE_PROPOSAL = 51 [(gogoproto.enumvalue_customname) = "PermRemoveRoleProposal"]; + + // PERMISSION_VOTE_REMOVE_ROLE_PROPOSAL defines the permission needed to vote a proposal to remove a role. + PERMISSION_VOTE_REMOVE_ROLE_PROPOSAL = 52 [(gogoproto.enumvalue_customname) = "PermVoteRemoveRoleProposal"]; + + // PERMISSION_CREATE_UPSERT_UBI_PROPOSAL defines the permission needed to create proposals to upsert ubi + PERMISSION_CREATE_UPSERT_UBI_PROPOSAL = 53 [(gogoproto.enumvalue_customname) = "PermCreateUpsertUBIProposal"]; + + // PERMISSION_VOTE_UPSERT_UBI_PROPOSAL defines the permission that an actor must have in order to vote a + // Proposal to upsert ubi + PERMISSION_VOTE_UPSERT_UBI_PROPOSAL = 54 [(gogoproto.enumvalue_customname) = "PermVoteUpsertUBIProposal"]; + + // PERMISSION_CREATE_REMOVE_UBI_PROPOSAL defines the permission needed to create a proposal to remove ubi. + PERMISSION_CREATE_REMOVE_UBI_PROPOSAL = 55 [(gogoproto.enumvalue_customname) = "PermCreateRemoveUBIProposal"]; + + // PERMISSION_VOTE_REMOVE_UBI_PROPOSAL defines the permission needed to vote a proposal to remove ubi. + PERMISSION_VOTE_REMOVE_UBI_PROPOSAL = 56 [(gogoproto.enumvalue_customname) = "PermVoteRemoveUBIProposal"]; + + // PERMISSION_CREATE_SLASH_VALIDATOR_PROPOSAL defines the permission needed to create a proposal to slash validator. + PERMISSION_CREATE_SLASH_VALIDATOR_PROPOSAL = 57 [(gogoproto.enumvalue_customname) = "PermCreateSlashValidatorProposal"]; + + // PERMISSION_VOTE_SLASH_VALIDATOR_PROPOSAL defines the permission needed to vote a proposal to slash validator. + PERMISSION_VOTE_SLASH_VALIDATOR_PROPOSAL = 58 [(gogoproto.enumvalue_customname) = "PermVoteSlashValidatorProposal"]; + + // PERMISSION_CREATE_BASKET_PROPOSAL defines the permission needed to create a proposal related to basket. + PERMISSION_CREATE_BASKET_PROPOSAL = 59 [(gogoproto.enumvalue_customname) = "PermCreateBasketProposal"]; + + // PERMISSION_VOTE_BASKET_PROPOSAL defines the permission needed to vote a proposal related to basket. + PERMISSION_VOTE_BASKET_PROPOSAL = 60 [(gogoproto.enumvalue_customname) = "PermVoteBasketProposal"]; + + // PERMISSION_HANDLE_BASKET_EMERGENCY defines the permission needed to handle emergency issues on basket. + PERMISSION_HANDLE_BASKET_EMERGENCY = 61 [(gogoproto.enumvalue_customname) = "PermHandleBasketEmergency"]; + + // PERMISSION_CREATE_RESET_WHOLE_COUNCILOR_RANK_PROPOSAL defines the permission needed to create a proposal to reset whole councilor rank + PERMISSION_CREATE_RESET_WHOLE_COUNCILOR_RANK_PROPOSAL = 62 [(gogoproto.enumvalue_customname) = "PermCreateResetWholeCouncilorRankProposal"]; + + // PERMISSION_VOTE_RESET_WHOLE_COUNCILOR_RANK_PROPOSAL defines the permission needed to vote on reset whole councilor rank proposal + PERMISSION_VOTE_RESET_WHOLE_COUNCILOR_RANK_PROPOSAL = 63 [(gogoproto.enumvalue_customname) = "PermVoteResetWholeCouncilorRankProposal"]; + + // PERMISSION_CREATE_JAIL_COUNCILOR_PROPOSAL defines the permission needed to create a proposal to jail councilors + PERMISSION_CREATE_JAIL_COUNCILOR_PROPOSAL = 64 [(gogoproto.enumvalue_customname) = "PermCreateJailCouncilorProposal"]; + + // PERMISSION_VOTE_JAIL_COUNCILOR_PROPOSAL defines the permission needed to vote on jail councilors proposal + PERMISSION_VOTE_JAIL_COUNCILOR_PROPOSAL = 65 [(gogoproto.enumvalue_customname) = "PermVoteJailCouncilorProposal"]; + + // PERMISSION_CREATE_POLL_PROPOSAL defines the permission needed to create a poll proposal. + PERMISSION_CREATE_POLL_PROPOSAL = 66 [(gogoproto.enumvalue_customname) = "PermCreatePollProposal"]; + + // PERMISSION_CREATE_DAPP_PROPOSAL_WITHOUT_BOND defines the permission needed to create a dapp proposal without bond + PERMISSION_CREATE_DAPP_PROPOSAL_WITHOUT_BOND = 67 [(gogoproto.enumvalue_customname) = "PermCreateDappProposalWithoutBond"]; + + // PERMISSION_CREATE_SET_EXECUTION_FEES_PROPOSAL defines the permission needed to create a proposal to set execution fees + PERMISSION_CREATE_SET_EXECUTION_FEES_PROPOSAL = 68 [(gogoproto.enumvalue_customname) = "PermCreateSetExecutionFeesProposal"]; + + // PERMISSION_VOTE_SET_EXECUTION_FEES_PROPOSAL defines the permission needed to vote on set execution fees proposal + PERMISSION_VOTE_SET_EXECUTION_FEES_PROPOSAL = 69 [(gogoproto.enumvalue_customname) = "PermVoteSetExecutionFeesProposal"]; +} diff --git a/proto/kira/gov/proposal.proto b/proto/kira/gov/proposal.proto index c31edf301..0bf606718 100644 --- a/proto/kira/gov/proposal.proto +++ b/proto/kira/gov/proposal.proto @@ -7,6 +7,7 @@ import "google/protobuf/any.proto"; import "cosmos_proto/cosmos.proto"; import "kira/gov/role.proto"; import "kira/gov/permission.proto"; +import "kira/gov/execution_fee.proto"; import "kira/gov/network_properties.proto"; option go_package = "github.com/KiraCore/sekai/x/gov/types"; @@ -252,4 +253,12 @@ message ProposalJailCouncilor { ]; string description = 2; repeated string councilors = 3; +} + +message ProposalSetExecutionFees { + bytes proposer = 1 [ + (gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress" + ]; + string description = 2; + repeated ExecutionFee execution_fees = 3 [ (gogoproto.nullable) = false ]; } \ No newline at end of file diff --git a/proto/kira/layer2/layer2.proto b/proto/kira/layer2/layer2.proto index 25af591a7..53d6cd3d6 100644 --- a/proto/kira/layer2/layer2.proto +++ b/proto/kira/layer2/layer2.proto @@ -1,294 +1,298 @@ -syntax = "proto3"; -package kira.layer2; - -option go_package = "github.com/KiraCore/sekai/x/layer2/types"; -option (gogoproto.equal_all) = true; - -import "google/protobuf/any.proto"; -import "gogoproto/gogo.proto"; -import "google/protobuf/timestamp.proto"; - -enum DappStatus { - option (gogoproto.goproto_enum_prefix) = false; - - BOOTSTRAP = 0 [ (gogoproto.enumvalue_customname) = "Bootstrap" ]; - ACTIVE = 1 [ (gogoproto.enumvalue_customname) = "Active" ]; - PAUSED = 2 [ (gogoproto.enumvalue_customname) = "Paused" ]; - HALTED = 3 [ (gogoproto.enumvalue_customname) = "Halted" ]; -} - -message AccountRange { - repeated string addresses = 1; - repeated uint64 roles = 2; -} - -message Controllers { - AccountRange whitelist = 1 [ (gogoproto.nullable) = false ]; - AccountRange blacklist = 2 [ (gogoproto.nullable) = false ]; -} - -message BinaryInfo { - string name = 1; // filename identifying source such as container, executable, config, finality gadget, etc. - string hash = 2; // hash of the file - string source = 3; // link to the source (from where the file should be fetched) - string reference = 4; // link to github repository or audit - string type = 5; // optional file type, e.g. binary, archive, text, image, etc. -} - -message LpPoolConfig { - string ratio = 1 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; // amount of dp_ to be issued per each 1 KEX contributed - string deposit = 2; // spending pool id/name from where lp coins can be claimed - uint64 drip = 3; // time over which tokens should be distributed (can not be modified) -} - -message IssuranceConfig { - string deposit = 1; // spending pool id/name or kira address for extra dp deposit - string premint = 2 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", - (gogoproto.nullable) = false - ]; // Amount of dp_ to premint (can not be modified) - string postmint = 3 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", - (gogoproto.nullable) = false - ]; // Amount of dp_ to postmint (can not be modified) - uint64 time = 4; // unix timestamp when to issue postminted dp tokens (can not be modified) -} - -message Dapp { - string name = 1; // application name, must be globally unique and follow the same safety rules as usernames & validator moniker (can NOT be changed) - string denom = 2; // native dApp token denom substring, min 3 and max 8 lowercase alphabetic characters only (a-z) - string description = 3; // short description of the dApp, max 512 characters. - string website = 4; // official website/info about dApp, max 128 characters. - string logo = 5; // dapp logo url/cid - string social = 6; // comma separated list of official social media urls - string docs = 7; // url to the resources documenting dApp operation - Controllers controllers = 8 [ (gogoproto.nullable) = false ]; // list of dApp owners, who can curate the execution record - repeated BinaryInfo bin = 9 [ (gogoproto.nullable) = false ]; // array of files & their details essential for launching the dApp - LpPoolConfig pool = 10 [ (gogoproto.nullable) = false ]; // lp pool configuration (can not be modified) - IssuranceConfig issurance = 11 [ (gogoproto.nullable) = false ]; // extra dApp (dp) token issuance configuration - uint64 update_time_max = 12; // maximum time the dApp leader has to update his session (can be no more then 86400 - 24h) - uint64 executors_min = 13; // minimum number of validators that will be executing the dApp code (default 1) - uint64 executors_max = 14; // maximum number of validators that will be executing the dApp code (default 21) - uint64 verifiers_min = 15; // minimum number of nodes that must approve dApp state change - string total_bond = 16 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Coin", - (gogoproto.nullable) = false - ]; // total bonds put on the dapp - uint64 creation_time = 17; // dapp creation time - DappStatus status = 18; // dapp status - uint64 vote_quorum = 19; // percentage - default: 51%, collective-specific % of owner accounts that must vote YES or NO for any of the collective proposals to be valid - uint64 vote_period = 20; // seconds - default: 600s, period of time in seconds that any of the collective proposals must last before passing or being rejected - uint64 vote_enactment = 21; // seconds - default: 300s, period of time that must pass before any of the collective proposals is enacted - uint64 liquidation_start = 22; // liquidation start time - string pool_fee = 23 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; // default 1% swap, deposits, redemptions - string team_reserve = 24; // team multisig - uint64 premint_time = 25; // timestamp for premint - bool post_mint_paid = 26; // flag to show post mint paid or not -} - -message UserDappBond { - string user = 1; - string dapp_name = 2; - string bond = 3 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Coin", - (gogoproto.nullable) = false - ]; -} - -enum OperatorStatus { - option (gogoproto.goproto_enum_prefix) = false; - - OPERATOR_ACTIVE = 0 [ (gogoproto.enumvalue_customname) = "OperatorActive" ]; - OPERATOR_PAUSED = 1 [ (gogoproto.enumvalue_customname) = "OperatorPaused" ]; - OPERATOR_INACTIVE = 2 [ (gogoproto.enumvalue_customname) = "OperatorInactive" ]; - OPERATOR_EXITING = 3 [ (gogoproto.enumvalue_customname) = "OperatorExiting" ]; - OPERATOR_JAILED = 4 [ (gogoproto.enumvalue_customname) = "OperatorJailed" ]; -} - -// - `active` - the operator is active and ready to run the application -// - `paused` - the operator is signaling that he is not ready and needs some time for maintenance and is now omitted until his internal issues are resolved. The paused status is also a default status of every operator immediately after being approved to execute or verify the application. -// - `inactive` - executor missed his dApp session round too many times and is now omitted until his internal issues are resolved -// - `exiting` - the operator decided to stop running the dApp and is leaving the set of dApp operators completely -// - `jailed` - verifiers reported that executor published an invalid dApp state or if the verifier is jailed it means that he reported dApp to execute incorrectly and his stake must be slashed. Jailed verifiers can’t be unjailed. - -message DappOperator { - string dapp_name = 1; - string operator = 2; - bool executor = 3; // can only be set by validators, raises proposal that controllers must approve - bool verifier = 4; // can be set by anyone, sending this tx does not require any approvals however requires a bond in `lp_` tokens no less than `dapp_verifier_bond` - string interx = 5; // must be set to a valid kira address - OperatorStatus status = 6; - int64 rank = 7; - int64 streak = 8; - int64 mischance = 9; - int64 verified_sessions = 10; - int64 missed_sessions = 11; - string bonded_lp_amount = 12 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", - (gogoproto.nullable) = false - ]; -} - -message DappLeaderDenouncement { - string dapp_name = 1; - string leader = 2; - string sender = 3; - string denouncement = 4; -} - -enum SessionStatus { - option (gogoproto.goproto_enum_prefix) = false; - - SESSION_UNSCHEDULED = 0 [ (gogoproto.enumvalue_customname) = "SessionUnscheduled" ]; - SESSION_SCHEDULED = 1 [ (gogoproto.enumvalue_customname) = "SessionScheduled" ]; - SESSION_ONGOING = 2 [ (gogoproto.enumvalue_customname) = "SessionOngoing" ]; - SESSION_ACCEPTED = 3 [ (gogoproto.enumvalue_customname) = "SessionAccepted" ]; - SESSION_DENOUNCED = 4 [ (gogoproto.enumvalue_customname) = "SessionDenounced" ]; - SESSION_HALTED = 5 [ (gogoproto.enumvalue_customname) = "SessionHalted" ]; - SESSION_FAILED = 6 [ (gogoproto.enumvalue_customname) = "SessionFailed" ]; -} - -message DappSession { - string leader = 1; - uint64 start = 2; - string status_hash = 3; - SessionStatus status = 4; - string gateway = 5; - repeated google.protobuf.Any onchain_messages = 6; // dapp mints, xam creations, xam accepts -} - -message DappSessionApproval { - string dapp_name = 1; - string approver = 2; - bool is_approved = 3; -} - -message ExecutionRegistrar { - string dapp_name = 1; - DappSession prev_session = 2; // a session that was completed and caused changes to the blockchain - DappSession curr_session = 3; // a session that is currently ongoing or was just finalized but is NOT a part of the changes applied to the blockchain state - DappSession next_session = 4; // a session that is about to begin after the current session ended -} - -// To signal that dApp expects SEKAI to execute something, a tx as escaped JSON string must be placed in the `xam` field and `dst` set to `0`. -// Users MUST NOT be allowed to set `xam` by sending `transfer-dapp-tx` with `dst == 0`, this can only be done by the applications themselves -// and included as part of `xamdata`. -// Applications also are NOT allowed to send tx on behalf of other tx, meaning that ABR must interpret all tx with `dst == 0` -// as execution requests as long as `xam` is NOT an empty string. -// The only difference between user tx and application tx should be that the application tx will not have a signature. - -message BridgeRegistrarHelper { - uint64 next_user = 1; // default 1, defines what should be the next index of the user or application account - uint64 next_xam = 2; // default 1, defines what should be the next cross-application transaction id - xid - uint64 next_token = 3; // default 2, defines what should be the next token denom identifier -} - -message BridgeRegistrar { - BridgeRegistrarHelper helper = 1; // contains next values for user, xam, token - repeated BridgeAccount accounts = 2 [ (gogoproto.nullable) = false ]; // used only on genesis export - repeated BridgeToken tokens = 3 [ (gogoproto.nullable) = false ]; // used only on genesis export - repeated XAM xams = 4 [ (gogoproto.nullable) = false ]; // used only on genesis export -} - -message BridgeBalance { - uint64 bridge_token_index = 1; - string amount = 2 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", - (gogoproto.nullable) = false - ]; -} - -message BridgeAccount { - uint64 index = 1; - string address = 2; - string dapp_name = 3; // set to app name if app account - repeated BridgeBalance balances = 4 [ (gogoproto.nullable) = false ]; -} - -message BridgeToken { - uint64 index = 1; - string denom = 2; -} - -message XAMRequest { - repeated BridgeBalance amounts = 1 [ (gogoproto.nullable) = false ];; // coin amount - { "333333": "222222" } to send 222222 ubtc - uint64 source_dapp = 2; // source app - uint64 source_account = 3; // source beneficiary - uint64 dest_dapp = 4; // destination app - uint64 dest_beneficiary = 5; // destination beneficiary - string xam = 6; // string with message (optional) -} - -message XAMResponse { - uint64 xid = 1; - uint64 irc = 2; // Internal error or response code - uint64 src = 3; // Source application error or response code - uint64 drc = 4; // Destination application error or response code - uint64 irm = 5; // Internal response message - uint64 srm = 6; // Source response message - uint64 drm = 7; // Destination response message -} - -message XAM { - uint64 req_time = 1; - XAMRequest req = 2 [ (gogoproto.nullable) = false ]; - XAMResponse res = 3 [ (gogoproto.nullable) = false ]; -} - -// Application Bridge Registrar Structure Example -// { -// "next_index": , // default 1, defines what should be the next index of the user or application account -// "next_xam": , // default 1, defines what should be the next cross-application transaction id - xid -// "next_token": , // default 2, defines what should be the next token denom identifier -// "users": { // mapping of uint256 identifiers to addresses, value '0' MUST be reserved -// "1":"kiraXXX...XXX", -// "2":"kiraYYY...YYY", -// ... -// }, -// "apps": { // mapping of uint64 identifiers to apps dApp, value '0' MUST be reserved -// "1045": "kiraMMM...MMM", -// ... -// }, -// "tokens": { // mapping of denom to identifiers, index 1 is reserved for KEX -// "1": "ukex", -// "2": "", ... -// } -// "balances": { // user or application account balances -// "": { // explicit account address -// "index": , // index as defined as in the users or apps array -// "deposits": { -// "": { // dictionary mapping denom to applications by and the corresponding amount locked to that dApp -// "": "", ... -// }, ... -// } -// }, { ... }, ... -// }, -// "xams": { // cross application messages -// "": [ // list of transactions originating from specific kira address (user or application) -// { -// "xid": , // iterative, unique cross-application message identifier -// "val": { // dictionary of tokens and corresponding ammounts to be transferred (if any) -// "": "", ... -// }, -// "time": , // unix timestamp of the block when the transfer/withdrawl/message was sent -// "src": , // source APPlication of funds FROM which application index funds should be moved, if set to 0 implies deposit to ABR -// "acc": , // ACCount index FROM which funds should be sent -// "dst": , // APPlication TO which funds should be transferred, if set to 0 implies withdrawl from ABR back to KIRA bank module -// "ben": , // beneficiary/destination account to which funds must be sent -// "irc": , // Internal error or response code -// "src": , // Source application error or response code -// "drc": , // Destination application error or response code -// "xam": "", // Cross-application message -// "irm": "", // Internal response message -// "srm": "", // Source response message -// "drm": "" // Destination response message -// }, { ... }, ... -// ] -// } -// } +syntax = "proto3"; +package kira.layer2; + +option go_package = "github.com/KiraCore/sekai/x/layer2/types"; +option (gogoproto.equal_all) = true; + +import "google/protobuf/any.proto"; +import "gogoproto/gogo.proto"; +import "google/protobuf/timestamp.proto"; + +enum DappStatus { + option (gogoproto.goproto_enum_prefix) = false; + + BOOTSTRAP = 0 [ (gogoproto.enumvalue_customname) = "Bootstrap" ]; + ACTIVE = 1 [ (gogoproto.enumvalue_customname) = "Active" ]; + PAUSED = 2 [ (gogoproto.enumvalue_customname) = "Paused" ]; + HALTED = 3 [ (gogoproto.enumvalue_customname) = "Halted" ]; +} + +message AccountRange { + repeated string addresses = 1; + repeated uint64 roles = 2; +} + +message Controllers { + AccountRange whitelist = 1 [ (gogoproto.nullable) = false ]; + AccountRange blacklist = 2 [ (gogoproto.nullable) = false ]; +} + +message BinaryInfo { + string name = 1; // filename identifying source such as container, executable, config, finality gadget, etc. + string hash = 2; // hash of the file + string source = 3; // link to the source (from where the file should be fetched) + string reference = 4; // link to github repository or audit + string type = 5; // optional file type, e.g. binary, archive, text, image, etc. +} + +message LpPoolConfig { + string ratio = 1 [ + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", + (gogoproto.nullable) = false + ]; // amount of dp_ to be issued per each 1 KEX contributed + string deposit = 2; // spending pool id/name from where lp coins can be claimed + uint64 drip = 3; // time over which tokens should be distributed (can not be modified) +} + +message IssuanceConfig { + string deposit = 1; // spending pool id/name or kira address for extra dp deposit + string premint = 2 [ + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", + (gogoproto.nullable) = false + ]; // Amount of dp_ to premint (can not be modified) + string postmint = 3 [ + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", + (gogoproto.nullable) = false + ]; // Amount of dp_ to postmint (can not be modified) + uint64 time = 4; // unix timestamp when to issue postminted dp tokens (can not be modified) +} + +message Dapp { + string name = 1; // application name, must be globally unique and follow the same safety rules as usernames & validator moniker (can NOT be changed) + string denom = 2; // native dApp token denom substring, min 3 and max 8 lowercase alphabetic characters only (a-z) + string description = 3; // short description of the dApp, max 512 characters. + string website = 4; // official website/info about dApp, max 128 characters. + string logo = 5; // dapp logo url/cid + string social = 6; // comma separated list of official social media urls + string docs = 7; // url to the resources documenting dApp operation + Controllers controllers = 8 [ (gogoproto.nullable) = false ]; // list of dApp owners, who can curate the execution record + repeated BinaryInfo bin = 9 [ (gogoproto.nullable) = false ]; // array of files & their details essential for launching the dApp + LpPoolConfig pool = 10 [ (gogoproto.nullable) = false ]; // lp pool configuration (can not be modified) + IssuanceConfig issuance = 11 [ (gogoproto.nullable) = false ]; // extra dApp (dp) token issuance configuration + uint64 update_time_max = 12; // maximum time the dApp leader has to update his session (can be no more then 86400 - 24h) + uint64 executors_min = 13; // minimum number of validators that will be executing the dApp code (default 1) + uint64 executors_max = 14; // maximum number of validators that will be executing the dApp code (default 21) + uint64 verifiers_min = 15; // minimum number of nodes that must approve dApp state change + string total_bond = 16 [ + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Coin", + (gogoproto.nullable) = false + ]; // total bonds put on the dapp + uint64 creation_time = 17; // dapp creation time + DappStatus status = 18; // dapp status + string vote_quorum = 19 [ + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", + (gogoproto.nullable) = false + ]; // percentage - default: 51%, collective-specific % of owner accounts that must vote YES or NO for any of the collective proposals to be valid + uint64 vote_period = 20; // seconds - default: 600s, period of time in seconds that any of the collective proposals must last before passing or being rejected + uint64 vote_enactment = 21; // seconds - default: 300s, period of time that must pass before any of the collective proposals is enacted + uint64 liquidation_start = 22; // liquidation start time + string pool_fee = 23 [ + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", + (gogoproto.nullable) = false + ]; // default 1% swap, deposits, redemptions + string team_reserve = 24; // team multisig + uint64 premint_time = 25; // timestamp for premint + bool post_mint_paid = 26; // flag to show post mint paid or not + bool enable_bond_verifiers = 27; // flag to enable verifiers with bonding +} + +message UserDappBond { + string user = 1; + string dapp_name = 2; + string bond = 3 [ + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Coin", + (gogoproto.nullable) = false + ]; +} + +enum OperatorStatus { + option (gogoproto.goproto_enum_prefix) = false; + + OPERATOR_ACTIVE = 0 [ (gogoproto.enumvalue_customname) = "OperatorActive" ]; + OPERATOR_PAUSED = 1 [ (gogoproto.enumvalue_customname) = "OperatorPaused" ]; + OPERATOR_INACTIVE = 2 [ (gogoproto.enumvalue_customname) = "OperatorInactive" ]; + OPERATOR_EXITING = 3 [ (gogoproto.enumvalue_customname) = "OperatorExiting" ]; + OPERATOR_JAILED = 4 [ (gogoproto.enumvalue_customname) = "OperatorJailed" ]; +} + +// - `active` - the operator is active and ready to run the application +// - `paused` - the operator is signaling that he is not ready and needs some time for maintenance and is now omitted until his internal issues are resolved. The paused status is also a default status of every operator immediately after being approved to execute or verify the application. +// - `inactive` - executor missed his dApp session round too many times and is now omitted until his internal issues are resolved +// - `exiting` - the operator decided to stop running the dApp and is leaving the set of dApp operators completely +// - `jailed` - verifiers reported that executor published an invalid dApp state or if the verifier is jailed it means that he reported dApp to execute incorrectly and his stake must be slashed. Jailed verifiers can’t be unjailed. + +message DappOperator { + string dapp_name = 1; + string operator = 2; + bool executor = 3; // can only be set by validators, raises proposal that controllers must approve + bool verifier = 4; // can be set by anyone, sending this tx does not require any approvals however requires a bond in `lp_` tokens no less than `dapp_verifier_bond` + string interx = 5; // must be set to a valid kira address + OperatorStatus status = 6; + int64 rank = 7; + int64 streak = 8; + int64 mischance = 9; + int64 verified_sessions = 10; + int64 missed_sessions = 11; + string bonded_lp_amount = 12 [ + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", + (gogoproto.nullable) = false + ]; +} + +message DappLeaderDenouncement { + string dapp_name = 1; + string leader = 2; + string sender = 3; + string denouncement = 4; +} + +enum SessionStatus { + option (gogoproto.goproto_enum_prefix) = false; + + SESSION_UNSCHEDULED = 0 [ (gogoproto.enumvalue_customname) = "SessionUnscheduled" ]; + SESSION_SCHEDULED = 1 [ (gogoproto.enumvalue_customname) = "SessionScheduled" ]; + SESSION_ONGOING = 2 [ (gogoproto.enumvalue_customname) = "SessionOngoing" ]; + SESSION_ACCEPTED = 3 [ (gogoproto.enumvalue_customname) = "SessionAccepted" ]; + SESSION_DENOUNCED = 4 [ (gogoproto.enumvalue_customname) = "SessionDenounced" ]; + SESSION_HALTED = 5 [ (gogoproto.enumvalue_customname) = "SessionHalted" ]; + SESSION_FAILED = 6 [ (gogoproto.enumvalue_customname) = "SessionFailed" ]; +} + +message DappSession { + string leader = 1; + uint64 start = 2; + string status_hash = 3; + SessionStatus status = 4; + string gateway = 5; + repeated google.protobuf.Any onchain_messages = 6; // dapp mints, xam creations, xam accepts +} + +message DappSessionApproval { + string dapp_name = 1; + string approver = 2; + bool is_approved = 3; +} + +message ExecutionRegistrar { + string dapp_name = 1; + DappSession prev_session = 2; // a session that was completed and caused changes to the blockchain + DappSession curr_session = 3; // a session that is currently ongoing or was just finalized but is NOT a part of the changes applied to the blockchain state + DappSession next_session = 4; // a session that is about to begin after the current session ended +} + +// To signal that dApp expects SEKAI to execute something, a tx as escaped JSON string must be placed in the `xam` field and `dst` set to `0`. +// Users MUST NOT be allowed to set `xam` by sending `transfer-dapp-tx` with `dst == 0`, this can only be done by the applications themselves +// and included as part of `xamdata`. +// Applications also are NOT allowed to send tx on behalf of other tx, meaning that ABR must interpret all tx with `dst == 0` +// as execution requests as long as `xam` is NOT an empty string. +// The only difference between user tx and application tx should be that the application tx will not have a signature. + +message BridgeRegistrarHelper { + uint64 next_user = 1; // default 1, defines what should be the next index of the user or application account + uint64 next_xam = 2; // default 1, defines what should be the next cross-application transaction id - xid + uint64 next_token = 3; // default 2, defines what should be the next token denom identifier +} + +message BridgeRegistrar { + BridgeRegistrarHelper helper = 1; // contains next values for user, xam, token + repeated BridgeAccount accounts = 2 [ (gogoproto.nullable) = false ]; // used only on genesis export + repeated BridgeToken tokens = 3 [ (gogoproto.nullable) = false ]; // used only on genesis export + repeated XAM xams = 4 [ (gogoproto.nullable) = false ]; // used only on genesis export +} + +message BridgeBalance { + uint64 bridge_token_index = 1; + string amount = 2 [ + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", + (gogoproto.nullable) = false + ]; +} + +message BridgeAccount { + uint64 index = 1; + string address = 2; + string dapp_name = 3; // set to app name if app account + repeated BridgeBalance balances = 4 [ (gogoproto.nullable) = false ]; +} + +message BridgeToken { + uint64 index = 1; + string denom = 2; +} + +message XAMRequest { + repeated BridgeBalance amounts = 1 [ (gogoproto.nullable) = false ];; // coin amount - { "333333": "222222" } to send 222222 ubtc + uint64 source_dapp = 2; // source app + uint64 source_account = 3; // source beneficiary + uint64 dest_dapp = 4; // destination app + uint64 dest_beneficiary = 5; // destination beneficiary + string xam = 6; // string with message (optional) +} + +message XAMResponse { + uint64 xid = 1; + uint64 irc = 2; // Internal error or response code + uint64 src = 3; // Source application error or response code + uint64 drc = 4; // Destination application error or response code + uint64 irm = 5; // Internal response message + uint64 srm = 6; // Source response message + uint64 drm = 7; // Destination response message +} + +message XAM { + uint64 req_time = 1; + XAMRequest req = 2 [ (gogoproto.nullable) = false ]; + XAMResponse res = 3 [ (gogoproto.nullable) = false ]; +} + +// Application Bridge Registrar Structure Example +// { +// "next_index": , // default 1, defines what should be the next index of the user or application account +// "next_xam": , // default 1, defines what should be the next cross-application transaction id - xid +// "next_token": , // default 2, defines what should be the next token denom identifier +// "users": { // mapping of uint256 identifiers to addresses, value '0' MUST be reserved +// "1":"kiraXXX...XXX", +// "2":"kiraYYY...YYY", +// ... +// }, +// "apps": { // mapping of uint64 identifiers to apps dApp, value '0' MUST be reserved +// "1045": "kiraMMM...MMM", +// ... +// }, +// "tokens": { // mapping of denom to identifiers, index 1 is reserved for KEX +// "1": "ukex", +// "2": "", ... +// } +// "balances": { // user or application account balances +// "": { // explicit account address +// "index": , // index as defined as in the users or apps array +// "deposits": { +// "": { // dictionary mapping denom to applications by and the corresponding amount locked to that dApp +// "": "", ... +// }, ... +// } +// }, { ... }, ... +// }, +// "xams": { // cross application messages +// "": [ // list of transactions originating from specific kira address (user or application) +// { +// "xid": , // iterative, unique cross-application message identifier +// "val": { // dictionary of tokens and corresponding ammounts to be transferred (if any) +// "": "", ... +// }, +// "time": , // unix timestamp of the block when the transfer/withdrawl/message was sent +// "src": , // source APPlication of funds FROM which application index funds should be moved, if set to 0 implies deposit to ABR +// "acc": , // ACCount index FROM which funds should be sent +// "dst": , // APPlication TO which funds should be transferred, if set to 0 implies withdrawl from ABR back to KIRA bank module +// "ben": , // beneficiary/destination account to which funds must be sent +// "irc": , // Internal error or response code +// "src": , // Source application error or response code +// "drc": , // Destination application error or response code +// "xam": "", // Cross-application message +// "irm": "", // Internal response message +// "srm": "", // Source response message +// "drm": "" // Destination response message +// }, { ... }, ... +// ] +// } +// } diff --git a/proto/kira/layer2/mint.proto b/proto/kira/layer2/mint.proto index d534b5d65..e69de29bb 100644 --- a/proto/kira/layer2/mint.proto +++ b/proto/kira/layer2/mint.proto @@ -1,36 +0,0 @@ -syntax = "proto3"; -package kira.layer2; - -option go_package = "github.com/KiraCore/sekai/x/layer2/types"; -option (gogoproto.equal_all) = true; - -import "gogoproto/gogo.proto"; -import "google/protobuf/timestamp.proto"; - -message TokenInfo { - string token_type = 1; // Token Type / Compatibility (can NOT be changed or owner defined) - string denom = 2; // full denom, e.g. ap_kirabridge_btc or class identifier (can NOT be changed) - string name = 3; // full name, eg. Bitcoin, (can only be changed by the proposal-upsert-alias) - string symbol = 4; // symbnol, eg. KEX, BTC, (can only be changed by the proposal-upsert-alias) - string icon = 5; // url 256 chars max, (can be changed by owner or proposal-upsert-alias) - string description = 6; // 512 chars max, (can be changed by owner or proposal-upsert-alias) - string website = 7; // url 256 chars max, (can be changed by owner or proposal-upsert-alias) - string social = 8; // url 256 chars max, (can be changed by owner or proposal-upsert-alias) - uint64 decimals = 9; // min 0, max 255, (can NOT be changed) - string cap = 10 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", - (gogoproto.nullable) = false - ]; // maximum supply that can be issued, max 2^256 - 1, (can NOT be INCREASED or decreased below current circulatin supply) - string supply = 11 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", - (gogoproto.nullable) = false - ]; // current circulating supply can NOT be more then CAP - uint64 holders = 12; - string fee = 13 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", - (gogoproto.nullable) = false - ]; // cost of minting 10^decimals per X ukex, can only increase (can be changed by owner only) - string owner = 14; // owner address or "" if noone should be able to modify most important properties - string metadata = 15; // metadata url or CID - string hash = 16; // hexadecimal metadata checksum -} diff --git a/proto/kira/layer2/query.proto b/proto/kira/layer2/query.proto index ba0216181..25706f5b4 100644 --- a/proto/kira/layer2/query.proto +++ b/proto/kira/layer2/query.proto @@ -6,7 +6,6 @@ import "gogoproto/gogo.proto"; import "google/protobuf/any.proto"; import "google/api/annotations.proto"; import "kira/layer2/layer2.proto"; -import "kira/layer2/mint.proto"; option go_package = "github.com/KiraCore/sekai/x/layer2/types"; @@ -26,14 +25,6 @@ service Query { rpc TransferDapps(QueryTransferDappsRequest) returns (QueryTransferDappsResponse) { option (google.api.http).get = "/kira/layer2/transfer_dapp"; } - // query list of all token denoms on the network including those created in - // the genesis (ukex, samolean etc..) as well as those in the minting module, - // lp tokens, validator recovery tokens and so on. If the flag with specific - // name is specified provide a detailed information about the token including - // its current circulating supply etc. - rpc GlobalTokens(QueryGlobalTokensRequest) returns (QueryGlobalTokensResponse) { - option (google.api.http).get = "/kira/layer2/global_tokens"; - } } message QueryExecutionRegistrarRequest { @@ -53,8 +44,3 @@ message QueryTransferDappsRequest {} message QueryTransferDappsResponse { repeated XAM XAMs = 1 [ (gogoproto.nullable) = false ]; } - -message QueryGlobalTokensRequest {} -message QueryGlobalTokensResponse { - repeated TokenInfo tokens = 1 [ (gogoproto.nullable) = false ]; -} diff --git a/proto/kira/layer2/tx.proto b/proto/kira/layer2/tx.proto index 2774a377e..7fc8292df 100644 --- a/proto/kira/layer2/tx.proto +++ b/proto/kira/layer2/tx.proto @@ -1,310 +1,310 @@ -syntax = "proto3"; -package kira.layer2; - -option go_package = "github.com/KiraCore/sekai/x/layer2/types"; -option (gogoproto.equal_all) = true; - -import "gogoproto/gogo.proto"; -import "google/protobuf/any.proto"; -import "cosmos_proto/cosmos.proto"; -import "kira/layer2/layer2.proto"; - -// Msg defines the layer2 Msg service. -service Msg { - rpc CreateDappProposal(MsgCreateDappProposal) returns (MsgCreateDappProposalResponse); - rpc BondDappProposal(MsgBondDappProposal) returns (MsgBondDappProposalResponse); - rpc ReclaimDappBondProposal(MsgReclaimDappBondProposal) returns (MsgReclaimDappBondProposalResponse); - rpc JoinDappVerifierWithBond(MsgJoinDappVerifierWithBond) returns (MsgJoinDappVerifierWithBondResponse); - rpc ExitDapp(MsgExitDapp) returns (MsgExitDappResponse); - rpc RedeemDappPoolTx(MsgRedeemDappPoolTx) returns (MsgRedeemDappPoolTxResponse); - rpc SwapDappPoolTx(MsgSwapDappPoolTx) returns (MsgSwapDappPoolTxResponse); - rpc ConvertDappPoolTx(MsgConvertDappPoolTx) returns (MsgConvertDappPoolTxResponse); - rpc PauseDappTx(MsgPauseDappTx) returns (MsgPauseDappTxResponse); - rpc UnPauseDappTx(MsgUnPauseDappTx) returns (MsgUnPauseDappTxResponse); - rpc ReactivateDappTx(MsgReactivateDappTx) returns (MsgReactivateDappTxResponse); - rpc ExecuteDappTx(MsgExecuteDappTx) returns (MsgExecuteDappTxResponse); - rpc DenounceLeaderTx(MsgDenounceLeaderTx) returns (MsgDenounceLeaderTxResponse); - rpc TransitionDappTx(MsgTransitionDappTx) returns (MsgTransitionDappTxResponse); - rpc ApproveDappTransitionTx(MsgApproveDappTransitionTx) returns (MsgApproveDappTransitionTxResponse); - rpc RejectDappTransitionTx(MsgRejectDappTransitionTx) returns (MsgRejectDappTransitionTxResponse); - rpc TransferDappTx(MsgTransferDappTx) returns (MsgTransferDappTxResponse); - rpc AckTransferDappTx(MsgAckTransferDappTx) returns (MsgAckTransferDappTxResponse); - rpc MintCreateFtTx(MsgMintCreateFtTx) returns (MsgMintCreateFtTxResponse); - rpc MintCreateNftTx(MsgMintCreateNftTx) returns (MsgMintCreateNftTxResponse); - rpc MintIssueTx(MsgMintIssueTx) returns (MsgMintIssueTxResponse); - rpc MintBurnTx(MsgMintBurnTx) returns (MsgMintBurnTxResponse); -} - -// allow to raise dApp launch proposal using a token -// bond or with a dedicated permission (where no starting 1% bond needed). Fail -// proposal if min_dapp_bond is not reached. This proposal does NOT require -// governance approval only sufficient number of bonded tokens. -message MsgCreateDappProposal { - string sender = 1; - Dapp dapp = 2 [ (gogoproto.nullable) = false ]; - string bond = 3 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Coin", - (gogoproto.nullable) = false - ]; -} -message MsgCreateDappProposalResponse {} - -// allow KEX holders to bond extra tokens to dApp -// proposal unless max_dapp_bond is reached in which case fail the tx. -message MsgBondDappProposal { - string sender = 1; - string dapp_name = 2; - string bond = 3 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Coin", - (gogoproto.nullable) = false - ]; -} -message MsgBondDappProposalResponse {} - -// claim your KEX back from dApp proposal, should -// be possible to execute regardless if the proposal is still ongoing or failed -message MsgReclaimDappBondProposal{ - string sender = 1; - string dapp_name = 2; - string bond = 3 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Coin", - (gogoproto.nullable) = false - ]; -} -message MsgReclaimDappBondProposalResponse {} - -message MsgJoinDappVerifierWithBond { - string sender = 1; - string dapp_name = 2; - string interx = 3; // must be set to a valid kira address -} -message MsgJoinDappVerifierWithBondResponse {} - -// stop being a dApp operator and remove the record in the Execution Registrar. -// Return bonded funds if the operator is a verifier. -message MsgExitDapp { - string sender = 1; - string dapp_name = 2; -} -message MsgExitDappResponse {} - -// return lp_ tokens to the pool and redeem KEX or dp_ token -// unless slippage is exceeded then fail the tx. -message MsgRedeemDappPoolTx { - string sender = 1; - string dapp_name = 2; - string lp_token = 3 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Coin", - (gogoproto.nullable) = false - ]; - string slippage = 4 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; -} -message MsgRedeemDappPoolTxResponse {} - -// send KEX and receive dp_ or send dp_ and receive KEX unless -// slippage is exceeded then fail the tx. -message MsgSwapDappPoolTx { - string sender = 1; - string dapp_name = 2; - string token = 3 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Coin", - (gogoproto.nullable) = false - ]; - string slippage = 4 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; -} -message MsgSwapDappPoolTxResponse {} - -// allow user to convert any dp_ for any other dp_ token unless -// slippage is exceeded then fail the tx. -message MsgConvertDappPoolTx { - string sender = 1; - string dapp_name = 2; - string target_dapp_name = 3; - string lp_token = 4 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Coin", - (gogoproto.nullable) = false - ]; - string slippage = 5 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; -} -message MsgConvertDappPoolTxResponse {} - -// allow executors to change their status to paused. This tx does NOT pause the -// dApp, it only pauses the ability of an executor to continue running the dApp -// in the next session. If the executor is currently running the session then he -// needs to finish it before paused status is applied. -message MsgPauseDappTx { - string sender = 1; - string dapp_name = 2; -} -message MsgPauseDappTxResponse {} - -// exit maintenance mode to signal that verifier or executor is ready to operate -// the dApp again. -message MsgUnPauseDappTx { - string sender = 1; - string dapp_name = 2; -} -message MsgUnPauseDappTxResponse {} - -// re-activate deactivated dApp operator -message MsgReactivateDappTx { - string sender = 1; - string dapp_name = 2; -} -message MsgReactivateDappTxResponse {} - -// allow next session leader to announce or update his IP address and start -// execution. -message MsgExecuteDappTx { - string sender = 1; - string dapp_name = 2; - string gateway = 3; -} -message MsgExecuteDappTxResponse {} - -// allow executors to denounce the current session leader, should take a -// session id as a parameter as well as a true or false flag to allow vote -// change. -message MsgDenounceLeaderTx { - string sender = 1; - string dapp_name = 2; - string leader = 3; - string denounce_text = 4; - string version = 5; -} -message MsgDenounceLeaderTxResponse {} - -// update CURRENT session state (can only be sent by current session leader), -// this tx MUST include dApp version. -message MsgTransitionDappTx { - string sender = 1; - string dapp_name = 2; - string status_hash = 3; - repeated google.protobuf.Any onchain_messages = 4; // dapp mints, xam creations, xam accepts - string version = 5; -} -message MsgTransitionDappTxResponse {} - -// approve CURRENT session state (can only be sent by the verifiers or executors -// who are NOT a leader), this tx MUST include dApp version. -message MsgApproveDappTransitionTx { - string sender = 1; - string dapp_name = 2; - string version = 3; -} -message MsgApproveDappTransitionTxResponse {} - -// reject session transition and immediately set the state of the current -// session to halted, this tx MUST include dApp version and session id. -message MsgRejectDappTransitionTx { - string sender = 1; - string dapp_name = 2; - string version = 3; -} -message MsgRejectDappTransitionTxResponse {} - -// allow user to manually deposit/transfer/withdrawal funds to / from / within -// ABR and communicate with apps by including xam string message. -message MsgTransferDappTx { - string sender = 1; - repeated XAMRequest requests = 2 [ (gogoproto.nullable) = false ]; -} -message MsgTransferDappTxResponse {} - -// acknowledgement of transfer dapp tx -message MsgAckTransferDappTx { - string sender = 1; - repeated XAMResponse responses = 2 [ (gogoproto.nullable) = false ]; -} -message MsgAckTransferDappTxResponse {} - -// create new fungible token record in the minting module -message MsgMintCreateFtTx { - string sender = 1; - string denom_suffix = 2; // suffix that must be applied to the token, min 3 and max 8 lowercase alphabetic characters only (a-z) - string name = 3; // full name, eg. Bitcoin, (can only be changed by the proposal-upsert-alias) - string symbol = 4; // symbnol, eg. KEX, BTC, (can only be changed by the proposal-upsert-alias) - string icon = 5; // url 256 chars max, (can be changed by owner or proposal-upsert-alias) - string description = 6; // 512 chars max, (can be changed by owner or proposal-upsert-alias) - string website = 7; // url 256 chars max, (can be changed by owner or proposal-upsert-alias) - string social = 8; // url 256 chars max, (can be changed by owner or proposal-upsert-alias) - uint64 decimals = 9; // min 0, max 255, (can NOT be changed) - string cap = 10 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", - (gogoproto.nullable) = false - ]; // maximum supply that can be issued, max 2^256 - 1, (can NOT be INCREASED or decreased below current circulatin supply) - string supply = 11 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", - (gogoproto.nullable) = false - ]; // current circulating supply can NOT be more then CAP - uint64 holders = 12; - string fee = 13 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", - (gogoproto.nullable) = false - ]; // cost of minting 10^decimals per X ukex, can only increase (can be changed by owner only) - string owner = 14; // owner address or "" if noone should be able to modify most important properties -} -message MsgMintCreateFtTxResponse {} - -// create new non-fungible token record in the minting module -message MsgMintCreateNftTx { - string sender = 1; - string denom_suffix = 2; // suffix that must be applied to the token, min 3 and max 8 lowercase alphabetic characters only (a-z) - string name = 3; // full name, eg. Bitcoin, (can only be changed by the proposal-upsert-alias) - string symbol = 4; // symbnol, eg. KEX, BTC, (can only be changed by the proposal-upsert-alias) - string icon = 5; // url 256 chars max, (can be changed by owner or proposal-upsert-alias) - string description = 6; // 512 chars max, (can be changed by owner or proposal-upsert-alias) - string website = 7; // url 256 chars max, (can be changed by owner or proposal-upsert-alias) - string social = 8; // url 256 chars max, (can be changed by owner or proposal-upsert-alias) - uint64 decimals = 9; // min 0, max 255, (can NOT be changed) - string cap = 10 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", - (gogoproto.nullable) = false - ]; // maximum supply that can be issued, max 2^256 - 1, (can NOT be INCREASED or decreased below current circulatin supply) - string supply = 11 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", - (gogoproto.nullable) = false - ]; // current circulating supply can NOT be more then CAP - uint64 holders = 12; - string fee = 13 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", - (gogoproto.nullable) = false - ]; // cost of minting 10^decimals per X ukex, can only increase (can be changed by owner only) - string owner = 14; // owner address or "" if noone should be able to modify most important properties - string metadata = 15; // metadata url or CID - string hash = 16; // hexadecimal metadata checksum -} -message MsgMintCreateNftTxResponse {} - -// allow owner to mint new tokens or anyone if the minting-fee is set to value -// other then 0. -message MsgMintIssueTx { - string sender = 1; - string denom = 2; - string amount = 3 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", - (gogoproto.nullable) = false - ]; - string receiver = 4; -} -message MsgMintIssueTxResponse {} - -// allow anyone burn the tokens they own -message MsgMintBurnTx { - string sender = 1; - string denom = 2; - string amount = 3 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", - (gogoproto.nullable) = false - ]; -} -message MsgMintBurnTxResponse {} +syntax = "proto3"; +package kira.layer2; + +option go_package = "github.com/KiraCore/sekai/x/layer2/types"; +option (gogoproto.equal_all) = true; + +import "gogoproto/gogo.proto"; +import "google/protobuf/any.proto"; +import "cosmos_proto/cosmos.proto"; +import "kira/layer2/layer2.proto"; + +// Msg defines the layer2 Msg service. +service Msg { + rpc CreateDappProposal(MsgCreateDappProposal) returns (MsgCreateDappProposalResponse); + rpc BondDappProposal(MsgBondDappProposal) returns (MsgBondDappProposalResponse); + rpc ReclaimDappBondProposal(MsgReclaimDappBondProposal) returns (MsgReclaimDappBondProposalResponse); + rpc JoinDappVerifierWithBond(MsgJoinDappVerifierWithBond) returns (MsgJoinDappVerifierWithBondResponse); + rpc ExitDapp(MsgExitDapp) returns (MsgExitDappResponse); + rpc RedeemDappPoolTx(MsgRedeemDappPoolTx) returns (MsgRedeemDappPoolTxResponse); + rpc SwapDappPoolTx(MsgSwapDappPoolTx) returns (MsgSwapDappPoolTxResponse); + rpc ConvertDappPoolTx(MsgConvertDappPoolTx) returns (MsgConvertDappPoolTxResponse); + rpc PauseDappTx(MsgPauseDappTx) returns (MsgPauseDappTxResponse); + rpc UnPauseDappTx(MsgUnPauseDappTx) returns (MsgUnPauseDappTxResponse); + rpc ReactivateDappTx(MsgReactivateDappTx) returns (MsgReactivateDappTxResponse); + rpc ExecuteDappTx(MsgExecuteDappTx) returns (MsgExecuteDappTxResponse); + rpc DenounceLeaderTx(MsgDenounceLeaderTx) returns (MsgDenounceLeaderTxResponse); + rpc TransitionDappTx(MsgTransitionDappTx) returns (MsgTransitionDappTxResponse); + rpc ApproveDappTransitionTx(MsgApproveDappTransitionTx) returns (MsgApproveDappTransitionTxResponse); + rpc RejectDappTransitionTx(MsgRejectDappTransitionTx) returns (MsgRejectDappTransitionTxResponse); + rpc TransferDappTx(MsgTransferDappTx) returns (MsgTransferDappTxResponse); + rpc AckTransferDappTx(MsgAckTransferDappTx) returns (MsgAckTransferDappTxResponse); + rpc MintCreateFtTx(MsgMintCreateFtTx) returns (MsgMintCreateFtTxResponse); + rpc MintCreateNftTx(MsgMintCreateNftTx) returns (MsgMintCreateNftTxResponse); + rpc MintIssueTx(MsgMintIssueTx) returns (MsgMintIssueTxResponse); + rpc MintBurnTx(MsgMintBurnTx) returns (MsgMintBurnTxResponse); +} + +// allow to raise dApp launch proposal using a token +// bond or with a dedicated permission (where no starting 1% bond needed). Fail +// proposal if min_dapp_bond is not reached. This proposal does NOT require +// governance approval only sufficient number of bonded tokens. +message MsgCreateDappProposal { + string sender = 1; + Dapp dapp = 2 [ (gogoproto.nullable) = false ]; + string bond = 3 [ + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Coin", + (gogoproto.nullable) = false + ]; +} +message MsgCreateDappProposalResponse {} + +// allow KEX holders to bond extra tokens to dApp +// proposal unless max_dapp_bond is reached in which case fail the tx. +message MsgBondDappProposal { + string sender = 1; + string dapp_name = 2; + string bond = 3 [ + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Coin", + (gogoproto.nullable) = false + ]; +} +message MsgBondDappProposalResponse {} + +// claim your KEX back from dApp proposal, should +// be possible to execute regardless if the proposal is still ongoing or failed +message MsgReclaimDappBondProposal{ + string sender = 1; + string dapp_name = 2; + string bond = 3 [ + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Coin", + (gogoproto.nullable) = false + ]; +} +message MsgReclaimDappBondProposalResponse {} + +message MsgJoinDappVerifierWithBond { + string sender = 1; + string dapp_name = 2; + string interx = 3; // must be set to a valid kira address +} +message MsgJoinDappVerifierWithBondResponse {} + +// stop being a dApp operator and remove the record in the Execution Registrar. +// Return bonded funds if the operator is a verifier. +message MsgExitDapp { + string sender = 1; + string dapp_name = 2; +} +message MsgExitDappResponse {} + +// return lp_ tokens to the pool and redeem KEX or dp_ token +// unless slippage is exceeded then fail the tx. +message MsgRedeemDappPoolTx { + string sender = 1; + string dapp_name = 2; + string lp_token = 3 [ + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Coin", + (gogoproto.nullable) = false + ]; + string slippage = 4 [ + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", + (gogoproto.nullable) = false + ]; +} +message MsgRedeemDappPoolTxResponse {} + +// send KEX and receive dp_ or send dp_ and receive KEX unless +// slippage is exceeded then fail the tx. +message MsgSwapDappPoolTx { + string sender = 1; + string dapp_name = 2; + string token = 3 [ + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Coin", + (gogoproto.nullable) = false + ]; + string slippage = 4 [ + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", + (gogoproto.nullable) = false + ]; +} +message MsgSwapDappPoolTxResponse {} + +// allow user to convert any dp_ for any other dp_ token unless +// slippage is exceeded then fail the tx. +message MsgConvertDappPoolTx { + string sender = 1; + string dapp_name = 2; + string target_dapp_name = 3; + string lp_token = 4 [ + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Coin", + (gogoproto.nullable) = false + ]; + string slippage = 5 [ + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", + (gogoproto.nullable) = false + ]; +} +message MsgConvertDappPoolTxResponse {} + +// allow executors to change their status to paused. This tx does NOT pause the +// dApp, it only pauses the ability of an executor to continue running the dApp +// in the next session. If the executor is currently running the session then he +// needs to finish it before paused status is applied. +message MsgPauseDappTx { + string sender = 1; + string dapp_name = 2; +} +message MsgPauseDappTxResponse {} + +// exit maintenance mode to signal that verifier or executor is ready to operate +// the dApp again. +message MsgUnPauseDappTx { + string sender = 1; + string dapp_name = 2; +} +message MsgUnPauseDappTxResponse {} + +// re-activate deactivated dApp operator +message MsgReactivateDappTx { + string sender = 1; + string dapp_name = 2; +} +message MsgReactivateDappTxResponse {} + +// allow next session leader to announce or update his IP address and start +// execution. +message MsgExecuteDappTx { + string sender = 1; + string dapp_name = 2; + string gateway = 3; +} +message MsgExecuteDappTxResponse {} + +// allow executors to denounce the current session leader, should take a +// session id as a parameter as well as a true or false flag to allow vote +// change. +message MsgDenounceLeaderTx { + string sender = 1; + string dapp_name = 2; + string leader = 3; + string denounce_text = 4; + string version = 5; +} +message MsgDenounceLeaderTxResponse {} + +// update CURRENT session state (can only be sent by current session leader), +// this tx MUST include dApp version. +message MsgTransitionDappTx { + string sender = 1; + string dapp_name = 2; + string status_hash = 3; + repeated google.protobuf.Any onchain_messages = 4; // dapp mints, xam creations, xam accepts + string version = 5; +} +message MsgTransitionDappTxResponse {} + +// approve CURRENT session state (can only be sent by the verifiers or executors +// who are NOT a leader), this tx MUST include dApp version. +message MsgApproveDappTransitionTx { + string sender = 1; + string dapp_name = 2; + string version = 3; +} +message MsgApproveDappTransitionTxResponse {} + +// reject session transition and immediately set the state of the current +// session to halted, this tx MUST include dApp version and session id. +message MsgRejectDappTransitionTx { + string sender = 1; + string dapp_name = 2; + string version = 3; +} +message MsgRejectDappTransitionTxResponse {} + +// allow user to manually deposit/transfer/withdrawal funds to / from / within +// ABR and communicate with apps by including xam string message. +message MsgTransferDappTx { + string sender = 1; + repeated XAMRequest requests = 2 [ (gogoproto.nullable) = false ]; +} +message MsgTransferDappTxResponse {} + +// acknowledgement of transfer dapp tx +message MsgAckTransferDappTx { + string sender = 1; + repeated XAMResponse responses = 2 [ (gogoproto.nullable) = false ]; +} +message MsgAckTransferDappTxResponse {} + +// create new fungible token record in the minting module +message MsgMintCreateFtTx { + string sender = 1; + string denom_suffix = 2; // suffix that must be applied to the token, min 3 and max 8 lowercase alphabetic characters only (a-z) + string name = 3; // full name, eg. Bitcoin, (can only be changed by the proposal-upsert-alias) + string symbol = 4; // symbnol, eg. KEX, BTC, (can only be changed by the proposal-upsert-alias) + string icon = 5; // url 256 chars max, (can be changed by owner or proposal-upsert-alias) + string description = 6; // 512 chars max, (can be changed by owner or proposal-upsert-alias) + string website = 7; // url 256 chars max, (can be changed by owner or proposal-upsert-alias) + string social = 8; // url 256 chars max, (can be changed by owner or proposal-upsert-alias) + uint32 decimals = 9; // min 0, max 255, (can NOT be changed) + string cap = 10 [ + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", + (gogoproto.nullable) = false + ]; // maximum supply that can be issued, max 2^256 - 1, (can NOT be INCREASED or decreased below current circulatin supply) + string supply = 11 [ + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", + (gogoproto.nullable) = false + ]; // current circulating supply can NOT be more then CAP + uint64 holders = 12; + string fee_rate = 13 [ + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", + (gogoproto.nullable) = false + ]; // cost of minting 10^decimals per X ukex, can only increase (can be changed by owner only) + string owner = 14; // owner address or "" if noone should be able to modify most important properties +} +message MsgMintCreateFtTxResponse {} + +// create new non-fungible token record in the minting module +message MsgMintCreateNftTx { + string sender = 1; + string denom_suffix = 2; // suffix that must be applied to the token, min 3 and max 8 lowercase alphabetic characters only (a-z) + string name = 3; // full name, eg. Bitcoin, (can only be changed by the proposal-upsert-alias) + string symbol = 4; // symbnol, eg. KEX, BTC, (can only be changed by the proposal-upsert-alias) + string icon = 5; // url 256 chars max, (can be changed by owner or proposal-upsert-alias) + string description = 6; // 512 chars max, (can be changed by owner or proposal-upsert-alias) + string website = 7; // url 256 chars max, (can be changed by owner or proposal-upsert-alias) + string social = 8; // url 256 chars max, (can be changed by owner or proposal-upsert-alias) + uint32 decimals = 9; // min 0, max 255, (can NOT be changed) + string cap = 10 [ + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", + (gogoproto.nullable) = false + ]; // maximum supply that can be issued, max 2^256 - 1, (can NOT be INCREASED or decreased below current circulatin supply) + string supply = 11 [ + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", + (gogoproto.nullable) = false + ]; // current circulating supply can NOT be more then CAP + uint64 holders = 12; + string fee_rate = 13 [ + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", + (gogoproto.nullable) = false + ]; // cost of minting 10^decimals per X ukex, can only increase (can be changed by owner only) + string owner = 14; // owner address or "" if noone should be able to modify most important properties + string metadata = 15; // metadata url or CID + string hash = 16; // hexadecimal metadata checksum +} +message MsgMintCreateNftTxResponse {} + +// allow owner to mint new tokens or anyone if the minting-fee is set to value +// other then 0. +message MsgMintIssueTx { + string sender = 1; + string denom = 2; + string amount = 3 [ + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", + (gogoproto.nullable) = false + ]; + string receiver = 4; +} +message MsgMintIssueTxResponse {} + +// allow anyone burn the tokens they own +message MsgMintBurnTx { + string sender = 1; + string denom = 2; + string amount = 3 [ + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", + (gogoproto.nullable) = false + ]; +} +message MsgMintBurnTxResponse {} diff --git a/proto/kira/slashing/v1beta1/genesis.proto b/proto/kira/slashing/v1beta1/genesis.proto index a62e42fd6..5fd1b0d91 100644 --- a/proto/kira/slashing/v1beta1/genesis.proto +++ b/proto/kira/slashing/v1beta1/genesis.proto @@ -1,27 +1,24 @@ -syntax = "proto3"; -package kira.slashing; - -option go_package = "github.com/KiraCore/sekai/x/slashing/types"; - -import "gogoproto/gogo.proto"; -import "kira/slashing/v1beta1/slashing.proto"; - -// GenesisState defines the slashing module's genesis state. -message GenesisState { - // params defines all the paramaters of related to deposit. - Params params = 1 [(gogoproto.nullable) = false]; - - // signing_infos represents a map between validator addresses and their - // signing infos. - repeated SigningInfo signing_infos = 2 - [(gogoproto.moretags) = "yaml:\"signing_infos\"", (gogoproto.nullable) = false]; -} - -// SigningInfo stores validator signing info of corresponding address. -message SigningInfo { - // address is the validator address. - string address = 1; - // validator_signing_info represents the signing info of this validator. - ValidatorSigningInfo validator_signing_info = 2 - [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"validator_signing_info\""]; -} +syntax = "proto3"; +package kira.slashing; + +option go_package = "github.com/KiraCore/sekai/x/slashing/types"; + +import "gogoproto/gogo.proto"; +import "kira/slashing/v1beta1/slashing.proto"; + +// GenesisState defines the slashing module's genesis state. +message GenesisState { + // signing_infos represents a map between validator addresses and their + // signing infos. + repeated SigningInfo signing_infos = 1 + [(gogoproto.moretags) = "yaml:\"signing_infos\"", (gogoproto.nullable) = false]; +} + +// SigningInfo stores validator signing info of corresponding address. +message SigningInfo { + // address is the validator address. + string address = 1; + // validator_signing_info represents the signing info of this validator. + ValidatorSigningInfo validator_signing_info = 2 + [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"validator_signing_info\""]; +} diff --git a/proto/kira/slashing/v1beta1/query.proto b/proto/kira/slashing/v1beta1/query.proto index 9ab0df59c..5621cd72e 100644 --- a/proto/kira/slashing/v1beta1/query.proto +++ b/proto/kira/slashing/v1beta1/query.proto @@ -14,11 +14,6 @@ option go_package = "github.com/KiraCore/sekai/x/slashing/types"; // Query provides defines the gRPC querier service service Query { - // Params queries the parameters of slashing module - rpc Params(QueryParamsRequest) returns (QueryParamsResponse) { - option (google.api.http).get = "/kira/slashing/v1beta1/params"; - } - // SigningInfo queries the signing info of given cons address rpc SigningInfo(QuerySigningInfoRequest) returns (QuerySigningInfoResponse) { option (google.api.http).get = "/kira/slashing/v1beta1/signing_infos/{cons_address}"; diff --git a/proto/kira/spending/pool.proto b/proto/kira/spending/pool.proto index 8e9e00779..6e425e7de 100644 --- a/proto/kira/spending/pool.proto +++ b/proto/kira/spending/pool.proto @@ -1,76 +1,79 @@ -syntax = "proto3"; -package kira.spending; - -option go_package = "github.com/KiraCore/sekai/x/spending/types"; - -import "google/protobuf/timestamp.proto"; -import "gogoproto/gogo.proto"; - -message ClaimInfo { - string account = 1; - string pool_name = 2; - uint64 last_claim = 3; -} - -message PermInfo { - option (gogoproto.equal) = true; - - repeated uint64 owner_roles = 1; - repeated string owner_accounts = 2; -} - -message WeightedRole { - option (gogoproto.equal) = true; - - uint64 role = 1; - string weight = 2 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; -} -message WeightedAccount { - option (gogoproto.equal) = true; - - string account = 1; - string weight = 2 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; -} -message WeightedPermInfo { - option (gogoproto.equal) = true; - - repeated WeightedRole roles = 1 [ (gogoproto.nullable) = false ]; - repeated WeightedAccount accounts = 2 [ (gogoproto.nullable) = false ]; -} - -message SpendingPool { - string name = 1; - // claim-start & claim-end - defines the exact time period (Unix timestamps) between which tokens can be claimed from the pool, allowing for a precise funds distribution. - uint64 claim_start = 2; - uint64 claim_end = 3; - uint64 claim_expiry = 4; - // rate of distribution in the smallest token denomination per 1 second (this value can be a float number, smaller than actual denomination) - repeated string rates = 5 [ - (gogoproto.moretags) = "yaml:\"rates\"", - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.DecCoin", - (gogoproto.nullable) = false - ]; - // pool specific % of owner accounts that must vote YES or NO for any of the pool proposals to be valid. - uint64 vote_quorum = 6; // percentage, # default: 51% - // period of time in seconds that any of the pool proposals must last before passing or being rejected - uint64 vote_period = 7; // seconds, # default: 600s - // period of time that must pass before any of the pool proposal is enacted - uint64 vote_enactment = 8; // seconds, # default: 300s - // defines a list of accounts/roles controlling the spending pool via “governance-like” proposals - PermInfo owners = 9; - // defines set of accounts/roles to which funds can be distributed - WeightedPermInfo beneficiaries = 10; - repeated string balances = 11 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Coin", - (gogoproto.nullable) = false - ]; - bool dynamic_rate = 12; // (default false) defines if the rate of token distribution should be dynamic - uint64 dynamic_rate_period = 13; // time in seconds defining every what period dynamic rates are calculated - uint64 last_dynamic_rate_calc_time = 14; // timestamp that last dynamic rate was calculated +syntax = "proto3"; +package kira.spending; + +option go_package = "github.com/KiraCore/sekai/x/spending/types"; + +import "google/protobuf/timestamp.proto"; +import "gogoproto/gogo.proto"; + +message ClaimInfo { + string account = 1; + string pool_name = 2; + uint64 last_claim = 3; +} + +message PermInfo { + option (gogoproto.equal) = true; + + repeated uint64 owner_roles = 1; + repeated string owner_accounts = 2; +} + +message WeightedRole { + option (gogoproto.equal) = true; + + uint64 role = 1; + string weight = 2 [ + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", + (gogoproto.nullable) = false + ]; +} +message WeightedAccount { + option (gogoproto.equal) = true; + + string account = 1; + string weight = 2 [ + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", + (gogoproto.nullable) = false + ]; +} +message WeightedPermInfo { + option (gogoproto.equal) = true; + + repeated WeightedRole roles = 1 [ (gogoproto.nullable) = false ]; + repeated WeightedAccount accounts = 2 [ (gogoproto.nullable) = false ]; +} + +message SpendingPool { + string name = 1; + // claim-start & claim-end - defines the exact time period (Unix timestamps) between which tokens can be claimed from the pool, allowing for a precise funds distribution. + uint64 claim_start = 2; + uint64 claim_end = 3; + uint64 claim_expiry = 4; + // rate of distribution in the smallest token denomination per 1 second (this value can be a float number, smaller than actual denomination) + repeated string rates = 5 [ + (gogoproto.moretags) = "yaml:\"rates\"", + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.DecCoin", + (gogoproto.nullable) = false + ]; + // pool specific % of owner accounts that must vote YES or NO for any of the pool proposals to be valid. + string vote_quorum = 6 [ + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", + (gogoproto.nullable) = false + ]; // percentage, # default: 51% + // period of time in seconds that any of the pool proposals must last before passing or being rejected + uint64 vote_period = 7; // seconds, # default: 600s + // period of time that must pass before any of the pool proposal is enacted + uint64 vote_enactment = 8; // seconds, # default: 300s + // defines a list of accounts/roles controlling the spending pool via “governance-like” proposals + PermInfo owners = 9; + // defines set of accounts/roles to which funds can be distributed + WeightedPermInfo beneficiaries = 10; + repeated string balances = 11 [ + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Coin", + (gogoproto.nullable) = false + ]; + bool dynamic_rate = 12; // (default false) defines if the rate of token distribution should be dynamic + uint64 dynamic_rate_period = 13; // time in seconds defining every what period dynamic rates are calculated + uint64 last_dynamic_rate_calc_time = 14; // timestamp that last dynamic rate was calculated } \ No newline at end of file diff --git a/proto/kira/spending/proposal.proto b/proto/kira/spending/proposal.proto index 7d487ec18..b27caf3fc 100644 --- a/proto/kira/spending/proposal.proto +++ b/proto/kira/spending/proposal.proto @@ -1,60 +1,63 @@ -syntax = "proto3"; -package kira.spending; - -import "gogoproto/gogo.proto"; -import "google/protobuf/timestamp.proto"; -import "google/protobuf/any.proto"; -import "cosmos_proto/cosmos.proto"; -import "kira/spending/pool.proto"; - -option go_package = "github.com/KiraCore/sekai/x/spending/types"; - -// proposal-spending-pool-update - a function to create a proposal allowing -// modification of the existing spending pool, adding owners, beneficiaries, -// or otherwise editing any of the existing properties. -message UpdateSpendingPoolProposal { - option (cosmos_proto.implements_interface) = "Content"; - option (gogoproto.equal) = true; - - string name = 1; - uint64 claim_start = 2; - uint64 claim_end = 3; - repeated string rates = 4 [ - (gogoproto.moretags) = "yaml:\"rates\"", - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.DecCoin", - (gogoproto.nullable) = false - ]; - uint64 vote_quorum = 5; // percentage, # default: 51% - uint64 vote_period = 6; // seconds, # default: 600s - uint64 vote_enactment = 7; // seconds, # default: 300s - kira.spending.PermInfo owners = 8 [ (gogoproto.nullable) = false ]; - kira.spending.WeightedPermInfo beneficiaries = 9 [ (gogoproto.nullable) = false ]; - bool dynamic_rate = 10; - uint64 dynamic_rate_period = 11; -} - -// SpendingPoolDistributionProposal - force distribution of tokens to all -// beneficiaries registered in the claims array (this function should be -// automatically triggered before upgrades are executed) -message SpendingPoolDistributionProposal { - option (cosmos_proto.implements_interface) = "Content"; - option (gogoproto.equal) = true; - - string pool_name = 1; -} - -// SpendingPoolWithdrawProposal - proposal allowing withdrawal of funds -// from the pool to one or many specified accounts. Withdrawal should only -// be possible if the receiving account/s are on the list of registered -// beneficiaries. -message SpendingPoolWithdrawProposal { - option (cosmos_proto.implements_interface) = "Content"; - option (gogoproto.equal) = true; - - string pool_name = 1; - repeated string beneficiaries = 2; - repeated string amounts = 3 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Coin", - (gogoproto.nullable) = false - ]; -} +syntax = "proto3"; +package kira.spending; + +import "gogoproto/gogo.proto"; +import "google/protobuf/timestamp.proto"; +import "google/protobuf/any.proto"; +import "cosmos_proto/cosmos.proto"; +import "kira/spending/pool.proto"; + +option go_package = "github.com/KiraCore/sekai/x/spending/types"; + +// proposal-spending-pool-update - a function to create a proposal allowing +// modification of the existing spending pool, adding owners, beneficiaries, +// or otherwise editing any of the existing properties. +message UpdateSpendingPoolProposal { + option (cosmos_proto.implements_interface) = "Content"; + option (gogoproto.equal) = true; + + string name = 1; + uint64 claim_start = 2; + uint64 claim_end = 3; + repeated string rates = 4 [ + (gogoproto.moretags) = "yaml:\"rates\"", + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.DecCoin", + (gogoproto.nullable) = false + ]; + string vote_quorum = 5 [ + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", + (gogoproto.nullable) = false + ]; // percentage, # default: 51% + uint64 vote_period = 6; // seconds, # default: 600s + uint64 vote_enactment = 7; // seconds, # default: 300s + kira.spending.PermInfo owners = 8 [ (gogoproto.nullable) = false ]; + kira.spending.WeightedPermInfo beneficiaries = 9 [ (gogoproto.nullable) = false ]; + bool dynamic_rate = 10; + uint64 dynamic_rate_period = 11; +} + +// SpendingPoolDistributionProposal - force distribution of tokens to all +// beneficiaries registered in the claims array (this function should be +// automatically triggered before upgrades are executed) +message SpendingPoolDistributionProposal { + option (cosmos_proto.implements_interface) = "Content"; + option (gogoproto.equal) = true; + + string pool_name = 1; +} + +// SpendingPoolWithdrawProposal - proposal allowing withdrawal of funds +// from the pool to one or many specified accounts. Withdrawal should only +// be possible if the receiving account/s are on the list of registered +// beneficiaries. +message SpendingPoolWithdrawProposal { + option (cosmos_proto.implements_interface) = "Content"; + option (gogoproto.equal) = true; + + string pool_name = 1; + repeated string beneficiaries = 2; + repeated string amounts = 3 [ + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Coin", + (gogoproto.nullable) = false + ]; +} diff --git a/proto/kira/spending/tx.proto b/proto/kira/spending/tx.proto index 8a002eceb..668afb4da 100644 --- a/proto/kira/spending/tx.proto +++ b/proto/kira/spending/tx.proto @@ -1,78 +1,81 @@ -syntax = "proto3"; -package kira.spending; - -import "gogoproto/gogo.proto"; -import "google/protobuf/timestamp.proto"; -import "kira/spending/pool.proto"; - -option go_package = "github.com/KiraCore/sekai/x/spending/types"; - -// Msg defines the spending Msg service. -service Msg { - // spending-pool-create- a function to allow creating a new spending pool. - // This function can be sent by any account. The person sending the transaction automatically becomes the pool owner. - // The original owner should provide a unique pool name when sending create tx. - rpc CreateSpendingPool(MsgCreateSpendingPool) returns (MsgCreateSpendingPoolResponse); - // spending-pool-deposit - a function to allow depositing tokens to the pool address (name). - // Any KIRA address should be able to call this function and deposit tokens. - rpc DepositSpendingPool(MsgDepositSpendingPool) returns (MsgDepositSpendingPoolResponse); - - // spending-pool-register - a function to register beneficiary account to be - // eligible for claims - rpc RegisterSpendingPoolBeneficiary(MsgRegisterSpendingPoolBeneficiary) returns (MsgRegisterSpendingPoolBeneficiaryResponse); - - // spending-pool-claim - a function to allow claiming tokens from the pool. - // Only beneficiaries should be able to send this transaction. - // Funds can be claimed only for the period between current bloct time and value set in the claims property in accordance to the current distribution rate. If the pool doesn't have a sufficient balance of a specific token as defined by tokens property then that specific token should NOT be sent in any amount. If the pool has sufficient funds as defined by the amount in the tokens property then exact amount owed should be sent to the beneficiary. All tokens that can be sent should be sent all at once to the account that is claiming them. If the claim expiration period elapsed and funds were NOT claimed by the beneficiary then the funds will NOT be sent. Beneficiary will only receive tokens if he already registered and his account is present in the claims array. Claiming of specific token should be only possible if and only if the spending pool has sufficient funds to distribute funds to ALL accounts eligible for claiming them (either all eligible accounts can claim a specific token or no one). - rpc ClaimSpendingPool(MsgClaimSpendingPool) returns (MsgClaimSpendingPoolResponse); -} - -message MsgCreateSpendingPool { - string name = 1; - // claim-start & claim-end - defines the exact time period (Unix timestamps) between which tokens can be claimed from the pool, allowing for a precise funds distribution. - uint64 claim_start = 2; - uint64 claim_end = 3; - uint64 claim_expiry = 4; - // rate of distribution in the smallest token denomination per 1 second (this value can be a float number, smaller than actual denomination) - repeated string rates = 5 [ - (gogoproto.moretags) = "yaml:\"rates\"", - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.DecCoin", - (gogoproto.nullable) = false - ]; - // pool specific % of owner accounts that must vote YES or NO for any of the pool proposals to be valid. - uint64 vote_quorum = 6; // percentage, # default: 51% - // period of time in seconds that any of the pool proposals must last before passing or being rejected - uint64 vote_period = 7; // seconds, # default: 600s - // period of time that must pass before any of the pool proposal is enacted - uint64 vote_enactment = 8; // seconds, # default: 300s - // defines a list of accounts/roles controlling the spending pool via “governance-like” proposals - PermInfo owners = 9 [ (gogoproto.nullable) = false ]; - // defines set of accounts/roles to which funds can be distributed - WeightedPermInfo beneficiaries = 10 [ (gogoproto.nullable) = false ]; - string sender = 11; - bool dynamic_rate = 12; - uint64 dynamic_rate_period = 13; -} -message MsgCreateSpendingPoolResponse {} - -message MsgDepositSpendingPool { - string sender = 1; - string pool_name = 2; - repeated string amount = 3 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Coin", - (gogoproto.nullable) = false - ]; -} -message MsgDepositSpendingPoolResponse {} - -message MsgRegisterSpendingPoolBeneficiary { - string sender = 1; - string pool_name = 2; -} -message MsgRegisterSpendingPoolBeneficiaryResponse {} - -message MsgClaimSpendingPool { - string sender = 1; - string pool_name = 2; -} -message MsgClaimSpendingPoolResponse {} +syntax = "proto3"; +package kira.spending; + +import "gogoproto/gogo.proto"; +import "google/protobuf/timestamp.proto"; +import "kira/spending/pool.proto"; + +option go_package = "github.com/KiraCore/sekai/x/spending/types"; + +// Msg defines the spending Msg service. +service Msg { + // spending-pool-create- a function to allow creating a new spending pool. + // This function can be sent by any account. The person sending the transaction automatically becomes the pool owner. + // The original owner should provide a unique pool name when sending create tx. + rpc CreateSpendingPool(MsgCreateSpendingPool) returns (MsgCreateSpendingPoolResponse); + // spending-pool-deposit - a function to allow depositing tokens to the pool address (name). + // Any KIRA address should be able to call this function and deposit tokens. + rpc DepositSpendingPool(MsgDepositSpendingPool) returns (MsgDepositSpendingPoolResponse); + + // spending-pool-register - a function to register beneficiary account to be + // eligible for claims + rpc RegisterSpendingPoolBeneficiary(MsgRegisterSpendingPoolBeneficiary) returns (MsgRegisterSpendingPoolBeneficiaryResponse); + + // spending-pool-claim - a function to allow claiming tokens from the pool. + // Only beneficiaries should be able to send this transaction. + // Funds can be claimed only for the period between current bloct time and value set in the claims property in accordance to the current distribution rate. If the pool doesn't have a sufficient balance of a specific token as defined by tokens property then that specific token should NOT be sent in any amount. If the pool has sufficient funds as defined by the amount in the tokens property then exact amount owed should be sent to the beneficiary. All tokens that can be sent should be sent all at once to the account that is claiming them. If the claim expiration period elapsed and funds were NOT claimed by the beneficiary then the funds will NOT be sent. Beneficiary will only receive tokens if he already registered and his account is present in the claims array. Claiming of specific token should be only possible if and only if the spending pool has sufficient funds to distribute funds to ALL accounts eligible for claiming them (either all eligible accounts can claim a specific token or no one). + rpc ClaimSpendingPool(MsgClaimSpendingPool) returns (MsgClaimSpendingPoolResponse); +} + +message MsgCreateSpendingPool { + string name = 1; + // claim-start & claim-end - defines the exact time period (Unix timestamps) between which tokens can be claimed from the pool, allowing for a precise funds distribution. + uint64 claim_start = 2; + uint64 claim_end = 3; + uint64 claim_expiry = 4; + // rate of distribution in the smallest token denomination per 1 second (this value can be a float number, smaller than actual denomination) + repeated string rates = 5 [ + (gogoproto.moretags) = "yaml:\"rates\"", + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.DecCoin", + (gogoproto.nullable) = false + ]; + // pool specific % of owner accounts that must vote YES or NO for any of the pool proposals to be valid. + string vote_quorum = 6 [ + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", + (gogoproto.nullable) = false + ]; // percentage, # default: 51% + // period of time in seconds that any of the pool proposals must last before passing or being rejected + uint64 vote_period = 7; // seconds, # default: 600s + // period of time that must pass before any of the pool proposal is enacted + uint64 vote_enactment = 8; // seconds, # default: 300s + // defines a list of accounts/roles controlling the spending pool via “governance-like” proposals + PermInfo owners = 9 [ (gogoproto.nullable) = false ]; + // defines set of accounts/roles to which funds can be distributed + WeightedPermInfo beneficiaries = 10 [ (gogoproto.nullable) = false ]; + string sender = 11; + bool dynamic_rate = 12; + uint64 dynamic_rate_period = 13; +} +message MsgCreateSpendingPoolResponse {} + +message MsgDepositSpendingPool { + string sender = 1; + string pool_name = 2; + repeated string amount = 3 [ + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Coin", + (gogoproto.nullable) = false + ]; +} +message MsgDepositSpendingPoolResponse {} + +message MsgRegisterSpendingPoolBeneficiary { + string sender = 1; + string pool_name = 2; +} +message MsgRegisterSpendingPoolBeneficiaryResponse {} + +message MsgClaimSpendingPool { + string sender = 1; + string pool_name = 2; +} +message MsgClaimSpendingPoolResponse {} diff --git a/proto/kira/tokens/alias.proto b/proto/kira/tokens/alias.proto index 3afa59816..e69de29bb 100644 --- a/proto/kira/tokens/alias.proto +++ b/proto/kira/tokens/alias.proto @@ -1,28 +0,0 @@ -syntax = "proto3"; -package kira.tokens; - -import "gogoproto/gogo.proto"; - -option go_package = "github.com/KiraCore/sekai/x/tokens/types"; - -message TokenAlias { - string symbol = 1;// Ticker (eg. ATOM, KEX, BTC) - string name = 2; // Token Name (e.g. Cosmos, Kira, Bitcoin) - string icon = 3; // Graphical Symbol (url link to graphics) - uint32 decimals = 4; // Integer number of max decimals - repeated string denoms = 5; // An array of token denoms to be aliased - bool invalidated = 6; // flag that the token is invalidated or not -} - -message MsgUpsertTokenAlias { - string symbol = 1;// Ticker (eg. ATOM, KEX, BTC) - string name = 2; // Token Name (e.g. Cosmos, Kira, Bitcoin) - string icon = 3; // Graphical Symbol (url link to graphics) - uint32 decimals = 4; // Integer number of max decimals - repeated string denoms = 5; // An array of token denoms to be aliased - bool invalidated = 6; // flag that the token is invalidated or not - bytes proposer = 7 [ - (gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress", - (gogoproto.moretags) = "yaml:\"proposer\"" - ]; -} diff --git a/proto/kira/tokens/genesis.proto b/proto/kira/tokens/genesis.proto index 1d405fe25..785b08796 100644 --- a/proto/kira/tokens/genesis.proto +++ b/proto/kira/tokens/genesis.proto @@ -1,14 +1,13 @@ -syntax = "proto3"; -package kira.tokens; - -import "kira/tokens/alias.proto"; -import "kira/tokens/rate.proto"; -import "kira/tokens/freeze.proto"; - -option go_package = "github.com/KiraCore/sekai/x/tokens/types"; - -message GenesisState { - repeated kira.tokens.TokenAlias aliases = 1; - repeated kira.tokens.TokenRate rates = 2; - TokensWhiteBlack tokenBlackWhites = 3; -} +syntax = "proto3"; +package kira.tokens; + +import "gogoproto/gogo.proto"; +import "kira/tokens/token.proto"; +import "kira/tokens/freeze.proto"; + +option go_package = "github.com/KiraCore/sekai/x/tokens/types"; + +message GenesisState { + repeated kira.tokens.TokenInfo tokenInfos = 1 [ (gogoproto.nullable) = false ]; + TokensWhiteBlack tokenBlackWhites = 2 [ (gogoproto.nullable) = false ]; +} diff --git a/proto/kira/tokens/proposal.proto b/proto/kira/tokens/proposal.proto index 2744d74fa..99f627780 100644 --- a/proto/kira/tokens/proposal.proto +++ b/proto/kira/tokens/proposal.proto @@ -1,45 +1,56 @@ -syntax = "proto3"; -package kira.tokens; - -import "gogoproto/gogo.proto"; -import "cosmos_proto/cosmos.proto"; - -option go_package = "github.com/KiraCore/sekai/x/tokens/types"; - - -message ProposalUpsertTokenAlias { - option (cosmos_proto.implements_interface) = "Content"; - option (gogoproto.equal) = true; - - string symbol = 1; - string name = 2; - string icon = 3; - uint32 decimals = 4; - repeated string denoms = 5; - bool invalidated = 6; -} - -message ProposalUpsertTokenRates { - option (cosmos_proto.implements_interface) = "Content"; - option (gogoproto.equal) = true; - - string denom = 1; // denomination target - string rate = 2 [ - (gogoproto.moretags) = "yaml:\"rate\"", - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; // Exchange rate in terms of KEX token - bool fee_payments = 3; // Properties defining if it is enabled or disabled as fee payment methodß - string stake_cap = 4 [ - (gogoproto.moretags) = "yaml:\"stake_cap\"", - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; // rewards cap, sum should be lower than 100% - string stake_min = 5 [ - (gogoproto.moretags) = "yaml:\"stake_min\"", - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", - (gogoproto.nullable) = false - ]; - bool stake_token = 6; - bool invalidated = 7; -} +syntax = "proto3"; +package kira.tokens; + +import "gogoproto/gogo.proto"; +import "cosmos_proto/cosmos.proto"; + +option go_package = "github.com/KiraCore/sekai/x/tokens/types"; + +message ProposalUpsertTokenInfo { + option (cosmos_proto.implements_interface) = "Content"; + option (gogoproto.equal) = true; + + string denom = 1; // denomination target + string token_type = 2; // Token Type / Compatibility (can NOT be changed or owner defined) + string fee_rate = 3 [ + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", + (gogoproto.nullable) = false + ]; // Exchange rate in terms of KEX token + bool fee_enabled = 4; // Properties defining if it is enabled or disabled as fee payment method + string supply = 5 [ + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", + (gogoproto.nullable) = false + ]; // current circulating supply can NOT be more then CAP + string supply_cap = 6 [ + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", + (gogoproto.nullable) = false + ]; // maximum supply that can be issued, max 2^256 - 1, (can NOT be INCREASED or decreased below current circulatin supply) + string stake_cap = 7 [ + (gogoproto.moretags) = "yaml:\"stake_cap\"", + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", + (gogoproto.nullable) = false + ]; // rewards cap, sum should be lower than 100% + string stake_min = 8 [ + (gogoproto.moretags) = "yaml:\"stake_min\"", + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", + (gogoproto.nullable) = false + ]; + bool stake_enabled = 9; + bool inactive = 10; // flag that the token is inactive or not + string symbol = 11; // Ticker (eg. ATOM, KEX, BTC) + string name = 12; // Token Name (e.g. Cosmos, Kira, Bitcoin) + string icon = 13; // Graphical Symbol (url link to graphics) + uint32 decimals = 14; // Integer number of max decimals, min 0, max 255, (can NOT be changed) + string description = 15; // 512 chars max, (can be changed by owner or proposal-upsert-alias) + string website = 16; // url 256 chars max, (can be changed by owner or proposal-upsert-alias) + string social = 17; // url 256 chars max, (can be changed by owner or proposal-upsert-alias) + uint64 holders = 18; + string minting_fee = 19 [ + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", + (gogoproto.nullable) = false + ]; // cost of minting 10^decimals per X ukex, can only increase (can be changed by owner only) + string owner = 20; // owner address or "" if noone should be able to modify most important properties + bool owner_edit_disabled = 21; // owner is disabled to edit token info + string nft_metadata = 22; // metadata url or CID + string nft_hash = 23; // hexadecimal metadata checksum +} diff --git a/proto/kira/tokens/query.proto b/proto/kira/tokens/query.proto index 120cdf972..bf0151ad5 100644 --- a/proto/kira/tokens/query.proto +++ b/proto/kira/tokens/query.proto @@ -1,79 +1,56 @@ syntax = "proto3"; package kira.tokens; -import "kira/tokens/alias.proto"; -import "kira/tokens/rate.proto"; +import "kira/tokens/token.proto"; import "kira/tokens/freeze.proto"; import "gogoproto/gogo.proto"; import "google/api/annotations.proto"; +import "cosmos/base/v1beta1/coin.proto"; option go_package = "github.com/KiraCore/sekai/x/tokens/types"; // Query defines the gRPC querier service service Query { - // Returns the token alias - rpc GetTokenAlias (TokenAliasRequest) returns (TokenAliasResponse) {} - rpc GetAllTokenAliases (AllTokenAliasesRequest) returns (AllTokenAliasesResponse) { - option (google.api.http).get = "/kira/tokens/aliases"; + // Returns the token infos + rpc GetTokenInfo (TokenInfoRequest) returns (TokenInfoResponse) { + option (google.api.http).get = "/kira/tokens/info"; } - rpc GetTokenAliasesByDenom (TokenAliasesByDenomRequest) returns (TokenAliasesByDenomResponse) {} - // Returns the token rates - rpc GetTokenRate (TokenRateRequest) returns (TokenRateResponse) {} - rpc GetAllTokenRates (AllTokenRatesRequest) returns (AllTokenRatesResponse) { - option (google.api.http).get = "/kira/tokens/rates"; + rpc GetAllTokenInfos (AllTokenInfosRequest) returns (AllTokenInfosResponse) { + option (google.api.http).get = "/kira/tokens/infos"; + } + rpc GetTokenInfosByDenom (TokenInfosByDenomRequest) returns (TokenInfosByDenomResponse) { + option (google.api.http).get = "/kira/tokens/infos_by_denom"; } - rpc GetTokenRatesByDenom (TokenRatesByDenomRequest) returns (TokenRatesByDenomResponse) {} // Returns tokens black/white lists - rpc GetTokenBlackWhites (TokenBlackWhitesRequest) returns (TokenBlackWhitesResponse) {} -} - -message TokenAliasRequest { - string symbol = 1; -} - -message TokenAliasResponse { - kira.tokens.TokenAlias data = 1; -} - -message AllTokenAliasesRequest {} - -message AllTokenAliasesResponse { - repeated kira.tokens.TokenAlias data = 1; - string default_denom = 2; - string bech32_prefix = 3; -} - -message TokenAliasesByDenomRequest { - repeated string denoms = 1; -} - -message TokenAliasesByDenomResponse { - map data = 1; + rpc GetTokenBlackWhites (TokenBlackWhitesRequest) returns (TokenBlackWhitesResponse) { + option (google.api.http).get = "/kira/tokens/black_whites"; + } } -message TokenRateRequest { +message TokenInfoRequest { string denom = 1; } -message TokenRateResponse { - kira.tokens.TokenRate data = 1; +message TokenInfoResponse { + kira.tokens.TokenInfo data = 1; + cosmos.base.v1beta1.Coin supply = 2 [(gogoproto.nullable) = false]; } -message AllTokenRatesRequest {} +message AllTokenInfosRequest {} -message AllTokenRatesResponse { - repeated kira.tokens.TokenRate data = 1; +message AllTokenInfosResponse { + repeated TokenInfoResponse data = 1 [ (gogoproto.nullable) = false ]; } -message TokenRatesByDenomRequest { +message TokenInfosByDenomRequest { repeated string denoms = 1; } -message TokenRatesByDenomResponse { - map data = 1; +message TokenInfosByDenomResponse { + map data = 1 [ (gogoproto.nullable) = false ]; } message TokenBlackWhitesRequest {} message TokenBlackWhitesResponse { - TokensWhiteBlack data = 1; + TokensWhiteBlack data = 1 [ (gogoproto.nullable) = false ]; } \ No newline at end of file diff --git a/proto/kira/tokens/rate.proto b/proto/kira/tokens/rate.proto index 7464e760b..e69de29bb 100644 --- a/proto/kira/tokens/rate.proto +++ b/proto/kira/tokens/rate.proto @@ -1,54 +0,0 @@ -syntax = "proto3"; -package kira.tokens; - -import "gogoproto/gogo.proto"; - -option go_package = "github.com/KiraCore/sekai/x/tokens/types"; - -message TokenRate { - string denom = 1; // denomination target - string fee_rate = 2 [ - (gogoproto.moretags) = "yaml:\"fee_rate\"", - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; // Exchange rate in terms of KEX token - bool fee_payments = 3; // Properties defining if it is enabled or disabled as fee payment method - string stake_cap = 4 [ - (gogoproto.moretags) = "yaml:\"stake_cap\"", - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; // rewards cap, sum should be lower than 100% - string stake_min = 5 [ - (gogoproto.moretags) = "yaml:\"stake_min\"", - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", - (gogoproto.nullable) = false - ]; - bool stake_token = 6; - bool invalidated = 7; // flag that the token is invalidated or not -} - -message MsgUpsertTokenRate { - string denom = 1; // denomination target - string rate = 2 [ - (gogoproto.moretags) = "yaml:\"rate\"", - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; // Exchange rate in terms of KEX token - bool fee_payments = 3; // Properties defining if it is enabled or disabled as fee payment method - string stake_cap = 4 [ - (gogoproto.moretags) = "yaml:\"stake_cap\"", - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; // rewards cap, sum should be lower than 100% - string stake_min = 5 [ - (gogoproto.moretags) = "yaml:\"stake_min\"", - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", - (gogoproto.nullable) = false - ]; - bool stake_token = 6; - bool invalidated = 7; // flag that the token is invalidated or not - bytes proposer = 8 [ - (gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress", - (gogoproto.moretags) = "yaml:\"proposer\"" - ]; -} diff --git a/proto/kira/tokens/token.proto b/proto/kira/tokens/token.proto new file mode 100644 index 000000000..540903268 --- /dev/null +++ b/proto/kira/tokens/token.proto @@ -0,0 +1,52 @@ +syntax = "proto3"; +package kira.tokens; + +import "gogoproto/gogo.proto"; + +option go_package = "github.com/KiraCore/sekai/x/tokens/types"; + +message TokenInfo { + string denom = 1; // denomination target + string token_type = 2; // Token Type / Compatibility (can NOT be changed or owner defined) + string fee_rate = 3 [ + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", + (gogoproto.nullable) = false + ]; // Exchange rate in terms of KEX token + bool fee_enabled = 4; // Properties defining if it is enabled or disabled as fee payment method + string supply = 5 [ + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", + (gogoproto.nullable) = false + ]; // current circulating supply can NOT be more then CAP + string supply_cap = 6 [ + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", + (gogoproto.nullable) = false + ]; // maximum supply that can be issued, max 2^256 - 1, (can NOT be INCREASED or decreased below current circulatin supply) + string stake_cap = 7 [ + (gogoproto.moretags) = "yaml:\"stake_cap\"", + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", + (gogoproto.nullable) = false + ]; // rewards cap, sum should be lower than 100% + string stake_min = 8 [ + (gogoproto.moretags) = "yaml:\"stake_min\"", + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", + (gogoproto.nullable) = false + ]; + bool stake_enabled = 9; + bool inactive = 10; // flag that the token is inactive or not + string symbol = 11; // Ticker (eg. ATOM, KEX, BTC) + string name = 12; // Token Name (e.g. Cosmos, Kira, Bitcoin) + string icon = 13; // Graphical Symbol (url link to graphics) + uint32 decimals = 14; // Integer number of max decimals, min 0, max 255, (can NOT be changed) + string description = 15; // 512 chars max, (can be changed by owner or proposal-upsert-alias) + string website = 16; // url 256 chars max, (can be changed by owner or proposal-upsert-alias) + string social = 17; // url 256 chars max, (can be changed by owner or proposal-upsert-alias) + uint64 holders = 18; + string minting_fee = 19 [ + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", + (gogoproto.nullable) = false + ]; // cost of minting 10^decimals per X ukex, can only increase (can be changed by owner only) + string owner = 20; // owner address or "" if noone should be able to modify most important properties + bool owner_edit_disabled = 21; // owner is disabled to edit token info + string nft_metadata = 22; // metadata url or CID + string nft_hash = 23; // hexadecimal metadata checksum +} diff --git a/proto/kira/tokens/tx.proto b/proto/kira/tokens/tx.proto index 23c160ebc..dd1bf6a86 100644 --- a/proto/kira/tokens/tx.proto +++ b/proto/kira/tokens/tx.proto @@ -1,22 +1,78 @@ -syntax = "proto3"; -package kira.tokens; - -import "gogoproto/gogo.proto"; - -import "kira/tokens/alias.proto"; -import "kira/tokens/proposal.proto"; -import "kira/tokens/rate.proto"; -import "kira/tokens/freeze.proto"; - -option go_package = "github.com/KiraCore/sekai/x/tokens/types"; - -// Msg defines the tokens Msg service. -service Msg { - // UpsertTokenAlias defines a method to upsert token alias - rpc UpsertTokenAlias(MsgUpsertTokenAlias) returns (MsgUpsertTokenAliasResponse); - // UpsertTokenRate defines a method to upsert token rate - rpc UpsertTokenRate(MsgUpsertTokenRate) returns (MsgUpsertTokenRateResponse); -} - -message MsgUpsertTokenAliasResponse {} -message MsgUpsertTokenRateResponse {} +syntax = "proto3"; +package kira.tokens; + +import "gogoproto/gogo.proto"; + +import "kira/tokens/proposal.proto"; +import "kira/tokens/token.proto"; +import "kira/tokens/freeze.proto"; + +option go_package = "github.com/KiraCore/sekai/x/tokens/types"; + +// Msg defines the tokens Msg service. +service Msg { + // UpsertTokenInfo defines a method to upsert token rate + rpc UpsertTokenInfo(MsgUpsertTokenInfo) returns (MsgUpsertTokenInfoResponse); + // EthereumTx defines a method to send ethereum transaction + rpc EthereumTx(MsgEthereumTx) returns (MsgEthereumTxResponse); +} + +message MsgUpsertTokenInfo { + string denom = 1; // denomination target + string token_type = 2; // Token Type / Compatibility (can NOT be changed or owner defined) + string fee_rate = 3 [ + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", + (gogoproto.nullable) = false + ]; // Exchange rate in terms of KEX token + bool fee_enabled = 4; // Properties defining if it is enabled or disabled as fee payment method + string supply = 5 [ + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", + (gogoproto.nullable) = false + ]; // current circulating supply can NOT be more then CAP + string supply_cap = 6 [ + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", + (gogoproto.nullable) = false + ]; // maximum supply that can be issued, max 2^256 - 1, (can NOT be INCREASED or decreased below current circulatin supply) + string stake_cap = 7 [ + (gogoproto.moretags) = "yaml:\"stake_cap\"", + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", + (gogoproto.nullable) = false + ]; // rewards cap, sum should be lower than 100% + string stake_min = 8 [ + (gogoproto.moretags) = "yaml:\"stake_min\"", + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", + (gogoproto.nullable) = false + ]; + bool stake_enabled = 9; + bool inactive = 10; // flag that the token is inactive or not + string symbol = 11; // Ticker (eg. ATOM, KEX, BTC) + string name = 12; // Token Name (e.g. Cosmos, Kira, Bitcoin) + string icon = 13; // Graphical Symbol (url link to graphics) + uint32 decimals = 14; // Integer number of max decimals, min 0, max 255, (can NOT be changed) + string description = 15; // 512 chars max, (can be changed by owner or proposal-upsert-alias) + string website = 16; // url 256 chars max, (can be changed by owner or proposal-upsert-alias) + string social = 17; // url 256 chars max, (can be changed by owner or proposal-upsert-alias) + uint64 holders = 18; + string minting_fee = 19 [ + (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", + (gogoproto.nullable) = false + ]; // cost of minting 10^decimals per X ukex, can only increase (can be changed by owner only) + string owner = 20; // owner address or "" if noone should be able to modify most important properties + bool owner_edit_disabled = 21; // owner is disabled to edit token info + string nft_metadata = 22; // metadata url or CID + string nft_hash = 23; // hexadecimal metadata checksum + bytes proposer = 24 [ + (gogoproto.casttype) = "github.com/cosmos/cosmos-sdk/types.AccAddress", + (gogoproto.moretags) = "yaml:\"proposer\"" + ]; +} + +message MsgUpsertTokenInfoResponse {} + +message MsgEthereumTx { + string tx_type = 1; + string sender = 2; + string hash = 3; + bytes data = 4; +} +message MsgEthereumTxResponse {} diff --git a/scripts/commands/foreign-fee-payments-failure-return.sh b/scripts/commands/foreign-fee-payments-failure-return.sh index 738f0fc50..a9e4fcf2f 100644 --- a/scripts/commands/foreign-fee-payments-failure-return.sh +++ b/scripts/commands/foreign-fee-payments-failure-return.sh @@ -1,7 +1,7 @@ #!/bin/bash # register stake token as 1ukex=100stake -sekaid tx customgov permission whitelist --from validator --keyring-backend=test --permission=$PermUpsertTokenRate --addr=$(sekaid keys show -a validator --keyring-backend=test --home=$HOME/.sekaid) --chain-id=testing --fees=100ukex --home=$HOME/.sekaid --yes +sekaid tx customgov permission whitelist --from validator --keyring-backend=test --permission=$PermUpsertTokenInfo --addr=$(sekaid keys show -a validator --keyring-backend=test --home=$HOME/.sekaid) --chain-id=testing --fees=100ukex --home=$HOME/.sekaid --yes sekaid tx tokens upsert-rate --from validator --keyring-backend=test --denom="stake" --rate="0.01" --fee_payments=true --chain-id=testing --fees=100ukex --home=$HOME/.sekaid --yes sekaid query tokens rate stake @@ -20,6 +20,6 @@ sekaid query bank balances $(sekaid keys show -a validator --keyring-backend=tes # try upsert-token-alias failure in foreign currency sekaid tx tokens upsert-alias --from validator --keyring-backend=test --expiration=0 --enactment=0 --allowed_vote_types=0,1 --symbol="ETH" --name="Ethereum" --icon="myiconurl" --decimals=6 --denoms="finney" --chain-id=testing --fees=500000stake --home=$HOME/.sekaid --yes # set permission for this execution -sekaid tx customgov permission whitelist --from validator --keyring-backend=test --permission=$PermUpsertTokenAlias --addr=$(sekaid keys show -a validator --keyring-backend=test --home=$HOME/.sekaid) --chain-id=testing --fees=10000stake --home=$HOME/.sekaid --yes +sekaid tx customgov permission whitelist --from validator --keyring-backend=test --permission=$PermUpsertTokenInfo --addr=$(sekaid keys show -a validator --keyring-backend=test --home=$HOME/.sekaid) --chain-id=testing --fees=10000stake --home=$HOME/.sekaid --yes # try upsert-token-alias success in foreign currency sekaid tx tokens upsert-alias --from validator --keyring-backend=test --expiration=0 --enactment=0 --allowed_vote_types=0,1 --symbol="ETH" --name="Ethereum" --icon="myiconurl" --decimals=6 --denoms="finney" --chain-id=testing --fees=500000stake --home=$HOME/.sekaid --yes \ No newline at end of file diff --git a/scripts/commands/foreign-fee-payments.sh b/scripts/commands/foreign-fee-payments.sh index 2da22c20c..5930f9c18 100644 --- a/scripts/commands/foreign-fee-payments.sh +++ b/scripts/commands/foreign-fee-payments.sh @@ -1,8 +1,8 @@ #!/bin/bash # register stake token as 1ukex=100stake -PermUpsertTokenRate=8 -sekaid tx customgov permission whitelist-permission --from validator --keyring-backend=test --permission=$PermUpsertTokenRate --addr=$(sekaid keys show -a validator --keyring-backend=test --home=$HOME/.sekaid) --chain-id=testing --fees=100ukex --home=$HOME/.sekaid --yes +PermUpsertTokenInfo=8 +sekaid tx customgov permission whitelist-permission --from validator --keyring-backend=test --permission=$PermUpsertTokenInfo --addr=$(sekaid keys show -a validator --keyring-backend=test --home=$HOME/.sekaid) --chain-id=testing --fees=100ukex --home=$HOME/.sekaid --yes sekaid tx tokens upsert-rate --from validator --keyring-backend=test --denom="stake" --rate="0.01" --fee_payments=true --chain-id=testing --fees=100ukex --home=$HOME/.sekaid --yes sekaid query tokens rate stake # try to spend stake token as fee diff --git a/scripts/commands/governance/poor-network-messages.sh b/scripts/commands/governance/poor-network-messages.sh index 4aa90d753..ff46c394f 100644 --- a/scripts/commands/governance/poor-network-messages.sh +++ b/scripts/commands/governance/poor-network-messages.sh @@ -20,7 +20,7 @@ sekaid tx customgov permission whitelist --from validator --keyring-backend=test # test poor network messages after modifying min_validators section sekaid tx customgov set-network-properties --from validator --min_validators="2" --keyring-backend=test --chain-id=testing --fees=100ukex --home=$HOME/.sekaid --yes # set permission for upsert token rate -sekaid tx customgov permission whitelist --from validator --keyring-backend=test --permission=$PermUpsertTokenRate --addr=$(sekaid keys show -a validator --keyring-backend=test --home=$HOME/.sekaid) --chain-id=testing --fees=100ukex --home=$HOME/.sekaid --yes +sekaid tx customgov permission whitelist --from validator --keyring-backend=test --permission=$PermUpsertTokenInfo --addr=$(sekaid keys show -a validator --keyring-backend=test --home=$HOME/.sekaid) --chain-id=testing --fees=100ukex --home=$HOME/.sekaid --yes # try running upsert token rate which is not allowed on poor network sekaid tx tokens upsert-rate --from validator --keyring-backend=test --denom="mykex" --rate="1.5" --fee_payments=true --chain-id=testing --fees=100ukex --home=$HOME/.sekaid --yes # try sending more than allowed amount via bank send diff --git a/scripts/commands/layer2.sh b/scripts/commands/layer2.sh index 4c43209a5..71101f95e 100644 --- a/scripts/commands/layer2.sh +++ b/scripts/commands/layer2.sh @@ -11,7 +11,7 @@ sekaid tx layer2 create-dapp-proposal --dapp-name="l2dex" --denom="ul2d" --dapp- --website="website" --logo="logo" --social="social" --docs="docs" \ --controller-roles="1" --controller-accounts="" --vote-quorum=30 --vote-period=86400 --vote-enactment=1000 \ --bond="1000000ukex" \ - --issurance-config='{"premint":"10000","postmint":"10000","time":"1680044405"}' \ + --issuance-config='{"premint":"10000","postmint":"10000","time":"1680044405"}' \ --lp-pool-config='{"ratio": "1.0", "drip": 86400}' \ --executors-min=1 --executors-max=3 --verifiers-min=1 \ --binary-info='{"name":"layer2dex","hash":"0cc0","source":"github.com","reference":"","type":"exec"}' \ @@ -56,7 +56,7 @@ sekaid tx layer2 proposal-upsert-dapp --title="title" --description="description --website="website" --logo="logo" --social="social" --docs="docs" \ --controller-roles="1" --controller-accounts="" --vote-quorum=30 --vote-period=86400 --vote-enactment=1000 \ --bond="1000000ukex" \ - --issurance-config='{"premint":"10000","postmint":"10000","time":"1680044405"}' \ + --issuance-config='{"premint":"10000","postmint":"10000","time":"1680044405"}' \ --lp-pool-config='{"ratio": "1.0", "drip": 86400}' \ --binary-info='{"name":"layer2dex","hash":"0cc0","source":"github.com","reference":"","type":"exec"}' \ --from=validator --chain-id=testing --fees=100ukex --keyring-backend=test --home=$HOME/.sekaid --yes --broadcast-mode=block diff --git a/scripts/commands/upsert-token-alias.sh b/scripts/commands/upsert-token-alias.sh index b75e88247..da4e69572 100644 --- a/scripts/commands/upsert-token-alias.sh +++ b/scripts/commands/upsert-token-alias.sh @@ -1,6 +1,6 @@ #!/bin/bash -# set PermUpsertTokenAlias permission to validator address -sekaid tx customgov permission whitelist --from validator --keyring-backend=test --permission=$PermUpsertTokenAlias --addr=$(sekaid keys show -a validator --keyring-backend=test --home=$HOME/.sekaid) --chain-id=testing --fees=100ukex --home=$HOME/.sekaid --yes +# set PermUpsertTokenInfo permission to validator address +sekaid tx customgov permission whitelist --from validator --keyring-backend=test --permission=$PermUpsertTokenInfo --addr=$(sekaid keys show -a validator --keyring-backend=test --home=$HOME/.sekaid) --chain-id=testing --fees=100ukex --home=$HOME/.sekaid --yes # run upsert alias sekaid tx tokens upsert-alias --from validator --keyring-backend=test --expiration=0 --enactment=0 --allowed_vote_types=0,1 --symbol="ETH" --name="Ethereum" --icon="myiconurl" --decimals=6 --denoms="finney" --chain-id=testing --fees=100ukex --home=$HOME/.sekaid --yes \ No newline at end of file diff --git a/scripts/commands/upsert-token-rates.sh b/scripts/commands/upsert-token-rates.sh index ad74e1431..65c21c097 100644 --- a/scripts/commands/upsert-token-rates.sh +++ b/scripts/commands/upsert-token-rates.sh @@ -1,6 +1,6 @@ #!/bin/bash -# set PermUpsertTokenRate permission to validator address -sekaid tx customgov permission whitelist --from=validator --keyring-backend=test --permission=$PermUpsertTokenRate --addr=$(sekaid keys show -a validator --keyring-backend=test --home=$HOME/.sekaid) --chain-id=testing --fees=100ukex --home=$HOME/.sekaid --yes --broadcast-mode=block +# set PermUpsertTokenInfo permission to validator address +sekaid tx customgov permission whitelist --from=validator --keyring-backend=test --permission=$PermUpsertTokenInfo --addr=$(sekaid keys show -a validator --keyring-backend=test --home=$HOME/.sekaid) --chain-id=testing --fees=100ukex --home=$HOME/.sekaid --yes --broadcast-mode=block # run upsert rate sekaid tx tokens upsert-rate --from=validator --keyring-backend=test --denom="mykex" --rate="1.5" --fee_payments=true --stake_cap=0.1 --stake_token=true --stake_min=1 --chain-id=testing --fees=100ukex --home=$HOME/.sekaid --yes --broadcast-mode=block \ No newline at end of file diff --git a/scripts/sbuild.sh b/scripts/sbuild.sh new file mode 100755 index 000000000..3e2709b5d --- /dev/null +++ b/scripts/sbuild.sh @@ -0,0 +1,31 @@ +#!/usr/bin/env bash +set -e +set -x +. /etc/profile + +LOCAL_PLATFORM="$(uname)" && LOCAL_PLATFORM="$(echo "$LOCAL_PLATFORM" | tr '[:upper:]' '[:lower:]' )" +LOCAL_ARCH=$(([[ "$(uname -m)" == *"arm"* ]] || [[ "$(uname -m)" == *"aarch"* ]]) && echo "arm64" || echo "amd64") +LOCAL_OUT="${GOBIN}/sekaid" + +PLATFORM="$1" && [ -z "$PLATFORM" ] && PLATFORM="$LOCAL_PLATFORM" +ARCH="$2" && [ -z "$ARCH" ] && ARCH="$LOCAL_ARCH" +OUTPUT="$3" && [ -z "$OUTPUT" ] && OUTPUT="$LOCAL_OUT" + +VERSION=$(./scripts/version.sh) +COMMIT=$(git log -1 --format='%H') +ldfName="-X github.com/cosmos/cosmos-sdk/version.Name=sekai" +ldfAppName="-X github.com/cosmos/cosmos-sdk/version.AppName=sekaid" +ldfVersion="-X github.com/cosmos/cosmos-sdk/version.Version=$VERSION" +ldfCommit="-X github.com/cosmos/cosmos-sdk/version.Commit=$COMMIT" +ldfBuildTags="-X github.com/cosmos/cosmos-sdk/version.BuildTags=${PLATFORM},${ARCH}" + +rm -fv "$OUTPUT" || echo "ERROR: Failed to wipe old sekaid binary" + +go mod tidy +GO111MODULE=on go mod verify + +# Buld staic binary +env CGO_ENABLED=0 GOOS=$PLATFORM GOARCH=$ARCH go build -ldflags "-extldflags '-static' ${ldfName} ${ldfAppName} ${ldfVersion} ${ldfCommit} ${ldfBuildTags}" -o "$OUTPUT" ./cmd/sekaid + +( [ "$PLATFORM" == "$LOCAL_PLATFORM" ] && [ "$ARCH" == "$LOCAL_ARCH" ] && [ -f $OUTPUT ] ) && \ + echo "INFO: Sucessfully built SEKAI $($OUTPUT version)" || echo "INFO: Sucessfully built SEKAI to '$OUTPUT'" diff --git a/scripts/sekai-env.sh b/scripts/sekai-env.sh index 8153f0ccf..0dfd59911 100755 --- a/scripts/sekai-env.sh +++ b/scripts/sekai-env.sh @@ -20,14 +20,11 @@ PermWhitelistAccountPermissionProposal=4 # permission to vote on a proposal to whitelist account permission PermVoteWhitelistAccountPermissionProposal=5 -# permission to upsert token alias -PermUpsertTokenAlias=6 - # permission to change transaction fees - execution fee and fee range PermChangeTxFee=7 # permission to upsert token rates -PermUpsertTokenRate=8 +PermUpsertTokenInfo=8 # permission to add, modify and assign roles PermUpsertRole=9 @@ -44,12 +41,6 @@ PermCreateSetNetworkPropertyProposal=12 # permission to vote a proposal to set network property PermVoteSetNetworkPropertyProposal=13 -# permission to create proposals to upsert token alias -PermCreateUpsertTokenAliasProposal=14 - -# permission to vote proposals to upsert token alias -PermVoteUpsertTokenAliasProposal=15 - # permission to create proposals for setting poor network messages PermCreateSetPoorNetworkMessagesProposal=16 @@ -57,10 +48,10 @@ PermCreateSetPoorNetworkMessagesProposal=16 PermVoteSetPoorNetworkMessagesProposal=17 # permission to create proposals to upsert token rate -PermCreateUpsertTokenRateProposal=18 +PermCreateUpsertTokenInfoProposal=18 # permission to vote propsals to upsert token rate -PermVoteUpsertTokenRateProposal=19 +PermVoteUpsertTokenInfoProposal=19 # permission to create a proposal to unjail a validator PermCreateUnjailValidatorProposal=20 @@ -200,6 +191,18 @@ PermCreateJailCouncilorProposal=64 # permission needed to vote on jail councilors proposal PermVoteJailCouncilorProposal=65 +# permission needed to create a poll proposal +PermCreatePollProposal=66 + +# permission needed to create a dapp proposal without bond +PermCreateDappProposalWithoutBond=67 + +# permission needed to create a proposal to set execution fees +PermCreateSetExecutionFeesProposal=68 + +# permission needed to vote on set execution fees proposal +PermVoteSetExecutionFeesProposal=69 + ###################################### transaction_types ###################################### TypeMsgSend="send" TypeMsgMultiSend="multisend" @@ -217,8 +220,7 @@ MsgTypeBlacklistRolePermission="blacklist-role-permission" MsgTypeRemoveWhitelistRolePermission="remove-whitelist-role-permission" MsgTypeRemoveBlacklistRolePermission="remove-blacklist-role-permission" MsgTypeClaimValidator="claim-validator" -MsgTypeUpsertTokenAlias="upsert-token-alias" -MsgTypeUpsertTokenRate="upsert-token-rate" +MsgTypeUpsertTokenInfo="upsert-token-rate" ###################################### function IDs ###################################### FuncIDMsgSend=1 @@ -245,8 +247,7 @@ FuncIDMsgBlacklistRolePermission=29 FuncIDMsgRemoveWhitelistRolePermission=30 FuncIDMsgRemoveBlacklistRolePermission=31 FuncIDMsgClaimValidator=32 -FuncIDMsgUpsertTokenAlias=33 -FuncIDMsgUpsertTokenRate=34 +FuncIDMsgUpsertTokenInfo=34 FuncIDMsgActivate=35 FuncIDMsgPause=36 FuncIDMsgUnpause=37 \ No newline at end of file diff --git a/scripts/sekai-utils.sh b/scripts/sekai-utils.sh index 73870b88a..899f5e886 100755 --- a/scripts/sekai-utils.sh +++ b/scripts/sekai-utils.sh @@ -771,16 +771,12 @@ function showValidator() { echo $VAL_STATUS } -function showTokenAliases() { - echo $(sekaid query tokens all-aliases --output=json --home=$SEKAID_HOME 2> /dev/null | jsonParse 2> /dev/null || echo -n "") -} - -function showTokenRates() { +function showTokenInfos() { echo $(sekaid query tokens all-rates --output=json --home=$SEKAID_HOME 2> /dev/null | jsonParse 2> /dev/null || echo -n "") } -# setTokenRate -function setTokenRate() { +# setTokenInfo +function setTokenInfo() { local ACCOUNT=$1 local DENOM=$2 local RATE=$3 diff --git a/scripts/test-local/account-permissions.sh b/scripts/test-local/account-permissions.sh index abc103f00..85b4bd228 100644 --- a/scripts/test-local/account-permissions.sh +++ b/scripts/test-local/account-permissions.sh @@ -18,20 +18,17 @@ declare -a perms=( "PermClaimCouncilor" "PermWhitelistAccountPermissionProposal" "PermVoteWhitelistAccountPermissionProposal" - "PermUpsertTokenAlias" "PermChangeTxFee" - "PermUpsertTokenRate" + "PermUpsertTokenInfo" "PermUpsertRole" "PermCreateUpsertDataRegistryProposal" "PermVoteUpsertDataRegistryProposal" "PermCreateSetNetworkPropertyProposal" "PermVoteSetNetworkPropertyProposal" - "PermCreateUpsertTokenAliasProposal" - "PermVoteUpsertTokenAliasProposal" "PermCreateSetPoorNetworkMessagesProposal" "PermVoteSetPoorNetworkMessagesProposal" - "PermCreateUpsertTokenRateProposal" - "PermVoteUpsertTokenRateProposal" + "PermCreateUpsertTokenInfoProposal" + "PermVoteUpsertTokenInfoProposal" "PermCreateUnjailValidatorProposal" "PermVoteUnjailValidatorProposal" "PermCreateRoleProposal" diff --git a/types/Msg.go b/types/Msg.go index 2c8681e85..b64929e32 100644 --- a/types/Msg.go +++ b/types/Msg.go @@ -11,36 +11,36 @@ const ( TypeMsgSubmitEvidence = "submit_evidence" // governance - MsgTypeSubmitProposal = "submit-proposal" - MsgTypeVoteProposal = "vote-proposal" - MsgTypeCreatePoll = "create-poll" - MsgTypeVotePoll = "vote-poll" - MsgTypeAddressPoll = "address-poll" - - MsgTypeWhitelistPermissions = "whitelist-permissions" - MsgTypeBlacklistPermissions = "blacklist-permissions" - - MsgTypeClaimCouncilor = "claim-councilor" - MsgTypeSetNetworkProperties = "set-network-properties" - MsgTypeSetExecutionFee = "set-execution-fee" - - MsgTypeCreateRole = "create-role" - MsgTypeAssignRole = "assign-role" - MsgTypeUnassignRole = "unassign-role" - - MsgTypeWhitelistRolePermission = "whitelist-role-permission" - MsgTypeBlacklistRolePermission = "blacklist-role-permission" - MsgTypeRemoveWhitelistRolePermission = "remove-whitelist-role-permission" - MsgTypeRemoveBlacklistRolePermission = "remove-blacklist-role-permission" - - MsgTypeRegisterIdentityRecords = "register-identity-records" - MsgTypeEditIdentityRecord = "edit-identity-record" - MsgTypeRequestIdentityRecordsVerify = "request-identity-records-verify" - MsgTypeHandleIdentityRecordsVerifyRequest = "handle-identity-records-verify-request" - MsgTypeCancelIdentityRecordsVerifyRequest = "cancel-identity-records-verify-request" + MsgTypeSubmitProposal = "submit_proposal" + MsgTypeVoteProposal = "vote_proposal" + MsgTypeCreatePoll = "create_poll" + MsgTypeVotePoll = "vote_poll" + MsgTypeAddressPoll = "address_poll" + + MsgTypeWhitelistPermissions = "whitelist_permissions" + MsgTypeBlacklistPermissions = "blacklist_permissions" + + MsgTypeClaimCouncilor = "claim_councilor" + MsgTypeSetNetworkProperties = "set_network_properties" + MsgTypeSetExecutionFee = "set_execution_fee" + + MsgTypeCreateRole = "create_role" + MsgTypeAssignRole = "assign_role" + MsgTypeUnassignRole = "unassign_role" + + MsgTypeWhitelistRolePermission = "whitelist_role_permission" + MsgTypeBlacklistRolePermission = "blacklist_role_permission" + MsgTypeRemoveWhitelistRolePermission = "remove_whitelist_role_permission" + MsgTypeRemoveBlacklistRolePermission = "remove_blacklist_role_permission" + + MsgTypeRegisterIdentityRecords = "register_identity_records" + MsgTypeDeleteIdentityRecords = "delete_identity_records" + MsgTypeRequestIdentityRecordsVerify = "request_identity_records_verify" + MsgTypeHandleIdentityRecordsVerifyRequest = "handle_identity_records_verify_request" + MsgTypeCancelIdentityRecordsVerifyRequest = "cancel_identity_records_verify_request" // staking module - MsgTypeClaimValidator = "claim-validator" + MsgTypeClaimValidator = "claim_validator" // multistaking module MsgTypeUpsertStakingPool = "upsert_staking_pool" @@ -53,17 +53,17 @@ const ( MsgTypeRegisterDelegator = "register_delegator" // basket module - MsgTypeDisableBasketDeposits = "disable-basket-deposits" - MsgTypeDisableBasketWithdraws = "disable-basket-withdraws" - MsgTypeDisableBasketSwaps = "disable-basket-swaps" - MsgTypeBasketTokenMint = "basket-token-mint" - MsgTypeBasketTokenBurn = "basket-token-burn" - MsgTypeBasketTokenSwap = "basket-token-swap" - MsgTypeBasketClaimRewards = "basket-claim-rewards" + MsgTypeDisableBasketDeposits = "disable_basket_deposits" + MsgTypeDisableBasketWithdraws = "disable_basket_withdraws" + MsgTypeDisableBasketSwaps = "disable_basket_swaps" + MsgTypeBasketTokenMint = "basket_token_mint" + MsgTypeBasketTokenBurn = "basket_token_burn" + MsgTypeBasketTokenSwap = "basket_token_swap" + MsgTypeBasketClaimRewards = "basket_claim_rewards" // tokens module - MsgTypeUpsertTokenAlias = "upsert-token-alias" - MsgTypeUpsertTokenRate = "upsert-token-rate" + MsgTypeUpsertTokenInfo = "upsert_token_info" + MsgTypeEthereumTx = "ethereum_tx" // slashing module MsgTypeActivate = "activate" @@ -71,73 +71,73 @@ const ( MsgTypeUnpause = "unpause" // recovery module - MsgTypeRegisterRecoverySecret = "register-recovery-secret" - MsgTypeRotateRecoveryAddress = "rotate-recovery-address" - MsgTypeIssueRecoveryTokens = "issue-recovery-tokens" - MsgTypeBurnRecoveryTokens = "burn-recovery-tokens" - MsgTypeRegisterRRTokenHolder = "register-rrtoken-holder" - MsgTypeClaimRRHolderRewards = "claim-rrholder-rewards" - MsgTypeRotateValidatorByHalfRRTokenHolder = "rotate-validator-by-half-rr-token-holder" + MsgTypeRegisterRecoverySecret = "register_recovery_secret" + MsgTypeRotateRecoveryAddress = "rotate_recovery_address" + MsgTypeIssueRecoveryTokens = "issue_recovery_tokens" + MsgTypeBurnRecoveryTokens = "burn_recovery_tokens" + MsgTypeRegisterRRTokenHolder = "register_rrtoken_holder" + MsgTypeClaimRRHolderRewards = "claim_rrholder_rewards" + MsgTypeRotateValidatorByHalfRRTokenHolder = "rotate_validator_by_half_rr_token_holder" //upgrade module // spending module - MsgTypeCreateSpendingPool = "create-spending-pool" - MsgTypeDepositSpendingPool = "deposit-spending-pool" - MsgTypeRegisterSpendingPoolBeneficiary = "register-spending-pool-beneficiary" - MsgTypeClaimSpendingPool = "claim-spending-pool" + MsgTypeCreateSpendingPool = "create_spending_pool" + MsgTypeDepositSpendingPool = "deposit_spending_pool" + MsgTypeRegisterSpendingPoolBeneficiary = "register_spending_pool_beneficiary" + MsgTypeClaimSpendingPool = "claim_spending_pool" // custody module - MsgTypeCreateCustody = "create-custody" - MsgTypeDisableCustody = "disable-custody" - MsgTypeDropCustody = "drop-custody" - MsgTypeAddToCustodyWhiteList = "add-to-custody-whitelist" - MsgTypeAddToCustodyCustodians = "add-to-custody-custodians" - MsgTypeRemoveFromCustodyCustodians = "remove-from-custody-custodians" - MsgTypeDropCustodyCustodians = "drop-custody-custodians" - MsgTypeRemoveFromCustodyWhiteList = "remove-from-custody-whitelist" - MsgTypeDropCustodyWhiteList = "drop-custody-whitelist" - MsgApproveCustodyTransaction = "approve-custody-transaction" - MsgDeclineCustodyTransaction = "decline-custody-transaction" - MsgPasswordConfirmTransaction = "password-confirm-transaction" - MsgTypeSend = "custody-send" + MsgTypeCreateCustody = "create_custody" + MsgTypeDisableCustody = "disable_custody" + MsgTypeDropCustody = "drop_custody" + MsgTypeAddToCustodyWhiteList = "add_to_custody_whitelist" + MsgTypeAddToCustodyCustodians = "add_to_custody_custodians" + MsgTypeRemoveFromCustodyCustodians = "remove_from_custody_custodians" + MsgTypeDropCustodyCustodians = "drop_custody_custodians" + MsgTypeRemoveFromCustodyWhiteList = "remove_from_custody_whitelist" + MsgTypeDropCustodyWhiteList = "drop_custody_whitelist" + MsgApproveCustodyTransaction = "approve_custody_transaction" + MsgDeclineCustodyTransaction = "decline_custody_transaction" + MsgPasswordConfirmTransaction = "password_confirm_transaction" + MsgTypeSend = "custody_send" // bridge module MsgTypeChangeCosmosEthereum = "change-cosmos-ethereum" MsgTypeChangeEthereumCosmos = "change-ethereum-cosmos" // collectives module - MsgTypeCreateCollective = "create-collective" - MsgTypeBondCollective = "bond-collective" - MsgTypeDonateCollective = "donate-collective" - MsgTypeWithdrawCollective = "withdraw-collective" + MsgTypeCreateCollective = "create_collective" + MsgTypeBondCollective = "bond_collective" + MsgTypeDonateCollective = "donate_collective" + MsgTypeWithdrawCollective = "withdraw_collective" // layer2 module - MsgTypeCreateDappProposal = "create-dapp-proposal" - MsgTypeBondDappProposal = "bond-dapp-proposal" - MsgTypeReclaimDappBondProposal = "reclaim-dapp-bond-proposal" - MsgTypeJoinDappVerifierWithBond = "join-dapp-verifier-with-bond" - MsgTypeExitDapp = "exit-dapp" - MsgTypeVoteDappOperatorTx = "vote-dapp-operator-tx" - MsgTypeRedeemDappPoolTx = "redeem-dapp-pool-tx" - MsgTypeSwapDappPoolTx = "swap-dapp-pool-tx" - MsgTypeConvertDappPoolTx = "convert-dapp-pool-tx" - MsgTypePauseDappTx = "pause-dapp-tx" - MsgTypeUnPauseDappTx = "unpause-dapp-tx" - MsgTypeReactivateDappTx = "reactivate-dapp-tx" - MsgTypeExecuteDappTx = "execute-dapp-tx" - MsgTypeDenounceLeaderTx = "denounce-leader-tx" - MsgTypeTransitionDappTx = "transition-dapp-tx" - MsgTypeApproveDappTransitionTx = "approve-dapp-transition-tx" - MsgTypeRejectDappTransitionTx = "reject-dapp-transition-tx" - MsgTypeUpsertDappProposalTx = "upsert-dapp-proposal-tx" - MsgTypeVoteUpsertDappProposalTx = "vote-upsert-dapp-proposal-tx" - MsgTypeTransferDappTx = "transfer-dapp-tx" - MsgTypeAckTransferDappTx = "ack-transfer-dapp-tx" - MsgTypeMintCreateFtTx = "mint-create-ft-tx" - MsgTypeMintCreateNftTx = "mint-create-nft-tx" - MsgTypeMintIssueTx = "mint-issue-tx" - MsgTypeMintBurnTx = "mint-burn-tx" + MsgTypeCreateDappProposal = "create_dapp_proposal" + MsgTypeBondDappProposal = "bond_dapp_proposal" + MsgTypeReclaimDappBondProposal = "reclaim_dapp_bond_proposal" + MsgTypeJoinDappVerifierWithBond = "join_dapp_verifier_with_bond" + MsgTypeExitDapp = "exit_dapp" + MsgTypeVoteDappOperatorTx = "vote_dapp_operator_tx" + MsgTypeRedeemDappPoolTx = "redeem_dapp_pool_tx" + MsgTypeSwapDappPoolTx = "swap_dapp_pool_tx" + MsgTypeConvertDappPoolTx = "convert_dapp_pool_tx" + MsgTypePauseDappTx = "pause_dapp_tx" + MsgTypeUnPauseDappTx = "unpause_dapp_tx" + MsgTypeReactivateDappTx = "reactivate_dapp_tx" + MsgTypeExecuteDappTx = "execute_dapp_tx" + MsgTypeDenounceLeaderTx = "denounce_leader_tx" + MsgTypeTransitionDappTx = "transition_dapp_tx" + MsgTypeApproveDappTransitionTx = "approve_dapp_transition_tx" + MsgTypeRejectDappTransitionTx = "reject_dapp_transition_tx" + MsgTypeUpsertDappProposalTx = "upsert_dapp_proposal_tx" + MsgTypeVoteUpsertDappProposalTx = "vote_upsert_dapp_proposal_tx" + MsgTypeTransferDappTx = "transfer_dapp_tx" + MsgTypeAckTransferDappTx = "ack_transfer_dapp_tx" + MsgTypeMintCreateFtTx = "mint_create_ft_tx" + MsgTypeMintCreateNftTx = "mint_create_nft_tx" + MsgTypeMintIssueTx = "mint_issue_tx" + MsgTypeMintBurnTx = "mint_burn_tx" ) // Msg defines the interface a transaction message must fulfill. @@ -158,7 +158,7 @@ var MsgFuncIDMapping = map[string]int64{ MsgTypeSubmitProposal: 10, MsgTypeVoteProposal: 11, MsgTypeRegisterIdentityRecords: 12, - MsgTypeEditIdentityRecord: 13, + MsgTypeDeleteIdentityRecords: 13, MsgTypeRequestIdentityRecordsVerify: 14, MsgTypeHandleIdentityRecordsVerifyRequest: 15, MsgTypeCancelIdentityRecordsVerifyRequest: 16, @@ -176,11 +176,11 @@ var MsgFuncIDMapping = map[string]int64{ MsgTypeRemoveWhitelistRolePermission: 30, MsgTypeRemoveBlacklistRolePermission: 31, MsgTypeClaimValidator: 32, - MsgTypeUpsertTokenAlias: 33, - MsgTypeUpsertTokenRate: 34, + MsgTypeUpsertTokenInfo: 34, MsgTypeActivate: 35, MsgTypePause: 36, MsgTypeUnpause: 37, + MsgTypeEthereumTx: 38, MsgTypeCreateSpendingPool: 41, MsgTypeDepositSpendingPool: 42, diff --git a/types/Proposal.go b/types/Proposal.go index 24434a279..10eb5cd56 100644 --- a/types/Proposal.go +++ b/types/Proposal.go @@ -3,8 +3,7 @@ package types const ( ProposalTypeSoftwareUpgrade = "SoftwareUpgrade" ProposalTypeCancelSoftwareUpgrade = "CancelSoftwareUpgrade" - ProposalTypeUpsertTokenAlias = "UpsertTokenAlias" - ProposalTypeUpsertTokenRates = "UpsertTokenRates" + ProposalTypeUpsertTokenInfos = "UpsertTokenInfos" ProposalTypeTokensWhiteBlackChange = "TokensWhiteBlackChange" ProposalTypeUnjailValidator = "UnjailValidator" ProposalTypeResetWholeValidatorRank = "ResetWholeValidatorRank" @@ -16,6 +15,7 @@ const ( ProposalTypeRemoveUBI = "RemoveUBI" ProposalTypeResetWholeCouncilorRank = "ResetWholeCouncilorRank" ProposalTypeJailCouncilor = "JailCouncilor" + ProposalTypeSetExecutionFees = "SetExecutionFees" ProposalTypeWhitelistAccountPermission = "WhitelistAccountPermission" ProposalTypeBlacklistAccountPermission = "BlacklistAccountPermission" ProposalTypeRemoveWhitelistedAccountPermission = "RemoveWhitelistedAccountPermission" @@ -49,8 +49,7 @@ const ( var AllProposalTypes []string = []string{ ProposalTypeSoftwareUpgrade, ProposalTypeCancelSoftwareUpgrade, - ProposalTypeUpsertTokenAlias, - ProposalTypeUpsertTokenRates, + ProposalTypeUpsertTokenInfos, ProposalTypeTokensWhiteBlackChange, ProposalTypeUnjailValidator, ProposalTypeResetWholeValidatorRank, diff --git a/types/constants.go b/types/constants.go index 03c62c522..f4a520789 100644 --- a/types/constants.go +++ b/types/constants.go @@ -3,6 +3,6 @@ package types const ( // we set page iteration limit for safety PageIterationLimit = 512 - SekaiVersion = "v0.3.41" + SekaiVersion = "v0.4.2" CosmosVersion = "v0.47.6" ) diff --git a/x/basket/keeper/basket.go b/x/basket/keeper/basket.go index bcd74b064..6e6cedb1a 100644 --- a/x/basket/keeper/basket.go +++ b/x/basket/keeper/basket.go @@ -1,9 +1,9 @@ package keeper import ( + errorsmod "cosmossdk.io/errors" "github.com/KiraCore/sekai/x/basket/types" sdk "github.com/cosmos/cosmos-sdk/types" - sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" ) func (k Keeper) GetLastBasketId(ctx sdk.Context) uint64 { @@ -25,7 +25,7 @@ func (k Keeper) GetBasketById(ctx sdk.Context, id uint64) (types.Basket, error) store := ctx.KVStore(k.storeKey) bz := store.Get(append(types.PrefixBasketKey, sdk.Uint64ToBigEndian(id)...)) if bz == nil { - return types.Basket{}, sdkerrors.Wrapf(types.ErrBasketDoesNotExist, "basket: %d does not exist", id) + return types.Basket{}, errorsmod.Wrapf(types.ErrBasketDoesNotExist, "basket: %d does not exist", id) } basket := types.Basket{} k.cdc.MustUnmarshal(bz, &basket) @@ -36,7 +36,7 @@ func (k Keeper) GetBasketByDenom(ctx sdk.Context, denom string) (types.Basket, e store := ctx.KVStore(k.storeKey) bz := store.Get(append(types.PrefixBasketByDenomKey, denom...)) if bz == nil { - return types.Basket{}, sdkerrors.Wrapf(types.ErrBasketDoesNotExist, "basket: %s does not exist", denom) + return types.Basket{}, errorsmod.Wrapf(types.ErrBasketDoesNotExist, "basket: %s does not exist", denom) } id := sdk.BigEndianToUint64(bz) return k.GetBasketById(ctx, id) diff --git a/x/basket/keeper/hooks.go b/x/basket/keeper/hooks.go index d5cc09b06..56d2358eb 100644 --- a/x/basket/keeper/hooks.go +++ b/x/basket/keeper/hooks.go @@ -9,9 +9,9 @@ import ( ) func (k Keeper) AfterUpsertStakingPool(ctx sdk.Context, valAddr sdk.ValAddress, pool multistakingtypes.StakingPool) { - rates := k.tk.GetAllTokenRates(ctx) + rates := k.tk.GetAllTokenInfos(ctx) for _, rate := range rates { - if rate.StakeToken { + if rate.StakeEnabled { basket, err := k.GetBasketByDenom(ctx, fmt.Sprintf("sdb/%s", rate.Denom)) if err != nil { basket = types.Basket{ @@ -58,9 +58,9 @@ func (k Keeper) AfterUpsertStakingPool(ctx sdk.Context, valAddr sdk.ValAddress, } func (k Keeper) AfterSlashStakingPool(ctx sdk.Context, valAddr sdk.ValAddress, pool multistakingtypes.StakingPool, slash sdk.Dec) { - rates := k.tk.GetAllTokenRates(ctx) + rates := k.tk.GetAllTokenInfos(ctx) for _, rate := range rates { - if rate.StakeToken { + if rate.StakeEnabled { basket, err := k.GetBasketByDenom(ctx, fmt.Sprintf("sdb/%s", rate.Denom)) if err != nil { continue @@ -81,9 +81,9 @@ func (k Keeper) AfterSlashStakingPool(ctx sdk.Context, valAddr sdk.ValAddress, p } func (k Keeper) AfterSlashProposalRaise(ctx sdk.Context, valAddr sdk.ValAddress, pool multistakingtypes.StakingPool) { - rates := k.tk.GetAllTokenRates(ctx) + rates := k.tk.GetAllTokenInfos(ctx) for _, rate := range rates { - if rate.StakeToken { + if rate.StakeEnabled { basket, err := k.GetBasketByDenom(ctx, fmt.Sprintf("sdb/%s", rate.Denom)) if err != nil { continue diff --git a/x/basket/keeper/keeper.go b/x/basket/keeper/keeper.go index d63e275c9..e3c9a451a 100644 --- a/x/basket/keeper/keeper.go +++ b/x/basket/keeper/keeper.go @@ -4,7 +4,6 @@ import ( "github.com/KiraCore/sekai/x/basket/types" govkeeper "github.com/KiraCore/sekai/x/gov/keeper" govtypes "github.com/KiraCore/sekai/x/gov/types" - tokenskeeper "github.com/KiraCore/sekai/x/tokens/keeper" "github.com/cosmos/cosmos-sdk/codec" storetypes "github.com/cosmos/cosmos-sdk/store/types" sdk "github.com/cosmos/cosmos-sdk/types" @@ -17,12 +16,12 @@ type Keeper struct { ak types.AccountKeeper bk types.BankKeeper gk govkeeper.Keeper - tk tokenskeeper.Keeper + tk types.TokensKeeper mk types.MultiStakingKeeper } // NewKeeper returns instance of a keeper -func NewKeeper(storeKey storetypes.StoreKey, cdc codec.BinaryCodec, ak types.AccountKeeper, bk types.BankKeeper, gk govkeeper.Keeper, tk tokenskeeper.Keeper, mk types.MultiStakingKeeper) Keeper { +func NewKeeper(storeKey storetypes.StoreKey, cdc codec.BinaryCodec, ak types.AccountKeeper, bk types.BankKeeper, gk govkeeper.Keeper, tk types.TokensKeeper, mk types.MultiStakingKeeper) Keeper { return Keeper{ cdc: cdc, storeKey: storeKey, diff --git a/x/basket/keeper/mint_burn_swap.go b/x/basket/keeper/mint_burn_swap.go index a3042a07a..f8d6db499 100644 --- a/x/basket/keeper/mint_burn_swap.go +++ b/x/basket/keeper/mint_burn_swap.go @@ -3,9 +3,9 @@ package keeper import ( "fmt" + errorsmod "cosmossdk.io/errors" "github.com/KiraCore/sekai/x/basket/types" sdk "github.com/cosmos/cosmos-sdk/types" - sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" ) func (k Keeper) MintBasketToken(ctx sdk.Context, msg *types.MsgBasketTokenMint) error { @@ -41,7 +41,7 @@ func (k Keeper) MintBasketToken(ctx sdk.Context, msg *types.MsgBasketTokenMint) _, indexes := basket.RatesAndIndexes() tokenIndex := indexes[token.Denom] if !basket.Tokens[tokenIndex].Deposits { - return sdkerrors.Wrap(types.ErrDepositsDisabledForToken, fmt.Sprintf("denom=%s", token.Denom)) + return errorsmod.Wrap(types.ErrDepositsDisabledForToken, fmt.Sprintf("denom=%s", token.Denom)) } basketTokenAmount = basketTokenAmount.Add(sdk.NewDecFromInt(token.Amount).Mul(rate)) } @@ -59,7 +59,7 @@ func (k Keeper) MintBasketToken(ctx sdk.Context, msg *types.MsgBasketTokenMint) } basketCoins := sdk.Coins{basketCoin} - err = k.bk.MintCoins(ctx, types.ModuleName, basketCoins) + err = k.tk.MintCoins(ctx, types.ModuleName, basketCoins) if err != nil { return err } @@ -115,7 +115,7 @@ func (k Keeper) BurnBasketToken(ctx sdk.Context, msg *types.MsgBasketTokenBurn) return err } - err = k.bk.BurnCoins(ctx, types.ModuleName, burnCoins) + err = k.tk.BurnCoins(ctx, types.ModuleName, burnCoins) if err != nil { return err } diff --git a/x/basket/keeper/msg_server.go b/x/basket/keeper/msg_server.go index 608ab711b..417ea0f04 100644 --- a/x/basket/keeper/msg_server.go +++ b/x/basket/keeper/msg_server.go @@ -3,10 +3,10 @@ package keeper import ( "context" + errorsmod "cosmossdk.io/errors" "github.com/KiraCore/sekai/x/basket/types" govtypes "github.com/KiraCore/sekai/x/gov/types" sdk "github.com/cosmos/cosmos-sdk/types" - sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" ) type msgServer struct { @@ -38,7 +38,7 @@ func (k msgServer) DisableBasketDeposits( sender, err := sdk.AccAddressFromBech32(msg.Sender) isAllowed := k.keeper.CheckIfAllowedPermission(ctx, sender, govtypes.PermHandleBasketEmergency) if !isAllowed { - return nil, sdkerrors.Wrap(govtypes.ErrNotEnoughPermissions, "PermHandleBasketEmergency") + return nil, errorsmod.Wrap(govtypes.ErrNotEnoughPermissions, "PermHandleBasketEmergency") } basket.MintsDisabled = true @@ -59,7 +59,7 @@ func (k msgServer) DisableBasketWithdraws( sender, err := sdk.AccAddressFromBech32(msg.Sender) isAllowed := k.keeper.CheckIfAllowedPermission(ctx, sender, govtypes.PermHandleBasketEmergency) if !isAllowed { - return nil, sdkerrors.Wrap(govtypes.ErrNotEnoughPermissions, "PermHandleBasketEmergency") + return nil, errorsmod.Wrap(govtypes.ErrNotEnoughPermissions, "PermHandleBasketEmergency") } basket.BurnsDisabled = true @@ -80,7 +80,7 @@ func (k msgServer) DisableBasketSwaps( sender, err := sdk.AccAddressFromBech32(msg.Sender) isAllowed := k.keeper.CheckIfAllowedPermission(ctx, sender, govtypes.PermHandleBasketEmergency) if !isAllowed { - return nil, sdkerrors.Wrap(govtypes.ErrNotEnoughPermissions, "PermHandleBasketEmergency") + return nil, errorsmod.Wrap(govtypes.ErrNotEnoughPermissions, "PermHandleBasketEmergency") } basket.SwapsDisabled = true diff --git a/x/basket/types/basket.go b/x/basket/types/basket.go index d4e13a8c6..ec9918faa 100644 --- a/x/basket/types/basket.go +++ b/x/basket/types/basket.go @@ -5,8 +5,8 @@ import ( "strconv" "strings" + errorsmod "cosmossdk.io/errors" sdk "github.com/cosmos/cosmos-sdk/types" - sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" ) func (b Basket) GetBasketDenom() string { @@ -92,7 +92,7 @@ func (b Basket) ValidateTokensCap() error { for _, token := range b.Tokens { if sdk.NewDecFromInt(token.Amount).Mul(token.Weight).GT(totalTokens.Mul(b.TokensCap)) { - return sdkerrors.Wrap(ErrTokenExceedingCap, fmt.Sprintf("denom=%s", token.Denom)) + return errorsmod.Wrap(ErrTokenExceedingCap, fmt.Sprintf("denom=%s", token.Denom)) } } return nil diff --git a/x/basket/types/expected_keepers.go b/x/basket/types/expected_keepers.go index 98ed046fb..dad762467 100644 --- a/x/basket/types/expected_keepers.go +++ b/x/basket/types/expected_keepers.go @@ -3,6 +3,7 @@ package types import ( govtypes "github.com/KiraCore/sekai/x/gov/types" multistakingtypes "github.com/KiraCore/sekai/x/multistaking/types" + tokenstypes "github.com/KiraCore/sekai/x/tokens/types" sdk "github.com/cosmos/cosmos-sdk/types" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" ) @@ -35,3 +36,11 @@ type MultistakingHooks interface { AfterUpsertStakingPool(ctx sdk.Context, valAddr sdk.ValAddress, pool multistakingtypes.StakingPool) // Must be called when a upsert staking pool AfterSlashStakingPool(ctx sdk.Context, valAddr sdk.ValAddress, pool multistakingtypes.StakingPool, slash sdk.Dec) } + +// TokensKeeper defines expected interface needed from tokens keeper +type TokensKeeper interface { + MintCoins(ctx sdk.Context, moduleName string, amt sdk.Coins) error + BurnCoins(ctx sdk.Context, moduleName string, amt sdk.Coins) error + GetTokenInfo(ctx sdk.Context, denom string) *tokenstypes.TokenInfo + GetAllTokenInfos(ctx sdk.Context) []tokenstypes.TokenInfo +} diff --git a/x/bridge/keeper/genesis.go b/x/bridge/keeper/genesis.go index c25d58ecf..79b95f74e 100644 --- a/x/bridge/keeper/genesis.go +++ b/x/bridge/keeper/genesis.go @@ -10,16 +10,6 @@ func (k Keeper) SetBridgeAddress(ctx sdk.Context, address string) { store.Set(types.BridgeAddressKey, []byte(address)) } -func (k Keeper) SetCosmosEthereumExchangeRate(ctx sdk.Context, rate int64) { - store := ctx.KVStore(k.storeKey) - store.Set(types.BridgeCosmosEthereumExchangeRateKey, sdk.Uint64ToBigEndian(uint64(rate))) -} - -func (k Keeper) SetEthereumCosmosExchangeRate(ctx sdk.Context, rate int64) { - store := ctx.KVStore(k.storeKey) - store.Set(types.BridgeEthereumCosmosExchangeRateKey, sdk.Uint64ToBigEndian(uint64(rate))) -} - func (k Keeper) GetBridgeAddress(ctx sdk.Context) string { store := ctx.KVStore(k.storeKey) bz := store.Get(types.BridgeAddressKey) @@ -30,25 +20,3 @@ func (k Keeper) GetBridgeAddress(ctx sdk.Context) string { return string(bz) } - -func (k Keeper) GetCosmosEthereumExchangeRate(ctx sdk.Context) int64 { - store := ctx.KVStore(k.storeKey) - bz := store.Get(types.BridgeCosmosEthereumExchangeRateKey) - - if bz == nil { - return 1 - } - - return int64(sdk.BigEndianToUint64(bz)) -} - -func (k Keeper) GetEthereumCosmosExchangeRate(ctx sdk.Context) int64 { - store := ctx.KVStore(k.storeKey) - bz := store.Get(types.BridgeCosmosEthereumExchangeRateKey) - - if bz == nil { - return 1 - } - - return int64(sdk.BigEndianToUint64(bz)) -} diff --git a/x/bridge/types/keys.go b/x/bridge/types/keys.go index 3d4ddd7b5..2b943d05f 100644 --- a/x/bridge/types/keys.go +++ b/x/bridge/types/keys.go @@ -9,7 +9,5 @@ var ( PrefixKeyBridgeCosmosEthereumRecord = "bridge_cosmos_ethereum_record_prefix_" PrefixKeyBridgeEthereumCosmosRecord = "bridge_ethereum_cosmos_record_prefix_" - BridgeAddressKey = []byte("bridge_address") - BridgeCosmosEthereumExchangeRateKey = []byte("bridge_cosmos_ethereum_rate") - BridgeEthereumCosmosExchangeRateKey = []byte("bridge_ethereum_cosmos_rate") + BridgeAddressKey = []byte("bridge_address") ) diff --git a/x/collectives/client/cli/tx.go b/x/collectives/client/cli/tx.go index 1570a12fc..159391e18 100644 --- a/x/collectives/client/cli/tx.go +++ b/x/collectives/client/cli/tx.go @@ -178,7 +178,7 @@ func GetTxCreateCollectiveCmd() *cobra.Command { ownerWhitelist, weightedSpendingPools, claimStart, claimPeriod, claimEnd, - voteQuorum, votePeriod, voteEnactment, + sdk.NewDecWithPrec(int64(voteQuorum), 2), votePeriod, voteEnactment, ) err = msg.ValidateBasic() @@ -589,7 +589,7 @@ func GetTxProposalCollectiveUpdateCmd() *cobra.Command { ownerWhitelist, weightedSpendingPools, claimStart, claimPeriod, claimEnd, - voteQuorum, votePeriod, voteEnactment, + sdk.NewDecWithPrec(int64(voteQuorum), 2), votePeriod, voteEnactment, ), ) if err != nil { diff --git a/x/collectives/keeper/abci_test.go b/x/collectives/keeper/abci_test.go index 5e7b38450..e5f9046b7 100644 --- a/x/collectives/keeper/abci_test.go +++ b/x/collectives/keeper/abci_test.go @@ -75,7 +75,8 @@ func (suite *KeeperTestSuite) TestDistributeCollectiveRewards() { }, }, 0, 86400, 1000000, - 30, 86400, 3000, + sdk.NewDecWithPrec(30, 2), + 86400, 3000, ) _, err = msgServer.CreateCollective(sdk.WrapSDKContext(suite.ctx), msg) @@ -165,7 +166,8 @@ func (suite *KeeperTestSuite) TestEndBlocker() { }, }, 0, 86400, 1000000, - 30, 86400, 3000, + sdk.NewDecWithPrec(30, 2), + 86400, 3000, ) _, err = msgServer.CreateCollective(sdk.WrapSDKContext(suite.ctx), msg) diff --git a/x/collectives/keeper/collective.go b/x/collectives/keeper/collective.go index 9af1470d0..f8f447e91 100644 --- a/x/collectives/keeper/collective.go +++ b/x/collectives/keeper/collective.go @@ -122,7 +122,7 @@ func (k Keeper) GetBondsValue(ctx sdk.Context, bonds sdk.Coins) sdk.Dec { bondsValue := sdk.ZeroDec() for _, bond := range bonds { denom := multistakingtypes.GetOriginalDenom(bond.Denom) - rate := k.tk.GetTokenRate(ctx, denom) + rate := k.tk.GetTokenInfo(ctx, denom) if rate == nil { continue } diff --git a/x/collectives/keeper/collective_test.go b/x/collectives/keeper/collective_test.go index 3f0c4b1ba..c70ba1f90 100644 --- a/x/collectives/keeper/collective_test.go +++ b/x/collectives/keeper/collective_test.go @@ -28,7 +28,7 @@ func (suite *KeeperTestSuite) TestCollectiveSetGetDelete() { ClaimStart: 0, ClaimPeriod: 1000, ClaimEnd: 100000, - VoteQuorum: 30, + VoteQuorum: sdk.NewDecWithPrec(30, 2), VotePeriod: 86400, VoteEnactment: 3000, Donations: []sdk.Coin{sdk.NewInt64Coin("ukex", 1000_000)}, @@ -55,7 +55,7 @@ func (suite *KeeperTestSuite) TestCollectiveSetGetDelete() { ClaimStart: 0, ClaimPeriod: 1000, ClaimEnd: 100000, - VoteQuorum: 30, + VoteQuorum: sdk.NewDecWithPrec(30, 2), VotePeriod: 86400, VoteEnactment: 3000, Donations: []sdk.Coin{sdk.NewInt64Coin("ukex", 1000_000)}, @@ -160,7 +160,7 @@ func (suite *KeeperTestSuite) TestSendDonation() { ClaimStart: 0, ClaimPeriod: 1000, ClaimEnd: 100000, - VoteQuorum: 30, + VoteQuorum: sdk.NewDecWithPrec(30, 2), VotePeriod: 86400, VoteEnactment: 3000, Donations: []sdk.Coin{sdk.NewInt64Coin("ukex", 100_000)}, @@ -199,7 +199,7 @@ func (suite *KeeperTestSuite) GetBondsValue() { suite.Require().Equal(value, sdk.NewDec(1000_000)) // get bonds value with newly registered token - suite.app.TokensKeeper.UpsertTokenRate(suite.ctx, tokenstypes.TokenRate{ + suite.app.TokensKeeper.UpsertTokenInfo(suite.ctx, tokenstypes.TokenInfo{ Denom: "zzz", FeeRate: sdk.NewDec(10), }) @@ -228,7 +228,7 @@ func (suite *KeeperTestSuite) WithdrawCollective() { ClaimStart: 0, ClaimPeriod: 1000, ClaimEnd: 100000, - VoteQuorum: 30, + VoteQuorum: sdk.NewDecWithPrec(30, 2), VotePeriod: 86400, VoteEnactment: 3000, Donations: []sdk.Coin{sdk.NewInt64Coin("ukex", 100_000)}, @@ -296,7 +296,7 @@ func (suite *KeeperTestSuite) ExecuteCollectiveRemove() { ClaimStart: 0, ClaimPeriod: 1000, ClaimEnd: 100000, - VoteQuorum: 30, + VoteQuorum: sdk.NewDecWithPrec(30, 2), VotePeriod: 86400, VoteEnactment: 3000, Donations: []sdk.Coin{sdk.NewInt64Coin("ukex", 100_000)}, diff --git a/x/collectives/keeper/msg_server_test.go b/x/collectives/keeper/msg_server_test.go index bf6fd9415..6000a9acf 100644 --- a/x/collectives/keeper/msg_server_test.go +++ b/x/collectives/keeper/msg_server_test.go @@ -72,7 +72,7 @@ func (suite *KeeperTestSuite) TestCreateCollective() { }, }, 0, 86400, 1000000, - 30, 86400, 3000, + sdk.NewDecWithPrec(30, 2), 86400, 3000, ) _, err = msgServer.CreateCollective(sdk.WrapSDKContext(suite.ctx), msg) @@ -142,7 +142,7 @@ func (suite *KeeperTestSuite) TestContributeCollective() { }, }, 0, 86400, 1000000, - 30, 86400, 3000, + sdk.NewDecWithPrec(30, 2), 86400, 3000, ) _, err = msgServer.CreateCollective(sdk.WrapSDKContext(suite.ctx), msg) @@ -219,7 +219,7 @@ func (suite *KeeperTestSuite) TestDonateCollective() { }, }, 0, 86400, 1000000, - 30, 86400, 3000, + sdk.NewDecWithPrec(30, 2), 86400, 3000, ) _, err = msgServer.CreateCollective(sdk.WrapSDKContext(suite.ctx), msg) @@ -317,7 +317,7 @@ func (suite *KeeperTestSuite) TestWithdrawCollective() { }, }, 0, 86400, 1000000, - 30, 86400, 3000, + sdk.NewDecWithPrec(30, 2), 86400, 3000, ) _, err = msgServer.CreateCollective(sdk.WrapSDKContext(suite.ctx), msg) diff --git a/x/collectives/proposal_handler.go b/x/collectives/proposal_handler.go index 1c2fafcec..4027d5de1 100644 --- a/x/collectives/proposal_handler.go +++ b/x/collectives/proposal_handler.go @@ -44,12 +44,12 @@ func (a ApplyCollectiveSendDonationProposalHandler) AllowedAddresses(ctx sdk.Con return a.keeper.AllowedAddresses(ctx, collective.OwnersWhitelist) } -func (a ApplyCollectiveSendDonationProposalHandler) Quorum(ctx sdk.Context, proposal govtypes.Content) uint64 { +func (a ApplyCollectiveSendDonationProposalHandler) Quorum(ctx sdk.Context, proposal govtypes.Content) sdk.Dec { p := proposal.(*types.ProposalCollectiveSendDonation) collective := a.keeper.GetCollective(ctx, p.Name) if collective.Name == "" { - return 0 + return sdk.ZeroDec() } return collective.VoteQuorum @@ -123,12 +123,12 @@ func (a ApplyCollectiveUpdateProposalHandler) AllowedAddresses(ctx sdk.Context, return a.keeper.AllowedAddresses(ctx, collective.OwnersWhitelist) } -func (a ApplyCollectiveUpdateProposalHandler) Quorum(ctx sdk.Context, proposal govtypes.Content) uint64 { +func (a ApplyCollectiveUpdateProposalHandler) Quorum(ctx sdk.Context, proposal govtypes.Content) sdk.Dec { p := proposal.(*types.ProposalCollectiveUpdate) collective := a.keeper.GetCollective(ctx, p.Name) if collective.Name == "" { - return 0 + return sdk.ZeroDec() } return collective.VoteQuorum @@ -216,12 +216,12 @@ func (a ApplyCollectiveRemoveProposalHandler) AllowedAddresses(ctx sdk.Context, return a.keeper.AllowedAddresses(ctx, collective.OwnersWhitelist) } -func (a ApplyCollectiveRemoveProposalHandler) Quorum(ctx sdk.Context, proposal govtypes.Content) uint64 { +func (a ApplyCollectiveRemoveProposalHandler) Quorum(ctx sdk.Context, proposal govtypes.Content) sdk.Dec { p := proposal.(*types.ProposalCollectiveRemove) collective := a.keeper.GetCollective(ctx, p.Name) if collective.Name == "" { - return 0 + return sdk.ZeroDec() } return collective.VoteQuorum diff --git a/x/collectives/types/collective.pb.go b/x/collectives/types/collective.pb.go index e97c55516..c81595473 100644 --- a/x/collectives/types/collective.pb.go +++ b/x/collectives/types/collective.pb.go @@ -225,7 +225,7 @@ type Collective struct { ClaimStart uint64 `protobuf:"varint,7,opt,name=claim_start,json=claimStart,proto3" json:"claim_start,omitempty"` ClaimPeriod uint64 `protobuf:"varint,8,opt,name=claim_period,json=claimPeriod,proto3" json:"claim_period,omitempty"` ClaimEnd uint64 `protobuf:"varint,9,opt,name=claim_end,json=claimEnd,proto3" json:"claim_end,omitempty"` - VoteQuorum uint64 `protobuf:"varint,10,opt,name=vote_quorum,json=voteQuorum,proto3" json:"vote_quorum,omitempty"` + VoteQuorum github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,10,opt,name=vote_quorum,json=voteQuorum,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"vote_quorum"` VotePeriod uint64 `protobuf:"varint,11,opt,name=vote_period,json=votePeriod,proto3" json:"vote_period,omitempty"` VoteEnactment uint64 `protobuf:"varint,12,opt,name=vote_enactment,json=voteEnactment,proto3" json:"vote_enactment,omitempty"` Donations []github_com_cosmos_cosmos_sdk_types.Coin `protobuf:"bytes,13,rep,name=donations,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Coin" json:"donations"` @@ -331,13 +331,6 @@ func (m *Collective) GetClaimEnd() uint64 { return 0 } -func (m *Collective) GetVoteQuorum() uint64 { - if m != nil { - return m.VoteQuorum - } - return 0 -} - func (m *Collective) GetVotePeriod() uint64 { if m != nil { return m.VotePeriod @@ -448,60 +441,61 @@ func init() { func init() { proto.RegisterFile("kira/collectives/collective.proto", fileDescriptor_a034e57fe22de5f1) } var fileDescriptor_a034e57fe22de5f1 = []byte{ - // 848 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x55, 0xcf, 0x6f, 0x23, 0x35, - 0x14, 0xce, 0x24, 0x69, 0x7e, 0xbc, 0xf4, 0xc7, 0xd4, 0x2a, 0xc8, 0x04, 0x29, 0x99, 0x16, 0x58, - 0x22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a2, 0xcd, 0x3e, - 0xb8, 0xc2, 0x9a, 0x93, 0x53, 0xdd, 0xb2, 0xaa, 0x87, 0xaf, 0xaa, 0x16, 0x6c, 0x4c, 0x45, 0xf7, - 0x44, 0xc1, 0xdd, 0x09, 0xec, 0xaa, 0xd4, 0x9d, 0xe9, 0x52, 0x88, 0x48, 0xe1, 0x9a, 0x57, 0xe9, - 0xb5, 0xee, 0xdd, 0x79, 0x55, 0xf1, 0x26, 0x37, 0x53, 0xd9, 0x1d, 0x95, 0xc3, 0x14, 0xea, 0x42, - 0x2b, 0x88, 0x08, 0x8b, 0xa7, 0x4a, 0x13, 0xa9, 0x71, 0xdd, 0x73, 0x7a, 0x55, 0x1f, 0x2c, 0x34, - 0x31, 0x08, 0x3a, 0x84, 0xed, 0x84, 0xb0, 0xa4, 0x92, 0x89, 0x10, 0x37, 0x2c, 0x23, 0x09, 0x3a, - 0xb3, 0x10, 0x7a, 0x13, 0x9a, 0x09, 0x85, 0xf2, 0x10, 0x37, 0xed, 0x7a, 0xc3, 0x02, 0x23, 0x1e, - 0x9a, 0x04, 0x8f, 0x85, 0xa6, 0xd3, 0xef, 0x56, 0x42, 0xae, 0x62, 0x0c, 0x49, 0x02, 0x03, 0x7d, - 0x69, 0x91, 0x35, 0x21, 0xd5, 0x6f, 0x6d, 0x08, 0xa9, 0xfc, 0x3b, 0xb0, 0x6b, 0x09, 0x94, 0x93, - 0x40, 0xc7, 0x94, 0x6b, 0xbc, 0x6d, 0x39, 0x3b, 0x06, 0x1d, 0x65, 0x20, 0xfa, 0x0c, 0x9a, 0xa1, - 0xe0, 0xc4, 0x54, 0x84, 0xc2, 0x3b, 0xa6, 0xce, 0x4f, 0x06, 0x69, 0x6d, 0xbe, 0xfb, 0x2f, 0x6a, - 0x73, 0x28, 0x18, 0xf7, 0x37, 0x0a, 0x68, 0x0c, 0x75, 0x49, 0x2f, 0x88, 0x0c, 0x15, 0xde, 0xbd, - 0x9d, 0x58, 0x16, 0x8f, 0xde, 0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3, 0xe3, 0x87, 0x93, 0xd1, 0xa9, 0x5b, - 0x2e, 0xea, 0x9c, 0x91, 0x95, 0xa2, 0x61, 0xbb, 0xfa, 0xe3, 0xaf, 0x9d, 0xd2, 0xc9, 0x47, 0xcf, - 0xaf, 0x3a, 0xce, 0x8b, 0xab, 0x8e, 0xf3, 0xc7, 0x55, 0xc7, 0xf9, 0xe9, 0xba, 0x53, 0x7a, 0x71, - 0xdd, 0x29, 0xfd, 0x76, 0xdd, 0x29, 0x7d, 0x7d, 0x37, 0x77, 0xea, 0x4f, 0x98, 0x24, 0x43, 0x21, - 0xe9, 0x40, 0xd1, 0x05, 0x61, 0x83, 0x27, 0x7f, 0xfb, 0x31, 0xda, 0x0b, 0x98, 0xd5, 0xec, 0x5f, - 0xe9, 0x83, 0xbf, 0x02, 0x00, 0x00, 0xff, 0xff, 0x09, 0x7d, 0x11, 0xc7, 0x39, 0x07, 0x00, 0x00, + // 857 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x55, 0x4d, 0x6f, 0x23, 0x35, + 0x18, 0xce, 0x24, 0x69, 0x3e, 0xde, 0xf4, 0x63, 0x6a, 0x15, 0x64, 0x82, 0x94, 0x4c, 0x0b, 0x2c, + 0x11, 0x68, 0x13, 0x69, 0xb9, 0xed, 0xad, 0x4d, 0x03, 0x0a, 0x5f, 0x5b, 0x26, 0xbb, 0xac, 0x84, + 0x90, 0x22, 0x67, 0xc6, 0xa4, 0x56, 0x66, 0xec, 0x60, 0x3b, 0xdb, 0xed, 0x95, 0x13, 0xda, 0x13, + 0x37, 0x4e, 0x2b, 0x21, 0xf1, 0x0b, 0xf8, 0x17, 0x7b, 0xdc, 0x23, 0xe2, 0xb0, 0x42, 0xed, 0x85, + 0x9f, 0x81, 0xec, 0x99, 0x49, 0x86, 0x34, 0x48, 0xd0, 0x3d, 0x8d, 0xfd, 0xf8, 0x79, 0x9f, 0xf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 0xd4, 0xb8, 0xea, 0x39, 0x9d, 0xb2, 0x0f, + 0x16, 0x1a, 0x19, 0x04, 0x1d, 0xc2, 0x76, 0x42, 0x98, 0x53, 0xc9, 0x44, 0x88, 0x6b, 0x96, 0x91, + 0x04, 0x9d, 0x59, 0x08, 0xbd, 0x0d, 0xf5, 0x84, 0x42, 0x79, 0x88, 0xeb, 0x76, 0xbd, 0x66, 0x81, + 0x01, 0x0f, 0xd1, 0x03, 0x68, 0x3c, 0x11, 0x9a, 0x8e, 0xbf, 0x5f, 0x08, 0xb9, 0x88, 0x31, 0xdc, + 0xea, 0xd2, 0x80, 0x91, 0xf8, 0xca, 0x2a, 0x98, 0x8a, 0xad, 0x60, 0x5a, 0x4f, 0x23, 0xa9, 0xd8, + 0x40, 0x69, 0x39, 0xef, 0xc1, 0xae, 0x25, 0x50, 0x4e, 0x02, 0x1d, 0x53, 0xae, 0xf1, 0xb6, 0xe5, + 0xec, 0x18, 0x74, 0x90, 0x81, 0xe8, 0x0b, 0xa8, 0x87, 0x82, 0x13, 0x73, 0x83, 0x14, 0xde, 0x31, + 0x7d, 0x71, 0xd2, 0x4b, 0xcb, 0x7a, 0xff, 0x3f, 0x94, 0xd5, 0x17, 0x8c, 0xfb, 0x2b, 0x05, 0x34, + 0x84, 0xaa, 0xa4, 0x17, 0x44, 0x86, 0x0a, 0xef, 0xde, 0x4e, 0x2c, 0x8b, 0x47, 0x1f, 0xc2, 0x7e, + 0x44, 0x94, 0x1e, 0x87, 0x4c, 0x69, 0xc9, 0x26, 0x0b, 0x7b, 0xef, 0xf7, 0xec, 0x1e, 0x5c, 0xb3, + 0x70, 0x9a, 0xc3, 0xd1, 0x00, 0xb6, 0x26, 0x82, 0x87, 0x0a, 0xbb, 0xb7, 0xcb, 0x9a, 0x44, 0xa3, + 0x77, 0x60, 0x27, 0x90, 0xd4, 0xee, 0x65, 0x6c, 0xde, 0x31, 0xbc, 0x6f, 0xf3, 0x6d, 0x67, 0xe0, + 0x43, 0x16,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f, 0x48, 0xda, 0x53, 0x74, 0x46, 0x58, 0xef, 0xe9, + 0x3f, 0x7e, 0xa4, 0xf6, 0x00, 0x26, 0x15, 0xfb, 0x17, 0xfb, 0xe8, 0xef, 0x00, 0x00, 0x00, 0xff, + 0xff, 0x18, 0x74, 0x16, 0xf4, 0x69, 0x07, 0x00, 0x00, } func (this *DepositWhitelist) Equal(that interface{}) bool { @@ -659,7 +653,7 @@ func (this *Collective) Equal(that interface{}) bool { if this.ClaimEnd != that1.ClaimEnd { return false } - if this.VoteQuorum != that1.VoteQuorum { + if !this.VoteQuorum.Equal(that1.VoteQuorum) { return false } if this.VotePeriod != that1.VotePeriod { @@ -936,11 +930,16 @@ func (m *Collective) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x58 } - if m.VoteQuorum != 0 { - i = encodeVarintCollective(dAtA, i, uint64(m.VoteQuorum)) - i-- - dAtA[i] = 0x50 + { + size := m.VoteQuorum.Size() + i -= size + if _, err := m.VoteQuorum.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintCollective(dAtA, i, uint64(size)) } + i-- + dAtA[i] = 0x52 if m.ClaimEnd != 0 { i = encodeVarintCollective(dAtA, i, uint64(m.ClaimEnd)) i-- @@ -1197,9 +1196,8 @@ func (m *Collective) Size() (n int) { if m.ClaimEnd != 0 { n += 1 + sovCollective(uint64(m.ClaimEnd)) } - if m.VoteQuorum != 0 { - n += 1 + sovCollective(uint64(m.VoteQuorum)) - } + l = m.VoteQuorum.Size() + n += 1 + l + sovCollective(uint64(l)) if m.VotePeriod != 0 { n += 1 + sovCollective(uint64(m.VotePeriod)) } @@ -1992,10 +1990,10 @@ func (m *Collective) Unmarshal(dAtA []byte) error { } } case 10: - if wireType != 0 { + if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field VoteQuorum", wireType) } - m.VoteQuorum = 0 + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowCollective @@ -2005,11 +2003,26 @@ func (m *Collective) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.VoteQuorum |= uint64(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthCollective + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthCollective + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.VoteQuorum.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex case 11: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field VotePeriod", wireType) diff --git a/x/collectives/types/expected_keepers.go b/x/collectives/types/expected_keepers.go index ba68ab1f6..630b65e31 100644 --- a/x/collectives/types/expected_keepers.go +++ b/x/collectives/types/expected_keepers.go @@ -29,5 +29,5 @@ type MultiStakingKeeper interface { // TokensKeeper defines expected interface needed to get token rate type TokensKeeper interface { - GetTokenRate(ctx sdk.Context, denom string) *tokenstypes.TokenRate + GetTokenInfo(ctx sdk.Context, denom string) *tokenstypes.TokenInfo } diff --git a/x/collectives/types/msgs.go b/x/collectives/types/msgs.go index d902f72aa..efd4dc90c 100644 --- a/x/collectives/types/msgs.go +++ b/x/collectives/types/msgs.go @@ -15,8 +15,9 @@ func NewMsgCreateCollective( depositWhitelist DepositWhitelist, ownersWhitelist OwnersWhitelist, weightedSpendingPool []WeightedSpendingPool, - claimStart, claimPeriod, claimEnd, - voteQuorum, votePeriod, voteEnactment uint64, + claimStart, claimPeriod, claimEnd uint64, + voteQuorum sdk.Dec, + votePeriod, voteEnactment uint64, ) *MsgCreateCollective { return &MsgCreateCollective{ Sender: proposer.String(), @@ -75,7 +76,7 @@ func (m *MsgCreateCollective) ValidateBasic() error { if m.ClaimPeriod == 0 { return ErrInvalidClaimPeriod } - if m.VoteQuorum == 0 { + if m.VoteQuorum.IsZero() { return ErrInvalidVoteQuorum } if m.VotePeriod == 0 { diff --git a/x/collectives/types/proposal.go b/x/collectives/types/proposal.go index a55a99d16..85a72b98d 100644 --- a/x/collectives/types/proposal.go +++ b/x/collectives/types/proposal.go @@ -41,8 +41,9 @@ func NewProposalCollectiveUpdate( depositWhitelist DepositWhitelist, ownersWhitelist OwnersWhitelist, weightedSpendingPool []WeightedSpendingPool, - claimStart, claimPeriod, claimEnd, - voteQuorum, votePeriod, voteEnactment uint64, + claimStart, claimPeriod, claimEnd uint64, + voteQuorum sdk.Dec, + votePeriod, voteEnactment uint64, ) *ProposalCollectiveUpdate { return &ProposalCollectiveUpdate{ Name: name, diff --git a/x/collectives/types/proposal.pb.go b/x/collectives/types/proposal.pb.go index 757ae60f3..7409a7def 100644 --- a/x/collectives/types/proposal.pb.go +++ b/x/collectives/types/proposal.pb.go @@ -81,18 +81,18 @@ func (m *ProposalCollectiveSendDonation) GetAddress() string { // proposal to update staking collective, e.g. change description, owners, contributors, spending-pool list, claim period, etc. type ProposalCollectiveUpdate struct { - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` - Status CollectiveStatus `protobuf:"varint,3,opt,name=status,proto3,enum=kira.collectives.CollectiveStatus" json:"status,omitempty"` - DepositWhitelist DepositWhitelist `protobuf:"bytes,4,opt,name=deposit_whitelist,json=depositWhitelist,proto3" json:"deposit_whitelist"` - OwnersWhitelist OwnersWhitelist `protobuf:"bytes,5,opt,name=owners_whitelist,json=ownersWhitelist,proto3" json:"owners_whitelist"` - SpendingPools []WeightedSpendingPool `protobuf:"bytes,6,rep,name=spending_pools,json=spendingPools,proto3" json:"spending_pools"` - ClaimStart uint64 `protobuf:"varint,7,opt,name=claim_start,json=claimStart,proto3" json:"claim_start,omitempty"` - ClaimPeriod uint64 `protobuf:"varint,8,opt,name=claim_period,json=claimPeriod,proto3" json:"claim_period,omitempty"` - ClaimEnd uint64 `protobuf:"varint,9,opt,name=claim_end,json=claimEnd,proto3" json:"claim_end,omitempty"` - VoteQuorum uint64 `protobuf:"varint,10,opt,name=vote_quorum,json=voteQuorum,proto3" json:"vote_quorum,omitempty"` - VotePeriod uint64 `protobuf:"varint,11,opt,name=vote_period,json=votePeriod,proto3" json:"vote_period,omitempty"` - VoteEnactment uint64 `protobuf:"varint,12,opt,name=vote_enactment,json=voteEnactment,proto3" json:"vote_enactment,omitempty"` + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` + Status CollectiveStatus `protobuf:"varint,3,opt,name=status,proto3,enum=kira.collectives.CollectiveStatus" json:"status,omitempty"` + DepositWhitelist DepositWhitelist `protobuf:"bytes,4,opt,name=deposit_whitelist,json=depositWhitelist,proto3" json:"deposit_whitelist"` + OwnersWhitelist OwnersWhitelist `protobuf:"bytes,5,opt,name=owners_whitelist,json=ownersWhitelist,proto3" json:"owners_whitelist"` + SpendingPools []WeightedSpendingPool `protobuf:"bytes,6,rep,name=spending_pools,json=spendingPools,proto3" json:"spending_pools"` + ClaimStart uint64 `protobuf:"varint,7,opt,name=claim_start,json=claimStart,proto3" json:"claim_start,omitempty"` + ClaimPeriod uint64 `protobuf:"varint,8,opt,name=claim_period,json=claimPeriod,proto3" json:"claim_period,omitempty"` + ClaimEnd uint64 `protobuf:"varint,9,opt,name=claim_end,json=claimEnd,proto3" json:"claim_end,omitempty"` + VoteQuorum github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,10,opt,name=vote_quorum,json=voteQuorum,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"vote_quorum"` + VotePeriod uint64 `protobuf:"varint,11,opt,name=vote_period,json=votePeriod,proto3" json:"vote_period,omitempty"` + VoteEnactment uint64 `protobuf:"varint,12,opt,name=vote_enactment,json=voteEnactment,proto3" json:"vote_enactment,omitempty"` } func (m *ProposalCollectiveUpdate) Reset() { *m = ProposalCollectiveUpdate{} } @@ -191,13 +191,6 @@ func (m *ProposalCollectiveUpdate) GetClaimEnd() uint64 { return 0 } -func (m *ProposalCollectiveUpdate) GetVoteQuorum() uint64 { - if m != nil { - return m.VoteQuorum - } - return 0 -} - func (m *ProposalCollectiveUpdate) GetVotePeriod() uint64 { if m != nil { return m.VotePeriod @@ -266,43 +259,44 @@ func init() { func init() { proto.RegisterFile("kira/collectives/proposal.proto", fileDescriptor_6173a479da28660d) } var fileDescriptor_6173a479da28660d = []byte{ - // 567 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x93, 0xcf, 0x6e, 0xd3, 0x4e, - 0x10, 0xc7, 0xe3, 0x5f, 0xf3, 0x6b, 0x9a, 0x4d, 0xff, 0xb1, 0xe2, 0xb0, 0x14, 0xc9, 0x71, 0x2b, - 0x01, 0xbe, 0xc4, 0x96, 0xca, 0xad, 0x17, 0xa4, 0xa4, 0x15, 0x42, 0x1c, 0x08, 0x8e, 0xaa, 0x4a, - 0x5c, 0xa2, 0xad, 0x77, 0x95, 0xac, 0x62, 0xef, 0x18, 0xef, 0x26, 0x85, 0xb7, 0xe0, 0x11, 0x38, - 0x73, 0xe6, 0x21, 0x2a, 0x4e, 0x3d, 0x22, 0x0e, 0x15, 0x4a, 0x0e, 0xf0, 0x18, 0xc8, 0x6b, 0xa7, - 0x75, 0xe3, 0x9c, 0xbc, 0xfb, 0x9d, 0xcf, 0x7e, 0x67, 0x3c, 0x9a, 0x41, 0xed, 0x89, 0x48, 0xa9, - 0x1f, 0x42, 0x14, 0xf1, 0x50, 0x8b, 0x19, 0x57, 0x7e, 0x92, 0x42, 0x02, 0x8a, 0x46, 0x5e, 0x92, - 0x82, 0x06, 0xbc, 0x9f, 0x01, 0x5e, 0x09, 0x38, 0x78, 0x3c, 0x82, 0x11, 0x98, 0xa0, 0x9f, 0x9d, - 0x72, 0xee, 0xe0, 0x49, 0x08, 0x2a, 0x06, 0x35, 0xcc, 0x03, 0xf9, 0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 0xf7, 0xf5, 0xf5, 0xdc, 0xb6, 0x6e, 0xe6, 0xb6, - 0xf5, 0x7b, 0x6e, 0x5b, 0x5f, 0x16, 0x76, 0xed, 0x66, 0x61, 0xd7, 0x7e, 0x2e, 0xec, 0xda, 0x87, - 0x4e, 0x69, 0x0f, 0xde, 0x8a, 0x94, 0xf6, 0x20, 0xe5, 0xbe, 0xe2, 0x13, 0x2a, 0xfc, 0x4f, 0x0f, - 0x76, 0xd5, 0xac, 0xc4, 0xe5, 0xa6, 0xd9, 0xd3, 0x97, 0xff, 0x02, 0x00, 0x00, 0xff, 0xff, 0xeb, - 0x04, 0x0f, 0xe5, 0x30, 0x04, 0x00, 0x00, + // 586 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x93, 0xbf, 0x6e, 0xdb, 0x3c, + 0x14, 0xc5, 0xad, 0x2f, 0x4e, 0x1c, 0xd3, 0xf9, 0xf7, 0x11, 0x1d, 0xd8, 0x14, 0x90, 0x9d, 0x00, + 0x4d, 0xb5, 0x44, 0x02, 0xd2, 0x2d, 0x4b, 0x01, 0x3b, 0x41, 0x51, 0x74, 0x48, 0x2a, 0x23, 0x08, + 0xd0, 0xc5, 0x60, 0xc4, 0x0b, 0x87, 0x88, 0xc4, 0xab, 0x8a, 0x74, 0xd2, 0xbe, 0x45, 0xb7, 0xae, + 0x9d, 0x3b, 0xf7, 0x21, 0x82, 0x4e, 0x19, 0x8b, 0x0e, 0x41, 0x91, 0x2c, 0x7d, 0x8c, 0x42, 0x94, + 0xdc, 0x2a, 0x96, 0x87, 0x4e, 0x22, 0xcf, 0xfd, 0xf1, 0xf0, 0x90, 0xba, 0x24, 0xdd, 0x0b, 0x99, + 0xf1, 0x20, 0xc2, 0x38, 0x86, 0xc8, 0xc8, 0x4b, 0xd0, 0x41, 0x9a, 0x61, 0x8a, 0x9a, 0xc7, 0x7e, + 0x9a, 0xa1, 0x41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x89, + 0xad, 0x61, 0x99, 0xa7, 0x53, 0x24, 0xce, 0xa5, 0x32, 0xce, 0x53, 0xb2, 0x66, 0x01, 0x50, 0x3c, + 0x32, 0x09, 0x28, 0xc3, 0x56, 0x2c, 0xb3, 0x9a, 0xab, 0x87, 0x53, 0xb1, 0xde, 0x99, 0x2f, 0xe6, + 0x35, 0x66, 0x08, 0x09, 0x5e, 0xce, 0x6d, 0xcc, 0x9a, 0x41, 0xff, 0xe5, 0xf5, 0x9d, 0xeb, 0xdc, + 0xdc, 0xb9, 0xce, 0xcf, 0x3b, 0xd7, 0xf9, 0x78, 0xef, 0x36, 0x6e, 0xee, 0xdd, 0xc6, 0xf7, 0x7b, + 0xb7, 0xf1, 0x76, 0xb7, 0x72, 0xce, 0xd7, 0x32, 0xe3, 0x03, 0xcc, 0x20, 0xd0, 0x70, 0xc1, 0x65, + 0xf0, 0xfe, 0xc1, 0xdb, 0xb6, 0x47, 0x3e, 0x5b, 0xb2, 0xef, 0xfa, 0xf9, 0xef, 0x00, 0x00, 0x00, + 0xff, 0xff, 0x1a, 0xfc, 0x12, 0x4d, 0x60, 0x04, 0x00, 0x00, } func (this *ProposalCollectiveSendDonation) Equal(that interface{}) bool { @@ -391,7 +385,7 @@ func (this *ProposalCollectiveUpdate) Equal(that interface{}) bool { if this.ClaimEnd != that1.ClaimEnd { return false } - if this.VoteQuorum != that1.VoteQuorum { + if !this.VoteQuorum.Equal(that1.VoteQuorum) { return false } if this.VotePeriod != that1.VotePeriod { @@ -507,11 +501,16 @@ func (m *ProposalCollectiveUpdate) MarshalToSizedBuffer(dAtA []byte) (int, error i-- dAtA[i] = 0x58 } - if m.VoteQuorum != 0 { - i = encodeVarintProposal(dAtA, i, uint64(m.VoteQuorum)) - i-- - dAtA[i] = 0x50 + { + size := m.VoteQuorum.Size() + i -= size + if _, err := m.VoteQuorum.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintProposal(dAtA, i, uint64(size)) } + i-- + dAtA[i] = 0x52 if m.ClaimEnd != 0 { i = encodeVarintProposal(dAtA, i, uint64(m.ClaimEnd)) i-- @@ -683,9 +682,8 @@ func (m *ProposalCollectiveUpdate) Size() (n int) { if m.ClaimEnd != 0 { n += 1 + sovProposal(uint64(m.ClaimEnd)) } - if m.VoteQuorum != 0 { - n += 1 + sovProposal(uint64(m.VoteQuorum)) - } + l = m.VoteQuorum.Size() + n += 1 + l + sovProposal(uint64(l)) if m.VotePeriod != 0 { n += 1 + sovProposal(uint64(m.VotePeriod)) } @@ -1134,10 +1132,10 @@ func (m *ProposalCollectiveUpdate) Unmarshal(dAtA []byte) error { } } case 10: - if wireType != 0 { + if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field VoteQuorum", wireType) } - m.VoteQuorum = 0 + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowProposal @@ -1147,11 +1145,26 @@ func (m *ProposalCollectiveUpdate) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.VoteQuorum |= uint64(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthProposal + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthProposal + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.VoteQuorum.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex case 11: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field VotePeriod", wireType) diff --git a/x/collectives/types/tx.pb.go b/x/collectives/types/tx.pb.go index 62e97c938..b8c152d67 100644 --- a/x/collectives/types/tx.pb.go +++ b/x/collectives/types/tx.pb.go @@ -43,7 +43,7 @@ type MsgCreateCollective struct { ClaimStart uint64 `protobuf:"varint,8,opt,name=claim_start,json=claimStart,proto3" json:"claim_start,omitempty"` ClaimPeriod uint64 `protobuf:"varint,9,opt,name=claim_period,json=claimPeriod,proto3" json:"claim_period,omitempty"` ClaimEnd uint64 `protobuf:"varint,10,opt,name=claim_end,json=claimEnd,proto3" json:"claim_end,omitempty"` - VoteQuorum uint64 `protobuf:"varint,11,opt,name=vote_quorum,json=voteQuorum,proto3" json:"vote_quorum,omitempty"` + VoteQuorum github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,11,opt,name=vote_quorum,json=voteQuorum,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"vote_quorum"` VotePeriod uint64 `protobuf:"varint,12,opt,name=vote_period,json=votePeriod,proto3" json:"vote_period,omitempty"` VoteEnactment uint64 `protobuf:"varint,13,opt,name=vote_enactment,json=voteEnactment,proto3" json:"vote_enactment,omitempty"` } @@ -144,13 +144,6 @@ func (m *MsgCreateCollective) GetClaimEnd() uint64 { return 0 } -func (m *MsgCreateCollective) GetVoteQuorum() uint64 { - if m != nil { - return m.VoteQuorum - } - return 0 -} - func (m *MsgCreateCollective) GetVotePeriod() uint64 { if m != nil { return m.VotePeriod @@ -501,54 +494,54 @@ func init() { func init() { proto.RegisterFile("kira/collectives/tx.proto", fileDescriptor_0cc3032dd5313583) } var fileDescriptor_0cc3032dd5313583 = []byte{ - // 743 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x55, 0xcd, 0x4e, 0xdb, 0x4a, - 0x14, 0x8e, 0x6f, 0x0c, 0x24, 0x13, 0xc2, 0x0d, 0x73, 0xb9, 0x95, 0x09, 0x22, 0x09, 0x41, 0x40, - 0xa4, 0x8a, 0x58, 0xa2, 0xbb, 0x2e, 0x13, 0x50, 0xa5, 0xb6, 0x51, 0xa9, 0x51, 0x85, 0xd4, 0x4d, - 0xe4, 0xd8, 0x53, 0x67, 0x14, 0x7b, 0x8e, 0xeb, 0x99, 0xf0, 0xf3, 0x02, 0x5d, 0xf7, 0x11, 0xfa, - 0x0e, 0x7d, 0x09, 0x16, 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 0x15, 0xfd, 0x61, 0xaf, 0x69, 0x81, - 0x17, 0x77, 0x16, 0xff, 0xec, 0x73, 0x7b, 0xa0, 0x8b, 0x4b, 0x9f, 0xf0, 0x66, 0x1b, 0x28, 0x33, - 0xa2, 0x6c, 0xfc, 0x0e, 0xad, 0xda, 0xc4, 0x07, 0x4e, 0x45, 0xf7, 0xbc, 0x4f, 0x05, 0x71, 0x29, - 0x17, 0xda, 0x42, 0x4d, 0x69, 0x14, 0x0e, 0xea, 0xcd, 0xe9, 0xbf, 0xba, 0x79, 0x18, 0x51, 0x4f, - 0x13, 0x66, 0x4b, 0x0d, 0xcb, 0x1a, 0x25, 0x7b, 0x0a, 0xc7, 0x06, 0x2a, 0xc1, 0x39, 0x23, 0x01, - 0x1f, 0x53, 0x5d, 0x94, 0xaa, 0x5b, 0x69, 0xd5, 0x37, 0x92, 0x39, 0x2d, 0xfa, 0x2f, 0x4c, 0xc2, - 0xf8, 0x04, 0xad, 0x70, 0x9f, 0x30, 0x9b, 0x32, 0xa7, 0xeb, 0x03, 0xb8, 0x5c, 0x5b, 0xaa, 0x65, - 0x1b, 0x85, 0x83, 0xdd, 0xb4, 0xe2, 0x29, 0xa1, 0x4e, 0x5f, 0x10, 0xfb, 0x24, 0xe6, 0x1f, 0x03, - 0xb8, 0xb1, 0x6c, 0x91, 0x8f, 0x61, 0x1c, 0x57, 0x51, 0xc1, 0x72, 0x4d, 0xea, 0x75, 0xb9, 0x30, - 0x03, 0xa1, 0xe5, 0x6a, 0x4a, 0x43, 0x35, 0x90, 0x84, 0x4e, 0x42, 0x04, 0x6f, 0xa1, 0xe5, 0x88, - 0xe0, 0x93, 0x80, 0x82, 0xad, 0xe5, 0x25, 0x23, 0x4a, 0x3a, 0x96, 0x10, 0xde, 0x40, 0xf9, 0x88, - 0x42, 0x98, 0xad, 0x21, 0x19, 0xcf, 0x49, 0xe0, 0x88, 0xd9, 0x61, 0x81, 0x33, 0x10, 0xa4, 0xfb, - 0x71, 0x08, 0xc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 0x7a, 0x82, 0x66, 0x98, 0xa8, 0xbc, 0x3f, 0x17, - 0x2d, 0xa9, 0x88, 0xfb, 0x68, 0xad, 0x0d, 0x4c, 0x04, 0xb4, 0x37, 0x9c, 0xa8, 0xb6, 0x3d, 0x53, - 0x66, 0xd2, 0x0a, 0xe5, 0xa7, 0x73, 0x90, 0xc6, 0x2a, 0x95, 0x52, 0x5e, 0x99, 0xdd, 0xd3, 0x34, - 0xed, 0x81, 0x9e, 0x1e, 0xba, 0x2b, 0xcc, 0x10, 0x9e, 0x71, 0x51, 0x7b, 0x33, 0x45, 0xd2, 0xc4, - 0xb2, 0x3e, 0x27, 0x31, 0xa9, 0xd7, 0x7a, 0x71, 0x75, 0x5b, 0x51, 0xae, 0x6f, 0x2b, 0xca, 0xcf, - 0xdb, 0x8a, 0xf2, 0xf9, 0xae, 0x92, 0xb9, 0xbe, 0xab, 0x64, 0xbe, 0xdf, 0x55, 0x32, 0xef, 0xf7, - 0xc7, 0xbc, 0xfa, 0x8a, 0x06, 0x66, 0x1b, 0x02, 0xa2, 0x73, 0x32, 0x30, 0xa9, 0x7e, 0x31, 0xf9, - 0x72, 0x86, 0xb6, 0xed, 0x2d, 0xca, 0xb7, 0xe9, 0xd9, 0x9f, 0x00, 0x00, 0x00, 0xff, 0xff, 0xa2, - 0x31, 0x24, 0x58, 0x5a, 0x07, 0x00, 0x00, + // 748 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x55, 0xcd, 0x6e, 0xda, 0x40, + 0x10, 0xc6, 0x85, 0x24, 0xb0, 0x84, 0x94, 0x6c, 0xd3, 0xca, 0x21, 0x0a, 0x10, 0xa2, 0x24, 0x48, + 0x55, 0xb0, 0x94, 0xde, 0x7a, 0x84, 0x44, 0x95, 0xda, 0xa2, 0xa4, 0x8e, 0xaa, 0x48, 0xbd, 0x20, + 0x63, 0x6f, 0xcd, 0x0a, 0x7b, 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6b, 0x15, 0xb4, 0x39, 0x55, 0x24, 0x8e, 0x72, + 0xf0, 0x3d, 0x8d, 0xd2, 0x6d, 0x6e, 0xe3, 0x1e, 0x2a, 0x26, 0xbe, 0x64, 0x3b, 0xc9, 0x8d, 0x9b, + 0x32, 0x44, 0xa5, 0xfd, 0x99, 0x68, 0x71, 0x44, 0xdc, 0x43, 0x6b, 0x2d, 0x60, 0xc2, 0xa7, 0xdd, + 0xc1, 0x58, 0xb4, 0xed, 0xa9, 0x32, 0xe3, 0xa3, 0x50, 0x7a, 0x3e, 0x03, 0x69, 0x24, 0x52, 0x31, + 0x31, 0x2b, 0xd3, 0x6b, 0x9a, 0xa4, 0x3d, 0x50, 0xd3, 0x43, 0xbd, 0xc2, 0x0c, 0xe1, 0x29, 0x8d, + 0xda, 0x9b, 0x2a, 0x92, 0x24, 0x96, 0xb4, 0x19, 0x89, 0x71, 0xbc, 0xe6, 0xab, 0xeb, 0xbb, 0xb2, + 0x72, 0x73, 0x57, 0x56, 0x7e, 0xdf, 0x95, 0x95, 0x2f, 0xf7, 0xe5, 0xd4, 0xcd, 0x7d, 0x39, 0xf5, + 0xf3, 0xbe, 0x9c, 0xfa, 0xb0, 0x3f, 0x32, 0xab, 0x6f, 0xa8, 0x6f, 0xb4, 0xc0, 0x27, 0x1a, 0x27, + 0x7d, 0x83, 0x6a, 0x97, 0xe3, 0x2f, 0x6d, 0x30, 0xb6, 0xdd, 0x45, 0xf9, 0x96, 0xbd, 0xf8, 0x1b, + 0x00, 0x00, 0xff, 0xff, 0xc5, 0x10, 0x2b, 0x29, 0x8a, 0x07, 0x00, 0x00, } func (this *MsgCreateCollective) Equal(that interface{}) bool { @@ -610,7 +603,7 @@ func (this *MsgCreateCollective) Equal(that interface{}) bool { if this.ClaimEnd != that1.ClaimEnd { return false } - if this.VoteQuorum != that1.VoteQuorum { + if !this.VoteQuorum.Equal(that1.VoteQuorum) { return false } if this.VotePeriod != that1.VotePeriod { @@ -862,11 +855,16 @@ func (m *MsgCreateCollective) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x60 } - if m.VoteQuorum != 0 { - i = encodeVarintTx(dAtA, i, uint64(m.VoteQuorum)) - i-- - dAtA[i] = 0x58 + { + size := m.VoteQuorum.Size() + i -= size + if _, err := m.VoteQuorum.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintTx(dAtA, i, uint64(size)) } + i-- + dAtA[i] = 0x5a if m.ClaimEnd != 0 { i = encodeVarintTx(dAtA, i, uint64(m.ClaimEnd)) i-- @@ -1250,9 +1248,8 @@ func (m *MsgCreateCollective) Size() (n int) { if m.ClaimEnd != 0 { n += 1 + sovTx(uint64(m.ClaimEnd)) } - if m.VoteQuorum != 0 { - n += 1 + sovTx(uint64(m.VoteQuorum)) - } + l = m.VoteQuorum.Size() + n += 1 + l + sovTx(uint64(l)) if m.VotePeriod != 0 { n += 1 + sovTx(uint64(m.VotePeriod)) } @@ -1688,10 +1685,10 @@ func (m *MsgCreateCollective) Unmarshal(dAtA []byte) error { } } case 11: - if wireType != 0 { + if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field VoteQuorum", wireType) } - m.VoteQuorum = 0 + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTx @@ -1701,11 +1698,26 @@ func (m *MsgCreateCollective) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.VoteQuorum |= uint64(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.VoteQuorum.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex case 12: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field VotePeriod", wireType) diff --git a/x/custody/types/msg.go b/x/custody/types/msg.go index a26dfd452..2d1a4fea0 100644 --- a/x/custody/types/msg.go +++ b/x/custody/types/msg.go @@ -1,6 +1,7 @@ package types import ( + errorsmod "cosmossdk.io/errors" "github.com/KiraCore/sekai/types" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" @@ -426,20 +427,20 @@ func (m MsgSend) Type() string { func (m MsgSend) ValidateBasic() error { _, err := sdk.AccAddressFromBech32(m.FromAddress) if err != nil { - return sdkerrors.Wrapf(sdkerrors.ErrInvalidAddress, "Invalid sender address (%s)", err) + return errorsmod.Wrapf(sdkerrors.ErrInvalidAddress, "Invalid sender address (%s)", err) } _, err = sdk.AccAddressFromBech32(m.ToAddress) if err != nil { - return sdkerrors.Wrapf(sdkerrors.ErrInvalidAddress, "Invalid recipient address (%s)", err) + return errorsmod.Wrapf(sdkerrors.ErrInvalidAddress, "Invalid recipient address (%s)", err) } if !m.Amount.IsValid() { - return sdkerrors.Wrap(sdkerrors.ErrInvalidCoins, m.Amount.String()) + return errorsmod.Wrap(sdkerrors.ErrInvalidCoins, m.Amount.String()) } if !m.Amount.IsAllPositive() { - return sdkerrors.Wrap(sdkerrors.ErrInvalidCoins, m.Amount.String()) + return errorsmod.Wrap(sdkerrors.ErrInvalidCoins, m.Amount.String()) } return nil diff --git a/x/distributor/keeper/distributor.go b/x/distributor/keeper/distributor.go index 80923e296..31448d652 100644 --- a/x/distributor/keeper/distributor.go +++ b/x/distributor/keeper/distributor.go @@ -47,7 +47,7 @@ func (k Keeper) AllocateTokens( inflationCoin := sdk.NewCoin(totalSupply.Denom, inflationRewards) if inflationRewards.IsPositive() { - err := k.bk.MintCoins(ctx, minttypes.ModuleName, sdk.Coins{inflationCoin}) + err := k.tk.MintCoins(ctx, minttypes.ModuleName, sdk.Coins{inflationCoin}) if err != nil { panic(err) } diff --git a/x/distributor/keeper/keeper.go b/x/distributor/keeper/keeper.go index 6ff42eb70..6fd607912 100644 --- a/x/distributor/keeper/keeper.go +++ b/x/distributor/keeper/keeper.go @@ -14,6 +14,7 @@ type Keeper struct { storeKey storetypes.StoreKey ak types.AccountKeeper bk types.BankKeeper + tk types.TokensKeeper sk types.StakingKeeper gk types.CustomGovKeeper mk types.MultiStakingKeeper @@ -21,7 +22,17 @@ type Keeper struct { } // NewKeeper returns instance of a keeper -func NewKeeper(storeKey storetypes.StoreKey, cdc codec.BinaryCodec, ak types.AccountKeeper, bk types.BankKeeper, sk types.StakingKeeper, gk types.CustomGovKeeper, mk types.MultiStakingKeeper, rk types.RecoveryKeeper) Keeper { +func NewKeeper( + storeKey storetypes.StoreKey, + cdc codec.BinaryCodec, + ak types.AccountKeeper, + bk types.BankKeeper, + sk types.StakingKeeper, + gk types.CustomGovKeeper, + mk types.MultiStakingKeeper, + rk types.RecoveryKeeper, + tk types.TokensKeeper, +) Keeper { return Keeper{ cdc: cdc, storeKey: storeKey, @@ -31,6 +42,7 @@ func NewKeeper(storeKey storetypes.StoreKey, cdc codec.BinaryCodec, ak types.Acc gk: gk, mk: mk, rk: rk, + tk: tk, } } diff --git a/x/distributor/types/expected_keepers.go b/x/distributor/types/expected_keepers.go index f39a1bd89..0dd449d42 100644 --- a/x/distributor/types/expected_keepers.go +++ b/x/distributor/types/expected_keepers.go @@ -5,6 +5,7 @@ import ( multistakingtypes "github.com/KiraCore/sekai/x/multistaking/types" recoverytypes "github.com/KiraCore/sekai/x/recovery/types" stakingtypes "github.com/KiraCore/sekai/x/staking/types" + tokenstypes "github.com/KiraCore/sekai/x/tokens/types" sdk "github.com/cosmos/cosmos-sdk/types" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" ) @@ -21,6 +22,13 @@ type BankKeeper interface { SendCoinsFromModuleToModule(ctx sdk.Context, senderModule, recipientModule string, amt sdk.Coins) error } +// TokensKeeper defines expected interface needed from tokens keeper +type TokensKeeper interface { + MintCoins(ctx sdk.Context, moduleName string, amt sdk.Coins) error + BurnCoins(ctx sdk.Context, moduleName string, amt sdk.Coins) error + GetTokenInfo(ctx sdk.Context, denom string) *tokenstypes.TokenInfo +} + type AccountKeeper interface { GetModuleAccount(ctx sdk.Context, moduleName string) authtypes.ModuleAccountI } diff --git a/x/evidence/keeper/keeper.go b/x/evidence/keeper/keeper.go index d2d23f675..0280ad7f4 100644 --- a/x/evidence/keeper/keeper.go +++ b/x/evidence/keeper/keeper.go @@ -6,13 +6,13 @@ import ( tmbytes "github.com/cometbft/cometbft/libs/bytes" "github.com/cometbft/cometbft/libs/log" + errorsmod "cosmossdk.io/errors" "github.com/KiraCore/sekai/x/evidence/exported" "github.com/KiraCore/sekai/x/evidence/types" "github.com/cosmos/cosmos-sdk/codec" "github.com/cosmos/cosmos-sdk/store/prefix" storetypes "github.com/cosmos/cosmos-sdk/store/types" sdk "github.com/cosmos/cosmos-sdk/types" - sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" ) // Keeper defines the evidence module's keeper. The keeper is responsible for @@ -67,7 +67,7 @@ func (k *Keeper) SetRouter(rtr types.Router) { // no handler exists, an error is returned. func (k Keeper) GetEvidenceHandler(evidenceRoute string) (types.Handler, error) { if !k.router.HasRoute(evidenceRoute) { - return nil, sdkerrors.Wrap(types.ErrNoEvidenceHandlerExists, evidenceRoute) + return nil, errorsmod.Wrap(types.ErrNoEvidenceHandlerExists, evidenceRoute) } return k.router.GetRoute(evidenceRoute), nil @@ -79,15 +79,15 @@ func (k Keeper) GetEvidenceHandler(evidenceRoute string) (types.Handler, error) // persisted. func (k Keeper) SubmitEvidence(ctx sdk.Context, evidence exported.Evidence) error { if _, ok := k.GetEvidence(ctx, evidence.Hash()); ok { - return sdkerrors.Wrap(types.ErrEvidenceExists, evidence.Hash().String()) + return errorsmod.Wrap(types.ErrEvidenceExists, evidence.Hash().String()) } if !k.router.HasRoute(evidence.Route()) { - return sdkerrors.Wrap(types.ErrNoEvidenceHandlerExists, evidence.Route()) + return errorsmod.Wrap(types.ErrNoEvidenceHandlerExists, evidence.Route()) } handler := k.router.GetRoute(evidence.Route()) if err := handler(ctx, evidence); err != nil { - return sdkerrors.Wrap(types.ErrInvalidEvidence, err.Error()) + return errorsmod.Wrap(types.ErrInvalidEvidence, err.Error()) } ctx.EventManager().EmitEvent( diff --git a/x/evidence/types/msgs.go b/x/evidence/types/msgs.go index a3096feeb..2cdb52de9 100644 --- a/x/evidence/types/msgs.go +++ b/x/evidence/types/msgs.go @@ -3,6 +3,7 @@ package types import ( "fmt" + errorsmod "cosmossdk.io/errors" kiratypes "github.com/KiraCore/sekai/types" "github.com/KiraCore/sekai/x/evidence/exported" "github.com/cosmos/cosmos-sdk/codec/types" @@ -18,6 +19,7 @@ var ( ) // NewMsgSubmitEvidence returns a new MsgSubmitEvidence with a signer/submitter. +// //nolint:interfacer func NewMsgSubmitEvidence(s sdk.AccAddress, evi exported.Evidence) (*MsgSubmitEvidence, error) { msg, ok := evi.(proto.Message) @@ -40,12 +42,12 @@ func (m MsgSubmitEvidence) Type() string { return kiratypes.TypeMsgSubmitEvidenc // ValidateBasic performs basic (non-state-dependant) validation on a MsgSubmitEvidence. func (m MsgSubmitEvidence) ValidateBasic() error { if m.Submitter == "" { - return sdkerrors.Wrap(sdkerrors.ErrInvalidAddress, m.Submitter) + return errorsmod.Wrap(sdkerrors.ErrInvalidAddress, m.Submitter) } evi := m.GetEvidence() if evi == nil { - return sdkerrors.Wrap(ErrInvalidEvidence, "missing evidence") + return errorsmod.Wrap(ErrInvalidEvidence, "missing evidence") } if err := evi.ValidateBasic(); err != nil { return err diff --git a/x/feeprocessing/keeper/keeper.go b/x/feeprocessing/keeper/keeper.go index d89bc6268..ea6b64e5e 100644 --- a/x/feeprocessing/keeper/keeper.go +++ b/x/feeprocessing/keeper/keeper.go @@ -63,14 +63,14 @@ func (k Keeper) SendCoinsFromModuleToAccount(ctx sdk.Context, senderModule strin filledAmount := sdk.NewDec(0) for _, coin := range amt { - rate := k.tk.GetTokenRate(ctx, coin.Denom) + rate := k.tk.GetTokenInfo(ctx, coin.Denom) if rate != nil { totalAmount = totalAmount.Add(rate.FeeRate.Mul(sdk.NewDecFromInt(coin.Amount))) } } for _, coin := range recipientSentCoins { - rate := k.tk.GetTokenRate(ctx, coin.Denom) + rate := k.tk.GetTokenInfo(ctx, coin.Denom) if rate == nil { continue } diff --git a/x/feeprocessing/keeper/keeper_test.go b/x/feeprocessing/keeper/keeper_test.go index 7fcddd651..743e101a4 100644 --- a/x/feeprocessing/keeper/keeper_test.go +++ b/x/feeprocessing/keeper/keeper_test.go @@ -4,6 +4,7 @@ import ( "bytes" "testing" + "cosmossdk.io/math" simapp "github.com/KiraCore/sekai/app" kiratypes "github.com/KiraCore/sekai/types" govtypes "github.com/KiraCore/sekai/x/gov/types" @@ -43,32 +44,43 @@ func TestNewKeeper_Executions(t *testing.T) { executions := app.FeeProcessingKeeper.GetExecutionsStatus(ctx) require.True(t, len(executions) == 0) - msg1 := tokenstypes.NewMsgUpsertTokenRate( - addr, "ukex", sdk.NewDec(1), true, + msg1 := tokenstypes.NewMsgUpsertTokenInfo( + addr, + "adr20", + "ukex", sdk.NewDec(1), true, + sdk.ZeroInt(), sdk.ZeroInt(), sdk.ZeroDec(), sdk.ZeroInt(), false, false, + "KEX", + "Kira", + "", + 10, + "", "", "", 0, math.ZeroInt(), "", false, "", "", ) app.FeeProcessingKeeper.AddExecutionStart(ctx, msg1) executions = app.FeeProcessingKeeper.GetExecutionsStatus(ctx) require.True(t, len(executions) == 1) - msg2 := tokenstypes.NewMsgUpsertTokenAlias(addr, "KEX", "Kira", "", 10, []string{"ukex"}, false) - app.FeeProcessingKeeper.AddExecutionStart(ctx, msg2) - executions = app.FeeProcessingKeeper.GetExecutionsStatus(ctx) - require.True(t, len(executions) == 2) - - msg3 := tokenstypes.NewMsgUpsertTokenRate( - addr, "ukex", sdk.NewDec(1), true, + msg3 := tokenstypes.NewMsgUpsertTokenInfo( + addr, + "adr20", + "ukex", sdk.NewDec(1), true, + sdk.ZeroInt(), sdk.ZeroInt(), sdk.ZeroDec(), sdk.ZeroInt(), false, false, + "KEX", + "Kira", + "", + 10, + "", "", "", 0, math.ZeroInt(), "", false, "", "", ) app.FeeProcessingKeeper.AddExecutionStart(ctx, msg3) executions = app.FeeProcessingKeeper.GetExecutionsStatus(ctx) - require.True(t, len(executions) == 3) + require.Len(t, executions, 2) app.FeeProcessingKeeper.SetExecutionStatusSuccess(ctx, msg1) app.FeeProcessingKeeper.SetExecutionStatusSuccess(ctx, msg3) @@ -79,15 +91,15 @@ func TestNewKeeper_Executions(t *testing.T) { successFlaggedCount += 1 } } - require.True(t, successFlaggedCount == 2) + require.Equal(t, successFlaggedCount, int(2)) successFlaggedCount = 0 for _, exec := range executions { - if bytes.Equal(exec.FeePayer, msg1.Proposer) && exec.MsgType == msg2.Type() && exec.Success == true { + if bytes.Equal(exec.FeePayer, msg1.Proposer) && exec.MsgType == msg3.Type() && exec.Success == true { successFlaggedCount += 1 } } - require.True(t, successFlaggedCount == 0) + require.Equal(t, successFlaggedCount, int(2)) } func TestNewKeeper_SendCoinsFromAccountToModule(t *testing.T) { @@ -164,7 +176,7 @@ func TestNewKeeper_ProcessExecutionFeeReturn(t *testing.T) { app.BankKeeper.SendCoinsFromModuleToAccount(ctx, minttypes.ModuleName, addr3, coins) app.CustomGovKeeper.SetExecutionFee(ctx, govtypes.ExecutionFee{ - TransactionType: kiratypes.MsgTypeUpsertTokenRate, + TransactionType: kiratypes.MsgTypeUpsertTokenInfo, ExecutionFee: 1000, FailureFee: 100, Timeout: 0, @@ -174,12 +186,20 @@ func TestNewKeeper_ProcessExecutionFeeReturn(t *testing.T) { // check failure fee fees := sdk.Coins{sdk.NewInt64Coin("ukex", 1000)} app.FeeProcessingKeeper.SendCoinsFromAccountToModule(ctx, addr, authtypes.FeeCollectorName, fees) - msg := tokenstypes.NewMsgUpsertTokenRate( - addr, "ukex", sdk.NewDec(1), true, + msg := tokenstypes.NewMsgUpsertTokenInfo( + addr, + "adr20", + "ukex", sdk.NewDec(1), true, + sdk.ZeroInt(), sdk.ZeroInt(), sdk.ZeroDec(), sdk.ZeroInt(), false, false, + "KEX", + "Kira", + "", + 10, + "", "", "", 0, math.ZeroInt(), "", false, "", "", ) app.FeeProcessingKeeper.AddExecutionStart(ctx, msg) app.FeeProcessingKeeper.ProcessExecutionFeeReturn(ctx) @@ -206,19 +226,35 @@ func TestNewKeeper_ProcessExecutionFeeReturn(t *testing.T) { // check success return when two message types are same but addresses are different app.FeeProcessingKeeper.SendCoinsFromAccountToModule(ctx, addr2, authtypes.FeeCollectorName, fees) app.FeeProcessingKeeper.SendCoinsFromAccountToModule(ctx, addr3, authtypes.FeeCollectorName, fees) - msg2 := tokenstypes.NewMsgUpsertTokenRate( - addr2, "ukex", sdk.NewDec(1), true, + msg2 := tokenstypes.NewMsgUpsertTokenInfo( + addr2, + "adr20", + "ukex", sdk.NewDec(1), true, + sdk.ZeroInt(), sdk.ZeroInt(), sdk.ZeroDec(), sdk.ZeroInt(), false, false, + "KEX", + "Kira", + "", + 10, + "", "", "", 0, math.ZeroInt(), "", false, "", "", ) - msg3 := tokenstypes.NewMsgUpsertTokenRate( - addr3, "ukex", sdk.NewDec(1), true, + msg3 := tokenstypes.NewMsgUpsertTokenInfo( + addr3, + "adr20", + "ukex", sdk.NewDec(1), true, + sdk.ZeroInt(), sdk.ZeroInt(), sdk.ZeroDec(), sdk.ZeroInt(), false, false, + "KEX", + "Kira", + "", + 10, + "", "", "", 0, math.ZeroInt(), "", false, "", "", ) app.FeeProcessingKeeper.AddExecutionStart(ctx, msg3) app.FeeProcessingKeeper.AddExecutionStart(ctx, msg2) diff --git a/x/feeprocessing/types/expected_keepers.go b/x/feeprocessing/types/expected_keepers.go index ccedb6e9a..ec29b138b 100644 --- a/x/feeprocessing/types/expected_keepers.go +++ b/x/feeprocessing/types/expected_keepers.go @@ -14,7 +14,7 @@ type BankKeeper interface { // TokensKeeper defines expected interface needed to get token rate type TokensKeeper interface { - GetTokenRate(ctx sdk.Context, denom string) *types.TokenRate + GetTokenInfo(ctx sdk.Context, denom string) *types.TokenInfo } // CustomGovKeeper defines the expected interface contract the tokens module requires diff --git a/x/genutil/client/cli/init.go b/x/genutil/client/cli/init.go index f9ad74064..4f6bec68a 100644 --- a/x/genutil/client/cli/init.go +++ b/x/genutil/client/cli/init.go @@ -9,6 +9,8 @@ import ( "github.com/KiraCore/sekai/x/genutil" govtypes "github.com/KiraCore/sekai/x/gov/types" + spendingtypes "github.com/KiraCore/sekai/x/spending/types" + tokenstypes "github.com/KiraCore/sekai/x/tokens/types" cfg "github.com/cometbft/cometbft/config" "github.com/cometbft/cometbft/libs/cli" tmos "github.com/cometbft/cometbft/libs/os" @@ -128,6 +130,35 @@ func InitCmd(mbm module.BasicManager, defaultNodeHome string) *cobra.Command { return err } + tokenGenState := tokenstypes.GetGenesisStateFromAppState(clientCtx.Codec, genesis) + tokenGenState.TokenInfos = []tokenstypes.TokenInfo{ + { + Denom: defaultDenom, + FeeRate: sdk.OneDec(), + FeeEnabled: true, + StakeCap: sdk.NewDecWithPrec(5, 1), // 0.5 + StakeMin: sdk.OneInt(), + StakeEnabled: true, + Inactive: false, + Symbol: defaultDenom, + Name: defaultDenom, + Icon: "", + Decimals: 6, + }, + } + tokenGenState.TokenBlackWhites.Whitelisted = []string{defaultDenom} + genesis[tokenstypes.ModuleName], err = cdc.MarshalJSON(&tokenGenState) + if err != nil { + return err + } + + spendingGenState := spendingtypes.GetGenesisStateFromAppState(clientCtx.Codec, genesis) + spendingGenState.Pools[0].Rates[0].Denom = defaultDenom + genesis[spendingtypes.ModuleName], err = cdc.MarshalJSON(&spendingGenState) + if err != nil { + return err + } + appState, err := json.MarshalIndent(genesis, "", " ") if err != nil { return errors.Wrap(err, "Failed to marshall default genesis state") diff --git a/x/genutil/client/cli/upgrade_genesis.go b/x/genutil/client/cli/upgrade_genesis.go index 3ec71fc32..ed4fda0dc 100644 --- a/x/genutil/client/cli/upgrade_genesis.go +++ b/x/genutil/client/cli/upgrade_genesis.go @@ -5,10 +5,10 @@ import ( "fmt" "strings" + appparams "github.com/KiraCore/sekai/app/params" "github.com/KiraCore/sekai/x/genutil" - v01228govtypes "github.com/KiraCore/sekai/x/gov/legacy/v01228" govtypes "github.com/KiraCore/sekai/x/gov/types" - v03123upgradetypes "github.com/KiraCore/sekai/x/upgrade/legacy/v03123" + v0317upgradetypes "github.com/KiraCore/sekai/x/upgrade/legacy/v0317" upgradetypes "github.com/KiraCore/sekai/x/upgrade/types" tmjson "github.com/cometbft/cometbft/libs/json" tmos "github.com/cometbft/cometbft/libs/os" @@ -26,7 +26,7 @@ const ( FlagModulesOnly = "modules-only" ) -func upgradedPlan(plan *v03123upgradetypes.PlanV03123) *upgradetypes.Plan { +func upgradedPlan(plan *v0317upgradetypes.PlanV0317) *upgradetypes.Plan { if plan == nil { return nil } @@ -47,13 +47,13 @@ func upgradedPlan(plan *v03123upgradetypes.PlanV03123) *upgradetypes.Plan { } } -func upgradedResources(resources []v03123upgradetypes.ResourceV03123) []upgradetypes.Resource { +func upgradedResources(resources []v0317upgradetypes.ResourceV0317) []upgradetypes.Resource { upgraded := []upgradetypes.Resource{} for _, resource := range resources { upgraded = append(upgraded, upgradetypes.Resource{ Id: resource.Id, - Url: resource.Git, - Version: resource.Checkout, + Url: resource.Url, + Version: resource.Version, Checksum: resource.Checksum, }) } @@ -106,159 +106,76 @@ $ %s new-genesis-from-exported exported-genesis.json new-genesis.json newGenesis[module] = moduleGenesis } genesisState = newGenesis - } else { - if err = mbm.ValidateGenesis(cdc, txEncCfg, genesisState); err != nil { - return errors.Wrap(err, "failed to validate genesis state") - } - - upgradeGenesisV03123 := v03123upgradetypes.GenesisStateV03123{} - err = cdc.UnmarshalJSON(genesisState[upgradetypes.ModuleName], &upgradeGenesisV03123) - if err == nil { // which means old upgrade genesis - upgradeGenesis := upgradetypes.GenesisState{ - Version: "v0.3.1.24", - CurrentPlan: upgradedPlan(upgradeGenesisV03123.CurrentPlan), - NextPlan: upgradedPlan(upgradeGenesisV03123.NextPlan), - } - genesisState[upgradetypes.ModuleName] = cdc.MustMarshalJSON(&upgradeGenesis) - } else { - fmt.Println("error exists v0.3.1.23 upgrade genesis parsing", err) - } + } - upgradeGenesis := upgradetypes.GenesisState{} - cdc.MustUnmarshalJSON(genesisState[upgradetypes.ModuleName], &upgradeGenesis) - oldVersion := upgradeGenesis.Version - if upgradeGenesis.Version == "" { - upgradeGenesis.Version = "v0.1.22.11" - fmt.Println("upgraded the upgrade module genesis to v0.1.22.11") + upgradeGenesisV03123 := v0317upgradetypes.GenesisStateV0317{} + err = cdc.UnmarshalJSON(genesisState[upgradetypes.ModuleName], &upgradeGenesisV03123) + if err == nil { // which means old upgrade genesis + upgradeGenesis := upgradetypes.GenesisState{ + Version: "v0.3.45", + CurrentPlan: upgradedPlan(upgradeGenesisV03123.CurrentPlan), + NextPlan: upgradedPlan(upgradeGenesisV03123.NextPlan), } + genesisState[upgradetypes.ModuleName] = cdc.MustMarshalJSON(&upgradeGenesis) + } else { + fmt.Println("error exists v0.3.17 upgrade genesis parsing", err) + } - if upgradeGenesis.NextPlan == nil { - return fmt.Errorf("next plan is not available") - } + upgradeGenesis := upgradetypes.GenesisState{} + cdc.MustUnmarshalJSON(genesisState[upgradetypes.ModuleName], &upgradeGenesis) + if upgradeGenesis.Version == "" { + upgradeGenesis.Version = "v0.3.45" + fmt.Println("upgraded the upgrade module genesis to v0.3.45") + } - if genDoc.ChainID != upgradeGenesis.NextPlan.OldChainId { - return fmt.Errorf("next plan has different oldchain id, current chain_id=%s, next_plan.old_chain_id=%s", genDoc.ChainID, upgradeGenesis.NextPlan.OldChainId) - } + // if upgradeGenesis.NextPlan == nil { + // return fmt.Errorf("next plan is not available") + // } + // if genDoc.ChainID != upgradeGenesis.NextPlan.OldChainId { + // return fmt.Errorf("next plan has different oldchain id, current chain_id=%s, next_plan.old_chain_id=%s", genDoc.ChainID, upgradeGenesis.NextPlan.OldChainId) + // } + if upgradeGenesis.NextPlan != nil { genDoc.ChainID = upgradeGenesis.NextPlan.NewChainId - upgradeGenesis.CurrentPlan = upgradeGenesis.NextPlan - upgradeGenesis.NextPlan = nil - - genesisState[upgradetypes.ModuleName] = cdc.MustMarshalJSON(&upgradeGenesis) + } - govGenesisV01228 := v01228govtypes.GenesisStateV01228{} - err = cdc.UnmarshalJSON(genesisState[govtypes.ModuleName], &govGenesisV01228) + upgradeGenesis.CurrentPlan = upgradeGenesis.NextPlan + upgradeGenesis.NextPlan = nil - // we are referencing oldPlan.name to determine upgrade genesis or not - if err == nil && oldVersion == "" { // it means v0.1.22.8 gov genesis - govGenesis := govtypes.GenesisState{ - StartingProposalId: govGenesisV01228.StartingProposalId, - NextRoleId: govtypes.DefaultGenesis().NextRoleId, - Roles: govtypes.DefaultGenesis().Roles, - RolePermissions: govGenesisV01228.Permissions, - NetworkActors: govGenesisV01228.NetworkActors, - NetworkProperties: &govtypes.NetworkProperties{ - MinTxFee: govGenesisV01228.NetworkProperties.MinTxFee, - MaxTxFee: govGenesisV01228.NetworkProperties.MaxTxFee, - VoteQuorum: govGenesisV01228.NetworkProperties.VoteQuorum, - MinimumProposalEndTime: govGenesisV01228.NetworkProperties.ProposalEndTime, - ProposalEnactmentTime: govGenesisV01228.NetworkProperties.ProposalEnactmentTime, - MinProposalEndBlocks: govGenesisV01228.NetworkProperties.MinProposalEndBlocks, - MinProposalEnactmentBlocks: govGenesisV01228.NetworkProperties.MinProposalEnactmentBlocks, - EnableForeignFeePayments: govGenesisV01228.NetworkProperties.EnableForeignFeePayments, - MischanceRankDecreaseAmount: govGenesisV01228.NetworkProperties.MischanceRankDecreaseAmount, - MaxMischance: govGenesisV01228.NetworkProperties.MaxMischance, - MischanceConfidence: govGenesisV01228.NetworkProperties.MischanceConfidence, - InactiveRankDecreasePercent: sdk.NewDecWithPrec(int64(govGenesisV01228.NetworkProperties.InactiveRankDecreasePercent), 2), - MinValidators: govGenesisV01228.NetworkProperties.MinValidators, - PoorNetworkMaxBankSend: govGenesisV01228.NetworkProperties.PoorNetworkMaxBankSend, - UnjailMaxTime: govGenesisV01228.NetworkProperties.JailMaxTime, - EnableTokenWhitelist: govGenesisV01228.NetworkProperties.EnableTokenWhitelist, - EnableTokenBlacklist: govGenesisV01228.NetworkProperties.EnableTokenBlacklist, - MinIdentityApprovalTip: govGenesisV01228.NetworkProperties.MinIdentityApprovalTip, - UniqueIdentityKeys: govGenesisV01228.NetworkProperties.UniqueIdentityKeys, - UbiHardcap: 6000_000, - ValidatorsFeeShare: sdk.NewDecWithPrec(50, 2), // 50% - InflationRate: sdk.NewDecWithPrec(18, 2), // 18% - InflationPeriod: 31557600, // 1 year - UnstakingPeriod: 2629800, // 1 month - MaxDelegators: 100, - MinDelegationPushout: 10, - SlashingPeriod: 3600, - MaxJailedPercentage: sdk.NewDecWithPrec(25, 2), - MaxSlashingPercentage: sdk.NewDecWithPrec(1, 2), - MinCustodyReward: 200, - MaxCustodyTxSize: 8192, - MaxCustodyBufferSize: 10, - AbstentionRankDecreaseAmount: 1, - MaxAbstention: 2, - MinCollectiveBond: 100_000, // in KEX - MinCollectiveBondingTime: 86400, // in seconds - MaxCollectiveOutputs: 10, - MinCollectiveClaimPeriod: 14400, // 4hrs - ValidatorRecoveryBond: 300000, // 300k KEX - MaxAnnualInflation: sdk.NewDecWithPrec(35, 2), - MaxProposalTitleSize: 128, - MaxProposalDescriptionSize: 1024, - MaxProposalPollOptionSize: 64, - MaxProposalPollOptionCount: 128, - MinDappBond: 1000000, - MaxDappBond: 10000000, - DappBondDuration: 604800, - DappVerifierBond: sdk.NewDecWithPrec(1, 3), //0.1% - DappAutoDenounceTime: 60, // 60s - DappMischanceRankDecreaseAmount: 1, - DappMaxMischance: 10, - DappInactiveRankDecreasePercent: 10, - DappPoolSlippageDefault: sdk.NewDecWithPrec(1, 1), // 10% - MintingFtFee: 100_000_000_000_000, - MintingNftFee: 100_000_000_000_000, - VetoThreshold: sdk.NewDecWithPrec(3340, 2), //33.40% - AutocompoundIntervalNumBlocks: 17280, - BridgeAddress: "test", - BridgeCosmosEthereumExchangeRate: sdk.NewDec(10), - BridgeEthereumCosmosExchangeRate: sdk.NewDecWithPrec(1, 1), - }, - ExecutionFees: govGenesisV01228.ExecutionFees, - PoorNetworkMessages: govGenesisV01228.PoorNetworkMessages, - Proposals: []govtypes.Proposal{}, // govGenesisV01228.Proposals, - Votes: []govtypes.Vote{}, // govGenesisV01228.Votes, - DataRegistry: govGenesisV01228.DataRegistry, - IdentityRecords: govGenesisV01228.IdentityRecords, - LastIdentityRecordId: govGenesisV01228.LastIdentityRecordId, - IdRecordsVerifyRequests: govGenesisV01228.IdRecordsVerifyRequests, - LastIdRecordVerifyRequestId: govGenesisV01228.LastIdRecordVerifyRequestId, - ProposalDurations: make(map[string]uint64), - } + genesisState[upgradetypes.ModuleName] = cdc.MustMarshalJSON(&upgradeGenesis) - genesisState[govtypes.ModuleName] = cdc.MustMarshalJSON(&govGenesis) - } else { - fmt.Println("GovGenesis01228 unmarshal test: ", err) - fmt.Println("Skipping governance module upgrade since it is not v0.1.22.8 genesis") + // upgrade gov genesis for more role permissions + govGenesis := govtypes.GenesisState{} + err = cdc.UnmarshalJSON(genesisState[govtypes.ModuleName], &govGenesis) + if err == nil { + if govGenesis.DefaultDenom == "" { + govGenesis.DefaultDenom = appparams.DefaultDenom + } + if govGenesis.Bech32Prefix == "" { + govGenesis.Bech32Prefix = appparams.AccountAddressPrefix + } + govGenesis.NetworkProperties.VoteQuorum = sdk.NewDecWithPrec(33, 2) // 33% + govGenesis.NetworkProperties.VetoThreshold = sdk.NewDecWithPrec(3340, 4) // 33.4% + govGenesis.NetworkProperties.DappInactiveRankDecreasePercent = sdk.NewDecWithPrec(1, 1) // 10% + govGenesis.NetworkProperties.SlashingPeriod = 2629800 + genesisState[govtypes.ModuleName] = cdc.MustMarshalJSON(&govGenesis) + } else { + fmt.Println("parse error for latest gov genesis", err) + fmt.Println("trying to parse v0.3.17 gov genesis for following error on genesis parsing") + govGenesisV0317 := make(map[string]interface{}) + err = json.Unmarshal(genesisState[govtypes.ModuleName], &govGenesisV0317) + if err != nil { + panic(err) } - // upgrade gov genesis for more role permissions - govGenesis := govtypes.GenesisState{} - err = cdc.UnmarshalJSON(genesisState[govtypes.ModuleName], &govGenesis) - if err == nil { - govGenesis.RolePermissions[govtypes.RoleSudo] = govtypes.DefaultGenesis().RolePermissions[govtypes.RoleSudo] - genesisState[govtypes.ModuleName] = cdc.MustMarshalJSON(&govGenesis) - } else { - fmt.Println("parse error for latest gov genesis", err) - fmt.Println("trying to parse v03123 gov genesis for following error on genesis parsing") - govGenesisV03123 := make(map[string]interface{}) - err = json.Unmarshal(genesisState[govtypes.ModuleName], &govGenesisV03123) - if err != nil { - panic(err) - } - govGenesisV03123["proposals"] = []govtypes.Proposal{} - govGenesisV03123["votes"] = []govtypes.Vote{} - bz, err := json.Marshal(&govGenesisV03123) - if err != nil { - panic(err) - } - genesisState[govtypes.ModuleName] = bz + fmt.Println("Setting default gov data", appparams.DefaultDenom, appparams.AccountAddressPrefix) + govGenesisV0317["default_denom"] = appparams.DefaultDenom + govGenesisV0317["bech32_prefix"] = appparams.AccountAddressPrefix + bz, err := json.Marshal(&govGenesisV0317) + if err != nil { + panic(err) } + genesisState[govtypes.ModuleName] = bz } appState, err := json.MarshalIndent(genesisState, "", " ") @@ -267,6 +184,7 @@ $ %s new-genesis-from-exported exported-genesis.json new-genesis.json } genDoc.AppState = appState + genDoc.InitialHeight = 0 if jsonMinimize, _ := cmd.Flags().GetBool(FlagJsonMinimize); jsonMinimize { genDocBytes, err := tmjson.Marshal(genDoc) diff --git a/x/genutil/collect.go b/x/genutil/collect.go index a8d1bdf62..e9183b4a6 100644 --- a/x/genutil/collect.go +++ b/x/genutil/collect.go @@ -9,7 +9,6 @@ import ( "io/ioutil" "os" "path/filepath" - "runtime" "sort" "strings" @@ -17,11 +16,11 @@ import ( tmtypes "github.com/cometbft/cometbft/types" "github.com/KiraCore/sekai/x/genutil/types" + stakingtypes "github.com/KiraCore/sekai/x/staking/types" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/codec" sdk "github.com/cosmos/cosmos-sdk/types" bankexported "github.com/cosmos/cosmos-sdk/x/bank/exported" - stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" ) // GenAppStateFromConfig gets the genesis app state from the config @@ -138,44 +137,10 @@ func CollectTxs(cdc codec.JSONCodec, txJSONDecoder sdk.TxDecoder, moniker, genTx return appGenTxs, persistentPeers, errors.New("each genesis transaction must provide a single genesis message") } - // TODO abstract out staking message validation back to staking - msg := msgs[0].(*stakingtypes.MsgCreateValidator) - - // validate delegator and validator addresses and funds against the accounts in the state - delAddr := msg.DelegatorAddress - valAddr, err := sdk.ValAddressFromBech32(msg.ValidatorAddress) - if err != nil { - return appGenTxs, persistentPeers, err - } - - delBal, delOk := balancesMap[delAddr] - if !delOk { - _, file, no, ok := runtime.Caller(1) - if ok { - fmt.Printf("CollectTxs-1, called from %s#%d\n", file, no) - } - - return appGenTxs, persistentPeers, fmt.Errorf("account %s balance not in genesis state: %+v", delAddr, balancesMap) - } - - _, valOk := balancesMap[sdk.AccAddress(valAddr).String()] - if !valOk { - _, file, no, ok := runtime.Caller(1) - if ok { - fmt.Printf("CollectTxs-2, called from %s#%d - %s\n", file, no, sdk.AccAddress(msg.ValidatorAddress).String()) - } - return appGenTxs, persistentPeers, fmt.Errorf("account %s balance not in genesis state: %+v", valAddr, balancesMap) - } - - if delBal.GetCoins().AmountOf(msg.Value.Denom).LT(msg.Value.Amount) { - return appGenTxs, persistentPeers, fmt.Errorf( - "insufficient fund for delegation %v: %v < %v", - delBal.GetAddress().String(), delBal.GetCoins().AmountOf(msg.Value.Denom), msg.Value.Amount, - ) - } + msg := msgs[0].(*stakingtypes.MsgClaimValidator) // exclude itself from persistent peers - if msg.Description.Moniker != moniker { + if msg.Moniker != moniker { addressesIPs = append(addressesIPs, nodeAddrIP) } } diff --git a/x/genutil/types/genesis_state.go b/x/genutil/types/genesis_state.go index c2278b069..927ac0e40 100644 --- a/x/genutil/types/genesis_state.go +++ b/x/genutil/types/genesis_state.go @@ -8,9 +8,9 @@ import ( tmos "github.com/cometbft/cometbft/libs/os" tmtypes "github.com/cometbft/cometbft/types" + stakingtypes "github.com/KiraCore/sekai/x/staking/types" "github.com/cosmos/cosmos-sdk/codec" sdk "github.com/cosmos/cosmos-sdk/types" - stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" ) // NewGenesisState creates a new GenesisState object @@ -110,10 +110,9 @@ func ValidateGenesis(genesisState *GenesisState, txJSONDecoder sdk.TxDecoder) er "must provide genesis Tx with exactly 1 CreateValidator message") } - // TODO: abstract back to staking - if _, ok := msgs[0].(*stakingtypes.MsgCreateValidator); !ok { + if _, ok := msgs[0].(*stakingtypes.MsgClaimValidator); !ok { return fmt.Errorf( - "genesis transaction %v does not contain a MsgCreateValidator", i) + "genesis transaction %v does not contain a MsgClaimValidator", i) } } return nil diff --git a/x/gov/abci_test.go b/x/gov/abci_test.go index 4ac2091c4..022447bd9 100644 --- a/x/gov/abci_test.go +++ b/x/gov/abci_test.go @@ -4,6 +4,7 @@ import ( "testing" "time" + "cosmossdk.io/math" simapp "github.com/KiraCore/sekai/app" "github.com/KiraCore/sekai/x/gov" "github.com/KiraCore/sekai/x/gov/types" @@ -440,57 +441,6 @@ func TestEndBlocker_ActiveProposal(t *testing.T) { }, blockHeightChange: 3, }, - { - name: "Passed proposal in enactment is applied and removed from enactment list: Set Token Alias", - prepareScenario: func(app *simapp.SekaiApp, ctx sdk.Context) []sdk.AccAddress { - addrs := simapp.AddTestAddrsIncremental(app, ctx, 10, sdk.NewInt(100)) - - actor := types.NewDefaultActor(addrs[0]) - app.CustomGovKeeper.SaveNetworkActor(ctx, actor) - - proposalID := uint64(1234) - proposal, err := types.NewProposal( - proposalID, - "title", - "some desc", - tokenstypes.NewUpsertTokenAliasProposal( - "EUR", - "Euro", - "http://www.google.es", - 12, - []string{ - "eur", - "€", - }, - false, - ), - time.Now(), - time.Now().Add(10*time.Second), - time.Now().Add(20*time.Second), - ctx.BlockHeight()+2, - ctx.BlockHeight()+3, - ) - require.NoError(t, err) - - proposal.Result = types.Enactment - app.CustomGovKeeper.SaveProposal(ctx, proposal) - - app.CustomGovKeeper.AddToEnactmentProposals(ctx, proposal) - - iterator := app.CustomGovKeeper.GetEnactmentProposalsWithFinishedEnactmentEndTimeIterator(ctx, time.Now().Add(25*time.Second)) - requireIteratorCount(t, iterator, 1) - - return addrs - }, - validateScenario: func(t *testing.T, app *simapp.SekaiApp, ctx sdk.Context, addrs []sdk.AccAddress) { - iterator := app.CustomGovKeeper.GetEnactmentProposalsWithFinishedEnactmentEndTimeIterator(ctx, time.Now().Add(25*time.Second)) - requireIteratorCount(t, iterator, 0) - - token := app.TokensKeeper.GetTokenAlias(ctx, "EUR") - require.Equal(t, "Euro", token.Name) - }, - blockHeightChange: 3, - }, { name: "Passed proposal in enactment is applied and removed from enactment list: Set Token Rates", prepareScenario: func(app *simapp.SekaiApp, ctx sdk.Context) []sdk.AccAddress { @@ -504,14 +454,22 @@ func TestEndBlocker_ActiveProposal(t *testing.T) { proposalID, "title", "some desc", - tokenstypes.NewUpsertTokenRatesProposal( + tokenstypes.NewUpsertTokenInfosProposal( "btc", + "adr20", sdk.NewDec(1234), false, + sdk.ZeroInt(), + sdk.ZeroInt(), sdk.ZeroDec(), sdk.ZeroInt(), false, false, + "BTC", + "Bitcoin", + "", + 9, + "", "", "", 0, math.ZeroInt(), "", false, "", "", ), time.Now(), time.Now().Add(10*time.Second), @@ -535,10 +493,10 @@ func TestEndBlocker_ActiveProposal(t *testing.T) { iterator := app.CustomGovKeeper.GetEnactmentProposalsWithFinishedEnactmentEndTimeIterator(ctx, time.Now().Add(25*time.Second)) requireIteratorCount(t, iterator, 0) - token := app.TokensKeeper.GetTokenRate(ctx, "btc") + token := app.TokensKeeper.GetTokenInfo(ctx, "btc") require.Equal(t, sdk.NewDec(1234), token.FeeRate) require.Equal(t, "btc", token.Denom) - require.Equal(t, false, token.FeePayments) + require.Equal(t, false, token.FeeEnabled) }, blockHeightChange: 3, }, diff --git a/x/gov/client/cli/cli_identity_registrar_test.go b/x/gov/client/cli/cli_identity_registrar_test.go index 3f4a00214..f0396b671 100644 --- a/x/gov/client/cli/cli_identity_registrar_test.go +++ b/x/gov/client/cli/cli_identity_registrar_test.go @@ -40,7 +40,7 @@ func (s IntegrationTestSuite) TestTxRegisterIdentityRecords() { fmt.Println("out", out) } -func (s IntegrationTestSuite) TestTxEditIdentityRecord() { +func (s IntegrationTestSuite) TestTxDeleteIdentityRecord() { val := s.network.Validators[0] cmd := cli.GetTxDeleteIdentityRecords() diff --git a/x/gov/client/cli/tx.go b/x/gov/client/cli/tx.go index 7cd3a585e..b586fa146 100644 --- a/x/gov/client/cli/tx.go +++ b/x/gov/client/cli/tx.go @@ -57,6 +57,11 @@ const ( FlagPollReference = "poll-reference" FlagPollChecksum = "poll-checksum" FlagCustomPollValue = "poll-custom-value" + FlagTxTypes = "tx-types" + FlagExecutionFees = "execution-fees" + FlagFailureFees = "failure-fees" + FlagTimeouts = "timeouts" + FlagDefaultParams = "default-params" ) // NewTxCmd returns a root CLI command handler for all x/bank transaction commands. @@ -150,6 +155,7 @@ func NewTxProposalCmds() *cobra.Command { proposalCmd.AddCommand(GetTxProposalSetProposalDurations()) proposalCmd.AddCommand(GetTxProposalResetWholeCouncilorRankCmd()) proposalCmd.AddCommand(GetTxProposalJailCouncilorCmd()) + proposalCmd.AddCommand(GetTxProposalSetExecutionFeesCmd()) proposalCmd.AddCommand(accountProposalCmd) proposalCmd.AddCommand(roleProposalCmd) @@ -224,6 +230,9 @@ func GetTxSetWhitelistPermissions() *cobra.Command { Short: "Assign permission to a kira address whitelist", RunE: func(cmd *cobra.Command, args []string) error { clientCtx, err := client.GetClientTxContext(cmd) + if err != nil { + return err + } perm, err := cmd.Flags().GetUint32(FlagPermission) if err != nil { @@ -259,6 +268,9 @@ func GetTxRemoveWhitelistedPermissions() *cobra.Command { Short: "Remove whitelisted permission from an address", RunE: func(cmd *cobra.Command, args []string) error { clientCtx, err := client.GetClientTxContext(cmd) + if err != nil { + return err + } perm, err := cmd.Flags().GetUint32(FlagPermission) if err != nil { @@ -396,17 +408,64 @@ func NewTxSetNetworkProperties() *cobra.Command { msg := types.NewMsgSetNetworkProperties( clientCtx.FromAddress, &types.NetworkProperties{ - MinTxFee: minTxFee, - MaxTxFee: maxTxFee, - VoteQuorum: 33, - MinimumProposalEndTime: 300, // 5min - ProposalEnactmentTime: 300, // 5min - EnableForeignFeePayments: true, - MischanceRankDecreaseAmount: 10, - InactiveRankDecreasePercent: sdk.NewDecWithPrec(50, 2), // 50% - PoorNetworkMaxBankSend: 1000000, // 1M ukex - MinValidators: minValidators, - MinCustodyReward: minCustodyReward, + MinTxFee: minTxFee, + MaxTxFee: maxTxFee, + VoteQuorum: sdk.NewDecWithPrec(33, 2), // 33% + MinimumProposalEndTime: 300, // 5min + ProposalEnactmentTime: 300, // 5min + EnableForeignFeePayments: true, + MischanceRankDecreaseAmount: 10, + InactiveRankDecreasePercent: sdk.NewDecWithPrec(50, 2), // 50% + PoorNetworkMaxBankSend: 1000000, // 1M ukex + MinValidators: minValidators, + MinCustodyReward: minCustodyReward, + MinProposalEndBlocks: 2, + MinProposalEnactmentBlocks: 1, + MaxMischance: 1, + MinIdentityApprovalTip: 200, + UniqueIdentityKeys: "moniker,username", + UbiHardcap: 6000_000, + ValidatorsFeeShare: sdk.NewDecWithPrec(50, 2), // 50% + InflationRate: sdk.NewDecWithPrec(18, 2), // 18% + InflationPeriod: 31557600, // 1 year + UnstakingPeriod: 2629800, // 1 month + MaxDelegators: 100, + MinDelegationPushout: 10, + SlashingPeriod: 2629800, + MaxJailedPercentage: sdk.NewDecWithPrec(25, 2), + MaxSlashingPercentage: sdk.NewDecWithPrec(5, 3), // 0.5% + MaxCustodyBufferSize: 10, + MaxCustodyTxSize: 8192, + AbstentionRankDecreaseAmount: 1, + MaxAbstention: 2, + MinCollectiveBond: 100_000, // in KEX + MinCollectiveBondingTime: 86400, // in seconds + MaxCollectiveOutputs: 10, + MinCollectiveClaimPeriod: 14400, // 4hrs + ValidatorRecoveryBond: 300000, // 300k KEX + MaxAnnualInflation: sdk.NewDecWithPrec(35, 2), // 35% + MaxProposalTitleSize: 128, + MaxProposalDescriptionSize: 1024, + MaxProposalPollOptionSize: 64, + MaxProposalPollOptionCount: 128, + MaxProposalReferenceSize: 512, + MaxProposalChecksumSize: 128, + MinDappBond: 1000000, + MaxDappBond: 10000000, + DappBondDuration: 604800, + DappVerifierBond: sdk.NewDecWithPrec(1, 3), //0.1% + DappAutoDenounceTime: 60, // 60s + DappMischanceRankDecreaseAmount: 1, + DappMaxMischance: 10, + DappInactiveRankDecreasePercent: sdk.NewDecWithPrec(10, 2), // 10% + DappPoolSlippageDefault: sdk.NewDecWithPrec(1, 1), // 10% + DappLiquidationThreshold: 100_000_000_000, // default 100’000 KEX + DappLiquidationPeriod: 2419200, // default 2419200, ~28d + MintingFtFee: 100_000_000_000_000, + MintingNftFee: 100_000_000_000_000, + VetoThreshold: sdk.NewDecWithPrec(3340, 4), // 33.40% + AutocompoundIntervalNumBlocks: 17280, + DowntimeInactiveDuration: 600, }, ) @@ -784,9 +843,65 @@ func GetTxProposalSetNetworkProperty() *cobra.Command { MIN_TX_FEE MAX_TX_FEE VOTE_QUORUM - PROPOSAL_END_TIME + MINIMUM_PROPOSAL_END_TIME PROPOSAL_ENACTMENT_TIME - ENABLE_FOREIGN_TX_FEE_PAYMENTS + MIN_PROPOSAL_END_BLOCKS + MIN_PROPOSAL_ENACTMENT_BLOCKS + ENABLE_FOREIGN_FEE_PAYMENTS + MISCHANCE_RANK_DECREASE_AMOUNT + MAX_MISCHANCE + MISCHANCE_CONFIDENCE + INACTIVE_RANK_DECREASE_PERCENT + POOR_NETWORK_MAX_BANK_SEND + MIN_VALIDATORS + UNJAIL_MAX_TIME + ENABLE_TOKEN_WHITELIST + ENABLE_TOKEN_BLACKLIST + MIN_IDENTITY_APPROVAL_TIP + UNIQUE_IDENTITY_KEYS + UBI_HARDCAP + VALIDATORS_FEE_SHARE + INFLATION_RATE + INFLATION_PERIOD + UNSTAKING_PERIOD + MAX_DELEGATORS + MIN_DELEGATION_PUSHOUT + SLASHING_PERIOD + MAX_JAILED_PERCENTAGE + MAX_SLASHING_PERCENTAGE + MIN_CUSTODY_REWARD + MAX_CUSTODY_BUFFER_SIZE + MAX_CUSTODY_TX_SIZE + ABSTENTION_RANK_DECREASE_AMOUNT + MAX_ABSTENTION + MIN_COLLECTIVE_BOND + MIN_COLLECTIVE_BONDING_TIME + MAX_COLLECTIVE_OUTPUTS + MIN_COLLECTIVE_CLAIM_PERIOD + VALIDATOR_RECOVERY_BOND + MAX_ANNUAL_INFLATION + MAX_PROPOSAL_TITLE_SIZE + MAX_PROPOSAL_DESCRIPTION_SIZE + MAX_PROPOSAL_POLL_OPTION_SIZE + MAX_PROPOSAL_POLL_OPTION_COUNT + MAX_PROPOSAL_REFERENCE_SIZE + MAX_PROPOSAL_CHECKSUM_SIZE + MIN_DAPP_BOND + MAX_DAPP_BOND + DAPP_LIQUIDATION_THRESHOLD + DAPP_LIQUIDATION_PERIOD + DAPP_BOND_DURATION + DAPP_VERIFIER_BOND + DAPP_AUTO_DENOUNCE_TIME + DAPP_MISCHANCE_RANK_DECREASE_AMOUNT + DAPP_MAX_MISCHANCE + DAPP_INACTIVE_RANK_DECREASE_PERCENT + DAPP_POOL_SLIPPAGE_DEFAULT + MINTING_FT_FEE + MINTING_NFT_FEE + VETO_THRESHOLD + AUTOCOMPOUND_INTERVAL_NUM_BLOCKS + DOWNTIME_INACTIVE_DURATION `, Args: cobra.ExactArgs(2), RunE: func(cmd *cobra.Command, args []string) error { @@ -802,9 +917,29 @@ func GetTxProposalSetNetworkProperty() *cobra.Command { value := types.NetworkPropertyValue{} switch types.NetworkProperty(property) { + case types.InactiveRankDecreasePercent: + fallthrough case types.UniqueIdentityKeys: - value.StrValue = args[1] + fallthrough case types.ValidatorsFeeShare: + fallthrough + case types.InflationRate: + fallthrough + case types.MaxJailedPercentage: + fallthrough + case types.MaxSlashingPercentage: + fallthrough + case types.MaxAnnualInflation: + fallthrough + case types.DappVerifierBond: + fallthrough + case types.DappPoolSlippageDefault: + fallthrough + case types.DappInactiveRankDecreasePercent: + fallthrough + case types.VoteQuorum: + fallthrough + case types.VetoThreshold: value.StrValue = args[1] default: numVal, err := strconv.Atoi(args[1]) @@ -2314,6 +2449,114 @@ func GetTxProposalJailCouncilorCmd() *cobra.Command { return cmd } +// GetTxProposalSetExecutionFeesCmd implement cli command for ProposalSetExecutionFees +func GetTxProposalSetExecutionFeesCmd() *cobra.Command { + cmd := &cobra.Command{ + Use: "proposal-set-execution-fees", + Short: "Create a proposal to set execution fees", + Example: `proposal-set-execution-fees --tx-types=[txTypes] --execution-fees=[executionFees] --failure-fees=[failureFees] --timeouts=[timeouts] --default-params=[defaultParams]`, + Args: cobra.ExactArgs(0), + RunE: func(cmd *cobra.Command, args []string) error { + clientCtx, err := client.GetClientTxContext(cmd) + if err != nil { + return err + } + title, err := cmd.Flags().GetString(FlagTitle) + if err != nil { + return fmt.Errorf("invalid title: %w", err) + } + description, err := cmd.Flags().GetString(FlagDescription) + if err != nil { + return fmt.Errorf("invalid description: %w", err) + } + + txTypesStr, err := cmd.Flags().GetString(FlagTxTypes) + if err != nil { + return fmt.Errorf("invalid tx types: %w", err) + } + + execFeesStr, err := cmd.Flags().GetString(FlagExecutionFees) + if err != nil { + return fmt.Errorf("invalid execution fees: %w", err) + } + + failureFeesStr, err := cmd.Flags().GetString(FlagFailureFees) + if err != nil { + return fmt.Errorf("invalid failure fees: %w", err) + } + + timeoutsStr, err := cmd.Flags().GetString(FlagTimeouts) + if err != nil { + return fmt.Errorf("invalid timeouts: %w", err) + } + + defaultParamsStr, err := cmd.Flags().GetString(FlagTimeouts) + if err != nil { + return fmt.Errorf("invalid default params: %w", err) + } + + txTypes := strings.Split(txTypesStr, ",") + execFeeStrs := strings.Split(execFeesStr, ",") + failureFeeStrs := strings.Split(failureFeesStr, ",") + timeoutStrs := strings.Split(timeoutsStr, ",") + defaultParamStrs := strings.Split(defaultParamsStr, ",") + executionFees := []types.ExecutionFee{} + for i, txType := range txTypes { + execFee, err := strconv.Atoi(execFeeStrs[i]) + if err != nil { + return err + } + failureFee, err := strconv.Atoi(failureFeeStrs[i]) + if err != nil { + return err + } + timeout, err := strconv.Atoi(timeoutStrs[i]) + if err != nil { + return err + } + defaultParams, err := strconv.Atoi(defaultParamStrs[i]) + if err != nil { + return err + } + executionFees = append(executionFees, types.ExecutionFee{ + TransactionType: txType, + ExecutionFee: uint64(execFee), + FailureFee: uint64(failureFee), + Timeout: uint64(timeout), + DefaultParameters: uint64(defaultParams), + }) + } + + msg, err := types.NewMsgSubmitProposal( + clientCtx.FromAddress, + title, + description, + types.NewSetExecutionFeesProposal(clientCtx.FromAddress, description, executionFees), + ) + if err != nil { + return err + } + + return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), msg) + }, + } + + cmd.Flags().String(FlagTitle, "", "The title of the proposal.") + cmd.MarkFlagRequired(FlagTitle) + cmd.Flags().String(FlagDescription, "", "The description of the proposal, it can be a url, some text, etc.") + cmd.MarkFlagRequired(FlagDescription) + cmd.Flags().String(FlagTxTypes, "", "Transaction types to set execution fees") + cmd.Flags().String(FlagExecutionFees, "", "Execution fees") + cmd.Flags().String(FlagFailureFees, "", "Failure fees") + cmd.Flags().String(FlagTimeouts, "", "Timeouts") + cmd.Flags().String(FlagDefaultParams, "", "Default params") + + flags.AddTxFlagsToCmd(cmd) + _ = cmd.MarkFlagRequired(flags.FlagFrom) + + return cmd +} + // convertAsPermValues convert array of int32 to PermValue array. func convertAsPermValues(values []int32) []types.PermValue { var v []types.PermValue diff --git a/x/gov/client/cli/util_test.go b/x/gov/client/cli/util_test.go index e32bbbf6d..2cc2dd0c0 100644 --- a/x/gov/client/cli/util_test.go +++ b/x/gov/client/cli/util_test.go @@ -205,14 +205,14 @@ func (s IntegrationTestSuite) SetNetworkPropertyProposal(property string, value s.Require().Contains(result.RawLog, "SetNetworkProperty") } -func (s IntegrationTestSuite) UpsertRate(denom string, rate string, flagFeePayments bool) sdk.TxResponse { +func (s IntegrationTestSuite) UpsertRate(denom string, rate string, flagFeeEnabled bool) sdk.TxResponse { val := s.network.Validators[0] clientCtx := val.ClientCtx - cmd := tokenscli.GetTxUpsertTokenRateCmd() + cmd := tokenscli.GetTxUpsertTokenInfoCmd() out, err := clitestutil.ExecTestCLICmd(clientCtx, cmd, []string{ fmt.Sprintf("--%s=%s", tokenscli.FlagDenom, denom), - fmt.Sprintf("--%s=%s", tokenscli.FlagRate, rate), - fmt.Sprintf("--%s=%s", tokenscli.FlagFeePayments, strconv.FormatBool(flagFeePayments)), + fmt.Sprintf("--%s=%s", tokenscli.FlagFeeRate, rate), + fmt.Sprintf("--%s=%s", tokenscli.FlagFeeEnabled, strconv.FormatBool(flagFeeEnabled)), fmt.Sprintf("--%s=%s", flags.FlagFrom, val.Address.String()), fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastSync), diff --git a/x/gov/genesis_test.go b/x/gov/genesis_test.go index 7d7890ac0..5c7379bdb 100644 --- a/x/gov/genesis_test.go +++ b/x/gov/genesis_test.go @@ -29,8 +29,8 @@ func TestSimappExportGenesis(t *testing.T) { bz, err := app.AppCodec().MarshalJSON(genesis) require.NoError(t, err) buffer := new(bytes.Buffer) - err = json.Compact(buffer, []byte(`{ - "default_denom": "ukex", + err = json.Compact(buffer, []byte(`{ + "default_denom": "ukex", "bech32_prefix": "kira", "starting_proposal_id": "1", "next_role_id": "3", @@ -53,15 +53,12 @@ func TestSimappExportGenesis(t *testing.T) { 1, 2, 3, - 6, 8, 9, 12, 13, 10, 11, - 14, - 15, 18, 19, 20, @@ -114,7 +111,10 @@ func TestSimappExportGenesis(t *testing.T) { 63, 64, 65, - 66 + 66, + 67, + 68, + 69 ] }, "2": { @@ -128,7 +128,7 @@ func TestSimappExportGenesis(t *testing.T) { "network_properties": { "min_tx_fee": "100", "max_tx_fee": "1000000", - "vote_quorum": "33", + "vote_quorum": "0.330000000000000000", "minimum_proposal_end_time": "300", "proposal_enactment_time": "300", "min_proposal_end_blocks": "2", @@ -152,9 +152,9 @@ func TestSimappExportGenesis(t *testing.T) { "unstaking_period": "2629800", "max_delegators": "100", "min_delegation_pushout": "10", - "slashing_period": "3600", + "slashing_period": "2629800", "max_jailed_percentage": "0.250000000000000000", - "max_slashing_percentage": "0.010000000000000000", + "max_slashing_percentage": "0.005000000000000000", "min_custody_reward": "200", "max_custody_buffer_size": "10", "max_custody_tx_size": "8192", @@ -174,22 +174,21 @@ func TestSimappExportGenesis(t *testing.T) { "max_proposal_checksum_size": "128", "min_dapp_bond": "1000000", "max_dapp_bond": "10000000", - "dapp_liquidation_threshold": "0", - "dapp_liquidation_period": "0", + "dapp_liquidation_threshold": "100000000000", + "dapp_liquidation_period": "2419200", "dapp_bond_duration": "604800", "dapp_verifier_bond": "0.001000000000000000", "dapp_auto_denounce_time": "60", "dapp_mischance_rank_decrease_amount": "1", "dapp_max_mischance": "10", - "dapp_inactive_rank_decrease_percent": "10", + "dapp_inactive_rank_decrease_percent": "0.100000000000000000", "dapp_pool_slippage_default": "0.100000000000000000", "minting_ft_fee": "100000000000000", "minting_nft_fee": "100000000000000", - "veto_threshold": "33.400000000000000000", + "veto_threshold": "0.334000000000000000", "autocompound_interval_num_blocks": "17280", + "downtime_inactive_duration": "600", "bridge_address": "test", - "bridge_cosmos_ethereum_exchange_rate": 10, - "bridge_ethereum_cosmos_exchange_rate": 0.100000000000000000, }, "execution_fees": [ { @@ -200,21 +199,21 @@ func TestSimappExportGenesis(t *testing.T) { "default_parameters": "0" }, { - "transaction_type": "claim-councilor", + "transaction_type": "claim-proposal-type-x", "execution_fee": "100", "failure_fee": "1", "timeout": "10", "default_parameters": "0" }, { - "transaction_type": "claim-proposal-type-x", + "transaction_type": "claim_councilor", "execution_fee": "100", "failure_fee": "1", "timeout": "10", "default_parameters": "0" }, { - "transaction_type": "claim-validator", + "transaction_type": "claim_validator", "execution_fee": "100", "failure_fee": "1", "timeout": "10", @@ -241,13 +240,6 @@ func TestSimappExportGenesis(t *testing.T) { "timeout": "10", "default_parameters": "0" }, - { - "transaction_type": "upsert-token-alias", - "execution_fee": "100", - "failure_fee": "1", - "timeout": "10", - "default_parameters": "0" - }, { "transaction_type": "veto-proposal-type-x", "execution_fee": "100", @@ -265,28 +257,28 @@ func TestSimappExportGenesis(t *testing.T) { ], "poor_network_messages": { "messages": [ - "submit-proposal", - "set-network-properties", - "vote-proposal", - "claim-councilor", - "whitelist-permissions", - "blacklist-permissions", - "create-role", - "assign-role", - "unassign-role", - "whitelist-role-permission", - "blacklist-role-permission", - "remove-whitelist-role-permission", - "remove-blacklist-role-permission", - "claim-validator", + "submit_proposal", + "set_network_properties", + "vote_proposal", + "claim_councilor", + "whitelist_permissions", + "blacklist_permissions", + "create_role", + "assign_role", + "unassign_role", + "whitelist_role_permission", + "blacklist_role_permission", + "remove_whitelist_role_permission", + "remove_blacklist_role_permission", + "claim_validator", "activate", "pause", "unpause", - "register-identity-records", - "edit-identity-record", - "request-identity-records-verify", - "handle-identity-records-verify-request", - "cancel-identity-records-verify-request" + "register_identity_records", + "delete_identity_records", + "request_identity_records_verify", + "handle_identity_records_verify_request", + "cancel_identity_records_verify_request" ] }, "proposals": [], @@ -340,69 +332,70 @@ func TestExportInitGenesis(t *testing.T) { types.PermSetPermissions, types.PermClaimValidator, types.PermClaimCouncilor, - types.PermUpsertTokenAlias, }, nil), }, StartingProposalId: 1, NetworkProperties: &types.NetworkProperties{ - MinTxFee: 100, - MaxTxFee: 1000000, - VoteQuorum: 33, - MinimumProposalEndTime: 300, // 300 seconds / 5 mins - ProposalEnactmentTime: 300, // 300 seconds / 5 mins - MinProposalEndBlocks: 2, - MinProposalEnactmentBlocks: 1, - MischanceRankDecreaseAmount: 1, - MaxMischance: 1, - InactiveRankDecreasePercent: sdk.NewDecWithPrec(2, 2), - MinValidators: 1, - PoorNetworkMaxBankSend: 1, - EnableForeignFeePayments: true, - MinIdentityApprovalTip: 200, - UniqueIdentityKeys: "moniker,username", - UbiHardcap: 6000_000, - ValidatorsFeeShare: sdk.NewDecWithPrec(50, 2), // 50% - InflationRate: sdk.NewDecWithPrec(18, 2), // 18% - InflationPeriod: 31557600, // 1 year - UnstakingPeriod: 2629800, // 1 month - MaxDelegators: 100, - MinDelegationPushout: 10, - SlashingPeriod: 3600, - MaxJailedPercentage: sdk.NewDecWithPrec(25, 2), - MaxSlashingPercentage: sdk.NewDecWithPrec(1, 2), - MinCustodyReward: 200, - MaxCustodyBufferSize: 10, - MaxCustodyTxSize: 8192, - AbstentionRankDecreaseAmount: 1, - MaxAbstention: 2, - MinCollectiveBond: 100_000, // in KEX - MinCollectiveBondingTime: 86400, // in seconds - MaxCollectiveOutputs: 10, - MinCollectiveClaimPeriod: 14400, // 4hrs - ValidatorRecoveryBond: 300000, // 300k KEX - MaxAnnualInflation: sdk.NewDecWithPrec(35, 2), // 35% - MaxProposalTitleSize: 128, - MaxProposalDescriptionSize: 1024, - MaxProposalPollOptionSize: 64, - MaxProposalPollOptionCount: 128, - MaxProposalReferenceSize: 512, - MaxProposalChecksumSize: 128, - MinDappBond: 1000000, - MaxDappBond: 10000000, - DappBondDuration: 604800, - DappVerifierBond: sdk.NewDecWithPrec(1, 3), //0.1% - DappAutoDenounceTime: 60, // 60s - DappMischanceRankDecreaseAmount: 1, - DappMaxMischance: 10, - DappInactiveRankDecreasePercent: 10, - DappPoolSlippageDefault: sdk.NewDecWithPrec(1, 1), // 10% - MintingFtFee: 100_000_000_000_000, - MintingNftFee: 100_000_000_000_000, - VetoThreshold: sdk.NewDecWithPrec(3340, 2), // 33.40% - AutocompoundIntervalNumBlocks: 17280, - BridgeAddress: "test", - BridgeCosmosEthereumExchangeRate: sdk.NewDec(10), - BridgeEthereumCosmosExchangeRate: sdk.NewDecWithPrec(1, 1), + MinTxFee: 100, + MaxTxFee: 1000000, + VoteQuorum: sdk.NewDecWithPrec(33, 2), + MinimumProposalEndTime: 300, // 300 seconds / 5 mins + ProposalEnactmentTime: 300, // 300 seconds / 5 mins + MinProposalEndBlocks: 2, + MinProposalEnactmentBlocks: 1, + MischanceRankDecreaseAmount: 1, + MaxMischance: 1, + InactiveRankDecreasePercent: sdk.NewDecWithPrec(2, 2), + MinValidators: 1, + UnjailMaxTime: 600, + PoorNetworkMaxBankSend: 1, + EnableForeignFeePayments: true, + MinIdentityApprovalTip: 200, + UniqueIdentityKeys: "moniker,username", + UbiHardcap: 6000_000, + ValidatorsFeeShare: sdk.NewDecWithPrec(50, 2), // 50% + InflationRate: sdk.NewDecWithPrec(18, 2), // 18% + InflationPeriod: 31557600, // 1 year + UnstakingPeriod: 2629800, // 1 month + MaxDelegators: 100, + MinDelegationPushout: 10, + SlashingPeriod: 2629800, + MaxJailedPercentage: sdk.NewDecWithPrec(25, 2), + MaxSlashingPercentage: sdk.NewDecWithPrec(5, 3), // 0.5% + MinCustodyReward: 200, + MaxCustodyBufferSize: 10, + MaxCustodyTxSize: 8192, + AbstentionRankDecreaseAmount: 1, + MaxAbstention: 2, + MinCollectiveBond: 100_000, // in KEX + MinCollectiveBondingTime: 86400, // in seconds + MaxCollectiveOutputs: 10, + MinCollectiveClaimPeriod: 14400, // 4hrs + ValidatorRecoveryBond: 300000, // 300k KEX + MaxAnnualInflation: sdk.NewDecWithPrec(35, 2), // 35% + MaxProposalTitleSize: 128, + MaxProposalDescriptionSize: 1024, + MaxProposalPollOptionSize: 64, + MaxProposalPollOptionCount: 128, + MaxProposalReferenceSize: 512, + MaxProposalChecksumSize: 128, + MinDappBond: 1000000, + MaxDappBond: 10000000, + DappBondDuration: 604800, + DappVerifierBond: sdk.NewDecWithPrec(1, 3), //0.1% + DappAutoDenounceTime: 60, // 60s + DappMischanceRankDecreaseAmount: 1, + DappMaxMischance: 10, + DappInactiveRankDecreasePercent: sdk.NewDecWithPrec(10, 2), + DappPoolSlippageDefault: sdk.NewDecWithPrec(1, 1), // 10% + DappLiquidationThreshold: 100_000_000_000, // default 100’000 KEX + DappLiquidationPeriod: 2419200, // default 2419200, ~28d + MintingFtFee: 100_000_000_000_000, + MintingNftFee: 100_000_000_000_000, + VetoThreshold: sdk.NewDecWithPrec(3340, 4), // 33.40% + AutocompoundIntervalNumBlocks: 17280, + DowntimeInactiveDuration: 600, + BridgeAddress: "test", }, ExecutionFees: []types.ExecutionFee{ { @@ -449,8 +442,7 @@ func TestExportInitGenesis(t *testing.T) { "whitelist": [ 1, 2, - 3, - 6 + 3 ] }, "2": { @@ -460,45 +452,45 @@ func TestExportInitGenesis(t *testing.T) { }, "network_actors": [], "network_properties": { - "min_tx_fee": "100", - "max_tx_fee": "1000000", - "vote_quorum": "33", - "minimum_proposal_end_time": "300", - "proposal_enactment_time": "300", - "min_proposal_end_blocks": "2", - "min_proposal_enactment_blocks": "1", - "enable_foreign_fee_payments": true, - "mischance_rank_decrease_amount": "1", - "max_mischance": "1", - "mischance_confidence": "0", - "inactive_rank_decrease_percent": "0.020000000000000000", - "min_validators": "1", - "poor_network_max_bank_send": "1", - "unjail_max_time": "0", - "enable_token_whitelist": false, - "enable_token_blacklist": false, - "min_identity_approval_tip": "200", - "unique_identity_keys": "moniker,username", - "ubi_hardcap": "6000000", - "validators_fee_share": "0.500000000000000000", - "inflation_rate": "0.180000000000000000", - "inflation_period": "31557600", - "unstaking_period": "2629800", - "max_delegators": "100", - "min_delegation_pushout": "10", - "slashing_period": "3600", - "max_jailed_percentage": "0.250000000000000000", - "max_slashing_percentage": "0.010000000000000000", - "min_custody_reward": "200", - "max_custody_buffer_size": "10", - "max_custody_tx_size": "8192", - "abstention_rank_decrease_amount": "1", - "max_abstention": "2", - "min_collective_bond": "100000", - "min_collective_bonding_time": "86400", - "max_collective_outputs": "10", - "min_collective_claim_period": "14400", - "validator_recovery_bond": "300000", + "min_tx_fee": "100", + "max_tx_fee": "1000000", + "vote_quorum": "0.330000000000000000", + "minimum_proposal_end_time": "300", + "proposal_enactment_time": "300", + "min_proposal_end_blocks": "2", + "min_proposal_enactment_blocks": "1", + "enable_foreign_fee_payments": true, + "mischance_rank_decrease_amount": "1", + "max_mischance": "1", + "mischance_confidence": "0", + "inactive_rank_decrease_percent": "0.020000000000000000", + "min_validators": "1", + "poor_network_max_bank_send": "1", + "unjail_max_time": "600", + "enable_token_whitelist": false, + "enable_token_blacklist": false, + "min_identity_approval_tip": "200", + "unique_identity_keys": "moniker,username", + "ubi_hardcap": "6000000", + "validators_fee_share": "0.500000000000000000", + "inflation_rate": "0.180000000000000000", + "inflation_period": "31557600", + "unstaking_period": "2629800", + "max_delegators": "100", + "min_delegation_pushout": "10", + "slashing_period": "2629800", + "max_jailed_percentage": "0.250000000000000000", + "max_slashing_percentage": "0.005000000000000000", + "min_custody_reward": "200", + "max_custody_buffer_size": "10", + "max_custody_tx_size": "8192", + "abstention_rank_decrease_amount": "1", + "max_abstention": "2", + "min_collective_bond": "100000", + "min_collective_bonding_time": "86400", + "max_collective_outputs": "10", + "min_collective_claim_period": "14400", + "validator_recovery_bond": "300000", "max_annual_inflation": "0.350000000000000000", "max_proposal_title_size": "128", "max_proposal_description_size": "1024", @@ -506,24 +498,23 @@ func TestExportInitGenesis(t *testing.T) { "max_proposal_poll_option_count": "128", "max_proposal_reference_size": "512", "max_proposal_checksum_size": "128", - "min_dapp_bond": "1000000", + "min_dapp_bond": "1000000", "max_dapp_bond": "10000000", - "dapp_liquidation_threshold": "0", - "dapp_liquidation_period": "0", + "dapp_liquidation_threshold": "100000000000", + "dapp_liquidation_period": "2419200", "dapp_bond_duration": "604800", "dapp_verifier_bond": "0.001000000000000000", "dapp_auto_denounce_time": "60", "dapp_mischance_rank_decrease_amount": "1", "dapp_max_mischance": "10", - "dapp_inactive_rank_decrease_percent": "10", + "dapp_inactive_rank_decrease_percent": "0.100000000000000000", "dapp_pool_slippage_default": "0.100000000000000000", "minting_ft_fee": "100000000000000", "minting_nft_fee": "100000000000000", - "veto_threshold": "33.400000000000000000", + "veto_threshold": "0.334000000000000000", "autocompound_interval_num_blocks": "17280", - "bridge_address": "test", - "bridge_cosmos_ethereum_exchange_rate": 10, - "bridge_ethereum_cosmos_exchange_rate": 0.100000000000000000, + "downtime_inactive_duration": "600", + "bridge_address": "test", }, "execution_fees": [ { @@ -536,7 +527,7 @@ func TestExportInitGenesis(t *testing.T) { ], "poor_network_messages": { "messages": [ - "set-network-properties" + "set_network_properties" ] }, "proposals": [], diff --git a/x/gov/handler_test.go b/x/gov/handler_test.go index 50eb6452d..1d39bb8da 100644 --- a/x/gov/handler_test.go +++ b/x/gov/handler_test.go @@ -11,7 +11,6 @@ import ( kiratypes "github.com/KiraCore/sekai/types" "github.com/KiraCore/sekai/x/gov" "github.com/KiraCore/sekai/x/gov/types" - tokenstypes "github.com/KiraCore/sekai/x/tokens/types" tmproto "github.com/cometbft/cometbft/proto/tendermint/types" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/errors" @@ -264,6 +263,10 @@ func TestNewHandler_SetNetworkProperties(t *testing.T) { sudoAddr, err := sdk.AccAddressFromBech32("kira1alzyfq40zjsveat87jlg8jxetwqmr0a29sgd0f") require.NoError(t, err) + networkProperties := types.DefaultGenesis().NetworkProperties + networkProperties.MinTxFee = 100 + networkProperties.MaxTxFee = 1000 + tests := []struct { name string msg sdk.Msg @@ -272,22 +275,16 @@ func TestNewHandler_SetNetworkProperties(t *testing.T) { { name: "Success run with ChangeTxFee permission", msg: &types.MsgSetNetworkProperties{ - NetworkProperties: &types.NetworkProperties{ - MinTxFee: 100, - MaxTxFee: 1000, - }, - Proposer: changeFeeAddr, + NetworkProperties: networkProperties, + Proposer: changeFeeAddr, }, desiredErr: "", }, { name: "Failure run without ChangeTxFee permission", msg: &types.MsgSetNetworkProperties{ - NetworkProperties: &types.NetworkProperties{ - MinTxFee: 100, - MaxTxFee: 1000, - }, - Proposer: sudoAddr, + NetworkProperties: networkProperties, + Proposer: sudoAddr, }, desiredErr: "not enough permissions", }, @@ -1553,46 +1550,6 @@ func TestHandler_VoteProposal_Errors(t *testing.T) { }, fmt.Errorf("%s: not enough permissions", types.PermVoteSetNetworkPropertyProposal.String()), }, - { - "Voter does not have permission to vote this proposal: UpsertTokenAlias", - types.NewMsgVoteProposal( - 1, voterAddr, types.OptionAbstain, sdk.ZeroDec(), - ), - func(t *testing.T, app *simapp.SekaiApp, ctx sdk.Context) { - actor := types.NewNetworkActor( - voterAddr, - []uint64{}, - types.Active, - []types.VoteOption{}, - types.NewPermissions(nil, nil), - 1, - ) - app.CustomGovKeeper.SaveNetworkActor(ctx, actor) - - // Create proposal - proposal, err := types.NewProposal( - 1, - "title", - "some desc", - tokenstypes.NewUpsertTokenAliasProposal( - "eur", - "Euro", - "theIcon", - 12, - []string{}, - false, - ), - ctx.BlockTime(), - ctx.BlockTime().Add(time.Second*20), - ctx.BlockTime().Add(time.Second*30), - ctx.BlockHeight()+2, - ctx.BlockHeight()+3, - ) - require.NoError(t, err) - app.CustomGovKeeper.SaveProposal(ctx, proposal) - }, - fmt.Errorf("%s: not enough permissions", types.PermVoteUpsertTokenAliasProposal.String()), - }, } for _, tt := range tests { diff --git a/x/gov/keeper/grpc_query.go b/x/gov/keeper/grpc_query.go index 43ae874db..c23d5db09 100644 --- a/x/gov/keeper/grpc_query.go +++ b/x/gov/keeper/grpc_query.go @@ -9,11 +9,11 @@ import ( "google.golang.org/grpc/codes" "google.golang.org/grpc/status" + errorsmod "cosmossdk.io/errors" appparams "github.com/KiraCore/sekai/app/params" kiratypes "github.com/KiraCore/sekai/types" "github.com/KiraCore/sekai/x/gov/types" stakingtypes "github.com/KiraCore/sekai/x/staking/types" - sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" "github.com/cosmos/cosmos-sdk/types/query" ) @@ -162,7 +162,7 @@ func (k Keeper) ExecutionFee(goCtx context.Context, request *types.ExecutionFeeR ctx := sdk.UnwrapSDKContext(goCtx) fee := k.GetExecutionFee(ctx, request.TransactionType) if fee == nil { - return nil, sdkerrors.Wrap(types.ErrFeeNotExist, fmt.Sprintf("fee does not exist for %s", request.TransactionType)) + return nil, errorsmod.Wrap(types.ErrFeeNotExist, fmt.Sprintf("fee does not exist for %s", request.TransactionType)) } return &types.ExecutionFeeResponse{Fee: fee}, nil } @@ -195,7 +195,7 @@ func (k Keeper) Proposal(goCtx context.Context, request *types.QueryProposalRequ ctx := sdk.UnwrapSDKContext(goCtx) proposal, found := k.GetProposal(ctx, request.ProposalId) if found == false { - return nil, sdkerrors.Wrap(types.ErrGettingProposals, fmt.Sprintf("proposal does not exist for %d", request.ProposalId)) + return nil, errorsmod.Wrap(types.ErrGettingProposals, fmt.Sprintf("proposal does not exist for %d", request.ProposalId)) } votes := k.GetProposalVotes(ctx, request.ProposalId) return &types.QueryProposalResponse{ @@ -209,7 +209,7 @@ func (k Keeper) Proposals(goCtx context.Context, request *types.QueryProposalsRe c := sdk.UnwrapSDKContext(goCtx) if request == nil { err := status.Error(codes.InvalidArgument, "empty request") - return nil, sdkerrors.Wrap(types.ErrGettingProposals, fmt.Sprintf("error getting proposals: %s", err.Error())) + return nil, errorsmod.Wrap(types.ErrGettingProposals, fmt.Sprintf("error getting proposals: %s", err.Error())) } store := c.KVStore(k.storeKey) @@ -251,7 +251,7 @@ func (k Keeper) Proposals(goCtx context.Context, request *types.QueryProposalsRe pageRes, err = query.FilteredPaginate(proposalsStore, request.Pagination, onResult) if err != nil { - return nil, sdkerrors.Wrap(types.ErrGettingProposals, fmt.Sprintf("error getting proposals: %s", err.Error())) + return nil, errorsmod.Wrap(types.ErrGettingProposals, fmt.Sprintf("error getting proposals: %s", err.Error())) } res := types.QueryProposalsResponse{ @@ -267,7 +267,7 @@ func (k Keeper) WhitelistedProposalVoters(goCtx context.Context, request *types. ctx := sdk.UnwrapSDKContext(goCtx) proposal, found := k.GetProposal(ctx, request.ProposalId) if !found { - return nil, sdkerrors.Wrap(types.ErrGettingProposals, fmt.Sprintf("proposal does not exist for %d", request.ProposalId)) + return nil, errorsmod.Wrap(types.ErrGettingProposals, fmt.Sprintf("proposal does not exist for %d", request.ProposalId)) } // dynamic proposal users for spending pool proposals @@ -321,9 +321,8 @@ func (k Keeper) ProposerVotersCount(goCtx context.Context, request *types.QueryP types.PermWhitelistAccountPermissionProposal, types.PermCreateUpsertDataRegistryProposal, types.PermCreateSetNetworkPropertyProposal, - types.PermCreateUpsertTokenAliasProposal, types.PermCreateSetPoorNetworkMessagesProposal, - types.PermCreateUpsertTokenRateProposal, + types.PermCreateUpsertTokenInfoProposal, types.PermCreateUnjailValidatorProposal, types.PermCreateRoleProposal, types.PermCreateTokensWhiteBlackChangeProposal, @@ -347,9 +346,8 @@ func (k Keeper) ProposerVotersCount(goCtx context.Context, request *types.QueryP types.PermVoteWhitelistAccountPermissionProposal, types.PermVoteUpsertDataRegistryProposal, types.PermVoteSetNetworkPropertyProposal, - types.PermVoteUpsertTokenAliasProposal, types.PermVoteSetPoorNetworkMessagesProposal, - types.PermVoteUpsertTokenRateProposal, + types.PermVoteUpsertTokenInfoProposal, types.PermVoteUnjailValidatorProposal, types.PermVoteCreateRoleProposal, types.PermVoteTokensWhiteBlackChangeProposal, @@ -385,7 +383,7 @@ func (k Keeper) Vote(goCtx context.Context, request *types.QueryVoteRequest) (*t } vote, found := k.GetVote(ctx, request.ProposalId, voter) if !found { - return &types.QueryVoteResponse{Vote: vote}, sdkerrors.Wrap(types.ErrGettingProposalVotes, fmt.Sprintf("error getting votes for proposal %d, voter %s", request.ProposalId, request.Voter)) + return &types.QueryVoteResponse{Vote: vote}, errorsmod.Wrap(types.ErrGettingProposalVotes, fmt.Sprintf("error getting votes for proposal %d, voter %s", request.ProposalId, request.Voter)) } return &types.QueryVoteResponse{Vote: vote}, nil } diff --git a/x/gov/keeper/identity_registrar.go b/x/gov/keeper/identity_registrar.go index 209e3fe5c..71a8c07b1 100644 --- a/x/gov/keeper/identity_registrar.go +++ b/x/gov/keeper/identity_registrar.go @@ -8,11 +8,11 @@ import ( "strings" "time" + errorsmod "cosmossdk.io/errors" "github.com/KiraCore/sekai/x/gov/types" stakingtypes "github.com/KiraCore/sekai/x/staking/types" "github.com/cosmos/cosmos-sdk/store/prefix" sdk "github.com/cosmos/cosmos-sdk/types" - sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" ) func ValidateIdentityRecordKey(key string) bool { @@ -144,6 +144,32 @@ func (k Keeper) DeleteIdentityRecordById(ctx sdk.Context, recordId uint64) { prefix.NewStore(ctx.KVStore(k.storeKey), types.IdentityRecordByAddressPrefix(record.Address)).Delete(sdk.Uint64ToBigEndian(recordId)) } +func (k Keeper) CancelInvalidIdentityRecordVerifyRequests(ctx sdk.Context, address sdk.AccAddress, recordIds []uint64) error { + recordIdMap := make(map[uint64]bool) + for _, recordId := range recordIds { + recordIdMap[recordId] = true + } + // if record value's updated after requesting verification, cancels verification request automatically + store := ctx.KVStore(k.storeKey) + iterator := sdk.KVStorePrefixIterator(store, types.IdRecordVerifyRequestByRequesterPrefix(address.String())) + defer iterator.Close() + + for ; iterator.Valid(); iterator.Next() { + requestId := sdk.BigEndianToUint64(iterator.Value()) + request := k.GetIdRecordsVerifyRequest(ctx, requestId) + for _, reqRecordId := range request.RecordIds { + if recordIdMap[reqRecordId] { + err := k.CancelIdentityRecordsVerifyRequest(ctx, address, requestId) + if err != nil { + return err + } + break + } + } + } + return nil +} + // RegisterIdentityRecord defines a method to register identity records for an address func (k Keeper) RegisterIdentityRecords(ctx sdk.Context, address sdk.AccAddress, infos []types.IdentityInfoEntry) error { // validate key and set the key to non case-sensitive @@ -151,7 +177,7 @@ func (k Keeper) RegisterIdentityRecords(ctx sdk.Context, address sdk.AccAddress, uniqueKeys := strings.Split(properties.UniqueIdentityKeys, ",") for i, info := range infos { if !ValidateIdentityRecordKey(info.Key) { - return sdkerrors.Wrap(types.ErrInvalidIdentityRecordKey, fmt.Sprintf("invalid key exists: key=%s", info.Key)) + return errorsmod.Wrap(types.ErrInvalidIdentityRecordKey, fmt.Sprintf("invalid key exists: key=%s", info.Key)) } infos[i].Key = FormalizeIdentityRecordKey(info.Key) @@ -182,17 +208,21 @@ func (k Keeper) RegisterIdentityRecords(ctx sdk.Context, address sdk.AccAddress, if len(addrs) == 1 && bytes.Equal(addrs[0], address) { } else if len(addrs) > 0 { - return sdkerrors.Wrap(types.ErrKeyShouldBeUnique, fmt.Sprintf("the key %s, value %s is already registered by %s", infos[i].Key, infos[i].Info, addrs[0].String())) + return errorsmod.Wrap(types.ErrKeyShouldBeUnique, fmt.Sprintf("the key %s, value %s is already registered by %s", infos[i].Key, infos[i].Info, addrs[0].String())) } } } + recordIdsAffected := []uint64{} for _, info := range infos { // use existing record id if it already exists recordId := k.GetIdentityRecordIdByAddressKey(ctx, address, info.Key) + record := k.GetIdentityRecordById(ctx, recordId) if recordId == 0 { recordId = k.GetLastIdentityRecordId(ctx) + 1 k.SetLastIdentityRecordId(ctx, recordId) + } else if record == nil || record.Value != info.Info { + recordIdsAffected = append(recordIdsAffected, recordId) } // create or update identity record k.SetIdentityRecord(ctx, types.IdentityRecord{ @@ -204,7 +234,7 @@ func (k Keeper) RegisterIdentityRecords(ctx sdk.Context, address sdk.AccAddress, Verifiers: []string{}, }) } - return nil + return k.CancelInvalidIdentityRecordVerifyRequests(ctx, address, recordIdsAffected) } // DeleteIdentityRecords defines a method to delete identity records owned by an address @@ -212,13 +242,13 @@ func (k Keeper) DeleteIdentityRecords(ctx sdk.Context, address sdk.AccAddress, k // validate key and set the key to non case-sensitive for i, key := range keys { if !ValidateIdentityRecordKey(key) { - return sdkerrors.Wrap(types.ErrInvalidIdentityRecordKey, fmt.Sprintf("invalid key exists: key=%s", key)) + return errorsmod.Wrap(types.ErrInvalidIdentityRecordKey, fmt.Sprintf("invalid key exists: key=%s", key)) } keys[i] = FormalizeIdentityRecordKey(key) // we prevent deleting moniker field of a validator if key == "moniker" { - return sdkerrors.Wrap(types.ErrMonikerDeletionNotAllowed, fmt.Sprintf("moniker field is not allowed to delete")) + return errorsmod.Wrap(types.ErrMonikerDeletionNotAllowed, fmt.Sprintf("moniker field is not allowed to delete")) } } @@ -246,34 +276,14 @@ func (k Keeper) DeleteIdentityRecords(ctx sdk.Context, address sdk.AccAddress, k for _, recordId := range recordIds { prevRecord := k.GetIdentityRecordById(ctx, recordId) if prevRecord == nil { - return sdkerrors.Wrap(types.ErrInvalidIdentityRecordId, fmt.Sprintf("identity record with specified id does NOT exist: id=%d", recordId)) + return errorsmod.Wrap(types.ErrInvalidIdentityRecordId, fmt.Sprintf("identity record with specified id does NOT exist: id=%d", recordId)) } recordIdMap[recordId] = true k.DeleteIdentityRecordById(ctx, recordId) } - // remove record ids from verification request list - requests := k.GetIdRecordsVerifyRequestsByRequester(ctx, address) - for _, request := range requests { - recordIds := []uint64{} - for _, recordid := range request.RecordIds { - if !recordIdMap[recordid] { - recordIds = append(recordIds, recordid) - } - } - - if len(recordIds) == 0 { - err := k.CancelIdentityRecordsVerifyRequest(ctx, sdk.MustAccAddressFromBech32(request.Address), request.Id) - if err != nil { - return err - } - } else { - request.RecordIds = recordIds - k.SetIdentityRecordsVerifyRequest(ctx, request) - } - } - return nil + return k.CancelInvalidIdentityRecordVerifyRequests(ctx, address, recordIds) } // GetAllIdentityRecords query all identity records @@ -297,7 +307,7 @@ func (k Keeper) GetIdRecordsByAddressAndKeys(ctx sdk.Context, address sdk.AccAdd // validate key and set the key to non case-sensitive for i, key := range keys { if !ValidateIdentityRecordKey(key) { - return []types.IdentityRecord{}, sdkerrors.Wrap(types.ErrInvalidIdentityRecordKey, fmt.Sprintf("invalid key exists: key=%s", key)) + return []types.IdentityRecord{}, errorsmod.Wrap(types.ErrInvalidIdentityRecordKey, fmt.Sprintf("invalid key exists: key=%s", key)) } keys[i] = FormalizeIdentityRecordKey(key) } @@ -315,9 +325,17 @@ func (k Keeper) GetIdRecordsByAddressAndKeys(ctx sdk.Context, address sdk.AccAdd recordId := sdk.BigEndianToUint64(bz) record := k.GetIdentityRecordById(ctx, recordId) if record == nil { - return records, sdkerrors.Wrap(types.ErrInvalidIdentityRecordId, fmt.Sprintf("identity record with specified id does NOT exist: id=%d", recordId)) + records = append(records, types.IdentityRecord{ + Id: 0, + Address: address.String(), + Key: key, + Value: "", + Date: time.Time{}, + Verifiers: []string{}, + }) + } else { + records = append(records, *record) } - records = append(records, *record) } return records, nil } @@ -385,7 +403,7 @@ func (k Keeper) RequestIdentityRecordsVerify(ctx sdk.Context, address, verifier for _, recordId := range recordIds { if !idsMap[recordId] { - return requestId, sdkerrors.Wrap(types.ErrInvalidIdentityRecordId, fmt.Sprintf("executor is not owner of the identity record: id=%d", recordId)) + return requestId, errorsmod.Wrap(types.ErrInvalidIdentityRecordId, fmt.Sprintf("executor is not owner of the identity record: id=%d", recordId)) } } @@ -393,7 +411,7 @@ func (k Keeper) RequestIdentityRecordsVerify(ctx sdk.Context, address, verifier for _, recordId := range recordIds { record := k.GetIdentityRecordById(ctx, recordId) if record == nil { - return requestId, sdkerrors.Wrap(types.ErrInvalidIdentityRecordId, fmt.Sprintf("identity record with specified id does NOT exist: id=%d", recordId)) + return requestId, errorsmod.Wrap(types.ErrInvalidIdentityRecordId, fmt.Sprintf("identity record with specified id does NOT exist: id=%d", recordId)) } if lastRecordEditDate.Before(record.Date) { lastRecordEditDate = record.Date @@ -411,7 +429,7 @@ func (k Keeper) RequestIdentityRecordsVerify(ctx sdk.Context, address, verifier minApprovalTip := k.GetNetworkProperties(ctx).MinIdentityApprovalTip if sdk.NewInt(int64(minApprovalTip)).GT(tip.Amount) { - return requestId, sdkerrors.Wrap(types.ErrInvalidApprovalTip, fmt.Sprintf("approval tip is lower than minimum tip configured by the network")) + return requestId, errorsmod.Wrap(types.ErrInvalidApprovalTip, fmt.Sprintf("approval tip is lower than minimum tip configured by the network")) } k.SetIdentityRecordsVerifyRequest(ctx, request) @@ -459,7 +477,7 @@ func (k Keeper) DeleteIdRecordsVerifyRequest(ctx sdk.Context, requestId uint64) func (k Keeper) HandleIdentityRecordsVerifyRequest(ctx sdk.Context, verifier sdk.AccAddress, requestId uint64, approve bool) error { request := k.GetIdRecordsVerifyRequest(ctx, requestId) if request == nil { - return sdkerrors.Wrap(types.ErrInvalidVerifyRequestId, fmt.Sprintf("specified identity record verify request does NOT exist: id=%d", requestId)) + return errorsmod.Wrap(types.ErrInvalidVerifyRequestId, fmt.Sprintf("specified identity record verify request does NOT exist: id=%d", requestId)) } if verifier.String() != request.Verifier { return errors.New("verifier does not match with requested") @@ -476,7 +494,7 @@ func (k Keeper) HandleIdentityRecordsVerifyRequest(ctx sdk.Context, verifier sdk for _, recordId := range request.RecordIds { record := k.GetIdentityRecordById(ctx, recordId) if record == nil { - return sdkerrors.Wrap(types.ErrInvalidIdentityRecordId, fmt.Sprintf("identity record with specified id does NOT exist: id=%d", recordId)) + return errorsmod.Wrap(types.ErrInvalidIdentityRecordId, fmt.Sprintf("identity record with specified id does NOT exist: id=%d", recordId)) } if record.Date.After(request.LastRecordEditDate) { @@ -485,7 +503,7 @@ func (k Keeper) HandleIdentityRecordsVerifyRequest(ctx sdk.Context, verifier sdk } } - if approve == false { + if !approve { k.DeleteIdRecordsVerifyRequest(ctx, requestId) return nil } @@ -493,7 +511,7 @@ func (k Keeper) HandleIdentityRecordsVerifyRequest(ctx sdk.Context, verifier sdk for _, recordId := range request.RecordIds { record := k.GetIdentityRecordById(ctx, recordId) if record == nil { - return sdkerrors.Wrap(types.ErrInvalidIdentityRecordId, fmt.Sprintf("identity record with specified id does NOT exist: id=%d", recordId)) + return errorsmod.Wrap(types.ErrInvalidIdentityRecordId, fmt.Sprintf("identity record with specified id does NOT exist: id=%d", recordId)) } // if already exist, skip @@ -512,7 +530,7 @@ func (k Keeper) HandleIdentityRecordsVerifyRequest(ctx sdk.Context, verifier sdk func (k Keeper) CancelIdentityRecordsVerifyRequest(ctx sdk.Context, executor sdk.AccAddress, requestId uint64) error { request := k.GetIdRecordsVerifyRequest(ctx, requestId) if request == nil { - return sdkerrors.Wrap(types.ErrInvalidVerifyRequestId, fmt.Sprintf("specified identity record verify request does NOT exist: id=%d", requestId)) + return errorsmod.Wrap(types.ErrInvalidVerifyRequestId, fmt.Sprintf("specified identity record verify request does NOT exist: id=%d", requestId)) } if executor.String() != request.Address { return errors.New("executor is not identity record creator") diff --git a/x/gov/keeper/identity_registrar_test.go b/x/gov/keeper/identity_registrar_test.go index f9d8e1259..27a7cc5b6 100644 --- a/x/gov/keeper/identity_registrar_test.go +++ b/x/gov/keeper/identity_registrar_test.go @@ -202,7 +202,7 @@ func TestKeeper_IdentityRecordAddEditRemove(t *testing.T) { records = app.CustomGovKeeper.GetAllIdentityRecords(ctx) require.Len(t, records, 2) records = app.CustomGovKeeper.GetIdRecordsByAddress(ctx, addr1) - require.NotNil(t, record) + require.NotNil(t, records) records = app.CustomGovKeeper.GetIdRecordsByAddress(ctx, addr2) require.Len(t, records, 0) @@ -220,7 +220,8 @@ func TestKeeper_IdentityRecordAddEditRemove(t *testing.T) { require.Len(t, records, 1) records, err = app.CustomGovKeeper.GetIdRecordsByAddressAndKeys(ctx, addr1, []string{"invalidkey"}) - require.Error(t, err) + require.NoError(t, err) + require.Len(t, records, 1) } func TestKeeper_TryLongMonikerField(t *testing.T) { @@ -266,12 +267,12 @@ func TestKeeper_TryUniqueIdentityKeysSet(t *testing.T) { // create a new record and check if set correctly now := time.Now().UTC() ctx = ctx.WithBlockTime(now) - err := app.CustomGovKeeper.SetNetworkProperty(ctx, types.UniqueIdentityKeys, types.NetworkPropertyValue{StrValue: "moniker,email"}) + err := app.CustomGovKeeper.SetNetworkProperty(ctx, types.UniqueIdentityKeys, types.NetworkPropertyValue{StrValue: "moniker,username,email"}) require.NoError(t, err) networkProperties := app.CustomGovKeeper.GetNetworkProperties(ctx) require.NotNil(t, networkProperties) - require.Equal(t, networkProperties.UniqueIdentityKeys, "moniker,email") + require.Equal(t, networkProperties.UniqueIdentityKeys, "moniker,username,email") } // func TestKeeper_IdentityKeysManagement(t *testing.T) { @@ -565,6 +566,7 @@ func TestKeeper_IdentityRecordApproveFlow(t *testing.T) { // try deleting request after request creation reqId, err = app.CustomGovKeeper.RequestIdentityRecordsVerify(ctx, addr2, addr3, []uint64{2}, sdk.NewInt64Coin(appparams.DefaultDenom, 200)) + require.NoError(t, err) require.Equal(t, reqId, uint64(7)) app.CustomGovKeeper.DeleteIdRecordsVerifyRequest(ctx, 7) request = app.CustomGovKeeper.GetIdRecordsVerifyRequest(ctx, 7) @@ -574,22 +576,20 @@ func TestKeeper_IdentityRecordApproveFlow(t *testing.T) { requests = app.CustomGovKeeper.GetIdRecordsVerifyRequestsByApprover(ctx, addr3) require.Len(t, requests, 0) - // check automatic reject if record is edited after raising verification request + // check automatic cancel of request if record is edited after raising verification request reqId, err = app.CustomGovKeeper.RequestIdentityRecordsVerify(ctx, addr2, addr4, []uint64{2}, sdk.NewInt64Coin(appparams.DefaultDenom, 200)) + require.NoError(t, err) require.Equal(t, reqId, uint64(8)) ctx = ctx.WithBlockTime(now.Add(time.Second)) - app.CustomGovKeeper.RegisterIdentityRecords(ctx, addr2, types.WrapInfos(infos)) - ctx, _ = ctx.CacheContext() - err = app.CustomGovKeeper.HandleIdentityRecordsVerifyRequest(ctx, addr4, 8, true) + infos["key"] = "value2" + err = app.CustomGovKeeper.RegisterIdentityRecords(ctx, addr2, types.WrapInfos(infos)) require.NoError(t, err) - record = app.CustomGovKeeper.GetIdentityRecordById(ctx, 2) - require.NotNil(t, record) - require.False(t, keeper.CheckIfWithinStringArray(addr4.String(), record.Verifiers)) - coins = app.BankKeeper.GetAllBalances(ctx, addr4) - require.Equal(t, coins, sdk.Coins{sdk.NewInt64Coin(appparams.DefaultDenom, 200)}) + req := app.CustomGovKeeper.GetIdRecordsVerifyRequest(ctx, 8) + require.Nil(t, req) // try deleting id record after request creation reqId, err = app.CustomGovKeeper.RequestIdentityRecordsVerify(ctx, addr2, addr3, []uint64{2}, sdk.NewInt64Coin(appparams.DefaultDenom, 200)) + require.NoError(t, err) require.Equal(t, reqId, uint64(9)) app.CustomGovKeeper.DeleteIdentityRecords(ctx, addr2, []string{}) cacheCtx, _ = ctx.CacheContext() diff --git a/x/gov/keeper/keeper.go b/x/gov/keeper/keeper.go index b424db9ff..8a76ee3f5 100644 --- a/x/gov/keeper/keeper.go +++ b/x/gov/keeper/keeper.go @@ -3,6 +3,7 @@ package keeper import ( "errors" "fmt" + "strings" "github.com/KiraCore/sekai/x/gov/types" "github.com/cosmos/cosmos-sdk/codec" @@ -66,46 +67,66 @@ func (k Keeper) ValidateNetworkProperties(ctx sdk.Context, properties *types.Net if properties.MaxTxFee < properties.MinTxFee { return fmt.Errorf("max_tx_fee should not be lower than min_tx_fee") } - // TODO: for now skipping few of validations - // if properties.VoteQuorum == 0 { - // return fmt.Errorf("vote_quorum should not be zero") - // } - // if properties.ProposalEndTime == 0 { - // return fmt.Errorf("proposal_end_time should not be zero") - // } - // if properties.ProposalEnactmentTime == 0 { - // return fmt.Errorf("proposal_enactment_time should not be zero") - // } - // if properties.MinProposalEndBlocks == 0 { - // return fmt.Errorf("min_proposal_end_blocks should not be zero") - // } - // if properties.MinProposalEnactmentBlocks == 0 { - // return fmt.Errorf("min_proposal_enactment_blocks should not be zero") - // } - // if properties.MischanceRankDecreaseAmount == 0 { - // return fmt.Errorf("mischance_rank_decrease_amount should not be zero") - // } - // if properties.MaxMischance == 0 { - // return fmt.Errorf("max_mischance should not be zero") - // } - // if properties.InactiveRankDecreasePercent == 0 { - // return fmt.Errorf("inactive_rank_decrease_percent should not be zero") - // } - // if properties.InactiveRankDecreasePercent == 0 { - // return fmt.Errorf("inactive_rank_decrease_percent should not be zero") - // } - if !properties.InactiveRankDecreasePercent.IsNil() && properties.InactiveRankDecreasePercent.GT(sdk.OneDec()) { - return fmt.Errorf("inactive_rank_decrease_percent should not be lower than 100%%") + if properties.VoteQuorum.IsNil() || properties.VoteQuorum.IsNegative() || properties.VoteQuorum.GT(sdk.OneDec()) { + return fmt.Errorf("vote_quorum should be between 0-1") + } + if properties.VetoThreshold.IsNil() || properties.VetoThreshold.IsNegative() || properties.VetoThreshold.GT(sdk.OneDec()) { + return fmt.Errorf("veto_threshold should be between 0-1") + } + if properties.MinimumProposalEndTime == 0 { + return fmt.Errorf("minimum_proposal_end_time should not be zero") + } + if properties.ProposalEnactmentTime == 0 { + return fmt.Errorf("proposal_enactment_time should not be zero") + } + if properties.MinProposalEndBlocks == 0 { + return fmt.Errorf("min_proposal_end_blocks should not be zero") + } + if properties.MinProposalEnactmentBlocks == 0 { + return fmt.Errorf("min_proposal_enactment_blocks should not be zero") + } + if properties.MischanceRankDecreaseAmount == 0 { + return fmt.Errorf("mischance_rank_decrease_amount should not be zero") + } + if properties.MaxMischance == 0 { + return fmt.Errorf("max_mischance should not be zero") + } + if properties.InactiveRankDecreasePercent.IsNil() || properties.InactiveRankDecreasePercent.IsNegative() || properties.InactiveRankDecreasePercent.GT(sdk.OneDec()) { + return fmt.Errorf("inactive_rank_decrease_percent should be between 0-1") + } + if properties.ValidatorsFeeShare.IsNil() || properties.ValidatorsFeeShare.IsNegative() || properties.ValidatorsFeeShare.GT(sdk.NewDecWithPrec(5, 1)) { + return fmt.Errorf("validators_fee_share should be between 0-0.5") + } + if properties.InflationRate.IsNil() || properties.InflationRate.IsNegative() || properties.InflationRate.GT(sdk.NewDecWithPrec(5, 1)) { + return fmt.Errorf("inflation_rate should be between 0-0.5") + } + if properties.MaxJailedPercentage.IsNil() || properties.MaxJailedPercentage.IsNegative() || properties.MaxJailedPercentage.GT(sdk.OneDec()) { + return fmt.Errorf("max_jailed_percentage should be between 0-1") + } + if properties.MaxSlashingPercentage.IsNil() || properties.MaxSlashingPercentage.IsNegative() || properties.MaxSlashingPercentage.GT(sdk.OneDec()) { + return fmt.Errorf("max_slashing_percentage should be between 0-1") + } + if properties.MaxAnnualInflation.IsNil() || properties.MaxAnnualInflation.IsNegative() { + return fmt.Errorf("max_slashing_percentage should not be negative") + } + if properties.DappVerifierBond.IsNil() || properties.DappVerifierBond.IsNegative() || properties.DappVerifierBond.GT(sdk.OneDec()) { + return fmt.Errorf("dapp_verifier_bond should be between 0-1") + } + if properties.DappPoolSlippageDefault.IsNil() || properties.DappPoolSlippageDefault.IsNegative() || properties.DappPoolSlippageDefault.GT(sdk.OneDec()) { + return fmt.Errorf("dapp_pool_slippage_default should be between 0-1") + } + if properties.DappInactiveRankDecreasePercent.IsNil() || properties.DappInactiveRankDecreasePercent.IsNegative() || properties.DappInactiveRankDecreasePercent.GT(sdk.OneDec()) { + return fmt.Errorf("dapp_inactive_rank_decrease_percent should be between 0-1") + } + if properties.MinValidators == 0 { + return fmt.Errorf("min_validators should not be zero") + } + if properties.PoorNetworkMaxBankSend == 0 { + return fmt.Errorf("poor_network_bank_send should not be zero") + } + if properties.UnjailMaxTime == 0 { + return fmt.Errorf("unjail_max_time should not be zero") } - // if properties.MinValidators == 0 { - // return fmt.Errorf("min_validators should not be zero") - // } - // if properties.PoorNetworkMaxBankSend == 0 { - // return fmt.Errorf("min_validators should not be zero") - // } - // if properties.UnjailMaxTime == 0 { - // return fmt.Errorf("unjail_max_time should not be zero") - // } // fee := k.GetExecutionFee(ctx, (&types.MsgHandleIdentityRecordsVerifyRequest{}).Type()) // maxFee := properties.MinTxFee // if fee != nil { @@ -119,25 +140,44 @@ func (k Keeper) ValidateNetworkProperties(ctx sdk.Context, properties *types.Net // if properties.MinIdentityApprovalTip < maxFee*2 { // return fmt.Errorf("min_identity_approval_tip should not be bigger or equal than 2x approval fee") // } - // if properties.UniqueIdentityKeys == "" { - // return fmt.Errorf("unique_identity_keys should not be empty") - // } - // monikerExists := false - // if properties.UniqueIdentityKeys != FormalizeIdentityRecordKey(properties.UniqueIdentityKeys) { - // return fmt.Errorf("unique identity keys on network property should be formailzed with lowercase keys") - // } - // uniqueKeys := strings.Split(properties.UniqueIdentityKeys, ",") - // for _, key := range uniqueKeys { - // if !ValidateIdentityRecordKey(key) { - // return fmt.Errorf("invalid identity record key exists, key=%s", key) - // } - // if key == "moniker" { - // monikerExists = true - // } - // } - // if !monikerExists { - // return fmt.Errorf("moniker should be exist in unique keys list") - // } + if properties.UniqueIdentityKeys == "" { + return fmt.Errorf("unique_identity_keys should not be empty") + } + monikerExists := false + if properties.UniqueIdentityKeys != FormalizeIdentityRecordKey(properties.UniqueIdentityKeys) { + return fmt.Errorf("unique identity keys on network property should be formailzed with lowercase keys") + } + uniqueKeys := strings.Split(properties.UniqueIdentityKeys, ",") + for _, key := range uniqueKeys { + if !ValidateIdentityRecordKey(key) { + return fmt.Errorf("invalid identity record key exists, key=%s", key) + } + if key == "moniker" { + monikerExists = true + } + } + if !monikerExists { + return fmt.Errorf("moniker should be exist in unique keys list") + } + if properties.InflationPeriod < 2629800 || properties.InflationPeriod > 31557600 { + return fmt.Errorf("inflation_period should be between 2629800 and 31557600") + } + if properties.UnstakingPeriod < 604800 || properties.UnstakingPeriod > 31557600 { + return fmt.Errorf("unstaking_period should be between 604800 and 31557600") + } + if properties.UnstakingPeriod > properties.SlashingPeriod { + return fmt.Errorf("unstaking_period should be lower than slashing_period") + } + if properties.SlashingPeriod <= 0 { + return fmt.Errorf("slashing_period should be positive") + } + if properties.MaxJailedPercentage.GTE(sdk.OneDec().QuoInt64(3)) { + return fmt.Errorf("max_jailed_percentage should be less than 1/3") + } + if properties.UnjailMaxTime > properties.SlashingPeriod { + return fmt.Errorf("unjail_max_time should be strictly less than slashing_period") + } + return nil } @@ -150,7 +190,7 @@ func (k Keeper) GetNetworkProperty(ctx sdk.Context, property types.NetworkProper case types.MaxTxFee: return types.NetworkPropertyValue{Value: properties.MaxTxFee}, nil case types.VoteQuorum: - return types.NetworkPropertyValue{Value: properties.VoteQuorum}, nil + return types.NetworkPropertyValue{StrValue: properties.VoteQuorum.String()}, nil case types.MinimumProposalEndTime: return types.NetworkPropertyValue{Value: properties.MinimumProposalEndTime}, nil case types.ProposalEnactmentTime: @@ -240,7 +280,7 @@ func (k Keeper) GetNetworkProperty(ctx sdk.Context, property types.NetworkProper case types.DappMaxMischance: return types.NetworkPropertyValue{Value: properties.DappMaxMischance}, nil case types.DappInactiveRankDecreasePercent: - return types.NetworkPropertyValue{Value: properties.DappInactiveRankDecreasePercent}, nil + return types.NetworkPropertyValue{StrValue: properties.DappInactiveRankDecreasePercent.String()}, nil case types.DappPoolSlippageDefault: return types.NetworkPropertyValue{StrValue: properties.DappPoolSlippageDefault.String()}, nil case types.MintingFtFee: @@ -251,17 +291,73 @@ func (k Keeper) GetNetworkProperty(ctx sdk.Context, property types.NetworkProper return types.NetworkPropertyValue{StrValue: properties.VetoThreshold.String()}, nil case types.AutocompoundIntervalNumBlocks: return types.NetworkPropertyValue{Value: properties.AutocompoundIntervalNumBlocks}, nil + case types.DowntimeInactiveDuration: + return types.NetworkPropertyValue{Value: properties.DowntimeInactiveDuration}, nil case types.BridgeAddress: return types.NetworkPropertyValue{StrValue: properties.BridgeAddress}, nil - case types.BridgeCosmosEthereumExchangeRate: - return types.NetworkPropertyValue{StrValue: properties.BridgeCosmosEthereumExchangeRate.String()}, nil - case types.BridgeEthereumCosmosExchangeRate: - return types.NetworkPropertyValue{StrValue: properties.BridgeEthereumCosmosExchangeRate.String()}, nil default: return types.NetworkPropertyValue{}, errors.New("trying to fetch network property that does not exist") } } +func (k Keeper) EnsureOldUniqueKeysNotRemoved(ctx sdk.Context, oldKeys string, newKeys string) string { + newKeyMap := make(map[string]bool) + newKeyArr := strings.Split(newKeys, ",") + if newKeys == "" { + newKeyArr = []string{} + } + for _, newKey := range newKeyArr { + newKeyMap[newKey] = true + } + + oldKeyArr := strings.Split(oldKeys, ",") + if oldKeys == "" { + oldKeyArr = []string{} + } + for _, oldKey := range oldKeyArr { + if !newKeyMap[oldKey] { + return oldKey + } + } + return "" +} + +func (k Keeper) EnsureUniqueKeys(ctx sdk.Context, oldKeys string, newKeys string) string { + oldKeyMap := make(map[string]bool) + oldKeyArr := strings.Split(oldKeys, ",") + if oldKeys == "" { + oldKeyArr = []string{} + } + for _, oldKey := range oldKeyArr { + oldKeyMap[oldKey] = true + } + + newKeyMap := make(map[string]bool) + newKeyArr := strings.Split(newKeys, ",") + if newKeys == "" { + newKeyArr = []string{} + } + for _, newKey := range newKeyArr { + if !oldKeyMap[newKey] { + newKeyMap[newKey] = true + } + } + + keyCountMap := make(map[string]int64) + records := k.GetAllIdentityRecords(ctx) + for _, record := range records { + if newKeyMap[record.Key] { + key := strings.Join([]string{record.Key, record.Value}, ":") + if keyCountMap[key] > 0 { + return record.Key + } + keyCountMap[key] = 1 + } + } + + return "" +} + // SetNetworkProperty set single network property by key func (k Keeper) SetNetworkProperty(ctx sdk.Context, property types.NetworkProperty, value types.NetworkPropertyValue) error { properties := k.GetNetworkProperties(ctx) @@ -271,7 +367,11 @@ func (k Keeper) SetNetworkProperty(ctx sdk.Context, property types.NetworkProper case types.MaxTxFee: properties.MaxTxFee = value.Value case types.VoteQuorum: - properties.VoteQuorum = value.Value + decValue, err := sdk.NewDecFromStr(value.StrValue) + if err != nil { + return err + } + properties.VoteQuorum = decValue case types.MinimumProposalEndTime: properties.MinimumProposalEndTime = value.Value case types.ProposalEnactmentTime: @@ -310,6 +410,14 @@ func (k Keeper) SetNetworkProperty(ctx sdk.Context, property types.NetworkProper case types.MinIdentityApprovalTip: properties.MinIdentityApprovalTip = value.Value case types.UniqueIdentityKeys: + removedOldKey := k.EnsureOldUniqueKeysNotRemoved(ctx, properties.UniqueIdentityKeys, value.StrValue) + if removedOldKey != "" { + return fmt.Errorf("already existing key removed: %s", removedOldKey) + } + notUniqueKey := k.EnsureUniqueKeys(ctx, properties.UniqueIdentityKeys, value.StrValue) + if notUniqueKey != "" { + return fmt.Errorf("already existing key not unique found: %s", notUniqueKey) + } properties.UniqueIdentityKeys = value.StrValue case types.UbiHardcap: properties.UbiHardcap = value.Value @@ -392,7 +500,11 @@ func (k Keeper) SetNetworkProperty(ctx sdk.Context, property types.NetworkProper case types.DappMaxMischance: properties.DappMaxMischance = value.Value case types.DappInactiveRankDecreasePercent: - properties.DappInactiveRankDecreasePercent = value.Value + decValue, err := sdk.NewDecFromStr(value.StrValue) + if err != nil { + return err + } + properties.DappInactiveRankDecreasePercent = decValue case types.DappPoolSlippageDefault: decValue, err := sdk.NewDecFromStr(value.StrValue) if err != nil { @@ -411,21 +523,10 @@ func (k Keeper) SetNetworkProperty(ctx sdk.Context, property types.NetworkProper properties.VetoThreshold = decValue case types.AutocompoundIntervalNumBlocks: properties.AutocompoundIntervalNumBlocks = value.Value + case types.DowntimeInactiveDuration: + properties.DowntimeInactiveDuration = value.Value case types.BridgeAddress: properties.BridgeAddress = value.StrValue - case types.BridgeCosmosEthereumExchangeRate: - decValue, err := sdk.NewDecFromStr(value.StrValue) - if err != nil { - return err - } - properties.BridgeCosmosEthereumExchangeRate = decValue - case types.BridgeEthereumCosmosExchangeRate: - decValue, err := sdk.NewDecFromStr(value.StrValue) - if err != nil { - return err - } - properties.BridgeEthereumCosmosExchangeRate = decValue - default: return errors.New("trying to set network property that does not exist") } diff --git a/x/gov/keeper/keeper_test.go b/x/gov/keeper/keeper_test.go index fb3729043..ce8c68a2a 100644 --- a/x/gov/keeper/keeper_test.go +++ b/x/gov/keeper/keeper_test.go @@ -26,3 +26,36 @@ func TestKeeper_SetNetworkProperty(t *testing.T) { require.Nil(t, err) require.Equal(t, uint64(300), savedMinTxFee.Value) } + +func TestKeeper_EnsureUniqueKeys(t *testing.T) { + app := simapp.Setup(false) + ctx := app.NewContext(false, tmproto.Header{}) + + app.CustomGovKeeper.SetIdentityRecord(ctx, types.IdentityRecord{ + Id: 1, + Address: "addr1", + Key: "nickname", + Value: "jack", + }) + notUniqueKey := app.CustomGovKeeper.EnsureUniqueKeys(ctx, "", "nickname") + require.Equal(t, notUniqueKey, "") + app.CustomGovKeeper.SetIdentityRecord(ctx, types.IdentityRecord{ + Id: 2, + Address: "addr2", + Key: "nickname", + Value: "jack", + }) + notUniqueKey = app.CustomGovKeeper.EnsureUniqueKeys(ctx, "", "nickname") + require.Equal(t, notUniqueKey, "nickname") +} + +func TestKeeper_EnsureOldUniqueKeysNotRemoved(t *testing.T) { + app := simapp.Setup(false) + ctx := app.NewContext(false, tmproto.Header{}) + + removedOldKey := app.CustomGovKeeper.EnsureOldUniqueKeysNotRemoved(ctx, "", "nickname") + require.Equal(t, removedOldKey, "") + + removedOldKey = app.CustomGovKeeper.EnsureOldUniqueKeysNotRemoved(ctx, "nickname", "") + require.Equal(t, removedOldKey, "nickname") +} diff --git a/x/gov/keeper/msg_server.go b/x/gov/keeper/msg_server.go index 55991f8bf..9ed13c0b5 100644 --- a/x/gov/keeper/msg_server.go +++ b/x/gov/keeper/msg_server.go @@ -7,10 +7,10 @@ import ( "strconv" "time" + errorsmod "cosmossdk.io/errors" "github.com/KiraCore/sekai/x/gov/types" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/errors" - sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" "golang.org/x/exp/utf8string" ) @@ -42,7 +42,7 @@ func (k msgServer) SubmitProposal(goCtx context.Context, msg *types.MsgSubmitPro router := k.keeper.GetProposalRouter() isAllowed := router.IsAllowedAddressDynamicProposal(ctx, msg.Proposer, content) if !isAllowed { - return nil, errors.Wrap(types.ErrNotEnoughPermissions, "spending pool permission") + return nil, errors.Wrap(types.ErrNotEnoughPermissions, "not enough permission to create the proposal") } } else { isAllowed := CheckIfAllowedPermission(ctx, k.keeper, msg.Proposer, content.ProposalPermission()) @@ -111,7 +111,7 @@ func (k msgServer) VoteProposal( router := k.keeper.GetProposalRouter() isAllowed := router.IsAllowedAddressDynamicProposal(ctx, msg.Voter, content) if !isAllowed { - return nil, errors.Wrap(types.ErrNotEnoughPermissions, "spending pool permission") + return nil, errors.Wrap(types.ErrNotEnoughPermissions, "not enough permission to vote on the proposal") } } else { isAllowed := CheckIfAllowedPermission(ctx, k.keeper, msg.Voter, content.VotePermission()) @@ -806,17 +806,17 @@ func (k msgServer) CouncilorPause( // cannot be paused if not jailed already if councilor.Status == types.CouncilorJailed { - return nil, sdkerrors.Wrap(types.ErrCouncilorJailed, "Can NOT pause jailed councilor") + return nil, errorsmod.Wrap(types.ErrCouncilorJailed, "Can NOT pause jailed councilor") } // cannot be paused if not inactive already if councilor.Status == types.CouncilorInactive { - return nil, sdkerrors.Wrap(types.ErrCouncilorInactivated, "Can NOT pause inactivated councilor") + return nil, errorsmod.Wrap(types.ErrCouncilorInactivated, "Can NOT pause inactivated councilor") } // cannot be paused if not paused already if councilor.Status == types.CouncilorPaused { - return nil, sdkerrors.Wrap(types.ErrCouncilorPaused, "Can NOT pause already paused councilor") + return nil, errorsmod.Wrap(types.ErrCouncilorPaused, "Can NOT pause already paused councilor") } councilor.Status = types.CouncilorPaused @@ -843,7 +843,7 @@ func (k msgServer) CouncilorUnpause( // cannot be paused if not paused already if councilor.Status != types.CouncilorPaused { - return nil, sdkerrors.Wrap(types.ErrCouncilorNotPaused, "Can NOT unpause not paused councilor") + return nil, errorsmod.Wrap(types.ErrCouncilorNotPaused, "Can NOT unpause not paused councilor") } councilor.Status = types.CouncilorActive @@ -871,7 +871,7 @@ func (k msgServer) CouncilorActivate( // cannot be activated if not inactive already if councilor.Status != types.CouncilorInactive { - return nil, sdkerrors.Wrap(types.ErrCouncilorNotInactivated, "Can NOT activate NOT inactive councilor") + return nil, errorsmod.Wrap(types.ErrCouncilorNotInactivated, "Can NOT activate NOT inactive councilor") } councilor.Status = types.CouncilorActive diff --git a/x/gov/proposal_handler.go b/x/gov/proposal_handler.go index db0683daa..7b2f8f225 100644 --- a/x/gov/proposal_handler.go +++ b/x/gov/proposal_handler.go @@ -3,6 +3,7 @@ package gov import ( "fmt" + errorsmod "cosmossdk.io/errors" kiratypes "github.com/KiraCore/sekai/types" "github.com/KiraCore/sekai/x/gov/keeper" "github.com/KiraCore/sekai/x/gov/types" @@ -29,7 +30,7 @@ func (a ApplyWhitelistAccountPermissionProposalHandler) Apply(ctx sdk.Context, p actor, found := a.keeper.GetNetworkActorByAddress(ctx, p.Address) if found { if actor.Permissions.IsWhitelisted(types.PermValue(p.Permission)) { - return sdkerrors.Wrap(types.ErrWhitelisting, "permission already whitelisted") + return errorsmod.Wrap(types.ErrWhitelisting, "permission already whitelisted") } } else { actor = types.NewDefaultActor(p.Address) @@ -56,7 +57,7 @@ func (a ApplyBlacklistAccountPermissionProposalHandler) Apply(ctx sdk.Context, p actor, found := a.keeper.GetNetworkActorByAddress(ctx, p.Address) if found { if actor.Permissions.IsBlacklisted(types.PermValue(p.Permission)) { - return sdkerrors.Wrap(types.ErrWhitelisting, "permission already blacklisted") + return errorsmod.Wrap(types.ErrWhitelisting, "permission already blacklisted") } } else { actor = types.NewDefaultActor(p.Address) @@ -83,7 +84,7 @@ func (a ApplyRemoveWhitelistedAccountPermissionProposalHandler) Apply(ctx sdk.Co actor, found := a.keeper.GetNetworkActorByAddress(ctx, p.Address) if found { if !actor.Permissions.IsWhitelisted(types.PermValue(p.Permission)) { - return sdkerrors.Wrap(types.ErrWhitelisting, "whitelisted permission does not exist") + return errorsmod.Wrap(types.ErrWhitelisting, "whitelisted permission does not exist") } } else { actor = types.NewDefaultActor(p.Address) @@ -111,7 +112,7 @@ func (a ApplyRemoveBlacklistedAccountPermissionProposalHandler) Apply(ctx sdk.Co fmt.Println("actor", actor) if found { if !actor.Permissions.IsBlacklisted(types.PermValue(p.Permission)) { - return sdkerrors.Wrap(types.ErrWhitelisting, "blacklisted permission does not exist") + return errorsmod.Wrap(types.ErrWhitelisting, "blacklisted permission does not exist") } } else { actor = types.NewDefaultActor(p.Address) @@ -184,10 +185,10 @@ func (a ApplySetNetworkPropertyProposalHandler) Apply(ctx sdk.Context, proposalI property, err := a.keeper.GetNetworkProperty(ctx, p.NetworkProperty) if err != nil { - return sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, err.Error()) + return errorsmod.Wrap(sdkerrors.ErrInvalidRequest, err.Error()) } if property == p.Value { - return sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, "network property already set as proposed value") + return errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "network property already set as proposed value") } return a.keeper.SetNetworkProperty(ctx, p.NetworkProperty, p.Value) @@ -464,3 +465,25 @@ func (a ApplyJailCouncilorProposalHandler) Apply(ctx sdk.Context, proposalID uin } return nil } + +type ApplySetExecutionFeesHandler struct { + keeper keeper.Keeper +} + +func NewApplySetExecutionFeesProposalHandler(keeper keeper.Keeper) *ApplySetExecutionFeesHandler { + return &ApplySetExecutionFeesHandler{ + keeper: keeper, + } +} + +func (a ApplySetExecutionFeesHandler) ProposalType() string { + return kiratypes.ProposalTypeSetExecutionFees +} + +func (a ApplySetExecutionFeesHandler) Apply(ctx sdk.Context, proposalID uint64, proposal types.Content, slash sdk.Dec) error { + p := proposal.(*types.ProposalSetExecutionFees) + for _, executionFee := range p.ExecutionFees { + a.keeper.SetExecutionFee(ctx, executionFee) + } + return nil +} diff --git a/x/gov/types/codec.go b/x/gov/types/codec.go index 8356a7355..1b4b74804 100644 --- a/x/gov/types/codec.go +++ b/x/gov/types/codec.go @@ -35,7 +35,7 @@ func RegisterCodec(cdc *codec.LegacyAmino) { "description": "maximum transaction fee" }, "vote_quorum": { - "type": "uint64", + "type": "decimal", "description": "vote quorum" }, "proposal_end_time": { @@ -456,6 +456,7 @@ func RegisterInterfaces(registry types.InterfaceRegistry) { &SetProposalDurationsProposal{}, &ProposalResetWholeCouncilorRank{}, &ProposalJailCouncilor{}, + &ProposalSetExecutionFees{}, ) msgservice.RegisterMsgServiceDesc(registry, &_Msg_serviceDesc) diff --git a/x/gov/types/genesis.go b/x/gov/types/genesis.go index b5d7d9c9d..3682e57aa 100644 --- a/x/gov/types/genesis.go +++ b/x/gov/types/genesis.go @@ -32,18 +32,15 @@ func DefaultGenesis() *GenesisState { PermSetPermissions, PermClaimValidator, PermClaimCouncilor, - PermUpsertTokenAlias, // PermChangeTxFee, // do not give this permission to sudo account - test does not pass - PermUpsertTokenRate, + PermUpsertTokenInfo, PermUpsertRole, PermCreateSetNetworkPropertyProposal, PermVoteSetNetworkPropertyProposal, PermCreateUpsertDataRegistryProposal, PermVoteUpsertDataRegistryProposal, - PermCreateUpsertTokenAliasProposal, - PermVoteUpsertTokenAliasProposal, - PermCreateUpsertTokenRateProposal, - PermVoteUpsertTokenRateProposal, + PermCreateUpsertTokenInfoProposal, + PermVoteUpsertTokenInfoProposal, PermCreateUnjailValidatorProposal, PermVoteUnjailValidatorProposal, PermCreateRoleProposal, @@ -95,73 +92,77 @@ func DefaultGenesis() *GenesisState { PermCreateJailCouncilorProposal, PermVoteJailCouncilorProposal, PermCreatePollProposal, + PermCreateDappProposalWithoutBond, + PermCreateSetExecutionFeesProposal, + PermVoteSetExecutionFeesProposal, }, nil), uint64(RoleValidator): NewPermissions([]PermValue{PermClaimValidator}, nil), }, StartingProposalId: 1, NetworkProperties: &NetworkProperties{ - MinTxFee: 100, - MaxTxFee: 1000000, - VoteQuorum: 33, - MinimumProposalEndTime: 300, // 300 seconds / 5 mins - ProposalEnactmentTime: 300, // 300 seconds / 5 mins - MinProposalEndBlocks: 2, - MinProposalEnactmentBlocks: 1, - EnableForeignFeePayments: true, - MischanceRankDecreaseAmount: 10, - MischanceConfidence: 10, - MaxMischance: 110, - InactiveRankDecreasePercent: sdk.NewDecWithPrec(50, 2), // 50% - PoorNetworkMaxBankSend: 1000000, // 1M ukex - MinValidators: 1, - UnjailMaxTime: 600, // 600 seconds / 10 mins - EnableTokenWhitelist: false, - EnableTokenBlacklist: true, - MinIdentityApprovalTip: 200, - UniqueIdentityKeys: "moniker,username", - UbiHardcap: 6000_000, - ValidatorsFeeShare: sdk.NewDecWithPrec(50, 2), // 50% - InflationRate: sdk.NewDecWithPrec(18, 2), // 18% - InflationPeriod: 31557600, // 1 year - UnstakingPeriod: 2629800, // 1 month - MaxDelegators: 100, - MinDelegationPushout: 10, - SlashingPeriod: 3600, - MaxJailedPercentage: sdk.NewDecWithPrec(25, 2), - MaxSlashingPercentage: sdk.NewDecWithPrec(1, 2), - MinCustodyReward: 200, - MaxCustodyTxSize: 8192, - MaxCustodyBufferSize: 10, - AbstentionRankDecreaseAmount: 1, - MaxAbstention: 2, - MinCollectiveBond: 100_000, // in KEX - MinCollectiveBondingTime: 86400, // in seconds - MaxCollectiveOutputs: 10, - MinCollectiveClaimPeriod: 14400, // 4hrs - ValidatorRecoveryBond: 300000, // 300k KEX - MaxAnnualInflation: sdk.NewDecWithPrec(35, 2), // 35%// 300k KEX - MaxProposalTitleSize: 128, - MaxProposalDescriptionSize: 1024, - MaxProposalPollOptionSize: 64, - MaxProposalPollOptionCount: 128, - MaxProposalReferenceSize: 512, - MaxProposalChecksumSize: 128, - MinDappBond: 1000000, - MaxDappBond: 10000000, - DappBondDuration: 604800, - DappVerifierBond: sdk.NewDecWithPrec(1, 3), //0.1% - DappAutoDenounceTime: 60, // 60s - DappMischanceRankDecreaseAmount: 1, - DappMaxMischance: 10, - DappInactiveRankDecreasePercent: 10, - DappPoolSlippageDefault: sdk.NewDecWithPrec(1, 1), // 10% - MintingFtFee: 100_000_000_000_000, - MintingNftFee: 100_000_000_000_000, - VetoThreshold: sdk.NewDecWithPrec(3340, 2), // 33.40% - AutocompoundIntervalNumBlocks: 17280, - BridgeAddress: "test", - BridgeCosmosEthereumExchangeRate: sdk.NewDec(10), - BridgeEthereumCosmosExchangeRate: sdk.NewDecWithPrec(1, 1), + MinTxFee: 100, + MaxTxFee: 1000000, + VoteQuorum: sdk.NewDecWithPrec(33, 2), // 33% + MinimumProposalEndTime: 300, // 300 seconds / 5 mins + ProposalEnactmentTime: 300, // 300 seconds / 5 mins + MinProposalEndBlocks: 2, + MinProposalEnactmentBlocks: 1, + EnableForeignFeePayments: true, + MischanceRankDecreaseAmount: 10, + MischanceConfidence: 10, + MaxMischance: 110, + InactiveRankDecreasePercent: sdk.NewDecWithPrec(50, 2), // 50% + PoorNetworkMaxBankSend: 1000000, // 1M ukex + MinValidators: 1, + UnjailMaxTime: 600, // 600 seconds / 10 mins + EnableTokenWhitelist: false, + EnableTokenBlacklist: true, + MinIdentityApprovalTip: 200, + UniqueIdentityKeys: "moniker,username", + UbiHardcap: 6000_000, + ValidatorsFeeShare: sdk.NewDecWithPrec(50, 2), // 50% + InflationRate: sdk.NewDecWithPrec(18, 2), // 18% + InflationPeriod: 31557600, // 1 year + UnstakingPeriod: 2629800, // 1 month + MaxDelegators: 100, + MinDelegationPushout: 10, + SlashingPeriod: 2629800, + MaxJailedPercentage: sdk.NewDecWithPrec(25, 2), + MaxSlashingPercentage: sdk.NewDecWithPrec(5, 3), // 0.5% + MinCustodyReward: 200, + MaxCustodyTxSize: 8192, + MaxCustodyBufferSize: 10, + AbstentionRankDecreaseAmount: 1, + MaxAbstention: 2, + MinCollectiveBond: 100_000, // in KEX + MinCollectiveBondingTime: 86400, // in seconds + MaxCollectiveOutputs: 10, + MinCollectiveClaimPeriod: 14400, // 4hrs + ValidatorRecoveryBond: 300000, // 300k KEX + MaxAnnualInflation: sdk.NewDecWithPrec(35, 2), // 35%// 300k KEX + MaxProposalTitleSize: 128, + MaxProposalDescriptionSize: 1024, + MaxProposalPollOptionSize: 64, + MaxProposalPollOptionCount: 128, + MaxProposalReferenceSize: 512, + MaxProposalChecksumSize: 128, + MinDappBond: 1000000, + MaxDappBond: 10000000, + DappBondDuration: 604800, + DappVerifierBond: sdk.NewDecWithPrec(1, 3), //0.1% + DappAutoDenounceTime: 60, // 60s + DappMischanceRankDecreaseAmount: 1, + DappMaxMischance: 10, + DappInactiveRankDecreasePercent: sdk.NewDecWithPrec(10, 2), // 10% + DappPoolSlippageDefault: sdk.NewDecWithPrec(1, 1), // 10% + DappLiquidationThreshold: 100_000_000_000, // default 100’000 KEX + DappLiquidationPeriod: 2419200, // default 2419200, ~28d + MintingFtFee: 100_000_000_000_000, + MintingNftFee: 100_000_000_000_000, + VetoThreshold: sdk.NewDecWithPrec(3340, 4), // 33.40% + AutocompoundIntervalNumBlocks: 17280, + DowntimeInactiveDuration: 600, + BridgeAddress: "test", }, ExecutionFees: []ExecutionFee{ { @@ -206,13 +207,6 @@ func DefaultGenesis() *GenesisState { Timeout: 10, DefaultParameters: 0, }, - { - TransactionType: kiratypes.MsgTypeUpsertTokenAlias, - ExecutionFee: 100, - FailureFee: 1, - Timeout: 10, - DefaultParameters: 0, - }, { TransactionType: kiratypes.MsgTypeActivate, ExecutionFee: 100, @@ -255,7 +249,7 @@ func DefaultGenesis() *GenesisState { kiratypes.MsgTypePause, kiratypes.MsgTypeUnpause, kiratypes.MsgTypeRegisterIdentityRecords, - kiratypes.MsgTypeEditIdentityRecord, + kiratypes.MsgTypeDeleteIdentityRecords, kiratypes.MsgTypeRequestIdentityRecordsVerify, kiratypes.MsgTypeHandleIdentityRecordsVerifyRequest, kiratypes.MsgTypeCancelIdentityRecordsVerifyRequest, @@ -284,5 +278,14 @@ func GetBech32PrefixAndDefaultDenomFromAppState(appState map[string]json.RawMess if err != nil { panic(err) } - return genesisState["bech32_prefix"].(string), genesisState["default_denom"].(string) + bech32Prefix, ok := genesisState["bech32_prefix"].(string) + if !ok || bech32Prefix == "" { + bech32Prefix = appparams.AccountAddressPrefix + } + defaultDenom, ok := genesisState["default_denom"].(string) + if !ok || defaultDenom == "" { + defaultDenom = appparams.DefaultDenom + } + + return bech32Prefix, defaultDenom } diff --git a/x/gov/types/msg.go b/x/gov/types/msg.go index 3febb36b9..342eeaecf 100644 --- a/x/gov/types/msg.go +++ b/x/gov/types/msg.go @@ -3,6 +3,7 @@ package types import ( "fmt" + errorsmod "cosmossdk.io/errors" "github.com/KiraCore/sekai/types" codectypes "github.com/cosmos/cosmos-sdk/codec/types" sdk "github.com/cosmos/cosmos-sdk/types" @@ -635,6 +636,7 @@ func (m *MsgVoteProposal) GetSigners() []sdk.AccAddress { } // NewMsgPollCreate creates a new MsgPollCreate. +// //nolint:interfacer func NewMsgPollCreate(creator sdk.AccAddress, title, description string, reference string, checksum string, pollValues []string, roles []string, valueCount uint64, valueType string, possibleChoices uint64, duration string) *MsgPollCreate { m := &MsgPollCreate{ @@ -667,7 +669,7 @@ func (m MsgPollCreate) Type() string { return types.MsgTypeCreatePoll } // ValidateBasic implements Msg func (m MsgPollCreate) ValidateBasic() error { if m.Creator.Empty() { - return sdkerrors.Wrap(sdkerrors.ErrInvalidAddress, m.Creator.String()) + return errorsmod.Wrap(sdkerrors.ErrInvalidAddress, m.Creator.String()) } return nil @@ -763,7 +765,7 @@ func (m *MsgDeleteIdentityRecords) Route() string { } func (m *MsgDeleteIdentityRecords) Type() string { - return types.MsgTypeEditIdentityRecord + return types.MsgTypeDeleteIdentityRecords } func (m *MsgDeleteIdentityRecords) ValidateBasic() error { @@ -902,6 +904,7 @@ func (m *MsgCancelIdentityRecordsVerifyRequest) GetSigners() []sdk.AccAddress { } // NewMsgSubmitProposal creates a new MsgSubmitProposal. +// //nolint:interfacer func NewMsgSubmitProposal(proposer sdk.AccAddress, title, description string, content Content) (*MsgSubmitProposal, error) { m := &MsgSubmitProposal{ @@ -950,12 +953,12 @@ func (m MsgSubmitProposal) Type() string { return types.MsgTypeSubmitProposal } // ValidateBasic implements Msg func (m MsgSubmitProposal) ValidateBasic() error { if m.Proposer.Empty() { - return sdkerrors.Wrap(sdkerrors.ErrInvalidAddress, m.Proposer.String()) + return errorsmod.Wrap(sdkerrors.ErrInvalidAddress, m.Proposer.String()) } content := m.GetContent() if content == nil { - return sdkerrors.Wrap(ErrInvalidProposalContent, "missing content") + return errorsmod.Wrap(ErrInvalidProposalContent, "missing content") } if err := content.ValidateBasic(); err != nil { return err diff --git a/x/gov/types/network_properties.pb.go b/x/gov/types/network_properties.pb.go index 118b3a6b5..87ee177cd 100644 --- a/x/gov/types/network_properties.pb.go +++ b/x/gov/types/network_properties.pb.go @@ -27,70 +27,69 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package type NetworkProperty int32 const ( - MinTxFee NetworkProperty = 0 - MaxTxFee NetworkProperty = 1 - VoteQuorum NetworkProperty = 2 - MinimumProposalEndTime NetworkProperty = 3 - ProposalEnactmentTime NetworkProperty = 4 - MinProposalEndBlocks NetworkProperty = 5 - MinProposalEnactmentBlocks NetworkProperty = 6 - EnableForeignFeePayments NetworkProperty = 7 - MischanceRankDecreaseAmount NetworkProperty = 8 - MaxMischance NetworkProperty = 9 - MischanceConfidence NetworkProperty = 10 - InactiveRankDecreasePercent NetworkProperty = 11 - PoorNetworkMaxBankSend NetworkProperty = 12 - MinValidators NetworkProperty = 13 - UnjailMaxTime NetworkProperty = 14 - EnableTokenWhitelist NetworkProperty = 15 - EnableTokenBlacklist NetworkProperty = 16 - MinIdentityApprovalTip NetworkProperty = 17 - UniqueIdentityKeys NetworkProperty = 18 - UbiHardcap NetworkProperty = 19 - ValidatorsFeeShare NetworkProperty = 20 - InflationRate NetworkProperty = 21 - InflationPeriod NetworkProperty = 22 - UnstakingPeriod NetworkProperty = 23 - MaxDelegators NetworkProperty = 24 - MinDelegationPushout NetworkProperty = 25 - SlashingPeriod NetworkProperty = 26 - MaxJailedPercentage NetworkProperty = 27 - MaxSlashingPercentage NetworkProperty = 28 - MinCustodyReward NetworkProperty = 29 - MaxCustodyBufferSize NetworkProperty = 30 - MaxCustodyTxSize NetworkProperty = 31 - AbstentionRankDecreaseAmount NetworkProperty = 32 - MaxAbstention NetworkProperty = 33 - MinCollectiveBond NetworkProperty = 34 - MinCollectiveBondingTime NetworkProperty = 35 - MaxCollectiveOutputs NetworkProperty = 36 - MinCollectiveClaimPeriod NetworkProperty = 37 - ValidatorRecoveryBond NetworkProperty = 38 - MaxAnnualInflation NetworkProperty = 39 - MaxProposalTitleSize NetworkProperty = 40 - MaxProposalDescriptionSize NetworkProperty = 41 - MaxProposalPollOptionSize NetworkProperty = 42 - MaxProposalPollOptionCount NetworkProperty = 43 - MaxProposalReferenceSize NetworkProperty = 44 - MaxProposalChecksumSize NetworkProperty = 45 - MinDappBond NetworkProperty = 46 - MaxDappBond NetworkProperty = 47 - DappLiquidationThreshold NetworkProperty = 48 - DappLiquidationPeriod NetworkProperty = 49 - DappBondDuration NetworkProperty = 50 - DappVerifierBond NetworkProperty = 51 - DappAutoDenounceTime NetworkProperty = 52 - DappMischanceRankDecreaseAmount NetworkProperty = 53 - DappMaxMischance NetworkProperty = 54 - DappInactiveRankDecreasePercent NetworkProperty = 55 - DappPoolSlippageDefault NetworkProperty = 56 - MintingFtFee NetworkProperty = 57 - MintingNftFee NetworkProperty = 58 - VetoThreshold NetworkProperty = 59 - AutocompoundIntervalNumBlocks NetworkProperty = 60 - BridgeAddress NetworkProperty = 61 - BridgeCosmosEthereumExchangeRate NetworkProperty = 62 - BridgeEthereumCosmosExchangeRate NetworkProperty = 63 + MinTxFee NetworkProperty = 0 + MaxTxFee NetworkProperty = 1 + VoteQuorum NetworkProperty = 2 + MinimumProposalEndTime NetworkProperty = 3 + ProposalEnactmentTime NetworkProperty = 4 + MinProposalEndBlocks NetworkProperty = 5 + MinProposalEnactmentBlocks NetworkProperty = 6 + EnableForeignFeePayments NetworkProperty = 7 + MischanceRankDecreaseAmount NetworkProperty = 8 + MaxMischance NetworkProperty = 9 + MischanceConfidence NetworkProperty = 10 + InactiveRankDecreasePercent NetworkProperty = 11 + PoorNetworkMaxBankSend NetworkProperty = 12 + MinValidators NetworkProperty = 13 + UnjailMaxTime NetworkProperty = 14 + EnableTokenWhitelist NetworkProperty = 15 + EnableTokenBlacklist NetworkProperty = 16 + MinIdentityApprovalTip NetworkProperty = 17 + UniqueIdentityKeys NetworkProperty = 18 + UbiHardcap NetworkProperty = 19 + ValidatorsFeeShare NetworkProperty = 20 + InflationRate NetworkProperty = 21 + InflationPeriod NetworkProperty = 22 + UnstakingPeriod NetworkProperty = 23 + MaxDelegators NetworkProperty = 24 + MinDelegationPushout NetworkProperty = 25 + SlashingPeriod NetworkProperty = 26 + MaxJailedPercentage NetworkProperty = 27 + MaxSlashingPercentage NetworkProperty = 28 + MinCustodyReward NetworkProperty = 29 + MaxCustodyBufferSize NetworkProperty = 30 + MaxCustodyTxSize NetworkProperty = 31 + AbstentionRankDecreaseAmount NetworkProperty = 32 + MaxAbstention NetworkProperty = 33 + MinCollectiveBond NetworkProperty = 34 + MinCollectiveBondingTime NetworkProperty = 35 + MaxCollectiveOutputs NetworkProperty = 36 + MinCollectiveClaimPeriod NetworkProperty = 37 + ValidatorRecoveryBond NetworkProperty = 38 + MaxAnnualInflation NetworkProperty = 39 + MaxProposalTitleSize NetworkProperty = 40 + MaxProposalDescriptionSize NetworkProperty = 41 + MaxProposalPollOptionSize NetworkProperty = 42 + MaxProposalPollOptionCount NetworkProperty = 43 + MaxProposalReferenceSize NetworkProperty = 44 + MaxProposalChecksumSize NetworkProperty = 45 + MinDappBond NetworkProperty = 46 + MaxDappBond NetworkProperty = 47 + DappLiquidationThreshold NetworkProperty = 48 + DappLiquidationPeriod NetworkProperty = 49 + DappBondDuration NetworkProperty = 50 + DappVerifierBond NetworkProperty = 51 + DappAutoDenounceTime NetworkProperty = 52 + DappMischanceRankDecreaseAmount NetworkProperty = 53 + DappMaxMischance NetworkProperty = 54 + DappInactiveRankDecreasePercent NetworkProperty = 55 + DappPoolSlippageDefault NetworkProperty = 56 + MintingFtFee NetworkProperty = 57 + MintingNftFee NetworkProperty = 58 + VetoThreshold NetworkProperty = 59 + AutocompoundIntervalNumBlocks NetworkProperty = 60 + DowntimeInactiveDuration NetworkProperty = 61 + BridgeAddress NetworkProperty = 62 ) var NetworkProperty_name = map[int32]string{ @@ -155,76 +154,74 @@ var NetworkProperty_name = map[int32]string{ 58: "MINTING_NFT_FEE", 59: "VETO_THRESHOLD", 60: "AUTOCOMPOUND_INTERVAL_NUM_BLOCKS", - 61: "BRIDGE_ADDRESS", - 62: "BRIDGE_COSMOS_ETHEREUM_EXCHANGE_RATE", - 63: "BRIDGE_ETHEREUM_COSMOS_EXCHANGE_RATE", + 61: "DOWNTIME_INACTIVE_DURATION", + 62: "BRIDGE_ADDRESS", } var NetworkProperty_value = map[string]int32{ - "MIN_TX_FEE": 0, - "MAX_TX_FEE": 1, - "VOTE_QUORUM": 2, - "MINIMUM_PROPOSAL_END_TIME": 3, - "PROPOSAL_ENACTMENT_TIME": 4, - "MIN_PROPOSAL_END_BLOCKS": 5, - "MIN_PROPOSAL_ENACTMENT_BLOCKS": 6, - "ENABLE_FOREIGN_FEE_PAYMENTS": 7, - "MISCHANCE_RANK_DECREASE_AMOUNT": 8, - "MAX_MISCHANCE": 9, - "MISCHANCE_CONFIDENCE": 10, - "INACTIVE_RANK_DECREASE_PERCENT": 11, - "POOR_NETWORK_MAX_BANK_SEND": 12, - "MIN_VALIDATORS": 13, - "UNJAIL_MAX_TIME": 14, - "ENABLE_TOKEN_WHITELIST": 15, - "ENABLE_TOKEN_BLACKLIST": 16, - "MIN_IDENTITY_APPROVAL_TIP": 17, - "UNIQUE_IDENTITY_KEYS": 18, - "UBI_HARDCAP": 19, - "VALIDATORS_FEE_SHARE": 20, - "INFLATION_RATE": 21, - "INFLATION_PERIOD": 22, - "UNSTAKING_PERIOD": 23, - "MAX_DELEGATORS": 24, - "MIN_DELEGATION_PUSHOUT": 25, - "SLASHING_PERIOD": 26, - "MAX_JAILED_PERCENTAGE": 27, - "MAX_SLASHING_PERCENTAGE": 28, - "MIN_CUSTODY_REWARD": 29, - "MAX_CUSTODY_BUFFER_SIZE": 30, - "MAX_CUSTODY_TX_SIZE": 31, - "ABSTENTION_RANK_DECREASE_AMOUNT": 32, - "MAX_ABSTENTION": 33, - "MIN_COLLECTIVE_BOND": 34, - "MIN_COLLECTIVE_BONDING_TIME": 35, - "MAX_COLLECTIVE_OUTPUTS": 36, - "MIN_COLLECTIVE_CLAIM_PERIOD": 37, - "VALIDATOR_RECOVERY_BOND": 38, - "MAX_ANNUAL_INFLATION": 39, - "MAX_PROPOSAL_TITLE_SIZE": 40, - "MAX_PROPOSAL_DESCRIPTION_SIZE": 41, - "MAX_PROPOSAL_POLL_OPTION_SIZE": 42, - "MAX_PROPOSAL_POLL_OPTION_COUNT": 43, - "MAX_PROPOSAL_REFERENCE_SIZE": 44, - "MAX_PROPOSAL_CHECKSUM_SIZE": 45, - "MIN_DAPP_BOND": 46, - "MAX_DAPP_BOND": 47, - "DAPP_LIQUIDATION_THRESHOLD": 48, - "DAPP_LIQUIDATION_PERIOD": 49, - "DAPP_BOND_DURATION": 50, - "DAPP_VERIFIER_BOND": 51, - "DAPP_AUTO_DENOUNCE_TIME": 52, - "DAPP_MISCHANCE_RANK_DECREASE_AMOUNT": 53, - "DAPP_MAX_MISCHANCE": 54, - "DAPP_INACTIVE_RANK_DECREASE_PERCENT": 55, - "DAPP_POOL_SLIPPAGE_DEFAULT": 56, - "MINTING_FT_FEE": 57, - "MINTING_NFT_FEE": 58, - "VETO_THRESHOLD": 59, - "AUTOCOMPOUND_INTERVAL_NUM_BLOCKS": 60, - "BRIDGE_ADDRESS": 61, - "BRIDGE_COSMOS_ETHEREUM_EXCHANGE_RATE": 62, - "BRIDGE_ETHEREUM_COSMOS_EXCHANGE_RATE": 63, + "MIN_TX_FEE": 0, + "MAX_TX_FEE": 1, + "VOTE_QUORUM": 2, + "MINIMUM_PROPOSAL_END_TIME": 3, + "PROPOSAL_ENACTMENT_TIME": 4, + "MIN_PROPOSAL_END_BLOCKS": 5, + "MIN_PROPOSAL_ENACTMENT_BLOCKS": 6, + "ENABLE_FOREIGN_FEE_PAYMENTS": 7, + "MISCHANCE_RANK_DECREASE_AMOUNT": 8, + "MAX_MISCHANCE": 9, + "MISCHANCE_CONFIDENCE": 10, + "INACTIVE_RANK_DECREASE_PERCENT": 11, + "POOR_NETWORK_MAX_BANK_SEND": 12, + "MIN_VALIDATORS": 13, + "UNJAIL_MAX_TIME": 14, + "ENABLE_TOKEN_WHITELIST": 15, + "ENABLE_TOKEN_BLACKLIST": 16, + "MIN_IDENTITY_APPROVAL_TIP": 17, + "UNIQUE_IDENTITY_KEYS": 18, + "UBI_HARDCAP": 19, + "VALIDATORS_FEE_SHARE": 20, + "INFLATION_RATE": 21, + "INFLATION_PERIOD": 22, + "UNSTAKING_PERIOD": 23, + "MAX_DELEGATORS": 24, + "MIN_DELEGATION_PUSHOUT": 25, + "SLASHING_PERIOD": 26, + "MAX_JAILED_PERCENTAGE": 27, + "MAX_SLASHING_PERCENTAGE": 28, + "MIN_CUSTODY_REWARD": 29, + "MAX_CUSTODY_BUFFER_SIZE": 30, + "MAX_CUSTODY_TX_SIZE": 31, + "ABSTENTION_RANK_DECREASE_AMOUNT": 32, + "MAX_ABSTENTION": 33, + "MIN_COLLECTIVE_BOND": 34, + "MIN_COLLECTIVE_BONDING_TIME": 35, + "MAX_COLLECTIVE_OUTPUTS": 36, + "MIN_COLLECTIVE_CLAIM_PERIOD": 37, + "VALIDATOR_RECOVERY_BOND": 38, + "MAX_ANNUAL_INFLATION": 39, + "MAX_PROPOSAL_TITLE_SIZE": 40, + "MAX_PROPOSAL_DESCRIPTION_SIZE": 41, + "MAX_PROPOSAL_POLL_OPTION_SIZE": 42, + "MAX_PROPOSAL_POLL_OPTION_COUNT": 43, + "MAX_PROPOSAL_REFERENCE_SIZE": 44, + "MAX_PROPOSAL_CHECKSUM_SIZE": 45, + "MIN_DAPP_BOND": 46, + "MAX_DAPP_BOND": 47, + "DAPP_LIQUIDATION_THRESHOLD": 48, + "DAPP_LIQUIDATION_PERIOD": 49, + "DAPP_BOND_DURATION": 50, + "DAPP_VERIFIER_BOND": 51, + "DAPP_AUTO_DENOUNCE_TIME": 52, + "DAPP_MISCHANCE_RANK_DECREASE_AMOUNT": 53, + "DAPP_MAX_MISCHANCE": 54, + "DAPP_INACTIVE_RANK_DECREASE_PERCENT": 55, + "DAPP_POOL_SLIPPAGE_DEFAULT": 56, + "MINTING_FT_FEE": 57, + "MINTING_NFT_FEE": 58, + "VETO_THRESHOLD": 59, + "AUTOCOMPOUND_INTERVAL_NUM_BLOCKS": 60, + "DOWNTIME_INACTIVE_DURATION": 61, + "BRIDGE_ADDRESS": 62, } func (x NetworkProperty) String() string { @@ -340,70 +337,69 @@ func (m *NetworkPropertyValue) GetStrValue() string { } type NetworkProperties struct { - MinTxFee uint64 `protobuf:"varint,1,opt,name=min_tx_fee,json=minTxFee,proto3" json:"min_tx_fee,omitempty"` - MaxTxFee uint64 `protobuf:"varint,2,opt,name=max_tx_fee,json=maxTxFee,proto3" json:"max_tx_fee,omitempty"` - VoteQuorum uint64 `protobuf:"varint,3,opt,name=vote_quorum,json=voteQuorum,proto3" json:"vote_quorum,omitempty"` - MinimumProposalEndTime uint64 `protobuf:"varint,4,opt,name=minimum_proposal_end_time,json=minimumProposalEndTime,proto3" json:"minimum_proposal_end_time,omitempty"` - ProposalEnactmentTime uint64 `protobuf:"varint,5,opt,name=proposal_enactment_time,json=proposalEnactmentTime,proto3" json:"proposal_enactment_time,omitempty"` - MinProposalEndBlocks uint64 `protobuf:"varint,6,opt,name=min_proposal_end_blocks,json=minProposalEndBlocks,proto3" json:"min_proposal_end_blocks,omitempty"` - MinProposalEnactmentBlocks uint64 `protobuf:"varint,7,opt,name=min_proposal_enactment_blocks,json=minProposalEnactmentBlocks,proto3" json:"min_proposal_enactment_blocks,omitempty"` - EnableForeignFeePayments bool `protobuf:"varint,8,opt,name=enable_foreign_fee_payments,json=enableForeignFeePayments,proto3" json:"enable_foreign_fee_payments,omitempty"` - MischanceRankDecreaseAmount uint64 `protobuf:"varint,9,opt,name=mischance_rank_decrease_amount,json=mischanceRankDecreaseAmount,proto3" json:"mischance_rank_decrease_amount,omitempty"` - MaxMischance uint64 `protobuf:"varint,10,opt,name=max_mischance,json=maxMischance,proto3" json:"max_mischance,omitempty"` - MischanceConfidence uint64 `protobuf:"varint,11,opt,name=mischance_confidence,json=mischanceConfidence,proto3" json:"mischance_confidence,omitempty"` - InactiveRankDecreasePercent github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,12,opt,name=inactive_rank_decrease_percent,json=inactiveRankDecreasePercent,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"inactive_rank_decrease_percent"` - MinValidators uint64 `protobuf:"varint,13,opt,name=min_validators,json=minValidators,proto3" json:"min_validators,omitempty"` - PoorNetworkMaxBankSend uint64 `protobuf:"varint,14,opt,name=poor_network_max_bank_send,json=poorNetworkMaxBankSend,proto3" json:"poor_network_max_bank_send,omitempty"` - UnjailMaxTime uint64 `protobuf:"varint,15,opt,name=unjail_max_time,json=unjailMaxTime,proto3" json:"unjail_max_time,omitempty"` - EnableTokenWhitelist bool `protobuf:"varint,16,opt,name=enable_token_whitelist,json=enableTokenWhitelist,proto3" json:"enable_token_whitelist,omitempty"` - EnableTokenBlacklist bool `protobuf:"varint,17,opt,name=enable_token_blacklist,json=enableTokenBlacklist,proto3" json:"enable_token_blacklist,omitempty"` - MinIdentityApprovalTip uint64 `protobuf:"varint,18,opt,name=min_identity_approval_tip,json=minIdentityApprovalTip,proto3" json:"min_identity_approval_tip,omitempty"` - UniqueIdentityKeys string `protobuf:"bytes,19,opt,name=unique_identity_keys,json=uniqueIdentityKeys,proto3" json:"unique_identity_keys,omitempty"` - UbiHardcap uint64 `protobuf:"varint,20,opt,name=ubi_hardcap,json=ubiHardcap,proto3" json:"ubi_hardcap,omitempty"` - ValidatorsFeeShare github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,21,opt,name=validators_fee_share,json=validatorsFeeShare,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"validators_fee_share"` - InflationRate github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,22,opt,name=inflation_rate,json=inflationRate,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"inflation_rate"` - InflationPeriod uint64 `protobuf:"varint,23,opt,name=inflation_period,json=inflationPeriod,proto3" json:"inflation_period,omitempty"` - UnstakingPeriod uint64 `protobuf:"varint,24,opt,name=unstaking_period,json=unstakingPeriod,proto3" json:"unstaking_period,omitempty"` - MaxDelegators uint64 `protobuf:"varint,25,opt,name=max_delegators,json=maxDelegators,proto3" json:"max_delegators,omitempty"` - MinDelegationPushout uint64 `protobuf:"varint,26,opt,name=min_delegation_pushout,json=minDelegationPushout,proto3" json:"min_delegation_pushout,omitempty"` - SlashingPeriod uint64 `protobuf:"varint,27,opt,name=slashing_period,json=slashingPeriod,proto3" json:"slashing_period,omitempty"` - MaxJailedPercentage github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,28,opt,name=max_jailed_percentage,json=maxJailedPercentage,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"max_jailed_percentage"` - MaxSlashingPercentage github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,29,opt,name=max_slashing_percentage,json=maxSlashingPercentage,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"max_slashing_percentage"` - MinCustodyReward uint64 `protobuf:"varint,30,opt,name=min_custody_reward,json=minCustodyReward,proto3" json:"min_custody_reward,omitempty"` - MaxCustodyBufferSize uint64 `protobuf:"varint,31,opt,name=max_custody_buffer_size,json=maxCustodyBufferSize,proto3" json:"max_custody_buffer_size,omitempty"` - MaxCustodyTxSize uint64 `protobuf:"varint,32,opt,name=max_custody_tx_size,json=maxCustodyTxSize,proto3" json:"max_custody_tx_size,omitempty"` - AbstentionRankDecreaseAmount uint64 `protobuf:"varint,33,opt,name=abstention_rank_decrease_amount,json=abstentionRankDecreaseAmount,proto3" json:"abstention_rank_decrease_amount,omitempty"` - MaxAbstention uint64 `protobuf:"varint,34,opt,name=max_abstention,json=maxAbstention,proto3" json:"max_abstention,omitempty"` - MinCollectiveBond uint64 `protobuf:"varint,35,opt,name=min_collective_bond,json=minCollectiveBond,proto3" json:"min_collective_bond,omitempty"` - MinCollectiveBondingTime uint64 `protobuf:"varint,36,opt,name=min_collective_bonding_time,json=minCollectiveBondingTime,proto3" json:"min_collective_bonding_time,omitempty"` - MaxCollectiveOutputs uint64 `protobuf:"varint,37,opt,name=max_collective_outputs,json=maxCollectiveOutputs,proto3" json:"max_collective_outputs,omitempty"` - MinCollectiveClaimPeriod uint64 `protobuf:"varint,38,opt,name=min_collective_claim_period,json=minCollectiveClaimPeriod,proto3" json:"min_collective_claim_period,omitempty"` - ValidatorRecoveryBond uint64 `protobuf:"varint,39,opt,name=validator_recovery_bond,json=validatorRecoveryBond,proto3" json:"validator_recovery_bond,omitempty"` - MaxAnnualInflation github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,40,opt,name=max_annual_inflation,json=maxAnnualInflation,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"max_annual_inflation"` - MaxProposalTitleSize uint64 `protobuf:"varint,41,opt,name=max_proposal_title_size,json=maxProposalTitleSize,proto3" json:"max_proposal_title_size,omitempty"` - MaxProposalDescriptionSize uint64 `protobuf:"varint,42,opt,name=max_proposal_description_size,json=maxProposalDescriptionSize,proto3" json:"max_proposal_description_size,omitempty"` - MaxProposalPollOptionSize uint64 `protobuf:"varint,43,opt,name=max_proposal_poll_option_size,json=maxProposalPollOptionSize,proto3" json:"max_proposal_poll_option_size,omitempty"` - MaxProposalPollOptionCount uint64 `protobuf:"varint,44,opt,name=max_proposal_poll_option_count,json=maxProposalPollOptionCount,proto3" json:"max_proposal_poll_option_count,omitempty"` - MaxProposalReferenceSize uint64 `protobuf:"varint,45,opt,name=max_proposal_reference_size,json=maxProposalReferenceSize,proto3" json:"max_proposal_reference_size,omitempty"` - MaxProposalChecksumSize uint64 `protobuf:"varint,46,opt,name=max_proposal_checksum_size,json=maxProposalChecksumSize,proto3" json:"max_proposal_checksum_size,omitempty"` - MinDappBond uint64 `protobuf:"varint,47,opt,name=min_dapp_bond,json=minDappBond,proto3" json:"min_dapp_bond,omitempty"` - MaxDappBond uint64 `protobuf:"varint,48,opt,name=max_dapp_bond,json=maxDappBond,proto3" json:"max_dapp_bond,omitempty"` - DappLiquidationThreshold uint64 `protobuf:"varint,49,opt,name=dapp_liquidation_threshold,json=dappLiquidationThreshold,proto3" json:"dapp_liquidation_threshold,omitempty"` - DappLiquidationPeriod uint64 `protobuf:"varint,50,opt,name=dapp_liquidation_period,json=dappLiquidationPeriod,proto3" json:"dapp_liquidation_period,omitempty"` - DappBondDuration uint64 `protobuf:"varint,51,opt,name=dapp_bond_duration,json=dappBondDuration,proto3" json:"dapp_bond_duration,omitempty"` - DappVerifierBond github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,52,opt,name=dapp_verifier_bond,json=dappVerifierBond,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"dapp_verifier_bond"` - DappAutoDenounceTime uint64 `protobuf:"varint,53,opt,name=dapp_auto_denounce_time,json=dappAutoDenounceTime,proto3" json:"dapp_auto_denounce_time,omitempty"` - DappMischanceRankDecreaseAmount uint64 `protobuf:"varint,54,opt,name=dapp_mischance_rank_decrease_amount,json=dappMischanceRankDecreaseAmount,proto3" json:"dapp_mischance_rank_decrease_amount,omitempty"` - DappMaxMischance uint64 `protobuf:"varint,55,opt,name=dapp_max_mischance,json=dappMaxMischance,proto3" json:"dapp_max_mischance,omitempty"` - DappInactiveRankDecreasePercent uint64 `protobuf:"varint,56,opt,name=dapp_inactive_rank_decrease_percent,json=dappInactiveRankDecreasePercent,proto3" json:"dapp_inactive_rank_decrease_percent,omitempty"` - DappPoolSlippageDefault github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,57,opt,name=dapp_pool_slippage_default,json=dappPoolSlippageDefault,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"dapp_pool_slippage_default"` - MintingFtFee uint64 `protobuf:"varint,58,opt,name=minting_ft_fee,json=mintingFtFee,proto3" json:"minting_ft_fee,omitempty"` - MintingNftFee uint64 `protobuf:"varint,59,opt,name=minting_nft_fee,json=mintingNftFee,proto3" json:"minting_nft_fee,omitempty"` - VetoThreshold github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,60,opt,name=veto_threshold,json=vetoThreshold,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"veto_threshold"` - AutocompoundIntervalNumBlocks uint64 `protobuf:"varint,61,opt,name=autocompound_interval_num_blocks,json=autocompoundIntervalNumBlocks,proto3" json:"autocompound_interval_num_blocks,omitempty"` - BridgeAddress string `protobuf:"bytes,62,opt,name=bridge_address,json=bridgeAddress,proto3" json:"bridge_address,omitempty"` - BridgeCosmosEthereumExchangeRate github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,63,opt,name=bridge_cosmos_ethereum_exchange_rate,json=bridgeCosmosEthereumExchangeRate,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"bridge_cosmos_ethereum_exchange_rate"` - BridgeEthereumCosmosExchangeRate github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,64,opt,name=bridge_ethereum_cosmos_exchange_rate,json=bridgeEthereumCosmosExchangeRate,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"bridge_ethereum_cosmos_exchange_rate"` + MinTxFee uint64 `protobuf:"varint,1,opt,name=min_tx_fee,json=minTxFee,proto3" json:"min_tx_fee,omitempty"` + MaxTxFee uint64 `protobuf:"varint,2,opt,name=max_tx_fee,json=maxTxFee,proto3" json:"max_tx_fee,omitempty"` + VoteQuorum github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,3,opt,name=vote_quorum,json=voteQuorum,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"vote_quorum"` + MinimumProposalEndTime uint64 `protobuf:"varint,4,opt,name=minimum_proposal_end_time,json=minimumProposalEndTime,proto3" json:"minimum_proposal_end_time,omitempty"` + ProposalEnactmentTime uint64 `protobuf:"varint,5,opt,name=proposal_enactment_time,json=proposalEnactmentTime,proto3" json:"proposal_enactment_time,omitempty"` + MinProposalEndBlocks uint64 `protobuf:"varint,6,opt,name=min_proposal_end_blocks,json=minProposalEndBlocks,proto3" json:"min_proposal_end_blocks,omitempty"` + MinProposalEnactmentBlocks uint64 `protobuf:"varint,7,opt,name=min_proposal_enactment_blocks,json=minProposalEnactmentBlocks,proto3" json:"min_proposal_enactment_blocks,omitempty"` + EnableForeignFeePayments bool `protobuf:"varint,8,opt,name=enable_foreign_fee_payments,json=enableForeignFeePayments,proto3" json:"enable_foreign_fee_payments,omitempty"` + MischanceRankDecreaseAmount uint64 `protobuf:"varint,9,opt,name=mischance_rank_decrease_amount,json=mischanceRankDecreaseAmount,proto3" json:"mischance_rank_decrease_amount,omitempty"` + MaxMischance uint64 `protobuf:"varint,10,opt,name=max_mischance,json=maxMischance,proto3" json:"max_mischance,omitempty"` + MischanceConfidence uint64 `protobuf:"varint,11,opt,name=mischance_confidence,json=mischanceConfidence,proto3" json:"mischance_confidence,omitempty"` + InactiveRankDecreasePercent github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,12,opt,name=inactive_rank_decrease_percent,json=inactiveRankDecreasePercent,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"inactive_rank_decrease_percent"` + MinValidators uint64 `protobuf:"varint,13,opt,name=min_validators,json=minValidators,proto3" json:"min_validators,omitempty"` + PoorNetworkMaxBankSend uint64 `protobuf:"varint,14,opt,name=poor_network_max_bank_send,json=poorNetworkMaxBankSend,proto3" json:"poor_network_max_bank_send,omitempty"` + UnjailMaxTime uint64 `protobuf:"varint,15,opt,name=unjail_max_time,json=unjailMaxTime,proto3" json:"unjail_max_time,omitempty"` + EnableTokenWhitelist bool `protobuf:"varint,16,opt,name=enable_token_whitelist,json=enableTokenWhitelist,proto3" json:"enable_token_whitelist,omitempty"` + EnableTokenBlacklist bool `protobuf:"varint,17,opt,name=enable_token_blacklist,json=enableTokenBlacklist,proto3" json:"enable_token_blacklist,omitempty"` + MinIdentityApprovalTip uint64 `protobuf:"varint,18,opt,name=min_identity_approval_tip,json=minIdentityApprovalTip,proto3" json:"min_identity_approval_tip,omitempty"` + UniqueIdentityKeys string `protobuf:"bytes,19,opt,name=unique_identity_keys,json=uniqueIdentityKeys,proto3" json:"unique_identity_keys,omitempty"` + UbiHardcap uint64 `protobuf:"varint,20,opt,name=ubi_hardcap,json=ubiHardcap,proto3" json:"ubi_hardcap,omitempty"` + ValidatorsFeeShare github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,21,opt,name=validators_fee_share,json=validatorsFeeShare,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"validators_fee_share"` + InflationRate github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,22,opt,name=inflation_rate,json=inflationRate,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"inflation_rate"` + InflationPeriod uint64 `protobuf:"varint,23,opt,name=inflation_period,json=inflationPeriod,proto3" json:"inflation_period,omitempty"` + UnstakingPeriod uint64 `protobuf:"varint,24,opt,name=unstaking_period,json=unstakingPeriod,proto3" json:"unstaking_period,omitempty"` + MaxDelegators uint64 `protobuf:"varint,25,opt,name=max_delegators,json=maxDelegators,proto3" json:"max_delegators,omitempty"` + MinDelegationPushout uint64 `protobuf:"varint,26,opt,name=min_delegation_pushout,json=minDelegationPushout,proto3" json:"min_delegation_pushout,omitempty"` + SlashingPeriod uint64 `protobuf:"varint,27,opt,name=slashing_period,json=slashingPeriod,proto3" json:"slashing_period,omitempty"` + MaxJailedPercentage github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,28,opt,name=max_jailed_percentage,json=maxJailedPercentage,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"max_jailed_percentage"` + MaxSlashingPercentage github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,29,opt,name=max_slashing_percentage,json=maxSlashingPercentage,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"max_slashing_percentage"` + MinCustodyReward uint64 `protobuf:"varint,30,opt,name=min_custody_reward,json=minCustodyReward,proto3" json:"min_custody_reward,omitempty"` + MaxCustodyBufferSize uint64 `protobuf:"varint,31,opt,name=max_custody_buffer_size,json=maxCustodyBufferSize,proto3" json:"max_custody_buffer_size,omitempty"` + MaxCustodyTxSize uint64 `protobuf:"varint,32,opt,name=max_custody_tx_size,json=maxCustodyTxSize,proto3" json:"max_custody_tx_size,omitempty"` + AbstentionRankDecreaseAmount uint64 `protobuf:"varint,33,opt,name=abstention_rank_decrease_amount,json=abstentionRankDecreaseAmount,proto3" json:"abstention_rank_decrease_amount,omitempty"` + MaxAbstention uint64 `protobuf:"varint,34,opt,name=max_abstention,json=maxAbstention,proto3" json:"max_abstention,omitempty"` + MinCollectiveBond uint64 `protobuf:"varint,35,opt,name=min_collective_bond,json=minCollectiveBond,proto3" json:"min_collective_bond,omitempty"` + MinCollectiveBondingTime uint64 `protobuf:"varint,36,opt,name=min_collective_bonding_time,json=minCollectiveBondingTime,proto3" json:"min_collective_bonding_time,omitempty"` + MaxCollectiveOutputs uint64 `protobuf:"varint,37,opt,name=max_collective_outputs,json=maxCollectiveOutputs,proto3" json:"max_collective_outputs,omitempty"` + MinCollectiveClaimPeriod uint64 `protobuf:"varint,38,opt,name=min_collective_claim_period,json=minCollectiveClaimPeriod,proto3" json:"min_collective_claim_period,omitempty"` + ValidatorRecoveryBond uint64 `protobuf:"varint,39,opt,name=validator_recovery_bond,json=validatorRecoveryBond,proto3" json:"validator_recovery_bond,omitempty"` + MaxAnnualInflation github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,40,opt,name=max_annual_inflation,json=maxAnnualInflation,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"max_annual_inflation"` + MaxProposalTitleSize uint64 `protobuf:"varint,41,opt,name=max_proposal_title_size,json=maxProposalTitleSize,proto3" json:"max_proposal_title_size,omitempty"` + MaxProposalDescriptionSize uint64 `protobuf:"varint,42,opt,name=max_proposal_description_size,json=maxProposalDescriptionSize,proto3" json:"max_proposal_description_size,omitempty"` + MaxProposalPollOptionSize uint64 `protobuf:"varint,43,opt,name=max_proposal_poll_option_size,json=maxProposalPollOptionSize,proto3" json:"max_proposal_poll_option_size,omitempty"` + MaxProposalPollOptionCount uint64 `protobuf:"varint,44,opt,name=max_proposal_poll_option_count,json=maxProposalPollOptionCount,proto3" json:"max_proposal_poll_option_count,omitempty"` + MaxProposalReferenceSize uint64 `protobuf:"varint,45,opt,name=max_proposal_reference_size,json=maxProposalReferenceSize,proto3" json:"max_proposal_reference_size,omitempty"` + MaxProposalChecksumSize uint64 `protobuf:"varint,46,opt,name=max_proposal_checksum_size,json=maxProposalChecksumSize,proto3" json:"max_proposal_checksum_size,omitempty"` + MinDappBond uint64 `protobuf:"varint,47,opt,name=min_dapp_bond,json=minDappBond,proto3" json:"min_dapp_bond,omitempty"` + MaxDappBond uint64 `protobuf:"varint,48,opt,name=max_dapp_bond,json=maxDappBond,proto3" json:"max_dapp_bond,omitempty"` + DappLiquidationThreshold uint64 `protobuf:"varint,49,opt,name=dapp_liquidation_threshold,json=dappLiquidationThreshold,proto3" json:"dapp_liquidation_threshold,omitempty"` + DappLiquidationPeriod uint64 `protobuf:"varint,50,opt,name=dapp_liquidation_period,json=dappLiquidationPeriod,proto3" json:"dapp_liquidation_period,omitempty"` + DappBondDuration uint64 `protobuf:"varint,51,opt,name=dapp_bond_duration,json=dappBondDuration,proto3" json:"dapp_bond_duration,omitempty"` + DappVerifierBond github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,52,opt,name=dapp_verifier_bond,json=dappVerifierBond,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"dapp_verifier_bond"` + DappAutoDenounceTime uint64 `protobuf:"varint,53,opt,name=dapp_auto_denounce_time,json=dappAutoDenounceTime,proto3" json:"dapp_auto_denounce_time,omitempty"` + DappMischanceRankDecreaseAmount uint64 `protobuf:"varint,54,opt,name=dapp_mischance_rank_decrease_amount,json=dappMischanceRankDecreaseAmount,proto3" json:"dapp_mischance_rank_decrease_amount,omitempty"` + DappMaxMischance uint64 `protobuf:"varint,55,opt,name=dapp_max_mischance,json=dappMaxMischance,proto3" json:"dapp_max_mischance,omitempty"` + DappInactiveRankDecreasePercent github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,56,opt,name=dapp_inactive_rank_decrease_percent,json=dappInactiveRankDecreasePercent,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"dapp_inactive_rank_decrease_percent"` + DappPoolSlippageDefault github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,57,opt,name=dapp_pool_slippage_default,json=dappPoolSlippageDefault,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"dapp_pool_slippage_default"` + MintingFtFee uint64 `protobuf:"varint,58,opt,name=minting_ft_fee,json=mintingFtFee,proto3" json:"minting_ft_fee,omitempty"` + MintingNftFee uint64 `protobuf:"varint,59,opt,name=minting_nft_fee,json=mintingNftFee,proto3" json:"minting_nft_fee,omitempty"` + VetoThreshold github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,60,opt,name=veto_threshold,json=vetoThreshold,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"veto_threshold"` + AutocompoundIntervalNumBlocks uint64 `protobuf:"varint,61,opt,name=autocompound_interval_num_blocks,json=autocompoundIntervalNumBlocks,proto3" json:"autocompound_interval_num_blocks,omitempty"` + DowntimeInactiveDuration uint64 `protobuf:"varint,62,opt,name=downtime_inactive_duration,json=downtimeInactiveDuration,proto3" json:"downtime_inactive_duration,omitempty"` + BridgeAddress string `protobuf:"bytes,63,opt,name=bridge_address,json=bridgeAddress,proto3" json:"bridge_address,omitempty"` } func (m *NetworkProperties) Reset() { *m = NetworkProperties{} } @@ -453,13 +449,6 @@ func (m *NetworkProperties) GetMaxTxFee() uint64 { return 0 } -func (m *NetworkProperties) GetVoteQuorum() uint64 { - if m != nil { - return m.VoteQuorum - } - return 0 -} - func (m *NetworkProperties) GetMinimumProposalEndTime() uint64 { if m != nil { return m.MinimumProposalEndTime @@ -775,13 +764,6 @@ func (m *NetworkProperties) GetDappMaxMischance() uint64 { return 0 } -func (m *NetworkProperties) GetDappInactiveRankDecreasePercent() uint64 { - if m != nil { - return m.DappInactiveRankDecreasePercent - } - return 0 -} - func (m *NetworkProperties) GetMintingFtFee() uint64 { if m != nil { return m.MintingFtFee @@ -803,6 +785,13 @@ func (m *NetworkProperties) GetAutocompoundIntervalNumBlocks() uint64 { return 0 } +func (m *NetworkProperties) GetDowntimeInactiveDuration() uint64 { + if m != nil { + return m.DowntimeInactiveDuration + } + return 0 +} + func (m *NetworkProperties) GetBridgeAddress() string { if m != nil { return m.BridgeAddress @@ -820,193 +809,190 @@ func init() { func init() { proto.RegisterFile("kira/gov/network_properties.proto", fileDescriptor_98011a6048e5dde3) } var fileDescriptor_98011a6048e5dde3 = []byte{ - // 2971 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x59, 0x4b, 0x6f, 0xdc, 0xc6, - 0x96, 0xb6, 0x12, 0x27, 0x91, 0xcb, 0x96, 0x44, 0x53, 0xb2, 0x45, 0x53, 0xb6, 0x44, 0x3f, 0xe4, - 0x38, 0x89, 0x2d, 0xd9, 0x4e, 0xec, 0x24, 0x76, 0x5e, 0xec, 0x66, 0x49, 0x62, 0xd4, 0x24, 0xdb, - 0x7c, 0xc8, 0x76, 0x30, 0x40, 0x85, 0xea, 0x2e, 0x49, 0x1c, 0x75, 0x93, 0x1d, 0x3e, 0x94, 0x56, - 0x16, 0xb3, 0x1e, 0xf4, 0x6a, 0xfe, 0x40, 0x03, 0x03, 0xcc, 0x5f, 0x98, 0x1f, 0x91, 0x65, 0x66, - 0x37, 0x18, 0x60, 0x82, 0x8b, 0x64, 0x73, 0x7f, 0xc3, 0x5d, 0x5d, 0xd4, 0x83, 0x64, 0xbf, 0x24, - 0x5d, 0xe8, 0xae, 0x2c, 0xd7, 0xf9, 0xbe, 0x73, 0x4e, 0x9d, 0x3a, 0x55, 0x3c, 0x1f, 0x1a, 0xdc, - 0x3e, 0x0c, 0x62, 0x7f, 0x7d, 0x3f, 0x3a, 0x5a, 0x0f, 0x71, 0xfa, 0x73, 0x14, 0x1f, 0xa2, 0x4e, - 0x1c, 0x75, 0x70, 0x9c, 0x06, 0x38, 0x59, 0xeb, 0xc4, 0x51, 0x1a, 0x89, 0xd3, 0x04, 0xb2, 0xb6, - 0x1f, 0x1d, 0xc9, 0x0b, 0xfb, 0x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, 0x39, 0x4b, 0x7d, 0x95, 0xfe, 0x0a, 0x47, - 0xb9, 0xe3, 0x21, 0x7f, 0xdf, 0x0e, 0xfa, 0x3b, 0x59, 0x4d, 0xc9, 0x17, 0xff, 0xfd, 0xbf, 0x96, - 0x2f, 0x54, 0xbe, 0xfd, 0xf5, 0x8f, 0xe5, 0xa9, 0xdf, 0xfe, 0x58, 0x9e, 0xfa, 0xcb, 0x1f, 0xcb, - 0x53, 0xff, 0xf1, 0xe7, 0xf2, 0x85, 0xdf, 0xfe, 0x5c, 0xbe, 0xf0, 0xbf, 0x7f, 0x2e, 0x5f, 0xf8, - 0x61, 0x75, 0x40, 0xb7, 0x6d, 0x07, 0xb1, 0x5f, 0x8d, 0x62, 0xbc, 0x9e, 0xe0, 0x43, 0x3f, 0x58, - 0xef, 0xd2, 0xdf, 0x8b, 0xa9, 0x74, 0xdb, 0x7d, 0x9f, 0xfe, 0x06, 0xfc, 0xe9, 0xdf, 0x03, 0x00, - 0x00, 0xff, 0xff, 0xb7, 0x5e, 0x6a, 0x9d, 0x48, 0x1e, 0x00, 0x00, + // 2913 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x59, 0xcb, 0x72, 0xdb, 0x46, + 0xd6, 0xb6, 0x12, 0x27, 0x91, 0x5b, 0x96, 0x04, 0x43, 0xb4, 0x05, 0x43, 0xb6, 0x04, 0xdb, 0x91, + 0xe3, 0x24, 0xb6, 0x64, 0x3b, 0xb1, 0x93, 0xd8, 0xb9, 0xfc, 0x20, 0x01, 0x5a, 0x88, 0x88, 0x8b, + 0x71, 0x91, 0xe3, 0xd4, 0x5f, 0xd5, 0x81, 0xc8, 0x96, 0x84, 0x5f, 0x24, 0xc0, 0xe0, 0x22, 0x53, + 0xa9, 0xff, 0x01, 0xa6, 0xb8, 0x9a, 0x17, 0x60, 0xd5, 0x54, 0xcd, 0x2b, 0xcc, 0x43, 0x64,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 0x43, 0x7c, 0x05, 0xbc, 0x73, 0x84, 0xff, 0x20, 0x59, 0x5e, + 0xb4, 0xe9, 0x7f, 0xf8, 0x15, 0x70, 0x29, 0x49, 0x63, 0x48, 0x2d, 0x38, 0xfa, 0x25, 0x7b, 0x36, + 0x49, 0x63, 0x42, 0x79, 0x76, 0xf1, 0x1f, 0x7f, 0x5a, 0x9b, 0xb9, 0xfd, 0xef, 0x9b, 0xe0, 0xca, + 0x64, 0x05, 0x6e, 0x00, 0xd0, 0x09, 0x42, 0x98, 0xf6, 0xe0, 0x1e, 0xca, 0x7d, 0xce, 0x76, 0x82, + 0xd0, 0xed, 0xd5, 0x11, 0x22, 0x56, 0xbf, 0x97, 0x5b, 0xdf, 0x62, 0x56, 0xbf, 0x47, 0xad, 0x26, + 0x98, 0x3b, 0x8a, 0x52, 0x04, 0x7f, 0xcc, 0xa2, 0x38, 0xeb, 0x08, 0x6f, 0xe3, 0xb0, 0xd5, 0x8d, + 0x9f, 0x7f, 0x5d, 0xbb, 0xf0, 0xb7, 0x5f, 0xd7, 0xee, 0xfe, 0x17, 0x1b, 0x57, 0x50, 0xd3, 0x06, + 0xd8, 0xc5, 0x4b, 0xe2, 0x81, 0xff, 0x02, 0x5c, 0xef, 0x04, 0x61, 0xd0, 0xc9, 0x3a, 0x90, 0xd6, + 0xc1, 0x6f, 0x43, 0x14, 0xb6, 0x60, 0x1a, 0x74, 0x90, 0x70, 0x91, 0x44, 0xbf, 0xc6, 0x00, 0x16, + 0xb3, 0xab, 0x61, 0xcb, 0x0d, 0x3a, 0x88, 0x7f, 0x0a, 0x96, 0x87, 0x28, 0x7e, 0x33, 0xed, 0xa0, + 0x30, 0xa5, 0xc4, 0x77, 0x08, 0xf1, 0x6a, 0xb7, 0x60, 0x30, 0x2b, 0xe1, 0x3d, 0x01, 0xcb, 0x78, + 0xff, 0x23, 0xe1, 0x76, 0xdb, 0x51, 0xf3, 0x30, 0x11, 0xde, 0x25, 0xbc, 0x4a, 0x27, 0x08, 0x87, + 0x82, 0x55, 0x89, 0x8d, 0x97, 0xc1, 0xcd, 0x31, 0x5a, 0x1e, 0x92, 0x91, 0xdf, 0x23, 0x64, 0x71, + 0x84, 0xcc, 0x20, 0xcc, 0xc5, 0x57, 0x60, 0x05, 0x85, 0xfe, 0x6e, 0x1b, 0xc1, 0xbd, 0x28, 0x46, + 0xc1, 0x7e, 0x88, 0x6b, 0x0c, 0xbb, 0xfe, 0x31, 0xc6, 0x24, 0xc2, 0xac, 0x34, 0x73, 0x6f, 0xd6, + 0x16, 0x28, 0xa4, 0x4e, 0x11, 0x75, 0x84, 0x2c, 0x66, 0xe7, 0x6b, 0x60, 0xb5, 0x13, 0x24, 0xcd, + 0x03, 0x3f, 0x6c, 0x22, 0x18, 0xfb, 0xe1, 0x21, 0x6c, 0xa1, 0x66, 0x8c, 0xfc, 0x04, 0x41, 0xbf, + 0x13, 0x65, 0x61, 0x2a, 0x5c, 0x22, 0x29, 0xac, 0x14, 0x28, 0xdb, 0x0f, 0x0f, 0x15, 0x86, 0x91, + 0x09, 0x84, 0xbf, 0x03, 0xe6, 0x71, 0x7f, 0x0b, 0x88, 0x00, 0x08, 0xe7, 0x72, 0xc7, 0xef, 0xe9, + 0xf9, 0x1a, 0xff, 0x08, 0x54, 0xca, 0x48, 0xcd, 0x28, 0xdc, 0x0b, 0x5a, 0x08, 0x63, 0xe7, 0x08, + 0x76, 0xa9, 0xb0, 0xd5, 0x0a, 0x13, 0x9f, 0x80, 0xd5, 0x00, 0x6f, 0x37, 0x38, 0x1a, 0xcf, 0xad, + 0x8b, 0xe2, 0x26, 0x0a, 0x53, 0xe1, 0xf2, 0xb9, 0x86, 0x65, 0x25, 0xf7, 0x3a, 0xbc, 0x17, 0x8b, + 0xba, 0xe4, 0xd7, 0xc1, 0x02, 0xee, 0xc9, 0x91, 0xdf, 0x0e, 0x5a, 0x7e, 0x1a, 0xc5, 0x89, 0x30, + 0x4f, 0x32, 0x9c, 0xef, 0x04, 0xe1, 0x4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03, 0xc7, 0x7d, 0x40, + 0x8f, 0xaf, 0x3e, 0x55, 0xab, 0x61, 0x46, 0xf1, 0x65, 0x73, 0x35, 0xb7, 0xa1, 0xd2, 0x76, 0xdf, + 0x2b, 0xf6, 0x37, 0x55, 0xab, 0x8d, 0xd0, 0x14, 0xd5, 0xa9, 0xd9, 0x9a, 0x45, 0x06, 0x80, 0x90, + 0x3f, 0x64, 0x1f, 0xc4, 0x53, 0xb5, 0xda, 0x88, 0x0b, 0xcb, 0x6c, 0x34, 0xa0, 0x39, 0xe4, 0xe2, + 0x23, 0xf1, 0x66, 0x7f, 0x20, 0x5d, 0xd7, 0x4f, 0xd3, 0x6a, 0x27, 0x7a, 0xa8, 0x91, 0xb1, 0xfb, + 0x78, 0x22, 0x8b, 0x29, 0x5a, 0x6d, 0xc4, 0x87, 0xad, 0xd6, 0x55, 0x1b, 0x7f, 0xef, 0x68, 0x0e, + 0xf7, 0x59, 0xa3, 0x4e, 0xd1, 0x6a, 0x23, 0xf4, 0xda, 0x96, 0x5a, 0xdb, 0x76, 0x3c, 0x9d, 0xb2, + 0x1f, 0x88, 0x2b, 0xfd, 0x81, 0xb4, 0xac, 0x9f, 0xac, 0xd5, 0xc8, 0xb5, 0x24, 0x5b, 0x16, 0xed, + 0xed, 0x86, 0xb8, 0xd8, 0x1f, 0x48, 0x73, 0xfa, 0xa8, 0x56, 0x23, 0x37, 0x5c, 0x81, 0xd9, 0x64, + 0x98, 0x51, 0xad, 0x46, 0xec, 0x0d, 0xed, 0xa5, 0x87, 0x67, 0x06, 0xef, 0xdf, 0xdd, 0xb2, 0x55, + 0x67, 0xcb, 0x6c, 0x28, 0xdc, 0x43, 0xba, 0x05, 0xe5, 0x14, 0xad, 0x36, 0xc1, 0x66, 0x63, 0xfa, + 0x88, 0xce, 0x9a, 0x72, 0x92, 0x56, 0x2b, 0xb2, 0x82, 0x8a, 0x67, 0xd3, 0x49, 0x7b, 0x4c, 0xef, + 0x08, 0x65, 0x5c, 0xab, 0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 0x9b, 0xe6, 0x53, 0xb4, 0x4e, 0xd5, + 0xd6, 0x94, 0x17, 0x2a, 0x94, 0x15, 0xc5, 0x56, 0x1d, 0x87, 0xfb, 0x9a, 0x66, 0x5b, 0x1d, 0xd6, + 0x3a, 0xe2, 0xc5, 0x3f, 0xfc, 0x79, 0xf5, 0x42, 0xf5, 0x9b, 0x9f, 0x7f, 0x5b, 0x9d, 0xf9, 0xe5, + 0xb7, 0xd5, 0x99, 0xbf, 0xff, 0xb6, 0x3a, 0xf3, 0xc7, 0xdf, 0x57, 0x2f, 0xfc, 0xf2, 0xfb, 0xea, + 0x85, 0xbf, 0xfe, 0xbe, 0x7a, 0xe1, 0xfb, 0xf5, 0x21, 0xc1, 0xb7, 0x1d, 0xc4, 0x7e, 0x2d, 0x8a, + 0xd1, 0x66, 0x82, 0x0e, 0xfd, 0x60, 0xb3, 0x47, 0x7e, 0x6b, 0x25, 0x9a, 0x6f, 0xf7, 0x5d, 0xf2, + 0xfb, 0xe9, 0x27, 0xff, 0x09, 0x00, 0x00, 0xff, 0xff, 0x50, 0x56, 0x25, 0x37, 0x84, 0x1d, 0x00, + 0x00, } func (this *NetworkPropertyValue) Equal(that interface{}) bool { @@ -1133,30 +1119,6 @@ func (m *NetworkProperties) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - { - size := m.BridgeEthereumCosmosExchangeRate.Size() - i -= size - if _, err := m.BridgeEthereumCosmosExchangeRate.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintNetworkProperties(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x4 - i-- - dAtA[i] = 0x82 - { - size := m.BridgeCosmosEthereumExchangeRate.Size() - i -= size - if _, err := m.BridgeCosmosEthereumExchangeRate.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintNetworkProperties(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x3 - i-- - dAtA[i] = 0xfa if len(m.BridgeAddress) > 0 { i -= len(m.BridgeAddress) copy(dAtA[i:], m.BridgeAddress) @@ -1164,7 +1126,14 @@ func (m *NetworkProperties) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x3 i-- - dAtA[i] = 0xf2 + dAtA[i] = 0xfa + } + if m.DowntimeInactiveDuration != 0 { + i = encodeVarintNetworkProperties(dAtA, i, uint64(m.DowntimeInactiveDuration)) + i-- + dAtA[i] = 0x3 + i-- + dAtA[i] = 0xf0 } if m.AutocompoundIntervalNumBlocks != 0 { i = encodeVarintNetworkProperties(dAtA, i, uint64(m.AutocompoundIntervalNumBlocks)) @@ -1211,13 +1180,18 @@ func (m *NetworkProperties) MarshalToSizedBuffer(dAtA []byte) (int, error) { dAtA[i] = 0x3 i-- dAtA[i] = 0xca - if m.DappInactiveRankDecreasePercent != 0 { - i = encodeVarintNetworkProperties(dAtA, i, uint64(m.DappInactiveRankDecreasePercent)) - i-- - dAtA[i] = 0x3 - i-- - dAtA[i] = 0xc0 + { + size := m.DappInactiveRankDecreasePercent.Size() + i -= size + if _, err := m.DappInactiveRankDecreasePercent.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintNetworkProperties(dAtA, i, uint64(size)) } + i-- + dAtA[i] = 0x3 + i-- + dAtA[i] = 0xc2 if m.DappMaxMischance != 0 { i = encodeVarintNetworkProperties(dAtA, i, uint64(m.DappMaxMischance)) i-- @@ -1610,11 +1584,16 @@ func (m *NetworkProperties) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x20 } - if m.VoteQuorum != 0 { - i = encodeVarintNetworkProperties(dAtA, i, uint64(m.VoteQuorum)) - i-- - dAtA[i] = 0x18 + { + size := m.VoteQuorum.Size() + i -= size + if _, err := m.VoteQuorum.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintNetworkProperties(dAtA, i, uint64(size)) } + i-- + dAtA[i] = 0x1a if m.MaxTxFee != 0 { i = encodeVarintNetworkProperties(dAtA, i, uint64(m.MaxTxFee)) i-- @@ -1684,9 +1663,8 @@ func (m *NetworkProperties) Size() (n int) { if m.MaxTxFee != 0 { n += 1 + sovNetworkProperties(uint64(m.MaxTxFee)) } - if m.VoteQuorum != 0 { - n += 1 + sovNetworkProperties(uint64(m.VoteQuorum)) - } + l = m.VoteQuorum.Size() + n += 1 + l + sovNetworkProperties(uint64(l)) if m.MinimumProposalEndTime != 0 { n += 1 + sovNetworkProperties(uint64(m.MinimumProposalEndTime)) } @@ -1837,9 +1815,8 @@ func (m *NetworkProperties) Size() (n int) { if m.DappMaxMischance != 0 { n += 2 + sovNetworkProperties(uint64(m.DappMaxMischance)) } - if m.DappInactiveRankDecreasePercent != 0 { - n += 2 + sovNetworkProperties(uint64(m.DappInactiveRankDecreasePercent)) - } + l = m.DappInactiveRankDecreasePercent.Size() + n += 2 + l + sovNetworkProperties(uint64(l)) l = m.DappPoolSlippageDefault.Size() n += 2 + l + sovNetworkProperties(uint64(l)) if m.MintingFtFee != 0 { @@ -1853,14 +1830,13 @@ func (m *NetworkProperties) Size() (n int) { if m.AutocompoundIntervalNumBlocks != 0 { n += 2 + sovNetworkProperties(uint64(m.AutocompoundIntervalNumBlocks)) } + if m.DowntimeInactiveDuration != 0 { + n += 2 + sovNetworkProperties(uint64(m.DowntimeInactiveDuration)) + } l = len(m.BridgeAddress) if l > 0 { n += 2 + l + sovNetworkProperties(uint64(l)) } - l = m.BridgeCosmosEthereumExchangeRate.Size() - n += 2 + l + sovNetworkProperties(uint64(l)) - l = m.BridgeEthereumCosmosExchangeRate.Size() - n += 2 + l + sovNetworkProperties(uint64(l)) return n } @@ -2159,10 +2135,10 @@ func (m *NetworkProperties) Unmarshal(dAtA []byte) error { } } case 3: - if wireType != 0 { + if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field VoteQuorum", wireType) } - m.VoteQuorum = 0 + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowNetworkProperties @@ -2172,11 +2148,26 @@ func (m *NetworkProperties) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.VoteQuorum |= uint64(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthNetworkProperties + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthNetworkProperties + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.VoteQuorum.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex case 4: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field MinimumProposalEndTime", wireType) @@ -3287,10 +3278,10 @@ func (m *NetworkProperties) Unmarshal(dAtA []byte) error { } } case 56: - if wireType != 0 { + if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field DappInactiveRankDecreasePercent", wireType) } - m.DappInactiveRankDecreasePercent = 0 + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowNetworkProperties @@ -3300,11 +3291,26 @@ func (m *NetworkProperties) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.DappInactiveRankDecreasePercent |= uint64(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthNetworkProperties + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthNetworkProperties + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.DappInactiveRankDecreasePercent.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex case 57: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field DappPoolSlippageDefault", wireType) @@ -3431,10 +3437,10 @@ func (m *NetworkProperties) Unmarshal(dAtA []byte) error { } } case 62: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field BridgeAddress", wireType) + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field DowntimeInactiveDuration", wireType) } - var stringLen uint64 + m.DowntimeInactiveDuration = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowNetworkProperties @@ -3444,61 +3450,14 @@ func (m *NetworkProperties) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + m.DowntimeInactiveDuration |= uint64(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthNetworkProperties - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthNetworkProperties - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.BridgeAddress = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex case 63: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field BridgeCosmosEthereumExchangeRate", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowNetworkProperties - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthNetworkProperties - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthNetworkProperties - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.BridgeCosmosEthereumExchangeRate.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 64: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field BridgeEthereumCosmosExchangeRate", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field BridgeAddress", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -3526,9 +3485,7 @@ func (m *NetworkProperties) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.BridgeEthereumCosmosExchangeRate.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } + m.BridgeAddress = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex diff --git a/x/gov/types/permission.go b/x/gov/types/permission.go index 66522de48..1bc368097 100644 --- a/x/gov/types/permission.go +++ b/x/gov/types/permission.go @@ -38,12 +38,6 @@ var PermMetadata = []PermInfo{ Module: "gov", Description: "the permission that an actor must have in order to vote a proposal to whitelist account permission", }, - { - Id: int32(PermUpsertTokenAlias), - Name: "PERMISSION_UPSERT_TOKEN_ALIAS", - Module: "tokens", - Description: "the permission to upsert token alias", - }, { Id: int32(PermChangeTxFee), Name: "PERMISSION_CHANGE_TX_FEE", @@ -51,7 +45,7 @@ var PermMetadata = []PermInfo{ Description: "Permission to change tx fee", }, { - Id: int32(PermUpsertTokenRate), + Id: int32(PermUpsertTokenInfo), Name: "PERMISSION_UPSERT_TOKEN_RATE", Module: "tokens", Description: "Permission to upsert token rate", @@ -86,18 +80,6 @@ var PermMetadata = []PermInfo{ Module: "gov", Description: "the permission that an actor must have in order to vote a proposal to set network property.", }, - { - Id: int32(PermCreateUpsertTokenAliasProposal), - Name: "PERMISSION_CREATE_UPSERT_TOKEN_ALIAS_PROPOSAL", - Module: "tokens", - Description: "the permission needed to create proposals for upsert token Alias.", - }, - { - Id: int32(PermVoteUpsertTokenAliasProposal), - Name: "PERMISSION_VOTE_UPSERT_TOKEN_ALIAS_PROPOSAL", - Module: "tokens", - Description: "the permission needed to vote proposals for upsert token.", - }, { Id: int32(PermCreateSetPoorNetworkMessagesProposal), Name: "PERMISSION_CREATE_SET_POOR_NETWORK_MESSAGES", @@ -111,13 +93,13 @@ var PermMetadata = []PermInfo{ Description: "the permission needed to vote proposals to set poor network messages.", }, { - Id: int32(PermCreateUpsertTokenRateProposal), + Id: int32(PermCreateUpsertTokenInfoProposal), Name: "PERMISSION_CREATE_UPSERT_TOKEN_RATE_PROPOSAL", Module: "tokens", Description: "the permission needed to create proposals for upsert token rate.", }, { - Id: int32(PermVoteUpsertTokenRateProposal), + Id: int32(PermVoteUpsertTokenInfoProposal), Name: "PERMISSION_VOTE_UPSERT_TOKEN_RATE_PROPOSAL", Module: "tokens", Description: "the permission needed to vote proposals for upsert token rate.", @@ -398,4 +380,28 @@ var PermMetadata = []PermInfo{ Module: "gov", Description: "the permission needed to vote on jail councilors proposal", }, + { + Id: int32(PermCreatePollProposal), + Name: "PERMISSION_CREATE_POLL_PROPOSAL", + Module: "gov", + Description: "the permission needed to create a poll proposal", + }, + { + Id: int32(PermCreateDappProposalWithoutBond), + Name: "PERMISSION_CREATE_DAPP_PROPOSAL_WITHOUT_BOND", + Module: "gov", + Description: "the permission needed to create a dapp proposal without bond", + }, + { + Id: int32(PermCreateSetExecutionFeesProposal), + Name: "PERMISSION_CREATE_SET_EXECUTION_FEES_PROPOSAL", + Module: "gov", + Description: "the permission needed to create a proposal to set execution fees", + }, + { + Id: int32(PermVoteSetExecutionFeesProposal), + Name: "PERMISSION_VOTE_SET_EXECUTION_FEES_PROPOSAL", + Module: "gov", + Description: "the permission needed to vote on set execution fees proposal", + }, } diff --git a/x/gov/types/permission.pb.go b/x/gov/types/permission.pb.go index 6aa26529c..4b8a63113 100644 --- a/x/gov/types/permission.pb.go +++ b/x/gov/types/permission.pb.go @@ -37,12 +37,10 @@ const ( // PERMISSION_VOTE_WHITELIST_ACCOUNT_PERMISSION_PROPOSAL defines the permission that an actor must have in order to vote a // Proposal to whitelist account permission. PermVoteWhitelistAccountPermissionProposal PermValue = 5 - // PERMISSION_UPSERT_TOKEN_ALIAS - PermUpsertTokenAlias PermValue = 6 // PERMISSION_CHANGE_TX_FEE PermChangeTxFee PermValue = 7 // PERMISSION_UPSERT_TOKEN_RATE - PermUpsertTokenRate PermValue = 8 + PermUpsertTokenInfo PermValue = 8 // PERMISSION_UPSERT_ROLE makes possible to add, modify and assign roles. PermUpsertRole PermValue = 9 // PERMISSION_CREATE_UPSERT_DATA_REGISTRY_PROPOSAL makes possible to create a proposal to change the Data Registry. @@ -54,18 +52,14 @@ const ( // PERMISSION_VOTE_SET_NETWORK_PROPERTY_PROPOSAL defines the permission that an actor must have in order to vote a // Proposal to set network property. PermVoteSetNetworkPropertyProposal PermValue = 13 - // PERMISSION_CREATE_UPSERT_TOKEN_ALIAS_PROPOSAL defines the permission needed to create proposals for upsert token Alias. - PermCreateUpsertTokenAliasProposal PermValue = 14 - // PERMISSION_VOTE_UPSERT_TOKEN_ALIAS_PROPOSAL defines the permission needed to vote proposals for upsert token. - PermVoteUpsertTokenAliasProposal PermValue = 15 // PERMISSION_CREATE_SET_POOR_NETWORK_MESSAGES defines the permission needed to create proposals for setting poor network messages PermCreateSetPoorNetworkMessagesProposal PermValue = 16 // PERMISSION_VOTE_SET_POOR_NETWORK_MESSAGES_PROPOSAL defines the permission needed to vote proposals to set poor network messages PermVoteSetPoorNetworkMessagesProposal PermValue = 17 // PERMISSION_CREATE_UPSERT_TOKEN_RATE_PROPOSAL defines the permission needed to create proposals for upsert token rate. - PermCreateUpsertTokenRateProposal PermValue = 18 + PermCreateUpsertTokenInfoProposal PermValue = 18 // PERMISSION_VOTE_UPSERT_TOKEN_RATE_PROPOSAL defines the permission needed to vote proposals for upsert token rate. - PermVoteUpsertTokenRateProposal PermValue = 19 + PermVoteUpsertTokenInfoProposal PermValue = 19 // PERMISSION_CREATE_UNJAIL_VALIDATOR_PROPOSAL defines the permission needed to create a proposal to unjail a validator. PermCreateUnjailValidatorProposal PermValue = 20 // PERMISSION_VOTE_UNJAIL_VALIDATOR_PROPOSAL defines the permission needed to vote a proposal to unjail a validator. @@ -172,6 +166,10 @@ const ( PermCreatePollProposal PermValue = 66 // PERMISSION_CREATE_DAPP_PROPOSAL_WITHOUT_BOND defines the permission needed to create a dapp proposal without bond PermCreateDappProposalWithoutBond PermValue = 67 + // PERMISSION_CREATE_SET_EXECUTION_FEES_PROPOSAL defines the permission needed to create a proposal to set execution fees + PermCreateSetExecutionFeesProposal PermValue = 68 + // PERMISSION_VOTE_SET_EXECUTION_FEES_PROPOSAL defines the permission needed to vote on set execution fees proposal + PermVoteSetExecutionFeesProposal PermValue = 69 ) var PermValue_name = map[int32]string{ @@ -181,7 +179,6 @@ var PermValue_name = map[int32]string{ 3: "PERMISSION_CLAIM_COUNCILOR", 4: "PERMISSION_WHITELIST_ACCOUNT_PERMISSION_PROPOSAL", 5: "PERMISSION_VOTE_WHITELIST_ACCOUNT_PERMISSION_PROPOSAL", - 6: "PERMISSION_UPSERT_TOKEN_ALIAS", 7: "PERMISSION_CHANGE_TX_FEE", 8: "PERMISSION_UPSERT_TOKEN_RATE", 9: "PERMISSION_UPSERT_ROLE", @@ -189,8 +186,6 @@ var PermValue_name = map[int32]string{ 11: "PERMISSION_VOTE_UPSERT_DATA_REGISTRY_PROPOSAL", 12: "PERMISSION_CREATE_SET_NETWORK_PROPERTY_PROPOSAL", 13: "PERMISSION_VOTE_SET_NETWORK_PROPERTY_PROPOSAL", - 14: "PERMISSION_CREATE_UPSERT_TOKEN_ALIAS_PROPOSAL", - 15: "PERMISSION_VOTE_UPSERT_TOKEN_ALIAS_PROPOSAL", 16: "PERMISSION_CREATE_SET_POOR_NETWORK_MESSAGES", 17: "PERMISSION_VOTE_SET_POOR_NETWORK_MESSAGES_PROPOSAL", 18: "PERMISSION_CREATE_UPSERT_TOKEN_RATE_PROPOSAL", @@ -243,6 +238,8 @@ var PermValue_name = map[int32]string{ 65: "PERMISSION_VOTE_JAIL_COUNCILOR_PROPOSAL", 66: "PERMISSION_CREATE_POLL_PROPOSAL", 67: "PERMISSION_CREATE_DAPP_PROPOSAL_WITHOUT_BOND", + 68: "PERMISSION_CREATE_SET_EXECUTION_FEES_PROPOSAL", + 69: "PERMISSION_VOTE_SET_EXECUTION_FEES_PROPOSAL", } var PermValue_value = map[string]int32{ @@ -252,7 +249,6 @@ var PermValue_value = map[string]int32{ "PERMISSION_CLAIM_COUNCILOR": 3, "PERMISSION_WHITELIST_ACCOUNT_PERMISSION_PROPOSAL": 4, "PERMISSION_VOTE_WHITELIST_ACCOUNT_PERMISSION_PROPOSAL": 5, - "PERMISSION_UPSERT_TOKEN_ALIAS": 6, "PERMISSION_CHANGE_TX_FEE": 7, "PERMISSION_UPSERT_TOKEN_RATE": 8, "PERMISSION_UPSERT_ROLE": 9, @@ -260,8 +256,6 @@ var PermValue_value = map[string]int32{ "PERMISSION_VOTE_UPSERT_DATA_REGISTRY_PROPOSAL": 11, "PERMISSION_CREATE_SET_NETWORK_PROPERTY_PROPOSAL": 12, "PERMISSION_VOTE_SET_NETWORK_PROPERTY_PROPOSAL": 13, - "PERMISSION_CREATE_UPSERT_TOKEN_ALIAS_PROPOSAL": 14, - "PERMISSION_VOTE_UPSERT_TOKEN_ALIAS_PROPOSAL": 15, "PERMISSION_CREATE_SET_POOR_NETWORK_MESSAGES": 16, "PERMISSION_VOTE_SET_POOR_NETWORK_MESSAGES_PROPOSAL": 17, "PERMISSION_CREATE_UPSERT_TOKEN_RATE_PROPOSAL": 18, @@ -314,6 +308,8 @@ var PermValue_value = map[string]int32{ "PERMISSION_VOTE_JAIL_COUNCILOR_PROPOSAL": 65, "PERMISSION_CREATE_POLL_PROPOSAL": 66, "PERMISSION_CREATE_DAPP_PROPOSAL_WITHOUT_BOND": 67, + "PERMISSION_CREATE_SET_EXECUTION_FEES_PROPOSAL": 68, + "PERMISSION_VOTE_SET_EXECUTION_FEES_PROPOSAL": 69, } func (x PermValue) String() string { @@ -332,107 +328,107 @@ func init() { proto.RegisterFile("kira/gov/permission.proto", fileDescriptor_214 var fileDescriptor_214168f8815c1062 = []byte{ // 1647 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x98, 0xcd, 0x76, 0xd3, 0x46, - 0x14, 0xc7, 0x93, 0x96, 0x52, 0x98, 0x52, 0x50, 0x0d, 0x0d, 0x61, 0x20, 0xce, 0xe4, 0xfb, 0x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+ 0xa1, 0x54, 0x69, 0x1e, 0x08, 0xe5, 0x52, 0x5e, 0x50, 0x44, 0x29, 0xf1, 0x2f, 0xb6, 0x2e, 0xd7, + 0x55, 0x35, 0xc7, 0x1c, 0xed, 0x48, 0x35, 0xa9, 0x1e, 0xba, 0x2e, 0x27, 0xd6, 0xab, 0xb9, 0x52, + 0x59, 0x94, 0x12, 0xff, 0x0e, 0xac, 0xcb, 0xd1, 0xd3, 0x5e, 0x4b, 0xeb, 0x52, 0x3d, 0xf9, 0x03, + 0xb8, 0xeb, 0x5b, 0xd7, 0x28, 0x96, 0x14, 0x5c, 0x2e, 0xc9, 0x4a, 0x53, 0xc8, 0x39, 0xab, 0xfd, + 0x56, 0x37, 0x6b, 0x92, 0x58, 0x13, 0x65, 0xa1, 0x9c, 0x38, 0x07, 0x37, 0x2d, 0x1b, 0xad, 0x3a, + 0xb4, 0xc6, 0xb1, 0x66, 0x92, 0xae, 0x66, 0x98, 0x42, 0xab, 0x45, 0x4f, 0x7b, 0x3e, 0x57, 0x6a, + 0x3a, 0xed, 0x53, 0x43, 0xed, 0x26, 0x35, 0xf0, 0xc0, 0x07, 0x39, 0x10, 0x15, 0x1c, 0x53, 0xe6, + 0x3f, 0x30, 0x6d, 0xd9, 0x68, 0xd3, 0x0d, 0x3b, 0x35, 0x49, 0x0c, 0xa9, 0x7b, 0xe0, 0x9a, 0x3f, + 0x08, 0x45, 0xa1, 0xba, 0x87, 0x9b, 0xca, 0xb3, 0x66, 0x01, 0xe3, 0xc4, 0xff, 0xe0, 0x65, 0xcb, + 0x46, 0x97, 0xdc, 0x10, 0x1c, 0xab, 0xbd, 0x36, 0x51, 0xde, 0x16, 0x08, 0x49, 0x3e, 0x04, 0x37, + 0x7d, 0x4b, 0xea, 0x35, 0x19, 0x4b, 0x4a, 0x53, 0x11, 0xf7, 0x71, 0xb5, 0x29, 0x09, 0x0a, 0x4e, + 0x9c, 0x87, 0x57, 0x2d, 0x1b, 0x5d, 0x76, 0x96, 0xd5, 0xfb, 0x06, 0xd1, 0x4d, 0x85, 0x76, 0x48, + 0xaf, 0xd4, 0x7b, 0x45, 0x93, 0x69, 0x30, 0x37, 0xbe, 0x54, 0x12, 0xcb, 0x38, 0x71, 0x01, 0x26, + 0x2d, 0x1b, 0x7d, 0xca, 0x16, 0x49, 0xb4, 0x4b, 0x92, 0x2f, 0x40, 0xc6, 0x6f, 0x9d, 0x84, 0x05, + 0x05, 0x8f, 0x96, 0xe5, 0x05, 0x45, 0x68, 0x4a, 0x78, 0xaf, 0x24, 0x2b, 0xd2, 0x73, 0x16, 0x02, + 0x00, 0xd7, 0x2d, 0x1b, 0x2d, 0xbb, 0x46, 0xeb, 0x44, 0x35, 0xc9, 0x00, 0x97, 0x57, 0x4d, 0x55, + 0x22, 0x6d, 0xcd, 0x30, 0xf5, 0x77, 0x9e, 0xf3, 0xcf, 0xc1, 0x9d, 0x60, 0x9c, 0x27, 0xc3, 0xff, + 0x0f, 0x57, 0x2d, 0x1b, 0x2d, 0x8e, 0xe2, 0x3b, 0x01, 0x1d, 0x6a, 0xb9, 0x93, 0xd3, 0x55, 0xac, + 0x34, 0x44, 0x69, 0xdf, 0x65, 0x62, 0x49, 0xf1, 0xc1, 0x2f, 0x06, 0x2d, 0x97, 0x89, 0x59, 0x25, + 0xe6, 0x1b, 0xaa, 0x77, 0x1c, 0x2c, 0xd1, 0xcd, 0x89, 0x96, 0x4f, 0x86, 0x7f, 0xc2, 0x5b, 0x3e, + 0x01, 0xfd, 0x02, 0x6c, 0x85, 0x5b, 0x5e, 0x13, 0x45, 0xc9, 0x53, 0xa8, 0x60, 0x59, 0x16, 0xf6, + 0xb0, 0x9c, 0x48, 0xc0, 0xdb, 0x96, 0x8d, 0xd6, 0x39, 0xab, 0x6b, 0x94, 0xea, 0x43, 0x7c, 0x85, + 0x18, 0x86, 0xda, 0x26, 0x86, 0x87, 0x7f, 0x09, 0xb6, 0xc3, 0x2c, 0x0f, 0x85, 0x33, 0xf3, 0x3f, + 0x63, 0xf5, 0x33, 0x34, 0x7f, 0x92, 0x46, 0x03, 0xdc, 0x8e, 0x4c, 0x1b, 0x96, 0xa8, 0x8c, 0x9e, + 0x84, 0x2b, 0x96, 0x8d, 0x16, 0x82, 0x39, 0xe3, 0xe5, 0xad, 0x07, 0x96, 0xc1, 0x66, 0x44, 0xc2, + 0x84, 0x61, 0x2f, 0xc3, 0x25, 0xcb, 0x46, 0xf3, 0x7c, 0xb6, 0x8c, 0x43, 0x0f, 0xc2, 0x02, 0x5e, + 0xaf, 0x3e, 0x15, 0x4a, 0x65, 0x76, 0x8e, 0x31, 0xea, 0x95, 0x31, 0x63, 0x7b, 0x3f, 0xaa, 0x5a, + 0xd7, 0x3b, 0xd7, 0x3c, 0xae, 0x04, 0x36, 0xc6, 0x8c, 0x8d, 0xa4, 0x7e, 0x1e, 0xb0, 0x35, 0x82, + 0x59, 0x00, 0xab, 0xe3, 0xb6, 0x0e, 0x7f, 0x38, 0x75, 0xcc, 0x80, 0x73, 0x10, 0x5a, 0x36, 0x9a, + 0x63, 0x66, 0x3a, 0x05, 0xed, 0x71, 0x8a, 0x60, 0x39, 0x68, 0x5b, 0x28, 0xe5, 0x2a, 0x4c, 0x59, + 0x36, 0x82, 0x23, 0xb3, 0x42, 0x48, 0xaf, 0xc0, 0xfd, 0x71, 0x8b, 0xdc, 0xdd, 0x90, 0x07, 0x87, + 0x66, 0x33, 0x5b, 0x16, 0x72, 0xfb, 0xa3, 0xa3, 0xcd, 0x23, 0x5f, 0x0b, 0xe6, 0xad, 0xbb, 0x31, + 0x86, 0x7b, 0x64, 0x66, 0xbb, 0x6a, 0xab, 0x33, 0x38, 0xf2, 0x26, 0xe5, 0x6d, 0x0c, 0x95, 0xeb, + 0x7c, 0xde, 0x4e, 0xd1, 0x38, 0xe6, 0xce, 0xfd, 0x51, 0x40, 0xb0, 0x53, 0x1f, 0x8d, 0xa2, 0x13, + 0x17, 0xb6, 0x71, 0x92, 0x50, 0xdd, 0x67, 0x32, 0x10,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+ 0x62, 0x5d, 0x69, 0x66, 0xc5, 0x6a, 0x3e, 0x91, 0x0b, 0x8e, 0x81, 0x79, 0xb5, 0xdf, 0x1f, 0xd1, + 0x1a, 0x9a, 0x79, 0x4c, 0x4f, 0xcd, 0x2c, 0xed, 0x1d, 0x05, 0x1e, 0xc1, 0x7c, 0x33, 0x16, 0x7e, + 0x86, 0x73, 0x75, 0x77, 0xf8, 0x29, 0x60, 0xff, 0x2b, 0x52, 0x9e, 0x3d, 0x82, 0x79, 0x03, 0x16, + 0x7e, 0x4b, 0x5a, 0xa7, 0xce, 0xf0, 0x53, 0x20, 0xbe, 0x17, 0xa4, 0x3a, 0x37, 0xb9, 0x7a, 0xd3, + 0x55, 0x14, 0x18, 0xb3, 0xf2, 0x1e, 0x8e, 0x56, 0xa1, 0x58, 0x78, 0xee, 0x97, 0xdf, 0x53, 0x33, + 0xd9, 0x27, 0x7f, 0x7c, 0x48, 0xcd, 0xbe, 0xff, 0x90, 0x9a, 0xfd, 0xeb, 0x43, 0x6a, 0xf6, 0xd7, + 0x8f, 0xa9, 0x99, 0xf7, 0x1f, 0x53, 0x33, 0x7f, 0x7e, 0x4c, 0xcd, 0x1c, 0xae, 0xb4, 0x35, 0xf3, + 0xf8, 0xf4, 0x65, 0xba, 0x45, 0x4f, 0x32, 0xfb, 0x9a, 0xae, 0xe6, 0xa8, 0x4e, 0x32, 0x06, 0xe9, + 0xa8, 0x5a, 0xe6, 0xad, 0xfb, 0x0a, 0x6f, 0xbe, 0xeb, 0x13, 0xe3, 0xe5, 0x7f, 0xdd, 0x17, 0xf6, + 0x9d, 0xbf, 0x03, 0x00, 0x00, 0xff, 0xff, 0xe5, 0x90, 0x74, 0x83, 0x9e, 0x17, 0x00, 0x00, } diff --git a/x/gov/types/poll_vote.go b/x/gov/types/poll_vote.go index a51d43ba7..b3ca049d2 100644 --- a/x/gov/types/poll_vote.go +++ b/x/gov/types/poll_vote.go @@ -1,10 +1,6 @@ package types -import ( - "github.com/cosmos/cosmos-sdk/types" - "math/big" - "strconv" -) +import sdk "github.com/cosmos/cosmos-sdk/types" type PollVotes []PollVote @@ -49,14 +45,8 @@ func (c CalculatedPollVotes) VetoVotes() uint64 { func (c CalculatedPollVotes) ProcessResult(properties *NetworkProperties) PollResult { if c.actorsWithVeto != 0 { - resString := strconv.FormatFloat(float64(c.votes[PollOptionNoWithVeto.String()])/float64(c.actorsWithVeto)*100, 'f', -1, 64) + percentageActorsWithVeto := sdk.NewDec(int64(c.votes[PollOptionNoWithVeto.String()])).Quo(sdk.NewDec(int64(c.actorsWithVeto))) - resBig, success := new(big.Int).SetString(resString, 10) - if !success { - return PollUnknown - } - - percentageActorsWithVeto := types.NewDecFromBigIntWithPrec(resBig, 0) if properties.VetoThreshold.LTE(percentageActorsWithVeto) { return PollRejectedWithVeto } diff --git a/x/gov/types/proposal.go b/x/gov/types/proposal.go index a25ddacc8..4bc40a44f 100644 --- a/x/gov/types/proposal.go +++ b/x/gov/types/proposal.go @@ -4,6 +4,7 @@ import ( "fmt" "time" + errorsmod "cosmossdk.io/errors" kiratypes "github.com/KiraCore/sekai/types" codectypes "github.com/cosmos/cosmos-sdk/codec/types" "github.com/cosmos/cosmos-sdk/types" @@ -25,7 +26,7 @@ func NewProposal( ) (Proposal, error) { msg, ok := content.(proto.Message) if !ok { - return Proposal{}, sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, fmt.Sprintf("%T does not implement proto.Message", content)) + return Proposal{}, errorsmod.Wrap(sdkerrors.ErrInvalidRequest, fmt.Sprintf("%T does not implement proto.Message", content)) } any, err := codectypes.NewAnyWithValue(msg) @@ -644,3 +645,28 @@ func (m *ProposalJailCouncilor) VotePermission() PermValue { func (m *ProposalJailCouncilor) ValidateBasic() error { return nil } + +func NewSetExecutionFeesProposal(proposer sdk.AccAddress, description string, executionFees []ExecutionFee) *ProposalSetExecutionFees { + return &ProposalSetExecutionFees{ + Proposer: proposer, + Description: description, + ExecutionFees: executionFees, + } +} + +func (m *ProposalSetExecutionFees) ProposalType() string { + return kiratypes.ProposalTypeSetExecutionFees +} + +func (m *ProposalSetExecutionFees) ProposalPermission() PermValue { + return PermCreateSetExecutionFeesProposal +} + +func (m *ProposalSetExecutionFees) VotePermission() PermValue { + return PermVoteSetExecutionFeesProposal +} + +// ValidateBasic returns basic validation +func (m *ProposalSetExecutionFees) ValidateBasic() error { + return nil +} diff --git a/x/gov/types/proposal.pb.go b/x/gov/types/proposal.pb.go index cfb1d457e..f259c38be 100644 --- a/x/gov/types/proposal.pb.go +++ b/x/gov/types/proposal.pb.go @@ -1263,6 +1263,66 @@ func (m *ProposalJailCouncilor) GetCouncilors() []string { return nil } +type ProposalSetExecutionFees struct { + Proposer github_com_cosmos_cosmos_sdk_types.AccAddress `protobuf:"bytes,1,opt,name=proposer,proto3,casttype=github.com/cosmos/cosmos-sdk/types.AccAddress" json:"proposer,omitempty"` + Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` + ExecutionFees []ExecutionFee `protobuf:"bytes,3,rep,name=execution_fees,json=executionFees,proto3" json:"execution_fees"` +} + +func (m *ProposalSetExecutionFees) Reset() { *m = ProposalSetExecutionFees{} } +func (m *ProposalSetExecutionFees) String() string { return proto.CompactTextString(m) } +func (*ProposalSetExecutionFees) ProtoMessage() {} +func (*ProposalSetExecutionFees) Descriptor() ([]byte, []int) { + return fileDescriptor_e108f9b9b2d46b19, []int{21} +} +func (m *ProposalSetExecutionFees) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ProposalSetExecutionFees) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ProposalSetExecutionFees.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *ProposalSetExecutionFees) XXX_Merge(src proto.Message) { + xxx_messageInfo_ProposalSetExecutionFees.Merge(m, src) +} +func (m *ProposalSetExecutionFees) XXX_Size() int { + return m.Size() +} +func (m *ProposalSetExecutionFees) XXX_DiscardUnknown() { + xxx_messageInfo_ProposalSetExecutionFees.DiscardUnknown(m) +} + +var xxx_messageInfo_ProposalSetExecutionFees proto.InternalMessageInfo + +func (m *ProposalSetExecutionFees) GetProposer() github_com_cosmos_cosmos_sdk_types.AccAddress { + if m != nil { + return m.Proposer + } + return nil +} + +func (m *ProposalSetExecutionFees) GetDescription() string { + if m != nil { + return m.Description + } + return "" +} + +func (m *ProposalSetExecutionFees) GetExecutionFees() []ExecutionFee { + if m != nil { + return m.ExecutionFees + } + return nil +} + func init() { proto.RegisterEnum("kira.gov.VoteOption", VoteOption_name, VoteOption_value) proto.RegisterEnum("kira.gov.VoteResult", VoteResult_name, VoteResult_value) @@ -1287,113 +1347,117 @@ func init() { proto.RegisterType((*SetProposalDurationsProposal)(nil), "kira.gov.SetProposalDurationsProposal") proto.RegisterType((*ProposalResetWholeCouncilorRank)(nil), "kira.gov.ProposalResetWholeCouncilorRank") proto.RegisterType((*ProposalJailCouncilor)(nil), "kira.gov.ProposalJailCouncilor") + proto.RegisterType((*ProposalSetExecutionFees)(nil), "kira.gov.ProposalSetExecutionFees") } func init() { proto.RegisterFile("kira/gov/proposal.proto", fileDescriptor_e108f9b9b2d46b19) } var fileDescriptor_e108f9b9b2d46b19 = []byte{ - // 1612 bytes of a gzipped FileDescriptorProto + // 1662 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xdc, 0x58, 0xcd, 0x6f, 0x1b, 0xc7, - 0x15, 0xd7, 0x8a, 0xd4, 0x07, 0x1f, 0x6d, 0x69, 0x33, 0x56, 0x6c, 0x7a, 0x93, 0x92, 0x1b, 0xa2, - 0x49, 0x14, 0xc3, 0xa6, 0x50, 0xe5, 0x52, 0xb8, 0x29, 0x5a, 0x7e, 0xac, 0x63, 0x26, 0x16, 0xc9, - 0x2c, 0x29, 0xa9, 0x69, 0x51, 0x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0x03, 0xeb, 0xc9, 0x3a, 0x40, 0x63, 0xe4, 0xc7, 0x62, 0x58, 0xcc, 0xea, 0xe1, - 0xf7, 0x22, 0xc7, 0x77, 0xa0, 0xd8, 0xc5, 0xbc, 0x43, 0xa9, 0x1f, 0x25, 0xb8, 0x87, 0x19, 0x33, - 0xfb, 0x98, 0x25, 0x34, 0x15, 0x58, 0x77, 0x23, 0x59, 0x41, 0x52, 0x33, 0x41, 0x88, 0x78, 0x5d, - 0xfe, 0xe9, 0x32, 0xa0, 0xba, 0x8f, 0x4d, 0x8e, 0xc3, 0xaa, 0xb8, 0x44, 0x2d, 0xbc, 0x05, 0x72, - 0xa8, 0x4a, 0x0f, 0xcb, 0x22, 0xdd, 0xb0, 0xcd, 0x1a, 0xa9, 0x81, 0xf9, 0x01, 0xdc, 0x78, 0x38, - 0xef, 0x01, 0x63, 0x5e, 0x1b, 0xac, 0x90, 0x51, 0x33, 0xcf, 0xaa, 0xa1, 0xeb, 0x29, 0x9f, 0x79, - 0x99, 0xb2, 0x00, 0xed, 0x68, 0x5e, 0xc4, 0x67, 0xd0, 0xb2, 0xff, 0x01, 0x2d, 0xe5, 0x93, 0x42, - 0x5b, 0xdc, 0xc7, 0xef, 0x02, 0x12, 0x9d, 0x72, 0xc9, 0x8d, 0x58, 0x44, 0x78, 0x04, 0xaf, 0x06, - 0x27, 0x11, 0xb9, 0x36, 0xc6, 0xbe, 0x19, 0xec, 0xc2, 0xfc, 0x1c, 0xde, 0x02, 0x39, 0xb8, 0x96, - 0xe9, 0xb1, 0x11, 0x3f, 0x46, 0xe2, 0xf3, 0xd8, 0x14, 0xf2, 0xd8, 0x92, 0xa1, 0x3b, 0x80, 0x92, - 0x37, 0x8c, 0x1d, 0x03, 0x15, 0x96, 0xd5, 0xcc, 0x76, 0x56, 0x7f, 0x69, 0x74, 0x3e, 0x42, 0xf9, - 0x67, 0x12, 0x94, 0x62, 0x67, 0x1d, 0x33, 0xcc, 0x0f, 0x07, 0xd4, 0xc1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, 0xf3, 0xe4, 0x96, 0x82, 0x00, 0xda, 0x5c, 0x80, + 0x4e, 0xd4, 0x59, 0x95, 0xbc, 0xd8, 0x8a, 0xcf, 0x4e, 0x0b, 0xe8, 0xc4, 0x76, 0x87, 0xf7, 0x8a, + 0x09, 0xe7, 0xe2, 0xe3, 0xbf, 0x14, 0x14, 0x13, 0xa4, 0x44, 0x38, 0xa0, 0x23, 0x58, 0x3f, 0xa6, + 0x9c, 0x78, 0x3d, 0x0b, 0x7b, 0x5d, 0x09, 0xb0, 0xfc, 0xb9, 0x00, 0xc5, 0x10, 0xe0, 0xba, 0x04, + 0x38, 0x17, 0x40, 0x82, 0x5c, 0x95, 0x52, 0xc3, 0xeb, 0x06, 0x38, 0x14, 0x10, 0xf6, 0x6c, 0x87, + 0xbb, 0xd8, 0xe3, 0x33, 0xa8, 0x95, 0xcf, 0x85, 0x7a, 0x23, 0x84, 0xba, 0x29, 0xa1, 0xe6, 0x63, + 0x48, 0x34, 0x35, 0x56, 0x44, 0x80, 0xef, 0xc2, 0x6b, 0x2e, 0xf1, 0xac, 0x04, 0xb7, 0xc3, 0x21, + 0x75, 0x06, 0x56, 0x1f, 0x93, 0x5e, 0x9f, 0xe7, 0x56, 0x75, 0x65, 0x33, 0x65, 0xde, 0x70, 0x89, + 0xb7, 0x1f, 0xf1, 0xac, 0x08, 0xfd, 0xfd, 0x40, 0x8d, 0x2a, 0x90, 0x17, 0xde, 0x67, 0xe1, 0xce, + 0x04, 0xc8, 0x04, 0x01, 0x34, 0x97, 0x78, 0x46, 0x02, 0x3a, 0x19, 0xe3, 0x0e, 0x2c, 0xfb, 0x98, + 0x8d, 0x87, 0x3c, 0x07, 0x17, 0x95, 0xb3, 0x19, 0xe8, 0xcc, 0xd0, 0x46, 0xd4, 0x9e, 0xb8, 0x9b, + 0xac, 0xd0, 0x25, 0x1b, 0x14, 0x11, 0x08, 0x91, 0x34, 0xbc, 0x97, 0xfe, 0xf8, 0x93, 0xc2, 0x42, + 0xf1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8d, 0x8e, 0xba, + 0x2c, 0x4f, 0x31, 0x7e, 0xec, 0xa2, 0x6f, 0xc3, 0xeb, 0xf3, 0x1b, 0x21, 0xa9, 0x1b, 0xdf, 0x33, + 0xaa, 0xd6, 0x4e, 0xb9, 0xfe, 0x40, 0x5d, 0xd1, 0xae, 0x4f, 0xa6, 0x3a, 0x92, 0xfb, 0x22, 0xd8, + 0x8b, 0xf2, 0xdb, 0xb1, 0xc9, 0x50, 0x1e, 0x41, 0xe5, 0x3b, 0x9f, 0x3e, 0xcd, 0x2b, 0x4f, 0x9e, + 0xe6, 0x95, 0xbf, 0x3e, 0xcd, 0x2b, 0x8f, 0x9f, 0xe5, 0x17, 0x9e, 0x3c, 0xcb, 0x2f, 0xfc, 0xe9, + 0x59, 0x7e, 0xe1, 0xfb, 0x6f, 0x24, 0xba, 0xe4, 0x03, 0xe2, 0xdb, 0x55, 0xea, 0xe3, 0x2d, 0x86, + 0x07, 0x36, 0xd9, 0x7a, 0x14, 0x7c, 0xab, 0x0b, 0x1a, 0xe5, 0x70, 0x39, 0xf8, 0x66, 0xf0, 0xce, + 0xbf, 0x03, 0x00, 0x00, 0xff, 0xff, 0xca, 0x76, 0x2b, 0xbc, 0xa2, 0x14, 0x00, 0x00, } func (this *WhitelistAccountPermissionProposal) Equal(that interface{}) bool { @@ -2712,6 +2776,57 @@ func (m *ProposalJailCouncilor) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } +func (m *ProposalSetExecutionFees) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ProposalSetExecutionFees) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ProposalSetExecutionFees) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.ExecutionFees) > 0 { + for iNdEx := len(m.ExecutionFees) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.ExecutionFees[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintProposal(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + } + if len(m.Description) > 0 { + i -= len(m.Description) + copy(dAtA[i:], m.Description) + i = encodeVarintProposal(dAtA, i, uint64(len(m.Description))) + i-- + dAtA[i] = 0x12 + } + if len(m.Proposer) > 0 { + i -= len(m.Proposer) + copy(dAtA[i:], m.Proposer) + i = encodeVarintProposal(dAtA, i, uint64(len(m.Proposer))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + func encodeVarintProposal(dAtA []byte, offset int, v uint64) int { offset -= sovProposal(v) base := offset @@ -3133,6 +3248,29 @@ func (m *ProposalJailCouncilor) Size() (n int) { return n } +func (m *ProposalSetExecutionFees) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Proposer) + if l > 0 { + n += 1 + l + sovProposal(uint64(l)) + } + l = len(m.Description) + if l > 0 { + n += 1 + l + sovProposal(uint64(l)) + } + if len(m.ExecutionFees) > 0 { + for _, e := range m.ExecutionFees { + l = e.Size() + n += 1 + l + sovProposal(uint64(l)) + } + } + return n +} + func sovProposal(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } @@ -5993,6 +6131,156 @@ func (m *ProposalJailCouncilor) Unmarshal(dAtA []byte) error { } return nil } +func (m *ProposalSetExecutionFees) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ProposalSetExecutionFees: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ProposalSetExecutionFees: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Proposer", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthProposal + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthProposal + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Proposer = append(m.Proposer[:0], dAtA[iNdEx:postIndex]...) + if m.Proposer == nil { + m.Proposer = []byte{} + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Description", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthProposal + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthProposal + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Description = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ExecutionFees", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthProposal + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthProposal + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ExecutionFees = append(m.ExecutionFees, ExecutionFee{}) + if err := m.ExecutionFees[len(m.ExecutionFees)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipProposal(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthProposal + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func skipProposal(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 diff --git a/x/gov/types/quorum.go b/x/gov/types/quorum.go index 30a9a54df..1fd1949e6 100644 --- a/x/gov/types/quorum.go +++ b/x/gov/types/quorum.go @@ -2,18 +2,19 @@ package types import ( "fmt" - "math" + + sdk "github.com/cosmos/cosmos-sdk/types" ) -func IsQuorum(percentage, votes, totalVoters uint64) (bool, error) { +func IsQuorum(percentage sdk.Dec, votes, totalVoters uint64) (bool, error) { if votes > totalVoters { return false, fmt.Errorf("there is more votes than voters: %d > %d", votes, totalVoters) } - if percentage > 100 { - return false, fmt.Errorf("quorum cannot be bigger than 100: %d", percentage) + if percentage.GT(sdk.OneDec()) { + return false, fmt.Errorf("quorum cannot be bigger than 1.00: %d", percentage) } - necessaryApproval := uint64(math.Ceil(float64(totalVoters*percentage) / 100.0)) - return votes >= necessaryApproval, nil + necessaryApproval := sdk.NewDec(int64(totalVoters)).Mul(percentage) + return sdk.NewDec(int64(votes)).GTE(necessaryApproval), nil } diff --git a/x/gov/types/quorum_test.go b/x/gov/types/quorum_test.go index 1a7d381a4..8a818d91f 100644 --- a/x/gov/types/quorum_test.go +++ b/x/gov/types/quorum_test.go @@ -4,6 +4,7 @@ import ( "fmt" "testing" + sdk "github.com/cosmos/cosmos-sdk/types" "github.com/stretchr/testify/require" ) @@ -25,14 +26,14 @@ func TestIsQuorum_Errors(t *testing.T) { percentage: 101, votes: 7, voters: 10, - expectedErr: fmt.Errorf("quorum cannot be bigger than 100: 101"), + expectedErr: fmt.Errorf("quorum cannot be bigger than 1.00: 1.010000000000000000"), }, } for _, tt := range tests { tt := tt t.Run(tt.name, func(t *testing.T) { - _, err := IsQuorum(tt.percentage, tt.votes, tt.voters) + _, err := IsQuorum(sdk.NewDecWithPrec(int64(tt.percentage), 2), tt.votes, tt.voters) require.EqualError(t, err, tt.expectedErr.Error()) }) } @@ -63,7 +64,7 @@ func TestIsQuorum(t *testing.T) { for _, tt := range tests { tt := tt t.Run(tt.name, func(t *testing.T) { - quorum, err := IsQuorum(tt.percentage, tt.votes, tt.voters) + quorum, err := IsQuorum(sdk.NewDecWithPrec(int64(tt.percentage), 2), tt.votes, tt.voters) require.NoError(t, err) require.Equal(t, tt.reached, quorum) }) diff --git a/x/gov/types/router.go b/x/gov/types/router.go index 1e87c70f8..ae84f7c1f 100644 --- a/x/gov/types/router.go +++ b/x/gov/types/router.go @@ -45,7 +45,7 @@ func (r ProposalRouter) AllowedAddressesDynamicProposal(ctx sdk.Context, proposa return dh.AllowedAddresses(ctx, proposal) } -func (r ProposalRouter) QuorumDynamicProposal(ctx sdk.Context, proposal Content) uint64 { +func (r ProposalRouter) QuorumDynamicProposal(ctx sdk.Context, proposal Content) sdk.Dec { h, ok := r.routes[proposal.ProposalType()] if !ok { panic("invalid proposal type") @@ -53,7 +53,7 @@ func (r ProposalRouter) QuorumDynamicProposal(ctx sdk.Context, proposal Content) dh, ok := h.(DynamicVoterProposalHandler) if !ok { - return 0 + return sdk.ZeroDec() } return dh.Quorum(ctx, proposal) } @@ -108,7 +108,7 @@ type ProposalHandler interface { type DynamicVoterProposalHandler interface { ProposalType() string IsAllowedAddress(ctx sdk.Context, addr sdk.AccAddress, proposal Content) bool - Quorum(ctx sdk.Context, proposal Content) uint64 + Quorum(ctx sdk.Context, proposal Content) sdk.Dec VotePeriod(ctx sdk.Context, proposal Content) uint64 VoteEnactment(ctx sdk.Context, proposal Content) uint64 AllowedAddresses(ctx sdk.Context, proposal Content) []string diff --git a/x/layer2/client/cli/query.go b/x/layer2/client/cli/query.go index 2011d12eb..b3e231811 100644 --- a/x/layer2/client/cli/query.go +++ b/x/layer2/client/cli/query.go @@ -21,7 +21,6 @@ func NewQueryCmd() *cobra.Command { GetCmdQueryExecutionRegistrar(), GetCmdQueryAllDapps(), GetCmdQueryTransferDapp(), - GetCmdQueryGlobalTokens(), ) return queryCmd @@ -97,26 +96,3 @@ func GetCmdQueryTransferDapp() *cobra.Command { return cmd } - -func GetCmdQueryGlobalTokens() *cobra.Command { - cmd := &cobra.Command{ - Use: "global-tokens", - Short: "Queries global tokens", - Args: cobra.MinimumNArgs(0), - RunE: func(cmd *cobra.Command, args []string) error { - clientCtx := client.GetClientContextFromCmd(cmd) - - queryClient := types.NewQueryClient(clientCtx) - res, err := queryClient.GlobalTokens(context.Background(), &types.QueryGlobalTokensRequest{}) - if err != nil { - return err - } - - return clientCtx.PrintProto(res) - }, - } - - flags.AddQueryFlagsToCmd(cmd) - - return cmd -} diff --git a/x/layer2/client/cli/tx.go b/x/layer2/client/cli/tx.go index fb91cb3c7..0f5671441 100644 --- a/x/layer2/client/cli/tx.go +++ b/x/layer2/client/cli/tx.go @@ -15,31 +15,32 @@ import ( ) const ( - FlagTitle = "title" - FlagDescription = "description" - FlagDappName = "dapp-name" - FlagDappDescription = "dapp-description" - FlagDenom = "denom" - FlagWebsite = "website" - FlagLogo = "logo" - FlagSocial = "social" - FlagDocs = "docs" - FlagControllerRoles = "controller-roles" - FlagControllerAccounts = "controller-accounts" - FlagBinaryInfo = "binary-info" - FlagLpPoolConfig = "lp-pool-config" - FlagIssuranceConfig = "issurance-config" - FlagUpdateTimeMax = "update-time-max" - FlagExecutorsMin = "executors-min" - FlagExecutorsMax = "executors-max" - FlagVerifiersMin = "verifiers-min" - FlagDappStatus = "dapp-status" - FlagBond = "bond" - FlagVoteQuorum = "vote-quorum" - FlagVotePeriod = "vote-period" - FlagVoteEnactment = "vote-enactment" - FlagAddr = "addr" - FlagAmount = "amount" + FlagTitle = "title" + FlagDescription = "description" + FlagDappName = "dapp-name" + FlagDappDescription = "dapp-description" + FlagDenom = "denom" + FlagWebsite = "website" + FlagLogo = "logo" + FlagSocial = "social" + FlagDocs = "docs" + FlagControllerRoles = "controller-roles" + FlagControllerAccounts = "controller-accounts" + FlagBinaryInfo = "binary-info" + FlagLpPoolConfig = "lp-pool-config" + FlagIssuanceConfig = "issuance-config" + FlagUpdateTimeMax = "update-time-max" + FlagExecutorsMin = "executors-min" + FlagExecutorsMax = "executors-max" + FlagVerifiersMin = "verifiers-min" + FlagDappStatus = "dapp-status" + FlagBond = "bond" + FlagVoteQuorum = "vote-quorum" + FlagVotePeriod = "vote-period" + FlagVoteEnactment = "vote-enactment" + FlagAddr = "addr" + FlagAmount = "amount" + FlagEnableBondVerifiers = "enable_bond_verifiers" ) // NewTxCmd returns a root CLI command handler for all x/bank transaction commands. @@ -157,14 +158,14 @@ func GetTxCreateDappProposalCmd() *cobra.Command { return fmt.Errorf("invalid controller role/accounts: %w", err) } - issuranceStr, err := cmd.Flags().GetString(FlagIssuranceConfig) + issuanceStr, err := cmd.Flags().GetString(FlagIssuanceConfig) if err != nil { - return fmt.Errorf("invalid issurance config: %w", err) + return fmt.Errorf("invalid issuance config: %w", err) } - issurance := types.IssuranceConfig{} - err = clientCtx.Codec.UnmarshalJSON([]byte(issuranceStr), &issurance) + issuance := types.IssuanceConfig{} + err = clientCtx.Codec.UnmarshalJSON([]byte(issuanceStr), &issuance) if err != nil { - return fmt.Errorf("invalid issurance config: %w", err) + return fmt.Errorf("invalid issuance config: %w", err) } lpPoolConfigStr, err := cmd.Flags().GetString(FlagLpPoolConfig) @@ -208,6 +209,10 @@ func GetTxCreateDappProposalCmd() *cobra.Command { if err != nil { return fmt.Errorf("invalid verifiersMin: %w", err) } + enableBondVerifiers, err := cmd.Flags().GetBool(FlagEnableBondVerifiers) + if err != nil { + return fmt.Errorf("invalid enable bond verifiers: %w", err) + } msg := &types.MsgCreateDappProposal{ Sender: clientCtx.GetFromAddress().String(), @@ -226,17 +231,18 @@ func GetTxCreateDappProposalCmd() *cobra.Command { Addresses: ctrlAccounts, }, }, - Bin: []types.BinaryInfo{binaryInfo}, - Pool: lpPoolConfig, - Issurance: issurance, - UpdateTimeMax: updateMaxTime, - ExecutorsMin: executorsMin, - ExecutorsMax: executorsMax, - VerifiersMin: verifiersMin, - Status: types.DappStatus(types.SessionStatus_value[statusStr]), - VoteQuorum: voteQuorum, - VotePeriod: votePeriod, - VoteEnactment: voteEnactment, + Bin: []types.BinaryInfo{binaryInfo}, + Pool: lpPoolConfig, + Issuance: issuance, + UpdateTimeMax: updateMaxTime, + ExecutorsMin: executorsMin, + ExecutorsMax: executorsMax, + VerifiersMin: verifiersMin, + Status: types.DappStatus(types.SessionStatus_value[statusStr]), + VoteQuorum: sdk.NewDecWithPrec(int64(voteQuorum), 2), + VotePeriod: votePeriod, + VoteEnactment: voteEnactment, + EnableBondVerifiers: enableBondVerifiers, }, } @@ -265,7 +271,7 @@ func GetTxCreateDappProposalCmd() *cobra.Command { cmd.Flags().Uint64(FlagVoteEnactment, 0, "vote enactment of the dapp") cmd.Flags().String(FlagControllerRoles, "", "controller roles on the dapp.") cmd.Flags().String(FlagControllerAccounts, "", "controller accounts on the dapp.") - cmd.Flags().String(FlagIssuranceConfig, "{}", "dapp issurance config.") + cmd.Flags().String(FlagIssuanceConfig, "{}", "dapp issuance config.") cmd.Flags().String(FlagLpPoolConfig, "{}", "dapp lp config.") cmd.Flags().String(FlagBinaryInfo, "{}", "dapp binary info.") cmd.Flags().String(FlagDappStatus, "{}", "dapp status.") @@ -273,6 +279,7 @@ func GetTxCreateDappProposalCmd() *cobra.Command { cmd.Flags().Uint64(FlagExecutorsMin, 0, "dapp executors min") cmd.Flags().Uint64(FlagExecutorsMax, 0, "dapp executors max") cmd.Flags().Uint64(FlagVerifiersMin, 0, "dapp verifiers min") + cmd.Flags().Bool(FlagEnableBondVerifiers, true, "enable verifiers with bonding") return cmd } @@ -728,14 +735,14 @@ func GetTxProposalUpsertDappCmd() *cobra.Command { return fmt.Errorf("invalid controller role/accounts: %w", err) } - issuranceStr, err := cmd.Flags().GetString(FlagIssuranceConfig) + issuanceStr, err := cmd.Flags().GetString(FlagIssuanceConfig) if err != nil { - return fmt.Errorf("invalid issurance config: %w", err) + return fmt.Errorf("invalid issuance config: %w", err) } - issurance := types.IssuranceConfig{} - err = clientCtx.Codec.UnmarshalJSON([]byte(issuranceStr), &issurance) + issuance := types.IssuanceConfig{} + err = clientCtx.Codec.UnmarshalJSON([]byte(issuanceStr), &issuance) if err != nil { - return fmt.Errorf("invalid issurance config: %w", err) + return fmt.Errorf("invalid issuance config: %w", err) } lpPoolConfigStr, err := cmd.Flags().GetString(FlagLpPoolConfig) @@ -791,6 +798,10 @@ func GetTxProposalUpsertDappCmd() *cobra.Command { if err != nil { return fmt.Errorf("invalid vote period: %w", err) } + enableBondVerifiers, err := cmd.Flags().GetBool(FlagEnableBondVerifiers) + if err != nil { + return fmt.Errorf("invalid enable bond verifiers: %w", err) + } msg, err := govtypes.NewMsgSubmitProposal( clientCtx.FromAddress, @@ -812,17 +823,18 @@ func GetTxProposalUpsertDappCmd() *cobra.Command { Addresses: ctrlAccounts, }, }, - Bin: []types.BinaryInfo{binaryInfo}, - Pool: lpPoolConfig, - Issurance: issurance, - UpdateTimeMax: updateMaxTime, - ExecutorsMin: executorsMin, - ExecutorsMax: executorsMax, - VerifiersMin: verifiersMin, - Status: types.DappStatus(types.SessionStatus_value[statusStr]), - VoteQuorum: voteQuorum, - VotePeriod: votePeriod, - VoteEnactment: voteEnactment, + Bin: []types.BinaryInfo{binaryInfo}, + Pool: lpPoolConfig, + Issuance: issuance, + UpdateTimeMax: updateMaxTime, + ExecutorsMin: executorsMin, + ExecutorsMax: executorsMax, + VerifiersMin: verifiersMin, + Status: types.DappStatus(types.SessionStatus_value[statusStr]), + VoteQuorum: sdk.NewDecWithPrec(int64(voteQuorum), 2), + VotePeriod: votePeriod, + VoteEnactment: voteEnactment, + EnableBondVerifiers: enableBondVerifiers, }, }, ) @@ -852,7 +864,7 @@ func GetTxProposalUpsertDappCmd() *cobra.Command { cmd.Flags().Uint64(FlagVoteEnactment, 0, "vote enactment of the dapp") cmd.Flags().String(FlagControllerRoles, "", "controller roles on the dapp.") cmd.Flags().String(FlagControllerAccounts, "", "controller accounts on the dapp.") - cmd.Flags().String(FlagIssuranceConfig, "{}", "dapp issurance config.") + cmd.Flags().String(FlagIssuanceConfig, "{}", "dapp issuance config.") cmd.Flags().String(FlagLpPoolConfig, "{}", "dapp lp config.") cmd.Flags().String(FlagBinaryInfo, "{}", "dapp binary info.") cmd.Flags().String(FlagDappStatus, "{}", "dapp status.") @@ -860,6 +872,7 @@ func GetTxProposalUpsertDappCmd() *cobra.Command { cmd.Flags().Uint64(FlagExecutorsMin, 0, "dapp executors min") cmd.Flags().Uint64(FlagExecutorsMax, 0, "dapp executors max") cmd.Flags().Uint64(FlagVerifiersMin, 0, "dapp verifiers min") + cmd.Flags().Bool(FlagEnableBondVerifiers, true, "enable verifiers with bonding") flags.AddTxFlagsToCmd(cmd) _ = cmd.MarkFlagRequired(flags.FlagFrom) @@ -1181,9 +1194,9 @@ func GetTxMintCreateFtTxCmd() *cobra.Command { return fmt.Errorf("invalid supply") } - fee, ok := sdk.NewIntFromString(args[10]) - if !ok { - return fmt.Errorf("invalid fee") + feeRate, err := sdk.NewDecFromStr(args[10]) + if err != nil { + return err } msg := &types.MsgMintCreateFtTx{ @@ -1195,10 +1208,10 @@ func GetTxMintCreateFtTxCmd() *cobra.Command { Description: args[4], Website: args[5], Social: args[6], - Decimals: uint64(decimals), + Decimals: uint32(decimals), Cap: cap, Supply: supply, - Fee: fee, + FeeRate: feeRate, Owner: args[11], } @@ -1244,9 +1257,9 @@ func GetTxMintCreateNftTxCmd() *cobra.Command { return fmt.Errorf("invalid supply") } - fee, ok := sdk.NewIntFromString(args[10]) - if !ok { - return fmt.Errorf("invalid fee") + feeRate, err := sdk.NewDecFromStr(args[10]) + if err != nil { + return err } msg := &types.MsgMintCreateNftTx{ @@ -1258,10 +1271,10 @@ func GetTxMintCreateNftTxCmd() *cobra.Command { Description: args[4], Website: args[5], Social: args[6], - Decimals: uint64(decimals), + Decimals: uint32(decimals), Cap: cap, Supply: supply, - Fee: fee, + FeeRate: feeRate, Owner: args[11], Metadata: args[12], Hash: args[13], diff --git a/x/layer2/keeper/abci.go b/x/layer2/keeper/abci.go index 1a93287e3..7bb672699 100644 --- a/x/layer2/keeper/abci.go +++ b/x/layer2/keeper/abci.go @@ -22,11 +22,11 @@ func (k Keeper) EndBlocker(ctx sdk.Context) { } if dapp.PremintTime+dapp.Pool.Drip < uint64(ctx.BlockTime().Unix()) && - dapp.Issurance.Postmint.IsPositive() && + dapp.Issuance.Postmint.IsPositive() && dapp.Status == types.Active { teamReserve := sdk.MustAccAddressFromBech32(dapp.TeamReserve) dappBondLpToken := dapp.LpToken() - premintCoin := sdk.NewCoin(dappBondLpToken, dapp.Issurance.Premint) + premintCoin := sdk.NewCoin(dappBondLpToken, dapp.Issuance.Premint) err := k.bk.SendCoinsFromModuleToAccount(ctx, types.ModuleName, teamReserve, sdk.Coins{premintCoin}) if err != nil { panic(err) @@ -127,7 +127,7 @@ func (k Keeper) FinishDappBootstrap(ctx sdk.Context, dapp types.Dapp) { drip = 1 } rate := sdk.NewDecFromInt(spendingPoolDeposit).Quo(sdk.NewDec(int64(drip))) - err = k.bk.MintCoins(ctx, types.ModuleName, sdk.Coins{sdk.NewCoin(dappBondLpToken, totalSupply)}) + err = k.tk.MintCoins(ctx, types.ModuleName, sdk.Coins{sdk.NewCoin(dappBondLpToken, totalSupply)}) if err != nil { panic(err) } @@ -187,9 +187,9 @@ func (k Keeper) FinishDappBootstrap(ctx sdk.Context, dapp types.Dapp) { } // send premint amount to team reserve - if dapp.Issurance.Premint.IsPositive() { + if dapp.Issuance.Premint.IsPositive() { teamReserve := sdk.MustAccAddressFromBech32(dapp.TeamReserve) - premintCoin := sdk.NewCoin(dappBondLpToken, dapp.Issurance.Premint) + premintCoin := sdk.NewCoin(dappBondLpToken, dapp.Issuance.Premint) err = k.bk.SendCoinsFromModuleToAccount(ctx, types.ModuleName, teamReserve, sdk.Coins{premintCoin}) if err != nil { panic(err) diff --git a/x/layer2/keeper/dapp_test.go b/x/layer2/keeper/dapp_test.go index da47fe736..ec98d642f 100644 --- a/x/layer2/keeper/dapp_test.go +++ b/x/layer2/keeper/dapp_test.go @@ -36,13 +36,13 @@ func (suite *KeeperTestSuite) TestDappSetGetDelete() { Deposit: "", Drip: 86400, }, - Issurance: types.IssuranceConfig{ + Issuance: types.IssuanceConfig{ Deposit: "", Premint: sdk.OneInt(), Postmint: sdk.OneInt(), Time: 1680141605, }, - VoteQuorum: 30, + VoteQuorum: sdk.NewDecWithPrec(30, 2), VotePeriod: 86400, VoteEnactment: 3000, UpdateTimeMax: 60, @@ -82,13 +82,13 @@ func (suite *KeeperTestSuite) TestDappSetGetDelete() { Deposit: "", Drip: 86400, }, - Issurance: types.IssuranceConfig{ + Issuance: types.IssuanceConfig{ Deposit: "", Premint: sdk.OneInt(), Postmint: sdk.OneInt(), Time: 1680141605, }, - VoteQuorum: 30, + VoteQuorum: sdk.NewDecWithPrec(30, 2), VotePeriod: 86400, VoteEnactment: 3000, UpdateTimeMax: 60, diff --git a/x/layer2/keeper/grpc_query.go b/x/layer2/keeper/grpc_query.go index d9258839c..8cbf6d948 100644 --- a/x/layer2/keeper/grpc_query.go +++ b/x/layer2/keeper/grpc_query.go @@ -34,11 +34,3 @@ func (k Keeper) TransferDapps(goCtx context.Context, request *types.QueryTransfe XAMs: k.GetXAMs(ctx), }, nil } - -func (k Keeper) GlobalTokens(goCtx context.Context, request *types.QueryGlobalTokensRequest) (*types.QueryGlobalTokensResponse, error) { - ctx := sdk.UnwrapSDKContext(goCtx) - - return &types.QueryGlobalTokensResponse{ - Tokens: k.GetTokenInfos(ctx), - }, nil -} diff --git a/x/layer2/keeper/keeper.go b/x/layer2/keeper/keeper.go index 935541102..e4fc315e8 100644 --- a/x/layer2/keeper/keeper.go +++ b/x/layer2/keeper/keeper.go @@ -17,9 +17,16 @@ type Keeper struct { sk types.StakingKeeper gk govkeeper.Keeper spk types.SpendingKeeper + tk types.TokensKeeper } -func NewKeeper(storeKey storetypes.StoreKey, cdc codec.BinaryCodec, bk types.BankKeeper, sk types.StakingKeeper, gk govkeeper.Keeper, spk types.SpendingKeeper) Keeper { +func NewKeeper(storeKey storetypes.StoreKey, cdc codec.BinaryCodec, + bk types.BankKeeper, + sk types.StakingKeeper, + gk govkeeper.Keeper, + spk types.SpendingKeeper, + tk types.TokensKeeper, +) Keeper { return Keeper{ cdc: cdc, storeKey: storeKey, @@ -27,6 +34,7 @@ func NewKeeper(storeKey storetypes.StoreKey, cdc codec.BinaryCodec, bk types.Ban sk: sk, gk: gk, spk: spk, + tk: tk, } } diff --git a/x/layer2/keeper/lp_swap_redeem_convert.go b/x/layer2/keeper/lp_swap_redeem_convert.go index 01d94fa96..a54560266 100644 --- a/x/layer2/keeper/lp_swap_redeem_convert.go +++ b/x/layer2/keeper/lp_swap_redeem_convert.go @@ -22,7 +22,7 @@ func (k Keeper) OnCollectFee(ctx sdk.Context, fee sdk.Coins) error { // - `25%` will be split between **ACTIVE** dApp executors, and verifiers (fisherman). // Additionally, the premint and postmint tokens can be used to incentivize operators before // dApp starts to generate revenue. - err := k.bk.BurnCoins(ctx, types.ModuleName, fee) + err := k.tk.BurnCoins(ctx, types.ModuleName, fee) if err != nil { return err } diff --git a/x/layer2/keeper/lp_swap_redeem_convert_test.go b/x/layer2/keeper/lp_swap_redeem_convert_test.go index 96796ed6e..708994593 100644 --- a/x/layer2/keeper/lp_swap_redeem_convert_test.go +++ b/x/layer2/keeper/lp_swap_redeem_convert_test.go @@ -38,13 +38,13 @@ func (suite *KeeperTestSuite) TestLpTokenPrice() { Deposit: "", Drip: 86400, }, - Issurance: types.IssuranceConfig{ + Issuance: types.IssuanceConfig{ Deposit: "", Premint: sdk.OneInt(), Postmint: sdk.OneInt(), Time: 1680141605, }, - VoteQuorum: 30, + VoteQuorum: sdk.NewDecWithPrec(30, 2), VotePeriod: 86400, VoteEnactment: 3000, UpdateTimeMax: 60, @@ -112,13 +112,13 @@ func (suite *KeeperTestSuite) TestRedeemDappPoolTx() { Deposit: "", Drip: 86400, }, - Issurance: types.IssuranceConfig{ + Issuance: types.IssuanceConfig{ Deposit: "", Premint: sdk.OneInt(), Postmint: sdk.OneInt(), Time: 1680141605, }, - VoteQuorum: 30, + VoteQuorum: sdk.NewDecWithPrec(30, 2), VotePeriod: 86400, VoteEnactment: 3000, UpdateTimeMax: 60, @@ -134,14 +134,14 @@ func (suite *KeeperTestSuite) TestRedeemDappPoolTx() { lpToken := dapp.LpToken() lpCoins := sdk.Coins{sdk.NewInt64Coin(lpToken, 10000)} - err := suite.app.BankKeeper.MintCoins(suite.ctx, minttypes.ModuleName, lpCoins) + err := suite.app.TokensKeeper.MintCoins(suite.ctx, minttypes.ModuleName, lpCoins) suite.Require().NoError(err) addr := sdk.AccAddress(ed25519.GenPrivKey().PubKey().Address().Bytes()) err = suite.app.BankKeeper.SendCoinsFromModuleToAccount(suite.ctx, minttypes.ModuleName, addr, lpCoins) suite.Require().NoError(err) - err = suite.app.BankKeeper.MintCoins(suite.ctx, types.ModuleName, sdk.Coins{dapp.TotalBond}) + err = suite.app.TokensKeeper.MintCoins(suite.ctx, types.ModuleName, sdk.Coins{dapp.TotalBond}) suite.Require().NoError(err) price := suite.app.Layer2Keeper.LpTokenPrice(suite.ctx, dapp) @@ -187,13 +187,13 @@ func (suite *KeeperTestSuite) TestConvertDappPoolTx() { Deposit: "", Drip: 86400, }, - Issurance: types.IssuranceConfig{ + Issuance: types.IssuanceConfig{ Deposit: "", Premint: sdk.OneInt(), Postmint: sdk.OneInt(), Time: 1680141605, }, - VoteQuorum: 30, + VoteQuorum: sdk.NewDecWithPrec(30, 2), VotePeriod: 86400, VoteEnactment: 3000, UpdateTimeMax: 60, @@ -233,13 +233,13 @@ func (suite *KeeperTestSuite) TestConvertDappPoolTx() { Deposit: "", Drip: 86400, }, - Issurance: types.IssuranceConfig{ + Issuance: types.IssuanceConfig{ Deposit: "", Premint: sdk.OneInt(), Postmint: sdk.OneInt(), Time: 1680141605, }, - VoteQuorum: 30, + VoteQuorum: sdk.NewDecWithPrec(30, 2), VotePeriod: 86400, VoteEnactment: 3000, UpdateTimeMax: 60, @@ -262,17 +262,17 @@ func (suite *KeeperTestSuite) TestConvertDappPoolTx() { lpToken1 := dapp1.LpToken() lpCoins1 := sdk.Coins{sdk.NewInt64Coin(lpToken1, 10000)} - err := suite.app.BankKeeper.MintCoins(suite.ctx, minttypes.ModuleName, lpCoins1) + err := suite.app.TokensKeeper.MintCoins(suite.ctx, minttypes.ModuleName, lpCoins1) suite.Require().NoError(err) err = suite.app.BankKeeper.SendCoinsFromModuleToAccount(suite.ctx, minttypes.ModuleName, addr, lpCoins1) suite.Require().NoError(err) lpToken2 := dapp2.LpToken() lpCoins2 := sdk.Coins{sdk.NewInt64Coin(lpToken2, 10000)} - err = suite.app.BankKeeper.MintCoins(suite.ctx, types.ModuleName, lpCoins2) + err = suite.app.TokensKeeper.MintCoins(suite.ctx, types.ModuleName, lpCoins2) suite.Require().NoError(err) - err = suite.app.BankKeeper.MintCoins(suite.ctx, types.ModuleName, sdk.Coins{dapp1.TotalBond}) + err = suite.app.TokensKeeper.MintCoins(suite.ctx, types.ModuleName, sdk.Coins{dapp1.TotalBond}) suite.Require().NoError(err) price := suite.app.Layer2Keeper.LpTokenPrice(suite.ctx, dapp1) diff --git a/x/layer2/keeper/msg_server.go b/x/layer2/keeper/msg_server.go index 036e26a66..16db385c5 100644 --- a/x/layer2/keeper/msg_server.go +++ b/x/layer2/keeper/msg_server.go @@ -5,6 +5,7 @@ import ( govtypes "github.com/KiraCore/sekai/x/gov/types" "github.com/KiraCore/sekai/x/layer2/types" + tokenstypes "github.com/KiraCore/sekai/x/tokens/types" sdk "github.com/cosmos/cosmos-sdk/types" ) @@ -141,6 +142,10 @@ func (k msgServer) JoinDappVerifierWithBond(goCtx context.Context, msg *types.Ms ctx := sdk.UnwrapSDKContext(goCtx) dapp := k.keeper.GetDapp(ctx, msg.DappName) + if !dapp.EnableBondVerifiers { + return nil, types.ErrDappNotAllowsBondVerifiers + } + operator := k.keeper.GetDappOperator(ctx, msg.DappName, msg.Sender) if operator.DappName != "" && operator.Verifier { return nil, types.ErrAlreadyADappVerifier @@ -688,19 +693,19 @@ func (k msgServer) MintCreateFtTx(goCtx context.Context, msg *types.MsgMintCreat return nil, err } - err = k.keeper.bk.BurnCoins(ctx, types.ModuleName, sdk.Coins{fee}) + err = k.keeper.tk.BurnCoins(ctx, types.ModuleName, sdk.Coins{fee}) if err != nil { return nil, err } denom := "ku/" + msg.DenomSuffix - info := k.keeper.GetTokenInfo(ctx, denom) + info := k.keeper.tk.GetTokenInfo(ctx, denom) if info.Denom != "" { return nil, types.ErrTokenAlreadyRegistered } - k.keeper.SetTokenInfo(ctx, types.TokenInfo{ + err = k.keeper.tk.UpsertTokenInfo(ctx, tokenstypes.TokenInfo{ TokenType: "adr20", Denom: denom, Name: msg.Name, @@ -710,14 +715,17 @@ func (k msgServer) MintCreateFtTx(goCtx context.Context, msg *types.MsgMintCreat Website: msg.Website, Social: msg.Social, Decimals: msg.Decimals, - Cap: msg.Cap, + SupplyCap: msg.Cap, Supply: msg.Supply, Holders: msg.Holders, - Fee: msg.Fee, + FeeRate: msg.FeeRate, Owner: msg.Owner, - Metadata: "", - Hash: "", + NftMetadata: "", + NftHash: "", }) + if err != nil { + return nil, err + } return &types.MsgMintCreateFtTxResponse{}, nil } @@ -732,18 +740,18 @@ func (k msgServer) MintCreateNftTx(goCtx context.Context, msg *types.MsgMintCrea return nil, err } - err = k.keeper.bk.BurnCoins(ctx, types.ModuleName, sdk.Coins{fee}) + err = k.keeper.tk.BurnCoins(ctx, types.ModuleName, sdk.Coins{fee}) if err != nil { return nil, err } denom := "ku/" + msg.DenomSuffix - info := k.keeper.GetTokenInfo(ctx, denom) + info := k.keeper.tk.GetTokenInfo(ctx, denom) if info.Denom != "" { return nil, types.ErrTokenAlreadyRegistered } - k.keeper.SetTokenInfo(ctx, types.TokenInfo{ + err = k.keeper.tk.UpsertTokenInfo(ctx, tokenstypes.TokenInfo{ TokenType: "adr43", Denom: denom, Name: msg.Name, @@ -752,15 +760,18 @@ func (k msgServer) MintCreateNftTx(goCtx context.Context, msg *types.MsgMintCrea Description: msg.Description, Website: msg.Website, Social: msg.Social, - Decimals: msg.Decimals, - Cap: msg.Cap, + Decimals: 0, + SupplyCap: msg.Cap, Supply: msg.Supply, Holders: msg.Holders, - Fee: msg.Fee, + FeeRate: msg.FeeRate, Owner: msg.Owner, - Metadata: msg.Metadata, - Hash: msg.Hash, + NftMetadata: msg.Metadata, + NftHash: msg.Hash, }) + if err != nil { + return nil, err + } return &types.MsgMintCreateNftTxResponse{}, nil } @@ -768,13 +779,13 @@ func (k msgServer) MintCreateNftTx(goCtx context.Context, msg *types.MsgMintCrea func (k msgServer) MintIssueTx(goCtx context.Context, msg *types.MsgMintIssueTx) (*types.MsgMintIssueTxResponse, error) { ctx := sdk.UnwrapSDKContext(goCtx) sender := sdk.MustAccAddressFromBech32(msg.Sender) - tokenInfo := k.keeper.GetTokenInfo(ctx, msg.Denom) + tokenInfo := k.keeper.tk.GetTokenInfo(ctx, msg.Denom) if tokenInfo.Denom == "" { return nil, types.ErrTokenNotRegistered } if msg.Sender != tokenInfo.Owner { - fee := msg.Amount.Mul(tokenInfo.Fee).Quo(Pow10(tokenInfo.Decimals)) + fee := tokenInfo.FeeRate.MulInt(msg.Amount).TruncateInt() feeCoins := sdk.Coins{sdk.NewCoin(k.keeper.DefaultDenom(ctx), fee)} if fee.IsPositive() { if tokenInfo.Owner == "" { @@ -795,7 +806,7 @@ func (k msgServer) MintIssueTx(goCtx context.Context, msg *types.MsgMintIssueTx) } mintCoin := sdk.NewCoin(msg.Denom, msg.Amount) - err := k.keeper.bk.MintCoins(ctx, types.ModuleName, sdk.Coins{mintCoin}) + err := k.keeper.tk.MintCoins(ctx, types.ModuleName, sdk.Coins{mintCoin}) if err != nil { return nil, err } @@ -805,19 +816,13 @@ func (k msgServer) MintIssueTx(goCtx context.Context, msg *types.MsgMintIssueTx) return nil, err } - tokenInfo.Supply = tokenInfo.Supply.Add(msg.Amount) - if tokenInfo.Supply.GT(tokenInfo.Cap) { - return nil, types.ErrCannotExceedTokenCap - } - k.keeper.SetTokenInfo(ctx, tokenInfo) - return &types.MsgMintIssueTxResponse{}, nil } func (k msgServer) MintBurnTx(goCtx context.Context, msg *types.MsgMintBurnTx) (*types.MsgMintBurnTxResponse, error) { ctx := sdk.UnwrapSDKContext(goCtx) sender := sdk.MustAccAddressFromBech32(msg.Sender) - tokenInfo := k.keeper.GetTokenInfo(ctx, msg.Denom) + tokenInfo := k.keeper.tk.GetTokenInfo(ctx, msg.Denom) if tokenInfo.Denom == "" { return nil, types.ErrTokenNotRegistered } @@ -828,13 +833,10 @@ func (k msgServer) MintBurnTx(goCtx context.Context, msg *types.MsgMintBurnTx) ( return nil, err } - err = k.keeper.bk.BurnCoins(ctx, types.ModuleName, sdk.Coins{burnCoin}) + err = k.keeper.tk.BurnCoins(ctx, types.ModuleName, sdk.Coins{burnCoin}) if err != nil { return nil, err } - tokenInfo.Supply = tokenInfo.Supply.Sub(msg.Amount) - k.keeper.SetTokenInfo(ctx, tokenInfo) - return &types.MsgMintBurnTxResponse{}, nil } diff --git a/x/layer2/keeper/msg_server_test.go b/x/layer2/keeper/msg_server_test.go index 0d864cd48..6b7542fed 100644 --- a/x/layer2/keeper/msg_server_test.go +++ b/x/layer2/keeper/msg_server_test.go @@ -61,13 +61,13 @@ func (suite *KeeperTestSuite) TestCreateDappProposal() { Deposit: "", Drip: 86400, }, - Issurance: types.IssuranceConfig{ + Issuance: types.IssuanceConfig{ Deposit: "", Premint: sdk.OneInt(), Postmint: sdk.OneInt(), Time: 1680141605, }, - VoteQuorum: 30, + VoteQuorum: sdk.NewDecWithPrec(30, 2), VotePeriod: 86400, VoteEnactment: 3000, UpdateTimeMax: 60, @@ -139,13 +139,13 @@ func (suite *KeeperTestSuite) TestBondDappProposal() { Deposit: "", Drip: 86400, }, - Issurance: types.IssuranceConfig{ + Issuance: types.IssuanceConfig{ Deposit: "", Premint: sdk.OneInt(), Postmint: sdk.OneInt(), Time: 1680141605, }, - VoteQuorum: 30, + VoteQuorum: sdk.NewDecWithPrec(30, 2), VotePeriod: 86400, VoteEnactment: 3000, UpdateTimeMax: 60, @@ -226,13 +226,13 @@ func (suite *KeeperTestSuite) TestReclaimDappBondProposal() { Deposit: "", Drip: 86400, }, - Issurance: types.IssuranceConfig{ + Issuance: types.IssuanceConfig{ Deposit: "", Premint: sdk.OneInt(), Postmint: sdk.OneInt(), Time: 1680141605, }, - VoteQuorum: 30, + VoteQuorum: sdk.NewDecWithPrec(30, 2), VotePeriod: 86400, VoteEnactment: 3000, UpdateTimeMax: 60, diff --git a/x/layer2/keeper/token_mint.go b/x/layer2/keeper/token_mint.go deleted file mode 100644 index 3051fb84d..000000000 --- a/x/layer2/keeper/token_mint.go +++ /dev/null @@ -1,52 +0,0 @@ -package keeper - -import ( - "github.com/KiraCore/sekai/x/layer2/types" - sdk "github.com/cosmos/cosmos-sdk/types" -) - -func Pow10(decimal uint64) sdk.Int { - res := sdk.OneInt() - for i := 0; i < int(decimal); i++ { - res = res.Mul(sdk.NewInt(10)) - } - return res -} - -func (k Keeper) SetTokenInfo(ctx sdk.Context, info types.TokenInfo) { - bz := k.cdc.MustMarshal(&info) - store := ctx.KVStore(k.storeKey) - store.Set(types.TokenInfoKey(info.Denom), bz) -} - -func (k Keeper) DeleteTokenInfo(ctx sdk.Context, denom string) { - store := ctx.KVStore(k.storeKey) - store.Delete(types.TokenInfoKey(denom)) -} - -func (k Keeper) GetTokenInfo(ctx sdk.Context, denom string) types.TokenInfo { - store := ctx.KVStore(k.storeKey) - bz := store.Get(types.TokenInfoKey(denom)) - if bz == nil { - return types.TokenInfo{} - } - - info := types.TokenInfo{} - k.cdc.MustUnmarshal(bz, &info) - return info -} - -func (k Keeper) GetTokenInfos(ctx sdk.Context) []types.TokenInfo { - store := ctx.KVStore(k.storeKey) - - infos := []types.TokenInfo{} - it := sdk.KVStorePrefixIterator(store, types.PrefixTokenInfoKey) - defer it.Close() - - for ; it.Valid(); it.Next() { - info := types.TokenInfo{} - k.cdc.MustUnmarshal(it.Value(), &info) - infos = append(infos, info) - } - return infos -} diff --git a/x/layer2/keeper/token_mint_test.go b/x/layer2/keeper/token_mint_test.go deleted file mode 100644 index c5adccc10..000000000 --- a/x/layer2/keeper/token_mint_test.go +++ /dev/null @@ -1,70 +0,0 @@ -package keeper_test - -import ( - "github.com/KiraCore/sekai/x/layer2/keeper" - "github.com/KiraCore/sekai/x/layer2/types" - sdk "github.com/cosmos/cosmos-sdk/types" -) - -func (suite *KeeperTestSuite) TestTokenInfoSetGetDelete() { - infos := []types.TokenInfo{ - { - TokenType: "adr20", - Denom: "ku/bridgebtc", - Name: "Bridge BTC", - Symbol: "BTC", - Icon: "", - Description: "", - Website: "", - Social: "", - Decimals: 8, - Cap: sdk.NewInt(1000_000_000), - Supply: sdk.ZeroInt(), - Holders: 0, - Fee: sdk.ZeroInt(), - Owner: "kira15ky9du8a2wlstz6fpx3p4mqpjyrm5cgqzp4f3d", - }, - { - TokenType: "adr43", - Denom: "ku/punk", - Name: "Bridge PUNK", - Symbol: "PUNK", - Icon: "", - Description: "", - Website: "", - Social: "", - Decimals: 0, - Cap: sdk.NewInt(1000_000_000), - Supply: sdk.ZeroInt(), - Holders: 0, - Fee: sdk.ZeroInt(), - Owner: "kira15ky9du8a2wlstz6fpx3p4mqpjyrm5cgqzp4f3d", - Hash: "", - Metadata: "", - }, - } - - for _, info := range infos { - suite.app.Layer2Keeper.SetTokenInfo(suite.ctx, info) - } - - for _, info := range infos { - c := suite.app.Layer2Keeper.GetTokenInfo(suite.ctx, info.Denom) - suite.Require().Equal(c, info) - } - - allInfos := suite.app.Layer2Keeper.GetTokenInfos(suite.ctx) - suite.Require().Len(allInfos, 2) - - suite.app.Layer2Keeper.DeleteTokenInfo(suite.ctx, infos[0].Denom) - - allInfos = suite.app.Layer2Keeper.GetTokenInfos(suite.ctx) - suite.Require().Len(allInfos, 1) -} - -func (suite *KeeperTestSuite) TestPow10() { - suite.Require().Equal(keeper.Pow10(0), sdk.NewInt(1)) - suite.Require().Equal(keeper.Pow10(1), sdk.NewInt(10)) - suite.Require().Equal(keeper.Pow10(2), sdk.NewInt(100)) - suite.Require().Equal(keeper.Pow10(3), sdk.NewInt(1000)) -} diff --git a/x/layer2/proposal_handler.go b/x/layer2/proposal_handler.go index 4ce0f5550..388752670 100644 --- a/x/layer2/proposal_handler.go +++ b/x/layer2/proposal_handler.go @@ -43,12 +43,12 @@ func (a ApplyJoinDappProposalHandler) AllowedAddresses(ctx sdk.Context, proposal return a.keeper.AllowedAddresses(ctx, dapp.Controllers) } -func (a ApplyJoinDappProposalHandler) Quorum(ctx sdk.Context, proposal govtypes.Content) uint64 { +func (a ApplyJoinDappProposalHandler) Quorum(ctx sdk.Context, proposal govtypes.Content) sdk.Dec { p := proposal.(*types.ProposalJoinDapp) dapp := a.keeper.GetDapp(ctx, p.DappName) if dapp.Name == "" { - return 0 + return sdk.ZeroDec() } return dapp.VoteQuorum @@ -118,12 +118,12 @@ func (a ApplyUpsertDappProposalHandler) AllowedAddresses(ctx sdk.Context, propos return a.keeper.AllowedAddresses(ctx, dapp.Controllers) } -func (a ApplyUpsertDappProposalHandler) Quorum(ctx sdk.Context, proposal govtypes.Content) uint64 { +func (a ApplyUpsertDappProposalHandler) Quorum(ctx sdk.Context, proposal govtypes.Content) sdk.Dec { p := proposal.(*types.ProposalUpsertDapp) dapp := a.keeper.GetDapp(ctx, p.Dapp.Name) if dapp.Name == "" { - return 0 + return sdk.ZeroDec() } return dapp.VoteQuorum @@ -169,7 +169,7 @@ func (a ApplyUpsertDappProposalHandler) Apply(ctx sdk.Context, proposalID uint64 dapp.Controllers = p.Dapp.Controllers dapp.Bin = p.Dapp.Bin dapp.Pool = p.Dapp.Pool - dapp.Issurance = p.Dapp.Issurance + dapp.Issuance = p.Dapp.Issuance dapp.UpdateTimeMax = p.Dapp.UpdateTimeMax dapp.ExecutorsMin = p.Dapp.ExecutorsMin dapp.ExecutorsMax = p.Dapp.ExecutorsMax @@ -180,6 +180,10 @@ func (a ApplyUpsertDappProposalHandler) Apply(ctx sdk.Context, proposalID uint64 dapp.VoteQuorum = p.Dapp.VoteQuorum dapp.VotePeriod = p.Dapp.VotePeriod dapp.VoteEnactment = p.Dapp.VoteEnactment + if dapp.EnableBondVerifiers && !p.Dapp.EnableBondVerifiers { + return types.ErrCanNotDisableBondedVerifiers + } + dapp.EnableBondVerifiers = p.Dapp.EnableBondVerifiers a.keeper.SetDapp(ctx, p.Dapp) return nil diff --git a/x/layer2/types/errors.go b/x/layer2/types/errors.go index 60dd25d05..6af32f8c5 100644 --- a/x/layer2/types/errors.go +++ b/x/layer2/types/errors.go @@ -34,7 +34,6 @@ var ( ErrInvalidLpToken = errors.Register(ModuleName, 26, "invalid lp token") ErrOperationExceedsSlippage = errors.Register(ModuleName, 27, "operation exceeds slippage") ErrTokenNotRegistered = errors.Register(ModuleName, 28, "token not registered") - ErrCannotExceedTokenCap = errors.Register(ModuleName, 29, "cannot exceed token cap") ErrTokenAlreadyRegistered = errors.Register(ModuleName, 30, "token already registered") ErrNotAbleToMintCoinsWithoutFee = errors.Register(ModuleName, 31, "not able to mint coins without fee") ErrInvalidBridgeDepositMessage = errors.Register(ModuleName, 32, "invalid bridge deposit message") @@ -42,4 +41,6 @@ var ( ErrNegativeBridgeBalance = errors.Register(ModuleName, 34, "negative bridge balance") ErrInvalidBridgeSourceAccount = errors.Register(ModuleName, 35, "invalid bridge source account") ErrInvalidDappVersion = errors.Register(ModuleName, 36, "invalid dapp version") + ErrDappNotAllowsBondVerifiers = errors.Register(ModuleName, 37, "dapp does not allow bond verifiers") + ErrCanNotDisableBondedVerifiers = errors.Register(ModuleName, 38, "cannot disable bond verifiers once enabled") ) diff --git a/x/layer2/types/expected_keepers.go b/x/layer2/types/expected_keepers.go index bfba900d8..2878a66f3 100644 --- a/x/layer2/types/expected_keepers.go +++ b/x/layer2/types/expected_keepers.go @@ -4,6 +4,7 @@ import ( govtypes "github.com/KiraCore/sekai/x/gov/types" spendingtypes "github.com/KiraCore/sekai/x/spending/types" stakingtypes "github.com/KiraCore/sekai/x/staking/types" + tokenstypes "github.com/KiraCore/sekai/x/tokens/types" sdk "github.com/cosmos/cosmos-sdk/types" ) @@ -29,3 +30,11 @@ type SpendingKeeper interface { CreateSpendingPool(ctx sdk.Context, pool spendingtypes.SpendingPool) error DepositSpendingPoolFromModule(ctx sdk.Context, moduleName, poolName string, amount sdk.Coins) error } + +// TokensKeeper defines expected interface needed from tokens keeper +type TokensKeeper interface { + MintCoins(ctx sdk.Context, moduleName string, amt sdk.Coins) error + BurnCoins(ctx sdk.Context, moduleName string, amt sdk.Coins) error + GetTokenInfo(ctx sdk.Context, denom string) *tokenstypes.TokenInfo + UpsertTokenInfo(ctx sdk.Context, rate tokenstypes.TokenInfo) error +} diff --git a/x/layer2/types/keys.go b/x/layer2/types/keys.go index 3a59a2876..ed073c9cc 100644 --- a/x/layer2/types/keys.go +++ b/x/layer2/types/keys.go @@ -11,6 +11,8 @@ const ( RouterKey = ModuleName // QuerierRoute is the querier route for the layer2 module QuerierRoute = ModuleName + // StoreKey is the store key string for layer2 module + StoreKey = ModuleName ) // constants diff --git a/x/layer2/types/layer2.go b/x/layer2/types/layer2.go index 22abd610d..2afbe4ca0 100644 --- a/x/layer2/types/layer2.go +++ b/x/layer2/types/layer2.go @@ -15,7 +15,7 @@ func (dapp Dapp) GetSpendingPoolLpDeposit() sdk.Int { func (dapp Dapp) GetLpTokenSupply() sdk.Int { spendingPoolDeposit := dapp.GetSpendingPoolLpDeposit() - totalSupply := spendingPoolDeposit.Add(dapp.Issurance.Postmint).Add(dapp.Issurance.Premint) + totalSupply := spendingPoolDeposit.Add(dapp.Issuance.Postmint).Add(dapp.Issuance.Premint) return totalSupply } diff --git a/x/layer2/types/layer2.pb.go b/x/layer2/types/layer2.pb.go index 7e7bd7793..764835d93 100644 --- a/x/layer2/types/layer2.pb.go +++ b/x/layer2/types/layer2.pb.go @@ -364,25 +364,25 @@ func (m *LpPoolConfig) GetDrip() uint64 { return 0 } -type IssuranceConfig struct { +type IssuanceConfig struct { Deposit string `protobuf:"bytes,1,opt,name=deposit,proto3" json:"deposit,omitempty"` Premint github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,2,opt,name=premint,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"premint"` Postmint github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,3,opt,name=postmint,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"postmint"` Time uint64 `protobuf:"varint,4,opt,name=time,proto3" json:"time,omitempty"` } -func (m *IssuranceConfig) Reset() { *m = IssuranceConfig{} } -func (m *IssuranceConfig) String() string { return proto.CompactTextString(m) } -func (*IssuranceConfig) ProtoMessage() {} -func (*IssuranceConfig) Descriptor() ([]byte, []int) { +func (m *IssuanceConfig) Reset() { *m = IssuanceConfig{} } +func (m *IssuanceConfig) String() string { return proto.CompactTextString(m) } +func (*IssuanceConfig) ProtoMessage() {} +func (*IssuanceConfig) Descriptor() ([]byte, []int) { return fileDescriptor_4070283bbe72a11a, []int{4} } -func (m *IssuranceConfig) XXX_Unmarshal(b []byte) error { +func (m *IssuanceConfig) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *IssuranceConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *IssuanceConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_IssuranceConfig.Marshal(b, m, deterministic) + return xxx_messageInfo_IssuanceConfig.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -392,26 +392,26 @@ func (m *IssuranceConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, err return b[:n], nil } } -func (m *IssuranceConfig) XXX_Merge(src proto.Message) { - xxx_messageInfo_IssuranceConfig.Merge(m, src) +func (m *IssuanceConfig) XXX_Merge(src proto.Message) { + xxx_messageInfo_IssuanceConfig.Merge(m, src) } -func (m *IssuranceConfig) XXX_Size() int { +func (m *IssuanceConfig) XXX_Size() int { return m.Size() } -func (m *IssuranceConfig) XXX_DiscardUnknown() { - xxx_messageInfo_IssuranceConfig.DiscardUnknown(m) +func (m *IssuanceConfig) XXX_DiscardUnknown() { + xxx_messageInfo_IssuanceConfig.DiscardUnknown(m) } -var xxx_messageInfo_IssuranceConfig proto.InternalMessageInfo +var xxx_messageInfo_IssuanceConfig proto.InternalMessageInfo -func (m *IssuranceConfig) GetDeposit() string { +func (m *IssuanceConfig) GetDeposit() string { if m != nil { return m.Deposit } return "" } -func (m *IssuranceConfig) GetTime() uint64 { +func (m *IssuanceConfig) GetTime() uint64 { if m != nil { return m.Time } @@ -419,32 +419,33 @@ func (m *IssuranceConfig) GetTime() uint64 { } type Dapp struct { - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - Denom string `protobuf:"bytes,2,opt,name=denom,proto3" json:"denom,omitempty"` - Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"` - Website string `protobuf:"bytes,4,opt,name=website,proto3" json:"website,omitempty"` - Logo string `protobuf:"bytes,5,opt,name=logo,proto3" json:"logo,omitempty"` - Social string `protobuf:"bytes,6,opt,name=social,proto3" json:"social,omitempty"` - Docs string `protobuf:"bytes,7,opt,name=docs,proto3" json:"docs,omitempty"` - Controllers Controllers `protobuf:"bytes,8,opt,name=controllers,proto3" json:"controllers"` - Bin []BinaryInfo `protobuf:"bytes,9,rep,name=bin,proto3" json:"bin"` - Pool LpPoolConfig `protobuf:"bytes,10,opt,name=pool,proto3" json:"pool"` - Issurance IssuranceConfig `protobuf:"bytes,11,opt,name=issurance,proto3" json:"issurance"` - UpdateTimeMax uint64 `protobuf:"varint,12,opt,name=update_time_max,json=updateTimeMax,proto3" json:"update_time_max,omitempty"` - ExecutorsMin uint64 `protobuf:"varint,13,opt,name=executors_min,json=executorsMin,proto3" json:"executors_min,omitempty"` - ExecutorsMax uint64 `protobuf:"varint,14,opt,name=executors_max,json=executorsMax,proto3" json:"executors_max,omitempty"` - VerifiersMin uint64 `protobuf:"varint,15,opt,name=verifiers_min,json=verifiersMin,proto3" json:"verifiers_min,omitempty"` - TotalBond github_com_cosmos_cosmos_sdk_types.Coin `protobuf:"bytes,16,opt,name=total_bond,json=totalBond,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Coin" json:"total_bond"` - CreationTime uint64 `protobuf:"varint,17,opt,name=creation_time,json=creationTime,proto3" json:"creation_time,omitempty"` - Status DappStatus `protobuf:"varint,18,opt,name=status,proto3,enum=kira.layer2.DappStatus" json:"status,omitempty"` - VoteQuorum uint64 `protobuf:"varint,19,opt,name=vote_quorum,json=voteQuorum,proto3" json:"vote_quorum,omitempty"` - VotePeriod uint64 `protobuf:"varint,20,opt,name=vote_period,json=votePeriod,proto3" json:"vote_period,omitempty"` - VoteEnactment uint64 `protobuf:"varint,21,opt,name=vote_enactment,json=voteEnactment,proto3" json:"vote_enactment,omitempty"` - LiquidationStart uint64 `protobuf:"varint,22,opt,name=liquidation_start,json=liquidationStart,proto3" json:"liquidation_start,omitempty"` - PoolFee github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,23,opt,name=pool_fee,json=poolFee,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"pool_fee"` - TeamReserve string `protobuf:"bytes,24,opt,name=team_reserve,json=teamReserve,proto3" json:"team_reserve,omitempty"` - PremintTime uint64 `protobuf:"varint,25,opt,name=premint_time,json=premintTime,proto3" json:"premint_time,omitempty"` - PostMintPaid bool `protobuf:"varint,26,opt,name=post_mint_paid,json=postMintPaid,proto3" json:"post_mint_paid,omitempty"` + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Denom string `protobuf:"bytes,2,opt,name=denom,proto3" json:"denom,omitempty"` + Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"` + Website string `protobuf:"bytes,4,opt,name=website,proto3" json:"website,omitempty"` + Logo string `protobuf:"bytes,5,opt,name=logo,proto3" json:"logo,omitempty"` + Social string `protobuf:"bytes,6,opt,name=social,proto3" json:"social,omitempty"` + Docs string `protobuf:"bytes,7,opt,name=docs,proto3" json:"docs,omitempty"` + Controllers Controllers `protobuf:"bytes,8,opt,name=controllers,proto3" json:"controllers"` + Bin []BinaryInfo `protobuf:"bytes,9,rep,name=bin,proto3" json:"bin"` + Pool LpPoolConfig `protobuf:"bytes,10,opt,name=pool,proto3" json:"pool"` + Issuance IssuanceConfig `protobuf:"bytes,11,opt,name=issuance,proto3" json:"issuance"` + UpdateTimeMax uint64 `protobuf:"varint,12,opt,name=update_time_max,json=updateTimeMax,proto3" json:"update_time_max,omitempty"` + ExecutorsMin uint64 `protobuf:"varint,13,opt,name=executors_min,json=executorsMin,proto3" json:"executors_min,omitempty"` + ExecutorsMax uint64 `protobuf:"varint,14,opt,name=executors_max,json=executorsMax,proto3" json:"executors_max,omitempty"` + VerifiersMin uint64 `protobuf:"varint,15,opt,name=verifiers_min,json=verifiersMin,proto3" json:"verifiers_min,omitempty"` + TotalBond github_com_cosmos_cosmos_sdk_types.Coin `protobuf:"bytes,16,opt,name=total_bond,json=totalBond,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Coin" json:"total_bond"` + CreationTime uint64 `protobuf:"varint,17,opt,name=creation_time,json=creationTime,proto3" json:"creation_time,omitempty"` + Status DappStatus `protobuf:"varint,18,opt,name=status,proto3,enum=kira.layer2.DappStatus" json:"status,omitempty"` + VoteQuorum github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,19,opt,name=vote_quorum,json=voteQuorum,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"vote_quorum"` + VotePeriod uint64 `protobuf:"varint,20,opt,name=vote_period,json=votePeriod,proto3" json:"vote_period,omitempty"` + VoteEnactment uint64 `protobuf:"varint,21,opt,name=vote_enactment,json=voteEnactment,proto3" json:"vote_enactment,omitempty"` + LiquidationStart uint64 `protobuf:"varint,22,opt,name=liquidation_start,json=liquidationStart,proto3" json:"liquidation_start,omitempty"` + PoolFee github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,23,opt,name=pool_fee,json=poolFee,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"pool_fee"` + TeamReserve string `protobuf:"bytes,24,opt,name=team_reserve,json=teamReserve,proto3" json:"team_reserve,omitempty"` + PremintTime uint64 `protobuf:"varint,25,opt,name=premint_time,json=premintTime,proto3" json:"premint_time,omitempty"` + PostMintPaid bool `protobuf:"varint,26,opt,name=post_mint_paid,json=postMintPaid,proto3" json:"post_mint_paid,omitempty"` + EnableBondVerifiers bool `protobuf:"varint,27,opt,name=enable_bond_verifiers,json=enableBondVerifiers,proto3" json:"enable_bond_verifiers,omitempty"` } func (m *Dapp) Reset() { *m = Dapp{} } @@ -550,11 +551,11 @@ func (m *Dapp) GetPool() LpPoolConfig { return LpPoolConfig{} } -func (m *Dapp) GetIssurance() IssuranceConfig { +func (m *Dapp) GetIssuance() IssuanceConfig { if m != nil { - return m.Issurance + return m.Issuance } - return IssuranceConfig{} + return IssuanceConfig{} } func (m *Dapp) GetUpdateTimeMax() uint64 { @@ -599,13 +600,6 @@ func (m *Dapp) GetStatus() DappStatus { return Bootstrap } -func (m *Dapp) GetVoteQuorum() uint64 { - if m != nil { - return m.VoteQuorum - } - return 0 -} - func (m *Dapp) GetVotePeriod() uint64 { if m != nil { return m.VotePeriod @@ -648,6 +642,13 @@ func (m *Dapp) GetPostMintPaid() bool { return false } +func (m *Dapp) GetEnableBondVerifiers() bool { + if m != nil { + return m.EnableBondVerifiers + } + return false +} + type UserDappBond struct { User string `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"` DappName string `protobuf:"bytes,2,opt,name=dapp_name,json=dappName,proto3" json:"dapp_name,omitempty"` @@ -1643,7 +1644,7 @@ func init() { proto.RegisterType((*Controllers)(nil), "kira.layer2.Controllers") proto.RegisterType((*BinaryInfo)(nil), "kira.layer2.BinaryInfo") proto.RegisterType((*LpPoolConfig)(nil), "kira.layer2.LpPoolConfig") - proto.RegisterType((*IssuranceConfig)(nil), "kira.layer2.IssuranceConfig") + proto.RegisterType((*IssuanceConfig)(nil), "kira.layer2.IssuanceConfig") proto.RegisterType((*Dapp)(nil), "kira.layer2.Dapp") proto.RegisterType((*UserDappBond)(nil), "kira.layer2.UserDappBond") proto.RegisterType((*DappOperator)(nil), "kira.layer2.DappOperator") @@ -1664,144 +1665,145 @@ func init() { func init() { proto.RegisterFile("kira/layer2/layer2.proto", fileDescriptor_4070283bbe72a11a) } var fileDescriptor_4070283bbe72a11a = []byte{ - // 2178 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x58, 0x4b, 0x6f, 0x1b, 0xc9, - 0xf1, 0xd7, 0x88, 0x94, 0x44, 0x35, 0xf5, 0xa0, 0xdb, 0x5a, 0x7b, 0xcc, 0xdd, 0xbf, 0xcc, 0x3f, - 0x93, 0x5d, 0xcb, 0xde, 0x44, 0x0c, 0x6c, 0x20, 0x40, 0x76, 0x37, 0xc8, 0x52, 0x12, 0xbd, 0xa2, - 0x63, 0x3d, 0x32, 0x92, 0x02, 0x21, 0x17, 0xa2, 0x39, 0xd3, 0xa2, 0x1a, 0x9a, 0x99, 0x1e, 0x75, - 0x0f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 0xeb, - 0xc7, 0x88, 0x05, 0x67, 0xdc, 0xc2, 0x36, 0x99, 0x4b, 0x14, 0x8f, 0x44, 0x6c, 0x6d, 0x7f, 0x25, - 0x1f, 0xdb, 0x71, 0xea, 0x65, 0xea, 0xf4, 0x19, 0x29, 0x25, 0x52, 0xa7, 0x68, 0xaa, 0xf0, 0x56, - 0xa6, 0x72, 0x7d, 0x0c, 0xae, 0x88, 0x4c, 0xd4, 0x8b, 0x1e, 0x8e, 0xeb, 0xbf, 0x2d, 0x91, 0xe2, - 0x16, 0x4b, 0x92, 0x1b, 0xcf, 0x75, 0x85, 0xcc, 0x04, 0x3c, 0x96, 0x91, 0x0d, 0x90, 0x11, 0x68, - 0x8d, 0x94, 0x03, 0xae, 0x7d, 0x25, 0x92, 0x54, 0xc8, 0xd8, 0x1e, 0xef, 0x28, 0x04, 0x81, 0x79, - 0xc1, 0xbb, 0x5a, 0xa4, 0xd9, 0x09, 0x67, 0x22, 0xac, 0x12, 0xca, 0x9e, 0xcc, 0xce, 0x17, 0xc6, - 0x26, 0x53, 0x7c, 0xc1, 0x42, 0x77, 0x36, 0xcb, 0x14, 0x90, 0xf0, 0x18, 0xa4, 0xaf, 0xdd, 0x39, - 0xc3, 0x85, 0x31, 0xfd, 0x94, 0x94, 0xfd, 0xe1, 0xc5, 0x70, 0x4b, 0x98, 0xcc, 0xee, 0x58, 0x32, - 0x8f, 0x5c, 0x1c, 0x9b, 0xcb, 0xa3, 0x2a, 0xb4, 0x41, 0x0a, 0x5d, 0x11, 0xbb, 0xf3, 0xb5, 0xc2, - 0x5a, 0xf9, 0xf1, 0xdd, 0x31, 0xcd, 0x61, 0x96, 0x5b, 0x45, 0x60, 0xd2, 0x27, 0xa4, 0x98, 0x48, - 0x19, 0xba, 0xe4, 0x86, 0x8b, 0x33, 0x9a, 0x96, 0x56, 0x07, 0xc9, 0xf4, 0x53, 0x32, 0x2f, 0xb2, - 0x6c, 0x71, 0xcb, 0xa8, 0xf9, 0xde, 0x98, 0xe6, 0x44, 0x2e, 0x65, 0xb7, 0x2e, 0x57, 0xa2, 0x1f, - 0x90, 0xe5, 0x7e, 0x12, 0xb0, 0x94, 0x77, 0xe0, 0x9c, 0x3a, 0x11, 0x1b, 0xb8, 0x0b, 0x78, 0x6e, - 0x8b, 0x06, 0x3e, 0x14, 0x11, 0xdf, 0x61, 0x03, 0xfa, 0x35, 0xb2, 0xc8, 0x07, 0xdc, 0xef, 0xa7, - 0x52, 0xe9, 0x4e, 0x24, 0x62, 0x77, 0x11, 0x59, 0x0b, 0x39, 0xb8, 0x23, 0xe2, 0x09, 0x12, 0x1b, - 0xb8, 0x4b, 0x93, 0x24, 0x63, 0xe9, 0x82, 0x2b, 0x71, 0x22, 0xb8, 0xb5, 0xb4, 0x6c, 0x48, 0x39, - 0x08, 0x96, 0x76, 0x09, 0x49, 0x65, 0xca, 0xc2, 0x4e, 0x57, 0xc6, 0x81, 0x5b, 0xc1, 0x8c, 0x6c, - 0xd8, 0x8c, 0x7c, 0xf0, 0x06, 0x19, 0xb9, 0x29, 0x45, 0xec, 0xcd, 0xa3, 0x89, 0x0d, 0x19, 0x07, - 0xb0, 0xa8, 0xaf, 0x38, 0x5c, 0xc8, 0x18, 0x37, 0xea, 0xde, 0x32, 0x8b, 0x66, 0x20, 0x6c, 0x93, - 0x36, 0xc8, 0xac, 0x4e, 0x59, 0xda, 0xd7, 0x2e, 0xad, 0x39, 0x6b, 0x4b, 0x13, 0xc7, 0x06, 0xe9, - 0x7b, 0x80, 0xd3, 0x9e, 0xa5, 0xd1, 0xfb, 0xa4, 0x7c, 0x21, 0x53, 0xde, 0x39, 0xef, 0x4b, 0xd5, - 0x8f, 0xdc, 0xdb, 0x68, 0x93, 0x00, 0xf4, 0x03, 0x44, 0x72, 0x42, 0xc2, 0x95, 0x90, 0x81, 0xbb, - 0x32, 0x24, 0xec, 0x23, 0x42, 0xdf, 0x27, 0x4b, 0x48, 0xe0, 0x31, 0xf3, 0xd3, 0x88, 0xc7, 0xa9, - 0xfb, 0x8e, 0x89, 0x3e, 0xa0, 0xad, 0x0c, 0xa4, 0x1f, 0x92, 0x5b, 0xa1, 0x38, 0xef, 0x8b, 0xc0, - 0xec, 0x40, 0xa7, 0x4c, 0xa5, 0xee, 0x1d, 0x64, 0x56, 0x46, 0x26, 0x0e, 0x00, 0xa7, 0x6d, 0xb8, - 0xcb, 0x32, 0xec, 0x9c, 0x70, 0xee, 0xde, 0x7d, 0xab, 0xd2, 0x35, 0x07, 0xfa, 0x4f, 0x39, 0xa7, - 0xff, 0x4f, 0x16, 0x52, 0xce, 0xa2, 0x8e, 0xe2, 0x9a, 0xab, 0x0b, 0xee, 0xba, 0xe6, 0x12, 0x02, - 0xe6, 0x19, 0x08, 0x28, 0xb6, 0x88, 0x98, 0xc0, 0xde, 0x43, 0xaf, 0xca, 0x16, 0xc3, 0xb8, 0x7e, - 0x9d, 0x2c, 0x41, 0x71, 0xe8, 0x20, 0x29, 0x61, 0x22, 0x70, 0xab, 0x35, 0x67, 0xad, 0xe4, 0x2d, - 0x00, 0xba, 0x23, 0xe2, 0x74, 0x9f, 0x89, 0xa0, 0xfe, 0x33, 0x87, 0x2c, 0x1c, 0x69, 0xae, 0x20, - 0xce, 0x78, 0x66, 0x94, 0x14, 0xfb, 0x9a, 0xab, 0xac, 0x54, 0xc0, 0x98, 0xbe, 0x4b, 0xe6, 0x03, - 0x96, 0x24, 0x1d, 0xac, 0x21, 0xa6, 0x5c, 0x94, 0x00, 0xd8, 0x85, 0x3a, 0xb2, 0x49, 0x8a, 0x98, - 0x2e, 0x85, 0xb7, 0x4b, 0x17, 0x54, 0xae, 0xff, 0xb1, 0x40, 0x16, 0xc0, 0x85, 0xbd, 0x84, 0x2b, - 0x96, 0xca, 0x89, 0x25, 0x9d, 0x89, 0x25, 0xab, 0xa4, 0x24, 0x2d, 0x31, 0x73, 0x27, 0x93, 0x61, - 0x2e, 0x4b, 0x7c, 0x74, 0xa9, 0xe4, 0xe5, 0x32, 0xcc, 0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0x94, 0xca, 0xc8, - 0x36, 0x05, 0x66, 0xaa, 0xb7, 0xae, 0xae, 0x6b, 0x59, 0x14, 0x4c, 0x26, 0x8c, 0xd2, 0x9e, 0x9a, - 0x28, 0xce, 0x8e, 0xd1, 0x9e, 0x8e, 0x04, 0x71, 0xe3, 0xe9, 0xef, 0x5f, 0xae, 0x3a, 0x9f, 0xbf, - 0x5c, 0x75, 0xbe, 0x78, 0xb9, 0xea, 0xfc, 0xf5, 0xe5, 0xaa, 0xf3, 0xeb, 0x57, 0xab, 0x53, 0x5f, - 0xbc, 0x5a, 0x9d, 0xfa, 0xf3, 0xab, 0xd5, 0xa9, 0x1f, 0xad, 0x8d, 0x54, 0xf4, 0xef, 0x0b, 0xc5, - 0x36, 0xa5, 0xe2, 0x0d, 0xcd, 0xcf, 0x98, 0x68, 0x0c, 0xb2, 0xff, 0x04, 0xb1, 0xae, 0x77, 0x67, - 0xb1, 0x61, 0x7a, 0xf2, 0xef, 0x00, 0x00, 0x00, 0xff, 0xff, 0x7f, 0xc4, 0x05, 0xf0, 0x2f, 0x14, - 0x00, 0x00, + // 2204 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x58, 0xcb, 0x6f, 0x1b, 0xbb, + 0xf5, 0xf6, 0x58, 0xb2, 0x2d, 0x53, 0x7e, 0x28, 0x8c, 0x6f, 0xee, 0x44, 0xf9, 0xfd, 0x1c, 0x55, + 0xed, 0xbd, 0x71, 0x72, 0x5b, 0xab, 0x48, 0x80, 0x02, 0xbd, 0x0f, 0xb4, 0xb2, 0xad, 0x5c, 0x2b, + 0x8d, 0x1f, 0x1d, 0xdb, 0x17, 0x46, 0x37, 0x02, 0x35, 0x43, 0xcb, 0x84, 0x67, 0x86, 0x63, 0x72, + 0xe4, 0xc8, 0x9b, 0x02, 0x7d, 0x01, 0xad, 0xbb, 0xe9, 0xba, 0x80, 0x57, 0xdd, 0xf4,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0x95, 0xee, 0x70, 0xd2, 0x36, 0xe0, 0xf4, 0x29, 0x99, 0xb5, 0x75, 0xec, 0xed, 0x2e, + 0xfd, 0x56, 0x5d, 0xff, 0x6d, 0xee, 0x87, 0xdd, 0x0d, 0xa8, 0x0e, 0xa3, 0x53, 0x9b, 0x0e, 0x1c, + 0x64, 0xfb, 0x90, 0xcc, 0x1e, 0x30, 0xb6, 0x3b, 0x9e, 0xff, 0x85, 0x89, 0xfc, 0xff, 0x98, 0x94, + 0xba, 0x66, 0x7d, 0xd9, 0xb6, 0xdc, 0x14, 0x08, 0xbb, 0x05, 0x59, 0x20, 0x32, 0x45, 0xfd, 0xbb, + 0xa4, 0x3c, 0xb2, 0xdb, 0xff, 0xc5, 0xb3, 0x1b, 0x1f, 0x0e, 0xf5, 0x7f, 0x38, 0x84, 0x1c, 0x37, + 0x77, 0x3c, 0x7e, 0xde, 0xe7, 0x3a, 0xa5, 0x1f, 0x92, 0x39, 0xb3, 0x60, 0xf3, 0x2c, 0x7e, 0x13, + 0x37, 0x32, 0x01, 0x16, 0x46, 0x7c, 0x4e, 0x76, 0x60, 0x59, 0x36, 0xb3, 0x89, 0x81, 0xf0, 0x39, + 0xf3, 0x1e, 0x59, 0xb2, 0x04, 0x9b, 0x42, 0x36, 0xc1, 0x17, 0x0d, 0x9a, 0x6d, 0x2c, 0x6c, 0x14, + 0xd7, 0xa9, 0xb1, 0x62, 0xde, 0x45, 0x25, 0x00, 0xd0, 0xc6, 0x43, 0x52, 0xc1, 0xc1, 0x2e, 0x8f, + 0xf9, 0x89, 0xf0, 0x05, 0x53, 0xa6, 0x62, 0x16, 0xbd, 0x65, 0xc0, 0x37, 0x86, 0x30, 0xad, 0x90, + 0x02, 0x9c, 0x30, 0xf3, 0x80, 0x81, 0x26, 0x3e, 0xe1, 0x71, 0xb1, 0x3a, 0x91, 0xb1, 0xe6, 0xc8, + 0x10, 0x81, 0xdd, 0x26, 0x68, 0x02, 0x22, 0x94, 0x6f, 0x7d, 0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4, 0xe3, 0x0e, 0x6c, 0xb5, 0x76, 0xf7, 0x8e, 0x76, 0x37, 0x71, + 0xd1, 0xa3, 0x0e, 0x64, 0xf7, 0x3a, 0x7c, 0x7e, 0x65, 0x64, 0x9b, 0x02, 0x33, 0xd5, 0x5b, 0x57, + 0xd7, 0xb5, 0x6c, 0x17, 0x4c, 0x26, 0x8c, 0xd2, 0x9e, 0x9a, 0x5d, 0x9c, 0x1d, 0xa3, 0x3d, 0x1d, + 0xd9, 0xc4, 0x8d, 0xa7, 0xbf, 0x7f, 0xb9, 0xea, 0x7c, 0xfe, 0x72, 0xd5, 0xf9, 0xe2, 0xe5, 0xaa, + 0xf3, 0xd7, 0x97, 0xab, 0xce, 0x6f, 0x5e, 0xad, 0x4e, 0x7d, 0xf1, 0x6a, 0x75, 0xea, 0xcf, 0xaf, + 0x56, 0xa7, 0x7e, 0xb4, 0x36, 0x52, 0xd1, 0x7f, 0x20, 0x14, 0xdb, 0x94, 0x8a, 0x37, 0x34, 0x3f, + 0x63, 0xa2, 0x31, 0xc8, 0xfe, 0x73, 0xc4, 0xba, 0xde, 0x9d, 0xc5, 0x0b, 0xd3, 0x93, 0x7f, 0x07, + 0x00, 0x00, 0xff, 0xff, 0x6c, 0x92, 0x52, 0xfa, 0x8f, 0x14, 0x00, 0x00, } func (this *AccountRange) Equal(that interface{}) bool { @@ -1934,14 +1936,14 @@ func (this *LpPoolConfig) Equal(that interface{}) bool { } return true } -func (this *IssuranceConfig) Equal(that interface{}) bool { +func (this *IssuanceConfig) Equal(that interface{}) bool { if that == nil { return this == nil } - that1, ok := that.(*IssuranceConfig) + that1, ok := that.(*IssuanceConfig) if !ok { - that2, ok := that.(IssuranceConfig) + that2, ok := that.(IssuanceConfig) if ok { that1 = &that2 } else { @@ -2021,7 +2023,7 @@ func (this *Dapp) Equal(that interface{}) bool { if !this.Pool.Equal(&that1.Pool) { return false } - if !this.Issurance.Equal(&that1.Issurance) { + if !this.Issuance.Equal(&that1.Issuance) { return false } if this.UpdateTimeMax != that1.UpdateTimeMax { @@ -2045,7 +2047,7 @@ func (this *Dapp) Equal(that interface{}) bool { if this.Status != that1.Status { return false } - if this.VoteQuorum != that1.VoteQuorum { + if !this.VoteQuorum.Equal(that1.VoteQuorum) { return false } if this.VotePeriod != that1.VotePeriod { @@ -2069,6 +2071,9 @@ func (this *Dapp) Equal(that interface{}) bool { if this.PostMintPaid != that1.PostMintPaid { return false } + if this.EnableBondVerifiers != that1.EnableBondVerifiers { + return false + } return true } func (this *UserDappBond) Equal(that interface{}) bool { @@ -2780,7 +2785,7 @@ func (m *LpPoolConfig) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *IssuranceConfig) Marshal() (dAtA []byte, err error) { +func (m *IssuanceConfig) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -2790,12 +2795,12 @@ func (m *IssuranceConfig) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *IssuranceConfig) MarshalTo(dAtA []byte) (int, error) { +func (m *IssuanceConfig) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *IssuranceConfig) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *IssuanceConfig) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -2855,6 +2860,18 @@ func (m *Dapp) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if m.EnableBondVerifiers { + i-- + if m.EnableBondVerifiers { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0xd8 + } if m.PostMintPaid { i-- if m.PostMintPaid { @@ -2916,13 +2933,18 @@ func (m *Dapp) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0xa0 } - if m.VoteQuorum != 0 { - i = encodeVarintLayer2(dAtA, i, uint64(m.VoteQuorum)) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0x98 + { + size := m.VoteQuorum.Size() + i -= size + if _, err := m.VoteQuorum.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintLayer2(dAtA, i, uint64(size)) } + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0x9a if m.Status != 0 { i = encodeVarintLayer2(dAtA, i, uint64(m.Status)) i-- @@ -2970,7 +2992,7 @@ func (m *Dapp) MarshalToSizedBuffer(dAtA []byte) (int, error) { dAtA[i] = 0x60 } { - size, err := m.Issurance.MarshalToSizedBuffer(dAtA[:i]) + size, err := m.Issuance.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } @@ -3955,7 +3977,7 @@ func (m *LpPoolConfig) Size() (n int) { return n } -func (m *IssuranceConfig) Size() (n int) { +func (m *IssuanceConfig) Size() (n int) { if m == nil { return 0 } @@ -4019,7 +4041,7 @@ func (m *Dapp) Size() (n int) { } l = m.Pool.Size() n += 1 + l + sovLayer2(uint64(l)) - l = m.Issurance.Size() + l = m.Issuance.Size() n += 1 + l + sovLayer2(uint64(l)) if m.UpdateTimeMax != 0 { n += 1 + sovLayer2(uint64(m.UpdateTimeMax)) @@ -4041,9 +4063,8 @@ func (m *Dapp) Size() (n int) { if m.Status != 0 { n += 2 + sovLayer2(uint64(m.Status)) } - if m.VoteQuorum != 0 { - n += 2 + sovLayer2(uint64(m.VoteQuorum)) - } + l = m.VoteQuorum.Size() + n += 2 + l + sovLayer2(uint64(l)) if m.VotePeriod != 0 { n += 2 + sovLayer2(uint64(m.VotePeriod)) } @@ -4065,6 +4086,9 @@ func (m *Dapp) Size() (n int) { if m.PostMintPaid { n += 3 } + if m.EnableBondVerifiers { + n += 3 + } return n } @@ -5044,7 +5068,7 @@ func (m *LpPoolConfig) Unmarshal(dAtA []byte) error { } return nil } -func (m *IssuranceConfig) Unmarshal(dAtA []byte) error { +func (m *IssuanceConfig) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -5067,10 +5091,10 @@ func (m *IssuranceConfig) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: IssuranceConfig: wiretype end group for non-group") + return fmt.Errorf("proto: IssuanceConfig: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: IssuranceConfig: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: IssuanceConfig: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -5568,7 +5592,7 @@ func (m *Dapp) Unmarshal(dAtA []byte) error { iNdEx = postIndex case 11: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Issurance", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Issuance", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -5595,7 +5619,7 @@ func (m *Dapp) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.Issurance.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.Issuance.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -5748,10 +5772,10 @@ func (m *Dapp) Unmarshal(dAtA []byte) error { } } case 19: - if wireType != 0 { + if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field VoteQuorum", wireType) } - m.VoteQuorum = 0 + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowLayer2 @@ -5761,11 +5785,26 @@ func (m *Dapp) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.VoteQuorum |= uint64(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthLayer2 + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthLayer2 + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.VoteQuorum.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex case 20: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field VotePeriod", wireType) @@ -5928,6 +5967,26 @@ func (m *Dapp) Unmarshal(dAtA []byte) error { } } m.PostMintPaid = bool(v != 0) + case 27: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field EnableBondVerifiers", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowLayer2 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.EnableBondVerifiers = bool(v != 0) default: iNdEx = preIndex skippy, err := skipLayer2(dAtA[iNdEx:]) diff --git a/x/layer2/types/mint.pb.go b/x/layer2/types/mint.pb.go deleted file mode 100644 index 4375f49db..000000000 --- a/x/layer2/types/mint.pb.go +++ /dev/null @@ -1,1126 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: kira/layer2/mint.proto - -package types - -import ( - fmt "fmt" - github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" - _ "github.com/cosmos/gogoproto/gogoproto" - proto "github.com/cosmos/gogoproto/proto" - _ "github.com/cosmos/gogoproto/types" - io "io" - math "math" - math_bits "math/bits" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -type TokenInfo struct { - TokenType string `protobuf:"bytes,1,opt,name=token_type,json=tokenType,proto3" json:"token_type,omitempty"` - Denom string `protobuf:"bytes,2,opt,name=denom,proto3" json:"denom,omitempty"` - Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"` - Symbol string `protobuf:"bytes,4,opt,name=symbol,proto3" json:"symbol,omitempty"` - Icon string `protobuf:"bytes,5,opt,name=icon,proto3" json:"icon,omitempty"` - Description string `protobuf:"bytes,6,opt,name=description,proto3" json:"description,omitempty"` - Website string `protobuf:"bytes,7,opt,name=website,proto3" json:"website,omitempty"` - Social string `protobuf:"bytes,8,opt,name=social,proto3" json:"social,omitempty"` - Decimals uint64 `protobuf:"varint,9,opt,name=decimals,proto3" json:"decimals,omitempty"` - Cap github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,10,opt,name=cap,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"cap"` - Supply github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,11,opt,name=supply,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"supply"` - Holders uint64 `protobuf:"varint,12,opt,name=holders,proto3" json:"holders,omitempty"` - Fee github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,13,opt,name=fee,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"fee"` - Owner string `protobuf:"bytes,14,opt,name=owner,proto3" json:"owner,omitempty"` - Metadata string `protobuf:"bytes,15,opt,name=metadata,proto3" json:"metadata,omitempty"` - Hash string `protobuf:"bytes,16,opt,name=hash,proto3" json:"hash,omitempty"` -} - -func (m *TokenInfo) Reset() { *m = TokenInfo{} } -func (m *TokenInfo) String() string { return proto.CompactTextString(m) } -func (*TokenInfo) ProtoMessage() {} -func (*TokenInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_066d1ba7ae573fa3, []int{0} -} -func (m *TokenInfo) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *TokenInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_TokenInfo.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *TokenInfo) XXX_Merge(src proto.Message) { - xxx_messageInfo_TokenInfo.Merge(m, src) -} -func (m *TokenInfo) XXX_Size() int { - return m.Size() -} -func (m *TokenInfo) XXX_DiscardUnknown() { - xxx_messageInfo_TokenInfo.DiscardUnknown(m) -} - -var xxx_messageInfo_TokenInfo proto.InternalMessageInfo - -func (m *TokenInfo) GetTokenType() string { - if m != nil { - return m.TokenType - } - return "" -} - -func (m *TokenInfo) GetDenom() string { - if m != nil { - return m.Denom - } - return "" -} - -func (m *TokenInfo) GetName() string { - if m != nil { - return m.Name - } - return "" -} - -func (m *TokenInfo) GetSymbol() string { - if m != nil { - return m.Symbol - } - return "" -} - -func (m *TokenInfo) GetIcon() string { - if m != nil { - return m.Icon - } - return "" -} - -func (m *TokenInfo) GetDescription() string { - if m != nil { - return m.Description - } - return "" -} - -func (m *TokenInfo) GetWebsite() string { - if m != nil { - return m.Website - } - return "" -} - -func (m *TokenInfo) GetSocial() string { - if m != nil { - return m.Social - } - return "" -} - -func (m *TokenInfo) GetDecimals() uint64 { - if m != nil { - return m.Decimals - } - return 0 -} - -func (m *TokenInfo) GetHolders() uint64 { - if m != nil { - return m.Holders - } - return 0 -} - -func (m *TokenInfo) GetOwner() string { - if m != nil { - return m.Owner - } - return "" -} - -func (m *TokenInfo) GetMetadata() string { - if m != nil { - return m.Metadata - } - return "" -} - -func (m *TokenInfo) GetHash() string { - if m != nil { - return m.Hash - } - return "" -} - -func init() { - proto.RegisterType((*TokenInfo)(nil), "kira.layer2.TokenInfo") -} - -func init() { proto.RegisterFile("kira/layer2/mint.proto", fileDescriptor_066d1ba7ae573fa3) } - -var fileDescriptor_066d1ba7ae573fa3 = []byte{ - // 429 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x92, 0xcf, 0x6a, 0xdb, 0x40, - 0x10, 0xc6, 0xad, 0xc6, 0x71,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0xf7, 0x77, 0x97, 0xf6, 0xbe, 0xcf, 0x9e, 0x18, 0xfa, 0x66, 0x1a, 0xfd, 0x95, 0x1a, - 0x54, 0x1e, 0xd7, 0xda, 0xa8, 0x9f, 0x87, 0x7d, 0x65, 0x5b, 0xd9, 0x80, 0xb7, 0xed, 0xf3, 0x43, - 0x00, 0x00, 0x00, 0xff, 0xff, 0x04, 0x35, 0x96, 0x68, 0xcb, 0x02, 0x00, 0x00, -} - -func (this *TokenInfo) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*TokenInfo) - if !ok { - that2, ok := that.(TokenInfo) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.TokenType != that1.TokenType { - return false - } - if this.Denom != that1.Denom { - return false - } - if this.Name != that1.Name { - return false - } - if this.Symbol != that1.Symbol { - return false - } - if this.Icon != that1.Icon { - return false - } - if this.Description != that1.Description { - return false - } - if this.Website != that1.Website { - return false - } - if this.Social != that1.Social { - return false - } - if this.Decimals != that1.Decimals { - return false - } - if !this.Cap.Equal(that1.Cap) { - return false - } - if !this.Supply.Equal(that1.Supply) { - return false - } - if this.Holders != that1.Holders { - return false - } - if !this.Fee.Equal(that1.Fee) { - return false - } - if this.Owner != that1.Owner { - return false - } - if this.Metadata != that1.Metadata { - return false - } - if this.Hash != that1.Hash { - return false - } - return true -} -func (m *TokenInfo) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *TokenInfo) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *TokenInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Hash) > 0 { - i -= len(m.Hash) - copy(dAtA[i:], m.Hash) - i = encodeVarintMint(dAtA, i, uint64(len(m.Hash))) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0x82 - } - if len(m.Metadata) > 0 { - i -= len(m.Metadata) - copy(dAtA[i:], m.Metadata) - i = encodeVarintMint(dAtA, i, uint64(len(m.Metadata))) - i-- - dAtA[i] = 0x7a - } - if len(m.Owner) > 0 { - i -= len(m.Owner) - copy(dAtA[i:], m.Owner) - i = encodeVarintMint(dAtA, i, uint64(len(m.Owner))) - i-- - dAtA[i] = 0x72 - } - { - size := m.Fee.Size() - i -= size - if _, err := m.Fee.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintMint(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x6a - if m.Holders != 0 { - i = encodeVarintMint(dAtA, i, uint64(m.Holders)) - i-- - dAtA[i] = 0x60 - } - { - size := m.Supply.Size() - i -= size - if _, err := m.Supply.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintMint(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x5a - { - size := m.Cap.Size() - i -= size - if _, err := m.Cap.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintMint(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x52 - if m.Decimals != 0 { - i = encodeVarintMint(dAtA, i, uint64(m.Decimals)) - i-- - dAtA[i] = 0x48 - } - if len(m.Social) > 0 { - i -= len(m.Social) - copy(dAtA[i:], m.Social) - i = encodeVarintMint(dAtA, i, uint64(len(m.Social))) - i-- - dAtA[i] = 0x42 - } - if len(m.Website) > 0 { - i -= len(m.Website) - copy(dAtA[i:], m.Website) - i = encodeVarintMint(dAtA, i, uint64(len(m.Website))) - i-- - dAtA[i] = 0x3a - } - if len(m.Description) > 0 { - i -= len(m.Description) - copy(dAtA[i:], m.Description) - i = encodeVarintMint(dAtA, i, uint64(len(m.Description))) - i-- - dAtA[i] = 0x32 - } - if len(m.Icon) > 0 { - i -= len(m.Icon) - copy(dAtA[i:], m.Icon) - i = encodeVarintMint(dAtA, i, uint64(len(m.Icon))) - i-- - dAtA[i] = 0x2a - } - if len(m.Symbol) > 0 { - i -= len(m.Symbol) - copy(dAtA[i:], m.Symbol) - i = encodeVarintMint(dAtA, i, uint64(len(m.Symbol))) - i-- - dAtA[i] = 0x22 - } - if len(m.Name) > 0 { - i -= len(m.Name) - copy(dAtA[i:], m.Name) - i = encodeVarintMint(dAtA, i, uint64(len(m.Name))) - i-- - dAtA[i] = 0x1a - } - if len(m.Denom) > 0 { - i -= len(m.Denom) - copy(dAtA[i:], m.Denom) - i = encodeVarintMint(dAtA, i, uint64(len(m.Denom))) - i-- - dAtA[i] = 0x12 - } - if len(m.TokenType) > 0 { - i -= len(m.TokenType) - copy(dAtA[i:], m.TokenType) - i = encodeVarintMint(dAtA, i, uint64(len(m.TokenType))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func encodeVarintMint(dAtA []byte, offset int, v uint64) int { - offset -= sovMint(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *TokenInfo) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.TokenType) - if l > 0 { - n += 1 + l + sovMint(uint64(l)) - } - l = len(m.Denom) - if l > 0 { - n += 1 + l + sovMint(uint64(l)) - } - l = len(m.Name) - if l > 0 { - n += 1 + l + sovMint(uint64(l)) - } - l = len(m.Symbol) - if l > 0 { - n += 1 + l + sovMint(uint64(l)) - } - l = len(m.Icon) - if l > 0 { - n += 1 + l + sovMint(uint64(l)) - } - l = len(m.Description) - if l > 0 { - n += 1 + l + sovMint(uint64(l)) - } - l = len(m.Website) - if l > 0 { - n += 1 + l + sovMint(uint64(l)) - } - l = len(m.Social) - if l > 0 { - n += 1 + l + sovMint(uint64(l)) - } - if m.Decimals != 0 { - n += 1 + sovMint(uint64(m.Decimals)) - } - l = m.Cap.Size() - n += 1 + l + sovMint(uint64(l)) - l = m.Supply.Size() - n += 1 + l + sovMint(uint64(l)) - if m.Holders != 0 { - n += 1 + sovMint(uint64(m.Holders)) - } - l = m.Fee.Size() - n += 1 + l + sovMint(uint64(l)) - l = len(m.Owner) - if l > 0 { - n += 1 + l + sovMint(uint64(l)) - } - l = len(m.Metadata) - if l > 0 { - n += 1 + l + sovMint(uint64(l)) - } - l = len(m.Hash) - if l > 0 { - n += 2 + l + sovMint(uint64(l)) - } - return n -} - -func sovMint(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozMint(x uint64) (n int) { - return sovMint(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *TokenInfo) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMint - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: TokenInfo: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: TokenInfo: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TokenType", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMint - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthMint - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthMint - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.TokenType = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Denom", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMint - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthMint - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthMint - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Denom = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMint - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthMint - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthMint - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Name = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Symbol", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMint - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthMint - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthMint - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Symbol = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Icon", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMint - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthMint - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthMint - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Icon = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Description", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMint - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthMint - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthMint - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Description = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Website", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMint - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthMint - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthMint - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Website = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Social", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMint - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthMint - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthMint - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Social = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 9: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Decimals", wireType) - } - m.Decimals = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMint - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Decimals |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 10: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Cap", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMint - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthMint - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthMint - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Cap.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 11: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Supply", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMint - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthMint - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthMint - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Supply.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 12: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Holders", wireType) - } - m.Holders = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMint - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Holders |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 13: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Fee", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMint - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthMint - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthMint - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Fee.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 14: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Owner", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMint - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthMint - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthMint - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Owner = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 15: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Metadata", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMint - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthMint - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthMint - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Metadata = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 16: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Hash", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMint - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthMint - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthMint - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Hash = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipMint(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthMint - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipMint(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowMint - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowMint - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowMint - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthMint - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupMint - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthMint - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthMint = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowMint = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupMint = fmt.Errorf("proto: unexpected end of group") -) diff --git a/x/layer2/types/query.pb.go b/x/layer2/types/query.pb.go index 98b835ba8..bc2337adf 100644 --- a/x/layer2/types/query.pb.go +++ b/x/layer2/types/query.pb.go @@ -287,86 +287,6 @@ func (m *QueryTransferDappsResponse) GetXAMs() []XAM { return nil } -type QueryGlobalTokensRequest struct { -} - -func (m *QueryGlobalTokensRequest) Reset() { *m = QueryGlobalTokensRequest{} } -func (m *QueryGlobalTokensRequest) String() string { return proto.CompactTextString(m) } -func (*QueryGlobalTokensRequest) ProtoMessage() {} -func (*QueryGlobalTokensRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_b9c14366296fd7f4, []int{6} -} -func (m *QueryGlobalTokensRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryGlobalTokensRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryGlobalTokensRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *QueryGlobalTokensRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryGlobalTokensRequest.Merge(m, src) -} -func (m *QueryGlobalTokensRequest) XXX_Size() int { - return m.Size() -} -func (m *QueryGlobalTokensRequest) XXX_DiscardUnknown() { - xxx_messageInfo_QueryGlobalTokensRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryGlobalTokensRequest proto.InternalMessageInfo - -type QueryGlobalTokensResponse struct { - Tokens []TokenInfo `protobuf:"bytes,1,rep,name=tokens,proto3" json:"tokens"` -} - -func (m *QueryGlobalTokensResponse) Reset() { *m = QueryGlobalTokensResponse{} } -func (m *QueryGlobalTokensResponse) String() string { return proto.CompactTextString(m) } -func (*QueryGlobalTokensResponse) ProtoMessage() {} -func (*QueryGlobalTokensResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_b9c14366296fd7f4, []int{7} -} -func (m *QueryGlobalTokensResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryGlobalTokensResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryGlobalTokensResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *QueryGlobalTokensResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryGlobalTokensResponse.Merge(m, src) -} -func (m *QueryGlobalTokensResponse) XXX_Size() int { - return m.Size() -} -func (m *QueryGlobalTokensResponse) XXX_DiscardUnknown() { - xxx_messageInfo_QueryGlobalTokensResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryGlobalTokensResponse proto.InternalMessageInfo - -func (m *QueryGlobalTokensResponse) GetTokens() []TokenInfo { - if m != nil { - return m.Tokens - } - return nil -} - func init() { proto.RegisterType((*QueryExecutionRegistrarRequest)(nil), "kira.layer2.QueryExecutionRegistrarRequest") proto.RegisterType((*QueryExecutionRegistrarResponse)(nil), "kira.layer2.QueryExecutionRegistrarResponse") @@ -374,51 +294,45 @@ func init() { proto.RegisterType((*QueryAllDappsResponse)(nil), "kira.layer2.QueryAllDappsResponse") proto.RegisterType((*QueryTransferDappsRequest)(nil), "kira.layer2.QueryTransferDappsRequest") proto.RegisterType((*QueryTransferDappsResponse)(nil), "kira.layer2.QueryTransferDappsResponse") - proto.RegisterType((*QueryGlobalTokensRequest)(nil), "kira.layer2.QueryGlobalTokensRequest") - proto.RegisterType((*QueryGlobalTokensResponse)(nil), "kira.layer2.QueryGlobalTokensResponse") } func init() { proto.RegisterFile("kira/layer2/query.proto", fileDescriptor_b9c14366296fd7f4) } var fileDescriptor_b9c14366296fd7f4 = []byte{ - // 590 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x54, 0x4f, 0x6f, 0xd3, 0x30, - 0x1c, 0x6d, 0x46, 0x37, 0x81, 0x07, 0x12, 0x98, 0x51, 0xb2, 0x30, 0xa5, 0x23, 0xd2, 0xc6, 0x34, - 0x58, 0xad, 0x15, 0xb8, 0xd3, 0xf2, 0x5f, 0x68, 0x12, 0xab, 0x76, 0x98, 0xb8, 0x54, 0x4e, 0xe7, - 0x06, 0xab, 0xa9, 0x9d, 0xda, 0x2e, 0x5a, 0x85, 0x38, 0x80, 0xf8, 0x00, 0x48, 0xdc, 0xf8, 0x00, - 0x1c, 0xf9, 0x1c, 0x3b, 0x4e, 0xe2, 0xc2, 0x09, 0xa1, 0x96, 0x0f, 0x82, 0xe2, 0xb8, 0x23, 0x59, - 0x42, 0xc7, 0xa9, 0xee, 0xef, 0xbd, 0xdf, 0x7b, 0xcf, 0xfe, 0xfd, 0x14, 0x70, 0xbd, 0x47, 0x05, - 0x46, 0x21, 0x1e, 0x11, 0x51, 0x47, 0x83, 0x21, 0x11, 0xa3, 0x5a, 0x24, 0xb8, 0xe2, 0x70, 0x31, - 0x06, 0x6a, 0x09, 0xe0, 0x6c, 0x76, 0xb8, 0xec, 0x73, 0x89, 0x7c, 0x2c, 0x49, 0xc2, 0x42, 0x6f, - 0xb6, 0x7d, 0xa2, 0xf0, 0x36, 0x8a, 0x70, 0x40, 0x19, 0x56, 0x94, 0xb3, 0xa4, 0xd1, 0x59, 0x0a, - 0x78, 0xc0, 0xf5, 0x11, 0xc5, 0x27, 0x53, 0x5d, 0x0e, 0x38, 0x0f, 0x42, 0x82, 0xf4, 0x3f, 0x7f, - 0xd8, 0x45, 0x98, 0x19, 0x27, 0x67, 0xc5, 0x40, 0x38, 0xa2, 0x08, 0x33, 0xc6, 0x95, 0x56, 0x93, - 0x06, 0xb5, 0xd3, 0x01, 0x93, 0x1f, 0x83, 0x54, 0xd2, 0x48, 0x9f, 0x32, 0x95, 0xd4, 0xbd, 0x07, - 0xc0, 0xdd, 0x8d, 0x23, 0x3e, 0x3e, 0x24, 0x9d, 0x61, 0x2c, 0xd5, 0x22, 0x01, 0x95, 0x4a, 0x60, - 0xd1, 0x22, 0x83, 0x21, 0x91, 0x0a, 0xba, 0x00, 0xd0, 0x03, 0xc2, 0x14, 0xed, 0x52, 0x22, 0x6c, - 0x6b, 0xd5, 0xda, 0xb8, 0xd0, 0x4a, 0x55, 0xbc, 0x2f, 0x16, 0xa8, 0xfe, 0x53, 0x42, 0x46, 0x9c, - 0x49, 0x02, 0xd7, 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70, 0x0b, 0xa5, 0x37, 0xb6, 0x60, - 0x2d, 0xd0, 0xdb, 0xbf, 0x4b, 0xf8, 0x0e, 0x0e, 0xc0, 0xf9, 0xe9, 0x2c, 0xe1, 0xcd, 0xbc, 0xe1, - 0xa9, 0xf9, 0x3b, 0xde, 0x2c, 0x8a, 0x49, 0xe2, 0xea, 0x24, 0x36, 0xac, 0x64, 0x92, 0xe0, 0x30, - 0x6c, 0xeb, 0xd9, 0xc3, 0x8f, 0x16, 0xb8, 0x94, 0x19, 0x2d, 0x5c, 0xcf, 0xab, 0x16, 0x2d, 0x86, - 0x73, 0xeb, 0x4c, 0x9e, 0x89, 0xe0, 0xe9, 0x08, 0x2b, 0xd0, 0xc9, 0x44, 0x50, 0x86, 0xab, 0x73, - 0xc0, 0xf7, 0x16, 0xb8, 0x98, 0x9e, 0x3d, 0x5c, 0xcb, 0xab, 0x17, 0xec, 0x8d, 0xb3, 0x7e, 0x16, - 0x6d, 0x66, 0x86, 0x40, 0x53, 0xdb, 0xc9, 0xc2, 0x34, 0x9b, 0x47, 0x63, 0xd7, 0x3a, 0x1e, 0xbb, - 0xd6, 0xaf, 0xb1, 0x6b, 0x7d, 0x9a, 0xb8, 0xa5, 0xe3, 0x89, 0x5b, 0xfa, 0x31, 0x71, 0x4b, 0xaf, - 0x36, 0x02, 0xaa, 0x5e, 0x0f, 0xfd, 0x5a, 0x87, 0xf7, 0xd1, 0x0b, 0x2a, 0xf0, 0x43, 0x2e, 0x08, - 0x92, 0xa4, 0x87, 0x29, 0x3a, 0x3c, 0xb9, 0xcf, 0x28, 0x22, 0xd2, 0x5f, 0xd0, 0x1f, 0xa4, 0xbb, - 0x7f, 0x02, 0x00, 0x00, 0xff, 0xff, 0xae, 0x94, 0x53, 0xc9, 0x65, 0x05, 0x00, 0x00, + // 520 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x93, 0x4f, 0x6b, 0xd4, 0x40, + 0x18, 0xc6, 0x37, 0xed, 0x56, 0x74, 0x8a, 0xa0, 0x63, 0xad, 0x69, 0x2c, 0xd9, 0x1a, 0x50, 0x4b, + 0xb5, 0x19, 0xba, 0xe2, 0xdd, 0x5d, 0xff, 0x20, 0x48, 0x41, 0x83, 0x87, 0xe2, 0xa5, 0x4c, 0xb6, + 0xef, 0xc6, 0xa1, 0x69, 0x66, 0x76, 0x66, 0x22, 0x5d, 0xc4, 0x8b, 0xf8, 0x01, 0x04, 0x6f, 0x7e, + 0x00, 0x0f, 0x7e, 0x92, 0x1e, 0x0b, 0x5e, 0x3c, 0x89, 0xec, 0xfa, 0x41, 0x24, 0x93, 0x59, 0xdd, + 0x74, 0x63, 0xed, 0x69, 0xb3, 0xef, 0xfb, 0xbc, 0xcf, 0xf3, 0xcb, 0xbc, 0x13, 0x74, 0x6d, 0x9f, + 0x49, 0x4a, 0x52, 0x3a, 0x04, 0xd9, 0x26, 0x83, 0x1c, 0xe4, 0x30, 0x14, 0x92, 0x6b, 0x8e, 0x17, + 0x8b, 0x46, 0x58, 0x36, 0xbc, 0x8d, 0x1e, 0x57, 0x07, 0x5c, 0x91, 0x98, 0x2a, 0x28, 0x55, 0xe4, + 0xcd, 0x56, 0x0c, 0x9a, 0x6e, 0x11, 0x41, 0x13, 0x96, 0x51, 0xcd, 0x78, 0x56, 0x0e, 0x7a, 0x4b, + 0x09, 0x4f, 0xb8, 0x79, 0x24, 0xc5, 0x93, 0xad, 0xae, 0x24, 0x9c, 0x27, 0x29, 0x10, 0xf3, 0x2f, + 0xce, 0xfb, 0x84, 0x66, 0x36, 0xc9, 0x5b, 0xb5, 0x2d, 0x2a, 0x18, 0xa1, 0x59, 0xc6, 0xb5, 0x71, + 0x53, 0xb6, 0xeb, 0x4e, 0x03, 0x96, 0x3f, 0x65, 0x27, 0x78, 0x80, 0xfc, 0x17, 0x05, 0xca, 0xe3, + 0x43, 0xe8, 0xe5, 0xc5, 0x48, 0x04, 0x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82, 0x37, 0xc9, 0xf4, + 0x25, 0xaa, 0xd9, 0x13, 0x79, 0xfb, 0xf7, 0x56, 0xbc, 0xc3, 0x03, 0x74, 0x7e, 0x72, 0xb8, 0xf8, + 0xc6, 0x6c, 0xe0, 0x89, 0x85, 0x78, 0xc1, 0x69, 0x12, 0x4b, 0xe2, 0x1b, 0x12, 0x17, 0x2f, 0x57, + 0x48, 0x68, 0x9a, 0xee, 0x9a, 0x65, 0xe0, 0x0f, 0x0e, 0xba, 0x58, 0x39, 0x6b, 0x7c, 0x6b, 0xd6, + 0xb5, 0x6e, 0x53, 0xde, 0xed, 0xff, 0xea, 0x2c, 0x42, 0x60, 0x10, 0x56, 0xb1, 0x57, 0x41, 0xd0, + 0x56, 0x6b, 0x38, 0xba, 0xdd, 0xa3, 0x91, 0xef, 0x1c, 0x8f, 0x7c, 0xe7, 0xe7, 0xc8, 0x77, 0x3e, + 0x8e, 0xfd, 0xc6, 0xf1, 0xd8, 0x6f, 0x7c, 0x1f, 0xfb, 0x8d, 0x57, 0xeb, 0x09, 0xd3, 0xaf, 0xf3, + 0x38, 0xec, 0xf1, 0x03, 0xf2, 0x8c, 0x49, 0xfa, 0x90, 0x4b, 0x20, 0x0a, 0xf6, 0x29, 0x23, 0x87, + 0x7f, 0xbc, 0x86, 0x02, 0x54, 0x7c, 0xce, 0x7c, 0x9d, 0xf7, 0x7e, 0x07, 0x00, 0x00, 0xff, 0xff, + 0xeb, 0xc1, 0xe4, 0xa8, 0x5a, 0x04, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -441,12 +355,6 @@ type QueryClient interface { // query XAMs’ records by either account address, account index, xid or // transaction hash in which cross-app transaction was added to the ABR. TransferDapps(ctx context.Context, in *QueryTransferDappsRequest, opts ...grpc.CallOption) (*QueryTransferDappsResponse, error) - // query list of all token denoms on the network including those created in - // the genesis (ukex, samolean etc..) as well as those in the minting module, - // lp tokens, validator recovery tokens and so on. If the flag with specific - // name is specified provide a detailed information about the token including - // its current circulating supply etc. - GlobalTokens(ctx context.Context, in *QueryGlobalTokensRequest, opts ...grpc.CallOption) (*QueryGlobalTokensResponse, error) } type queryClient struct { @@ -484,15 +392,6 @@ func (c *queryClient) TransferDapps(ctx context.Context, in *QueryTransferDappsR return out, nil } -func (c *queryClient) GlobalTokens(ctx context.Context, in *QueryGlobalTokensRequest, opts ...grpc.CallOption) (*QueryGlobalTokensResponse, error) { - out := new(QueryGlobalTokensResponse) - err := c.cc.Invoke(ctx, "/kira.layer2.Query/GlobalTokens", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - // QueryServer is the server API for Query service. type QueryServer interface { // query info of a specific application by dApp ID or name @@ -503,12 +402,6 @@ type QueryServer interface { // query XAMs’ records by either account address, account index, xid or // transaction hash in which cross-app transaction was added to the ABR. TransferDapps(context.Context, *QueryTransferDappsRequest) (*QueryTransferDappsResponse, error) - // query list of all token denoms on the network including those created in - // the genesis (ukex, samolean etc..) as well as those in the minting module, - // lp tokens, validator recovery tokens and so on. If the flag with specific - // name is specified provide a detailed information about the token including - // its current circulating supply etc. - GlobalTokens(context.Context, *QueryGlobalTokensRequest) (*QueryGlobalTokensResponse, error) } // UnimplementedQueryServer can be embedded to have forward compatible implementations. @@ -524,9 +417,6 @@ func (*UnimplementedQueryServer) AllDapps(ctx context.Context, req *QueryAllDapp func (*UnimplementedQueryServer) TransferDapps(ctx context.Context, req *QueryTransferDappsRequest) (*QueryTransferDappsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method TransferDapps not implemented") } -func (*UnimplementedQueryServer) GlobalTokens(ctx context.Context, req *QueryGlobalTokensRequest) (*QueryGlobalTokensResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GlobalTokens not implemented") -} func RegisterQueryServer(s grpc1.Server, srv QueryServer) { s.RegisterService(&_Query_serviceDesc, srv) @@ -586,24 +476,6 @@ func _Query_TransferDapps_Handler(srv interface{}, ctx context.Context, dec func return interceptor(ctx, in, info, handler) } -func _Query_GlobalTokens_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryGlobalTokensRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).GlobalTokens(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/kira.layer2.Query/GlobalTokens", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).GlobalTokens(ctx, req.(*QueryGlobalTokensRequest)) - } - return interceptor(ctx, in, info, handler) -} - var _Query_serviceDesc = grpc.ServiceDesc{ ServiceName: "kira.layer2.Query", HandlerType: (*QueryServer)(nil), @@ -620,10 +492,6 @@ var _Query_serviceDesc = grpc.ServiceDesc{ MethodName: "TransferDapps", Handler: _Query_TransferDapps_Handler, }, - { - MethodName: "GlobalTokens", - Handler: _Query_GlobalTokens_Handler, - }, }, Streams: []grpc.StreamDesc{}, Metadata: "kira/layer2/query.proto", @@ -826,66 +694,6 @@ func (m *QueryTransferDappsResponse) MarshalToSizedBuffer(dAtA []byte) (int, err return len(dAtA) - i, nil } -func (m *QueryGlobalTokensRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *QueryGlobalTokensRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryGlobalTokensRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil -} - -func (m *QueryGlobalTokensResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *QueryGlobalTokensResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryGlobalTokensResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Tokens) > 0 { - for iNdEx := len(m.Tokens) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Tokens[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - func encodeVarintQuery(dAtA []byte, offset int, v uint64) int { offset -= sovQuery(v) base := offset @@ -975,30 +783,6 @@ func (m *QueryTransferDappsResponse) Size() (n int) { return n } -func (m *QueryGlobalTokensRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - return n -} - -func (m *QueryGlobalTokensResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Tokens) > 0 { - for _, e := range m.Tokens { - l = e.Size() - n += 1 + l + sovQuery(uint64(l)) - } - } - return n -} - func sovQuery(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } @@ -1477,140 +1261,6 @@ func (m *QueryTransferDappsResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryGlobalTokensRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: QueryGlobalTokensRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryGlobalTokensRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *QueryGlobalTokensResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: QueryGlobalTokensResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryGlobalTokensResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Tokens", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Tokens = append(m.Tokens, TokenInfo{}) - if err := m.Tokens[len(m.Tokens)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} func skipQuery(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 diff --git a/x/layer2/types/query.pb.gw.go b/x/layer2/types/query.pb.gw.go index 9e159d901..3c7530a48 100644 --- a/x/layer2/types/query.pb.gw.go +++ b/x/layer2/types/query.pb.gw.go @@ -123,24 +123,6 @@ func local_request_Query_TransferDapps_0(ctx context.Context, marshaler runtime. } -func request_Query_GlobalTokens_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryGlobalTokensRequest - var metadata runtime.ServerMetadata - - msg, err := client.GlobalTokens(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_Query_GlobalTokens_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryGlobalTokensRequest - var metadata runtime.ServerMetadata - - msg, err := server.GlobalTokens(ctx, &protoReq) - return msg, metadata, err - -} - // RegisterQueryHandlerServer registers the http handlers for service Query to "mux". // UnaryRPC :call QueryServer directly. // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. @@ -216,29 +198,6 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv }) - mux.Handle("GET", pattern_Query_GlobalTokens_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_Query_GlobalTokens_0(rctx, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_Query_GlobalTokens_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - return nil } @@ -340,26 +299,6 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie }) - mux.Handle("GET", pattern_Query_GlobalTokens_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_Query_GlobalTokens_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_Query_GlobalTokens_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - return nil } @@ -369,8 +308,6 @@ var ( pattern_Query_AllDapps_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"kira", "layer2", "all_dapps"}, "", runtime.AssumeColonVerbOpt(false))) pattern_Query_TransferDapps_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"kira", "layer2", "transfer_dapp"}, "", runtime.AssumeColonVerbOpt(false))) - - pattern_Query_GlobalTokens_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"kira", "layer2", "global_tokens"}, "", runtime.AssumeColonVerbOpt(false))) ) var ( @@ -379,6 +316,4 @@ var ( forward_Query_AllDapps_0 = runtime.ForwardResponseMessage forward_Query_TransferDapps_0 = runtime.ForwardResponseMessage - - forward_Query_GlobalTokens_0 = runtime.ForwardResponseMessage ) diff --git a/x/layer2/types/tx.pb.go b/x/layer2/types/tx.pb.go index 660c15d45..619cd45ee 100644 --- a/x/layer2/types/tx.pb.go +++ b/x/layer2/types/tx.pb.go @@ -1759,11 +1759,11 @@ type MsgMintCreateFtTx struct { Description string `protobuf:"bytes,6,opt,name=description,proto3" json:"description,omitempty"` Website string `protobuf:"bytes,7,opt,name=website,proto3" json:"website,omitempty"` Social string `protobuf:"bytes,8,opt,name=social,proto3" json:"social,omitempty"` - Decimals uint64 `protobuf:"varint,9,opt,name=decimals,proto3" json:"decimals,omitempty"` + Decimals uint32 `protobuf:"varint,9,opt,name=decimals,proto3" json:"decimals,omitempty"` Cap github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,10,opt,name=cap,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"cap"` Supply github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,11,opt,name=supply,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"supply"` Holders uint64 `protobuf:"varint,12,opt,name=holders,proto3" json:"holders,omitempty"` - Fee github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,13,opt,name=fee,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"fee"` + FeeRate github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,13,opt,name=fee_rate,json=feeRate,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"fee_rate"` Owner string `protobuf:"bytes,14,opt,name=owner,proto3" json:"owner,omitempty"` } @@ -1856,7 +1856,7 @@ func (m *MsgMintCreateFtTx) GetSocial() string { return "" } -func (m *MsgMintCreateFtTx) GetDecimals() uint64 { +func (m *MsgMintCreateFtTx) GetDecimals() uint32 { if m != nil { return m.Decimals } @@ -1923,11 +1923,11 @@ type MsgMintCreateNftTx struct { Description string `protobuf:"bytes,6,opt,name=description,proto3" json:"description,omitempty"` Website string `protobuf:"bytes,7,opt,name=website,proto3" json:"website,omitempty"` Social string `protobuf:"bytes,8,opt,name=social,proto3" json:"social,omitempty"` - Decimals uint64 `protobuf:"varint,9,opt,name=decimals,proto3" json:"decimals,omitempty"` + Decimals uint32 `protobuf:"varint,9,opt,name=decimals,proto3" json:"decimals,omitempty"` Cap github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,10,opt,name=cap,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"cap"` Supply github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,11,opt,name=supply,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"supply"` Holders uint64 `protobuf:"varint,12,opt,name=holders,proto3" json:"holders,omitempty"` - Fee github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,13,opt,name=fee,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"fee"` + FeeRate github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,13,opt,name=fee_rate,json=feeRate,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"fee_rate"` Owner string `protobuf:"bytes,14,opt,name=owner,proto3" json:"owner,omitempty"` Metadata string `protobuf:"bytes,15,opt,name=metadata,proto3" json:"metadata,omitempty"` Hash string `protobuf:"bytes,16,opt,name=hash,proto3" json:"hash,omitempty"` @@ -2022,7 +2022,7 @@ func (m *MsgMintCreateNftTx) GetSocial() string { return "" } -func (m *MsgMintCreateNftTx) GetDecimals() uint64 { +func (m *MsgMintCreateNftTx) GetDecimals() uint32 { if m != nil { return m.Decimals } @@ -2332,107 +2332,108 @@ func init() { func init() { proto.RegisterFile("kira/layer2/tx.proto", fileDescriptor_c30a928a62b31d6d) } var fileDescriptor_c30a928a62b31d6d = []byte{ - // 1591 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0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e6, 0xc4, 0xde, 0xb0, 0xdf, 0xd5, 0x6b, 0xfc, 0xfa, 0x49, - 0x14, 0x8b, 0xaa, 0xa5, 0x6f, 0x0b, 0xbc, 0xf1, 0x63, 0xec, 0xdb, 0x94, 0x76, 0xf1, 0x29, 0x75, - 0x34, 0x0f, 0x13, 0xbc, 0x66, 0x64, 0x01, 0x09, 0x82, 0x25, 0x12, 0x75, 0x48, 0xd7, 0x0b, 0xe5, - 0x64, 0xf0, 0xca, 0x89, 0x14, 0xda, 0x2c, 0xac, 0x00, 0x5b, 0xd8, 0x39, 0xc4, 0x81, 0x2c, 0x38, - 0x45, 0xcb, 0xae, 0xb2, 0x0f, 0xa3, 0x82, 0xff, 0x45, 0x01, 0x66, 0x24, 0x6b, 0xa3, 0x1b, 0x78, - 0x7f, 0x16, 0xfa, 0xea, 0x15, 0xfe, 0x1e, 0xf3, 0x12, 0x46, 0x04, 0x70, 0xed, 0x87, 0x39, 0x18, - 0x6f, 0x50, 0x5b, 0x6b, 0x81, 0x96, 0xf1, 0x5a, 0x53, 0x8d, 0x5d, 0x17, 0x99, 0xcf, 0x25, 0xc6, - 0x7f, 0x07, 0xcb, 0x44, 0xde, 0xb4, 0xcf, 0x60, 0x2e, 0xf5, 0x9c, 0x52, 0x49, 0xea, 0x27, 0x25, - 0x8c, 0xd5, 0x41, 0x12, 0xca, 0x3e, 0x85, 0x2b, 0x79, 0xaf, 0x1f, 0xb7, 0x92, 0x46, 0x72, 0x04, - 0x8d, 0xfa, 0x19, 0x05, 0x95, 0xd3, 0x43, 0xd0, 0x73, 0x1f, 0x2d, 0x52, 0xd0, 0xf3, 0x24, 0x8d, - 0x37, 0xce, 0x2a, 0xa9, 0xfc, 0xee, 0xc0, 0x94, 0x7a, 0x99, 0xd0, 0x93, 0xda, 0x11, 0xc7, 0xa8, - 0xe4, 0x71, 0xfa, 0x37, 0x25, 0xf5, 0x0a, 0x51, 0x49, 0x27, 0x21, 0x2e, 0x91, 0xde, 0x94, 0xbc,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, 0x29, 0xf0, 0x71, 0x7e, 0x1a, 0x7c, 0x76, 0xa3, - 0xab, 0x7d, 0x0a, 0x17, 0x93, 0x4d, 0xee, 0x72, 0xbe, 0x2a, 0x17, 0x30, 0x6e, 0x0d, 0x10, 0xe8, - 0x3f, 0x79, 0xfa, 0xbb, 0x9e, 0xc5, 0x2c, 0x3d, 0xc9, 0x4c, 0x9f, 0x3c, 0x19, 0xbd, 0x88, 0x76, - 0x17, 0xa0, 0xaf, 0x0f, 0x31, 0xb2, 0x54, 0x04, 0xcf, 0xa8, 0xe6, 0xf3, 0xd4, 0xbc, 0xb8, 0xf3, - 0xdd, 0x49, 0xb9, 0xf0, 0xf4, 0xa4, 0x5c, 0x78, 0x76, 0x52, 0x2e, 0xfc, 0x7a, 0x52, 0x2e, 0x7c, - 0xfd, 0xa2, 0x3c, 0xf6, 0xec, 0x45, 0x79, 0xec, 0xa7, 0x17, 0xe5, 0xb1, 0x4f, 0x56, 0xfb, 0xfa, - 0x93, 0x0f, 0x9c, 0x00, 0x6d, 0x92, 0x00, 0xd7, 0x29, 0x3e, 0x40, 0x4e, 0xbd, 0xa7, 0xfe, 0x41, - 0xc5, 0xba, 0x94, 0xbd, 0x49, 0xfe, 0xaa, 0xf1, 0xe6, 0xef, 0x01, 0x00, 0x00, 0xff, 0xff, 0x78, - 0xfc, 0x9a, 0xb8, 0xbc, 0x1a, 0x00, 0x00, + // 1603 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x59, 0x4b, 0x6f, 0x1b, 0x47, + 0x12, 0x16, 0x2d, 0xea, 0x55, 0xb4, 0x64, 0x79, 0x56, 0x96, 0xc7, 0x23, 0x8b, 0xa2, 0xa9, 0xb5, + 0xcd, 0xdd, 0xc5, 0x92, 0x0b, 0xed, 0x69, 0x81, 0x05, 0x12, 0x3d, 0x13, 0x3b, 0xa6, 0x63, 0x8c, + 0xe5, 0xc4, 0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de, 0x87, + 0xd2, 0xe0, 0x8c, 0xb8, 0x94, 0xd4, 0x1c, 0x60, 0x1a, 0xab, 0xa7, 0x30, 0x95, 0xc1, 0x47, 0x30, + 0x1b, 0x1f, 0x3b, 0x97, 0x93, 0x5a, 0x31, 0xb6, 0x71, 0xf3, 0x54, 0x76, 0x7c, 0x13, 0x13, 0x83, + 0x66, 0xc6, 0x26, 0xc6, 0x25, 0xb2, 0x36, 0x31, 0x7b, 0xc0, 0xe4, 0xb0, 0xe3, 0xd3, 0xe5, 0x72, + 0xba, 0xae, 0x06, 0xd8, 0x69, 0xd8, 0x99, 0x83, 0x23, 0x87, 0x9d, 0x1a, 0x1a, 0x53, 0xb0, 0x93, + 0x12, 0x69, 0xd8, 0x79, 0x53, 0x1d, 0xb7, 0x9f, 0x9a, 0xe8, 0x52, 0xf6, 0x93, 0x12, 0x69, 0xfb, + 0x79, 0xd3, 0x14, 0x3f, 0x70, 0xf2, 0x46, 0xa9, 0xd4, 0x81, 0x93, 0x23, 0x98, 0x3e, 0x70, 0xce, + 0x98, 0x97, 0x34, 0x1f, 0x16, 0x73, 0x86, 0xa5, 0x5b, 0xe9, 0xfd, 0xcc, 0x92, 0x33, 0xea, 0xe7, + 0x93, 0x1b, 0xfc, 0x84, 0x13, 0x53, 0x48, 0x39, 0x33, 0x45, 0x8a, 0x9f, 0xfe, 0x84, 0xb3, 0xe7, + 0x0a, 0xfe, 0x09, 0xa7, 0x47, 0x9c, 0xd4, 0x27, 0x9c, 0x12, 0x49, 0x7f, 0xc2, 0xb9, 0xa3, 0x0b, + 0x07, 0x9f, 0x18, 0x5b, 0x52, 0xe0, 0xe3, 0xfc, 0x34, 0xf8, 0xec, 0x8e, 0x57, 0xfb, 0x18, 0x2e, + 0x25, 0xbb, 0xdd, 0x95, 0x7c, 0x55, 0x21, 0x60, 0xdc, 0x3e, 0x43, 0x60, 0xf0, 0xe4, 0x19, 0xec, + 0x7a, 0x96, 0xb2, 0xf4, 0x24, 0x33, 0x7d, 0xf2, 0x64, 0xf4, 0x22, 0xda, 0x3d, 0x80, 0x81, 0x3e, + 0xc4, 0xc8, 0x52, 0x09, 0x79, 0x46, 0x35, 0x9f, 0xa7, 0x26, 0xc8, 0x9d, 0x6f, 0x4f, 0xca, 0x85, + 0x67, 0x27, 0xe5, 0xc2, 0xf3, 0x93, 0x72, 0xe1, 0x97, 0x93, 0x72, 0xe1, 0xab, 0x97, 0xe5, 0xb1, + 0xe7, 0x2f, 0xcb, 0x63, 0x3f, 0xbe, 0x2c, 0x8f, 0x7d, 0x54, 0x1b, 0xe8, 0x4f, 0xde, 0x73, 0x02, + 0xb4, 0x49, 0x02, 0xdc, 0xa0, 0xf8, 0x00, 0x39, 0x8d, 0xbe, 0xfa, 0x97, 0x15, 0xef, 0x52, 0xf6, + 0x26, 0xc5, 0x3b, 0xc7, 0x7f, 0x7f, 0x0d, 0x00, 0x00, 0xff, 0xff, 0x6e, 0xed, 0xf0, 0xf6, 0xce, + 0x1a, 0x00, 0x00, } func (this *MsgCreateDappProposal) Equal(that interface{}) bool { @@ -3429,7 +3430,7 @@ func (this *MsgMintCreateFtTx) Equal(that interface{}) bool { if this.Holders != that1.Holders { return false } - if !this.Fee.Equal(that1.Fee) { + if !this.FeeRate.Equal(that1.FeeRate) { return false } if this.Owner != that1.Owner { @@ -3513,7 +3514,7 @@ func (this *MsgMintCreateNftTx) Equal(that interface{}) bool { if this.Holders != that1.Holders { return false } - if !this.Fee.Equal(that1.Fee) { + if !this.FeeRate.Equal(that1.FeeRate) { return false } if this.Owner != that1.Owner { @@ -5789,9 +5790,9 @@ func (m *MsgMintCreateFtTx) MarshalToSizedBuffer(dAtA []byte) (int, error) { dAtA[i] = 0x72 } { - size := m.Fee.Size() + size := m.FeeRate.Size() i -= size - if _, err := m.Fee.MarshalTo(dAtA[i:]); err != nil { + if _, err := m.FeeRate.MarshalTo(dAtA[i:]); err != nil { return 0, err } i = encodeVarintTx(dAtA, i, uint64(size)) @@ -5954,9 +5955,9 @@ func (m *MsgMintCreateNftTx) MarshalToSizedBuffer(dAtA []byte) (int, error) { dAtA[i] = 0x72 } { - size := m.Fee.Size() + size := m.FeeRate.Size() i -= size - if _, err := m.Fee.MarshalTo(dAtA[i:]); err != nil { + if _, err := m.FeeRate.MarshalTo(dAtA[i:]); err != nil { return 0, err } i = encodeVarintTx(dAtA, i, uint64(size)) @@ -6815,7 +6816,7 @@ func (m *MsgMintCreateFtTx) Size() (n int) { if m.Holders != 0 { n += 1 + sovTx(uint64(m.Holders)) } - l = m.Fee.Size() + l = m.FeeRate.Size() n += 1 + l + sovTx(uint64(l)) l = len(m.Owner) if l > 0 { @@ -6881,7 +6882,7 @@ func (m *MsgMintCreateNftTx) Size() (n int) { if m.Holders != 0 { n += 1 + sovTx(uint64(m.Holders)) } - l = m.Fee.Size() + l = m.FeeRate.Size() n += 1 + l + sovTx(uint64(l)) l = len(m.Owner) if l > 0 { @@ -10889,7 +10890,7 @@ func (m *MsgMintCreateFtTx) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Decimals |= uint64(b&0x7F) << shift + m.Decimals |= uint32(b&0x7F) << shift if b < 0x80 { break } @@ -10983,7 +10984,7 @@ func (m *MsgMintCreateFtTx) Unmarshal(dAtA []byte) error { } case 13: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Fee", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field FeeRate", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -11011,7 +11012,7 @@ func (m *MsgMintCreateFtTx) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.Fee.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.FeeRate.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -11417,7 +11418,7 @@ func (m *MsgMintCreateNftTx) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Decimals |= uint64(b&0x7F) << shift + m.Decimals |= uint32(b&0x7F) << shift if b < 0x80 { break } @@ -11511,7 +11512,7 @@ func (m *MsgMintCreateNftTx) Unmarshal(dAtA []byte) error { } case 13: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Fee", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field FeeRate", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -11539,7 +11540,7 @@ func (m *MsgMintCreateNftTx) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.Fee.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.FeeRate.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex diff --git a/x/multistaking/keeper/delegation.go b/x/multistaking/keeper/delegation.go index cdeb0237e..b31804002 100644 --- a/x/multistaking/keeper/delegation.go +++ b/x/multistaking/keeper/delegation.go @@ -166,7 +166,7 @@ func (k Keeper) IncreasePoolRewards(ctx sdk.Context, pool types.StakingPool, rew delegators := k.GetPoolDelegators(ctx, pool.Id) for _, shareToken := range pool.TotalShareTokens { nativeDenom := types.GetNativeDenom(pool.Id, shareToken.Denom) - rate := k.tokenKeeper.GetTokenRate(ctx, nativeDenom) + rate := k.tokenKeeper.GetTokenInfo(ctx, nativeDenom) if rate == nil { continue } @@ -216,8 +216,8 @@ func (k Keeper) IncreasePoolRewards(ctx sdk.Context, pool types.StakingPool, rew k.RemoveDelegatorRewards(ctx, delegator) } else { for _, reward := range rewards { - rate := k.tokenKeeper.GetTokenRate(ctx, reward.Denom) - if rate.StakeToken && reward.Amount.GTE(rate.StakeMin) && isWithinArray(reward.Denom, compoundInfo.CompoundDenoms) { + rate := k.tokenKeeper.GetTokenInfo(ctx, reward.Denom) + if rate.StakeEnabled && reward.Amount.GTE(rate.StakeMin) && isWithinArray(reward.Denom, compoundInfo.CompoundDenoms) { autoCompoundRewards = autoCompoundRewards.Add(reward) } } @@ -320,8 +320,8 @@ func (k Keeper) Delegate(ctx sdk.Context, msg *types.MsgDelegate) error { } for _, amount := range msg.Amounts { - rate := k.tokenKeeper.GetTokenRate(ctx, amount.Denom) - if !rate.StakeToken { + rate := k.tokenKeeper.GetTokenInfo(ctx, amount.Denom) + if !rate.StakeEnabled { return types.ErrNotAllowedStakingToken } if amount.Amount.LT(rate.StakeMin) { @@ -334,7 +334,7 @@ func (k Keeper) Delegate(ctx sdk.Context, msg *types.MsgDelegate) error { pool.TotalShareTokens = sdk.Coins(pool.TotalShareTokens).Add(poolCoins...) k.SetStakingPool(ctx, pool) - err = k.bankKeeper.MintCoins(ctx, minttypes.ModuleName, poolCoins) + err = k.tokenKeeper.MintCoins(ctx, minttypes.ModuleName, poolCoins) if err != nil { return err } @@ -400,7 +400,7 @@ func (k Keeper) GetPoolDelegationValue(ctx sdk.Context, pool types.StakingPool, delegationValue := sdk.ZeroInt() balances := k.bankKeeper.GetAllBalances(ctx, delegator) for _, stakingToken := range pool.TotalStakingTokens { - rate := k.tokenKeeper.GetTokenRate(ctx, stakingToken.Denom) + rate := k.tokenKeeper.GetTokenInfo(ctx, stakingToken.Denom) if rate == nil { continue } @@ -414,7 +414,7 @@ func (k Keeper) GetPoolDelegationValue(ctx sdk.Context, pool types.StakingPool, func (k Keeper) GetCoinsValue(ctx sdk.Context, coins sdk.Coins) sdk.Int { delegationValue := sdk.ZeroInt() for _, coin := range coins { - rate := k.tokenKeeper.GetTokenRate(ctx, coin.Denom) + rate := k.tokenKeeper.GetTokenInfo(ctx, coin.Denom) if rate == nil { continue } @@ -448,7 +448,7 @@ func (k Keeper) RegisterDelegator(ctx sdk.Context, delegator sdk.AccAddress) { } for _, stakingToken := range pool.TotalStakingTokens { - rate := k.tokenKeeper.GetTokenRate(ctx, stakingToken.Denom) + rate := k.tokenKeeper.GetTokenInfo(ctx, stakingToken.Denom) shareToken := types.GetShareDenom(pool.Id, stakingToken.Denom) balance := balances.AmountOf(shareToken) if balance.GTE(rate.StakeMin) { @@ -468,7 +468,7 @@ func (k Keeper) UnregisterNotEnoughStakeDelegator(ctx sdk.Context, pool types.St balances := k.bankKeeper.GetAllBalances(ctx, delegator) for _, shareToken := range pool.TotalShareTokens { nativeDenom := types.GetNativeDenom(pool.Id, shareToken.Denom) - rate := k.tokenKeeper.GetTokenRate(ctx, nativeDenom) + rate := k.tokenKeeper.GetTokenInfo(ctx, nativeDenom) if rate == nil { continue } diff --git a/x/multistaking/types/expected_keepers.go b/x/multistaking/types/expected_keepers.go index 752358b67..a517871d5 100644 --- a/x/multistaking/types/expected_keepers.go +++ b/x/multistaking/types/expected_keepers.go @@ -32,7 +32,8 @@ type BankKeeper interface { SendCoinsFromModuleToModule(ctx sdk.Context, senderModule, recipientModule string, amt sdk.Coins) error } -// TokensKeeper defines expected interface needed to get token rate +// TokensKeeper defines expected interface needed from tokens keeper type TokensKeeper interface { - GetTokenRate(ctx sdk.Context, denom string) *tokenstypes.TokenRate + MintCoins(ctx sdk.Context, moduleName string, amt sdk.Coins) error + GetTokenInfo(ctx sdk.Context, denom string) *tokenstypes.TokenInfo } diff --git a/x/recovery/handler.go b/x/recovery/handler.go index 0077d4f92..2a295901c 100644 --- a/x/recovery/handler.go +++ b/x/recovery/handler.go @@ -1,6 +1,7 @@ package recovery import ( + errorsmod "cosmossdk.io/errors" "github.com/KiraCore/sekai/x/recovery/keeper" "github.com/KiraCore/sekai/x/recovery/types" sdk "github.com/cosmos/cosmos-sdk/types" @@ -37,7 +38,7 @@ func NewHandler(k keeper.Keeper) sdk.Handler { res, err := msgServer.RotateValidatorByHalfRRTokenHolder(sdk.WrapSDKContext(ctx), msg) return sdk.WrapServiceResult(ctx, res, err) default: - return nil, sdkerrors.Wrapf(sdkerrors.ErrUnknownRequest, "unrecognized %s message type: %T", types.ModuleName, msg) + return nil, errorsmod.Wrapf(sdkerrors.ErrUnknownRequest, "unrecognized %s message type: %T", types.ModuleName, msg) } } } diff --git a/x/recovery/keeper/keeper.go b/x/recovery/keeper/keeper.go index 8fa2c2092..de2b1b9cd 100644 --- a/x/recovery/keeper/keeper.go +++ b/x/recovery/keeper/keeper.go @@ -23,6 +23,7 @@ type Keeper struct { ck types.CollectivesKeeper spk types.SpendingKeeper custodyk types.CustodyKeeper + tk types.TokensKeeper } // NewKeeper creates a recovery keeper @@ -35,6 +36,7 @@ func NewKeeper(cdc codec.BinaryCodec, key storetypes.StoreKey, ck types.CollectivesKeeper, spk types.SpendingKeeper, custodyk types.CustodyKeeper, + tk types.TokensKeeper, ) Keeper { return Keeper{ @@ -48,6 +50,7 @@ func NewKeeper(cdc codec.BinaryCodec, key storetypes.StoreKey, ck: ck, spk: spk, custodyk: custodyk, + tk: tk, } } diff --git a/x/recovery/keeper/msg_server.go b/x/recovery/keeper/msg_server.go index 9dc0d4b34..23c8d4020 100644 --- a/x/recovery/keeper/msg_server.go +++ b/x/recovery/keeper/msg_server.go @@ -550,7 +550,7 @@ func (k msgServer) IssueRecoveryTokens(goCtx context.Context, msg *types.MsgIssu // issue 10'000'000 tokens recoveryTokenAmount := sdk.NewInt(10_000_000).Mul(sdk.NewInt(1000_000)) recoveryCoins := sdk.NewCoins(sdk.NewCoin(denom, recoveryTokenAmount)) - err = k.bk.MintCoins(ctx, types.ModuleName, recoveryCoins) + err = k.tk.MintCoins(ctx, types.ModuleName, recoveryCoins) if err != nil { return nil, err } @@ -608,7 +608,7 @@ func (k msgServer) BurnRecoveryTokens(goCtx context.Context, msg *types.MsgBurnR return nil, err } - err = k.bk.BurnCoins(ctx, types.ModuleName, sdk.NewCoins(msg.RrCoin)) + err = k.tk.BurnCoins(ctx, types.ModuleName, sdk.NewCoins(msg.RrCoin)) if err != nil { return nil, err } diff --git a/x/recovery/keeper/recovery.go b/x/recovery/keeper/recovery.go index d613a15ee..e57dc5ad0 100644 --- a/x/recovery/keeper/recovery.go +++ b/x/recovery/keeper/recovery.go @@ -1,16 +1,16 @@ package keeper import ( + errorsmod "cosmossdk.io/errors" "github.com/KiraCore/sekai/x/recovery/types" sdk "github.com/cosmos/cosmos-sdk/types" - sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" ) func (k Keeper) GetRecoveryRecord(ctx sdk.Context, address string) (types.RecoveryRecord, error) { store := ctx.KVStore(k.storeKey) bz := store.Get(types.RecoveryRecordKey(address)) if bz == nil { - return types.RecoveryRecord{}, sdkerrors.Wrapf(types.ErrRecoveryRecordDoesNotExist, "RecoveryRecord: %s does not exist", address) + return types.RecoveryRecord{}, errorsmod.Wrapf(types.ErrRecoveryRecordDoesNotExist, "RecoveryRecord: %s does not exist", address) } record := types.RecoveryRecord{} k.cdc.MustUnmarshal(bz, &record) @@ -58,7 +58,7 @@ func (k Keeper) GetRecoveryToken(ctx sdk.Context, address string) (types.Recover store := ctx.KVStore(k.storeKey) bz := store.Get(types.RecoveryTokenKey(address)) if bz == nil { - return types.RecoveryToken{}, sdkerrors.Wrapf(types.ErrRecoveryTokenDoesNotExist, "RecoveryToken: %s does not exist", address) + return types.RecoveryToken{}, errorsmod.Wrapf(types.ErrRecoveryTokenDoesNotExist, "RecoveryToken: %s does not exist", address) } recovery := types.RecoveryToken{} k.cdc.MustUnmarshal(bz, &recovery) @@ -69,7 +69,7 @@ func (k Keeper) GetRecoveryTokenByDenom(ctx sdk.Context, denom string) (types.Re store := ctx.KVStore(k.storeKey) bz := store.Get(types.RecoveryTokenByDenomKey(denom)) if bz == nil { - return types.RecoveryToken{}, sdkerrors.Wrapf(types.ErrRecoveryTokenDoesNotExist, "RecoveryTokenByDenom: %s does not exist", denom) + return types.RecoveryToken{}, errorsmod.Wrapf(types.ErrRecoveryTokenDoesNotExist, "RecoveryTokenByDenom: %s does not exist", denom) } address := string(bz) return k.GetRecoveryToken(ctx, address) diff --git a/x/recovery/types/expected_keepers.go b/x/recovery/types/expected_keepers.go index eb8b01d2c..fd049b989 100644 --- a/x/recovery/types/expected_keepers.go +++ b/x/recovery/types/expected_keepers.go @@ -7,6 +7,7 @@ import ( multistakingtypes "github.com/KiraCore/sekai/x/multistaking/types" spendingtypes "github.com/KiraCore/sekai/x/spending/types" stakingtypes "github.com/KiraCore/sekai/x/staking/types" + tokenstypes "github.com/KiraCore/sekai/x/tokens/types" sdk "github.com/cosmos/cosmos-sdk/types" auth "github.com/cosmos/cosmos-sdk/x/auth/types" ) @@ -127,3 +128,10 @@ type CustodyKeeper interface { GetCustodyPoolByAddress(ctx sdk.Context, address sdk.AccAddress) *custodytypes.TransactionPool DropCustodyPool(ctx sdk.Context, addr sdk.AccAddress) } + +// TokensKeeper defines expected interface needed from tokens keeper +type TokensKeeper interface { + MintCoins(ctx sdk.Context, moduleName string, amt sdk.Coins) error + BurnCoins(ctx sdk.Context, moduleName string, amt sdk.Coins) error + GetTokenInfo(ctx sdk.Context, denom string) *tokenstypes.TokenInfo +} diff --git a/x/slashing/client/cli/query.go b/x/slashing/client/cli/query.go index b02cf5742..b6536a81c 100644 --- a/x/slashing/client/cli/query.go +++ b/x/slashing/client/cli/query.go @@ -25,7 +25,6 @@ func GetQueryCmd() *cobra.Command { slashingQueryCmd.AddCommand( GetCmdQuerySigningInfo(), - GetCmdQueryParams(), GetCmdQuerySigningInfos(), GetCmdQuerySlashProposals(), GetCmdQuerySlashedStakingPools(), @@ -103,36 +102,6 @@ $ query slashing signing-infos return cmd } -// GetCmdQueryParams implements a command to fetch slashing parameters. -func GetCmdQueryParams() *cobra.Command { - cmd := &cobra.Command{ - Use: "params", - Short: "Query the current slashing parameters", - Args: cobra.NoArgs, - Long: strings.TrimSpace(`Query genesis parameters for the slashing module: - -$ query slashing params -`), - RunE: func(cmd *cobra.Command, args []string) error { - clientCtx := client.GetClientContextFromCmd(cmd) - - queryClient := types.NewQueryClient(clientCtx) - - params := &types.QueryParamsRequest{} - res, err := queryClient.Params(context.Background(), params) - if err != nil { - return err - } - - return clientCtx.PrintProto(&res.Params) - }, - } - - flags.AddQueryFlagsToCmd(cmd) - - return cmd -} - // GetCmdQuerySlashProposals implements a command to fetch slash proposals. func GetCmdQuerySlashProposals() *cobra.Command { cmd := &cobra.Command{ diff --git a/x/slashing/genesis.go b/x/slashing/genesis.go index 42aa8fdcd..31d8bf0e9 100644 --- a/x/slashing/genesis.go +++ b/x/slashing/genesis.go @@ -28,15 +28,12 @@ func InitGenesis(ctx sdk.Context, keeper keeper.Keeper, stakingKeeper types.Stak } keeper.SetValidatorSigningInfo(ctx, address, info.ValidatorSigningInfo) } - - keeper.SetParams(ctx, data.Params) } // ExportGenesis writes the current store values // to a genesis file, which can be imported again // with InitGenesis func ExportGenesis(ctx sdk.Context, keeper keeper.Keeper) (data *types.GenesisState) { - params := keeper.GetParams(ctx) signingInfos := make([]types.SigningInfo, 0) keeper.IterateValidatorSigningInfos(ctx, func(address sdk.ConsAddress, info types.ValidatorSigningInfo) (stop bool) { bechAddr := address.String() @@ -48,5 +45,5 @@ func ExportGenesis(ctx sdk.Context, keeper keeper.Keeper) (data *types.GenesisSt return false }) - return types.NewGenesisState(params, signingInfos) + return types.NewGenesisState(signingInfos) } diff --git a/x/slashing/handler.go b/x/slashing/handler.go index 522e993fd..a70d31e98 100644 --- a/x/slashing/handler.go +++ b/x/slashing/handler.go @@ -1,6 +1,7 @@ package slashing import ( + errorsmod "cosmossdk.io/errors" "github.com/KiraCore/sekai/x/slashing/keeper" "github.com/KiraCore/sekai/x/slashing/types" sdk "github.com/cosmos/cosmos-sdk/types" @@ -28,7 +29,7 @@ func NewHandler(k keeper.Keeper) sdk.Handler { res, err := msgServer.RefuteSlashingProposal(sdk.WrapSDKContext(ctx), msg) return sdk.WrapServiceResult(ctx, res, err) default: - return nil, sdkerrors.Wrapf(sdkerrors.ErrUnknownRequest, "unrecognized %s message type: %T", types.ModuleName, msg) + return nil, errorsmod.Wrapf(sdkerrors.ErrUnknownRequest, "unrecognized %s message type: %T", types.ModuleName, msg) } } } diff --git a/x/slashing/keeper/activate.go b/x/slashing/keeper/activate.go index b756510e5..3f8340e84 100644 --- a/x/slashing/keeper/activate.go +++ b/x/slashing/keeper/activate.go @@ -4,9 +4,9 @@ import ( "fmt" "time" + errorsmod "cosmossdk.io/errors" "github.com/KiraCore/sekai/x/slashing/types" sdk "github.com/cosmos/cosmos-sdk/types" - sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" ) // Activate calls the staking Activate function to activate a validator if the @@ -19,7 +19,7 @@ func (k Keeper) Activate(ctx sdk.Context, validatorAddr sdk.ValAddress) error { // cannot be activated if not inactivated if !validator.IsInactivated() { - return sdkerrors.Wrap(types.ErrValidatorNotInactivated, "Can NOT activate NOT inactivated validator") + return errorsmod.Wrap(types.ErrValidatorNotInactivated, "Can NOT activate NOT inactivated validator") } consAddr := validator.GetConsAddr() @@ -36,7 +36,7 @@ func (k Keeper) Activate(ctx sdk.Context, validatorAddr sdk.ValAddress) error { // cannot be activated until out of inactive period finish if ctx.BlockTime().Before(signInfo.InactiveUntil) { duration := signInfo.InactiveUntil.Sub(ctx.BlockTime()) - return sdkerrors.Wrap(types.ErrValidatorInactivated, fmt.Sprintf("Can NOT activate inactivate validator, jail time remaining %d seconds", duration/time.Second)) + return errorsmod.Wrap(types.ErrValidatorInactivated, fmt.Sprintf("Can NOT activate inactivate validator, jail time remaining %d seconds", duration/time.Second)) } // automatically set the mischance to 0 and last_present_block to latest_block_height @@ -58,17 +58,17 @@ func (k Keeper) Pause(ctx sdk.Context, validatorAddr sdk.ValAddress) error { // cannot be paused if not paused already if validator.IsJailed() { - return sdkerrors.Wrap(types.ErrValidatorJailed, "Can NOT pause jailed validator") + return errorsmod.Wrap(types.ErrValidatorJailed, "Can NOT pause jailed validator") } // cannot be paused if not paused already if validator.IsInactivated() { - return sdkerrors.Wrap(types.ErrValidatorInactivated, "Can NOT pause inactivated validator") + return errorsmod.Wrap(types.ErrValidatorInactivated, "Can NOT pause inactivated validator") } // cannot be paused if not paused already if validator.IsPaused() { - return sdkerrors.Wrap(types.ErrValidatorPaused, "Can NOT pause already paused validator") + return errorsmod.Wrap(types.ErrValidatorPaused, "Can NOT pause already paused validator") } k.sk.Pause(ctx, validator.ValKey) @@ -84,7 +84,7 @@ func (k Keeper) Unpause(ctx sdk.Context, validatorAddr sdk.ValAddress) error { // cannot be unpaused if not paused if !validator.IsPaused() { - return sdkerrors.Wrap(types.ErrValidatorNotPaused, "Can NOT pause inactivated validator") + return errorsmod.Wrap(types.ErrValidatorNotPaused, "Can NOT unpause NOT paused validator") } k.sk.Unpause(ctx, validator.ValKey) diff --git a/x/slashing/keeper/grpc_query.go b/x/slashing/keeper/grpc_query.go index 0bdf42d1a..f256f12c7 100644 --- a/x/slashing/keeper/grpc_query.go +++ b/x/slashing/keeper/grpc_query.go @@ -17,17 +17,6 @@ import ( var _ types.QueryServer = Keeper{} -func (k Keeper) Params(c context.Context, req *types.QueryParamsRequest) (*types.QueryParamsResponse, error) { - if req == nil { - return nil, status.Errorf(codes.InvalidArgument, "empty request") - } - - ctx := sdk.UnwrapSDKContext(c) - params := k.GetParams(ctx) - - return &types.QueryParamsResponse{Params: params}, nil -} - func (k Keeper) SigningInfo(c context.Context, req *types.QuerySigningInfoRequest) (*types.QuerySigningInfoResponse, error) { if req == nil { return nil, status.Errorf(codes.InvalidArgument, "empty request") diff --git a/x/slashing/keeper/infractions.go b/x/slashing/keeper/infractions.go index 13b717ae7..a158d4b74 100644 --- a/x/slashing/keeper/infractions.go +++ b/x/slashing/keeper/infractions.go @@ -2,6 +2,7 @@ package keeper import ( "fmt" + "time" "github.com/cometbft/cometbft/crypto" @@ -91,7 +92,7 @@ func (k Keeper) HandleValidatorSignature(ctx sdk.Context, addr crypto.Address, p ), ) k.sk.Inactivate(ctx, validator.ValKey) - signInfo.InactiveUntil = ctx.BlockHeader().Time.Add(k.DowntimeInactiveDuration(ctx)) + signInfo.InactiveUntil = ctx.BlockHeader().Time.Add(time.Second * time.Duration(properties.DowntimeInactiveDuration)) } // Set the updated signing info diff --git a/x/slashing/keeper/keeper.go b/x/slashing/keeper/keeper.go index d78afbb71..cddd0955c 100644 --- a/x/slashing/keeper/keeper.go +++ b/x/slashing/keeper/keeper.go @@ -17,29 +17,22 @@ import ( // Keeper of the slashing store type Keeper struct { - storeKey storetypes.StoreKey - cdc codec.BinaryCodec - sk types.StakingKeeper - gk types.GovKeeper - msk types.MultiStakingKeeper - paramspace types.ParamSubspace - hooks types.SlashingHooks + storeKey storetypes.StoreKey + cdc codec.BinaryCodec + sk types.StakingKeeper + gk types.GovKeeper + msk types.MultiStakingKeeper + hooks types.SlashingHooks } // NewKeeper creates a slashing keeper -func NewKeeper(cdc codec.BinaryCodec, key storetypes.StoreKey, sk types.StakingKeeper, msk types.MultiStakingKeeper, gk types.GovKeeper, paramspace types.ParamSubspace) Keeper { - // set KeyTable if it has not already been set - if !paramspace.HasKeyTable() { - paramspace = paramspace.WithKeyTable(types.ParamKeyTable()) - } - +func NewKeeper(cdc codec.BinaryCodec, key storetypes.StoreKey, sk types.StakingKeeper, msk types.MultiStakingKeeper, gk types.GovKeeper) Keeper { return Keeper{ - storeKey: key, - cdc: cdc, - sk: sk, - msk: msk, - gk: gk, - paramspace: paramspace, + storeKey: key, + cdc: cdc, + sk: sk, + msk: msk, + gk: gk, } } diff --git a/x/slashing/keeper/keeper_test.go b/x/slashing/keeper/keeper_test.go index 8411b9733..22b41ac58 100644 --- a/x/slashing/keeper/keeper_test.go +++ b/x/slashing/keeper/keeper_test.go @@ -10,7 +10,6 @@ import ( simapp "github.com/KiraCore/sekai/app" appparams "github.com/KiraCore/sekai/app/params" - "github.com/KiraCore/sekai/x/slashing/testslashing" "github.com/KiraCore/sekai/x/staking" "github.com/KiraCore/sekai/x/staking/teststaking" stakingtypes "github.com/KiraCore/sekai/x/staking/types" @@ -214,7 +213,10 @@ func TestValidatorDippingInAndOut(t *testing.T) { // initial setup app := simapp.Setup(false) ctx := app.BaseApp.NewContext(false, tmproto.Header{}) - app.CustomSlashingKeeper.SetParams(ctx, testslashing.TestParams()) + properties := app.CustomGovKeeper.GetNetworkProperties(ctx) + properties.DowntimeInactiveDuration = 60 * 60 + err := app.CustomGovKeeper.SetNetworkProperties(ctx, properties) + require.NoError(t, err) power := int64(100) @@ -279,7 +281,7 @@ func TestValidatorDippingInAndOut(t *testing.T) { ctx = ctx.WithBlockHeight(height) // Try pausing on inactive node here, should fail - err := app.CustomSlashingKeeper.Pause(ctx, valAddr) + err = app.CustomSlashingKeeper.Pause(ctx, valAddr) require.Error(t, err) // validator rejoins and starts signing again @@ -358,8 +360,11 @@ func TestValidatorLifecycle(t *testing.T) { // initial setup app := simapp.Setup(false) ctx := app.BaseApp.NewContext(false, tmproto.Header{}) - app.CustomSlashingKeeper.SetParams(ctx, testslashing.TestParams()) + properties := app.CustomGovKeeper.GetNetworkProperties(ctx) + properties.DowntimeInactiveDuration = 60 * 60 + err := app.CustomGovKeeper.SetNetworkProperties(ctx, properties) + require.NoError(t, err) power := int64(100) @@ -538,7 +543,7 @@ func TestValidatorLifecycle(t *testing.T) { require.True(t, found) require.Equal(t, consAddr.String(), signInfo.Address) require.Equal(t, int64(0), signInfo.StartHeight) - require.Equal(t, ctx.BlockTime().Add(app.CustomSlashingKeeper.DowntimeInactiveDuration(ctx)).String(), signInfo.InactiveUntil.String()) + require.Equal(t, ctx.BlockTime().Add(time.Second*time.Duration(properties.DowntimeInactiveDuration)).String(), signInfo.InactiveUntil.String()) require.Equal(t, int64(0), signInfo.MischanceConfidence) require.Equal(t, int64(0), signInfo.Mischance) require.Equal(t, int64(5000), signInfo.LastPresentBlock) @@ -563,7 +568,7 @@ func TestValidatorLifecycle(t *testing.T) { require.True(t, found) require.Equal(t, consAddr.String(), signInfo.Address) require.Equal(t, int64(0), signInfo.StartHeight) - require.Equal(t, ctx.BlockTime().Add(app.CustomSlashingKeeper.DowntimeInactiveDuration(ctx)).String(), signInfo.InactiveUntil.String()) + require.Equal(t, ctx.BlockTime().Add(time.Second*time.Duration(properties.DowntimeInactiveDuration)).String(), signInfo.InactiveUntil.String()) require.Equal(t, int64(10), signInfo.MischanceConfidence) require.Equal(t, int64(111), signInfo.Mischance) require.Equal(t, int64(5000), signInfo.LastPresentBlock) @@ -571,7 +576,7 @@ func TestValidatorLifecycle(t *testing.T) { require.Equal(t, int64(101), signInfo.ProducedBlocksCounter) // Unjail and check changes - unjailTime := ctx.BlockTime().Add(app.CustomSlashingKeeper.DowntimeInactiveDuration(ctx)) + unjailTime := ctx.BlockTime().Add(time.Second * time.Duration(properties.DowntimeInactiveDuration)) app.CustomStakingKeeper.Unjail(ctx, valAddr) tstaking.CheckValidator(valAddr, stakingtypes.Inactive) signInfo, found = app.CustomSlashingKeeper.GetValidatorSigningInfo(ctx, consAddr) diff --git a/x/slashing/keeper/params.go b/x/slashing/keeper/params.go deleted file mode 100644 index bbc0c80d4..000000000 --- a/x/slashing/keeper/params.go +++ /dev/null @@ -1,25 +0,0 @@ -package keeper - -import ( - "time" - - "github.com/KiraCore/sekai/x/slashing/types" - sdk "github.com/cosmos/cosmos-sdk/types" -) - -// DowntimeInactiveDuration - Downtime unbond duration -func (k Keeper) DowntimeInactiveDuration(ctx sdk.Context) (res time.Duration) { - k.paramspace.Get(ctx, types.KeyDowntimeInactiveDuration, &res) - return -} - -// GetParams returns the total set of slashing parameters. -func (k Keeper) GetParams(ctx sdk.Context) (params types.Params) { - k.paramspace.GetParamSet(ctx, ¶ms) - return params -} - -// SetParams sets the slashing parameters to the param space. -func (k Keeper) SetParams(ctx sdk.Context, params types.Params) { - k.paramspace.SetParamSet(ctx, ¶ms) -} diff --git a/x/slashing/types/genesis.go b/x/slashing/types/genesis.go index 72a20a614..f213ee522 100644 --- a/x/slashing/types/genesis.go +++ b/x/slashing/types/genesis.go @@ -1,17 +1,8 @@ package types -import ( - "fmt" - "time" -) - // NewGenesisState creates a new GenesisState object -func NewGenesisState( - params Params, signingInfos []SigningInfo, -) *GenesisState { - +func NewGenesisState(signingInfos []SigningInfo) *GenesisState { return &GenesisState{ - Params: params, SigningInfos: signingInfos, } } @@ -19,7 +10,6 @@ func NewGenesisState( // DefaultGenesisState - default GenesisState used by Cosmos Hub func DefaultGenesisState() *GenesisState { return &GenesisState{ - Params: DefaultParams(), SigningInfos: []SigningInfo{}, } } @@ -27,10 +17,5 @@ func DefaultGenesisState() *GenesisState { // ValidateGenesis validates the slashing genesis parameters func ValidateGenesis(data GenesisState) error { - downtimeInactive := data.Params.DowntimeInactiveDuration - if downtimeInactive < 1*time.Minute { - return fmt.Errorf("downtime unblond duration must be at least 1 minute, is %s", downtimeInactive.String()) - } - return nil } diff --git a/x/slashing/types/genesis.pb.go b/x/slashing/types/genesis.pb.go index 74e585a66..82e1beb30 100644 --- a/x/slashing/types/genesis.pb.go +++ b/x/slashing/types/genesis.pb.go @@ -25,11 +25,9 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package // GenesisState defines the slashing module's genesis state. type GenesisState struct { - // params defines all the paramaters of related to deposit. - Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"` // signing_infos represents a map between validator addresses and their // signing infos. - SigningInfos []SigningInfo `protobuf:"bytes,2,rep,name=signing_infos,json=signingInfos,proto3" json:"signing_infos" yaml:"signing_infos"` + SigningInfos []SigningInfo `protobuf:"bytes,1,rep,name=signing_infos,json=signingInfos,proto3" json:"signing_infos" yaml:"signing_infos"` } func (m *GenesisState) Reset() { *m = GenesisState{} } @@ -65,13 +63,6 @@ func (m *GenesisState) XXX_DiscardUnknown() { var xxx_messageInfo_GenesisState proto.InternalMessageInfo -func (m *GenesisState) GetParams() Params { - if m != nil { - return m.Params - } - return Params{} -} - func (m *GenesisState) GetSigningInfos() []SigningInfo { if m != nil { return m.SigningInfos @@ -144,28 +135,26 @@ func init() { } var fileDescriptor_feff3f0a5d59571a = []byte{ - // 331 bytes of a gzipped FileDescriptorProto + // 304 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x52, 0xce, 0xce, 0x2c, 0x4a, 0xd4, 0x2f, 0xce, 0x49, 0x2c, 0xce, 0xc8, 0xcc, 0x4b, 0xd7, 0x2f, 0x33, 0x4c, 0x4a, 0x2d, 0x49, 0x34, 0xd4, 0x4f, 0x4f, 0xcd, 0x4b, 0x2d, 0xce, 0x2c, 0xd6, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x05, 0x29, 0xd2, 0x83, 0x29, 0x92, 0x12, 0x49, 0xcf, 0x4f, 0xcf, 0x07, 0xcb, 0xe8, 0x83, - 0x58, 0x10, 0x45, 0x52, 0x2a, 0xd8, 0x4d, 0x82, 0x09, 0x40, 0x54, 0x29, 0x2d, 0x62, 0xe4, 0xe2, - 0x71, 0x87, 0x18, 0x1e, 0x5c, 0x92, 0x58, 0x92, 0x2a, 0x64, 0xcc, 0xc5, 0x56, 0x90, 0x58, 0x94, - 0x98, 0x5b, 0x2c, 0xc1, 0xa8, 0xc0, 0xa8, 0xc1, 0x6d, 0x24, 0xaa, 0x87, 0x62, 0x99, 0x5e, 0x00, - 0x58, 0xd2, 0x89, 0xe5, 0xc4, 0x3d, 0x79, 0x86, 0x20, 0xa8, 0x52, 0xa1, 0x58, 0x2e, 0xde, 0xe2, - 0xcc, 0xf4, 0xbc, 0xcc, 0xbc, 0xf4, 0xf8, 0xcc, 0xbc, 0xb4, 0xfc, 0x62, 0x09, 0x26, 0x05, 0x66, - 0x0d, 0x6e, 0x23, 0x29, 0x34, 0xbd, 0xc1, 0x10, 0x35, 0x9e, 0x79, 0x69, 0xf9, 0x4e, 0x32, 0x20, - 0x03, 0x3e, 0xdd, 0x93, 0x17, 0xa9, 0x4c, 0xcc, 0xcd, 0xb1, 0x52, 0x42, 0xd1, 0xae, 0x14, 0xc4, - 0x53, 0x8c, 0x50, 0x5a, 0xac, 0xb4, 0x8a, 0x91, 0x8b, 0x1b, 0x49, 0xaf, 0x90, 0x04, 0x17, 0x7b, - 0x62, 0x4a, 0x4a, 0x51, 0x6a, 0x31, 0xc4, 0x91, 0x9c, 0x41, 0x30, 0xae, 0x50, 0x03, 0x23, 0x97, - 0x58, 0x59, 0x62, 0x4e, 0x66, 0x4a, 0x62,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xf7, 0xe4, 0x45, 0x2a, 0x13, 0x73, 0x73, 0xac, 0x94, 0x50, 0xb4, 0x2b, 0x05, + 0xf1, 0x14, 0x23, 0x94, 0x16, 0x2b, 0xad, 0x62, 0xe4, 0xe2, 0x46, 0xd2, 0x2b, 0x24, 0xc1, 0xc5, + 0x9e, 0x98, 0x92, 0x52, 0x94, 0x5a, 0x0c, 0xb2, 0x88, 0x51, 0x83, 0x33, 0x08, 0xc6, 0x15, 0x6a, + 0x60, 0xe4, 0x12, 0x2b, 0x4b, 0xcc, 0xc9, 0x4c, 0x49, 0x2c, 0xc9, 0x2f, 0x8a, 0x47, 0x36, 0x54, + 0x82, 0x49, 0x81, 0x51, 0x83, 0xdb, 0x48, 0x19, 0xcd, 0x49, 0x61, 0x30, 0xc5, 0xc8, 0x6e, 0x53, + 0x85, 0xba, 0x4d, 0x16, 0xe2, 0x36, 0xec, 0x06, 0x2a, 0x05, 0x89, 0x94, 0x61, 0xd3, 0xec, 0x72, + 0xe2, 0x91, 0x1c, 0xe3, 0x85, 0x47, 0x72, 0x8c, 0x0f, 0x1e, 0xc9, 0x31, 0x4e, 0x78, 0x2c, 0xc7, + 0x70, 0xe1, 0xb1, 0x1c, 0xc3, 0x8d, 0xc7, 0x72, 0x0c, 0x51, 0x5a, 0xe9, 0x99, 0x25, 0x19, 0xa5, + 0x49, 0x7a, 0xc9, 0xf9, 0xb9, 0xfa, 0xde, 0x99, 0x45, 0x89, 0xce, 0xf9, 0x45, 0xa9, 0xfa, 0xc5, + 0xa9, 0xd9, 0x89, 0x99, 0xfa, 0x15, 0x88, 0x20, 0x2f, 0xa9, 0x2c, 0x48, 0x2d, 0x4e, 0x62, 0x03, + 0x07, 0xb4, 0x31, 0x20, 0x00, 0x00, 0xff, 0xff, 0x3e, 0xe0, 0x20, 0x4e, 0xda, 0x01, 0x00, 0x00, } func (m *GenesisState) Marshal() (dAtA []byte, err error) { @@ -199,19 +188,9 @@ func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error) { i = encodeVarintGenesis(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0x12 + dAtA[i] = 0xa } } - { - size, err := m.Params.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenesis(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa return len(dAtA) - i, nil } @@ -272,8 +251,6 @@ func (m *GenesisState) Size() (n int) { } var l int _ = l - l = m.Params.Size() - n += 1 + l + sovGenesis(uint64(l)) if len(m.SigningInfos) > 0 { for _, e := range m.SigningInfos { l = e.Size() @@ -334,39 +311,6 @@ func (m *GenesisState) Unmarshal(dAtA []byte) error { } switch fieldNum { case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenesis - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenesis - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenesis - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Params.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field SigningInfos", wireType) } diff --git a/x/slashing/types/query.pb.go b/x/slashing/types/query.pb.go index 2d145393a..0e1e9cfea 100644 --- a/x/slashing/types/query.pb.go +++ b/x/slashing/types/query.pb.go @@ -766,73 +766,72 @@ func init() { func init() { proto.RegisterFile("kira/slashing/v1beta1/query.proto", fileDescriptor_7e241c76ab2d5716) } var fileDescriptor_7e241c76ab2d5716 = []byte{ - // 1056 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x56, 0xc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 0x91, 0x81, 0x56, 0xa0, 0x10, 0x12, 0x9f, 0x1e, - 0x52, 0xe2, 0xf3, 0x52, 0xbe, 0x9a, 0xad, 0x17, 0xec, 0x71, 0x40, 0xdf, 0x01, 0x18, 0x17, 0x43, - 0x4b, 0x90, 0xed, 0x90, 0xa1, 0x90, 0x5d, 0xb0, 0xa3, 0xbf, 0x68, 0x19, 0xf2, 0x21, 0xee, 0x0e, - 0x48, 0x29, 0x23, 0x62, 0xf2, 0x61, 0x37, 0xb3, 0xa3, 0xed, 0xe6, 0xfe, 0x7e, 0x5c, 0xd1, 0x0c, - 0x0a, 0x37, 0x84, 0x8d, 0x07, 0xd4, 0xf5, 0xa8, 0xe7, 0x46, 0x5c, 0xca, 0x61, 0x54, 0x83, 0x6b, - 0x6d, 0xe6, 0xf1, 0x26, 0x76, 0x1c, 0x9f, 0x70, 0xae, 0x58, 0x8b, 0x51, 0xec, 0x9e, 0x0c, 0xa1, - 0xdb, 0xf0, 0x2c, 0xf5, 0xda, 0xdd, 0x81, 0x43, 0x9a, 0x21, 0xee, 0x52, 0x07, 0x07, 0xcc, 0x17, - 0x95, 0x16, 0xec, 0x25, 0xb5, 0xf0, 0x49, 0x1c, 0x37, 0x7e, 0xd6, 0xa0, 0x74, 0xbe, 0x96, 0x3a, - 0xb7, 0x03, 0x58, 0x0a, 0x71, 0xb7, 0xc9, 0xe5, 0x52, 0x33, 0x32, 0x4d, 0x9d, 0xe0, 0xcd, 0x33, - 0x56, 0x8f, 0x08, 0x13, 0x34, 0xea, 0x3c, 0x17, 0x43, 0xdc, 0x4d, 0x44, 0xd1, 0xdb, 0x50, 0x98, - 0x94, 0x55, 0xdc, 0x5a, 0x51, 0x6c, 0xea, 0x0d, 0x13, 0x7a, 0x46, 0x8c, 0x8a, 0x66, 0x9c, 0x64, - 0xfc, 0x9a, 0xa2, 0x39, 0x7e, 0x05, 0xd1, 0xd7, 0x1a, 0xc0, 0xb8, 0x59, 0x94, 0xdc, 0x35, 0x53, - 0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 0x28, 0x73, 0x9b, - 0xe2, 0x95, 0x47, 0x8f, 0x35, 0x40, 0xe7, 0x5b, 0x1a, 0x6d, 0xa6, 0x55, 0x9d, 0x3a, 0x1c, 0x74, - 0x73, 0x56, 0xb8, 0xd2, 0x78, 0x5b, 0x68, 0x5c, 0x45, 0x37, 0xa7, 0x68, 0x94, 0xfd, 0xad, 0x24, - 0xfe, 0xa4, 0xc1, 0x72, 0x5a, 0xcb, 0xa3, 0x54, 0x6b, 0x2e, 0x18, 0x20, 0xfa, 0x2b, 0xb3, 0x27, - 0x28, 0xa1, 0x9b, 0x42, 0xe8, 0x3a, 0x5a, 0x9d, 0x22, 0x94, 0x7a, 0x49, 0xa9, 0x8d, 0x77, 0x9f, - 0x1c, 0x97, 0xb5, 0xa7, 0xc7, 0x65, 0xed, 0xcf, 0xe3, 0xb2, 0xf6, 0xe8, 0xa4, 0x3c, 0xf7, 0xf4, - 0xa4, 0x3c, 0xf7, 0xfb, 0x49, 0x79, 0xee, 0xd3, 0x8d, 0xc4, 0xdd, 0xf4, 0x01, 0xf5, 0xf1, 0x3b, - 0xcc, 0x27, 0x16, 0x27, 0x1d, 0x4c, 0xad, 0x2f, 0xc6, 0xb4, 0xe2, 0x8e, 0x6a, 0xcd, 0x8b, 0x0f, - 0xc3, 0xed, 0x7f, 0x03, 0x00, 0x00, 0xff, 0xff, 0xf7, 0x7e, 0x0b, 0x5c, 0x2e, 0x0c, 0x00, 0x00, + // 1029 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x56, 0xcf, 0x6f, 0x1b, 0x45, + 0x14, 0xce, 0xfa, 0x47, 0xa9, 0x9f, 0x4b, 0x54, 0xa6, 0x41, 0x35, 0x4b, 0x64, 0x3b, 0xdb, 0x36, + 0x31, 0x29, 0xd9, 0xa5, 0x09, 0x45, 0x21, 0x08, 0x44, 0x0d, 0x1c, 0x02, 0x97, 0xb0, 0x01, 0x0e, + 0x48, 0x60, 0x8d, 0xbd, 0x93, 0xed, 0xc8, 0xeb, 0x9d, 0xed, 0xce, 0x7a, 0x85, 0x85, 0x90, 0x50, + 0xff, 0x01, 0x2a, 0x71, 0xe0, 0xc0, 0xa5, 0x12, 0x1c, 0xb8, 0xf2, 0x4f, 0xa0, 0x8a, 0x53, 0x25, + 0x2e, 0x9c, 0x02, 0x4a, 0x38, 0xf0, 0x27, 0xa0, 0x9e, 0xd0, 0xce, 0xcc, 0xda, 0xeb, 0x74, 0x9d, + 0x38, 0x82, 0x93, 0xbd, 0x6f, 0xbe, 0xf7, 0xde, 0x37, 0xdf, 0xcc, 0xf7, 0x76, 0x61, 0xa5, 0x4f, + 0x43, 0x6c, 0x71, 0x0f, 0xf3, 0xbb, 0xd4, 0x77, 0xad, 0xf8, 0x56, 0x97, 0x44, 0xf8, 0x96, 0x75, + 0x6f, 0x48, 0xc2, 0x91, 0x19, 0x84, 0x2c, 0x62, 0xe8, 0xd9, 0x04, 0x62, 0xa6, 0x10, 0x7d, 0xc9, + 0x65, 0x2e, 0x13, 0x2b, 0x56, 0xf2, 0x4f, 0x82, 0xf4, 0x65, 0x97, 0x31, 0xd7, 0x23, 0x16, 0x0e, + 0xa8, 0x85, 0x7d, 0x9f, 0x45, 0x38, 0xa2, 0xcc, 0xe7, 0x6a, 0xb5, 0xa1, 0x56, 0xc5, 0x53, 0x77, + 0x78, 0x60, 0x45, 0x74, 0x40, 0x78, 0x84, 0x07, 0x81, 0x02, 0xac, 0xf7, 0x18, 0x1f, 0x30, 0x6e, + 0x75, 0x31, 0x27, 0xb2, 0xf9, 0x98, 0x4a, 0x80, 0x5d, 0xea, 0x8b, 0x6a, 0x0a, 0x7b, 0x3d, 0x9f, + 0x72, 0x1a, 0x50, 0xa8, 0x9a, 0x44, 0x45, 0xb8, 0x9f, 0x80, 0x32, 0xfb, 0xd1, 0xaf, 0x8a, 0x15, + 0x97, 0xc5, 0x09, 0x9d, 0x80, 0x71, 0x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d, 0x2b, 0x1a, 0x05, 0x84, 0x2b, 0x23, 0x65, 0x32, 0xed, 0x4c, 0xcf, + 0xf3, 0x1d, 0xc0, 0x0f, 0x05, 0x78, 0x21, 0x67, 0x33, 0xea, 0x04, 0xde, 0x84, 0x92, 0x52, 0xbd, + 0x78, 0x3e, 0xd5, 0x45, 0x1a, 0x6a, 0x03, 0x8c, 0x19, 0xf0, 0x5a, 0x41, 0x14, 0x99, 0x47, 0xec, + 0x4c, 0x16, 0xba, 0x3f, 0x2d, 0x68, 0x51, 0x08, 0xba, 0x76, 0xa6, 0xa0, 0x72, 0x03, 0xed, 0xd7, + 0x9f, 0x1c, 0x36, 0x6e, 0x9f, 0x53, 0x51, 0x99, 0x9a, 0x95, 0xd4, 0x58, 0x06, 0x5d, 0x8a, 0x94, + 0x6c, 0x7d, 0x4f, 0x0d, 0xac, 0xf1, 0xd8, 0xf9, 0x18, 0x5e, 0xcc, 0x5d, 0x55, 0x22, 0xbe, 0x06, + 0x95, 0x74, 0xc6, 0x71, 0xa5, 0x24, 0x92, 0x22, 0xb8, 0x2c, 0x36, 0x53, 0x7c, 0x7a, 0xcf, 0xc6, + 0x50, 0x63, 0x05, 0x1a, 0x93, 0xb2, 0xc4, 0xd9, 0x97, 0x8a, 0xed, 0x31, 0x36, 0xe9, 0xfc, 0x39, + 0x34, 0x67, 0x43, 0x54, 0xfb, 0x1d, 0x28, 0x07, 0x49, 0x40, 0xb5, 0xae, 0xcb, 0xd6, 0x53, 0x33, + 0x35, 0x93, 0xa7, 0x68, 0xc8, 0x14, 0xa3, 0x09, 0x75, 0x51, 0xff, 0x4e, 0x2f, 0xa2, 0x31, 0xc9, + 0x63, 0xf0, 0x99, 0x22, 0x99, 0x87, 0xf8, 0x1f, 0x08, 0x18, 0x6a, 0x83, 0xbb, 0x3e, 0x9e, 0x49, + 0xa1, 0x03, 0x2b, 0xa7, 0x60, 0xfe, 0x3b, 0x89, 0xcd, 0x5f, 0x9e, 0x81, 0xb2, 0xe8,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d, 0xbf, 0xfb, 0xe8, 0xa8, 0xae, 0x3d, 0x3e, 0xaa, 0x6b, 0x7f, 0x1e, 0xd5, 0xb5, 0x07, + 0xc7, 0xf5, 0x85, 0xc7, 0xc7, 0xf5, 0x85, 0xdf, 0x8f, 0xeb, 0x0b, 0x9f, 0xae, 0x67, 0xde, 0x11, + 0x1f, 0xd0, 0x10, 0xbf, 0xc3, 0x42, 0x62, 0x71, 0xd2, 0xc7, 0xd4, 0xfa, 0x62, 0x52, 0x56, 0xbc, + 0x2b, 0xba, 0x17, 0xc4, 0x07, 0xda, 0xd6, 0xbf, 0x01, 0x00, 0x00, 0xff, 0xff, 0x86, 0x40, 0xee, + 0x48, 0xb6, 0x0b, 0x00, 0x00, } func (this *IdentityRecord) Equal(that interface{}) bool { @@ -891,8 +890,6 @@ const _ = grpc.SupportPackageIsVersion4 // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. type QueryClient interface { - // Params queries the parameters of slashing module - Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) // SigningInfo queries the signing info of given cons address SigningInfo(ctx context.Context, in *QuerySigningInfoRequest, opts ...grpc.CallOption) (*QuerySigningInfoResponse, error) // SigningInfos queries signing info of all validators @@ -915,15 +912,6 @@ func NewQueryClient(cc grpc1.ClientConn) QueryClient { return &queryClient{cc} } -func (c *queryClient) Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) { - out := new(QueryParamsResponse) - err := c.cc.Invoke(ctx, "/kira.slashing.Query/Params", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - func (c *queryClient) SigningInfo(ctx context.Context, in *QuerySigningInfoRequest, opts ...grpc.CallOption) (*QuerySigningInfoResponse, error) { out := new(QuerySigningInfoResponse) err := c.cc.Invoke(ctx, "/kira.slashing.Query/SigningInfo", in, out, opts...) @@ -980,8 +968,6 @@ func (c *queryClient) InactiveStakingPools(ctx context.Context, in *QueryInactiv // QueryServer is the server API for Query service. type QueryServer interface { - // Params queries the parameters of slashing module - Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) // SigningInfo queries the signing info of given cons address SigningInfo(context.Context, *QuerySigningInfoRequest) (*QuerySigningInfoResponse, error) // SigningInfos queries signing info of all validators @@ -1000,9 +986,6 @@ type QueryServer interface { type UnimplementedQueryServer struct { } -func (*UnimplementedQueryServer) Params(ctx context.Context, req *QueryParamsRequest) (*QueryParamsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Params not implemented") -} func (*UnimplementedQueryServer) SigningInfo(ctx context.Context, req *QuerySigningInfoRequest) (*QuerySigningInfoResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method SigningInfo not implemented") } @@ -1026,24 +1009,6 @@ func RegisterQueryServer(s grpc1.Server, srv QueryServer) { s.RegisterService(&_Query_serviceDesc, srv) } -func _Query_Params_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryParamsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).Params(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/kira.slashing.Query/Params", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).Params(ctx, req.(*QueryParamsRequest)) - } - return interceptor(ctx, in, info, handler) -} - func _Query_SigningInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(QuerySigningInfoRequest) if err := dec(in); err != nil { @@ -1156,10 +1121,6 @@ var _Query_serviceDesc = grpc.ServiceDesc{ ServiceName: "kira.slashing.Query", HandlerType: (*QueryServer)(nil), Methods: []grpc.MethodDesc{ - { - MethodName: "Params", - Handler: _Query_Params_Handler, - }, { MethodName: "SigningInfo", Handler: _Query_SigningInfo_Handler, diff --git a/x/slashing/types/query.pb.gw.go b/x/slashing/types/query.pb.gw.go index df9198059..235dea629 100644 --- a/x/slashing/types/query.pb.gw.go +++ b/x/slashing/types/query.pb.gw.go @@ -33,24 +33,6 @@ var _ = utilities.NewDoubleArray var _ = descriptor.ForMessage var _ = metadata.Join -func request_Query_Params_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryParamsRequest - var metadata runtime.ServerMetadata - - msg, err := client.Params(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_Query_Params_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryParamsRequest - var metadata runtime.ServerMetadata - - msg, err := server.Params(ctx, &protoReq) - return msg, metadata, err - -} - var ( filter_Query_SigningInfo_0 = &utilities.DoubleArray{Encoding: map[string]int{"cons_address": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} ) @@ -237,29 +219,6 @@ func local_request_Query_InactiveStakingPools_0(ctx context.Context, marshaler r // Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterQueryHandlerFromEndpoint instead. func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, server QueryServer) error { - mux.Handle("GET", pattern_Query_Params_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_Query_Params_0(rctx, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_Query_Params_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - mux.Handle("GET", pattern_Query_SigningInfo_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -439,26 +398,6 @@ func RegisterQueryHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc // "QueryClient" to call the correct interceptors. func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, client QueryClient) error { - mux.Handle("GET", pattern_Query_Params_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_Query_Params_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_Query_Params_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - mux.Handle("GET", pattern_Query_SigningInfo_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -583,8 +522,6 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie } var ( - pattern_Query_Params_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"kira", "slashing", "v1beta1", "params"}, "", runtime.AssumeColonVerbOpt(false))) - pattern_Query_SigningInfo_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"kira", "slashing", "v1beta1", "signing_infos", "cons_address"}, "", runtime.AssumeColonVerbOpt(false))) pattern_Query_SigningInfos_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"kira", "slashing", "v1beta1", "signing_infos"}, "", runtime.AssumeColonVerbOpt(false))) @@ -599,8 +536,6 @@ var ( ) var ( - forward_Query_Params_0 = runtime.ForwardResponseMessage - forward_Query_SigningInfo_0 = runtime.ForwardResponseMessage forward_Query_SigningInfos_0 = runtime.ForwardResponseMessage diff --git a/x/slashing/types/signing_info.go b/x/slashing/types/signing_info.go index fb4a5bb5b..47351ca63 100644 --- a/x/slashing/types/signing_info.go +++ b/x/slashing/types/signing_info.go @@ -9,6 +9,7 @@ import ( ) // NewValidatorSigningInfo creates a new ValidatorSigningInfo instance +// //nolint:interfacer func NewValidatorSigningInfo( consAddr sdk.ConsAddress, startHeight int64, diff --git a/x/spending/client/cli/tx.go b/x/spending/client/cli/tx.go index 94af250a5..6850e52da 100644 --- a/x/spending/client/cli/tx.go +++ b/x/spending/client/cli/tx.go @@ -126,7 +126,7 @@ func GetTxCreateSpendingPoolCmd() *cobra.Command { msg := types.NewMsgCreateSpendingPool( name, uint64(claimStart), uint64(claimEnd), rates, - uint64(voteQuorum), uint64(votePeriod), uint64(voteEnactment), + sdk.NewDecWithPrec(int64(voteQuorum), 2), uint64(votePeriod), uint64(voteEnactment), types.PermInfo{ OwnerRoles: ownerRoles, OwnerAccounts: ownerAccounts, @@ -380,7 +380,7 @@ func GetTxUpdateSpendingPoolProposalCmd() *cobra.Command { description, types.NewUpdateSpendingPoolProposal( name, uint64(claimStart), uint64(claimEnd), rates, - uint64(voteQuorum), uint64(votePeriod), uint64(voteEnactment), + sdk.NewDecWithPrec(int64(voteQuorum), 2), uint64(votePeriod), uint64(voteEnactment), types.PermInfo{ OwnerRoles: ownerRoles, OwnerAccounts: ownerAccounts, diff --git a/x/spending/keeper/abci_test.go b/x/spending/keeper/abci_test.go index 9d480e5a2..ca091a30d 100644 --- a/x/spending/keeper/abci_test.go +++ b/x/spending/keeper/abci_test.go @@ -25,7 +25,8 @@ func (suite *KeeperTestSuite) TestEndBlocker() { "spendingpool1", 0, 0, sdk.NewDecCoins(sdk.NewDecCoin("ukex", sdk.NewInt(1))), - 30, 86400, 3000, + sdk.NewDecWithPrec(30, 2), + 86400, 3000, types.PermInfo{ OwnerRoles: []uint64{1}, OwnerAccounts: []string{addr1.String()}, diff --git a/x/spending/keeper/spending_pool_test.go b/x/spending/keeper/spending_pool_test.go index c8bc63485..ddfc052c4 100644 --- a/x/spending/keeper/spending_pool_test.go +++ b/x/spending/keeper/spending_pool_test.go @@ -19,7 +19,7 @@ func (suite *KeeperTestSuite) TestSpendingPoolSetGet() { ClaimStart: 0, ClaimEnd: 0, Rates: sdk.NewDecCoins(sdk.NewDecCoin("ukex", sdk.NewInt(1))), - VoteQuorum: 30, + VoteQuorum: sdk.NewDecWithPrec(30, 2), VotePeriod: 3000, VoteEnactment: 1000, Owners: &types.PermInfo{ @@ -50,7 +50,7 @@ func (suite *KeeperTestSuite) TestSpendingPoolSetGet() { ClaimStart: 0, ClaimEnd: 0, Rates: sdk.NewDecCoins(sdk.NewDecCoin("ukex", sdk.NewInt(1))), - VoteQuorum: 30, + VoteQuorum: sdk.NewDecWithPrec(30, 2), VotePeriod: 3000, VoteEnactment: 1000, Owners: &types.PermInfo{ diff --git a/x/spending/proposal_handler.go b/x/spending/proposal_handler.go index cef3b2866..2d6e7d864 100644 --- a/x/spending/proposal_handler.go +++ b/x/spending/proposal_handler.go @@ -45,12 +45,12 @@ func (a ApplyUpdateSpendingPoolProposalHandler) AllowedAddresses(ctx sdk.Context return a.keeper.AllowedAddresses(ctx, *pool.Owners) } -func (a ApplyUpdateSpendingPoolProposalHandler) Quorum(ctx sdk.Context, proposal govtypes.Content) uint64 { +func (a ApplyUpdateSpendingPoolProposalHandler) Quorum(ctx sdk.Context, proposal govtypes.Content) sdk.Dec { p := proposal.(*types.UpdateSpendingPoolProposal) pool := a.keeper.GetSpendingPool(ctx, p.Name) if pool == nil { - return 0 + return sdk.ZeroDec() } return pool.VoteQuorum @@ -142,12 +142,12 @@ func (a ApplySpendingPoolDistributionProposalHandler) AllowedAddresses(ctx sdk.C return a.keeper.AllowedAddresses(ctx, *pool.Owners) } -func (a ApplySpendingPoolDistributionProposalHandler) Quorum(ctx sdk.Context, proposal govtypes.Content) uint64 { +func (a ApplySpendingPoolDistributionProposalHandler) Quorum(ctx sdk.Context, proposal govtypes.Content) sdk.Dec { p := proposal.(*types.SpendingPoolDistributionProposal) pool := a.keeper.GetSpendingPool(ctx, p.PoolName) if pool == nil { - return 0 + return sdk.ZeroDec() } return pool.VoteQuorum @@ -256,12 +256,12 @@ func (a ApplySpendingPoolWithdrawProposalHandler) AllowedAddresses(ctx sdk.Conte return a.keeper.AllowedAddresses(ctx, *pool.Owners) } -func (a ApplySpendingPoolWithdrawProposalHandler) Quorum(ctx sdk.Context, proposal govtypes.Content) uint64 { +func (a ApplySpendingPoolWithdrawProposalHandler) Quorum(ctx sdk.Context, proposal govtypes.Content) sdk.Dec { p := proposal.(*types.SpendingPoolWithdrawProposal) pool := a.keeper.GetSpendingPool(ctx, p.PoolName) if pool == nil { - return 0 + return sdk.ZeroDec() } return pool.VoteQuorum diff --git a/x/spending/types/events.go b/x/spending/types/events.go index 8815e01aa..c64725871 100644 --- a/x/spending/types/events.go +++ b/x/spending/types/events.go @@ -2,7 +2,5 @@ package types // tokens module events const ( - EventTypeUpsertTokenAlias = "upsert_token_alias" - AttributeKeyDescription = "proposal_id" ) diff --git a/x/spending/types/genesis.go b/x/spending/types/genesis.go index c198bda53..85de96660 100644 --- a/x/spending/types/genesis.go +++ b/x/spending/types/genesis.go @@ -1,7 +1,10 @@ package types import ( + "encoding/json" + govtypes "github.com/KiraCore/sekai/x/gov/types" + "github.com/cosmos/cosmos-sdk/codec" sdk "github.com/cosmos/cosmos-sdk/types" ) @@ -14,7 +17,7 @@ func DefaultGenesis() *GenesisState { ClaimStart: 0, ClaimEnd: 0, Rates: sdk.DecCoins{sdk.NewDecCoin("ukex", sdk.NewInt(385))}, // 1k KEX per month per validator - VoteQuorum: 33, + VoteQuorum: sdk.NewDecWithPrec(33, 2), VotePeriod: 300, // 300s VoteEnactment: 300, // 300s Owners: &PermInfo{OwnerRoles: []uint64{govtypes.RoleValidator}}, @@ -26,3 +29,15 @@ func DefaultGenesis() *GenesisState { }, } } + +// GetGenesisStateFromAppState returns x/auth GenesisState given raw application +// genesis state. +func GetGenesisStateFromAppState(cdc codec.Codec, appState map[string]json.RawMessage) GenesisState { + var genesisState GenesisState + + if appState[ModuleName] != nil { + cdc.MustUnmarshalJSON(appState[ModuleName], &genesisState) + } + + return genesisState +} diff --git a/x/spending/types/msg.go b/x/spending/types/msg.go index 181a29719..85634c081 100644 --- a/x/spending/types/msg.go +++ b/x/spending/types/msg.go @@ -10,7 +10,7 @@ func NewMsgCreateSpendingPool( claimStart uint64, claimEnd uint64, rates sdk.DecCoins, - voteQuorum uint64, + voteQuorum sdk.Dec, votePeriod uint64, voteEnactment uint64, owners PermInfo, diff --git a/x/spending/types/pool.pb.go b/x/spending/types/pool.pb.go index 48888a480..2a6f1e499 100644 --- a/x/spending/types/pool.pb.go +++ b/x/spending/types/pool.pb.go @@ -288,7 +288,7 @@ type SpendingPool struct { // rate of distribution in the smallest token denomination per 1 second (this value can be a float number, smaller than actual denomination) Rates []github_com_cosmos_cosmos_sdk_types.DecCoin `protobuf:"bytes,5,rep,name=rates,proto3,customtype=github.com/cosmos/cosmos-sdk/types.DecCoin" json:"rates" yaml:"rates"` // pool specific % of owner accounts that must vote YES or NO for any of the pool proposals to be valid. - VoteQuorum uint64 `protobuf:"varint,6,opt,name=vote_quorum,json=voteQuorum,proto3" json:"vote_quorum,omitempty"` + VoteQuorum github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,6,opt,name=vote_quorum,json=voteQuorum,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"vote_quorum"` // period of time in seconds that any of the pool proposals must last before passing or being rejected VotePeriod uint64 `protobuf:"varint,7,opt,name=vote_period,json=votePeriod,proto3" json:"vote_period,omitempty"` // period of time that must pass before any of the pool proposal is enacted @@ -364,13 +364,6 @@ func (m *SpendingPool) GetClaimExpiry() uint64 { return 0 } -func (m *SpendingPool) GetVoteQuorum() uint64 { - if m != nil { - return m.VoteQuorum - } - return 0 -} - func (m *SpendingPool) GetVotePeriod() uint64 { if m != nil { return m.VotePeriod @@ -432,52 +425,53 @@ func init() { func init() { proto.RegisterFile("kira/spending/pool.proto", fileDescriptor_6027931ab19c9a21) } var fileDescriptor_6027931ab19c9a21 = []byte{ - // 714 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x54, 0x4d, 0x6b, 0x1b, 0x49, - 0x10, 0xd5, 0xd8, 0x23, 0x59, 0x6a, 0x49, 0xde, 0xdd, 0xde, 0x05, 0x37, 0x36, 0x2b, 0x29, 0x82, - 0x24, 0x22, 0x90, 0x19, 0x70, 0x0e, 0x01, 0x93, 0x43, 0x22, 0x59, 0x81, 0x60, 0x08, 0xce, 0x38, - 0x10, 0x93, 0x8b, 0x68, 0x8d, 0xda, 0x72, 0xe3, 0x99, 0xee, 0xc9, 0x74, 0x2b, 0xb6, 0xfe, 0x45, - 0x20, 0xd7, 0x1c, 0xf2, 0x73, 0x7c, 0xf4, 0x31, 0xe4, 0x60, 0x82, 0x7d, 0xc9, 0x39, 0xbf, 0x20, - 0x74, 0x4d, 0x8f, 0x3e, 0x02, 0x0e, 0x3e, 0xe4, 0xa4, 0xd6, 0xab, 0xf7, 0xaa, 0x6a, 0x5e, 0x15, - 0x85, 0xc8, 0x09, 0x4f, 0xa9, 0xaf, 0x12, 0x26, 0x46, 0x5c, 0x8c, 0xfd, 0x44, 0xca,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x69, 0x43, 0xa2, 0x76, 0x90, 0x25, 0x34, 0xad, - 0xbf, 0x97, 0x9a, 0x0d, 0xde, 0x4d, 0x64, 0x3a, 0x89, 0x49, 0x29, 0x6b, 0xdd, 0x40, 0xaf, 0x00, - 0x99, 0x11, 0x12, 0x96, 0x72, 0x39, 0x22, 0x6b, 0x73, 0xc2, 0x3e, 0x20, 0x66, 0xa3, 0x81, 0xc0, - 0x04, 0x0d, 0x75, 0xcc, 0x84, 0x26, 0x65, 0xe0, 0xd4, 0x0d, 0xda, 0xcf, 0x41, 0xec, 0xa3, 0x12, - 0xac, 0xb8, 0x22, 0x95, 0x96, 0xd3, 0xa9, 0x6e, 0x6f, 0xfc, 0x32, 0x8e, 0x7c, 0xe4, 0x81, 0xa5, - 0xe1, 0x3e, 0xaa, 0x0f, 0x99, 0x60, 0x47, 0x3c, 0xe4, 0x34, 0xe5, 0x4c, 0x11, 0x04, 0xba, 0xe6, - 0x0d, 0x63, 0x9c, 0xe9, 0x97, 0x55, 0x78, 0x0f, 0x95, 0x87, 0x34, 0xa2, 0x22, 0x64, 0x8a, 0x54, - 0xc1, 0x3d, 0xdf, 0xba, 0x77, 0xff, 0x16, 0xee, 0x19, 0xeb, 0x82, 0x59, 0x02, 0x33, 0xaa, 0xd1, - 0x54, 0xd0, 0x98, 0x87, 0x03, 0x63, 0x1f, 0xa9, 0xb5, 0x9c, 0x4e, 0x39, 0xa8, 0x5a, 0x2c, 0xa0, - 0x9a, 0x61, 0x0f, 0xfd, 0xbb, 0x48, 0xc9, 0x7d, 0xab, 0x83, 0x27, 0xff, 0x2c, 0x30, 0xad, 0x7d, - 0x4f, 0xd0, 0x16, 0x1c, 0x97, 0x25, 0x51, 0x48, 0xa3, 0x70, 0x60, 0x0e, 0x1c, 0x59, 0x07, 0xdd, - 0x86, 0xa1, 0xec, 0xce, 0xb5, 0x3d, 0x1a, 0x85, 0xaf, 0x79, 0xcc, 0xba, 0xbb, 0xe7, 0x57, 0x0d, - 0xe7, 0xe2, 0xaa, 0xe1, 0x7c, 0xbb, 0x6a, 0x38, 0x1f, 0xae, 0x1b, 0x85, 0x8b, 0xeb, 0x46, 0xe1, - 0xcb, 0x75, 0xa3, 0xf0, 0x76, 0x71, 0x37, 0xf6, 0x78, 0x4a, 0x7b, 0x32, 0x65, 0xbe, 0x62, 0x27, - 0x94, 0xfb, 0x67, 0xf3, 0x7b, 0x0b, 0x5f, 0x39, 0x2c, 0xc1, 0xad, 0x7c, 0xf4, 0x33, 0x00, 0x00, - 0xff, 0xff, 0xc4, 0xc1, 0x51, 0x35, 0x8d, 0x05, 0x00, 0x00, + // 723 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x54, 0x51, 0x6b, 0x13, 0x4b, + 0x14, 0xce, 0xb6, 0x9b, 0x34, 0x39, 0x49, 0x7a, 0xef, 0x9d, 0x7b, 0xa1, 0x43, 0xcb, 0x4d, 0x62, + 0x40, 0x0d, 0x82, 0xbb, 0x50, 0x1f, 0x84, 0xe2, 0x83, 0x26, 0x8d, 0x20, 0x05, 0xad, 0x5b, 0xc1, + 0xe2, 0x4b, 0x98, 0x6c, 0xa6, 0xe9, 0xd0, 0xdd, 0x9d, 0x75, 0x67, 0x63, 0x9b, 0x7f, 0x21, 0xf8, + 0x07, 0xfc, 0x39, 0x7d, 0xf0, 0xa1, 0x8f, 0xe2, 0x43, 0x91, 0xf6, 0xc5, 0x67, 0x7f, 0x81, 0xcc, + 0xd9, 0xd9, 0x34, 0x11, 0x2a, 0x45, 0x7c, 0xea, 0xf4, 0x3b, 0xdf, 0xf7, 0x9d, 0xc9, 0x77, 0xce, + 0x0e, 0xd0, 0x23, 0x91, 0x30, 0x57, 0xc5, 0x3c, 0x1a, 0x89, 0x68, 0xec, 0xc6, 0x52, 0x06, 0x4e, + 0x9c, 0xc8, 0x54, 0x92, 0xba, 0xae, 0x38, 0x79, 0x65, 0xbd, 0x39, 0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be, 0x5e, 0x34, 0xac, + 0xf7, 0x97, 0x8d, 0xc2, 0xd9, 0x65, 0xa3, 0xf0, 0xf9, 0xb2, 0x51, 0x78, 0x33, 0xbf, 0x4b, 0x3b, + 0x22, 0x61, 0x3d, 0x99, 0x70, 0x57, 0xf1, 0x23, 0x26, 0xdc, 0x93, 0xab, 0xf7, 0x19, 0x7f, 0xe5, + 0xb0, 0x84, 0x6f, 0xeb, 0x83, 0x1f, 0x01, 0x00, 0x00, 0xff, 0xff, 0x92, 0x8e, 0xa2, 0x88, 0xbd, + 0x05, 0x00, 0x00, } func (this *PermInfo) Equal(that interface{}) bool { @@ -917,11 +911,16 @@ func (m *SpendingPool) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x38 } - if m.VoteQuorum != 0 { - i = encodeVarintPool(dAtA, i, uint64(m.VoteQuorum)) - i-- - dAtA[i] = 0x30 + { + size := m.VoteQuorum.Size() + i -= size + if _, err := m.VoteQuorum.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintPool(dAtA, i, uint64(size)) } + i-- + dAtA[i] = 0x32 if len(m.Rates) > 0 { for iNdEx := len(m.Rates) - 1; iNdEx >= 0; iNdEx-- { { @@ -1089,9 +1088,8 @@ func (m *SpendingPool) Size() (n int) { n += 1 + l + sovPool(uint64(l)) } } - if m.VoteQuorum != 0 { - n += 1 + sovPool(uint64(m.VoteQuorum)) - } + l = m.VoteQuorum.Size() + n += 1 + l + sovPool(uint64(l)) if m.VotePeriod != 0 { n += 1 + sovPool(uint64(m.VotePeriod)) } @@ -1913,10 +1911,10 @@ func (m *SpendingPool) Unmarshal(dAtA []byte) error { } iNdEx = postIndex case 6: - if wireType != 0 { + if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field VoteQuorum", wireType) } - m.VoteQuorum = 0 + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowPool @@ -1926,11 +1924,26 @@ func (m *SpendingPool) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.VoteQuorum |= uint64(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthPool + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthPool + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.VoteQuorum.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex case 7: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field VotePeriod", wireType) diff --git a/x/spending/types/proposal.go b/x/spending/types/proposal.go index 2c0d8f942..da8d9fbe5 100644 --- a/x/spending/types/proposal.go +++ b/x/spending/types/proposal.go @@ -13,7 +13,7 @@ func NewUpdateSpendingPoolProposal( claimStart uint64, claimEnd uint64, rates sdk.DecCoins, - voteQuorum uint64, + voteQuorum sdk.Dec, votePeriod uint64, voteEnactment uint64, owners PermInfo, diff --git a/x/spending/types/proposal.pb.go b/x/spending/types/proposal.pb.go index fda1fdf8f..470cace2e 100644 --- a/x/spending/types/proposal.pb.go +++ b/x/spending/types/proposal.pb.go @@ -35,7 +35,7 @@ type UpdateSpendingPoolProposal struct { ClaimStart uint64 `protobuf:"varint,2,opt,name=claim_start,json=claimStart,proto3" json:"claim_start,omitempty"` ClaimEnd uint64 `protobuf:"varint,3,opt,name=claim_end,json=claimEnd,proto3" json:"claim_end,omitempty"` Rates []github_com_cosmos_cosmos_sdk_types.DecCoin `protobuf:"bytes,4,rep,name=rates,proto3,customtype=github.com/cosmos/cosmos-sdk/types.DecCoin" json:"rates" yaml:"rates"` - VoteQuorum uint64 `protobuf:"varint,5,opt,name=vote_quorum,json=voteQuorum,proto3" json:"vote_quorum,omitempty"` + VoteQuorum github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,5,opt,name=vote_quorum,json=voteQuorum,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"vote_quorum"` VotePeriod uint64 `protobuf:"varint,6,opt,name=vote_period,json=votePeriod,proto3" json:"vote_period,omitempty"` VoteEnactment uint64 `protobuf:"varint,7,opt,name=vote_enactment,json=voteEnactment,proto3" json:"vote_enactment,omitempty"` Owners PermInfo `protobuf:"bytes,8,opt,name=owners,proto3" json:"owners"` @@ -98,13 +98,6 @@ func (m *UpdateSpendingPoolProposal) GetClaimEnd() uint64 { return 0 } -func (m *UpdateSpendingPoolProposal) GetVoteQuorum() uint64 { - if m != nil { - return m.VoteQuorum - } - return 0 -} - func (m *UpdateSpendingPoolProposal) GetVotePeriod() uint64 { if m != nil { return m.VotePeriod @@ -260,44 +253,45 @@ func init() { func init() { proto.RegisterFile("kira/spending/proposal.proto", fileDescriptor_e006ef21562b5bc9) } var fileDescriptor_e006ef21562b5bc9 = []byte{ - // 592 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x53, 0xc1, 0x4f, 0x13, 0x4f, - 0x18, 0xed, 0x42, 0x81, 0x76, 0x0a, 0xbf, 0x5f, 0x5c, 0x4d, 0x1c, 0x81, 0x74, 0x6b, 0xa3, 0xb1, - 0x31, 0x61, 0x37, 0xd1, 0x78, 0xe1, 0x58, 0xe0, 0x40, 0x48, 0x4c, 0x5d, 0x62, 0x30, 0x5e, 0x9a, - 0xe9, 0xee, 0xc7, 0x32, 0xa1, 0x33, 0xdf, 0x3a, 0x33, 0x15, 0xfb, 0x5f, 0x78, 0xf5, 0xe6, 0x1f, - 0xe1, 0xd5, 0x3b, 0xf1, 0xc4, 0xd1, 0x78, 0x20, 0x06, 0x2e, 0x9e, 0xfd, 0x0b, 0xcc, 0xcc, 0x6e, - 0xa1, 0x94, 0x0b, 0xa7, 0xee, 0xbe, 0xf7, 0xbe, 0xd7, 0xf7, 0xcd, 0xbe, 0x21, 0xeb, 0xc7, 0x5c, - 0xb1, 0x48, 0xe7, 0x20, 0x53, 0x2e, 0xb3, 0x28, 0x57, 0x98, 0xa3, 0x66, 0xc3, 0x30, 0x57, 0x68, - 0xd0, 0x5f, 0xb1, 0x6c, 0x38, 0x61, 0x57, 0x1f, 0x64, 0x98, 0xa1, 0x63, 0x22, 0xfb, 0x54, 0x88, - 0x56, 0x83, 0x0c, 0x31, 0x1b, 0x42, 0xe4, 0xde, 0x06, 0xa3, 0xc3, 0xc8, 0x70, 0x01, 0xda, 0x30, - 0x91, 0x97, 0x82, 0x47, 0xb3, 0x02, 0x26, 0xc7, 0x13, 0x2a, 0x41, 0x2d, 0x50, 0xf7, 0x0b, 0xd3, - 0xe2, 0xa5, 0xa4, 0xe8, 0x4c, 0x32, 0xc4, 0x32, 0x55, 0xfb, 0x4b, 0x95, 0xac, 0xbe, 0xcd, 0x53, - 0x66, 0x60, 0xbf, 0x64, 0x7b, 0x88, 0xc3, 0x5e, 0x19, 0xdd, 0xf7, 0x49, 0x55, 0x32, 0x01, 0xd4, - 0x6b, 0x79, 0x9d, 0x7a, 0xec, 0x9e, 0xfd, 0x80, 0x34, 0x92, 0x21, 0xe3, 0xa2, 0xaf, 0x0d, 0x53, - 0x86, 0xce, 0xb5, 0xbc, 0x4e, 0x35, 0x26, 0x0e, 0xda, 0xb7, 0x88, 0xbf, 0x46, 0xea, 0x85, 0x00, - 0x64, 0x4a, 0xe7, 0x1d, 0x5d, 0x73, 0xc0, 0x8e, 0x4c, 0xfd, 0x77, 0x64, 0x41, 0x31, 0x03, 0x9a, - 0x56, 0x5b, 0xf3, 0x9d, 0x7a, 0xb7, 0x7b, 0x7a, 0x1e, 0x54, 0x7e, 0x9d, 0x07, 0xcf, 0x33, 0x6e, - 0x8e, 0x46, 0x83, 0x30, 0x41, 0x51, 0x46, 0x2f, 0x7f, 0x36, 0x74, 0x7a, 0x1c, 0x99, 0x71, 0x0e, - 0x3a, 0xdc, 0x86, 0x64, 0x0b, 0xb9, 0xfc, 0x7b, 0x1e, 0x2c, 0x8f, 0x99, 0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ba, 0x6d, 0x53, 0x7f, 0xaa, 0x25, 0x35, 0x0b, 0xbc, 0x66, 0x02, 0x6e, 0x3b, - 0x7e, 0xf7, 0xc8, 0xfa, 0xb4, 0xe5, 0x01, 0x37, 0x47, 0xa9, 0x62, 0x27, 0x77, 0xb2, 0xf3, 0x9f, - 0xcc, 0x1e, 0xe0, 0x9c, 0xad, 0xd0, 0xec, 0xc9, 0xec, 0x92, 0x25, 0x26, 0x70, 0x24, 0x8d, 0xa6, - 0xf3, 0xae, 0x62, 0x51, 0x59, 0xb1, 0x67, 0x77, 0xa8, 0x98, 0xed, 0x57, 0x3c, 0x99, 0xbf, 0x95, - 0xbf, 0xbb, 0x7d, 0x7a, 0xd1, 0xf4, 0xce, 0x2e, 0x9a, 0xde, 0xef, 0x8b, 0xa6, 0xf7, 0xf9, 0xb2, - 0x59, 0x39, 0xbb, 0x6c, 0x56, 0x7e, 0x5e, 0x36, 0x2b, 0xef, 0xa7, 0xfb, 0xbb, 0xc7, 0x15, 0xdb, - 0x42, 0x05, 0x91, 0x86, 0x63, 0xc6, 0xa3, 0x4f, 0xd7, 0x17, 0xcf, 0xfd, 0xc9, 0x60, 0xd1, 0x5d, - 0xbd, 0x97, 0xff, 0x02, 0x00, 0x00, 0xff, 0xff, 0x0e, 0x0d, 0x14, 0xe7, 0x30, 0x04, 0x00, 0x00, + // 605 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x53, 0x4f, 0x4f, 0x13, 0x4f, + 0x18, 0xee, 0x42, 0x81, 0x76, 0x0a, 0xbf, 0x5f, 0x1c, 0x4d, 0x5c, 0x81, 0x74, 0x6b, 0xe3, 0x9f, + 0xc6, 0x84, 0xdd, 0x44, 0xe3, 0x85, 0x63, 0x81, 0x03, 0x21, 0xd1, 0xba, 0xc4, 0x60, 0xbc, 0x34, + 0xd3, 0xdd, 0x97, 0x65, 0x42, 0x67, 0xde, 0x75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, 0x00, } func (this *UpdateSpendingPoolProposal) Equal(that interface{}) bool { @@ -336,7 +330,7 @@ func (this *UpdateSpendingPoolProposal) Equal(that interface{}) bool { return false } } - if this.VoteQuorum != that1.VoteQuorum { + if !this.VoteQuorum.Equal(that1.VoteQuorum) { return false } if this.VotePeriod != that1.VotePeriod { @@ -488,11 +482,16 @@ func (m *UpdateSpendingPoolProposal) MarshalToSizedBuffer(dAtA []byte) (int, err i-- dAtA[i] = 0x30 } - if m.VoteQuorum != 0 { - i = encodeVarintProposal(dAtA, i, uint64(m.VoteQuorum)) - i-- - dAtA[i] = 0x28 + { + size := m.VoteQuorum.Size() + i -= size + if _, err := m.VoteQuorum.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintProposal(dAtA, i, uint64(size)) } + i-- + dAtA[i] = 0x2a if len(m.Rates) > 0 { for iNdEx := len(m.Rates) - 1; iNdEx >= 0; iNdEx-- { { @@ -643,9 +642,8 @@ func (m *UpdateSpendingPoolProposal) Size() (n int) { n += 1 + l + sovProposal(uint64(l)) } } - if m.VoteQuorum != 0 { - n += 1 + sovProposal(uint64(m.VoteQuorum)) - } + l = m.VoteQuorum.Size() + n += 1 + l + sovProposal(uint64(l)) if m.VotePeriod != 0 { n += 1 + sovProposal(uint64(m.VotePeriod)) } @@ -845,10 +843,10 @@ func (m *UpdateSpendingPoolProposal) Unmarshal(dAtA []byte) error { } iNdEx = postIndex case 5: - if wireType != 0 { + if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field VoteQuorum", wireType) } - m.VoteQuorum = 0 + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowProposal @@ -858,11 +856,26 @@ func (m *UpdateSpendingPoolProposal) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.VoteQuorum |= uint64(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthProposal + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthProposal + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.VoteQuorum.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex case 6: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field VotePeriod", wireType) diff --git a/x/spending/types/tx.pb.go b/x/spending/types/tx.pb.go index 02819c005..4d2c881a4 100644 --- a/x/spending/types/tx.pb.go +++ b/x/spending/types/tx.pb.go @@ -39,7 +39,7 @@ type MsgCreateSpendingPool struct { // rate of distribution in the smallest token denomination per 1 second (this value can be a float number, smaller than actual denomination) Rates []github_com_cosmos_cosmos_sdk_types.DecCoin `protobuf:"bytes,5,rep,name=rates,proto3,customtype=github.com/cosmos/cosmos-sdk/types.DecCoin" json:"rates" yaml:"rates"` // pool specific % of owner accounts that must vote YES or NO for any of the pool proposals to be valid. - VoteQuorum uint64 `protobuf:"varint,6,opt,name=vote_quorum,json=voteQuorum,proto3" json:"vote_quorum,omitempty"` + VoteQuorum github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,6,opt,name=vote_quorum,json=voteQuorum,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"vote_quorum"` // period of time in seconds that any of the pool proposals must last before passing or being rejected VotePeriod uint64 `protobuf:"varint,7,opt,name=vote_period,json=votePeriod,proto3" json:"vote_period,omitempty"` // period of time that must pass before any of the pool proposal is enacted @@ -114,13 +114,6 @@ func (m *MsgCreateSpendingPool) GetClaimExpiry() uint64 { return 0 } -func (m *MsgCreateSpendingPool) GetVoteQuorum() uint64 { - if m != nil { - return m.VoteQuorum - } - return 0 -} - func (m *MsgCreateSpendingPool) GetVotePeriod() uint64 { if m != nil { return m.VotePeriod @@ -489,52 +482,53 @@ func init() { func init() { proto.RegisterFile("kira/spending/tx.proto", fileDescriptor_edfb840607cf4f3d) } var fileDescriptor_edfb840607cf4f3d = []byte{ - // 711 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x55, 0xcd, 0x4e, 0xdb, 0x4a, - 0x14, 0x8e, 0x49, 0xc8, 0x4d, 0x26, 0xe4, 0x4a, 0x18, 0x2e, 0xd7, 0x0a, 0xf7, 0xda, 0xb9, 0xbe, - 0x45, 0x8d, 0x28, 0xc4, 0x2a, 0x55, 0x17, 0xed, 0x32, 0x80, 0xaa, 0x0a, 0xa5, 0xa2, 0x66, 0xd1, - 0x9f, 0x4d, 0x34, 0x89, 0x0f, 0x66, 0x94, 0x78, 0xc6, 0x9d, 0x99, 0xb4, 0xe4, 0x29, 0xda, 0x55, - 0x1f, 0xa7, 0x6b, 0x96, 0x6c, 0x2a, 0x55, 0x5d, 0xa0, 0x0a, 0xde, 0xa0, 0x4f, 0x50, 0xcd, 0xc4, - 0x09, 0x49, 0xb0, 0x44, 0xda, 0xae, 0x6c, 0x7f, 0xe7, 0x3b, 0xdf, 0x39, 0x73, 0xce, 0x67, 0x1b, - 0xad, 0x75, 0x09, 0xc7, 0x9e, 0x88, 0x81, 0x06, 0x84, 0x86, 0x9e, 0x3c, 0xad, 0xc7, 0x9c, 0x49, - 0x66, 0x96, 0x15, 0x5e, 0x1f, 0xe1, 0x95, 0xd5, 0x90, 0x85, 0x4c, 0x47, 0x3c, 0x75, 0x37, 0x24, - 0x55, 0x9c, 0x90, 0xb1, 0xb0, 0x07, 0x9e, 0x7e, 0x6a, 0xf7, 0x8f, 0x3d, 0x49, 0x22, 0x10, 0x12, - 0x47, 0x71, 0x42, 0xb0, 0xa6, 0xd5, 0x63, 0xc6, 0x7a, 0xc3, 0x88, 0xfb, 0x29, 0x87, 0xfe, 0x6a, - 0x8a, 0x70, 0x97, 0x03, 0x96, 0x70, 0x94, 0x10, 0x0e, 0x19, 0xeb, 0x99, 0x26, 0xca, 0x51, 0x1c, - 0x81, 0x65, 0x54, 0x8d, 0x5a, 0xd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0x29, 0xdc, 0x2d, 0xb4, 0x79, 0xbb, 0xf4, 0xb8, 0x91, 0x03, 0xb4, 0xaa, 0x86, 0xac, - 0xdf, 0xb3, 0xdf, 0x1d, 0xa0, 0x6b, 0xa3, 0x7f, 0xd2, 0xc4, 0x46, 0xc5, 0x76, 0x3e, 0x67, 0x51, - 0xb6, 0x29, 0x42, 0xf3, 0x04, 0x99, 0x29, 0x9f, 0x85, 0x3b, 0x33, 0x86, 0x4c, 0x5d, 0x7e, 0x65, - 0x6b, 0x1e, 0xd6, 0xa8, 0xa2, 0xd9, 0x45, 0x2b, 0x69, 0xf6, 0xd8, 0xb8, 0x29, 0x92, 0x42, 0xab, - 0x6c, 0xcf, 0x45, 0x1b, 0x17, 0x7b, 0x6f, 0x20, 0xe7, 0xb6, 0x95, 0xde, 0xbf, 0x29, 0x79, 0x4b, - 0x4a, 0xe5, 0xd1, 0x4f, 0xa7, 0x8c, 0x3b, 0x02, 0xb4, 0x7c, 0x73, 0xb5, 0xff, 0xa7, 0x4c, 0x70, - 0x96, 0x54, 0xb9, 0x37, 0x07, 0x69, 0x54, 0xa6, 0xb1, 0x77, 0x76, 0x69, 0x1b, 0xe7, 0x97, 0xb6, - 0xf1, 0xed, 0xd2, 0x36, 0x3e, 0x5c, 0xd9, 0x99, 0xf3, 0x2b, 0x3b, 0xf3, 0xe5, 0xca, 0xce, 0xbc, - 0x9e, 0xfc, 0xbc, 0x1e, 0x10, 0x8e, 0x77, 0x19, 0x07, 0x4f, 0x40, 0x17, 0x13, 0xef, 0x74, 0xe2, - 0x9f, 0xa4, 0x5e, 0xa1, 0x76, 0x5e, 0xff, 0x37, 0x1e, 0xfc, 0x08, 0x00, 0x00, 0xff, 0xff, 0x7d, - 0x9c, 0x15, 0x04, 0xb1, 0x06, 0x00, 0x00, + // 721 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x55, 0x4f, 0x6f, 0xd3, 0x4e, + 0x10, 0x8d, 0x9b, 0x34, 0xbf, 0x64, 0xd3, 0xfc, 0xa4, 0x6e, 0x4b, 0xb1, 0x52, 0xb0, 0x83, 0xa1, + 0x10, 0x95, 0xd6, 0x16, 0x45, 0x1c, 0xe0, 0x98, 0xb6, 0x42, 0xa8, 0x0a, 0x14, 0xf7, 0xc0, 0x9f, + 0x4b, 0xe4, 0xc4, 0x53, 0x77, 0x95, 0xd8, 0x6b, 0x76, 0x37, 0xd0, 0x7c, 0x0a, 0x38, 0xf1, 0x99, + 0x7a, 0xec, 0x05, 0x09, 0x71, 0xa8, 0x50, 0x7b, 0xe7, 0xc0, 0x27, 0x40, 0xbb, 0x71, 0x42, 0x92, + 0x5a, 0x6a, 0x80, 0x93, 0xed, 0x37, 0x6f, 0xde, 0xcc, 0xce, 0x3c, 0xdb, 0x68, 0xa5, 0x43, 0x98, + 0xe7, 0xf0, 0x18, 0x22, 0x9f, 0x44, 0x81, 0x23, 0x8e, 0xed, 0x98, 0x51, 0x41, 0x71, 0x59, 0xe2, + 0xf6, 0x10, 0xaf, 0x2c, 0x07, 0x34, 0xa0, 0x2a, 0xe2, 0xc8, 0xbb, 0x01, 0xa9, 0x62, 0x06, 0x94, + 0x06, 0x5d, 0x70, 0xd4, 0x53, 0xab, 0x77, 0xe8, 0x08, 0x12, 0x02, 0x17, 0x5e, 0x18, 0x27, 0x04, + 0x7d, 0x52, 0x3d, 0xa6, 0xb4, 0x3b, 0x88, 0x58, 0x3f, 0x72, 0xe8, 0x5a, 0x83, 0x07, 0xdb, 0x0c, + 0x3c, 0x01, 0x07, 0x09, 0x61, 0x9f, 0xd2, 0x2e, 0xc6, 0x28, 0x17, 0x79, 0x21, 0xe8, 0x5a, 0x55, + 0xab, 0x15, 0x5d, 0x75, 0x8f, 0x4d, 0x54, 0x6a, 0x77, 0x3d, 0x12, 0x36, 0xb9, 0xf0, 0x98, 0xd0, + 0xe7, 0xaa, 0x5a, 0x2d, 0xe7, 0x22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 0x1a, 0xd9, 0x43, 0xcb, 0x72, 0xc8, 0xea, 0xbd, 0xfc, 0xd7, 0x01, 0x5a, + 0x06, 0xba, 0x91, 0x26, 0x36, 0x2c, 0xb6, 0xf5, 0x25, 0x8b, 0xb2, 0x0d, 0x1e, 0xe0, 0x23, 0x84, + 0x53, 0x3e, 0x23, 0x77, 0xa6, 0x0c, 0x99, 0xba, 0xfc, 0xca, 0xc6, 0x2c, 0xac, 0x61, 0x45, 0xdc, + 0x41, 0x4b, 0x69, 0xf6, 0x58, 0xbb, 0x2c, 0x92, 0x42, 0xab, 0x6c, 0xce, 0x44, 0x1b, 0x15, 0xfb, + 0xa8, 0x21, 0xf3, 0xaa, 0x95, 0x3e, 0xb8, 0x2c, 0x79, 0x45, 0x4a, 0xe5, 0xf1, 0x1f, 0xa7, 0x8c, + 0x3a, 0x02, 0xb4, 0x78, 0x79, 0xb5, 0xb7, 0x53, 0x26, 0x38, 0x4d, 0xaa, 0xdc, 0x9f, 0x81, 0x34, + 0x2c, 0x53, 0xdf, 0x39, 0x39, 0x37, 0xb4, 0xd3, 0x73, 0x43, 0xfb, 0x7e, 0x6e, 0x68, 0x9f, 0x2e, + 0x8c, 0xcc, 0xe9, 0x85, 0x91, 0xf9, 0x7a, 0x61, 0x64, 0xde, 0x8e, 0x7f, 0x8e, 0xf7, 0x08, 0xf3, + 0xb6, 0x29, 0x03, 0x87, 0x43, 0xc7, 0x23, 0xce, 0xf1, 0xd8, 0x3f, 0x4c, 0xbe, 0x42, 0xad, 0xbc, + 0xfa, 0xcf, 0x3c, 0xfc, 0x15, 0x00, 0x00, 0xff, 0xff, 0xd3, 0xb9, 0xe8, 0x05, 0xe1, 0x06, 0x00, + 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -817,11 +811,16 @@ func (m *MsgCreateSpendingPool) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x38 } - if m.VoteQuorum != 0 { - i = encodeVarintTx(dAtA, i, uint64(m.VoteQuorum)) - i-- - dAtA[i] = 0x30 + { + size := m.VoteQuorum.Size() + i -= size + if _, err := m.VoteQuorum.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintTx(dAtA, i, uint64(size)) } + i-- + dAtA[i] = 0x32 if len(m.Rates) > 0 { for iNdEx := len(m.Rates) - 1; iNdEx >= 0; iNdEx-- { { @@ -1114,9 +1113,8 @@ func (m *MsgCreateSpendingPool) Size() (n int) { n += 1 + l + sovTx(uint64(l)) } } - if m.VoteQuorum != 0 { - n += 1 + sovTx(uint64(m.VoteQuorum)) - } + l = m.VoteQuorum.Size() + n += 1 + l + sovTx(uint64(l)) if m.VotePeriod != 0 { n += 1 + sovTx(uint64(m.VotePeriod)) } @@ -1394,10 +1392,10 @@ func (m *MsgCreateSpendingPool) Unmarshal(dAtA []byte) error { } iNdEx = postIndex case 6: - if wireType != 0 { + if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field VoteQuorum", wireType) } - m.VoteQuorum = 0 + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTx @@ -1407,11 +1405,26 @@ func (m *MsgCreateSpendingPool) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.VoteQuorum |= uint64(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.VoteQuorum.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex case 7: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field VotePeriod", wireType) diff --git a/x/staking/client/cli/tx.go b/x/staking/client/cli/tx.go index 9f2f8a7b9..2e10f2213 100644 --- a/x/staking/client/cli/tx.go +++ b/x/staking/client/cli/tx.go @@ -70,7 +70,7 @@ func GetTxClaimValidatorCmd() *cobra.Command { return cmd } -// GetTxProposalUnjailValidatorCmd implement cli command for MsgUpsertTokenAlias +// GetTxProposalUnjailValidatorCmd implement cli command for UnjailValidator func GetTxProposalUnjailValidatorCmd() *cobra.Command { cmd := &cobra.Command{ Use: "unjail-validator [val_addr] [reference]", diff --git a/x/staking/keeper/slash.go b/x/staking/keeper/slash.go index 75f33befb..2b1850d8d 100644 --- a/x/staking/keeper/slash.go +++ b/x/staking/keeper/slash.go @@ -3,11 +3,11 @@ package keeper import ( "fmt" + errorsmod "cosmossdk.io/errors" govtypes "github.com/KiraCore/sekai/x/gov/types" "github.com/KiraCore/sekai/x/staking/types" stakingtypes "github.com/KiraCore/sekai/x/staking/types" sdk "github.com/cosmos/cosmos-sdk/types" - sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" ) // Activate a validator @@ -18,15 +18,15 @@ func (k Keeper) Activate(ctx sdk.Context, valAddress sdk.ValAddress) error { } if validator.IsPaused() { - return sdkerrors.Wrap(stakingtypes.ErrValidatorPaused, "Can NOT activate paused validator, you must unpause") + return errorsmod.Wrap(stakingtypes.ErrValidatorPaused, "Can NOT activate paused validator, you must unpause") } if validator.IsJailed() { - return sdkerrors.Wrap(stakingtypes.ErrValidatorJailed, "Can NOT activate jailed validator, you must unjail via proposal") + return errorsmod.Wrap(stakingtypes.ErrValidatorJailed, "Can NOT activate jailed validator, you must unjail via proposal") } if validator.IsActive() { - return sdkerrors.Wrap(stakingtypes.ErrValidatorActive, "Can NOT activate already active validator") + return errorsmod.Wrap(stakingtypes.ErrValidatorActive, "Can NOT activate already active validator") } k.setStatusToValidator(ctx, validator, stakingtypes.Active) diff --git a/x/staking/keeper/slash_test.go b/x/staking/keeper/slash_test.go index 2906885b8..f8e191f88 100644 --- a/x/staking/keeper/slash_test.go +++ b/x/staking/keeper/slash_test.go @@ -5,8 +5,7 @@ import ( "testing" "time" - sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" - + errorsmod "cosmossdk.io/errors" "github.com/KiraCore/sekai/x/staking/types" sdk "github.com/cosmos/cosmos-sdk/types" @@ -303,7 +302,7 @@ func TestValidatorActivate_Errors(t *testing.T) { }, { name: "validator is paused", - expectedError: sdkerrors.Wrap(types.ErrValidatorPaused, "Can NOT activate paused validator, you must unpause"), + expectedError: errorsmod.Wrap(types.ErrValidatorPaused, "Can NOT activate paused validator, you must unpause"), prepareScenario: func(app *simapp.SekaiApp, ctx sdk.Context, validator types.Validator) { validator.Status = types.Paused app.CustomStakingKeeper.AddValidator(ctx, validator) diff --git a/x/staking/types/validator.go b/x/staking/types/validator.go index 6b7d64651..826a653a5 100644 --- a/x/staking/types/validator.go +++ b/x/staking/types/validator.go @@ -1,6 +1,7 @@ package types import ( + errorsmod "cosmossdk.io/errors" tmprotocrypto "github.com/cometbft/cometbft/proto/tendermint/crypto" codectypes "github.com/cosmos/cosmos-sdk/codec/types" cryptocodec "github.com/cosmos/cosmos-sdk/crypto/codec" @@ -81,7 +82,7 @@ func (v Validator) GetConsPubKey() cryptotypes.PubKey { func (v Validator) ConsPubKey() (cryptotypes.PubKey, error) { pk, ok := v.PubKey.GetCachedValue().(cryptotypes.PubKey) if !ok { - return nil, sdkerrors.Wrapf(sdkerrors.ErrInvalidType, "expecting cryptotypes.PubKey, got %T", pk) + return nil, errorsmod.Wrapf(sdkerrors.ErrInvalidType, "expecting cryptotypes.PubKey, got %T", pk) } return pk, nil diff --git a/x/tokens/client/cli/cli_test.go b/x/tokens/client/cli/cli_test.go index bd127c7c2..999c2fac9 100644 --- a/x/tokens/client/cli/cli_test.go +++ b/x/tokens/client/cli/cli_test.go @@ -66,58 +66,22 @@ func (s *IntegrationTestSuite) TearDownSuite() { s.network.Cleanup() } -func (s *IntegrationTestSuite) TestUpsertTokenAliasAndQuery() { +func (s *IntegrationTestSuite) TestUpsertTokenInfoAndQuery() { val := s.network.Validators[0] clientCtx := val.ClientCtx - s.WhitelistPermissions(val.Address, govtypes.PermUpsertTokenAlias) + s.WhitelistPermissions(val.Address, govtypes.PermUpsertTokenInfo) - cmd := cli.GetTxUpsertTokenAliasCmd() - _, err := clitestutil.ExecTestCLICmd(clientCtx, cmd, []string{ - fmt.Sprintf("--%s=%s", flags.FlagFrom, val.Address.String()), - fmt.Sprintf("--%s=%s", cli.FlagSymbol, "ETH"), - fmt.Sprintf("--%s=%s", cli.FlagName, "Ethereum"), - fmt.Sprintf("--%s=%s", cli.FlagIcon, "myiconurl"), - fmt.Sprintf("--%s=%d", cli.FlagDecimals, 6), - fmt.Sprintf("--%s=%s", cli.FlagDenoms, "finney"), - fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), - fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastSync), - fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.DefaultDenom, sdk.NewInt(100))).String()), - }) - s.Require().NoError(err) - - height, err := s.network.LatestHeight() - s.Require().NoError(err) - - _, err = s.network.WaitForHeight(height + 2) - s.Require().NoError(err) - - cmd = cli.GetCmdQueryTokenAlias() - out, err := clitestutil.ExecTestCLICmd(clientCtx, cmd, []string{"ETH"}) - s.Require().NoError(err) - - var tokenAlias tokenstypes.TokenAlias - clientCtx.Codec.MustUnmarshalJSON(out.Bytes(), &tokenAlias) - - s.Require().Equal(tokenAlias.Symbol, "ETH") - s.Require().Equal(tokenAlias.Name, "Ethereum") - s.Require().Equal(tokenAlias.Icon, "myiconurl") - s.Require().Equal(tokenAlias.Decimals, uint32(6)) - s.Require().Equal(tokenAlias.Denoms, []string{"finney"}) -} - -func (s *IntegrationTestSuite) TestUpsertTokenRateAndQuery() { - val := s.network.Validators[0] - clientCtx := val.ClientCtx - - s.WhitelistPermissions(val.Address, govtypes.PermUpsertTokenRate) - - cmd := cli.GetTxUpsertTokenRateCmd() + cmd := cli.GetTxUpsertTokenInfoCmd() _, err := clitestutil.ExecTestCLICmd(clientCtx, cmd, []string{ fmt.Sprintf("--%s=%s", flags.FlagFrom, val.Address.String()), + fmt.Sprintf("--%s=%s", cli.FlagDescription, "some desc"), fmt.Sprintf("--%s=%s", cli.FlagDenom, "ubtc"), - fmt.Sprintf("--%s=%f", cli.FlagRate, 0.00001), - fmt.Sprintf("--%s=%s", cli.FlagFeePayments, "true"), + fmt.Sprintf("--%s=%s", cli.FlagSupply, "0"), + fmt.Sprintf("--%s=%s", cli.FlagSupplyCap, "0"), + fmt.Sprintf("--%s=%f", cli.FlagFeeRate, 0.00001), + fmt.Sprintf("--%s=%d", cli.FlagMintingFee, 2), + fmt.Sprintf("--%s=%s", cli.FlagFeeEnabled, "true"), fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastSync), fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.DefaultDenom, sdk.NewInt(100))).String()), @@ -130,7 +94,7 @@ func (s *IntegrationTestSuite) TestUpsertTokenRateAndQuery() { _, err = s.network.WaitForHeight(height + 2) s.Require().NoError(err) - cmd = cli.GetCmdQueryTokenRate() + cmd = cli.GetCmdQueryTokenInfo() _, err = clitestutil.ExecTestCLICmd(clientCtx, cmd, []string{"ubtc"}) s.Require().NoError(err) @@ -151,18 +115,24 @@ func (s *IntegrationTestSuite) TestGetCmdQueryTokenBlackWhites() { s.Require().Equal(blackWhites.Data.Whitelisted, []string{"ukex"}) } -func (s IntegrationTestSuite) TestCreateProposalUpsertTokenRates() { +func (s IntegrationTestSuite) TestCreateProposalUpsertTokenInfo() { // Query permissions for role Validator val := s.network.Validators[0] clientCtx := val.ClientCtx - cmd := cli.GetTxProposalUpsertTokenRatesCmd() + cmd := cli.GetTxProposalUpsertTokenInfoCmd() out, err := clitestutil.ExecTestCLICmd(clientCtx, cmd, []string{ fmt.Sprintf("--%s=%s", cli.FlagDenom, "ubtc"), - fmt.Sprintf("--%s=%f", cli.FlagRate, 0.00001), + fmt.Sprintf("--%s=%f", cli.FlagFeeRate, 0.00001), fmt.Sprintf("--%s=%s", cli.FlagTitle, "title"), fmt.Sprintf("--%s=%s", cli.FlagDescription, "some desc"), - fmt.Sprintf("--%s=%s", cli.FlagFeePayments, "true"), + fmt.Sprintf("--%s=%s", cli.FlagFeeEnabled, "true"), + fmt.Sprintf("--%s=%s", cli.FlagDecimals, "6"), + fmt.Sprintf("--%s=%s", cli.FlagStakeCap, "0.3"), + fmt.Sprintf("--%s=%s", cli.FlagTokenRate, "1"), + fmt.Sprintf("--%s=%s", cli.FlagSupply, "0"), + fmt.Sprintf("--%s=%s", cli.FlagSupplyCap, "0"), + fmt.Sprintf("--%s=%s", cli.FlagMintingFee, "1"), fmt.Sprintf("--%s=%s", flags.FlagFrom, val.Address.String()), fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastSync), @@ -185,43 +155,6 @@ func (s IntegrationTestSuite) TestCreateProposalUpsertTokenRates() { fmt.Printf("%s", out.String()) } -func (s IntegrationTestSuite) TestCreateProposalUpsertTokenAlias() { - // Query permissions for role Validator - val := s.network.Validators[0] - clientCtx := val.ClientCtx - - cmd := cli.GetTxProposalUpsertTokenAliasCmd() - out, err := clitestutil.ExecTestCLICmd(clientCtx, cmd, []string{ - fmt.Sprintf("--%s=%s", cli.FlagSymbol, "ETH"), - fmt.Sprintf("--%s=%s", cli.FlagName, "Ethereum"), - fmt.Sprintf("--%s=%s", cli.FlagTitle, "title"), - fmt.Sprintf("--%s=%s", cli.FlagDescription, "some desc"), - fmt.Sprintf("--%s=%s", cli.FlagIcon, "myiconurl"), - fmt.Sprintf("--%s=%d", cli.FlagDecimals, 6), - fmt.Sprintf("--%s=%s", cli.FlagDenoms, "finney"), - fmt.Sprintf("--%s=%s", flags.FlagFrom, val.Address.String()), - fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), - fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastSync), - fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.DefaultDenom, sdk.NewInt(100))).String()), - }) - s.Require().NoError(err) - fmt.Printf("%s", out.String()) - - // Vote Proposal - out.Reset() - cmd = customgovcli.GetTxVoteProposal() - out, err = clitestutil.ExecTestCLICmd(clientCtx, cmd, []string{ - fmt.Sprintf("%d", 1), // Proposal ID - fmt.Sprintf("%d", govtypes.OptionYes), - fmt.Sprintf("--%s=%s", flags.FlagFrom, val.Address.String()), - fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), - fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastSync), - fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.DefaultDenom, sdk.NewInt(100))).String()), - }) - s.Require().NoError(err) - fmt.Printf("%s", out.String()) -} - func (s IntegrationTestSuite) TestTxProposalTokensBlackWhiteChangeCmd() { // Query permissions for role Validator val := s.network.Validators[0] @@ -259,57 +192,29 @@ func (s IntegrationTestSuite) TestTxProposalTokensBlackWhiteChangeCmd() { fmt.Printf("%s", out.String()) } -func (s *IntegrationTestSuite) TestGetCmdQueryAllTokenAliases() { - val := s.network.Validators[0] - clientCtx := val.ClientCtx - - cmd := cli.GetCmdQueryAllTokenAliases() - out, err := clitestutil.ExecTestCLICmd(clientCtx, cmd, []string{}) - s.Require().NoError(err) - - var resp tokenstypes.AllTokenAliasesResponse - clientCtx.Codec.MustUnmarshalJSON(out.Bytes(), &resp) - - s.Require().Greater(len(resp.Data), 0) -} - -func (s *IntegrationTestSuite) TestGetCmdQueryTokenAliasesByDenom() { - val := s.network.Validators[0] - clientCtx := val.ClientCtx - - cmd := cli.GetCmdQueryTokenAliasesByDenom() - out, err := clitestutil.ExecTestCLICmd(clientCtx, cmd, []string{"ukex", "mkex"}) - s.Require().NoError(err) - - var resp tokenstypes.TokenAliasesByDenomResponse - clientCtx.Codec.MustUnmarshalJSON(out.Bytes(), &resp) - - s.Require().Greater(len(resp.Data), 0) -} - -func (s *IntegrationTestSuite) TestGetCmdQueryAllTokenRates() { +func (s *IntegrationTestSuite) TestGetCmdQueryAllTokenInfos() { val := s.network.Validators[0] clientCtx := val.ClientCtx - cmd := cli.GetCmdQueryAllTokenRates() + cmd := cli.GetCmdQueryAllTokenInfos() out, err := clitestutil.ExecTestCLICmd(clientCtx, cmd, []string{}) s.Require().NoError(err) - var resp tokenstypes.AllTokenRatesResponse + var resp tokenstypes.AllTokenInfosResponse clientCtx.Codec.MustUnmarshalJSON(out.Bytes(), &resp) s.Require().Greater(len(resp.Data), 0) } -func (s *IntegrationTestSuite) TestGetCmdQueryTokenRatesByDenom() { +func (s *IntegrationTestSuite) TestGetCmdQueryTokenInfosByDenom() { val := s.network.Validators[0] clientCtx := val.ClientCtx - cmd := cli.GetCmdQueryTokenRatesByDenom() + cmd := cli.GetCmdQueryTokenInfosByDenom() out, err := clitestutil.ExecTestCLICmd(clientCtx, cmd, []string{"ukex"}) s.Require().NoError(err) - var resp tokenstypes.TokenRatesByDenomResponse + var resp tokenstypes.TokenInfosByDenomResponse clientCtx.Codec.MustUnmarshalJSON(out.Bytes(), &resp) s.Require().Greater(len(resp.Data), 0) diff --git a/x/tokens/client/cli/query.go b/x/tokens/client/cli/query.go index fd8abf426..5637d6d9f 100644 --- a/x/tokens/client/cli/query.go +++ b/x/tokens/client/cli/query.go @@ -20,104 +20,17 @@ func NewQueryCmd() *cobra.Command { Short: "query commands for the tokens module", } queryCmd.AddCommand( - GetCmdQueryTokenAlias(), - GetCmdQueryAllTokenAliases(), - GetCmdQueryTokenAliasesByDenom(), - GetCmdQueryTokenRate(), - GetCmdQueryAllTokenRates(), - GetCmdQueryTokenRatesByDenom(), + GetCmdQueryTokenInfo(), + GetCmdQueryAllTokenInfos(), + GetCmdQueryTokenInfosByDenom(), GetCmdQueryTokenBlackWhites(), ) return queryCmd } -// GetCmdQueryTokenAlias the query token alias command. -func GetCmdQueryTokenAlias() *cobra.Command { - cmd := &cobra.Command{ - Use: "alias ", - Short: "Get the token alias by symbol", - Args: cobra.MinimumNArgs(1), - RunE: func(cmd *cobra.Command, args []string) error { - clientCtx := client.GetClientContextFromCmd(cmd) - - params := &types.TokenAliasRequest{Symbol: args[0]} - - queryClient := types.NewQueryClient(clientCtx) - res, err := queryClient.GetTokenAlias(context.Background(), params) - if err != nil { - return err - } - - if res.Data == nil { - return fmt.Errorf("%s symbol does not exist", params.Symbol) - } - - return clientCtx.PrintProto(res.Data) - }, - } - - flags.AddQueryFlagsToCmd(cmd) - - return cmd -} - -// GetCmdQueryAllTokenAliases the query all token aliases command. -func GetCmdQueryAllTokenAliases() *cobra.Command { - cmd := &cobra.Command{ - Use: "all-aliases", - Short: "Get all token aliases", - RunE: func(cmd *cobra.Command, args []string) error { - clientCtx := client.GetClientContextFromCmd(cmd) - - params := &types.AllTokenAliasesRequest{} - - queryClient := types.NewQueryClient(clientCtx) - res, err := queryClient.GetAllTokenAliases(context.Background(), params) - if err != nil { - return err - } - - return clientCtx.PrintProto(res) - }, - } - - flags.AddQueryFlagsToCmd(cmd) - - return cmd -} - -// GetCmdQueryTokenAliasesByDenom the query token aliases by denom command. -func GetCmdQueryTokenAliasesByDenom() *cobra.Command { - cmd := &cobra.Command{ - Use: "aliases-by-denom [aliases]", - Short: "Get token aliases by denom", - Args: cobra.MinimumNArgs(1), - RunE: func(cmd *cobra.Command, args []string) error { - clientCtx := client.GetClientContextFromCmd(cmd) - - denoms := strings.Split(args[0], ",") - params := &types.TokenAliasesByDenomRequest{ - Denoms: denoms, - } - - queryClient := types.NewQueryClient(clientCtx) - res, err := queryClient.GetTokenAliasesByDenom(context.Background(), params) - if err != nil { - return err - } - - return clientCtx.PrintProto(res) - }, - } - - flags.AddQueryFlagsToCmd(cmd) - - return cmd -} - -// GetCmdQueryTokenRate the query token rate command. -func GetCmdQueryTokenRate() *cobra.Command { +// GetCmdQueryTokenInfo the query token rate command. +func GetCmdQueryTokenInfo() *cobra.Command { cmd := &cobra.Command{ Use: "rate ", Short: "Get the token rate by denom", @@ -125,10 +38,10 @@ func GetCmdQueryTokenRate() *cobra.Command { RunE: func(cmd *cobra.Command, args []string) error { clientCtx := client.GetClientContextFromCmd(cmd) - params := &types.TokenRateRequest{Denom: args[0]} + params := &types.TokenInfoRequest{Denom: args[0]} queryClient := types.NewQueryClient(clientCtx) - res, err := queryClient.GetTokenRate(context.Background(), params) + res, err := queryClient.GetTokenInfo(context.Background(), params) if err != nil { return err } @@ -146,18 +59,18 @@ func GetCmdQueryTokenRate() *cobra.Command { return cmd } -// GetCmdQueryAllTokenRates the query all token rates command. -func GetCmdQueryAllTokenRates() *cobra.Command { +// GetCmdQueryAllTokenInfos the query all token rates command. +func GetCmdQueryAllTokenInfos() *cobra.Command { cmd := &cobra.Command{ Use: "all-rates", Short: "Get all token rates", RunE: func(cmd *cobra.Command, args []string) error { clientCtx := client.GetClientContextFromCmd(cmd) - params := &types.AllTokenRatesRequest{} + params := &types.AllTokenInfosRequest{} queryClient := types.NewQueryClient(clientCtx) - res, err := queryClient.GetAllTokenRates(context.Background(), params) + res, err := queryClient.GetAllTokenInfos(context.Background(), params) if err != nil { return err } @@ -171,8 +84,8 @@ func GetCmdQueryAllTokenRates() *cobra.Command { return cmd } -// GetCmdQueryTokenRatesByDenom the query token aliases by denom command. -func GetCmdQueryTokenRatesByDenom() *cobra.Command { +// GetCmdQueryTokenInfosByDenom the query token aliases by denom command. +func GetCmdQueryTokenInfosByDenom() *cobra.Command { cmd := &cobra.Command{ Use: "rates-by-denom", Short: "Get token rates by denom", @@ -181,12 +94,12 @@ func GetCmdQueryTokenRatesByDenom() *cobra.Command { clientCtx := client.GetClientContextFromCmd(cmd) denoms := strings.Split(args[0], ",") - params := &types.TokenRatesByDenomRequest{ + params := &types.TokenInfosByDenomRequest{ Denoms: denoms, } queryClient := types.NewQueryClient(clientCtx) - res, err := queryClient.GetTokenRatesByDenom(context.Background(), params) + res, err := queryClient.GetTokenInfosByDenom(context.Background(), params) if err != nil { return err } diff --git a/x/tokens/client/cli/tx.go b/x/tokens/client/cli/tx.go index dd0787e0b..475cfc59d 100644 --- a/x/tokens/client/cli/tx.go +++ b/x/tokens/client/cli/tx.go @@ -2,7 +2,6 @@ package cli import ( "fmt" - "strings" appparams "github.com/KiraCore/sekai/app/params" govtypes "github.com/KiraCore/sekai/x/gov/types" @@ -16,23 +15,34 @@ import ( // flags for tokens module txs const ( - FlagSymbol = "symbol" - FlagName = "name" - FlagIcon = "icon" - FlagDecimals = "decimals" - FlagDenoms = "denoms" - FlagDenom = "denom" - FlagRate = "rate" - FlagStakeCap = "stake_cap" - FlagStakeToken = "stake_token" - FlagStakeMin = "stake_min" - FlagFeePayments = "fee_payments" - FlagIsBlacklist = "is_blacklist" - FlagIsAdd = "is_add" - FlagTokens = "tokens" - FlagTitle = "title" - FlagDescription = "description" - FlagInvalidated = "invalidated" + FlagSymbol = "symbol" + FlagName = "name" + FlagIcon = "icon" + FlagDecimals = "decimals" + FlagDenoms = "denoms" + FlagDenom = "denom" + FlagFeeRate = "fee_rate" + FlagStakeCap = "stake_cap" + FlagStakeToken = "stake_token" + FlagStakeMin = "stake_min" + FlagFeeEnabled = "fee_payments" + FlagIsBlacklist = "is_blacklist" + FlagIsAdd = "is_add" + FlagTokens = "tokens" + FlagTitle = "title" + FlagDescription = "description" + FlagInvalidated = "invalidated" + FlagSupply = "supply" + FlagSupplyCap = "supply_cap" + FlagWebsite = "website" + FlagSocial = "social" + FlagMintingFee = "minting_fee" + FlagOwner = "owner" + FlagOwnerEditDisabled = "owner_edit_disabled" + FlagNftMetadata = "nft_metadata" + FlagNftHash = "nft_hash" + FlagTokenType = "token_type" + FlagTokenRate = "token_rate" ) // NewTxCmd returns a root CLI command handler for all x/bank transaction commands. @@ -46,129 +56,71 @@ func NewTxCmd() *cobra.Command { } txCmd.AddCommand( - GetTxUpsertTokenAliasCmd(), - GetTxUpsertTokenRateCmd(), - GetTxProposalUpsertTokenAliasCmd(), - GetTxProposalUpsertTokenRatesCmd(), + GetTxUpsertTokenInfoCmd(), + GetTxProposalUpsertTokenInfoCmd(), GetTxProposalTokensBlackWhiteChangeCmd(), ) return txCmd } -// GetTxUpsertTokenAliasCmd implement cli command for MsgUpsertTokenAlias -func GetTxUpsertTokenAliasCmd() *cobra.Command { +// GetTxProposalUpsertTokenInfoCmd implement cli command for MsgUpsertTokenInfos +func GetTxProposalUpsertTokenInfoCmd() *cobra.Command { cmd := &cobra.Command{ - Use: "upsert-alias", - Short: "Upsert token alias", + Use: "proposal-upsert-rate", + Short: "Create a proposal to upsert token rate", RunE: func(cmd *cobra.Command, args []string) error { clientCtx, err := client.GetClientTxContext(cmd) - - symbol, err := cmd.Flags().GetString(FlagSymbol) if err != nil { - return fmt.Errorf("invalid symbol") + return fmt.Errorf("invalid is_blacklist flag: %w", err) } - name, err := cmd.Flags().GetString(FlagName) + denom, err := cmd.Flags().GetString(FlagDenom) if err != nil { - return fmt.Errorf("invalid name") + return fmt.Errorf("invalid denom") } - - icon, err := cmd.Flags().GetString(FlagIcon) - if err != nil { - return fmt.Errorf("invalid icon") + if denom == appparams.DefaultDenom { + return fmt.Errorf("bond denom rate is read-only") } - decimals, err := cmd.Flags().GetUint32(FlagDecimals) + tokenType, err := cmd.Flags().GetString(FlagTokenType) if err != nil { - return fmt.Errorf("invalid decimals") + return fmt.Errorf("invalid tokenType") } - denomsString, err := cmd.Flags().GetString(FlagDenoms) + rateString, err := cmd.Flags().GetString(FlagTokenRate) if err != nil { - return fmt.Errorf("invalid denoms") - } - - denoms := strings.Split(denomsString, ",") - for _, denom := range denoms { - if err = sdk.ValidateDenom(denom); err != nil { - return err - } + return fmt.Errorf("invalid rate") } - isInvalidated, err := cmd.Flags().GetBool(FlagInvalidated) - if err != nil { - return fmt.Errorf("invalid invalidated flag: %w", err) - } - - msg := types.NewMsgUpsertTokenAlias( - clientCtx.FromAddress, - symbol, - name, - icon, - decimals, - denoms, - isInvalidated, - ) - - err = msg.ValidateBasic() + feeRate, err := sdk.NewDecFromStr(rateString) if err != nil { return err } - return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), msg) - }, - } - - cmd.Flags().String(FlagSymbol, "KEX", "Ticker (eg. ATOM, KEX, BTC)") - cmd.Flags().String(FlagName, "Kira", "Token Name (e.g. Cosmos, Kira, Bitcoin)") - cmd.Flags().String(FlagIcon, "", "Graphical Symbol (url link to graphics)") - cmd.Flags().Uint32(FlagDecimals, 6, "Integer number of max decimals") - cmd.Flags().String(FlagDenoms, "ukex,mkex", "An array of token denoms to be aliased") - cmd.Flags().Bool(FlagInvalidated, false, "Flag to show token alias is invalidated or not") - - flags.AddTxFlagsToCmd(cmd) - _ = cmd.MarkFlagRequired(flags.FlagFrom) - - return cmd -} - -// GetTxProposalUpsertTokenAliasCmd implement cli command for MsgUpsertTokenAlias -func GetTxProposalUpsertTokenAliasCmd() *cobra.Command { - cmd := &cobra.Command{ - Use: "proposal-upsert-alias", - Short: "Create a proposal to upsert token alias", - RunE: func(cmd *cobra.Command, args []string) error { - clientCtx, err := client.GetClientTxContext(cmd) - - symbol, err := cmd.Flags().GetString(FlagSymbol) + feeEnabled, err := cmd.Flags().GetBool(FlagFeeEnabled) if err != nil { - return fmt.Errorf("invalid symbol: %w", err) + return fmt.Errorf("invalid fee enabled flag") } - name, err := cmd.Flags().GetString(FlagName) + supplyString, err := cmd.Flags().GetString(FlagSupply) if err != nil { - return fmt.Errorf("invalid name: %w", err) + return fmt.Errorf("invalid supply: %w", err) } - icon, err := cmd.Flags().GetString(FlagIcon) - if err != nil { - return fmt.Errorf("invalid icon: %w", err) - } - - decimals, err := cmd.Flags().GetUint32(FlagDecimals) - if err != nil { - return fmt.Errorf("invalid decimals: %w", err) + supply, ok := sdk.NewIntFromString(supplyString) + if !ok { + return fmt.Errorf("invalid supply: %s", supplyString) } - denoms, err := cmd.Flags().GetString(FlagDenoms) + supplyCapString, err := cmd.Flags().GetString(FlagSupplyCap) if err != nil { - return fmt.Errorf("invalid denoms: %w", err) + return fmt.Errorf("invalid supply cap: %w", err) } - isInvalidated, err := cmd.Flags().GetBool(FlagInvalidated) - if err != nil { - return fmt.Errorf("invalid invalidated flag: %w", err) + supplyCap, ok := sdk.NewIntFromString(supplyCapString) + if !ok { + return fmt.Errorf("invalid supply cap: %s", supplyCapString) } title, err := cmd.Flags().GetString(FlagTitle) @@ -181,89 +133,44 @@ func GetTxProposalUpsertTokenAliasCmd() *cobra.Command { return fmt.Errorf("invalid description: %w", err) } - msg, err := govtypes.NewMsgSubmitProposal( - clientCtx.FromAddress, - title, - description, - types.NewUpsertTokenAliasProposal( - symbol, - name, - icon, - decimals, - strings.Split(denoms, ","), - isInvalidated, - ), - ) + website, err := cmd.Flags().GetString(FlagWebsite) if err != nil { - return err + return fmt.Errorf("invalid website: %w", err) } - return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), msg) - }, - } - - cmd.Flags().String(FlagSymbol, "KEX", "Ticker (eg. ATOM, KEX, BTC)") - cmd.MarkFlagRequired(FlagSymbol) - cmd.Flags().String(FlagName, "Kira", "Token Name (e.g. Cosmos, Kira, Bitcoin)") - cmd.MarkFlagRequired(FlagName) - cmd.Flags().String(FlagIcon, "", "Graphical Symbol (url link to graphics)") - cmd.MarkFlagRequired(FlagIcon) - cmd.Flags().Uint32(FlagDecimals, 6, "Integer number of max decimals") - cmd.MarkFlagRequired(FlagDecimals) - cmd.Flags().String(FlagDenoms, "ukex,mkex", "An array of token denoms to be aliased") - cmd.MarkFlagRequired(FlagDenoms) - cmd.Flags().Bool(FlagInvalidated, false, "Flag to show token alias is invalidated or not") - - cmd.Flags().String(FlagTitle, "", "The title of the proposal.") - cmd.MarkFlagRequired(FlagTitle) - cmd.Flags().String(FlagDescription, "", "The description of the proposal, it can be a url, some text, etc.") - cmd.MarkFlagRequired(FlagDescription) - - flags.AddTxFlagsToCmd(cmd) - _ = cmd.MarkFlagRequired(flags.FlagFrom) - - return cmd -} - -// GetTxProposalUpsertTokenRatesCmd implement cli command for MsgUpsertTokenAlias -func GetTxProposalUpsertTokenRatesCmd() *cobra.Command { - cmd := &cobra.Command{ - Use: "proposal-upsert-rate", - Short: "Create a proposal to upsert token rate", - RunE: func(cmd *cobra.Command, args []string) error { - clientCtx, err := client.GetClientTxContext(cmd) - - denom, err := cmd.Flags().GetString(FlagDenom) + social, err := cmd.Flags().GetString(FlagSocial) if err != nil { - return fmt.Errorf("invalid denom") - } - if denom == appparams.DefaultDenom { - return fmt.Errorf("bond denom rate is read-only") + return fmt.Errorf("invalid social: %w", err) } - rateString, err := cmd.Flags().GetString(FlagRate) + mintingFeeStr, err := cmd.Flags().GetString(FlagMintingFee) if err != nil { - return fmt.Errorf("invalid rate") + return fmt.Errorf("invalid mintingFee: %w", err) + } + + mintingFee, ok := sdk.NewIntFromString(mintingFeeStr) + if !ok { + return fmt.Errorf("invalid minting fee: %s", mintingFeeStr) } - rate, err := sdk.NewDecFromStr(rateString) + owner, err := cmd.Flags().GetString(FlagOwner) if err != nil { - return err + return fmt.Errorf("invalid owner: %w", err) } - feePayments, err := cmd.Flags().GetBool(FlagFeePayments) + ownerEditDisabled, err := cmd.Flags().GetBool(FlagOwnerEditDisabled) if err != nil { - return fmt.Errorf("invalid fee payments") + return fmt.Errorf("invalid ownerEditDisabled: %w", err) } - title, err := cmd.Flags().GetString(FlagTitle) + nftMetadata, err := cmd.Flags().GetString(FlagNftMetadata) if err != nil { - return fmt.Errorf("invalid title: %w", err) + return fmt.Errorf("invalid nftMetadata: %w", err) } - description, err := cmd.Flags().GetString(FlagDescription) + nftHash, err := cmd.Flags().GetString(FlagNftHash) if err != nil { - return fmt.Errorf("invalid description: %w", err) + return fmt.Errorf("invalid nftHash: %w", err) } stakeToken, err := cmd.Flags().GetBool(FlagStakeToken) @@ -296,18 +203,54 @@ func GetTxProposalUpsertTokenRatesCmd() *cobra.Command { return fmt.Errorf("invalid invalidated flag: %w", err) } + symbol, err := cmd.Flags().GetString(FlagSymbol) + if err != nil { + return fmt.Errorf("invalid symbol") + } + + name, err := cmd.Flags().GetString(FlagName) + if err != nil { + return fmt.Errorf("invalid name") + } + + icon, err := cmd.Flags().GetString(FlagIcon) + if err != nil { + return fmt.Errorf("invalid icon") + } + + decimals, err := cmd.Flags().GetUint32(FlagDecimals) + if err != nil { + return fmt.Errorf("invalid decimals") + } + msg, err := govtypes.NewMsgSubmitProposal( clientCtx.FromAddress, title, description, - types.NewUpsertTokenRatesProposal( + types.NewUpsertTokenInfosProposal( denom, - rate, - feePayments, + tokenType, + feeRate, + feeEnabled, + supply, + supplyCap, stakeCap, stakeMin, stakeToken, isInvalidated, + symbol, + name, + icon, + decimals, + description, + website, + social, + 0, + mintingFee, + owner, + ownerEditDisabled, + nftMetadata, + nftHash, ), ) if err != nil { @@ -325,10 +268,10 @@ func GetTxProposalUpsertTokenRatesCmd() *cobra.Command { cmd.Flags().String(FlagDenom, "tbtc", "denom - identifier for token rates") cmd.MarkFlagRequired(FlagDenom) - cmd.Flags().String(FlagRate, "1.0", "rate to register, max decimal 9, max value 10^10") - cmd.MarkFlagRequired(FlagRate) - cmd.Flags().Bool(FlagFeePayments, true, "use registry as fee payment") - cmd.MarkFlagRequired(FlagFeePayments) + cmd.Flags().String(FlagFeeRate, "1.0", "rate to register, max decimal 9, max value 10^10") + cmd.MarkFlagRequired(FlagFeeRate) + cmd.Flags().Bool(FlagFeeEnabled, true, "use registry as fee payment") + cmd.MarkFlagRequired(FlagFeeEnabled) cmd.Flags().String(FlagTitle, "", "The title of a proposal.") cmd.MarkFlagRequired(FlagTitle) cmd.Flags().String(FlagDescription, "", "The description of the proposal, it can be a url, some text, etc.") @@ -337,6 +280,21 @@ func GetTxProposalUpsertTokenRatesCmd() *cobra.Command { cmd.Flags().String(FlagStakeMin, "1", "min amount to stake at a time.") cmd.Flags().Bool(FlagStakeToken, false, "flag of if staking token or not.") cmd.Flags().Bool(FlagInvalidated, false, "Flag to show token rate is invalidated or not") + cmd.Flags().String(FlagSymbol, "KEX", "Ticker (eg. ATOM, KEX, BTC)") + cmd.Flags().String(FlagName, "Kira", "Token Name (e.g. Cosmos, Kira, Bitcoin)") + cmd.Flags().String(FlagIcon, "", "Graphical Symbol (url link to graphics)") + cmd.Flags().Uint32(FlagDecimals, 6, "Integer number of max decimals") + cmd.Flags().String(FlagSupply, "", "Supply of token") + cmd.Flags().String(FlagSupplyCap, "", "Supply cap of token") + cmd.Flags().String(FlagWebsite, "", "Website") + cmd.Flags().String(FlagSocial, "", "Social") + cmd.Flags().String(FlagMintingFee, "", "Minting fee") + cmd.Flags().String(FlagOwner, "", "Owner") + cmd.Flags().Bool(FlagOwnerEditDisabled, false, "Owner edit disabled flag") + cmd.Flags().String(FlagNftMetadata, "", "Nft metadata") + cmd.Flags().String(FlagNftHash, "", "Nft hash") + cmd.Flags().String(FlagTokenType, "", "Token type") + cmd.Flags().String(FlagTokenRate, "", "Token rate") flags.AddTxFlagsToCmd(cmd) _ = cmd.MarkFlagRequired(flags.FlagFrom) @@ -344,13 +302,16 @@ func GetTxProposalUpsertTokenRatesCmd() *cobra.Command { return cmd } -// GetTxUpsertTokenRateCmd implement cli command for MsgUpsertTokenRate -func GetTxUpsertTokenRateCmd() *cobra.Command { +// GetTxUpsertTokenInfoCmd implement cli command for MsgUpsertTokenInfo +func GetTxUpsertTokenInfoCmd() *cobra.Command { cmd := &cobra.Command{ Use: "upsert-rate", Short: "Upsert token rate", RunE: func(cmd *cobra.Command, args []string) error { clientCtx, err := client.GetClientTxContext(cmd) + if err != nil { + return err + } denom, err := cmd.Flags().GetString(FlagDenom) if err != nil { @@ -360,21 +321,46 @@ func GetTxUpsertTokenRateCmd() *cobra.Command { return fmt.Errorf("bond denom rate is read-only") } - rateString, err := cmd.Flags().GetString(FlagRate) + tokenType, err := cmd.Flags().GetString(FlagTokenType) + if err != nil { + return fmt.Errorf("invalid tokenType") + } + + rateString, err := cmd.Flags().GetString(FlagFeeRate) if err != nil { return fmt.Errorf("invalid rate") } - rate, err := sdk.NewDecFromStr(rateString) + feeRate, err := sdk.NewDecFromStr(rateString) if err != nil { return err } - feePayments, err := cmd.Flags().GetBool(FlagFeePayments) + feeEnabled, err := cmd.Flags().GetBool(FlagFeeEnabled) if err != nil { return fmt.Errorf("invalid fee payments") } + supplyString, err := cmd.Flags().GetString(FlagSupply) + if err != nil { + return fmt.Errorf("invalid supply: %w", err) + } + + supply, ok := sdk.NewIntFromString(supplyString) + if !ok { + return fmt.Errorf("invalid supply: %s", supplyString) + } + + supplyCapString, err := cmd.Flags().GetString(FlagSupplyCap) + if err != nil { + return fmt.Errorf("invalid supply cap: %w", err) + } + + supplyCap, ok := sdk.NewIntFromString(supplyCapString) + if !ok { + return fmt.Errorf("invalid supply cap: %s", supplyCapString) + } + stakeToken, err := cmd.Flags().GetBool(FlagStakeToken) if err != nil { return fmt.Errorf("invalid stake token flag") @@ -405,15 +391,96 @@ func GetTxUpsertTokenRateCmd() *cobra.Command { return fmt.Errorf("invalid invalidated flag: %w", err) } - msg := types.NewMsgUpsertTokenRate( + symbol, err := cmd.Flags().GetString(FlagSymbol) + if err != nil { + return fmt.Errorf("invalid symbol") + } + + name, err := cmd.Flags().GetString(FlagName) + if err != nil { + return fmt.Errorf("invalid name") + } + + icon, err := cmd.Flags().GetString(FlagIcon) + if err != nil { + return fmt.Errorf("invalid icon") + } + + decimals, err := cmd.Flags().GetUint32(FlagDecimals) + if err != nil { + return fmt.Errorf("invalid decimals") + } + + description, err := cmd.Flags().GetString(FlagDescription) + if err != nil { + return fmt.Errorf("invalid description: %w", err) + } + + website, err := cmd.Flags().GetString(FlagWebsite) + if err != nil { + return fmt.Errorf("invalid website: %w", err) + } + + social, err := cmd.Flags().GetString(FlagSocial) + if err != nil { + return fmt.Errorf("invalid social: %w", err) + } + + mintingFeeStr, err := cmd.Flags().GetString(FlagMintingFee) + if err != nil { + return fmt.Errorf("invalid mintingFee: %w", err) + } + + mintingFee, ok := sdk.NewIntFromString(mintingFeeStr) + if !ok { + return fmt.Errorf("invalid minting fee: %s", mintingFeeStr) + } + + owner, err := cmd.Flags().GetString(FlagOwner) + if err != nil { + return fmt.Errorf("invalid owner: %w", err) + } + + ownerEditDisabled, err := cmd.Flags().GetBool(FlagOwnerEditDisabled) + if err != nil { + return fmt.Errorf("invalid ownerEditDisabled: %w", err) + } + + nftMetadata, err := cmd.Flags().GetString(FlagNftMetadata) + if err != nil { + return fmt.Errorf("invalid nftMetadata: %w", err) + } + + nftHash, err := cmd.Flags().GetString(FlagNftHash) + if err != nil { + return fmt.Errorf("invalid nftHash: %w", err) + } + + msg := types.NewMsgUpsertTokenInfo( clientCtx.FromAddress, denom, - rate, - feePayments, + tokenType, + feeRate, + feeEnabled, + supply, + supplyCap, stakeCap, stakeMin, stakeToken, isInvalidated, + symbol, + name, + icon, + decimals, + description, + website, + social, + 0, + mintingFee, + owner, + ownerEditDisabled, + nftMetadata, + nftHash, ) err = msg.ValidateBasic() @@ -427,14 +494,30 @@ func GetTxUpsertTokenRateCmd() *cobra.Command { cmd.Flags().String(FlagDenom, "tbtc", "denom - identifier for token rates") cmd.MarkFlagRequired(FlagDenom) - cmd.Flags().String(FlagRate, "1.0", "rate to register, max decimal 9, max value 10^10") - cmd.MarkFlagRequired(FlagRate) - cmd.Flags().Bool(FlagFeePayments, true, "use registry as fee payment") - cmd.MarkFlagRequired(FlagFeePayments) + cmd.Flags().String(FlagFeeRate, "1.0", "rate to register, max decimal 9, max value 10^10") + cmd.MarkFlagRequired(FlagFeeRate) + cmd.Flags().Bool(FlagFeeEnabled, true, "use registry as fee payment") + cmd.MarkFlagRequired(FlagFeeEnabled) cmd.Flags().String(FlagStakeCap, "0.1", "rewards to be allocated for the token.") cmd.Flags().String(FlagStakeMin, "1", "min amount to stake at a time.") cmd.Flags().Bool(FlagStakeToken, false, "flag of if staking token or not.") cmd.Flags().Bool(FlagInvalidated, false, "Flag to show token rate is invalidated or not") + cmd.Flags().String(FlagSymbol, "KEX", "Ticker (eg. ATOM, KEX, BTC)") + cmd.Flags().String(FlagName, "Kira", "Token Name (e.g. Cosmos, Kira, Bitcoin)") + cmd.Flags().String(FlagIcon, "", "Graphical Symbol (url link to graphics)") + cmd.Flags().Uint32(FlagDecimals, 6, "Integer number of max decimals") + cmd.Flags().String(FlagSupply, "", "Supply of token") + cmd.Flags().String(FlagSupplyCap, "", "Supply cap of token") + cmd.Flags().String(FlagWebsite, "", "Website") + cmd.Flags().String(FlagSocial, "", "Social") + cmd.Flags().String(FlagMintingFee, "", "Minting fee") + cmd.Flags().String(FlagOwner, "", "Owner") + cmd.Flags().Bool(FlagOwnerEditDisabled, false, "Owner edit disabled flag") + cmd.Flags().String(FlagNftMetadata, "", "Nft metadata") + cmd.Flags().String(FlagNftHash, "", "Nft hash") + cmd.Flags().String(FlagTokenType, "", "Token type") + cmd.Flags().String(FlagDescription, "", "Token description") + cmd.Flags().String(FlagTokenRate, "", "Token rate") flags.AddTxFlagsToCmd(cmd) _ = cmd.MarkFlagRequired(flags.FlagFrom) @@ -449,6 +532,9 @@ func GetTxProposalTokensBlackWhiteChangeCmd() *cobra.Command { Short: "Create a proposal to update whitelisted and blacklisted tokens", RunE: func(cmd *cobra.Command, args []string) error { clientCtx, err := client.GetClientTxContext(cmd) + if err != nil { + return err + } isBlacklist, err := cmd.Flags().GetBool(FlagIsBlacklist) if err != nil { diff --git a/x/tokens/handler.go b/x/tokens/handler.go index d3e6c20ad..779e72f1b 100644 --- a/x/tokens/handler.go +++ b/x/tokens/handler.go @@ -15,12 +15,8 @@ func NewHandler(ck keeper.Keeper, cgk types.CustomGovKeeper) sdk.Handler { ctx = ctx.WithEventManager(sdk.NewEventManager()) switch msg := msg.(type) { - case *types.MsgUpsertTokenAlias: - res, err := msgServer.UpsertTokenAlias(sdk.WrapSDKContext(ctx), msg) - return sdk.WrapServiceResult(ctx, res, err) - - case *types.MsgUpsertTokenRate: - res, err := msgServer.UpsertTokenRate(sdk.WrapSDKContext(ctx), msg) + case *types.MsgUpsertTokenInfo: + res, err := msgServer.UpsertTokenInfo(sdk.WrapSDKContext(ctx), msg) return sdk.WrapServiceResult(ctx, res, err) default: diff --git a/x/tokens/handler_test.go b/x/tokens/handler_test.go index b1e294c5a..1339f5f11 100644 --- a/x/tokens/handler_test.go +++ b/x/tokens/handler_test.go @@ -4,10 +4,10 @@ import ( "bytes" "os" "strconv" - "strings" "testing" "time" + "cosmossdk.io/math" simapp "github.com/KiraCore/sekai/app" appparams "github.com/KiraCore/sekai/app/params" "github.com/KiraCore/sekai/x/gov" @@ -51,151 +51,107 @@ func setPermissionToAddr(t *testing.T, app *simapp.SekaiApp, ctx sdk.Context, ad return nil } -func TestNewHandler_MsgUpsertTokenAlias(t *testing.T) { +func TestNewHandler_MsgUpsertTokenInfo(t *testing.T) { app := simapp.Setup(false) ctx := app.NewContext(false, tmproto.Header{}) handler := tokens.NewHandler(app.TokensKeeper, app.CustomGovKeeper) tests := []struct { name string - constructor func(sdk.AccAddress) (*tokenstypes.MsgUpsertTokenAlias, error) + constructor func(sdk.AccAddress) (*tokenstypes.MsgUpsertTokenInfo, error) handlerErr string }{ { name: "good permission test", - constructor: func(addr sdk.AccAddress) (*tokenstypes.MsgUpsertTokenAlias, error) { - err := setPermissionToAddr(t, app, ctx, addr, types.PermUpsertTokenAlias) + constructor: func(addr sdk.AccAddress) (*tokenstypes.MsgUpsertTokenInfo, error) { + err := setPermissionToAddr(t, app, ctx, addr, types.PermUpsertTokenInfo) require.NoError(t, err) - return tokenstypes.NewMsgUpsertTokenAlias( - addr, - "ETH", - "Ethereum", - "icon", - 6, - []string{"finney"}, - false, - ), nil - }, - }, - { - name: "lack permission test", - constructor: func(addr sdk.AccAddress) (*tokenstypes.MsgUpsertTokenAlias, error) { - return tokenstypes.NewMsgUpsertTokenAlias( - addr, - "ETH", - "Ethereum", - "icon", - 6, - []string{"finney"}, - false, - ), nil - }, - handlerErr: "PERMISSION_UPSERT_TOKEN_ALIAS: not enough permissions", - }, - } - for i, tt := range tests { - addr := NewAccountByIndex(i) - theMsg, err := tt.constructor(addr) - require.NoError(t, err) - - _, err = handler(ctx, theMsg) - if len(tt.handlerErr) != 0 { - require.Error(t, err) - require.Contains(t, err.Error(), tt.handlerErr) - } else { - require.NoError(t, err) - - // test various query commands - alias := app.TokensKeeper.GetTokenAlias(ctx, theMsg.Symbol) - require.True(t, alias != nil) - aliasesAll := app.TokensKeeper.ListTokenAlias(ctx) - require.True(t, len(aliasesAll) > 0) - aliasesByDenom := app.TokensKeeper.GetTokenAliasesByDenom(ctx, theMsg.Denoms) - require.True(t, aliasesByDenom[theMsg.Denoms[0]] != nil) - - // try different alias for same denom - theMsg.Symbol += "V2" - _, err = handler(ctx, theMsg) - require.Error(t, err) - require.True(t, strings.Contains(err.Error(), "denom is already registered")) - } - } -} - -func TestNewHandler_MsgUpsertTokenRate(t *testing.T) { - - app := simapp.Setup(false) - ctx := app.NewContext(false, tmproto.Header{}) - handler := tokens.NewHandler(app.TokensKeeper, app.CustomGovKeeper) - - tests := []struct { - name string - constructor func(sdk.AccAddress) (*tokenstypes.MsgUpsertTokenRate, error) - handlerErr string - }{ - { - name: "good permission test", - constructor: func(addr sdk.AccAddress) (*tokenstypes.MsgUpsertTokenRate, error) { - err := setPermissionToAddr(t, app, ctx, addr, types.PermUpsertTokenRate) - require.NoError(t, err) - return tokenstypes.NewMsgUpsertTokenRate( + return tokenstypes.NewMsgUpsertTokenInfo( addr, + "adr20", "finney", sdk.NewDecWithPrec(1, 3), // 0.001 true, + sdk.ZeroInt(), sdk.ZeroInt(), sdk.ZeroDec(), sdk.ZeroInt(), false, false, + "ETH", + "Ethereum", + "icon", + 6, + "", "", "", 0, math.ZeroInt(), "", false, "", "", ), nil }, }, { name: "lack permission test", - constructor: func(addr sdk.AccAddress) (*tokenstypes.MsgUpsertTokenRate, error) { - return tokenstypes.NewMsgUpsertTokenRate( + constructor: func(addr sdk.AccAddress) (*tokenstypes.MsgUpsertTokenInfo, error) { + return tokenstypes.NewMsgUpsertTokenInfo( addr, + "adr20", "finney", sdk.NewDecWithPrec(1, 3), // 0.001 true, + sdk.ZeroInt(), sdk.ZeroInt(), sdk.ZeroDec(), sdk.ZeroInt(), false, false, + "ETH", + "Ethereum", + "icon", + 6, + "", "", "", 0, math.ZeroInt(), "", false, "", "", ), nil }, handlerErr: "PERMISSION_UPSERT_TOKEN_RATE: not enough permissions", }, { name: "negative rate value test", - constructor: func(addr sdk.AccAddress) (*tokenstypes.MsgUpsertTokenRate, error) { - return tokenstypes.NewMsgUpsertTokenRate( + constructor: func(addr sdk.AccAddress) (*tokenstypes.MsgUpsertTokenInfo, error) { + return tokenstypes.NewMsgUpsertTokenInfo( addr, + "adr20", "finney", sdk.NewDec(-1), // -1 true, + sdk.ZeroInt(), sdk.ZeroInt(), sdk.ZeroDec(), sdk.ZeroInt(), false, false, + "ETH", + "Ethereum", + "icon", + 6, + "", "", "", 0, math.ZeroInt(), "", false, "", "", ), nil }, handlerErr: "rate should be positive", }, - { - name: "bond denom rate change test", - constructor: func(addr sdk.AccAddress) (*tokenstypes.MsgUpsertTokenRate, error) { - err := setPermissionToAddr(t, app, ctx, addr, types.PermUpsertTokenRate) - require.NoError(t, err) - return tokenstypes.NewMsgUpsertTokenRate( - addr, - "ukex", sdk.NewDec(10), - true, - sdk.ZeroDec(), - sdk.ZeroInt(), - false, - false, - ), nil - }, - handlerErr: "bond denom rate is read-only", - }, + // { + // name: "bond denom rate change test", + // constructor: func(addr sdk.AccAddress) (*tokenstypes.MsgUpsertTokenInfo, error) { + // err := setPermissionToAddr(t, app, ctx, addr, types.PermUpsertTokenInfo) + // require.NoError(t, err) + // return tokenstypes.NewMsgUpsertTokenInfo( + // addr, + // "adr20", + // "ukex", sdk.NewDec(10), + // true, + // sdk.ZeroInt(), sdk.ZeroInt(), + // sdk.ZeroDec(), + // sdk.ZeroInt(), + // false, + // false, + // "ETH", + // "Ethereum", + // "icon", + // 6, + // "", "", "", 0, math.ZeroInt(), "", false, "", "", + // ), nil + // }, + // handlerErr: "bond denom rate is read-only", + // }, } for i, tt := range tests { addr := NewAccountByIndex(i) @@ -210,139 +166,17 @@ func TestNewHandler_MsgUpsertTokenRate(t *testing.T) { require.NoError(t, err) // test various query commands - rate := app.TokensKeeper.GetTokenRate(ctx, theMsg.Denom) + rate := app.TokensKeeper.GetTokenInfo(ctx, theMsg.Denom) require.True(t, rate != nil) - ratesAll := app.TokensKeeper.GetAllTokenRates(ctx) + ratesAll := app.TokensKeeper.GetAllTokenInfos(ctx) require.True(t, len(ratesAll) > 0) - ratesByDenom := app.TokensKeeper.GetTokenRatesByDenom(ctx, []string{theMsg.Denom}) - require.True(t, ratesByDenom[theMsg.Denom] != nil) + ratesByDenom := app.TokensKeeper.GetTokenInfosByDenom(ctx, []string{theMsg.Denom}) + require.True(t, ratesByDenom[theMsg.Denom].Data != nil) } } } -func TestHandler_CreateProposalUpsertTokenAliases_Errors(t *testing.T) { - proposerAddr, err := sdk.AccAddressFromBech32("kira1alzyfq40zjsveat87jlg8jxetwqmr0a29sgd0f") - require.NoError(t, err) - - tests := []struct { - name string - content govtypes.Content - preparePerms func(t *testing.T, app *simapp.SekaiApp, ctx sdk.Context) - expectedErr error - }{ - { - "Proposer does not have Perm", - tokenstypes.NewUpsertTokenAliasProposal( - "BTC", - "Bitcoin", - "http://theicon.com", - 18, - []string{}, - false, - ), - func(t *testing.T, app *simapp.SekaiApp, ctx sdk.Context) {}, - errors.Wrap(types.ErrNotEnoughPermissions, types.PermCreateUpsertTokenAliasProposal.String()), - }, - } - - for _, tt := range tests { - tt := tt - t.Run(tt.name, func(t *testing.T) { - app := simapp.Setup(false) - ctx := app.NewContext(false, tmproto.Header{}) - - tt.preparePerms(t, app, ctx) - - handler := gov.NewHandler(app.CustomGovKeeper) - msg, err := govtypes.NewMsgSubmitProposal(proposerAddr, "title", "some desc", tt.content) - require.NoError(t, err) - _, err = handler(ctx, msg) - require.EqualError(t, err, tt.expectedErr.Error()) - }) - } -} - -func TestHandler_CreateProposalUpsertTokenAliases(t *testing.T) { - proposerAddr, err := sdk.AccAddressFromBech32("kira1alzyfq40zjsveat87jlg8jxetwqmr0a29sgd0f") - require.NoError(t, err) - - app := simapp.Setup(false) - ctx := app.NewContext(false, tmproto.Header{ - Time: time.Now(), - }) - - // Set proposer Permissions - proposerActor := types.NewDefaultActor(proposerAddr) - err2 := app.CustomGovKeeper.AddWhitelistPermission(ctx, proposerActor, types.PermCreateUpsertTokenAliasProposal) - require.NoError(t, err2) - - properties := app.CustomGovKeeper.GetNetworkProperties(ctx) - properties.MinimumProposalEndTime = 10 - app.CustomGovKeeper.SetNetworkProperties(ctx, properties) - - handler := gov.NewHandler(app.CustomGovKeeper) - proposal := tokenstypes.NewUpsertTokenAliasProposal( - "BTC", - "Bitcoin", - "http://sdlkfjalsdk.es", - 18, - []string{ - "atom", - }, - false, - ) - msg, err := govtypes.NewMsgSubmitProposal(proposerAddr, "title", "some desc", proposal) - require.NoError(t, err) - res, err := handler( - ctx, - msg, - ) - require.NoError(t, err) - expData, _ := proto.Marshal(&govtypes.MsgSubmitProposalResponse{ProposalID: 1}) - require.Equal(t, expData, res.Data) - - savedProposal, found := app.CustomGovKeeper.GetProposal(ctx, 1) - require.True(t, found) - - expectedSavedProposal, err := types.NewProposal( - 1, - "title", - "some desc", - tokenstypes.NewUpsertTokenAliasProposal( - "BTC", - "Bitcoin", - "http://sdlkfjalsdk.es", - 18, - []string{ - "atom", - }, - false, - ), - ctx.BlockTime(), - ctx.BlockTime().Add(time.Second*time.Duration(properties.MinimumProposalEndTime)), - ctx.BlockTime().Add(time.Second*time.Duration(properties.MinimumProposalEndTime)+ - time.Second*time.Duration(properties.ProposalEnactmentTime), - ), - ctx.BlockHeight()+2, - ctx.BlockHeight()+3, - ) - require.NoError(t, err) - require.Equal(t, expectedSavedProposal, savedProposal) - - // Next proposal ID is increased. - id := app.CustomGovKeeper.GetNextProposalID(ctx) - require.Equal(t, uint64(2), id) - - // Is not on finished active proposals. - iterator := app.CustomGovKeeper.GetActiveProposalsWithFinishedVotingEndTimeIterator(ctx, ctx.BlockTime()) - require.False(t, iterator.Valid()) - - ctx = ctx.WithBlockTime(ctx.BlockTime().Add(time.Minute * 10)) - iterator = app.CustomGovKeeper.GetActiveProposalsWithFinishedVotingEndTimeIterator(ctx, ctx.BlockTime()) - require.True(t, iterator.Valid()) -} - -func TestHandler_CreateProposalUpsertTokenRates_Errors(t *testing.T) { +func TestHandler_CreateProposalUpsertTokenInfo_Errors(t *testing.T) { proposerAddr, err := sdk.AccAddressFromBech32("kira1alzyfq40zjsveat87jlg8jxetwqmr0a29sgd0f") require.NoError(t, err) @@ -354,17 +188,21 @@ func TestHandler_CreateProposalUpsertTokenRates_Errors(t *testing.T) { }{ { "Proposer does not have Perm", - tokenstypes.NewUpsertTokenRatesProposal( + tokenstypes.NewUpsertTokenInfosProposal( "btc", + "adr20", sdk.NewDec(1234), false, + sdk.ZeroInt(), sdk.ZeroInt(), sdk.ZeroDec(), sdk.ZeroInt(), false, false, + "BTC", "Bitcoin", "", 9, + "", "", "", 0, math.ZeroInt(), "", false, "", "", ), func(t *testing.T, app *simapp.SekaiApp, ctx sdk.Context) {}, - errors.Wrap(types.ErrNotEnoughPermissions, types.PermCreateUpsertTokenRateProposal.String()), + errors.Wrap(types.ErrNotEnoughPermissions, types.PermCreateUpsertTokenInfoProposal.String()), }, } @@ -385,7 +223,7 @@ func TestHandler_CreateProposalUpsertTokenRates_Errors(t *testing.T) { } } -func TestHandler_CreateProposalUpsertTokenRates(t *testing.T) { +func TestHandler_CreateProposalUpsertTokenInfo(t *testing.T) { proposerAddr, err := sdk.AccAddressFromBech32("kira1alzyfq40zjsveat87jlg8jxetwqmr0a29sgd0f") require.NoError(t, err) @@ -396,7 +234,7 @@ func TestHandler_CreateProposalUpsertTokenRates(t *testing.T) { // Set proposer Permissions proposerActor := types.NewDefaultActor(proposerAddr) - err2 := app.CustomGovKeeper.AddWhitelistPermission(ctx, proposerActor, types.PermCreateUpsertTokenRateProposal) + err2 := app.CustomGovKeeper.AddWhitelistPermission(ctx, proposerActor, types.PermCreateUpsertTokenInfoProposal) require.NoError(t, err2) properties := app.CustomGovKeeper.GetNetworkProperties(ctx) @@ -404,14 +242,18 @@ func TestHandler_CreateProposalUpsertTokenRates(t *testing.T) { app.CustomGovKeeper.SetNetworkProperties(ctx, properties) handler := gov.NewHandler(app.CustomGovKeeper) - proposal := tokenstypes.NewUpsertTokenRatesProposal( + proposal := tokenstypes.NewUpsertTokenInfosProposal( "btc", + "adr20", sdk.NewDec(1234), false, + sdk.ZeroInt(), sdk.ZeroInt(), sdk.ZeroDec(), sdk.ZeroInt(), false, false, + "BTC", "Bitcoin", "", 9, + "", "", "", 0, math.ZeroInt(), "", false, "", "", ) msg, err := govtypes.NewMsgSubmitProposal(proposerAddr, "title", "some desc", proposal) require.NoError(t, err) @@ -430,14 +272,18 @@ func TestHandler_CreateProposalUpsertTokenRates(t *testing.T) { 1, "title", "some desc", - tokenstypes.NewUpsertTokenRatesProposal( + tokenstypes.NewUpsertTokenInfosProposal( "btc", + "adr20", sdk.NewDec(1234), false, + sdk.ZeroInt(), sdk.ZeroInt(), sdk.ZeroDec(), sdk.ZeroInt(), false, false, + "BTC", "Bitcoin", "", 9, + "", "", "", 0, math.ZeroInt(), "", false, "", "", ), ctx.BlockTime(), ctx.BlockTime().Add(time.Second*time.Duration(properties.MinimumProposalEndTime)), diff --git a/x/tokens/keeper/alias.go b/x/tokens/keeper/alias.go deleted file mode 100644 index 064c981d9..000000000 --- a/x/tokens/keeper/alias.go +++ /dev/null @@ -1,106 +0,0 @@ -package keeper - -import ( - "fmt" - "strings" - - "github.com/cosmos/cosmos-sdk/store/prefix" - sdk "github.com/cosmos/cosmos-sdk/types" - - "github.com/KiraCore/sekai/x/tokens/types" -) - -// GetTokenAlias returns a token alias -func (k Keeper) GetTokenAlias(ctx sdk.Context, symbol string) *types.TokenAlias { - prefixStore := prefix.NewStore(ctx.KVStore(k.storeKey), PrefixKeyTokenAlias) - bz := prefixStore.Get([]byte(symbol)) - if bz == nil { - return nil - } - - alias := new(types.TokenAlias) - k.cdc.MustUnmarshal(bz, alias) - - return alias -} - -// ListTokenAlias returns all list of token alias -func (k Keeper) ListTokenAlias(ctx sdk.Context) []*types.TokenAlias { - var tokenAliases []*types.TokenAlias - - // get iterator for token aliases - store := ctx.KVStore(k.storeKey) - iterator := sdk.KVStorePrefixIterator(store, PrefixKeyTokenAlias) - defer iterator.Close() - - for ; iterator.Valid(); iterator.Next() { - symbol := strings.TrimPrefix(string(iterator.Key()), string(PrefixKeyTokenAlias)) - tokenAlias := k.GetTokenAlias(ctx, symbol) - if tokenAlias != nil { - tokenAliases = append(tokenAliases, tokenAlias) - } - } - return tokenAliases -} - -// GetTokenAliasesByDenom returns all list of token alias -func (k Keeper) GetTokenAliasesByDenom(ctx sdk.Context, denoms []string) map[string]*types.TokenAlias { - // get iterator for token aliases - store := ctx.KVStore(k.storeKey) - tokenAliasesMap := make(map[string]*types.TokenAlias) - - for _, denom := range denoms { - denomTokenStoreID := append([]byte(PrefixKeyDenomToken), []byte(denom)...) - - if store.Has(denomTokenStoreID) { - symbol := string(store.Get(denomTokenStoreID)) - tokenAlias := k.GetTokenAlias(ctx, symbol) - tokenAliasesMap[denom] = tokenAlias - } - } - return tokenAliasesMap -} - -// UpsertTokenAlias upsert a token alias to the registry -func (k Keeper) UpsertTokenAlias(ctx sdk.Context, alias types.TokenAlias) error { - store := ctx.KVStore(k.storeKey) - // we use symbol of TokenAlias as an ID inside KVStore storage - tokenAliasStoreID := append([]byte(PrefixKeyTokenAlias), []byte(alias.Symbol)...) - - for _, denom := range alias.Denoms { - denomTokenStoreID := append([]byte(PrefixKeyDenomToken), []byte(denom)...) - - if store.Has(denomTokenStoreID) { - symbol := string(store.Get(denomTokenStoreID)) - if symbol != alias.Symbol { - return fmt.Errorf("%s denom is already registered for %s token alias", denom, symbol) - } - } - store.Set(denomTokenStoreID, []byte(alias.Symbol)) - } - store.Set(tokenAliasStoreID, k.cdc.MustMarshal(&alias)) - return nil -} - -// DeleteTokenAlias delete token alias by symbol -func (k Keeper) DeleteTokenAlias(ctx sdk.Context, symbol string) error { - store := ctx.KVStore(k.storeKey) - // we use symbol of TokenAlias as an ID inside KVStore storage - tokenAliasStoreID := append([]byte(PrefixKeyTokenAlias), []byte(symbol)...) - - if !store.Has(tokenAliasStoreID) { - return fmt.Errorf("no alias is available for %s symbol", symbol) - } - - var alias types.TokenAlias - bz := store.Get(tokenAliasStoreID) - k.cdc.MustUnmarshal(bz, &alias) - - for _, denom := range alias.Denoms { - denomTokenStoreID := append([]byte(PrefixKeyDenomToken), []byte(denom)...) - store.Delete(denomTokenStoreID) - } - - store.Delete(tokenAliasStoreID) - return nil -} diff --git a/x/tokens/keeper/alias_test.go b/x/tokens/keeper/alias_test.go deleted file mode 100644 index f98161810..000000000 --- a/x/tokens/keeper/alias_test.go +++ /dev/null @@ -1,46 +0,0 @@ -package keeper_test - -import ( - "github.com/KiraCore/sekai/x/tokens/types" -) - -func (suite *KeeperTestSuite) TestTokenAlias() { - suite.SetupTest() - ctx := suite.ctx - - // check initial token alias before registration - alias := suite.app.TokensKeeper.GetTokenAlias(ctx, "stake") - suite.Require().Nil(alias) - aliases := suite.app.TokensKeeper.ListTokenAlias(ctx) - suite.Require().Len(aliases, 1) - aliasMap := suite.app.TokensKeeper.GetTokenAliasesByDenom(ctx, []string{"stake"}) - suite.Require().Equal(len(aliasMap), 0) - suite.Require().Nil(aliasMap["stake"]) - - // upsert token alias and check - newAlias := types.TokenAlias{ - Symbol: "stake", - Name: "test token", - Icon: "icon_link", - Decimals: 6, - Denoms: []string{"stake"}, - } - suite.app.TokensKeeper.UpsertTokenAlias(ctx, newAlias) - alias = suite.app.TokensKeeper.GetTokenAlias(ctx, "stake") - suite.Require().NotNil(alias) - aliases = suite.app.TokensKeeper.ListTokenAlias(ctx) - suite.Require().Len(aliases, 2) - aliasMap = suite.app.TokensKeeper.GetTokenAliasesByDenom(ctx, []string{"stake"}) - suite.Require().Equal(len(aliasMap), 1) - suite.Require().NotNil(aliasMap["stake"]) - - // delete token alias and check - suite.app.TokensKeeper.DeleteTokenAlias(ctx, "stake") - alias = suite.app.TokensKeeper.GetTokenAlias(ctx, "stake") - suite.Require().Nil(alias) - aliases = suite.app.TokensKeeper.ListTokenAlias(ctx) - suite.Require().Len(aliases, 1) - aliasMap = suite.app.TokensKeeper.GetTokenAliasesByDenom(ctx, []string{"stake"}) - suite.Require().Equal(len(aliasMap), 0) - suite.Require().Nil(aliasMap["stake"]) -} diff --git a/x/tokens/keeper/burn.go b/x/tokens/keeper/burn.go new file mode 100644 index 000000000..9a9eef470 --- /dev/null +++ b/x/tokens/keeper/burn.go @@ -0,0 +1,21 @@ +package keeper + +import ( + "github.com/KiraCore/sekai/x/tokens/types" + sdk "github.com/cosmos/cosmos-sdk/types" +) + +func (k Keeper) BurnCoins(ctx sdk.Context, moduleName string, amt sdk.Coins) error { + for _, coin := range amt { + tokenInfo := k.GetTokenInfo(ctx, coin.Denom) + if tokenInfo == nil { + return types.ErrTokenNotRegistered + } + tokenInfo.Supply = tokenInfo.Supply.Sub(coin.Amount) + err := k.UpsertTokenInfo(ctx, *tokenInfo) + if err != nil { + return err + } + } + return k.bankKeeper.BurnCoins(ctx, moduleName, amt) +} diff --git a/x/tokens/keeper/freeze.go b/x/tokens/keeper/freeze.go index 0e543413d..4565d8014 100644 --- a/x/tokens/keeper/freeze.go +++ b/x/tokens/keeper/freeze.go @@ -7,50 +7,42 @@ import ( func (k Keeper) AddTokensToBlacklist(ctx sdk.Context, tokens []string) { tokensBlackWhites := k.GetTokenBlackWhites(ctx) - if tokensBlackWhites != nil { - tokensBlackWhites.Blacklisted = addTokens(tokensBlackWhites.Blacklisted, tokens) - k.SetTokenBlackWhites(ctx, tokensBlackWhites) - } + tokensBlackWhites.Blacklisted = addTokens(tokensBlackWhites.Blacklisted, tokens) + k.SetTokenBlackWhites(ctx, tokensBlackWhites) } func (k Keeper) RemoveTokensFromBlacklist(ctx sdk.Context, tokens []string) { tokensBlackWhites := k.GetTokenBlackWhites(ctx) - if tokensBlackWhites != nil { - tokensBlackWhites.Blacklisted = removeTokens(tokensBlackWhites.Blacklisted, tokens) - k.SetTokenBlackWhites(ctx, tokensBlackWhites) - } + tokensBlackWhites.Blacklisted = removeTokens(tokensBlackWhites.Blacklisted, tokens) + k.SetTokenBlackWhites(ctx, tokensBlackWhites) } func (k Keeper) AddTokensToWhitelist(ctx sdk.Context, tokens []string) { tokensBlackWhites := k.GetTokenBlackWhites(ctx) - if tokensBlackWhites != nil { - tokensBlackWhites.Whitelisted = addTokens(tokensBlackWhites.Whitelisted, tokens) - k.SetTokenBlackWhites(ctx, tokensBlackWhites) - } + tokensBlackWhites.Whitelisted = addTokens(tokensBlackWhites.Whitelisted, tokens) + k.SetTokenBlackWhites(ctx, tokensBlackWhites) } func (k Keeper) RemoveTokensFromWhitelist(ctx sdk.Context, tokens []string) { tokensBlackWhites := k.GetTokenBlackWhites(ctx) - if tokensBlackWhites != nil { - tokensBlackWhites.Whitelisted = removeTokens(tokensBlackWhites.Whitelisted, tokens) - k.SetTokenBlackWhites(ctx, tokensBlackWhites) - } + tokensBlackWhites.Whitelisted = removeTokens(tokensBlackWhites.Whitelisted, tokens) + k.SetTokenBlackWhites(ctx, tokensBlackWhites) } -func (k Keeper) SetTokenBlackWhites(ctx sdk.Context, tokensBlackWhite *types.TokensWhiteBlack) { +func (k Keeper) SetTokenBlackWhites(ctx sdk.Context, tokensBlackWhite types.TokensWhiteBlack) { store := ctx.KVStore(k.storeKey) - store.Set(PrefixKeyTokenBlackWhite, k.cdc.MustMarshal(tokensBlackWhite)) + store.Set(PrefixKeyTokenBlackWhite, k.cdc.MustMarshal(&tokensBlackWhite)) } -func (k Keeper) GetTokenBlackWhites(ctx sdk.Context) *types.TokensWhiteBlack { +func (k Keeper) GetTokenBlackWhites(ctx sdk.Context) types.TokensWhiteBlack { store := ctx.KVStore(k.storeKey) bz := store.Get(PrefixKeyTokenBlackWhite) if bz == nil { - return nil + return types.TokensWhiteBlack{} } - tokensBlackWhite := new(types.TokensWhiteBlack) - k.cdc.MustUnmarshal(bz, tokensBlackWhite) + tokensBlackWhite := types.TokensWhiteBlack{} + k.cdc.MustUnmarshal(bz, &tokensBlackWhite) return tokensBlackWhite } diff --git a/x/tokens/keeper/freeze_test.go b/x/tokens/keeper/freeze_test.go index 43e21ea2c..95cf73e62 100644 --- a/x/tokens/keeper/freeze_test.go +++ b/x/tokens/keeper/freeze_test.go @@ -87,8 +87,8 @@ func (suite *KeeperTestSuite) TestTokenBlackWhiteSetGet() { Whitelisted: []string{"newwhite"}, Blacklisted: []string{"newblack"}, } - suite.app.TokensKeeper.SetTokenBlackWhites(ctx, &blackWhites) + suite.app.TokensKeeper.SetTokenBlackWhites(ctx, blackWhites) bw := suite.app.TokensKeeper.GetTokenBlackWhites(ctx) suite.Require().NotNil(bw) - suite.Require().Equal(blackWhites, *bw) + suite.Require().Equal(blackWhites, bw) } diff --git a/x/tokens/keeper/grpc_query.go b/x/tokens/keeper/grpc_query.go index 520906998..a1aa9220d 100644 --- a/x/tokens/keeper/grpc_query.go +++ b/x/tokens/keeper/grpc_query.go @@ -3,7 +3,6 @@ package keeper import ( "context" - appparams "github.com/KiraCore/sekai/app/params" "github.com/KiraCore/sekai/x/tokens/types" sdk "github.com/cosmos/cosmos-sdk/types" ) @@ -18,45 +17,33 @@ func NewQuerier(keeper Keeper) types.QueryServer { var _ types.QueryServer = Querier{} -func (q Querier) GetTokenAlias(ctx context.Context, request *types.TokenAliasRequest) (*types.TokenAliasResponse, error) { - alias := q.keeper.GetTokenAlias(sdk.UnwrapSDKContext(ctx), request.Symbol) - - return &types.TokenAliasResponse{Data: alias}, nil -} - -func (q Querier) GetTokenAliasesByDenom(ctx context.Context, request *types.TokenAliasesByDenomRequest) (*types.TokenAliasesByDenomResponse, error) { - aliases := q.keeper.GetTokenAliasesByDenom(sdk.UnwrapSDKContext(ctx), request.Denoms) - - return &types.TokenAliasesByDenomResponse{Data: aliases}, nil -} - -func (q Querier) GetAllTokenAliases(ctx context.Context, request *types.AllTokenAliasesRequest) (*types.AllTokenAliasesResponse, error) { - aliases := q.keeper.ListTokenAlias(sdk.UnwrapSDKContext(ctx)) - - return &types.AllTokenAliasesResponse{ - Data: aliases, - DefaultDenom: appparams.DefaultDenom, - Bech32Prefix: appparams.AccountAddressPrefix, +func (q Querier) GetTokenInfo(goCtx context.Context, request *types.TokenInfoRequest) (*types.TokenInfoResponse, error) { + ctx := sdk.UnwrapSDKContext(goCtx) + info := q.keeper.GetTokenInfo(ctx, request.Denom) + supply := q.keeper.bankKeeper.GetSupply(ctx, request.Denom) + return &types.TokenInfoResponse{ + Data: info, + Supply: supply, }, nil } -func (q Querier) GetTokenRate(ctx context.Context, request *types.TokenRateRequest) (*types.TokenRateResponse, error) { - rate := q.keeper.GetTokenRate(sdk.UnwrapSDKContext(ctx), request.Denom) - - if rate == nil { - return &types.TokenRateResponse{Data: nil}, nil - } - return &types.TokenRateResponse{Data: rate}, nil -} - -func (q Querier) GetTokenRatesByDenom(ctx context.Context, request *types.TokenRatesByDenomRequest) (*types.TokenRatesByDenomResponse, error) { - rates := q.keeper.GetTokenRatesByDenom(sdk.UnwrapSDKContext(ctx), request.Denoms) - return &types.TokenRatesByDenomResponse{Data: rates}, nil +func (q Querier) GetTokenInfosByDenom(ctx context.Context, request *types.TokenInfosByDenomRequest) (*types.TokenInfosByDenomResponse, error) { + infos := q.keeper.GetTokenInfosByDenom(sdk.UnwrapSDKContext(ctx), request.Denoms) + return &types.TokenInfosByDenomResponse{Data: infos}, nil } -func (q Querier) GetAllTokenRates(ctx context.Context, request *types.AllTokenRatesRequest) (*types.AllTokenRatesResponse, error) { - rates := q.keeper.GetAllTokenRates(sdk.UnwrapSDKContext(ctx)) - return &types.AllTokenRatesResponse{Data: rates}, nil +func (q Querier) GetAllTokenInfos(goCtx context.Context, request *types.AllTokenInfosRequest) (*types.AllTokenInfosResponse, error) { + ctx := sdk.UnwrapSDKContext(goCtx) + infos := q.keeper.GetAllTokenInfos(ctx) + data := []types.TokenInfoResponse{} + for _, info := range infos { + supply := q.keeper.bankKeeper.GetSupply(ctx, info.Denom) + data = append(data, types.TokenInfoResponse{ + Data: &info, + Supply: supply, + }) + } + return &types.AllTokenInfosResponse{Data: data}, nil } func (q Querier) GetTokenBlackWhites(ctx context.Context, request *types.TokenBlackWhitesRequest) (*types.TokenBlackWhitesResponse, error) { diff --git a/x/tokens/keeper/grpc_query_test.go b/x/tokens/keeper/grpc_query_test.go index 63d7fa2f4..e3d3a8d12 100644 --- a/x/tokens/keeper/grpc_query_test.go +++ b/x/tokens/keeper/grpc_query_test.go @@ -11,110 +11,54 @@ import ( "github.com/stretchr/testify/require" ) -func TestQuerier_GetTokenAlias(t *testing.T) { +func TestQuerier_GetTokenInfo(t *testing.T) { app := simapp.Setup(false) ctx := app.NewContext(false, tmproto.Header{}) querier := keeper.NewQuerier(app.TokensKeeper) - resp, err := querier.GetTokenAlias( + resp, err := querier.GetTokenInfo( sdk.WrapSDKContext(ctx), - &types.TokenAliasRequest{Symbol: "KEX"}, - ) - require.NoError(t, err) - require.Equal(t, "KEX", resp.Data.Symbol) - require.Equal(t, "Kira", resp.Data.Name) - require.Equal(t, "", resp.Data.Icon) - require.Equal(t, uint32(0x6), resp.Data.Decimals) - require.Equal(t, []string{"ukex", "mkex"}, resp.Data.Denoms) -} - -func TestQuerier_GetTokenAliasesByDenom(t *testing.T) { - app := simapp.Setup(false) - ctx := app.NewContext(false, tmproto.Header{}) - - querier := keeper.NewQuerier(app.TokensKeeper) - - resp, err := querier.GetTokenAliasesByDenom( - sdk.WrapSDKContext(ctx), - &types.TokenAliasesByDenomRequest{Denoms: []string{"ukex"}}, - ) - require.NoError(t, err) - require.Equal(t, len(resp.Data), 1) - require.Equal(t, "KEX", resp.Data["ukex"].Symbol) - require.Equal(t, "Kira", resp.Data["ukex"].Name) - require.Equal(t, "", resp.Data["ukex"].Icon) - require.Equal(t, uint32(0x6), resp.Data["ukex"].Decimals) - require.Equal(t, []string{"ukex", "mkex"}, resp.Data["ukex"].Denoms) -} - -func TestQuerier_GetAllTokenAliases(t *testing.T) { - app := simapp.Setup(false) - ctx := app.NewContext(false, tmproto.Header{}) - - querier := keeper.NewQuerier(app.TokensKeeper) - - resp, err := querier.GetAllTokenAliases( - sdk.WrapSDKContext(ctx), - &types.AllTokenAliasesRequest{}, - ) - require.NoError(t, err) - require.Equal(t, len(resp.Data), 1) - require.Equal(t, "KEX", resp.Data[0].Symbol) - require.Equal(t, "Kira", resp.Data[0].Name) - require.Equal(t, "", resp.Data[0].Icon) - require.Equal(t, uint32(0x6), resp.Data[0].Decimals) - require.Equal(t, []string{"ukex", "mkex"}, resp.Data[0].Denoms) -} - -func TestQuerier_GetTokenRate(t *testing.T) { - app := simapp.Setup(false) - ctx := app.NewContext(false, tmproto.Header{}) - - querier := keeper.NewQuerier(app.TokensKeeper) - - resp, err := querier.GetTokenRate( - sdk.WrapSDKContext(ctx), - &types.TokenRateRequest{Denom: "ukex"}, + &types.TokenInfoRequest{Denom: "ukex"}, ) require.NoError(t, err) require.Equal(t, "ukex", resp.Data.Denom) require.Equal(t, sdk.NewDec(1), resp.Data.FeeRate) - require.Equal(t, true, resp.Data.FeePayments) + require.Equal(t, true, resp.Data.FeeEnabled) } -func TestQuerier_GetTokenRatesByDenom(t *testing.T) { +func TestQuerier_GetTokenInfosByDenom(t *testing.T) { app := simapp.Setup(false) ctx := app.NewContext(false, tmproto.Header{}) querier := keeper.NewQuerier(app.TokensKeeper) - resp, err := querier.GetTokenRatesByDenom( + resp, err := querier.GetTokenInfosByDenom( sdk.WrapSDKContext(ctx), - &types.TokenRatesByDenomRequest{Denoms: []string{"ukex"}}, + &types.TokenInfosByDenomRequest{Denoms: []string{"ukex"}}, ) require.NoError(t, err) require.Equal(t, len(resp.Data), 1) - require.Equal(t, "ukex", resp.Data["ukex"].Denom) - require.Equal(t, sdk.NewDec(1), resp.Data["ukex"].FeeRate) - require.Equal(t, true, resp.Data["ukex"].FeePayments) + require.Equal(t, "ukex", resp.Data["ukex"].Data.Denom) + require.Equal(t, sdk.NewDec(1), resp.Data["ukex"].Data.FeeRate) + require.Equal(t, true, resp.Data["ukex"].Data.FeeEnabled) } -func TestQuerier_GetAllTokenRates(t *testing.T) { +func TestQuerier_GetAllTokenInfos(t *testing.T) { app := simapp.Setup(false) ctx := app.NewContext(false, tmproto.Header{}) querier := keeper.NewQuerier(app.TokensKeeper) - resp, err := querier.GetAllTokenRates( + resp, err := querier.GetAllTokenInfos( sdk.WrapSDKContext(ctx), - &types.AllTokenRatesRequest{}, + &types.AllTokenInfosRequest{}, ) require.NoError(t, err) require.Equal(t, len(resp.Data), 4) - require.Equal(t, "frozen", resp.Data[0].Denom) - require.Equal(t, sdk.NewDecWithPrec(1, 1), resp.Data[0].FeeRate) - require.Equal(t, true, resp.Data[0].FeePayments) + require.Equal(t, "xeth", resp.Data[0].Data.Denom) + require.Equal(t, sdk.NewDecWithPrec(1, 1), resp.Data[0].Data.FeeRate) + require.Equal(t, true, resp.Data[0].Data.FeeEnabled) } func TestQuerier_GetTokenBlackWhites(t *testing.T) { diff --git a/x/tokens/keeper/keeper.go b/x/tokens/keeper/keeper.go index 2e29b06fb..f95bf99e0 100644 --- a/x/tokens/keeper/keeper.go +++ b/x/tokens/keeper/keeper.go @@ -2,6 +2,7 @@ package keeper import ( appparams "github.com/KiraCore/sekai/app/params" + "github.com/KiraCore/sekai/x/tokens/types" "github.com/cosmos/cosmos-sdk/codec" storetypes "github.com/cosmos/cosmos-sdk/store/types" sdk "github.com/cosmos/cosmos-sdk/types" @@ -9,9 +10,7 @@ import ( // store prefixes var ( - PrefixKeyTokenAlias = []byte("token_alias_registry") - PrefixKeyDenomToken = []byte("denom_token_registry") - PrefixKeyTokenRate = []byte("token_rate_registry") + PrefixKeyTokenInfo = []byte("token_rate_registry") PrefixKeyTokenBlackWhite = []byte("token_black_white") ) @@ -19,11 +18,17 @@ var ( type Keeper struct { cdc codec.BinaryCodec storeKey storetypes.StoreKey + + bankKeeper types.BankKeeper } // NewKeeper returns instance of a keeper -func NewKeeper(storeKey storetypes.StoreKey, cdc codec.BinaryCodec) Keeper { - return Keeper{cdc: cdc, storeKey: storeKey} +func NewKeeper(storeKey storetypes.StoreKey, cdc codec.BinaryCodec, bankKeeper types.BankKeeper) Keeper { + return Keeper{ + cdc: cdc, + storeKey: storeKey, + bankKeeper: bankKeeper, + } } // DefaultDenom returns the denom that is basically used for fee payment diff --git a/x/tokens/keeper/mint.go b/x/tokens/keeper/mint.go new file mode 100644 index 000000000..50c2e9be3 --- /dev/null +++ b/x/tokens/keeper/mint.go @@ -0,0 +1,36 @@ +package keeper + +import ( + "cosmossdk.io/math" + "github.com/KiraCore/sekai/x/tokens/types" + sdk "github.com/cosmos/cosmos-sdk/types" +) + +func (k Keeper) MintCoins(ctx sdk.Context, moduleName string, amt sdk.Coins) error { + for _, coin := range amt { + tokenInfo := k.GetTokenInfo(ctx, coin.Denom) + if tokenInfo == nil { + tokenInfo = &types.TokenInfo{ + Denom: coin.Denom, + FeeRate: math.LegacyZeroDec(), + FeeEnabled: false, + Supply: math.ZeroInt(), + StakeCap: math.LegacyZeroDec(), + StakeMin: math.OneInt(), + StakeEnabled: false, + Inactive: false, + Symbol: coin.Denom, + Name: coin.Denom, + Icon: "", + Decimals: 6, + } + } + + tokenInfo.Supply = tokenInfo.Supply.Add(coin.Amount) + err := k.UpsertTokenInfo(ctx, *tokenInfo) + if err != nil { + return err + } + } + return k.bankKeeper.MintCoins(ctx, moduleName, amt) +} diff --git a/x/tokens/keeper/msg_server.go b/x/tokens/keeper/msg_server.go index 2264a7486..001f4b22f 100644 --- a/x/tokens/keeper/msg_server.go +++ b/x/tokens/keeper/msg_server.go @@ -3,11 +3,11 @@ package keeper import ( "context" "fmt" - "strings" + errorsmod "cosmossdk.io/errors" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/cosmos-sdk/types/errors" + appparams "github.com/KiraCore/sekai/app/params" govtypes "github.com/KiraCore/sekai/x/gov/types" "github.com/KiraCore/sekai/x/tokens/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" @@ -29,74 +29,112 @@ func NewMsgServerImpl(keeper Keeper, cgk types.CustomGovKeeper) types.MsgServer var _ types.MsgServer = msgServer{} -func (k msgServer) UpsertTokenAlias( - goCtx context.Context, - msg *types.MsgUpsertTokenAlias, -) (*types.MsgUpsertTokenAliasResponse, error) { +func (k msgServer) UpsertTokenInfo(goCtx context.Context, msg *types.MsgUpsertTokenInfo) (*types.MsgUpsertTokenInfoResponse, error) { ctx := sdk.UnwrapSDKContext(goCtx) - isAllowed := k.cgk.CheckIfAllowedPermission(ctx, msg.Proposer, govtypes.PermUpsertTokenAlias) + err := msg.ValidateBasic() + if err != nil { + return nil, errorsmod.Wrap(sdkerrors.ErrInvalidRequest, err.Error()) + } + + tokenInfo := k.keeper.GetTokenInfo(ctx, msg.Denom) + if tokenInfo != nil { + if tokenInfo.Owner != msg.Proposer.String() || tokenInfo.OwnerEditDisabled { + return nil, errorsmod.Wrap(govtypes.ErrNotEnoughPermissions, govtypes.PermUpsertTokenInfo.String()) + } + tokenInfo.Icon = msg.Icon + tokenInfo.Description = msg.Description + tokenInfo.Website = msg.Website + tokenInfo.Social = msg.Social + if !tokenInfo.SupplyCap.IsZero() && + (tokenInfo.SupplyCap.LT(msg.SupplyCap) || msg.SupplyCap.IsZero()) { + return nil, types.ErrSupplyCapShouldNotBeIncreased + } + tokenInfo.SupplyCap = msg.SupplyCap + tokenInfo.MintingFee = msg.MintingFee + tokenInfo.Owner = msg.Owner + tokenInfo.OwnerEditDisabled = msg.OwnerEditDisabled + err = k.keeper.UpsertTokenInfo(ctx, *tokenInfo) + if err != nil { + return nil, errorsmod.Wrap(sdkerrors.ErrInvalidRequest, err.Error()) + } + + return &types.MsgUpsertTokenInfoResponse{}, nil + } + + isAllowed := k.cgk.CheckIfAllowedPermission(ctx, msg.Proposer, govtypes.PermUpsertTokenInfo) if !isAllowed { - return nil, errors.Wrap(govtypes.ErrNotEnoughPermissions, govtypes.PermUpsertTokenAlias.String()) + return nil, errorsmod.Wrap(govtypes.ErrNotEnoughPermissions, govtypes.PermUpsertTokenInfo.String()) } - err := k.keeper.UpsertTokenAlias(ctx, *types.NewTokenAlias( + err = k.keeper.UpsertTokenInfo(ctx, types.NewTokenInfo( + msg.Denom, + msg.TokenType, + msg.FeeRate, + msg.FeeEnabled, + msg.Supply, + msg.SupplyCap, + msg.StakeCap, + msg.StakeMin, + msg.StakeEnabled, + msg.Inactive, msg.Symbol, msg.Name, msg.Icon, msg.Decimals, - msg.Denoms, - msg.Invalidated, + msg.Description, + msg.Website, + msg.Social, + msg.Holders, + msg.MintingFee, + msg.Owner, + msg.OwnerEditDisabled, + msg.NftMetadata, + msg.NftHash, )) + if err != nil { + return nil, errorsmod.Wrap(sdkerrors.ErrInvalidRequest, err.Error()) + } + ctx.EventManager().EmitEvent( sdk.NewEvent( - types.EventTypeUpsertTokenAlias, + types.EventTypeUpsertTokenInfo, sdk.NewAttribute(types.AttributeKeyProposer, msg.Proposer.String()), - sdk.NewAttribute(types.AttributeKeySymbol, msg.Symbol), - sdk.NewAttribute(types.AttributeKeyName, msg.Name), - sdk.NewAttribute(types.AttributeKeyIcon, msg.Icon), - sdk.NewAttribute(types.AttributeKeyDecimals, fmt.Sprintf("%d", msg.Decimals)), - sdk.NewAttribute(types.AttributeKeyDenoms, strings.Join(msg.Denoms, ",")), + sdk.NewAttribute(types.AttributeKeyDenom, msg.Denom), + sdk.NewAttribute(types.AttributeKeyFeeRate, msg.FeeRate.String()), + sdk.NewAttribute(types.AttributeKeyFeeEnabled, fmt.Sprintf("%t", msg.FeeEnabled)), ), ) - return &types.MsgUpsertTokenAliasResponse{}, err + + return &types.MsgUpsertTokenInfoResponse{}, nil } -func (k msgServer) UpsertTokenRate(goCtx context.Context, msg *types.MsgUpsertTokenRate) (*types.MsgUpsertTokenRateResponse, error) { +func (k msgServer) EthereumTx(goCtx context.Context, msg *types.MsgEthereumTx) (*types.MsgEthereumTxResponse, error) { ctx := sdk.UnwrapSDKContext(goCtx) err := msg.ValidateBasic() if err != nil { - return nil, errors.Wrap(sdkerrors.ErrInvalidRequest, err.Error()) + return nil, errorsmod.Wrap(sdkerrors.ErrInvalidRequest, err.Error()) } - isAllowed := k.cgk.CheckIfAllowedPermission(ctx, msg.Proposer, govtypes.PermUpsertTokenRate) - if !isAllowed { - return nil, errors.Wrap(govtypes.ErrNotEnoughPermissions, govtypes.PermUpsertTokenRate.String()) - } - - err = k.keeper.UpsertTokenRate(ctx, *types.NewTokenRate( - msg.Denom, - msg.Rate, - msg.FeePayments, - msg.StakeCap, - msg.StakeMin, - msg.StakeToken, - msg.Invalidated, - )) + if msg.TxType == "NativeSend" { + sender, err := sdk.AccAddressFromBech32(msg.Sender) + if err != nil { + return nil, err + } + recipient := msg.AsTransaction().To() + value := sdk.NewIntFromBigInt(msg.AsTransaction().Value()) + cutUnit := sdk.NewInt(1000_000_000_000) + balance := value.Quo(cutUnit) + amount := sdk.NewCoin(appparams.DefaultDenom, balance) - if err != nil { - return nil, errors.Wrap(sdkerrors.ErrInvalidRequest, err.Error()) + err = k.keeper.bankKeeper.SendCoins(ctx, sender, sdk.AccAddress(recipient.Bytes()), sdk.Coins{amount}) + if err != nil { + return nil, err + } + } else { + return nil, types.ErrUnimplementedTxType } - ctx.EventManager().EmitEvent( - sdk.NewEvent( - types.EventTypeUpsertTokenRate, - sdk.NewAttribute(types.AttributeKeyProposer, msg.Proposer.String()), - sdk.NewAttribute(types.AttributeKeyDenom, msg.Denom), - sdk.NewAttribute(types.AttributeKeyRate, msg.Rate.String()), - sdk.NewAttribute(types.AttributeKeyFeePayments, fmt.Sprintf("%t", msg.FeePayments)), - ), - ) - return &types.MsgUpsertTokenRateResponse{}, nil + return &types.MsgEthereumTxResponse{}, nil } diff --git a/x/tokens/keeper/rate.go b/x/tokens/keeper/rate.go deleted file mode 100644 index a29fd83b9..000000000 --- a/x/tokens/keeper/rate.go +++ /dev/null @@ -1,98 +0,0 @@ -package keeper - -import ( - "errors" - "fmt" - "strings" - - "github.com/cosmos/cosmos-sdk/store/prefix" - sdk "github.com/cosmos/cosmos-sdk/types" - - "github.com/KiraCore/sekai/x/tokens/types" -) - -// GetTokenRate returns a token rate -func (k Keeper) GetTokenRate(ctx sdk.Context, denom string) *types.TokenRate { - prefixStore := prefix.NewStore(ctx.KVStore(k.storeKey), PrefixKeyTokenRate) - bz := prefixStore.Get([]byte(denom)) - if bz == nil { - return nil - } - - rate := new(types.TokenRate) - k.cdc.MustUnmarshal(bz, rate) - - return rate -} - -// GetAllTokenRates returns all list of token rate -func (k Keeper) GetAllTokenRates(ctx sdk.Context) []*types.TokenRate { - var tokenRates []*types.TokenRate - - // get iterator for token rates - store := ctx.KVStore(k.storeKey) - iterator := sdk.KVStorePrefixIterator(store, PrefixKeyTokenRate) - defer iterator.Close() - - for ; iterator.Valid(); iterator.Next() { - denom := strings.TrimPrefix(string(iterator.Key()), string(PrefixKeyTokenRate)) - tokenRate := k.GetTokenRate(ctx, denom) - if tokenRate != nil { - tokenRates = append(tokenRates, tokenRate) - } - } - return tokenRates -} - -// GetTokenRatesByDenom returns all list of token rate -func (k Keeper) GetTokenRatesByDenom(ctx sdk.Context, denoms []string) map[string]*types.TokenRate { - // get iterator for token aliases - store := ctx.KVStore(k.storeKey) - tokenRatesMap := make(map[string]*types.TokenRate) - - for _, denom := range denoms { - denomTokenStoreID := append([]byte(PrefixKeyTokenRate), []byte(denom)...) - - if store.Has(denomTokenStoreID) { - tokenRate := k.GetTokenRate(ctx, denom) - tokenRatesMap[denom] = tokenRate - } - } - return tokenRatesMap -} - -// UpsertTokenRate upsert a token rate to the registry -func (k Keeper) UpsertTokenRate(ctx sdk.Context, rate types.TokenRate) error { - store := ctx.KVStore(k.storeKey) - // we use denom of TokenRate as an ID inside KVStore storage - tokenRateStoreID := append([]byte(PrefixKeyTokenRate), []byte(rate.Denom)...) - if rate.Denom == k.DefaultDenom(ctx) && store.Has(tokenRateStoreID) { - return errors.New("bond denom rate is read-only") - } - - store.Set(tokenRateStoreID, k.cdc.MustMarshal(&rate)) - - totalRewardsCap := sdk.ZeroDec() - rates := k.GetAllTokenRates(ctx) - for _, rate := range rates { - totalRewardsCap = totalRewardsCap.Add(rate.StakeCap) - } - if totalRewardsCap.GT(sdk.OneDec()) { - return types.ErrTotalRewardsCapExceeds100Percent - } - return nil -} - -// DeleteTokenRate delete token denom by denom -func (k Keeper) DeleteTokenRate(ctx sdk.Context, denom string) error { - store := ctx.KVStore(k.storeKey) - // we use symbol of DeleteTokenRate as an ID inside KVStore storage - tokenRateStoreID := append([]byte(PrefixKeyTokenRate), []byte(denom)...) - - if !store.Has(tokenRateStoreID) { - return fmt.Errorf("no rate registry is available for %s denom", denom) - } - - store.Delete(tokenRateStoreID) - return nil -} diff --git a/x/tokens/keeper/rate_test.go b/x/tokens/keeper/rate_test.go deleted file mode 100644 index e6bf5ba9f..000000000 --- a/x/tokens/keeper/rate_test.go +++ /dev/null @@ -1,45 +0,0 @@ -package keeper_test - -import ( - "github.com/KiraCore/sekai/x/tokens/types" - sdk "github.com/cosmos/cosmos-sdk/types" -) - -func (suite *KeeperTestSuite) TestTokenRates() { - suite.SetupTest() - ctx := suite.ctx - - // check initial token rate before registration - rate := suite.app.TokensKeeper.GetTokenRate(ctx, "stake") - suite.Require().Nil(rate) - rates := suite.app.TokensKeeper.GetAllTokenRates(ctx) - suite.Require().Len(rates, 4) - rateMap := suite.app.TokensKeeper.GetTokenRatesByDenom(ctx, []string{"stake"}) - suite.Require().Equal(len(rateMap), 0) - suite.Require().Nil(rateMap["stake"]) - - // upsert token rate and check - newRate := types.TokenRate{ - Denom: "stake", - FeeRate: sdk.NewDec(2), - FeePayments: true, - } - suite.app.TokensKeeper.UpsertTokenRate(ctx, newRate) - rate = suite.app.TokensKeeper.GetTokenRate(ctx, "stake") - suite.Require().NotNil(rate) - rates = suite.app.TokensKeeper.GetAllTokenRates(ctx) - suite.Require().Len(rates, 5) - rateMap = suite.app.TokensKeeper.GetTokenRatesByDenom(ctx, []string{"stake"}) - suite.Require().Equal(len(rateMap), 1) - suite.Require().NotNil(rateMap["stake"]) - - // delete token rate and check - suite.app.TokensKeeper.DeleteTokenRate(ctx, "stake") - rate = suite.app.TokensKeeper.GetTokenRate(ctx, "stake") - suite.Require().Nil(rate) - rates = suite.app.TokensKeeper.GetAllTokenRates(ctx) - suite.Require().Len(rates, 4) - rateMap = suite.app.TokensKeeper.GetTokenRatesByDenom(ctx, []string{"stake"}) - suite.Require().Equal(len(rateMap), 0) - suite.Require().Nil(rateMap["stake"]) -} diff --git a/x/tokens/keeper/token_info.go b/x/tokens/keeper/token_info.go new file mode 100644 index 000000000..92d702b4a --- /dev/null +++ b/x/tokens/keeper/token_info.go @@ -0,0 +1,97 @@ +package keeper + +import ( + "fmt" + + "github.com/cosmos/cosmos-sdk/store/prefix" + sdk "github.com/cosmos/cosmos-sdk/types" + + "github.com/KiraCore/sekai/x/tokens/types" +) + +// GetTokenInfo returns a token info +func (k Keeper) GetTokenInfo(ctx sdk.Context, denom string) *types.TokenInfo { + prefixStore := prefix.NewStore(ctx.KVStore(k.storeKey), PrefixKeyTokenInfo) + bz := prefixStore.Get([]byte(denom)) + if bz == nil { + return nil + } + + info := new(types.TokenInfo) + k.cdc.MustUnmarshal(bz, info) + + return info +} + +// GetAllTokenInfos returns all list of token info +func (k Keeper) GetAllTokenInfos(ctx sdk.Context) []types.TokenInfo { + var tokenInfos []types.TokenInfo + + // get iterator for token infos + store := ctx.KVStore(k.storeKey) + iterator := sdk.KVStorePrefixIterator(store, PrefixKeyTokenInfo) + defer iterator.Close() + + for ; iterator.Valid(); iterator.Next() { + info := types.TokenInfo{} + k.cdc.MustUnmarshal(iterator.Value(), &info) + tokenInfos = append(tokenInfos, info) + } + return tokenInfos +} + +// GetTokenInfosByDenom returns all list of token info +func (k Keeper) GetTokenInfosByDenom(ctx sdk.Context, denoms []string) map[string]types.TokenInfoResponse { + tokenInfosMap := make(map[string]types.TokenInfoResponse) + + for _, denom := range denoms { + tokenInfo := k.GetTokenInfo(ctx, denom) + supply := k.bankKeeper.GetSupply(ctx, denom) + tokenInfosMap[denom] = types.TokenInfoResponse{ + Data: tokenInfo, + Supply: supply, + } + } + return tokenInfosMap +} + +// UpsertTokenInfo upsert a token info to the registry +func (k Keeper) UpsertTokenInfo(ctx sdk.Context, info types.TokenInfo) error { + store := ctx.KVStore(k.storeKey) + // we use denom of TokenInfo as an ID inside KVStore storage + tokenInfoStoreID := append([]byte(PrefixKeyTokenInfo), []byte(info.Denom)...) + // if info.Denom == k.DefaultDenom(ctx) && store.Has(tokenInfoStoreID) { + // return types.ErrBondDenomIsReadOnly + // } + + if !info.SupplyCap.IsNil() && info.SupplyCap.IsPositive() && info.Supply.GT(info.SupplyCap) { + return types.ErrCannotExceedTokenCap + } + + store.Set(tokenInfoStoreID, k.cdc.MustMarshal(&info)) + + totalRewardsCap := sdk.ZeroDec() + infos := k.GetAllTokenInfos(ctx) + for _, info := range infos { + totalRewardsCap = totalRewardsCap.Add(info.StakeCap) + } + if totalRewardsCap.GT(sdk.OneDec()) { + return types.ErrTotalRewardsCapExceeds100Percent + } + + return nil +} + +// DeleteTokenInfo delete token denom by denom +func (k Keeper) DeleteTokenInfo(ctx sdk.Context, denom string) error { + store := ctx.KVStore(k.storeKey) + // we use symbol of DeleteTokenInfo as an ID inside KVStore storage + tokenInfoStoreID := append([]byte(PrefixKeyTokenInfo), []byte(denom)...) + + if !store.Has(tokenInfoStoreID) { + return fmt.Errorf("no token info registry is available for %s denom", denom) + } + + store.Delete(tokenInfoStoreID) + return nil +} diff --git a/x/tokens/keeper/token_info_test.go b/x/tokens/keeper/token_info_test.go new file mode 100644 index 000000000..185c85b04 --- /dev/null +++ b/x/tokens/keeper/token_info_test.go @@ -0,0 +1,45 @@ +package keeper_test + +import ( + "github.com/KiraCore/sekai/x/tokens/types" + sdk "github.com/cosmos/cosmos-sdk/types" +) + +func (suite *KeeperTestSuite) TestTokenInfos() { + suite.SetupTest() + ctx := suite.ctx + + // check initial token rate before registration + rate := suite.app.TokensKeeper.GetTokenInfo(ctx, "stake") + suite.Require().Nil(rate) + rates := suite.app.TokensKeeper.GetAllTokenInfos(ctx) + suite.Require().Len(rates, 4) + rateMap := suite.app.TokensKeeper.GetTokenInfosByDenom(ctx, []string{"stake"}) + suite.Require().Equal(len(rateMap), 1) + suite.Require().Nil(rateMap["stake"].Data) + + // upsert token rate and check + newRate := types.TokenInfo{ + Denom: "stake", + FeeRate: sdk.NewDec(2), + FeeEnabled: true, + } + suite.app.TokensKeeper.UpsertTokenInfo(ctx, newRate) + rate = suite.app.TokensKeeper.GetTokenInfo(ctx, "stake") + suite.Require().NotNil(rate) + rates = suite.app.TokensKeeper.GetAllTokenInfos(ctx) + suite.Require().Len(rates, 5) + rateMap = suite.app.TokensKeeper.GetTokenInfosByDenom(ctx, []string{"stake"}) + suite.Require().Equal(len(rateMap), 1) + suite.Require().NotNil(rateMap["stake"]) + + // delete token rate and check + suite.app.TokensKeeper.DeleteTokenInfo(ctx, "stake") + rate = suite.app.TokensKeeper.GetTokenInfo(ctx, "stake") + suite.Require().Nil(rate) + rates = suite.app.TokensKeeper.GetAllTokenInfos(ctx) + suite.Require().Len(rates, 4) + rateMap = suite.app.TokensKeeper.GetTokenInfosByDenom(ctx, []string{"stake"}) + suite.Require().Equal(len(rateMap), 1) + suite.Require().Nil(rateMap["stake"].Data) +} diff --git a/x/tokens/module.go b/x/tokens/module.go index 0359822e6..8120e5885 100644 --- a/x/tokens/module.go +++ b/x/tokens/module.go @@ -95,12 +95,8 @@ func (am AppModule) InitGenesis( var genesisState tokenstypes.GenesisState cdc.MustUnmarshalJSON(data, &genesisState) - for _, alias := range genesisState.Aliases { - am.tokensKeeper.UpsertTokenAlias(ctx, *alias) - } - - for _, rate := range genesisState.Rates { - am.tokensKeeper.UpsertTokenRate(ctx, *rate) + for _, rate := range genesisState.TokenInfos { + am.tokensKeeper.UpsertTokenInfo(ctx, rate) } am.tokensKeeper.SetTokenBlackWhites(ctx, genesisState.TokenBlackWhites) @@ -110,8 +106,7 @@ func (am AppModule) InitGenesis( func (am AppModule) ExportGenesis(ctx sdk.Context, cdc codec.JSONCodec) json.RawMessage { var genesisState tokenstypes.GenesisState - genesisState.Aliases = am.tokensKeeper.ListTokenAlias(ctx) - genesisState.Rates = am.tokensKeeper.GetAllTokenRates(ctx) + genesisState.TokenInfos = am.tokensKeeper.GetAllTokenInfos(ctx) genesisState.TokenBlackWhites = am.tokensKeeper.GetTokenBlackWhites(ctx) return cdc.MustMarshalJSON(&genesisState) } diff --git a/x/tokens/proposal_handler.go b/x/tokens/proposal_handler.go index 820b0004a..525af4168 100644 --- a/x/tokens/proposal_handler.go +++ b/x/tokens/proposal_handler.go @@ -8,44 +8,43 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" ) -type ApplyUpsertTokenAliasProposalHandler struct { +type ApplyUpsertTokenInfosProposalHandler struct { keeper keeper.Keeper } -func NewApplyUpsertTokenAliasProposalHandler(keeper keeper.Keeper) *ApplyUpsertTokenAliasProposalHandler { - return &ApplyUpsertTokenAliasProposalHandler{ - keeper: keeper, - } -} - -func (a ApplyUpsertTokenAliasProposalHandler) ProposalType() string { - return kiratypes.ProposalTypeUpsertTokenAlias -} - -func (a ApplyUpsertTokenAliasProposalHandler) Apply(ctx sdk.Context, proposalID uint64, proposal types.Content, slash sdk.Dec) error { - p := proposal.(*tokenstypes.ProposalUpsertTokenAlias) - - alias := tokenstypes.NewTokenAlias(p.Symbol, p.Name, p.Icon, p.Decimals, p.Denoms, p.Invalidated) - return a.keeper.UpsertTokenAlias(ctx, *alias) +func NewApplyUpsertTokenInfosProposalHandler(keeper keeper.Keeper) *ApplyUpsertTokenInfosProposalHandler { + return &ApplyUpsertTokenInfosProposalHandler{keeper: keeper} } -type ApplyUpsertTokenRatesProposalHandler struct { - keeper keeper.Keeper -} - -func NewApplyUpsertTokenRatesProposalHandler(keeper keeper.Keeper) *ApplyUpsertTokenRatesProposalHandler { - return &ApplyUpsertTokenRatesProposalHandler{keeper: keeper} +func (a ApplyUpsertTokenInfosProposalHandler) ProposalType() string { + return kiratypes.ProposalTypeUpsertTokenInfos } -func (a ApplyUpsertTokenRatesProposalHandler) ProposalType() string { - return kiratypes.ProposalTypeUpsertTokenRates -} - -func (a ApplyUpsertTokenRatesProposalHandler) Apply(ctx sdk.Context, proposalID uint64, proposal types.Content, slash sdk.Dec) error { - p := proposal.(*tokenstypes.ProposalUpsertTokenRates) +func (a ApplyUpsertTokenInfosProposalHandler) Apply(ctx sdk.Context, proposalID uint64, proposal types.Content, slash sdk.Dec) error { + p := proposal.(*tokenstypes.ProposalUpsertTokenInfo) + + tokenInfo := a.keeper.GetTokenInfo(ctx, p.Denom) + if tokenInfo != nil { + tokenInfo.Name = p.Name + tokenInfo.Symbol = p.Symbol + tokenInfo.Icon = p.Icon + tokenInfo.Description = p.Description + tokenInfo.Website = p.Website + tokenInfo.Social = p.Social + tokenInfo.Inactive = p.Inactive + tokenInfo.FeeRate = p.FeeRate + tokenInfo.FeeEnabled = p.FeeEnabled + tokenInfo.StakeCap = p.StakeCap + tokenInfo.StakeMin = p.StakeMin + tokenInfo.StakeEnabled = p.StakeEnabled + return a.keeper.UpsertTokenInfo(ctx, *tokenInfo) + } - rate := tokenstypes.NewTokenRate(p.Denom, p.Rate, p.FeePayments, p.StakeCap, p.StakeMin, p.StakeToken, p.Invalidated) - return a.keeper.UpsertTokenRate(ctx, *rate) + return a.keeper.UpsertTokenInfo(ctx, tokenstypes.NewTokenInfo( + p.Denom, p.TokenType, p.FeeRate, p.FeeEnabled, p.Supply, p.SupplyCap, p.StakeCap, p.StakeMin, p.StakeEnabled, p.Inactive, + p.Symbol, p.Name, p.Icon, p.Decimals, + p.Description, p.Website, p.Social, p.Holders, p.MintingFee, p.Owner, p.OwnerEditDisabled, p.NftMetadata, p.NftHash, + )) } type ApplyWhiteBlackChangeProposalHandler struct { diff --git a/x/tokens/types/alias.pb.go b/x/tokens/types/alias.pb.go deleted file mode 100644 index 61653c40d..000000000 --- a/x/tokens/types/alias.pb.go +++ /dev/null @@ -1,1016 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: kira/tokens/alias.proto - -package types - -import ( - fmt "fmt" - github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" - _ "github.com/cosmos/gogoproto/gogoproto" - proto "github.com/cosmos/gogoproto/proto" - io "io" - math "math" - math_bits "math/bits" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -type TokenAlias struct { - Symbol string `protobuf:"bytes,1,opt,name=symbol,proto3" json:"symbol,omitempty"` - Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` - Icon string `protobuf:"bytes,3,opt,name=icon,proto3" json:"icon,omitempty"` - Decimals uint32 `protobuf:"varint,4,opt,name=decimals,proto3" json:"decimals,omitempty"` - Denoms []string `protobuf:"bytes,5,rep,name=denoms,proto3" json:"denoms,omitempty"` - Invalidated bool `protobuf:"varint,6,opt,name=invalidated,proto3" json:"invalidated,omitempty"` -} - -func (m *TokenAlias) Reset() { *m = TokenAlias{} } -func (m *TokenAlias) String() string { return proto.CompactTextString(m) } -func (*TokenAlias) ProtoMessage() {} -func (*TokenAlias) Descriptor() ([]byte, []int) { - return fileDescriptor_e5f7b26b3e48e5a6, []int{0} -} -func (m *TokenAlias) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *TokenAlias) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_TokenAlias.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *TokenAlias) XXX_Merge(src proto.Message) { - xxx_messageInfo_TokenAlias.Merge(m, src) -} -func (m *TokenAlias) XXX_Size() int { - return m.Size() -} -func (m *TokenAlias) XXX_DiscardUnknown() { - xxx_messageInfo_TokenAlias.DiscardUnknown(m) -} - -var xxx_messageInfo_TokenAlias proto.InternalMessageInfo - -func (m *TokenAlias) GetSymbol() string { - if m != nil { - return m.Symbol - } - return "" -} - -func (m *TokenAlias) GetName() string { - if m != nil { - return m.Name - } - return "" -} - -func (m *TokenAlias) GetIcon() string { - if m != nil { - return m.Icon - } - return "" -} - -func (m *TokenAlias) GetDecimals() uint32 { - if m != nil { - return m.Decimals - } - return 0 -} - -func (m *TokenAlias) GetDenoms() []string { - if m != nil { - return m.Denoms - } - return nil -} - -func (m *TokenAlias) GetInvalidated() bool { - if m != nil { - return m.Invalidated - } - return false -} - -type MsgUpsertTokenAlias struct { - Symbol string `protobuf:"bytes,1,opt,name=symbol,proto3" json:"symbol,omitempty"` - Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` - Icon string `protobuf:"bytes,3,opt,name=icon,proto3" json:"icon,omitempty"` - Decimals uint32 `protobuf:"varint,4,opt,name=decimals,proto3" json:"decimals,omitempty"` - Denoms []string `protobuf:"bytes,5,rep,name=denoms,proto3" json:"denoms,omitempty"` - Invalidated bool `protobuf:"varint,6,opt,name=invalidated,proto3" json:"invalidated,omitempty"` - Proposer github_com_cosmos_cosmos_sdk_types.AccAddress `protobuf:"bytes,7,opt,name=proposer,proto3,casttype=github.com/cosmos/cosmos-sdk/types.AccAddress" json:"proposer,omitempty" yaml:"proposer"` -} - -func (m *MsgUpsertTokenAlias) Reset() { *m = MsgUpsertTokenAlias{} } -func (m *MsgUpsertTokenAlias) String() string { return proto.CompactTextString(m) } -func (*MsgUpsertTokenAlias) ProtoMessage() {} -func (*MsgUpsertTokenAlias) Descriptor() ([]byte, []int) { - return fileDescriptor_e5f7b26b3e48e5a6, []int{1} -} -func (m *MsgUpsertTokenAlias) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MsgUpsertTokenAlias) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgUpsertTokenAlias.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *MsgUpsertTokenAlias) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgUpsertTokenAlias.Merge(m, src) -} -func (m *MsgUpsertTokenAlias) XXX_Size() int { - return m.Size() -} -func (m *MsgUpsertTokenAlias) XXX_DiscardUnknown() { - xxx_messageInfo_MsgUpsertTokenAlias.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgUpsertTokenAlias proto.InternalMessageInfo - -func (m *MsgUpsertTokenAlias) GetSymbol() string { - if m != nil { - return m.Symbol - } - return "" -} - -func (m *MsgUpsertTokenAlias) GetName() string { - if m != nil { - return m.Name - } - return "" -} - -func (m *MsgUpsertTokenAlias) GetIcon() string { - if m != nil { - return m.Icon - } - return "" -} - -func (m *MsgUpsertTokenAlias) GetDecimals() uint32 { - if m != nil { - return m.Decimals - } - return 0 -} - -func (m *MsgUpsertTokenAlias) GetDenoms() []string { - if m != nil { - return m.Denoms - } - return nil -} - -func (m *MsgUpsertTokenAlias) GetInvalidated() bool { - if m != nil { - return m.Invalidated - } - return false -} - -func (m *MsgUpsertTokenAlias) GetProposer() github_com_cosmos_cosmos_sdk_types.AccAddress { - if m != nil { - return m.Proposer - } - return nil -} - -func init() { - proto.RegisterType((*TokenAlias)(nil), "kira.tokens.TokenAlias") - proto.RegisterType((*MsgUpsertTokenAlias)(nil), "kira.tokens.MsgUpsertTokenAlias") -} - -func init() { proto.RegisterFile("kira/tokens/alias.proto", fileDescriptor_e5f7b26b3e48e5a6) } - -var fileDescriptor_e5f7b26b3e48e5a6 = []byte{ - // 330 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x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x25, 0x78, 0x25, 0x85, 0xdb, - 0xf3, 0x49, 0xd8, 0x8f, 0xf7, 0xa3, 0xe0, 0xa5, 0x4d, 0x8f, 0xae, 0x31, 0xbd, 0x2d, 0x51, 0x9a, - 0xea, 0xb7, 0xbf, 0xd6, 0xb9, 0xa7, 0xfd, 0xd2, 0x40, 0x09, 0x28, 0x8d, 0xfb, 0xd7, 0x27, 0xe1, - 0xff, 0xe9, 0xe5, 0xd7, 0x72, 0x74, 0x38, 0xe7, 0x3a, 0x3f, 0x0f, 0xb6, 0x4d, 0xf0, 0xbd, 0x1c, - 0x8d, 0x53, 0x55, 0x3d, 0x3c, 0xce, 0xa2, 0x04, 0x34, 0x4b, 0x00, 0x35, 0xe0, 0xe6, 0x18, 0xa3, - 0xc8, 0x58, 0x35, 0x2f, 0x25, 0x46, 0x93, 0x24, 0x99, 0x08, 0x61, 0x24, 0x62, 0xbc, 0xa3, 0x4e, - 0xa7, 0xef, 0x2b, 0x8f, 0x2c, 0x56, 0x1e, 0xf9, 0x5c, 0x79, 0xe4, 0x75, 0xed, 0xb5, 0x16, 0x6b, - 0xaf, 0xf5, 0xb1, 0xf6, 0x5a, 0x77, 0xe1, 0x1e, 0xf2, 0x4a, 0x19, 0x7e, 0x01, 0x46, 0x32, 0x94, - 0x19, 0x57, 0xec, 0x79, 0xbb, 0x21, 0x35, 0x78, 0xd6, 0xab, 0xff, 0xff, 0xec, 0x27, 0x00, 0x00, - 0xff, 0xff, 0x6f, 0x5b, 0xa6, 0x08, 0x3d, 0x02, 0x00, 0x00, -} - -func (m *TokenAlias) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *TokenAlias) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *TokenAlias) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Invalidated { - i-- - if m.Invalidated { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x30 - } - if len(m.Denoms) > 0 { - for iNdEx := len(m.Denoms) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Denoms[iNdEx]) - copy(dAtA[i:], m.Denoms[iNdEx]) - i = encodeVarintAlias(dAtA, i, uint64(len(m.Denoms[iNdEx]))) - i-- - dAtA[i] = 0x2a - } - } - if m.Decimals != 0 { - i = encodeVarintAlias(dAtA, i, uint64(m.Decimals)) - i-- - dAtA[i] = 0x20 - } - if len(m.Icon) > 0 { - i -= len(m.Icon) - copy(dAtA[i:], m.Icon) - i = encodeVarintAlias(dAtA, i, uint64(len(m.Icon))) - i-- - dAtA[i] = 0x1a - } - if len(m.Name) > 0 { - i -= len(m.Name) - copy(dAtA[i:], m.Name) - i = encodeVarintAlias(dAtA, i, uint64(len(m.Name))) - i-- - dAtA[i] = 0x12 - } - if len(m.Symbol) > 0 { - i -= len(m.Symbol) - copy(dAtA[i:], m.Symbol) - i = encodeVarintAlias(dAtA, i, uint64(len(m.Symbol))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *MsgUpsertTokenAlias) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *MsgUpsertTokenAlias) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MsgUpsertTokenAlias) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Proposer) > 0 { - i -= len(m.Proposer) - copy(dAtA[i:], m.Proposer) - i = encodeVarintAlias(dAtA, i, uint64(len(m.Proposer))) - i-- - dAtA[i] = 0x3a - } - if m.Invalidated { - i-- - if m.Invalidated { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x30 - } - if len(m.Denoms) > 0 { - for iNdEx := len(m.Denoms) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Denoms[iNdEx]) - copy(dAtA[i:], m.Denoms[iNdEx]) - i = encodeVarintAlias(dAtA, i, uint64(len(m.Denoms[iNdEx]))) - i-- - dAtA[i] = 0x2a - } - } - if m.Decimals != 0 { - i = encodeVarintAlias(dAtA, i, uint64(m.Decimals)) - i-- - dAtA[i] = 0x20 - } - if len(m.Icon) > 0 { - i -= len(m.Icon) - copy(dAtA[i:], m.Icon) - i = encodeVarintAlias(dAtA, i, uint64(len(m.Icon))) - i-- - dAtA[i] = 0x1a - } - if len(m.Name) > 0 { - i -= len(m.Name) - copy(dAtA[i:], m.Name) - i = encodeVarintAlias(dAtA, i, uint64(len(m.Name))) - i-- - dAtA[i] = 0x12 - } - if len(m.Symbol) > 0 { - i -= len(m.Symbol) - copy(dAtA[i:], m.Symbol) - i = encodeVarintAlias(dAtA, i, uint64(len(m.Symbol))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func encodeVarintAlias(dAtA []byte, offset int, v uint64) int { - offset -= sovAlias(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *TokenAlias) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Symbol) - if l > 0 { - n += 1 + l + sovAlias(uint64(l)) - } - l = len(m.Name) - if l > 0 { - n += 1 + l + sovAlias(uint64(l)) - } - l = len(m.Icon) - if l > 0 { - n += 1 + l + sovAlias(uint64(l)) - } - if m.Decimals != 0 { - n += 1 + sovAlias(uint64(m.Decimals)) - } - if len(m.Denoms) > 0 { - for _, s := range m.Denoms { - l = len(s) - n += 1 + l + sovAlias(uint64(l)) - } - } - if m.Invalidated { - n += 2 - } - return n -} - -func (m *MsgUpsertTokenAlias) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Symbol) - if l > 0 { - n += 1 + l + sovAlias(uint64(l)) - } - l = len(m.Name) - if l > 0 { - n += 1 + l + sovAlias(uint64(l)) - } - l = len(m.Icon) - if l > 0 { - n += 1 + l + sovAlias(uint64(l)) - } - if m.Decimals != 0 { - n += 1 + sovAlias(uint64(m.Decimals)) - } - if len(m.Denoms) > 0 { - for _, s := range m.Denoms { - l = len(s) - n += 1 + l + sovAlias(uint64(l)) - } - } - if m.Invalidated { - n += 2 - } - l = len(m.Proposer) - if l > 0 { - n += 1 + l + sovAlias(uint64(l)) - } - return n -} - -func sovAlias(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozAlias(x uint64) (n int) { - return sovAlias(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *TokenAlias) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAlias - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: TokenAlias: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: TokenAlias: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Symbol", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAlias - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthAlias - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthAlias - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Symbol = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAlias - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthAlias - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthAlias - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Name = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Icon", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAlias - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthAlias - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthAlias - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Icon = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Decimals", wireType) - } - m.Decimals = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAlias - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Decimals |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Denoms", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAlias - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthAlias - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthAlias - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Denoms = append(m.Denoms, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Invalidated", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAlias - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Invalidated = bool(v != 0) - default: - iNdEx = preIndex - skippy, err := skipAlias(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthAlias - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *MsgUpsertTokenAlias) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAlias - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: MsgUpsertTokenAlias: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgUpsertTokenAlias: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Symbol", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAlias - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthAlias - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthAlias - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Symbol = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAlias - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthAlias - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthAlias - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Name = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Icon", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAlias - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthAlias - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthAlias - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Icon = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Decimals", wireType) - } - m.Decimals = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAlias - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Decimals |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Denoms", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAlias - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthAlias - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthAlias - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Denoms = append(m.Denoms, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Invalidated", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAlias - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Invalidated = bool(v != 0) - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Proposer", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAlias - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthAlias - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthAlias - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Proposer = append(m.Proposer[:0], dAtA[iNdEx:postIndex]...) - if m.Proposer == nil { - m.Proposer = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipAlias(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthAlias - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipAlias(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowAlias - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowAlias - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowAlias - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthAlias - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupAlias - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthAlias - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthAlias = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowAlias = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupAlias = fmt.Errorf("proto: unexpected end of group") -) diff --git a/x/tokens/types/codec.go b/x/tokens/types/codec.go index 76ea5bc14..b0a6c63e3 100644 --- a/x/tokens/types/codec.go +++ b/x/tokens/types/codec.go @@ -11,40 +11,9 @@ import ( // RegisterCodec register codec and metadata func RegisterCodec(cdc *codec.LegacyAmino) { - cdc.RegisterConcrete(&MsgUpsertTokenAlias{}, "kiraHub/MsgUpsertTokenAlias", nil) - functionmeta.AddNewFunction((&MsgUpsertTokenAlias{}).Type(), `{ - "description": "MsgUpsertTokenAlias represents a message to register token alias.", - "parameters": { - "symbol": { - "type": "string", - "description": "Ticker (eg. ATOM, KEX, BTC)." - }, - "name": { - "type": "string", - "description": "Token Name (e.g. Cosmos, Kira, Bitcoin)." - }, - "icon": { - "type": "string", - "description": "Graphical Symbol (url link to graphics)." - }, - "decimals": { - "type": "uint32", - "description": "Integer number of max decimals." - }, - "denoms": { - "type": "array", - "description": "An array of token denoms to be aliased." - }, - "proposer": { - "type": "string", - "description": "proposer who propose this message." - } - } - }`) - - cdc.RegisterConcrete(&MsgUpsertTokenRate{}, "kiraHub/MsgUpsertTokenRate", nil) - functionmeta.AddNewFunction((&MsgUpsertTokenRate{}).Type(), `{ - "description": "MsgUpsertTokenRate represents a message to register token rate.", + cdc.RegisterConcrete(&MsgUpsertTokenInfo{}, "kiraHub/MsgUpsertTokenInfo", nil) + functionmeta.AddNewFunction((&MsgUpsertTokenInfo{}).Type(), `{ + "description": "MsgUpsertTokenInfo represents a message to register token rate.", "parameters": { "denom": { "type": "string", @@ -64,20 +33,42 @@ func RegisterCodec(cdc *codec.LegacyAmino) { } } }`) + + cdc.RegisterConcrete(&MsgEthereumTx{}, "kiraHub/MsgEthereumTx", nil) + functionmeta.AddNewFunction((&MsgEthereumTx{}).Type(), `{ + "description": "MsgUpsertTokenInfo represents a message to register token rate.", + "parameters": { + "tx_type": { + "type": "string", + "description": "ethereum tx type." + }, + "sender": { + "type": "string", + "description": "bech32 encoded address of ethereum tx" + }, + "hash": { + "type": "string", + "description": "ethereum tx hash in hex." + }, + "data": { + "type": "bytes", + "description": "rlp encoding of ethereum tx bytes." + } + } + }`) } // RegisterInterfaces register Msg and structs func RegisterInterfaces(registry types.InterfaceRegistry) { registry.RegisterImplementations((*sdk.Msg)(nil), - &MsgUpsertTokenRate{}, - &MsgUpsertTokenAlias{}, + &MsgUpsertTokenInfo{}, + &MsgEthereumTx{}, ) registry.RegisterInterface( "kira.gov.Content", (*govtypes.Content)(nil), - &ProposalUpsertTokenAlias{}, - &ProposalUpsertTokenRates{}, + &ProposalUpsertTokenInfo{}, &ProposalTokensWhiteBlackChange{}, ) msgservice.RegisterMsgServiceDesc(registry, &_Msg_serviceDesc) diff --git a/x/tokens/types/errors.go b/x/tokens/types/errors.go index 2bb58f87e..97245f97b 100644 --- a/x/tokens/types/errors.go +++ b/x/tokens/types/errors.go @@ -4,7 +4,11 @@ import "github.com/cosmos/cosmos-sdk/types/errors" // tokens module errors var ( - ErrTokenAliasNotFound = errors.Register(ModuleName, 2, "token alias not found") - ErrTokenRateNotFound = errors.Register(ModuleName, 3, "token rate not found") + ErrTokenInfoNotFound = errors.Register(ModuleName, 3, "token rate not found") ErrTotalRewardsCapExceeds100Percent = errors.Register(ModuleName, 4, "total rewards cap exceeds 100%") + ErrUnimplementedTxType = errors.Register(ModuleName, 5, "not implemented tx type") + ErrCannotExceedTokenCap = errors.Register(ModuleName, 6, "cannot exceed token cap") + ErrBondDenomIsReadOnly = errors.Register(ModuleName, 7, "bond denom rate is read-only") + ErrTokenNotRegistered = errors.Register(ModuleName, 8, "token not registered") + ErrSupplyCapShouldNotBeIncreased = errors.Register(ModuleName, 9, "supply cap should not be increased") ) diff --git a/x/tokens/types/events.go b/x/tokens/types/events.go index df7b5dfc5..2b268f536 100644 --- a/x/tokens/types/events.go +++ b/x/tokens/types/events.go @@ -2,13 +2,12 @@ package types // tokens module events const ( - EventTypeUpsertTokenAlias = "upsert_token_alias" - EventTypeUpsertTokenRate = "upsert_token_rate" + EventTypeUpsertTokenInfo = "upsert_token_info" - AttributeKeyDescription = "proposal_id" - AttributeKeyDenom = "proposal_type" - AttributeKeyRate = "proposal_content" - AttributeKeyFeePayments = "voter" + AttributeKeyDescription = "description" + AttributeKeyDenom = "denom" + AttributeKeyFeeRate = "fee_rate" + AttributeKeyFeeEnabled = "fee_enabled" AttributeKeyProposer = "proposer" AttributeKeySymbol = "symbol" AttributeKeyName = "name" diff --git a/x/tokens/types/expected_keepers.go b/x/tokens/types/expected_keepers.go index cee9189ee..a44d361ee 100644 --- a/x/tokens/types/expected_keepers.go +++ b/x/tokens/types/expected_keepers.go @@ -9,3 +9,14 @@ import ( type CustomGovKeeper interface { CheckIfAllowedPermission(ctx sdk.Context, addr sdk.AccAddress, permValue govtypes.PermValue) bool } + +// BankKeeper defines the expected interface needed to retrieve account balances. +type BankKeeper interface { + GetSupply(ctx sdk.Context, denom string) sdk.Coin + MintCoins(ctx sdk.Context, moduleName string, amt sdk.Coins) error + BurnCoins(ctx sdk.Context, moduleName string, amt sdk.Coins) error + SendCoins(ctx sdk.Context, senderAddr sdk.AccAddress, recipientAddr sdk.AccAddress, amt sdk.Coins) error + SendCoinsFromModuleToModule(ctx sdk.Context, senderModule, recipientModule string, amt sdk.Coins) error + SendCoinsFromModuleToAccount(ctx sdk.Context, senderModule string, recipientAddr sdk.AccAddress, amt sdk.Coins) error + SendCoinsFromAccountToModule(ctx sdk.Context, senderAddr sdk.AccAddress, recipientModule string, amt sdk.Coins) error +} diff --git a/x/tokens/types/genesis.go b/x/tokens/types/genesis.go index dc56e1a7e..87cf7bc98 100644 --- a/x/tokens/types/genesis.go +++ b/x/tokens/types/genesis.go @@ -1,24 +1,37 @@ package types import ( + "encoding/json" + + "cosmossdk.io/math" + "github.com/cosmos/cosmos-sdk/codec" sdk "github.com/cosmos/cosmos-sdk/types" ) // DefaultGenesis returns the default CustomGo genesis state func DefaultGenesis() *GenesisState { return &GenesisState{ - Aliases: []*TokenAlias{ - NewTokenAlias("KEX", "Kira", "", 6, []string{"ukex", "mkex"}, false), - }, - Rates: []*TokenRate{ - NewTokenRate("ukex", sdk.NewDec(1), true, sdk.NewDecWithPrec(50, 2), sdk.OneInt(), true, false), // 1 - NewTokenRate("ubtc", sdk.NewDec(10), true, sdk.NewDecWithPrec(25, 2), sdk.OneInt(), true, false), // 10 - NewTokenRate("xeth", sdk.NewDecWithPrec(1, 1), true, sdk.NewDecWithPrec(10, 2), sdk.OneInt(), false, false), // 0.1 - NewTokenRate("frozen", sdk.NewDecWithPrec(1, 1), true, sdk.ZeroDec(), sdk.OneInt(), false, false), // 0.1 + TokenInfos: []TokenInfo{ + NewTokenInfo("ukex", "adr20", sdk.NewDec(1), true, math.ZeroInt(), math.ZeroInt(), sdk.NewDecWithPrec(50, 2), sdk.OneInt(), true, false, "KEX", "KEX", "", 6, "", "", "", 0, math.ZeroInt(), "", false, "", ""), // 1 + NewTokenInfo("ubtc", "adr20", sdk.NewDec(10), true, math.ZeroInt(), math.ZeroInt(), sdk.NewDecWithPrec(25, 2), sdk.OneInt(), true, false, "BTC", "Bitcoin", "", 9, "", "", "", 0, math.ZeroInt(), "", false, "", ""), // 10 + NewTokenInfo("xeth", "adr20", sdk.NewDecWithPrec(1, 1), true, math.ZeroInt(), math.ZeroInt(), sdk.NewDecWithPrec(10, 2), sdk.OneInt(), false, false, "ETH", "Ethereum", "", 18, "", "", "", 0, math.ZeroInt(), "", false, "", ""), // 0.1 + NewTokenInfo("frozen", "adr20", sdk.NewDecWithPrec(1, 1), true, math.ZeroInt(), math.ZeroInt(), sdk.ZeroDec(), sdk.OneInt(), false, false, "FROZEN", "FROZEN", "", 6, "", "", "", 0, math.ZeroInt(), "", false, "", ""), // 0.1 }, - TokenBlackWhites: &TokensWhiteBlack{ + TokenBlackWhites: TokensWhiteBlack{ Whitelisted: []string{"ukex"}, Blacklisted: []string{"frozen"}, }, } } + +// GetGenesisStateFromAppState returns x/auth GenesisState given raw application +// genesis state. +func GetGenesisStateFromAppState(cdc codec.Codec, appState map[string]json.RawMessage) GenesisState { + var genesisState GenesisState + + if appState[ModuleName] != nil { + cdc.MustUnmarshalJSON(appState[ModuleName], &genesisState) + } + + return genesisState +} diff --git a/x/tokens/types/genesis.pb.go b/x/tokens/types/genesis.pb.go index 36a06b646..8145be4e5 100644 --- a/x/tokens/types/genesis.pb.go +++ b/x/tokens/types/genesis.pb.go @@ -5,6 +5,7 @@ package types import ( fmt "fmt" + _ "github.com/cosmos/gogoproto/gogoproto" proto "github.com/cosmos/gogoproto/proto" io "io" math "math" @@ -23,9 +24,8 @@ var _ = math.Inf const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package type GenesisState struct { - Aliases []*TokenAlias `protobuf:"bytes,1,rep,name=aliases,proto3" json:"aliases,omitempty"` - Rates []*TokenRate `protobuf:"bytes,2,rep,name=rates,proto3" json:"rates,omitempty"` - TokenBlackWhites *TokensWhiteBlack `protobuf:"bytes,3,opt,name=tokenBlackWhites,proto3" json:"tokenBlackWhites,omitempty"` + TokenInfos []TokenInfo `protobuf:"bytes,1,rep,name=tokenInfos,proto3" json:"tokenInfos"` + TokenBlackWhites TokensWhiteBlack `protobuf:"bytes,2,opt,name=tokenBlackWhites,proto3" json:"tokenBlackWhites"` } func (m *GenesisState) Reset() { *m = GenesisState{} } @@ -61,25 +61,18 @@ func (m *GenesisState) XXX_DiscardUnknown() { var xxx_messageInfo_GenesisState proto.InternalMessageInfo -func (m *GenesisState) GetAliases() []*TokenAlias { +func (m *GenesisState) GetTokenInfos() []TokenInfo { if m != nil { - return m.Aliases + return m.TokenInfos } return nil } -func (m *GenesisState) GetRates() []*TokenRate { - if m != nil { - return m.Rates - } - return nil -} - -func (m *GenesisState) GetTokenBlackWhites() *TokensWhiteBlack { +func (m *GenesisState) GetTokenBlackWhites() TokensWhiteBlack { if m != nil { return m.TokenBlackWhites } - return nil + return TokensWhiteBlack{} } func init() { @@ -89,23 +82,23 @@ func init() { func init() { proto.RegisterFile("kira/tokens/genesis.proto", fileDescriptor_d3cbd9121e22d5d1) } var fileDescriptor_d3cbd9121e22d5d1 = []byte{ - // 254 bytes of a gzipped FileDescriptorProto + // 242 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0xcc, 0xce, 0x2c, 0x4a, 0xd4, 0x2f, 0xc9, 0xcf, 0x4e, 0xcd, 0x2b, 0xd6, 0x4f, 0x4f, 0xcd, 0x4b, 0x2d, 0xce, 0x2c, 0xd6, - 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x06, 0x49, 0xe9, 0x41, 0xa4, 0xa4, 0xc4, 0x91, 0xd5, - 0x25, 0xe6, 0x64, 0x26, 0x42, 0x55, 0x49, 0x89, 0x21, 0x4b, 0x14, 0x25, 0x96, 0xa4, 0x42, 0xc5, - 0x25, 0x90, 0xc5, 0xd3, 0x8a, 0x52, 0x53, 0xab, 0xa0, 0x32, 0x4a, 0xbb, 0x18, 0xb9, 0x78, 0xdc, - 0x21, 0x36, 0x05, 0x97, 0x24, 0x96, 0xa4, 0x0a, 0x19, 0x72, 0xb1, 0x83, 0x4d, 0x4c, 0x2d, 0x96, - 0x60, 0x54, 0x60, 0xd6, 0xe0, 0x36, 0x12, 0xd7, 0x43, 0xb2, 0x5a, 0x2f, 0x04, 0x44, 0x39, 0x82, - 0x14, 0x04, 0xc1, 0xd4, 0x09, 0xe9, 0x70, 0xb1, 0x82, 0xec, 0x2a, 0x96, 0x60, 0x02, 0x6b, 0x10, - 0xc3, 0xd4, 0x10, 0x94, 0x58, 0x92, 0x1a, 0x04, 0x51, 0x24, 0xe4, 0xc9, 0x25, 0x00, 0x96, 0x72, - 0xca, 0x49, 0x4c, 0xce, 0x0e, 0xcf, 0xc8, 0x04, 0x69, 0x64, 0x56, 0x60, 0xd4, 0xe0, 0x36, 0x92, - 0xc5, 0xd4, 0x58, 0x0c, 0x56, 0x00, 0x56, 0x1a, 0x84, 0xa1, 0xcd, 0xc9, 0xe9, 0xc4, 0x23, 0x39, - 0xc6, 0x0b, 0x8f, 0xe4, 0x18, 0x1f, 0x3c, 0x92, 0x63, 0x9c, 0xf0, 0x58, 0x8e, 0xe1, 0xc2, 0x63, - 0x39, 0x86, 0x1b, 0x8f, 0xe5, 0x18, 0xa2, 0x34, 0xd2, 0x33, 0x4b, 0x32, 0x4a, 0x93, 0xf4, 0x92, - 0xf3, 0x73, 0xf5, 0xbd, 0x33, 0x8b, 0x12, 0x9d, 0xf3, 0x8b, 0x52, 0xf5, 0x8b, 0x53, 0xb3, 0x13, - 0x33, 0xf5, 0x2b, 0x60, 0xe1, 0x50, 0x52, 0x59, 0x90, 0x5a, 0x9c, 0xc4, 0x06, 0x0e, 0x07, 0x63, - 0x40, 0x00, 0x00, 0x00, 0xff, 0xff, 0xad, 0xea, 0x38, 0x58, 0x7c, 0x01, 0x00, 0x00, + 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x06, 0x49, 0xe9, 0x41, 0xa4, 0xa4, 0x44, 0xd2, 0xf3, + 0xd3, 0xf3, 0xc1, 0xe2, 0xfa, 0x20, 0x16, 0x44, 0x89, 0x94, 0x38, 0xb2, 0x6e, 0x30, 0x05, 0x95, + 0x90, 0x40, 0x96, 0x48, 0x2b, 0x4a, 0x4d, 0xad, 0x4a, 0x85, 0xc8, 0x28, 0xcd, 0x65, 0xe4, 0xe2, + 0x71, 0x87, 0xd8, 0x13, 0x5c, 0x92, 0x58, 0x92, 0x2a, 0x64, 0xc3, 0xc5, 0x05, 0x56, 0xe7, 0x99, + 0x97, 0x96, 0x5f, 0x2c, 0xc1, 0xa8, 0xc0, 0xac, 0xc1, 0x6d, 0x24, 0xa6, 0x87, 0x64, 0xb7, 0x5e, + 0x08, 0x4c, 0xda, 0x89, 0xe5, 0xc4, 0x3d, 0x79, 0x86, 0x20, 0x24, 0xf5, 0x42, 0xfe, 0x5c, 0x02, + 0x60, 0x9e, 0x53, 0x4e, 0x62, 0x72, 0x76, 0x78, 0x46, 0x66, 0x49, 0x6a, 0xb1, 0x04, 0x93, 0x02, + 0xa3, 0x06, 0xb7, 0x91, 0x2c, 0xa6, 0x19, 0xc5, 0x60, 0x05, 0x60, 0xa5, 0x50, 0xa3, 0x30, 0x34, + 0x3b, 0x39, 0x9d, 0x78, 0x24, 0xc7, 0x78, 0xe1, 0x91, 0x1c, 0xe3, 0x83, 0x47, 0x72, 0x8c, 0x13, + 0x1e, 0xcb, 0x31, 0x5c, 0x78, 0x2c, 0xc7, 0x70, 0xe3, 0xb1, 0x1c, 0x43, 0x94, 0x46, 0x7a, 0x66, + 0x49, 0x46, 0x69, 0x92, 0x5e, 0x72, 0x7e, 0xae, 0xbe, 0x77, 0x66, 0x51, 0xa2, 0x73, 0x7e, 0x51, + 0xaa, 0x7e, 0x71, 0x6a, 0x76, 0x62, 0xa6, 0x7e, 0x05, 0x3c, 0x0c, 0x2a, 0x0b, 0x52, 0x8b, 0x93, + 0xd8, 0xc0, 0x5e, 0x35, 0x06, 0x04, 0x00, 0x00, 0xff, 0xff, 0x8c, 0x3e, 0x5d, 0x13, 0x5d, 0x01, + 0x00, 0x00, } func (m *GenesisState) Marshal() (dAtA []byte, err error) { @@ -128,36 +121,20 @@ func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - if m.TokenBlackWhites != nil { - { - size, err := m.TokenBlackWhites.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenesis(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - if len(m.Rates) > 0 { - for iNdEx := len(m.Rates) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Rates[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenesis(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 + { + size, err := m.TokenBlackWhites.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) } - if len(m.Aliases) > 0 { - for iNdEx := len(m.Aliases) - 1; iNdEx >= 0; iNdEx-- { + i-- + dAtA[i] = 0x12 + if len(m.TokenInfos) > 0 { + for iNdEx := len(m.TokenInfos) - 1; iNdEx >= 0; iNdEx-- { { - size, err := m.Aliases[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + size, err := m.TokenInfos[iNdEx].MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } @@ -188,22 +165,14 @@ func (m *GenesisState) Size() (n int) { } var l int _ = l - if len(m.Aliases) > 0 { - for _, e := range m.Aliases { - l = e.Size() - n += 1 + l + sovGenesis(uint64(l)) - } - } - if len(m.Rates) > 0 { - for _, e := range m.Rates { + if len(m.TokenInfos) > 0 { + for _, e := range m.TokenInfos { l = e.Size() n += 1 + l + sovGenesis(uint64(l)) } } - if m.TokenBlackWhites != nil { - l = m.TokenBlackWhites.Size() - n += 1 + l + sovGenesis(uint64(l)) - } + l = m.TokenBlackWhites.Size() + n += 1 + l + sovGenesis(uint64(l)) return n } @@ -244,7 +213,7 @@ func (m *GenesisState) Unmarshal(dAtA []byte) error { switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Aliases", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field TokenInfos", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -271,46 +240,12 @@ func (m *GenesisState) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Aliases = append(m.Aliases, &TokenAlias{}) - if err := m.Aliases[len(m.Aliases)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + m.TokenInfos = append(m.TokenInfos, TokenInfo{}) + if err := m.TokenInfos[len(m.TokenInfos)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Rates", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenesis - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenesis - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenesis - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Rates = append(m.Rates, &TokenRate{}) - if err := m.Rates[len(m.Rates)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field TokenBlackWhites", wireType) } @@ -339,9 +274,6 @@ func (m *GenesisState) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.TokenBlackWhites == nil { - m.TokenBlackWhites = &TokensWhiteBlack{} - } if err := m.TokenBlackWhites.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } diff --git a/x/tokens/types/msg_alias.go b/x/tokens/types/msg_alias.go deleted file mode 100644 index 267f615f7..000000000 --- a/x/tokens/types/msg_alias.go +++ /dev/null @@ -1,59 +0,0 @@ -package types - -import ( - "github.com/KiraCore/sekai/types" - sdk "github.com/cosmos/cosmos-sdk/types" -) - -var ( - _ sdk.Msg = &MsgUpsertTokenAlias{} -) - -// NewMsgUpsertTokenAlias returns an instance of MsgUpsertTokenAlias -func NewMsgUpsertTokenAlias( - proposer sdk.AccAddress, - symbol string, - name string, - icon string, - decimals uint32, - denoms []string, - invalidated bool, -) *MsgUpsertTokenAlias { - return &MsgUpsertTokenAlias{ - Proposer: proposer, - Symbol: symbol, - Name: name, - Icon: icon, - Decimals: decimals, - Denoms: denoms, - Invalidated: invalidated, - } -} - -// Route returns route -func (m *MsgUpsertTokenAlias) Route() string { - return ModuleName -} - -// Type returns return message type -func (m *MsgUpsertTokenAlias) Type() string { - return types.MsgTypeUpsertTokenAlias -} - -// ValidateBasic returns basic validation result -func (m *MsgUpsertTokenAlias) ValidateBasic() error { - return nil -} - -// GetSignBytes returns to sign bytes -func (m *MsgUpsertTokenAlias) GetSignBytes() []byte { - bz := ModuleCdc.MustMarshalJSON(m) - return sdk.MustSortJSON(bz) -} - -// GetSigners returns signers -func (m *MsgUpsertTokenAlias) GetSigners() []sdk.AccAddress { - return []sdk.AccAddress{ - m.Proposer, - } -} diff --git a/x/tokens/types/msg_eth_tx.go b/x/tokens/types/msg_eth_tx.go new file mode 100644 index 000000000..a7f2588ca --- /dev/null +++ b/x/tokens/types/msg_eth_tx.go @@ -0,0 +1,119 @@ +package types + +import ( + "errors" + "math/big" + + errorsmod "cosmossdk.io/errors" + sdk "github.com/cosmos/cosmos-sdk/types" + + kiratypes "github.com/KiraCore/sekai/types" + "github.com/ethereum/go-ethereum/common" + ethtypes "github.com/ethereum/go-ethereum/core/types" + "github.com/ethereum/go-ethereum/rlp" +) + +var ( + _ sdk.Msg = &MsgEthereumTx{} + _ sdk.Tx = &MsgEthereumTx{} +) + +func (msg *MsgEthereumTx) FromEthereumTx(tx *ethtypes.Transaction) error { + data, err := rlp.EncodeToBytes(tx) + if err != nil { + return err + } + msg.Data = data + msg.Hash = tx.Hash().Hex() + return nil +} + +func (msg MsgEthereumTx) Route() string { return RouterKey } + +func (msg MsgEthereumTx) Type() string { return kiratypes.MsgTypeEthereumTx } + +func (msg MsgEthereumTx) ValidateBasic() error { + if msg.Sender != "" { + if _, err := sdk.AccAddressFromBech32(msg.Sender); err != nil { + return errorsmod.Wrap(err, "invalid sender address") + } + } + + ethMsg, err := msg.AsMessage() + if err != nil { + return err + } + + if !validateTx(msg.Data, ethMsg.From()) { + return errors.New("validation failed") + } + + return nil +} + +// GetMsgs returns a single MsgEthereumTx as an sdk.Msg. +func (msg *MsgEthereumTx) GetMsgs() []sdk.Msg { + return []sdk.Msg{msg} +} + +func (msg *MsgEthereumTx) GetSigners() []sdk.AccAddress { + signer := sdk.MustAccAddressFromBech32(msg.Sender) + return []sdk.AccAddress{signer} +} + +// GetSignBytes returns the Amino bytes of an Ethereum transaction message used +// for signing. +// +// NOTE: This method cannot be used as a chain ID is needed to create valid bytes +// to sign over. Use 'RLPSignBytes' instead. +func (msg MsgEthereumTx) GetSignBytes() []byte { + panic("must use 'RLPSignBytes' with a chain ID to get the valid bytes to sign") +} + +func (msg *MsgEthereumTx) GetEthSender(chainID *big.Int) (common.Address, error) { + signer := ethtypes.LatestSignerForChainID(chainID) + from, err := signer.Sender(msg.AsTransaction()) + if err != nil { + return common.Address{}, err + } + + return from, nil +} + +func (msg *MsgEthereumTx) AsMessage() (ethtypes.Message, error) { + tx := msg.AsTransaction() + return tx.AsMessage(ethtypes.NewEIP155Signer(tx.ChainId()), big.NewInt(1)) +} + +func (msg MsgEthereumTx) AsTransaction() *ethtypes.Transaction { + tx := new(ethtypes.Transaction) + rlp.DecodeBytes(msg.Data, &tx) + + return tx +} + +func GetSenderAddrFromRawTxBytes(rawTxBytes []byte) (common.Address, error) { + var rawTx ethtypes.Transaction + if err := rlp.DecodeBytes(rawTxBytes, &rawTx); err != nil { + return common.Address{}, err + } + + signer := ethtypes.NewEIP155Signer(rawTx.ChainId()) + sender, err := signer.Sender(&rawTx) + if err != nil { + return common.Address{}, err + } + return sender, nil +} + +func validateTx(rawTxBytes []byte, sender common.Address) bool { + senderFromTx, err := GetSenderAddrFromRawTxBytes(rawTxBytes) + if err != nil { + return false + } + + if senderFromTx.Hex() == sender.Hex() { + return true + } + return false +} diff --git a/x/tokens/types/msg_rate.go b/x/tokens/types/msg_rate.go deleted file mode 100644 index 689ab4c10..000000000 --- a/x/tokens/types/msg_rate.go +++ /dev/null @@ -1,80 +0,0 @@ -package types - -import ( - "errors" - - appparams "github.com/KiraCore/sekai/app/params" - "github.com/KiraCore/sekai/types" - sdk "github.com/cosmos/cosmos-sdk/types" -) - -var ( - _ sdk.Msg = &MsgUpsertTokenRate{} -) - -// NewMsgUpsertTokenRate returns an instance of MsgUpserTokenRate -func NewMsgUpsertTokenRate( - proposer sdk.AccAddress, - denom string, - rate sdk.Dec, - feePayments bool, - stakeCap sdk.Dec, - stakeMin sdk.Int, - stakeToken bool, - invalidated bool, -) *MsgUpsertTokenRate { - return &MsgUpsertTokenRate{ - Proposer: proposer, - Denom: denom, - Rate: rate, - FeePayments: feePayments, - StakeCap: stakeCap, - StakeMin: stakeMin, - StakeToken: stakeToken, - Invalidated: invalidated, - } -} - -// Route returns route -func (m *MsgUpsertTokenRate) Route() string { - return ModuleName -} - -// Type returns return message type -func (m *MsgUpsertTokenRate) Type() string { - return types.MsgTypeUpsertTokenRate -} - -// ValidateBasic returns basic validation result -func (m *MsgUpsertTokenRate) ValidateBasic() error { - if m.Denom == appparams.DefaultDenom { - return errors.New("bond denom rate is read-only") - } - - if m.Rate.LTE(sdk.NewDec(0)) { // not positive - return errors.New("rate should be positive") - } - - if m.StakeCap.LT(sdk.NewDec(0)) { // not positive - return errors.New("reward cap should be positive") - } - - if m.StakeCap.GT(sdk.OneDec()) { // more than 1 - return errors.New("reward cap not be more than 100%") - } - - return nil -} - -// GetSignBytes returns to sign bytes -func (m *MsgUpsertTokenRate) GetSignBytes() []byte { - bz := ModuleCdc.MustMarshalJSON(m) - return sdk.MustSortJSON(bz) -} - -// GetSigners returns signers -func (m *MsgUpsertTokenRate) GetSigners() []sdk.AccAddress { - return []sdk.AccAddress{ - m.Proposer, - } -} diff --git a/x/tokens/types/msg_token_info.go b/x/tokens/types/msg_token_info.go new file mode 100644 index 000000000..ea4ab2dce --- /dev/null +++ b/x/tokens/types/msg_token_info.go @@ -0,0 +1,113 @@ +package types + +import ( + "errors" + + "cosmossdk.io/math" + appparams "github.com/KiraCore/sekai/app/params" + "github.com/KiraCore/sekai/types" + sdk "github.com/cosmos/cosmos-sdk/types" +) + +var ( + _ sdk.Msg = &MsgUpsertTokenInfo{} +) + +// NewMsgUpsertTokenInfo returns an instance of MsgUpserTokenInfo +func NewMsgUpsertTokenInfo( + proposer sdk.AccAddress, + denom string, + tokenType string, + feeRate math.LegacyDec, + feeEnabled bool, + supply math.Int, + supplyCap math.Int, + stakeCap math.LegacyDec, + stakeMin math.Int, + stakeEnabled bool, + inactive bool, + symbol string, + name string, + icon string, + decimals uint32, + description string, + website string, + social string, + holders uint64, + mintingFee math.Int, + owner string, + ownerEditDisabled bool, + nftMetadata string, + nftHash string, +) *MsgUpsertTokenInfo { + return &MsgUpsertTokenInfo{ + Proposer: proposer, + Denom: denom, + TokenType: tokenType, + FeeRate: feeRate, + FeeEnabled: feeEnabled, + Supply: supply, + SupplyCap: supplyCap, + StakeCap: stakeCap, + StakeMin: stakeMin, + StakeEnabled: stakeEnabled, + Inactive: inactive, + Symbol: symbol, + Name: name, + Icon: icon, + Decimals: decimals, + Description: description, + Website: website, + Social: social, + Holders: holders, + MintingFee: mintingFee, + Owner: owner, + OwnerEditDisabled: ownerEditDisabled, + NftMetadata: nftMetadata, + NftHash: nftHash, + } +} + +// Route returns route +func (m *MsgUpsertTokenInfo) Route() string { + return ModuleName +} + +// Type returns return message type +func (m *MsgUpsertTokenInfo) Type() string { + return types.MsgTypeUpsertTokenInfo +} + +// ValidateBasic returns basic validation result +func (m *MsgUpsertTokenInfo) ValidateBasic() error { + if m.Denom == appparams.DefaultDenom { + return errors.New("bond denom rate is read-only") + } + + if !m.FeeRate.IsPositive() { // not positive + return errors.New("rate should be positive") + } + + if m.StakeCap.LT(sdk.NewDec(0)) { // not positive + return errors.New("reward cap should be positive") + } + + if m.StakeCap.GT(sdk.OneDec()) { // more than 1 + return errors.New("reward cap not be more than 100%") + } + + return nil +} + +// GetSignBytes returns to sign bytes +func (m *MsgUpsertTokenInfo) GetSignBytes() []byte { + bz := ModuleCdc.MustMarshalJSON(m) + return sdk.MustSortJSON(bz) +} + +// GetSigners returns signers +func (m *MsgUpsertTokenInfo) GetSigners() []sdk.AccAddress { + return []sdk.AccAddress{ + m.Proposer, + } +} diff --git a/x/tokens/types/proposal.go b/x/tokens/types/proposal.go index 82a7ebef6..5287fff1a 100644 --- a/x/tokens/types/proposal.go +++ b/x/tokens/types/proposal.go @@ -3,86 +3,83 @@ package types import ( "errors" + "cosmossdk.io/math" kiratypes "github.com/KiraCore/sekai/types" "github.com/KiraCore/sekai/x/gov/types" sdk "github.com/cosmos/cosmos-sdk/types" ) var ( - _ types.Content = &ProposalUpsertTokenAlias{} - _ types.Content = &ProposalUpsertTokenRates{} + _ types.Content = &ProposalUpsertTokenInfo{} _ types.Content = &ProposalTokensWhiteBlackChange{} ) -func NewUpsertTokenAliasProposal( +func NewUpsertTokenInfosProposal( + denom string, + tokenType string, + feeRate math.LegacyDec, + feeEnabled bool, + supply math.Int, + supplyCap math.Int, + stakeCap math.LegacyDec, + stakeMin math.Int, + stakeEnabled bool, + inactive bool, symbol string, name string, icon string, decimals uint32, - denoms []string, - isInvalidated bool, -) *ProposalUpsertTokenAlias { - return &ProposalUpsertTokenAlias{ - Symbol: symbol, - Name: name, - Icon: icon, - Decimals: decimals, - Denoms: denoms, - Invalidated: isInvalidated, - } -} - -func (m *ProposalUpsertTokenAlias) ProposalType() string { - return kiratypes.ProposalTypeUpsertTokenAlias -} - -func (m *ProposalUpsertTokenAlias) ProposalPermission() types.PermValue { - return types.PermCreateUpsertTokenAliasProposal -} - -func (m *ProposalUpsertTokenAlias) VotePermission() types.PermValue { - return types.PermVoteUpsertTokenAliasProposal -} - -// ValidateBasic returns basic validation -func (m *ProposalUpsertTokenAlias) ValidateBasic() error { - return nil -} - -func NewUpsertTokenRatesProposal( - denom string, - rate sdk.Dec, - feePayments bool, - stakeCap sdk.Dec, - stakeMin sdk.Int, - stakeToken bool, - isInvalidated bool, -) *ProposalUpsertTokenRates { - return &ProposalUpsertTokenRates{ - Denom: denom, - Rate: rate, - FeePayments: feePayments, - StakeCap: stakeCap, - StakeMin: stakeMin, - StakeToken: stakeToken, - Invalidated: isInvalidated, + description string, + website string, + social string, + holders uint64, + mintingFee math.Int, + owner string, + ownerEditDisabled bool, + nftMetadata string, + nftHash string, +) *ProposalUpsertTokenInfo { + return &ProposalUpsertTokenInfo{ + Denom: denom, + TokenType: tokenType, + FeeRate: feeRate, + FeeEnabled: feeEnabled, + Supply: supply, + SupplyCap: supplyCap, + StakeCap: stakeCap, + StakeMin: stakeMin, + StakeEnabled: stakeEnabled, + Inactive: inactive, + Symbol: symbol, + Name: name, + Icon: icon, + Decimals: decimals, + Description: description, + Website: website, + Social: social, + Holders: holders, + MintingFee: mintingFee, + Owner: owner, + OwnerEditDisabled: ownerEditDisabled, + NftMetadata: nftMetadata, + NftHash: nftHash, } } -func (m *ProposalUpsertTokenRates) ProposalType() string { - return kiratypes.ProposalTypeUpsertTokenRates +func (m *ProposalUpsertTokenInfo) ProposalType() string { + return kiratypes.ProposalTypeUpsertTokenInfos } -func (m *ProposalUpsertTokenRates) ProposalPermission() types.PermValue { - return types.PermCreateUpsertTokenRateProposal +func (m *ProposalUpsertTokenInfo) ProposalPermission() types.PermValue { + return types.PermCreateUpsertTokenInfoProposal } -func (m *ProposalUpsertTokenRates) VotePermission() types.PermValue { - return types.PermVoteUpsertTokenRateProposal +func (m *ProposalUpsertTokenInfo) VotePermission() types.PermValue { + return types.PermVoteUpsertTokenInfoProposal } // ValidateBasic returns basic validation -func (m *ProposalUpsertTokenRates) ValidateBasic() error { +func (m *ProposalUpsertTokenInfo) ValidateBasic() error { if m.StakeCap.LT(sdk.NewDec(0)) { // not positive return errors.New("reward cap should be positive") } diff --git a/x/tokens/types/proposal.pb.go b/x/tokens/types/proposal.pb.go index 03b062989..a733fa296 100644 --- a/x/tokens/types/proposal.pb.go +++ b/x/tokens/types/proposal.pb.go @@ -25,27 +25,44 @@ var _ = math.Inf // proto package needs to be updated. const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package -type ProposalUpsertTokenAlias struct { - Symbol string `protobuf:"bytes,1,opt,name=symbol,proto3" json:"symbol,omitempty"` - Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` - Icon string `protobuf:"bytes,3,opt,name=icon,proto3" json:"icon,omitempty"` - Decimals uint32 `protobuf:"varint,4,opt,name=decimals,proto3" json:"decimals,omitempty"` - Denoms []string `protobuf:"bytes,5,rep,name=denoms,proto3" json:"denoms,omitempty"` - Invalidated bool `protobuf:"varint,6,opt,name=invalidated,proto3" json:"invalidated,omitempty"` +type ProposalUpsertTokenInfo struct { + Denom string `protobuf:"bytes,1,opt,name=denom,proto3" json:"denom,omitempty"` + TokenType string `protobuf:"bytes,2,opt,name=token_type,json=tokenType,proto3" json:"token_type,omitempty"` + FeeRate github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,3,opt,name=fee_rate,json=feeRate,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"fee_rate"` + FeeEnabled bool `protobuf:"varint,4,opt,name=fee_enabled,json=feeEnabled,proto3" json:"fee_enabled,omitempty"` + Supply github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,5,opt,name=supply,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"supply"` + SupplyCap github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,6,opt,name=supply_cap,json=supplyCap,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"supply_cap"` + StakeCap github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,7,opt,name=stake_cap,json=stakeCap,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"stake_cap" yaml:"stake_cap"` + StakeMin github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,8,opt,name=stake_min,json=stakeMin,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"stake_min" yaml:"stake_min"` + StakeEnabled bool `protobuf:"varint,9,opt,name=stake_enabled,json=stakeEnabled,proto3" json:"stake_enabled,omitempty"` + Inactive bool `protobuf:"varint,10,opt,name=inactive,proto3" json:"inactive,omitempty"` + Symbol string `protobuf:"bytes,11,opt,name=symbol,proto3" json:"symbol,omitempty"` + Name string `protobuf:"bytes,12,opt,name=name,proto3" json:"name,omitempty"` + Icon string `protobuf:"bytes,13,opt,name=icon,proto3" json:"icon,omitempty"` + Decimals uint32 `protobuf:"varint,14,opt,name=decimals,proto3" json:"decimals,omitempty"` + Description string `protobuf:"bytes,15,opt,name=description,proto3" json:"description,omitempty"` + Website string `protobuf:"bytes,16,opt,name=website,proto3" json:"website,omitempty"` + Social string `protobuf:"bytes,17,opt,name=social,proto3" json:"social,omitempty"` + Holders uint64 `protobuf:"varint,18,opt,name=holders,proto3" json:"holders,omitempty"` + MintingFee github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,19,opt,name=minting_fee,json=mintingFee,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"minting_fee"` + Owner string `protobuf:"bytes,20,opt,name=owner,proto3" json:"owner,omitempty"` + OwnerEditDisabled bool `protobuf:"varint,21,opt,name=owner_edit_disabled,json=ownerEditDisabled,proto3" json:"owner_edit_disabled,omitempty"` + NftMetadata string `protobuf:"bytes,22,opt,name=nft_metadata,json=nftMetadata,proto3" json:"nft_metadata,omitempty"` + NftHash string `protobuf:"bytes,23,opt,name=nft_hash,json=nftHash,proto3" json:"nft_hash,omitempty"` } -func (m *ProposalUpsertTokenAlias) Reset() { *m = ProposalUpsertTokenAlias{} } -func (m *ProposalUpsertTokenAlias) String() string { return proto.CompactTextString(m) } -func (*ProposalUpsertTokenAlias) ProtoMessage() {} -func (*ProposalUpsertTokenAlias) Descriptor() ([]byte, []int) { +func (m *ProposalUpsertTokenInfo) Reset() { *m = ProposalUpsertTokenInfo{} } +func (m *ProposalUpsertTokenInfo) String() string { return proto.CompactTextString(m) } +func (*ProposalUpsertTokenInfo) ProtoMessage() {} +func (*ProposalUpsertTokenInfo) Descriptor() ([]byte, []int) { return fileDescriptor_68008d794328e180, []int{0} } -func (m *ProposalUpsertTokenAlias) XXX_Unmarshal(b []byte) error { +func (m *ProposalUpsertTokenInfo) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *ProposalUpsertTokenAlias) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *ProposalUpsertTokenInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_ProposalUpsertTokenAlias.Marshal(b, m, deterministic) + return xxx_messageInfo_ProposalUpsertTokenInfo.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -55,179 +72,194 @@ func (m *ProposalUpsertTokenAlias) XXX_Marshal(b []byte, deterministic bool) ([] return b[:n], nil } } -func (m *ProposalUpsertTokenAlias) XXX_Merge(src proto.Message) { - xxx_messageInfo_ProposalUpsertTokenAlias.Merge(m, src) +func (m *ProposalUpsertTokenInfo) XXX_Merge(src proto.Message) { + xxx_messageInfo_ProposalUpsertTokenInfo.Merge(m, src) } -func (m *ProposalUpsertTokenAlias) XXX_Size() int { +func (m *ProposalUpsertTokenInfo) XXX_Size() int { return m.Size() } -func (m *ProposalUpsertTokenAlias) XXX_DiscardUnknown() { - xxx_messageInfo_ProposalUpsertTokenAlias.DiscardUnknown(m) +func (m *ProposalUpsertTokenInfo) XXX_DiscardUnknown() { + xxx_messageInfo_ProposalUpsertTokenInfo.DiscardUnknown(m) } -var xxx_messageInfo_ProposalUpsertTokenAlias proto.InternalMessageInfo +var xxx_messageInfo_ProposalUpsertTokenInfo proto.InternalMessageInfo -func (m *ProposalUpsertTokenAlias) GetSymbol() string { +func (m *ProposalUpsertTokenInfo) GetDenom() string { + if m != nil { + return m.Denom + } + return "" +} + +func (m *ProposalUpsertTokenInfo) GetTokenType() string { + if m != nil { + return m.TokenType + } + return "" +} + +func (m *ProposalUpsertTokenInfo) GetFeeEnabled() bool { + if m != nil { + return m.FeeEnabled + } + return false +} + +func (m *ProposalUpsertTokenInfo) GetStakeEnabled() bool { + if m != nil { + return m.StakeEnabled + } + return false +} + +func (m *ProposalUpsertTokenInfo) GetInactive() bool { + if m != nil { + return m.Inactive + } + return false +} + +func (m *ProposalUpsertTokenInfo) GetSymbol() string { if m != nil { return m.Symbol } return "" } -func (m *ProposalUpsertTokenAlias) GetName() string { +func (m *ProposalUpsertTokenInfo) GetName() string { if m != nil { return m.Name } return "" } -func (m *ProposalUpsertTokenAlias) GetIcon() string { +func (m *ProposalUpsertTokenInfo) GetIcon() string { if m != nil { return m.Icon } return "" } -func (m *ProposalUpsertTokenAlias) GetDecimals() uint32 { +func (m *ProposalUpsertTokenInfo) GetDecimals() uint32 { if m != nil { return m.Decimals } return 0 } -func (m *ProposalUpsertTokenAlias) GetDenoms() []string { +func (m *ProposalUpsertTokenInfo) GetDescription() string { if m != nil { - return m.Denoms + return m.Description } - return nil + return "" } -func (m *ProposalUpsertTokenAlias) GetInvalidated() bool { +func (m *ProposalUpsertTokenInfo) GetWebsite() string { if m != nil { - return m.Invalidated + return m.Website } - return false + return "" } -type ProposalUpsertTokenRates struct { - Denom string `protobuf:"bytes,1,opt,name=denom,proto3" json:"denom,omitempty"` - Rate github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,2,opt,name=rate,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"rate" yaml:"rate"` - FeePayments bool `protobuf:"varint,3,opt,name=fee_payments,json=feePayments,proto3" json:"fee_payments,omitempty"` - StakeCap github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,4,opt,name=stake_cap,json=stakeCap,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"stake_cap" yaml:"stake_cap"` - StakeMin github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,5,opt,name=stake_min,json=stakeMin,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"stake_min" yaml:"stake_min"` - StakeToken bool `protobuf:"varint,6,opt,name=stake_token,json=stakeToken,proto3" json:"stake_token,omitempty"` - Invalidated bool `protobuf:"varint,7,opt,name=invalidated,proto3" json:"invalidated,omitempty"` +func (m *ProposalUpsertTokenInfo) GetSocial() string { + if m != nil { + return m.Social + } + return "" } -func (m *ProposalUpsertTokenRates) Reset() { *m = ProposalUpsertTokenRates{} } -func (m *ProposalUpsertTokenRates) String() string { return proto.CompactTextString(m) } -func (*ProposalUpsertTokenRates) ProtoMessage() {} -func (*ProposalUpsertTokenRates) Descriptor() ([]byte, []int) { - return fileDescriptor_68008d794328e180, []int{1} -} -func (m *ProposalUpsertTokenRates) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ProposalUpsertTokenRates) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ProposalUpsertTokenRates.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil +func (m *ProposalUpsertTokenInfo) GetHolders() uint64 { + if m != nil { + return m.Holders } -} -func (m *ProposalUpsertTokenRates) XXX_Merge(src proto.Message) { - xxx_messageInfo_ProposalUpsertTokenRates.Merge(m, src) -} -func (m *ProposalUpsertTokenRates) XXX_Size() int { - return m.Size() -} -func (m *ProposalUpsertTokenRates) XXX_DiscardUnknown() { - xxx_messageInfo_ProposalUpsertTokenRates.DiscardUnknown(m) + return 0 } -var xxx_messageInfo_ProposalUpsertTokenRates proto.InternalMessageInfo - -func (m *ProposalUpsertTokenRates) GetDenom() string { +func (m *ProposalUpsertTokenInfo) GetOwner() string { if m != nil { - return m.Denom + return m.Owner } return "" } -func (m *ProposalUpsertTokenRates) GetFeePayments() bool { +func (m *ProposalUpsertTokenInfo) GetOwnerEditDisabled() bool { if m != nil { - return m.FeePayments + return m.OwnerEditDisabled } return false } -func (m *ProposalUpsertTokenRates) GetStakeToken() bool { +func (m *ProposalUpsertTokenInfo) GetNftMetadata() string { if m != nil { - return m.StakeToken + return m.NftMetadata } - return false + return "" } -func (m *ProposalUpsertTokenRates) GetInvalidated() bool { +func (m *ProposalUpsertTokenInfo) GetNftHash() string { if m != nil { - return m.Invalidated + return m.NftHash } - return false + return "" } func init() { - proto.RegisterType((*ProposalUpsertTokenAlias)(nil), "kira.tokens.ProposalUpsertTokenAlias") - proto.RegisterType((*ProposalUpsertTokenRates)(nil), "kira.tokens.ProposalUpsertTokenRates") + proto.RegisterType((*ProposalUpsertTokenInfo)(nil), "kira.tokens.ProposalUpsertTokenInfo") } func init() { proto.RegisterFile("kira/tokens/proposal.proto", fileDescriptor_68008d794328e180) } var fileDescriptor_68008d794328e180 = []byte{ - // 460 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x53, 0xbf, 0x8f, 0xd3, 0x30, - 0x14, 0xae, 0xe9, 0x8f, 0x6b, 0x1d, 0x10, 0xc8, 0x3a, 0xa1, 0xd0, 0x21, 0x09, 0x19, 0x50, 0x97, - 0x6b, 0x06, 0xb6, 0x93, 0x18, 0x48, 0x59, 0x10, 0x42, 0x3a, 0x22, 0x58, 0x58, 0x2a, 0x37, 0x79, - 0x57, 0xac, 0xc4, 0x76, 0x14, 0x1b, 0x44, 0xfe, 0x0b, 0xfe, 0x04, 0xfe, 0x08, 0x46, 0x16, 0xb6, - 0x13, 0xd3, 0x8d, 0x88, 0xa1, 0x42, 0xed, 0xc2, 0xcc, 0x5f, 0x80, 0x62, 0xfb, 0x8e, 0xd3, 0x09, - 0xe9, 0xd4, 0x29, 0xef, 0xfb, 0x5e, 0xf4, 0x7d, 0x7e, 0xdf, 0xb3, 0xf1, 0xb4, 0x64, 0x0d, 0x4d, - 0xb4, 0x2c, 0x41, 0xa8, 0xa4, 0x6e, 0x64, 0x2d, 0x15, 0xad, 0xe6, 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- 0x52, 0x72, 0x9f, 0x23, 0x55, 0x94, 0x89, 0x6e, 0x6b, 0x50, 0xf3, 0x67, 0x90, 0xff, 0xd9, 0x84, - 0x5e, 0x4b, 0x79, 0x75, 0x1c, 0x77, 0x1a, 0x71, 0x66, 0xa4, 0xc8, 0x43, 0x7c, 0xfb, 0x14, 0x60, - 0x59, 0xd3, 0x96, 0x83, 0xd0, 0xca, 0x04, 0x31, 0xce, 0xbc, 0x53, 0x80, 0x13, 0x47, 0x91, 0x25, - 0x9e, 0x28, 0x4d, 0x4b, 0x58, 0xe6, 0xb4, 0x36, 0x81, 0x4c, 0xd2, 0x74, 0x6f, 0xeb, 0x7b, 0xd6, - 0xfa, 0x52, 0x28, 0xce, 0xc6, 0xa6, 0x5e, 0xd0, 0xfa, 0x9f, 0x01, 0x67, 0xc2, 0x1f, 0xee, 0x6d, - 0xf0, 0x5c, 0xe8, 0xeb, 0x06, 0x9c, 0x89, 0x0b, 0x83, 0x97, 0x4c, 0x90, 0x10, 0x7b, 0x96, 0x37, - 0xf7, 0xcd, 0x6d, 0x07, 0x1b, 0xca, 0x64, 0x7e, 0x7d, 0x7d, 0x07, 0x37, 0xaf, 0x2f, 0x4d, 0xcf, - 0xb6, 0x01, 0x3a, 0xdf, 0x06, 0xe8, 0xd7, 0x36, 0x40, 0x9f, 0x76, 0x41, 0xef, 0x7c, 0x17, 0xf4, - 0x7e, 0xec, 0x82, 0xde, 0xdb, 0xd9, 0x95, 0x33, 0xbf, 0x60, 0x0d, 0x5d, 0xc8, 0x06, 0x12, 0x05, - 0x25, 0x65, 0xc9, 0xc7, 0x8b, 0xd7, 0x60, 0x4e, 0xbe, 0x1a, 0x99, 0xdb, 0xfc, 0xf8, 0x6f, 0x00, - 0x00, 0x00, 0xff, 0xff, 0x2e, 0xe0, 0x26, 0xef, 0x29, 0x03, 0x00, 0x00, + // 620 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x54, 0xcb, 0x6e, 0x13, 0x31, + 0x14, 0xcd, 0x40, 0x9b, 0x4c, 0x6e, 0x5a, 0xda, 0xba, 0xa5, 0x75, 0x23, 0x91, 0x84, 0x22, 0xa1, + 0x6c, 0x9a, 0x2c, 0xd8, 0x75, 0x99, 0x3e, 0x44, 0x84, 0x2a, 0xd0, 0xa8, 0x6c, 0xd8, 0x8c, 0x9c, + 0x99, 0x3b, 0x89, 0x95, 0x19, 0x7b, 0x34, 0x76, 0x29, 0xd9, 0xf3, 0x01, 0x7c, 0x02, 0x1f, 0xc1, + 0x47, 0x54, 0xac, 0xba, 0x44, 0x2c, 0x2a, 0xd4, 0x6e, 0x58, 0xf3, 0x05, 0xc8, 0xf6, 0xa4, 0x2a, + 0xec, 0xd2, 0xd5, 0xdc, 0x73, 0xce, 0xf8, 0xdc, 0xeb, 0x23, 0xdb, 0xd0, 0x9c, 0xf2, 0x82, 0xf5, + 0xb5, 0x9c, 0xa2, 0x50, 0xfd, 0xbc, 0x90, 0xb9, 0x54, 0x2c, 0xed, 0xe5, 0x85, 0xd4, 0x92, 0x34, + 0x8c, 0xd6, 0x73, 0x5a, 0x73, 0x6b, 0x2c, 0xc7, 0xd2, 0xf2, 0x7d, 0x53, 0xb9, 0x5f, 0x9a, 0xbb, + 0x91, 0x54, 0x99, 0x54, 0xa1, 0x13, 0x1c, 0x70, 0xd2, 0xde, 0x67, 0x1f, 0x76, 0xde, 0x95, 0x86, + 0xef, 0x73, 0x85, 0x85, 0x3e, 0x33, 0x4e, 0x43, 0x91, 0x48, 0xb2, 0x05, 0xcb, 0x31, 0x0a, 0x99, + 0x51, 0xaf, 0xe3, 0x75, 0xeb, 0x81, 0x03, 0xe4, 0x19, 0x80, 0x6d, 0x16, 0xea, 0x59, 0x8e, 0xf4, + 0x91, 0x95, 0xea, 0x96, 0x39, 0x9b, 0xe5, 0x48, 0x86, 0xe0, 0x27, 0x88, 0x61, 0xc1, 0x34, 0xd2, + 0x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+ 0x77, 0x75, 0xd3, 0xf2, 0x7e, 0xdd, 0xb4, 0xbc, 0x2f, 0xb7, 0xad, 0xca, 0xd5, 0x6d, 0xab, 0xf2, + 0xe3, 0xb6, 0x55, 0xf9, 0xd0, 0xbd, 0xb7, 0xc5, 0x37, 0xbc, 0x60, 0x87, 0xb2, 0xc0, 0xbe, 0xc2, + 0x29, 0xe3, 0xfd, 0x4f, 0xf3, 0x17, 0xc9, 0x6e, 0x74, 0x54, 0xb5, 0x2f, 0xca, 0xab, 0xbf, 0x01, + 0x00, 0x00, 0xff, 0xff, 0xde, 0x6c, 0xdd, 0xd4, 0xad, 0x04, 0x00, 0x00, } -func (this *ProposalUpsertTokenAlias) Equal(that interface{}) bool { +func (this *ProposalUpsertTokenInfo) Equal(that interface{}) bool { if that == nil { return this == nil } - that1, ok := that.(*ProposalUpsertTokenAlias) + that1, ok := that.(*ProposalUpsertTokenInfo) if !ok { - that2, ok := that.(ProposalUpsertTokenAlias) + that2, ok := that.(ProposalUpsertTokenInfo) if ok { that1 = &that2 } else { @@ -239,74 +271,78 @@ func (this *ProposalUpsertTokenAlias) Equal(that interface{}) bool { } else if this == nil { return false } - if this.Symbol != that1.Symbol { + if this.Denom != that1.Denom { return false } - if this.Name != that1.Name { + if this.TokenType != that1.TokenType { return false } - if this.Icon != that1.Icon { + if !this.FeeRate.Equal(that1.FeeRate) { return false } - if this.Decimals != that1.Decimals { + if this.FeeEnabled != that1.FeeEnabled { return false } - if len(this.Denoms) != len(that1.Denoms) { + if !this.Supply.Equal(that1.Supply) { return false } - for i := range this.Denoms { - if this.Denoms[i] != that1.Denoms[i] { - return false - } + if !this.SupplyCap.Equal(that1.SupplyCap) { + return false } - if this.Invalidated != that1.Invalidated { + if !this.StakeCap.Equal(that1.StakeCap) { return false } - return true -} -func (this *ProposalUpsertTokenRates) Equal(that interface{}) bool { - if that == nil { - return this == nil + if !this.StakeMin.Equal(that1.StakeMin) { + return false } - - that1, ok := that.(*ProposalUpsertTokenRates) - if !ok { - that2, ok := that.(ProposalUpsertTokenRates) - if ok { - that1 = &that2 - } else { - return false - } + if this.StakeEnabled != that1.StakeEnabled { + return false } - if that1 == nil { - return this == nil - } else if this == nil { + if this.Inactive != that1.Inactive { return false } - if this.Denom != that1.Denom { + if this.Symbol != that1.Symbol { return false } - if !this.Rate.Equal(that1.Rate) { + if this.Name != that1.Name { return false } - if this.FeePayments != that1.FeePayments { + if this.Icon != that1.Icon { return false } - if !this.StakeCap.Equal(that1.StakeCap) { + if this.Decimals != that1.Decimals { return false } - if !this.StakeMin.Equal(that1.StakeMin) { + if this.Description != that1.Description { + return false + } + if this.Website != that1.Website { + return false + } + if this.Social != that1.Social { + return false + } + if this.Holders != that1.Holders { + return false + } + if !this.MintingFee.Equal(that1.MintingFee) { + return false + } + if this.Owner != that1.Owner { + return false + } + if this.OwnerEditDisabled != that1.OwnerEditDisabled { return false } - if this.StakeToken != that1.StakeToken { + if this.NftMetadata != that1.NftMetadata { return false } - if this.Invalidated != that1.Invalidated { + if this.NftHash != that1.NftHash { return false } return true } -func (m *ProposalUpsertTokenAlias) Marshal() (dAtA []byte, err error) { +func (m *ProposalUpsertTokenInfo) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -316,103 +352,144 @@ func (m *ProposalUpsertTokenAlias) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *ProposalUpsertTokenAlias) MarshalTo(dAtA []byte) (int, error) { +func (m *ProposalUpsertTokenInfo) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *ProposalUpsertTokenAlias) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *ProposalUpsertTokenInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if m.Invalidated { + if len(m.NftHash) > 0 { + i -= len(m.NftHash) + copy(dAtA[i:], m.NftHash) + i = encodeVarintProposal(dAtA, i, uint64(len(m.NftHash))) + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0xba + } + if len(m.NftMetadata) > 0 { + i -= len(m.NftMetadata) + copy(dAtA[i:], m.NftMetadata) + i = encodeVarintProposal(dAtA, i, uint64(len(m.NftMetadata))) i-- - if m.Invalidated { + dAtA[i] = 0x1 + i-- + dAtA[i] = 0xb2 + } + if m.OwnerEditDisabled { + i-- + if m.OwnerEditDisabled { dAtA[i] = 1 } else { dAtA[i] = 0 } i-- - dAtA[i] = 0x30 - } - if len(m.Denoms) > 0 { - for iNdEx := len(m.Denoms) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Denoms[iNdEx]) - copy(dAtA[i:], m.Denoms[iNdEx]) - i = encodeVarintProposal(dAtA, i, uint64(len(m.Denoms[iNdEx]))) - i-- - dAtA[i] = 0x2a + dAtA[i] = 0x1 + i-- + dAtA[i] = 0xa8 + } + if len(m.Owner) > 0 { + i -= len(m.Owner) + copy(dAtA[i:], m.Owner) + i = encodeVarintProposal(dAtA, i, uint64(len(m.Owner))) + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0xa2 + } + { + size := m.MintingFee.Size() + i -= size + if _, err := m.MintingFee.MarshalTo(dAtA[i:]); err != nil { + return 0, err } + i = encodeVarintProposal(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0x9a + if m.Holders != 0 { + i = encodeVarintProposal(dAtA, i, uint64(m.Holders)) + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0x90 + } + if len(m.Social) > 0 { + i -= len(m.Social) + copy(dAtA[i:], m.Social) + i = encodeVarintProposal(dAtA, i, uint64(len(m.Social))) + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0x8a + } + if len(m.Website) > 0 { + i -= len(m.Website) + copy(dAtA[i:], m.Website) + i = encodeVarintProposal(dAtA, i, uint64(len(m.Website))) + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0x82 + } + if len(m.Description) > 0 { + i -= len(m.Description) + copy(dAtA[i:], m.Description) + i = encodeVarintProposal(dAtA, i, uint64(len(m.Description))) + i-- + dAtA[i] = 0x7a } if m.Decimals != 0 { i = encodeVarintProposal(dAtA, i, uint64(m.Decimals)) i-- - dAtA[i] = 0x20 + dAtA[i] = 0x70 } if len(m.Icon) > 0 { i -= len(m.Icon) copy(dAtA[i:], m.Icon) i = encodeVarintProposal(dAtA, i, uint64(len(m.Icon))) i-- - dAtA[i] = 0x1a + dAtA[i] = 0x6a } if len(m.Name) > 0 { i -= len(m.Name) copy(dAtA[i:], m.Name) i = encodeVarintProposal(dAtA, i, uint64(len(m.Name))) i-- - dAtA[i] = 0x12 + dAtA[i] = 0x62 } if len(m.Symbol) > 0 { i -= len(m.Symbol) copy(dAtA[i:], m.Symbol) i = encodeVarintProposal(dAtA, i, uint64(len(m.Symbol))) i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *ProposalUpsertTokenRates) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err + dAtA[i] = 0x5a } - return dAtA[:n], nil -} - -func (m *ProposalUpsertTokenRates) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ProposalUpsertTokenRates) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Invalidated { + if m.Inactive { i-- - if m.Invalidated { + if m.Inactive { dAtA[i] = 1 } else { dAtA[i] = 0 } i-- - dAtA[i] = 0x38 + dAtA[i] = 0x50 } - if m.StakeToken { + if m.StakeEnabled { i-- - if m.StakeToken { + if m.StakeEnabled { dAtA[i] = 1 } else { dAtA[i] = 0 } i-- - dAtA[i] = 0x30 + dAtA[i] = 0x48 } { size := m.StakeMin.Size() @@ -423,7 +500,7 @@ func (m *ProposalUpsertTokenRates) MarshalToSizedBuffer(dAtA []byte) (int, error i = encodeVarintProposal(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0x2a + dAtA[i] = 0x42 { size := m.StakeCap.Size() i -= size @@ -433,27 +510,54 @@ func (m *ProposalUpsertTokenRates) MarshalToSizedBuffer(dAtA []byte) (int, error i = encodeVarintProposal(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0x22 - if m.FeePayments { + dAtA[i] = 0x3a + { + size := m.SupplyCap.Size() + i -= size + if _, err := m.SupplyCap.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintProposal(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x32 + { + size := m.Supply.Size() + i -= size + if _, err := m.Supply.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintProposal(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x2a + if m.FeeEnabled { i-- - if m.FeePayments { + if m.FeeEnabled { dAtA[i] = 1 } else { dAtA[i] = 0 } i-- - dAtA[i] = 0x18 + dAtA[i] = 0x20 } { - size := m.Rate.Size() + size := m.FeeRate.Size() i -= size - if _, err := m.Rate.MarshalTo(dAtA[i:]); err != nil { + if _, err := m.FeeRate.MarshalTo(dAtA[i:]); err != nil { return 0, err } i = encodeVarintProposal(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0x12 + dAtA[i] = 0x1a + if len(m.TokenType) > 0 { + i -= len(m.TokenType) + copy(dAtA[i:], m.TokenType) + i = encodeVarintProposal(dAtA, i, uint64(len(m.TokenType))) + i-- + dAtA[i] = 0x12 + } if len(m.Denom) > 0 { i -= len(m.Denom) copy(dAtA[i:], m.Denom) @@ -475,12 +579,39 @@ func encodeVarintProposal(dAtA []byte, offset int, v uint64) int { dAtA[offset] = uint8(v) return base } -func (m *ProposalUpsertTokenAlias) Size() (n int) { +func (m *ProposalUpsertTokenInfo) Size() (n int) { if m == nil { return 0 } var l int _ = l + l = len(m.Denom) + if l > 0 { + n += 1 + l + sovProposal(uint64(l)) + } + l = len(m.TokenType) + if l > 0 { + n += 1 + l + sovProposal(uint64(l)) + } + l = m.FeeRate.Size() + n += 1 + l + sovProposal(uint64(l)) + if m.FeeEnabled { + n += 2 + } + l = m.Supply.Size() + n += 1 + l + sovProposal(uint64(l)) + l = m.SupplyCap.Size() + n += 1 + l + sovProposal(uint64(l)) + l = m.StakeCap.Size() + n += 1 + l + sovProposal(uint64(l)) + l = m.StakeMin.Size() + n += 1 + l + sovProposal(uint64(l)) + if m.StakeEnabled { + n += 2 + } + if m.Inactive { + n += 2 + } l = len(m.Symbol) if l > 0 { n += 1 + l + sovProposal(uint64(l)) @@ -496,42 +627,37 @@ func (m *ProposalUpsertTokenAlias) Size() (n int) { if m.Decimals != 0 { n += 1 + sovProposal(uint64(m.Decimals)) } - if len(m.Denoms) > 0 { - for _, s := range m.Denoms { - l = len(s) - n += 1 + l + sovProposal(uint64(l)) - } + l = len(m.Description) + if l > 0 { + n += 1 + l + sovProposal(uint64(l)) } - if m.Invalidated { - n += 2 + l = len(m.Website) + if l > 0 { + n += 2 + l + sovProposal(uint64(l)) } - return n -} - -func (m *ProposalUpsertTokenRates) Size() (n int) { - if m == nil { - return 0 + l = len(m.Social) + if l > 0 { + n += 2 + l + sovProposal(uint64(l)) } - var l int - _ = l - l = len(m.Denom) + if m.Holders != 0 { + n += 2 + sovProposal(uint64(m.Holders)) + } + l = m.MintingFee.Size() + n += 2 + l + sovProposal(uint64(l)) + l = len(m.Owner) if l > 0 { - n += 1 + l + sovProposal(uint64(l)) + n += 2 + l + sovProposal(uint64(l)) } - l = m.Rate.Size() - n += 1 + l + sovProposal(uint64(l)) - if m.FeePayments { - n += 2 + if m.OwnerEditDisabled { + n += 3 } - l = m.StakeCap.Size() - n += 1 + l + sovProposal(uint64(l)) - l = m.StakeMin.Size() - n += 1 + l + sovProposal(uint64(l)) - if m.StakeToken { - n += 2 + l = len(m.NftMetadata) + if l > 0 { + n += 2 + l + sovProposal(uint64(l)) } - if m.Invalidated { - n += 2 + l = len(m.NftHash) + if l > 0 { + n += 2 + l + sovProposal(uint64(l)) } return n } @@ -542,7 +668,7 @@ func sovProposal(x uint64) (n int) { func sozProposal(x uint64) (n int) { return sovProposal(uint64((x << 1) ^ uint64((int64(x) >> 63)))) } -func (m *ProposalUpsertTokenAlias) Unmarshal(dAtA []byte) error { +func (m *ProposalUpsertTokenInfo) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -565,15 +691,15 @@ func (m *ProposalUpsertTokenAlias) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: ProposalUpsertTokenAlias: wiretype end group for non-group") + return fmt.Errorf("proto: ProposalUpsertTokenInfo: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: ProposalUpsertTokenAlias: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: ProposalUpsertTokenInfo: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Symbol", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Denom", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -601,11 +727,11 @@ func (m *ProposalUpsertTokenAlias) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Symbol = string(dAtA[iNdEx:postIndex]) + m.Denom = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field TokenType", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -633,11 +759,11 @@ func (m *ProposalUpsertTokenAlias) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Name = string(dAtA[iNdEx:postIndex]) + m.TokenType = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Icon", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field FeeRate", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -665,13 +791,15 @@ func (m *ProposalUpsertTokenAlias) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Icon = string(dAtA[iNdEx:postIndex]) + if err := m.FeeRate.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } iNdEx = postIndex case 4: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Decimals", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field FeeEnabled", wireType) } - m.Decimals = 0 + var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowProposal @@ -681,14 +809,15 @@ func (m *ProposalUpsertTokenAlias) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Decimals |= uint32(b&0x7F) << shift + v |= int(b&0x7F) << shift if b < 0x80 { break } } + m.FeeEnabled = bool(v != 0) case 5: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Denoms", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Supply", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -716,13 +845,15 @@ func (m *ProposalUpsertTokenAlias) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Denoms = append(m.Denoms, string(dAtA[iNdEx:postIndex])) + if err := m.Supply.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } iNdEx = postIndex case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Invalidated", wireType) + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SupplyCap", wireType) } - var v int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowProposal @@ -732,65 +863,29 @@ func (m *ProposalUpsertTokenAlias) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - m.Invalidated = bool(v != 0) - default: - iNdEx = preIndex - skippy, err := skipProposal(dAtA[iNdEx:]) - if err != nil { - return err + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthProposal } - if (skippy < 0) || (iNdEx+skippy) < 0 { + postIndex := iNdEx + intStringLen + if postIndex < 0 { return ErrInvalidLengthProposal } - if (iNdEx + skippy) > l { + if postIndex > l { return io.ErrUnexpectedEOF } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ProposalUpsertTokenRates) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProposal - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break + if err := m.SupplyCap.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ProposalUpsertTokenRates: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ProposalUpsertTokenRates: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: + iNdEx = postIndex + case 7: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Denom", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field StakeCap", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -818,11 +913,13 @@ func (m *ProposalUpsertTokenRates) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Denom = string(dAtA[iNdEx:postIndex]) + if err := m.StakeCap.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } iNdEx = postIndex - case 2: + case 8: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Rate", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field StakeMin", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -850,13 +947,13 @@ func (m *ProposalUpsertTokenRates) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.Rate.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.StakeMin.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex - case 3: + case 9: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FeePayments", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field StakeEnabled", wireType) } var v int for shift := uint(0); ; shift += 7 { @@ -873,10 +970,30 @@ func (m *ProposalUpsertTokenRates) Unmarshal(dAtA []byte) error { break } } - m.FeePayments = bool(v != 0) - case 4: + m.StakeEnabled = bool(v != 0) + case 10: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Inactive", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.Inactive = bool(v != 0) + case 11: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StakeCap", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Symbol", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -904,13 +1021,43 @@ func (m *ProposalUpsertTokenRates) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.StakeCap.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err + m.Symbol = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 12: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthProposal + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthProposal + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Name = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 5: + case 13: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StakeMin", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Icon", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -938,15 +1085,128 @@ func (m *ProposalUpsertTokenRates) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.StakeMin.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err + m.Icon = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 14: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Decimals", wireType) + } + m.Decimals = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Decimals |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 15: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Description", wireType) } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthProposal + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthProposal + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Description = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 6: + case 16: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Website", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthProposal + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthProposal + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Website = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 17: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Social", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthProposal + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthProposal + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Social = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 18: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field StakeToken", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Holders", wireType) } - var v int + m.Holders = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowProposal @@ -956,15 +1216,80 @@ func (m *ProposalUpsertTokenRates) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= int(b&0x7F) << shift + m.Holders |= uint64(b&0x7F) << shift if b < 0x80 { break } } - m.StakeToken = bool(v != 0) - case 7: + case 19: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MintingFee", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthProposal + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthProposal + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.MintingFee.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 20: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Owner", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthProposal + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthProposal + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Owner = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 21: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Invalidated", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field OwnerEditDisabled", wireType) } var v int for shift := uint(0); ; shift += 7 { @@ -981,7 +1306,71 @@ func (m *ProposalUpsertTokenRates) Unmarshal(dAtA []byte) error { break } } - m.Invalidated = bool(v != 0) + m.OwnerEditDisabled = bool(v != 0) + case 22: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NftMetadata", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthProposal + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthProposal + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.NftMetadata = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 23: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NftHash", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposal + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthProposal + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthProposal + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.NftHash = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipProposal(dAtA[iNdEx:]) diff --git a/x/tokens/types/query.pb.go b/x/tokens/types/query.pb.go index e878417d7..54c3253d5 100644 --- a/x/tokens/types/query.pb.go +++ b/x/tokens/types/query.pb.go @@ -6,6 +6,7 @@ package types import ( context "context" fmt "fmt" + types "github.com/cosmos/cosmos-sdk/types" _ "github.com/cosmos/gogoproto/gogoproto" grpc1 "github.com/cosmos/gogoproto/grpc" proto "github.com/cosmos/gogoproto/proto" @@ -29,22 +30,22 @@ var _ = math.Inf // proto package needs to be updated. const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package -type TokenAliasRequest struct { - Symbol string `protobuf:"bytes,1,opt,name=symbol,proto3" json:"symbol,omitempty"` +type TokenInfoRequest struct { + Denom string `protobuf:"bytes,1,opt,name=denom,proto3" json:"denom,omitempty"` } -func (m *TokenAliasRequest) Reset() { *m = TokenAliasRequest{} } -func (m *TokenAliasRequest) String() string { return proto.CompactTextString(m) } -func (*TokenAliasRequest) ProtoMessage() {} -func (*TokenAliasRequest) Descriptor() ([]byte, []int) { +func (m *TokenInfoRequest) Reset() { *m = TokenInfoRequest{} } +func (m *TokenInfoRequest) String() string { return proto.CompactTextString(m) } +func (*TokenInfoRequest) ProtoMessage() {} +func (*TokenInfoRequest) Descriptor() ([]byte, []int) { return fileDescriptor_c8db6e46fba94960, []int{0} } -func (m *TokenAliasRequest) XXX_Unmarshal(b []byte) error { +func (m *TokenInfoRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *TokenAliasRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *TokenInfoRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_TokenAliasRequest.Marshal(b, m, deterministic) + return xxx_messageInfo_TokenInfoRequest.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -54,225 +55,42 @@ func (m *TokenAliasRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, e return b[:n], nil } } -func (m *TokenAliasRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_TokenAliasRequest.Merge(m, src) +func (m *TokenInfoRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_TokenInfoRequest.Merge(m, src) } -func (m *TokenAliasRequest) XXX_Size() int { +func (m *TokenInfoRequest) XXX_Size() int { return m.Size() } -func (m *TokenAliasRequest) XXX_DiscardUnknown() { - xxx_messageInfo_TokenAliasRequest.DiscardUnknown(m) +func (m *TokenInfoRequest) XXX_DiscardUnknown() { + xxx_messageInfo_TokenInfoRequest.DiscardUnknown(m) } -var xxx_messageInfo_TokenAliasRequest proto.InternalMessageInfo +var xxx_messageInfo_TokenInfoRequest proto.InternalMessageInfo -func (m *TokenAliasRequest) GetSymbol() string { +func (m *TokenInfoRequest) GetDenom() string { if m != nil { - return m.Symbol + return m.Denom } return "" } -type TokenAliasResponse struct { - Data *TokenAlias `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"` +type TokenInfoResponse struct { + Data *TokenInfo `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"` + Supply types.Coin `protobuf:"bytes,2,opt,name=supply,proto3" json:"supply"` } -func (m *TokenAliasResponse) Reset() { *m = TokenAliasResponse{} } -func (m *TokenAliasResponse) String() string { return proto.CompactTextString(m) } -func (*TokenAliasResponse) ProtoMessage() {} -func (*TokenAliasResponse) Descriptor() ([]byte, []int) { +func (m *TokenInfoResponse) Reset() { *m = TokenInfoResponse{} } +func (m *TokenInfoResponse) String() string { return proto.CompactTextString(m) } +func (*TokenInfoResponse) ProtoMessage() {} +func (*TokenInfoResponse) Descriptor() ([]byte, []int) { return fileDescriptor_c8db6e46fba94960, []int{1} } -func (m *TokenAliasResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *TokenAliasResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_TokenAliasResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *TokenAliasResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_TokenAliasResponse.Merge(m, src) -} -func (m *TokenAliasResponse) XXX_Size() int { - return m.Size() -} -func (m *TokenAliasResponse) XXX_DiscardUnknown() { - xxx_messageInfo_TokenAliasResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_TokenAliasResponse proto.InternalMessageInfo - -func (m *TokenAliasResponse) GetData() *TokenAlias { - if m != nil { - return m.Data - } - return nil -} - -type AllTokenAliasesRequest struct { -} - -func (m *AllTokenAliasesRequest) Reset() { *m = AllTokenAliasesRequest{} } -func (m *AllTokenAliasesRequest) String() string { return proto.CompactTextString(m) } -func (*AllTokenAliasesRequest) ProtoMessage() {} -func (*AllTokenAliasesRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_c8db6e46fba94960, []int{2} -} -func (m *AllTokenAliasesRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *AllTokenAliasesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_AllTokenAliasesRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *AllTokenAliasesRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_AllTokenAliasesRequest.Merge(m, src) -} -func (m *AllTokenAliasesRequest) XXX_Size() int { - return m.Size() -} -func (m *AllTokenAliasesRequest) XXX_DiscardUnknown() { - xxx_messageInfo_AllTokenAliasesRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_AllTokenAliasesRequest proto.InternalMessageInfo - -type AllTokenAliasesResponse struct { - Data []*TokenAlias `protobuf:"bytes,1,rep,name=data,proto3" json:"data,omitempty"` - DefaultDenom string `protobuf:"bytes,2,opt,name=default_denom,json=defaultDenom,proto3" json:"default_denom,omitempty"` - Bech32Prefix string `protobuf:"bytes,3,opt,name=bech32_prefix,json=bech32Prefix,proto3" json:"bech32_prefix,omitempty"` -} - -func (m *AllTokenAliasesResponse) Reset() { *m = AllTokenAliasesResponse{} } -func (m *AllTokenAliasesResponse) String() string { return proto.CompactTextString(m) } -func (*AllTokenAliasesResponse) ProtoMessage() {} -func (*AllTokenAliasesResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_c8db6e46fba94960, []int{3} -} -func (m *AllTokenAliasesResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *AllTokenAliasesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_AllTokenAliasesResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *AllTokenAliasesResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_AllTokenAliasesResponse.Merge(m, src) -} -func (m *AllTokenAliasesResponse) XXX_Size() int { - return m.Size() -} -func (m *AllTokenAliasesResponse) XXX_DiscardUnknown() { - xxx_messageInfo_AllTokenAliasesResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_AllTokenAliasesResponse proto.InternalMessageInfo - -func (m *AllTokenAliasesResponse) GetData() []*TokenAlias { - if m != nil { - return m.Data - } - return nil -} - -func (m *AllTokenAliasesResponse) GetDefaultDenom() string { - if m != nil { - return m.DefaultDenom - } - return "" -} - -func (m *AllTokenAliasesResponse) GetBech32Prefix() string { - if m != nil { - return m.Bech32Prefix - } - return "" -} - -type TokenAliasesByDenomRequest struct { - Denoms []string `protobuf:"bytes,1,rep,name=denoms,proto3" json:"denoms,omitempty"` -} - -func (m *TokenAliasesByDenomRequest) Reset() { *m = TokenAliasesByDenomRequest{} } -func (m *TokenAliasesByDenomRequest) String() string { return proto.CompactTextString(m) } -func (*TokenAliasesByDenomRequest) ProtoMessage() {} -func (*TokenAliasesByDenomRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_c8db6e46fba94960, []int{4} -} -func (m *TokenAliasesByDenomRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *TokenAliasesByDenomRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_TokenAliasesByDenomRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *TokenAliasesByDenomRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_TokenAliasesByDenomRequest.Merge(m, src) -} -func (m *TokenAliasesByDenomRequest) XXX_Size() int { - return m.Size() -} -func (m *TokenAliasesByDenomRequest) XXX_DiscardUnknown() { - xxx_messageInfo_TokenAliasesByDenomRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_TokenAliasesByDenomRequest proto.InternalMessageInfo - -func (m *TokenAliasesByDenomRequest) GetDenoms() []string { - if m != nil { - return m.Denoms - } - return nil -} - -type TokenAliasesByDenomResponse struct { - Data map[string]*TokenAlias `protobuf:"bytes,1,rep,name=data,proto3" json:"data,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` -} - -func (m *TokenAliasesByDenomResponse) Reset() { *m = TokenAliasesByDenomResponse{} } -func (m *TokenAliasesByDenomResponse) String() string { return proto.CompactTextString(m) } -func (*TokenAliasesByDenomResponse) ProtoMessage() {} -func (*TokenAliasesByDenomResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_c8db6e46fba94960, []int{5} -} -func (m *TokenAliasesByDenomResponse) XXX_Unmarshal(b []byte) error { +func (m *TokenInfoResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *TokenAliasesByDenomResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *TokenInfoResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_TokenAliasesByDenomResponse.Marshal(b, m, deterministic) + return xxx_messageInfo_TokenInfoResponse.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -282,128 +100,47 @@ func (m *TokenAliasesByDenomResponse) XXX_Marshal(b []byte, deterministic bool) return b[:n], nil } } -func (m *TokenAliasesByDenomResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_TokenAliasesByDenomResponse.Merge(m, src) +func (m *TokenInfoResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_TokenInfoResponse.Merge(m, src) } -func (m *TokenAliasesByDenomResponse) XXX_Size() int { +func (m *TokenInfoResponse) XXX_Size() int { return m.Size() } -func (m *TokenAliasesByDenomResponse) XXX_DiscardUnknown() { - xxx_messageInfo_TokenAliasesByDenomResponse.DiscardUnknown(m) +func (m *TokenInfoResponse) XXX_DiscardUnknown() { + xxx_messageInfo_TokenInfoResponse.DiscardUnknown(m) } -var xxx_messageInfo_TokenAliasesByDenomResponse proto.InternalMessageInfo +var xxx_messageInfo_TokenInfoResponse proto.InternalMessageInfo -func (m *TokenAliasesByDenomResponse) GetData() map[string]*TokenAlias { +func (m *TokenInfoResponse) GetData() *TokenInfo { if m != nil { return m.Data } return nil } -type TokenRateRequest struct { - Denom string `protobuf:"bytes,1,opt,name=denom,proto3" json:"denom,omitempty"` -} - -func (m *TokenRateRequest) Reset() { *m = TokenRateRequest{} } -func (m *TokenRateRequest) String() string { return proto.CompactTextString(m) } -func (*TokenRateRequest) ProtoMessage() {} -func (*TokenRateRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_c8db6e46fba94960, []int{6} -} -func (m *TokenRateRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *TokenRateRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_TokenRateRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *TokenRateRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_TokenRateRequest.Merge(m, src) -} -func (m *TokenRateRequest) XXX_Size() int { - return m.Size() -} -func (m *TokenRateRequest) XXX_DiscardUnknown() { - xxx_messageInfo_TokenRateRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_TokenRateRequest proto.InternalMessageInfo - -func (m *TokenRateRequest) GetDenom() string { - if m != nil { - return m.Denom - } - return "" -} - -type TokenRateResponse struct { - Data *TokenRate `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"` -} - -func (m *TokenRateResponse) Reset() { *m = TokenRateResponse{} } -func (m *TokenRateResponse) String() string { return proto.CompactTextString(m) } -func (*TokenRateResponse) ProtoMessage() {} -func (*TokenRateResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_c8db6e46fba94960, []int{7} -} -func (m *TokenRateResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *TokenRateResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_TokenRateResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *TokenRateResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_TokenRateResponse.Merge(m, src) -} -func (m *TokenRateResponse) XXX_Size() int { - return m.Size() -} -func (m *TokenRateResponse) XXX_DiscardUnknown() { - xxx_messageInfo_TokenRateResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_TokenRateResponse proto.InternalMessageInfo - -func (m *TokenRateResponse) GetData() *TokenRate { +func (m *TokenInfoResponse) GetSupply() types.Coin { if m != nil { - return m.Data + return m.Supply } - return nil + return types.Coin{} } -type AllTokenRatesRequest struct { +type AllTokenInfosRequest struct { } -func (m *AllTokenRatesRequest) Reset() { *m = AllTokenRatesRequest{} } -func (m *AllTokenRatesRequest) String() string { return proto.CompactTextString(m) } -func (*AllTokenRatesRequest) ProtoMessage() {} -func (*AllTokenRatesRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_c8db6e46fba94960, []int{8} +func (m *AllTokenInfosRequest) Reset() { *m = AllTokenInfosRequest{} } +func (m *AllTokenInfosRequest) String() string { return proto.CompactTextString(m) } +func (*AllTokenInfosRequest) ProtoMessage() {} +func (*AllTokenInfosRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_c8db6e46fba94960, []int{2} } -func (m *AllTokenRatesRequest) XXX_Unmarshal(b []byte) error { +func (m *AllTokenInfosRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *AllTokenRatesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *AllTokenInfosRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_AllTokenRatesRequest.Marshal(b, m, deterministic) + return xxx_messageInfo_AllTokenInfosRequest.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -413,34 +150,34 @@ func (m *AllTokenRatesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte return b[:n], nil } } -func (m *AllTokenRatesRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_AllTokenRatesRequest.Merge(m, src) +func (m *AllTokenInfosRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_AllTokenInfosRequest.Merge(m, src) } -func (m *AllTokenRatesRequest) XXX_Size() int { +func (m *AllTokenInfosRequest) XXX_Size() int { return m.Size() } -func (m *AllTokenRatesRequest) XXX_DiscardUnknown() { - xxx_messageInfo_AllTokenRatesRequest.DiscardUnknown(m) +func (m *AllTokenInfosRequest) XXX_DiscardUnknown() { + xxx_messageInfo_AllTokenInfosRequest.DiscardUnknown(m) } -var xxx_messageInfo_AllTokenRatesRequest proto.InternalMessageInfo +var xxx_messageInfo_AllTokenInfosRequest proto.InternalMessageInfo -type AllTokenRatesResponse struct { - Data []*TokenRate `protobuf:"bytes,1,rep,name=data,proto3" json:"data,omitempty"` +type AllTokenInfosResponse struct { + Data []TokenInfoResponse `protobuf:"bytes,1,rep,name=data,proto3" json:"data"` } -func (m *AllTokenRatesResponse) Reset() { *m = AllTokenRatesResponse{} } -func (m *AllTokenRatesResponse) String() string { return proto.CompactTextString(m) } -func (*AllTokenRatesResponse) ProtoMessage() {} -func (*AllTokenRatesResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_c8db6e46fba94960, []int{9} +func (m *AllTokenInfosResponse) Reset() { *m = AllTokenInfosResponse{} } +func (m *AllTokenInfosResponse) String() string { return proto.CompactTextString(m) } +func (*AllTokenInfosResponse) ProtoMessage() {} +func (*AllTokenInfosResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_c8db6e46fba94960, []int{3} } -func (m *AllTokenRatesResponse) XXX_Unmarshal(b []byte) error { +func (m *AllTokenInfosResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *AllTokenRatesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *AllTokenInfosResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_AllTokenRatesResponse.Marshal(b, m, deterministic) + return xxx_messageInfo_AllTokenInfosResponse.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -450,41 +187,41 @@ func (m *AllTokenRatesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byt return b[:n], nil } } -func (m *AllTokenRatesResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_AllTokenRatesResponse.Merge(m, src) +func (m *AllTokenInfosResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_AllTokenInfosResponse.Merge(m, src) } -func (m *AllTokenRatesResponse) XXX_Size() int { +func (m *AllTokenInfosResponse) XXX_Size() int { return m.Size() } -func (m *AllTokenRatesResponse) XXX_DiscardUnknown() { - xxx_messageInfo_AllTokenRatesResponse.DiscardUnknown(m) +func (m *AllTokenInfosResponse) XXX_DiscardUnknown() { + xxx_messageInfo_AllTokenInfosResponse.DiscardUnknown(m) } -var xxx_messageInfo_AllTokenRatesResponse proto.InternalMessageInfo +var xxx_messageInfo_AllTokenInfosResponse proto.InternalMessageInfo -func (m *AllTokenRatesResponse) GetData() []*TokenRate { +func (m *AllTokenInfosResponse) GetData() []TokenInfoResponse { if m != nil { return m.Data } return nil } -type TokenRatesByDenomRequest struct { +type TokenInfosByDenomRequest struct { Denoms []string `protobuf:"bytes,1,rep,name=denoms,proto3" json:"denoms,omitempty"` } -func (m *TokenRatesByDenomRequest) Reset() { *m = TokenRatesByDenomRequest{} } -func (m *TokenRatesByDenomRequest) String() string { return proto.CompactTextString(m) } -func (*TokenRatesByDenomRequest) ProtoMessage() {} -func (*TokenRatesByDenomRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_c8db6e46fba94960, []int{10} +func (m *TokenInfosByDenomRequest) Reset() { *m = TokenInfosByDenomRequest{} } +func (m *TokenInfosByDenomRequest) String() string { return proto.CompactTextString(m) } +func (*TokenInfosByDenomRequest) ProtoMessage() {} +func (*TokenInfosByDenomRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_c8db6e46fba94960, []int{4} } -func (m *TokenRatesByDenomRequest) XXX_Unmarshal(b []byte) error { +func (m *TokenInfosByDenomRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *TokenRatesByDenomRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *TokenInfosByDenomRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_TokenRatesByDenomRequest.Marshal(b, m, deterministic) + return xxx_messageInfo_TokenInfosByDenomRequest.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -494,41 +231,41 @@ func (m *TokenRatesByDenomRequest) XXX_Marshal(b []byte, deterministic bool) ([] return b[:n], nil } } -func (m *TokenRatesByDenomRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_TokenRatesByDenomRequest.Merge(m, src) +func (m *TokenInfosByDenomRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_TokenInfosByDenomRequest.Merge(m, src) } -func (m *TokenRatesByDenomRequest) XXX_Size() int { +func (m *TokenInfosByDenomRequest) XXX_Size() int { return m.Size() } -func (m *TokenRatesByDenomRequest) XXX_DiscardUnknown() { - xxx_messageInfo_TokenRatesByDenomRequest.DiscardUnknown(m) +func (m *TokenInfosByDenomRequest) XXX_DiscardUnknown() { + xxx_messageInfo_TokenInfosByDenomRequest.DiscardUnknown(m) } -var xxx_messageInfo_TokenRatesByDenomRequest proto.InternalMessageInfo +var xxx_messageInfo_TokenInfosByDenomRequest proto.InternalMessageInfo -func (m *TokenRatesByDenomRequest) GetDenoms() []string { +func (m *TokenInfosByDenomRequest) GetDenoms() []string { if m != nil { return m.Denoms } return nil } -type TokenRatesByDenomResponse struct { - Data map[string]*TokenRate `protobuf:"bytes,1,rep,name=data,proto3" json:"data,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` +type TokenInfosByDenomResponse struct { + Data map[string]TokenInfoResponse `protobuf:"bytes,1,rep,name=data,proto3" json:"data" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` } -func (m *TokenRatesByDenomResponse) Reset() { *m = TokenRatesByDenomResponse{} } -func (m *TokenRatesByDenomResponse) String() string { return proto.CompactTextString(m) } -func (*TokenRatesByDenomResponse) ProtoMessage() {} -func (*TokenRatesByDenomResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_c8db6e46fba94960, []int{11} +func (m *TokenInfosByDenomResponse) Reset() { *m = TokenInfosByDenomResponse{} } +func (m *TokenInfosByDenomResponse) String() string { return proto.CompactTextString(m) } +func (*TokenInfosByDenomResponse) ProtoMessage() {} +func (*TokenInfosByDenomResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_c8db6e46fba94960, []int{5} } -func (m *TokenRatesByDenomResponse) XXX_Unmarshal(b []byte) error { +func (m *TokenInfosByDenomResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *TokenRatesByDenomResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *TokenInfosByDenomResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_TokenRatesByDenomResponse.Marshal(b, m, deterministic) + return xxx_messageInfo_TokenInfosByDenomResponse.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -538,19 +275,19 @@ func (m *TokenRatesByDenomResponse) XXX_Marshal(b []byte, deterministic bool) ([ return b[:n], nil } } -func (m *TokenRatesByDenomResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_TokenRatesByDenomResponse.Merge(m, src) +func (m *TokenInfosByDenomResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_TokenInfosByDenomResponse.Merge(m, src) } -func (m *TokenRatesByDenomResponse) XXX_Size() int { +func (m *TokenInfosByDenomResponse) XXX_Size() int { return m.Size() } -func (m *TokenRatesByDenomResponse) XXX_DiscardUnknown() { - xxx_messageInfo_TokenRatesByDenomResponse.DiscardUnknown(m) +func (m *TokenInfosByDenomResponse) XXX_DiscardUnknown() { + xxx_messageInfo_TokenInfosByDenomResponse.DiscardUnknown(m) } -var xxx_messageInfo_TokenRatesByDenomResponse proto.InternalMessageInfo +var xxx_messageInfo_TokenInfosByDenomResponse proto.InternalMessageInfo -func (m *TokenRatesByDenomResponse) GetData() map[string]*TokenRate { +func (m *TokenInfosByDenomResponse) GetData() map[string]TokenInfoResponse { if m != nil { return m.Data } @@ -564,7 +301,7 @@ func (m *TokenBlackWhitesRequest) Reset() { *m = TokenBlackWhitesRequest func (m *TokenBlackWhitesRequest) String() string { return proto.CompactTextString(m) } func (*TokenBlackWhitesRequest) ProtoMessage() {} func (*TokenBlackWhitesRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_c8db6e46fba94960, []int{12} + return fileDescriptor_c8db6e46fba94960, []int{6} } func (m *TokenBlackWhitesRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -594,14 +331,14 @@ func (m *TokenBlackWhitesRequest) XXX_DiscardUnknown() { var xxx_messageInfo_TokenBlackWhitesRequest proto.InternalMessageInfo type TokenBlackWhitesResponse struct { - Data *TokensWhiteBlack `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"` + Data TokensWhiteBlack `protobuf:"bytes,1,opt,name=data,proto3" json:"data"` } func (m *TokenBlackWhitesResponse) Reset() { *m = TokenBlackWhitesResponse{} } func (m *TokenBlackWhitesResponse) String() string { return proto.CompactTextString(m) } func (*TokenBlackWhitesResponse) ProtoMessage() {} func (*TokenBlackWhitesResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_c8db6e46fba94960, []int{13} + return fileDescriptor_c8db6e46fba94960, []int{7} } func (m *TokenBlackWhitesResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -630,28 +367,21 @@ func (m *TokenBlackWhitesResponse) XXX_DiscardUnknown() { var xxx_messageInfo_TokenBlackWhitesResponse proto.InternalMessageInfo -func (m *TokenBlackWhitesResponse) GetData() *TokensWhiteBlack { +func (m *TokenBlackWhitesResponse) GetData() TokensWhiteBlack { if m != nil { return m.Data } - return nil + return TokensWhiteBlack{} } func init() { - proto.RegisterType((*TokenAliasRequest)(nil), "kira.tokens.TokenAliasRequest") - proto.RegisterType((*TokenAliasResponse)(nil), "kira.tokens.TokenAliasResponse") - proto.RegisterType((*AllTokenAliasesRequest)(nil), "kira.tokens.AllTokenAliasesRequest") - proto.RegisterType((*AllTokenAliasesResponse)(nil), "kira.tokens.AllTokenAliasesResponse") - proto.RegisterType((*TokenAliasesByDenomRequest)(nil), "kira.tokens.TokenAliasesByDenomRequest") - proto.RegisterType((*TokenAliasesByDenomResponse)(nil), "kira.tokens.TokenAliasesByDenomResponse") - proto.RegisterMapType((map[string]*TokenAlias)(nil), "kira.tokens.TokenAliasesByDenomResponse.DataEntry") - proto.RegisterType((*TokenRateRequest)(nil), "kira.tokens.TokenRateRequest") - proto.RegisterType((*TokenRateResponse)(nil), "kira.tokens.TokenRateResponse") - proto.RegisterType((*AllTokenRatesRequest)(nil), "kira.tokens.AllTokenRatesRequest") - proto.RegisterType((*AllTokenRatesResponse)(nil), "kira.tokens.AllTokenRatesResponse") - proto.RegisterType((*TokenRatesByDenomRequest)(nil), "kira.tokens.TokenRatesByDenomRequest") - proto.RegisterType((*TokenRatesByDenomResponse)(nil), "kira.tokens.TokenRatesByDenomResponse") - proto.RegisterMapType((map[string]*TokenRate)(nil), "kira.tokens.TokenRatesByDenomResponse.DataEntry") + proto.RegisterType((*TokenInfoRequest)(nil), "kira.tokens.TokenInfoRequest") + proto.RegisterType((*TokenInfoResponse)(nil), "kira.tokens.TokenInfoResponse") + proto.RegisterType((*AllTokenInfosRequest)(nil), "kira.tokens.AllTokenInfosRequest") + proto.RegisterType((*AllTokenInfosResponse)(nil), "kira.tokens.AllTokenInfosResponse") + proto.RegisterType((*TokenInfosByDenomRequest)(nil), "kira.tokens.TokenInfosByDenomRequest") + proto.RegisterType((*TokenInfosByDenomResponse)(nil), "kira.tokens.TokenInfosByDenomResponse") + proto.RegisterMapType((map[string]TokenInfoResponse)(nil), "kira.tokens.TokenInfosByDenomResponse.DataEntry") proto.RegisterType((*TokenBlackWhitesRequest)(nil), "kira.tokens.TokenBlackWhitesRequest") proto.RegisterType((*TokenBlackWhitesResponse)(nil), "kira.tokens.TokenBlackWhitesResponse") } @@ -659,52 +389,45 @@ func init() { func init() { proto.RegisterFile("kira/tokens/query.proto", fileDescriptor_c8db6e46fba94960) } var fileDescriptor_c8db6e46fba94960 = []byte{ - // 712 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x55, 0xcf, 0x6e, 0xd3, 0x4e, - 0x10, 0x8e, 0x9b, 0x5f, 0x2a, 0x75, 0xda, 0x4a, 0xfd, 0x2d, 0xc1, 0x49, 0x4d, 0x6b, 0xc0, 0x6d, - 0x21, 0xa2, 0x10, 0x43, 0xca, 0x01, 0x71, 0x41, 0x4d, 0x0b, 0x3d, 0x20, 0xd4, 0x12, 0x21, 0x21, - 0x71, 0xa9, 0x36, 0xcd, 0x36, 0xb5, 0xe2, 0x78, 0x53, 0xef, 0x06, 0x35, 0x48, 0x5c, 0x78, 0x82, - 0x4a, 0xbc, 0x09, 0x17, 0x5e, 0x81, 0x63, 0x25, 0x2e, 0x1c, 0xab, 0x96, 0x07, 0x41, 0xde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b4, 0x75, 0x46, 0xab, 0xe9, 0x04, 0xe9, 0x43, 0xb0, 0xd6, 0x32, 0x50, 0x31, 0x4b, - 0xbd, 0xfe, 0xeb, 0xc2, 0x36, 0xce, 0x2e, 0x6c, 0xe3, 0xfc, 0xc2, 0x36, 0x4e, 0x2f, 0xed, 0xdc, - 0xd9, 0xa5, 0x9d, 0xfb, 0x73, 0x69, 0xe7, 0x3e, 0x55, 0xda, 0x1e, 0x3f, 0xea, 0x37, 0xab, 0x07, - 0xb4, 0xeb, 0xbe, 0xf5, 0x42, 0xbc, 0x45, 0x43, 0xe2, 0x32, 0xd2, 0xc1, 0x9e, 0x7b, 0x12, 0xb7, - 0x84, 0x0f, 0x7a, 0x84, 0x35, 0xa7, 0xc5, 0x5f, 0x75, 0xe3, 0x5f, 0x00, 0x00, 0x00, 0xff, 0xff, - 0x35, 0xa8, 0x66, 0x9a, 0xfc, 0x07, 0x00, 0x00, + // 607 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x94, 0x31, 0x6f, 0xd3, 0x40, + 0x14, 0xc7, 0xe3, 0xa4, 0x89, 0x94, 0x0b, 0x43, 0x7a, 0x0d, 0x69, 0xe2, 0x12, 0x43, 0x0d, 0x45, + 0x11, 0x83, 0x8f, 0x06, 0xa4, 0x56, 0x6c, 0xa4, 0x45, 0x15, 0x30, 0x35, 0x20, 0x55, 0x62, 0x89, + 0xce, 0xe9, 0x35, 0xb1, 0xe2, 0xf8, 0x5c, 0xdf, 0xb9, 0xd4, 0x8c, 0x48, 0x2c, 0x4c, 0x48, 0x7c, + 0x21, 0xc6, 0x8e, 0x95, 0x58, 0x98, 0x10, 0x4a, 0xf8, 0x1a, 0x48, 0xc8, 0xe7, 0x8b, 0x6b, 0xd7, + 0x29, 0x61, 0xca, 0xc5, 0xef, 0xff, 0xde, 0xff, 0xf7, 0xde, 0x3d, 0x1b, 0xac, 0x8f, 0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, 0x4c, 0xd5, 0xff, 0x25, + 0x91, 0xae, 0xaa, 0x70, 0xad, 0x41, 0x98, 0x71, 0x65, 0xf0, 0xb3, 0x02, 0x6a, 0xc9, 0x0e, 0xe7, + 0x57, 0x0d, 0xb7, 0x96, 0xad, 0x42, 0xe4, 0xff, 0xf0, 0xff, 0x36, 0x46, 0xbf, 0x2f, 0x18, 0x5a, + 0x70, 0x23, 0xcb, 0xd0, 0x37, 0x83, 0xbe, 0xd8, 0x55, 0xf8, 0x49, 0x01, 0x6b, 0x73, 0x98, 0xc4, + 0x85, 0xc2, 0x07, 0x59, 0x93, 0xec, 0x2a, 0xa8, 0x5b, 0x4b, 0x54, 0x92, 0x64, 0x53, 0x90, 0x6c, + 0xc0, 0x66, 0x8a, 0xc4, 0x0c, 0x95, 0xfd, 0xf7, 0x42, 0xda, 0xed, 0x5e, 0x4c, 0x35, 0xe5, 0x72, + 0xaa, 0x29, 0xbf, 0xa6, 0x9a, 0xf2, 0x65, 0xa6, 0xe5, 0x2e, 0x67, 0x5a, 0xee, 0xc7, 0x4c, 0xcb, + 0xbd, 0x6b, 0x0f, 0x2d, 0x3e, 0xf2, 0x4d, 0x63, 0x40, 0x27, 0xe8, 0xb5, 0xe5, 0xe1, 0x3d, 0xea, + 0x11, 0xc4, 0xc8, 0x18, 0x5b, 0xe8, 0x3c, 0xfe, 0x5a, 0x06, 0x2e, 0x61, 0x66, 0x49, 0x7c, 0xc0, + 0x9e, 0xfc, 0x0d, 0x00, 0x00, 0xff, 0xff, 0x2c, 0xcb, 0xf9, 0xf0, 0x6f, 0x05, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -719,14 +442,10 @@ const _ = grpc.SupportPackageIsVersion4 // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. type QueryClient interface { - // Returns the token alias - GetTokenAlias(ctx context.Context, in *TokenAliasRequest, opts ...grpc.CallOption) (*TokenAliasResponse, error) - GetAllTokenAliases(ctx context.Context, in *AllTokenAliasesRequest, opts ...grpc.CallOption) (*AllTokenAliasesResponse, error) - GetTokenAliasesByDenom(ctx context.Context, in *TokenAliasesByDenomRequest, opts ...grpc.CallOption) (*TokenAliasesByDenomResponse, error) - // Returns the token rates - GetTokenRate(ctx context.Context, in *TokenRateRequest, opts ...grpc.CallOption) (*TokenRateResponse, error) - GetAllTokenRates(ctx context.Context, in *AllTokenRatesRequest, opts ...grpc.CallOption) (*AllTokenRatesResponse, error) - GetTokenRatesByDenom(ctx context.Context, in *TokenRatesByDenomRequest, opts ...grpc.CallOption) (*TokenRatesByDenomResponse, error) + // Returns the token infos + GetTokenInfo(ctx context.Context, in *TokenInfoRequest, opts ...grpc.CallOption) (*TokenInfoResponse, error) + GetAllTokenInfos(ctx context.Context, in *AllTokenInfosRequest, opts ...grpc.CallOption) (*AllTokenInfosResponse, error) + GetTokenInfosByDenom(ctx context.Context, in *TokenInfosByDenomRequest, opts ...grpc.CallOption) (*TokenInfosByDenomResponse, error) // Returns tokens black/white lists GetTokenBlackWhites(ctx context.Context, in *TokenBlackWhitesRequest, opts ...grpc.CallOption) (*TokenBlackWhitesResponse, error) } @@ -739,54 +458,27 @@ func NewQueryClient(cc grpc1.ClientConn) QueryClient { return &queryClient{cc} } -func (c *queryClient) GetTokenAlias(ctx context.Context, in *TokenAliasRequest, opts ...grpc.CallOption) (*TokenAliasResponse, error) { - out := new(TokenAliasResponse) - err := c.cc.Invoke(ctx, "/kira.tokens.Query/GetTokenAlias", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *queryClient) GetAllTokenAliases(ctx context.Context, in *AllTokenAliasesRequest, opts ...grpc.CallOption) (*AllTokenAliasesResponse, error) { - out := new(AllTokenAliasesResponse) - err := c.cc.Invoke(ctx, "/kira.tokens.Query/GetAllTokenAliases", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *queryClient) GetTokenAliasesByDenom(ctx context.Context, in *TokenAliasesByDenomRequest, opts ...grpc.CallOption) (*TokenAliasesByDenomResponse, error) { - out := new(TokenAliasesByDenomResponse) - err := c.cc.Invoke(ctx, "/kira.tokens.Query/GetTokenAliasesByDenom", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *queryClient) GetTokenRate(ctx context.Context, in *TokenRateRequest, opts ...grpc.CallOption) (*TokenRateResponse, error) { - out := new(TokenRateResponse) - err := c.cc.Invoke(ctx, "/kira.tokens.Query/GetTokenRate", in, out, opts...) +func (c *queryClient) GetTokenInfo(ctx context.Context, in *TokenInfoRequest, opts ...grpc.CallOption) (*TokenInfoResponse, error) { + out := new(TokenInfoResponse) + err := c.cc.Invoke(ctx, "/kira.tokens.Query/GetTokenInfo", in, out, opts...) if err != nil { return nil, err } return out, nil } -func (c *queryClient) GetAllTokenRates(ctx context.Context, in *AllTokenRatesRequest, opts ...grpc.CallOption) (*AllTokenRatesResponse, error) { - out := new(AllTokenRatesResponse) - err := c.cc.Invoke(ctx, "/kira.tokens.Query/GetAllTokenRates", in, out, opts...) +func (c *queryClient) GetAllTokenInfos(ctx context.Context, in *AllTokenInfosRequest, opts ...grpc.CallOption) (*AllTokenInfosResponse, error) { + out := new(AllTokenInfosResponse) + err := c.cc.Invoke(ctx, "/kira.tokens.Query/GetAllTokenInfos", in, out, opts...) if err != nil { return nil, err } return out, nil } -func (c *queryClient) GetTokenRatesByDenom(ctx context.Context, in *TokenRatesByDenomRequest, opts ...grpc.CallOption) (*TokenRatesByDenomResponse, error) { - out := new(TokenRatesByDenomResponse) - err := c.cc.Invoke(ctx, "/kira.tokens.Query/GetTokenRatesByDenom", in, out, opts...) +func (c *queryClient) GetTokenInfosByDenom(ctx context.Context, in *TokenInfosByDenomRequest, opts ...grpc.CallOption) (*TokenInfosByDenomResponse, error) { + out := new(TokenInfosByDenomResponse) + err := c.cc.Invoke(ctx, "/kira.tokens.Query/GetTokenInfosByDenom", in, out, opts...) if err != nil { return nil, err } @@ -804,14 +496,10 @@ func (c *queryClient) GetTokenBlackWhites(ctx context.Context, in *TokenBlackWhi // QueryServer is the server API for Query service. type QueryServer interface { - // Returns the token alias - GetTokenAlias(context.Context, *TokenAliasRequest) (*TokenAliasResponse, error) - GetAllTokenAliases(context.Context, *AllTokenAliasesRequest) (*AllTokenAliasesResponse, error) - GetTokenAliasesByDenom(context.Context, *TokenAliasesByDenomRequest) (*TokenAliasesByDenomResponse, error) - // Returns the token rates - GetTokenRate(context.Context, *TokenRateRequest) (*TokenRateResponse, error) - GetAllTokenRates(context.Context, *AllTokenRatesRequest) (*AllTokenRatesResponse, error) - GetTokenRatesByDenom(context.Context, *TokenRatesByDenomRequest) (*TokenRatesByDenomResponse, error) + // Returns the token infos + GetTokenInfo(context.Context, *TokenInfoRequest) (*TokenInfoResponse, error) + GetAllTokenInfos(context.Context, *AllTokenInfosRequest) (*AllTokenInfosResponse, error) + GetTokenInfosByDenom(context.Context, *TokenInfosByDenomRequest) (*TokenInfosByDenomResponse, error) // Returns tokens black/white lists GetTokenBlackWhites(context.Context, *TokenBlackWhitesRequest) (*TokenBlackWhitesResponse, error) } @@ -820,23 +508,14 @@ type QueryServer interface { type UnimplementedQueryServer struct { } -func (*UnimplementedQueryServer) GetTokenAlias(ctx context.Context, req *TokenAliasRequest) (*TokenAliasResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetTokenAlias not implemented") -} -func (*UnimplementedQueryServer) GetAllTokenAliases(ctx context.Context, req *AllTokenAliasesRequest) (*AllTokenAliasesResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetAllTokenAliases not implemented") -} -func (*UnimplementedQueryServer) GetTokenAliasesByDenom(ctx context.Context, req *TokenAliasesByDenomRequest) (*TokenAliasesByDenomResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetTokenAliasesByDenom not implemented") -} -func (*UnimplementedQueryServer) GetTokenRate(ctx context.Context, req *TokenRateRequest) (*TokenRateResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetTokenRate not implemented") +func (*UnimplementedQueryServer) GetTokenInfo(ctx context.Context, req *TokenInfoRequest) (*TokenInfoResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetTokenInfo not implemented") } -func (*UnimplementedQueryServer) GetAllTokenRates(ctx context.Context, req *AllTokenRatesRequest) (*AllTokenRatesResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetAllTokenRates not implemented") +func (*UnimplementedQueryServer) GetAllTokenInfos(ctx context.Context, req *AllTokenInfosRequest) (*AllTokenInfosResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetAllTokenInfos not implemented") } -func (*UnimplementedQueryServer) GetTokenRatesByDenom(ctx context.Context, req *TokenRatesByDenomRequest) (*TokenRatesByDenomResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetTokenRatesByDenom not implemented") +func (*UnimplementedQueryServer) GetTokenInfosByDenom(ctx context.Context, req *TokenInfosByDenomRequest) (*TokenInfosByDenomResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetTokenInfosByDenom not implemented") } func (*UnimplementedQueryServer) GetTokenBlackWhites(ctx context.Context, req *TokenBlackWhitesRequest) (*TokenBlackWhitesResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetTokenBlackWhites not implemented") @@ -846,110 +525,56 @@ func RegisterQueryServer(s grpc1.Server, srv QueryServer) { s.RegisterService(&_Query_serviceDesc, srv) } -func _Query_GetTokenAlias_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(TokenAliasRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).GetTokenAlias(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/kira.tokens.Query/GetTokenAlias", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).GetTokenAlias(ctx, req.(*TokenAliasRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Query_GetAllTokenAliases_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(AllTokenAliasesRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).GetAllTokenAliases(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/kira.tokens.Query/GetAllTokenAliases", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).GetAllTokenAliases(ctx, req.(*AllTokenAliasesRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Query_GetTokenAliasesByDenom_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(TokenAliasesByDenomRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).GetTokenAliasesByDenom(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/kira.tokens.Query/GetTokenAliasesByDenom", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).GetTokenAliasesByDenom(ctx, req.(*TokenAliasesByDenomRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Query_GetTokenRate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(TokenRateRequest) +func _Query_GetTokenInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(TokenInfoRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(QueryServer).GetTokenRate(ctx, in) + return srv.(QueryServer).GetTokenInfo(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/kira.tokens.Query/GetTokenRate", + FullMethod: "/kira.tokens.Query/GetTokenInfo", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).GetTokenRate(ctx, req.(*TokenRateRequest)) + return srv.(QueryServer).GetTokenInfo(ctx, req.(*TokenInfoRequest)) } return interceptor(ctx, in, info, handler) } -func _Query_GetAllTokenRates_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(AllTokenRatesRequest) +func _Query_GetAllTokenInfos_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(AllTokenInfosRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(QueryServer).GetAllTokenRates(ctx, in) + return srv.(QueryServer).GetAllTokenInfos(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/kira.tokens.Query/GetAllTokenRates", + FullMethod: "/kira.tokens.Query/GetAllTokenInfos", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).GetAllTokenRates(ctx, req.(*AllTokenRatesRequest)) + return srv.(QueryServer).GetAllTokenInfos(ctx, req.(*AllTokenInfosRequest)) } return interceptor(ctx, in, info, handler) } -func _Query_GetTokenRatesByDenom_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(TokenRatesByDenomRequest) +func _Query_GetTokenInfosByDenom_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(TokenInfosByDenomRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(QueryServer).GetTokenRatesByDenom(ctx, in) + return srv.(QueryServer).GetTokenInfosByDenom(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/kira.tokens.Query/GetTokenRatesByDenom", + FullMethod: "/kira.tokens.Query/GetTokenInfosByDenom", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).GetTokenRatesByDenom(ctx, req.(*TokenRatesByDenomRequest)) + return srv.(QueryServer).GetTokenInfosByDenom(ctx, req.(*TokenInfosByDenomRequest)) } return interceptor(ctx, in, info, handler) } @@ -977,28 +602,16 @@ var _Query_serviceDesc = grpc.ServiceDesc{ HandlerType: (*QueryServer)(nil), Methods: []grpc.MethodDesc{ { - MethodName: "GetTokenAlias", - Handler: _Query_GetTokenAlias_Handler, - }, - { - MethodName: "GetAllTokenAliases", - Handler: _Query_GetAllTokenAliases_Handler, - }, - { - MethodName: "GetTokenAliasesByDenom", - Handler: _Query_GetTokenAliasesByDenom_Handler, - }, - { - MethodName: "GetTokenRate", - Handler: _Query_GetTokenRate_Handler, + MethodName: "GetTokenInfo", + Handler: _Query_GetTokenInfo_Handler, }, { - MethodName: "GetAllTokenRates", - Handler: _Query_GetAllTokenRates_Handler, + MethodName: "GetAllTokenInfos", + Handler: _Query_GetAllTokenInfos_Handler, }, { - MethodName: "GetTokenRatesByDenom", - Handler: _Query_GetTokenRatesByDenom_Handler, + MethodName: "GetTokenInfosByDenom", + Handler: _Query_GetTokenInfosByDenom_Handler, }, { MethodName: "GetTokenBlackWhites", @@ -1009,7 +622,7 @@ var _Query_serviceDesc = grpc.ServiceDesc{ Metadata: "kira/tokens/query.proto", } -func (m *TokenAliasRequest) Marshal() (dAtA []byte, err error) { +func (m *TokenInfoRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -1019,27 +632,27 @@ func (m *TokenAliasRequest) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *TokenAliasRequest) MarshalTo(dAtA []byte) (int, error) { +func (m *TokenInfoRequest) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *TokenAliasRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *TokenInfoRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if len(m.Symbol) > 0 { - i -= len(m.Symbol) - copy(dAtA[i:], m.Symbol) - i = encodeVarintQuery(dAtA, i, uint64(len(m.Symbol))) + if len(m.Denom) > 0 { + i -= len(m.Denom) + copy(dAtA[i:], m.Denom) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Denom))) i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } -func (m *TokenAliasResponse) Marshal() (dAtA []byte, err error) { +func (m *TokenInfoResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -1049,16 +662,26 @@ func (m *TokenAliasResponse) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *TokenAliasResponse) MarshalTo(dAtA []byte) (int, error) { +func (m *TokenInfoResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *TokenAliasResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *TokenInfoResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l + { + size, err := m.Supply.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 if m.Data != nil { { size, err := m.Data.MarshalToSizedBuffer(dAtA[:i]) @@ -1074,7 +697,7 @@ func (m *TokenAliasResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *AllTokenAliasesRequest) Marshal() (dAtA []byte, err error) { +func (m *AllTokenInfosRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -1084,12 +707,12 @@ func (m *AllTokenAliasesRequest) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *AllTokenAliasesRequest) MarshalTo(dAtA []byte) (int, error) { +func (m *AllTokenInfosRequest) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *AllTokenAliasesRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *AllTokenInfosRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -1097,7 +720,7 @@ func (m *AllTokenAliasesRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) return len(dAtA) - i, nil } -func (m *AllTokenAliasesResponse) Marshal() (dAtA []byte, err error) { +func (m *AllTokenInfosResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -1107,30 +730,16 @@ func (m *AllTokenAliasesResponse) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *AllTokenAliasesResponse) MarshalTo(dAtA []byte) (int, error) { +func (m *AllTokenInfosResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *AllTokenAliasesResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *AllTokenInfosResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if len(m.Bech32Prefix) > 0 { - i -= len(m.Bech32Prefix) - copy(dAtA[i:], m.Bech32Prefix) - i = encodeVarintQuery(dAtA, i, uint64(len(m.Bech32Prefix))) - i-- - dAtA[i] = 0x1a - } - if len(m.DefaultDenom) > 0 { - i -= len(m.DefaultDenom) - copy(dAtA[i:], m.DefaultDenom) - i = encodeVarintQuery(dAtA, i, uint64(len(m.DefaultDenom))) - i-- - dAtA[i] = 0x12 - } if len(m.Data) > 0 { for iNdEx := len(m.Data) - 1; iNdEx >= 0; iNdEx-- { { @@ -1148,7 +757,7 @@ func (m *AllTokenAliasesResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) return len(dAtA) - i, nil } -func (m *TokenAliasesByDenomRequest) Marshal() (dAtA []byte, err error) { +func (m *TokenInfosByDenomRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -1158,12 +767,12 @@ func (m *TokenAliasesByDenomRequest) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *TokenAliasesByDenomRequest) MarshalTo(dAtA []byte) (int, error) { +func (m *TokenInfosByDenomRequest) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *TokenAliasesByDenomRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *TokenInfosByDenomRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -1180,7 +789,7 @@ func (m *TokenAliasesByDenomRequest) MarshalToSizedBuffer(dAtA []byte) (int, err return len(dAtA) - i, nil } -func (m *TokenAliasesByDenomResponse) Marshal() (dAtA []byte, err error) { +func (m *TokenInfosByDenomResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -1190,12 +799,12 @@ func (m *TokenAliasesByDenomResponse) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *TokenAliasesByDenomResponse) MarshalTo(dAtA []byte) (int, error) { +func (m *TokenInfosByDenomResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *TokenAliasesByDenomResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *TokenInfosByDenomResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -1204,143 +813,8 @@ func (m *TokenAliasesByDenomResponse) MarshalToSizedBuffer(dAtA []byte) (int, er for k := range m.Data { v := m.Data[k] baseI := i - if v != nil { - { - size, err := v.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - i -= len(k) - copy(dAtA[i:], k) - i = encodeVarintQuery(dAtA, i, uint64(len(k))) - i-- - dAtA[i] = 0xa - i = encodeVarintQuery(dAtA, i, uint64(baseI-i)) - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *TokenRateRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *TokenRateRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *TokenRateRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Denom) > 0 { - i -= len(m.Denom) - copy(dAtA[i:], m.Denom) - i = encodeVarintQuery(dAtA, i, uint64(len(m.Denom))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *TokenRateResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *TokenRateResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *TokenRateResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Data != nil { - { - size, err := m.Data.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *AllTokenRatesRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *AllTokenRatesRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *AllTokenRatesRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil -} - -func (m *AllTokenRatesResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *AllTokenRatesResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *AllTokenRatesResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Data) > 0 { - for iNdEx := len(m.Data) - 1; iNdEx >= 0; iNdEx-- { { - size, err := m.Data[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + size, err := (&v).MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } @@ -1348,80 +822,7 @@ func (m *AllTokenRatesResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i = encodeVarintQuery(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *TokenRatesByDenomRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *TokenRatesByDenomRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *TokenRatesByDenomRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Denoms) > 0 { - for iNdEx := len(m.Denoms) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Denoms[iNdEx]) - copy(dAtA[i:], m.Denoms[iNdEx]) - i = encodeVarintQuery(dAtA, i, uint64(len(m.Denoms[iNdEx]))) - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *TokenRatesByDenomResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *TokenRatesByDenomResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *TokenRatesByDenomResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Data) > 0 { - for k := range m.Data { - v := m.Data[k] - baseI := i - if v != nil { - { - size, err := v.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } + dAtA[i] = 0x12 i -= len(k) copy(dAtA[i:], k) i = encodeVarintQuery(dAtA, i, uint64(len(k))) @@ -1478,18 +879,16 @@ func (m *TokenBlackWhitesResponse) MarshalToSizedBuffer(dAtA []byte) (int, error _ = i var l int _ = l - if m.Data != nil { - { - size, err := m.Data.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) + { + size, err := m.Data.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err } - i-- - dAtA[i] = 0xa + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) } + i-- + dAtA[i] = 0xa return len(dAtA) - i, nil } @@ -1504,20 +903,20 @@ func encodeVarintQuery(dAtA []byte, offset int, v uint64) int { dAtA[offset] = uint8(v) return base } -func (m *TokenAliasRequest) Size() (n int) { +func (m *TokenInfoRequest) Size() (n int) { if m == nil { return 0 } var l int _ = l - l = len(m.Symbol) + l = len(m.Denom) if l > 0 { n += 1 + l + sovQuery(uint64(l)) } return n } -func (m *TokenAliasResponse) Size() (n int) { +func (m *TokenInfoResponse) Size() (n int) { if m == nil { return 0 } @@ -1527,10 +926,12 @@ func (m *TokenAliasResponse) Size() (n int) { l = m.Data.Size() n += 1 + l + sovQuery(uint64(l)) } + l = m.Supply.Size() + n += 1 + l + sovQuery(uint64(l)) return n } -func (m *AllTokenAliasesRequest) Size() (n int) { +func (m *AllTokenInfosRequest) Size() (n int) { if m == nil { return 0 } @@ -1539,7 +940,7 @@ func (m *AllTokenAliasesRequest) Size() (n int) { return n } -func (m *AllTokenAliasesResponse) Size() (n int) { +func (m *AllTokenInfosResponse) Size() (n int) { if m == nil { return 0 } @@ -1551,18 +952,10 @@ func (m *AllTokenAliasesResponse) Size() (n int) { n += 1 + l + sovQuery(uint64(l)) } } - l = len(m.DefaultDenom) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } - l = len(m.Bech32Prefix) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } return n } -func (m *TokenAliasesByDenomRequest) Size() (n int) { +func (m *TokenInfosByDenomRequest) Size() (n int) { if m == nil { return 0 } @@ -1577,7 +970,7 @@ func (m *TokenAliasesByDenomRequest) Size() (n int) { return n } -func (m *TokenAliasesByDenomResponse) Size() (n int) { +func (m *TokenInfosByDenomResponse) Size() (n int) { if m == nil { return 0 } @@ -1587,500 +980,41 @@ func (m *TokenAliasesByDenomResponse) Size() (n int) { for k, v := range m.Data { _ = k _ = v - l = 0 - if v != nil { - l = v.Size() - l += 1 + sovQuery(uint64(l)) - } - mapEntrySize := 1 + len(k) + sovQuery(uint64(len(k))) + l + l = v.Size() + mapEntrySize := 1 + len(k) + sovQuery(uint64(len(k))) + 1 + l + sovQuery(uint64(l)) n += mapEntrySize + 1 + sovQuery(uint64(mapEntrySize)) } } - return n -} - -func (m *TokenRateRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Denom) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } - return n -} - -func (m *TokenRateResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Data != nil { - l = m.Data.Size() - n += 1 + l + sovQuery(uint64(l)) - } - return n -} - -func (m *AllTokenRatesRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - return n -} - -func (m *AllTokenRatesResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Data) > 0 { - for _, e := range m.Data { - l = e.Size() - n += 1 + l + sovQuery(uint64(l)) - } - } - return n -} - -func (m *TokenRatesByDenomRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Denoms) > 0 { - for _, s := range m.Denoms { - l = len(s) - n += 1 + l + sovQuery(uint64(l)) - } - } - return n -} - -func (m *TokenRatesByDenomResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Data) > 0 { - for k, v := range m.Data { - _ = k - _ = v - l = 0 - if v != nil { - l = v.Size() - l += 1 + sovQuery(uint64(l)) - } - mapEntrySize := 1 + len(k) + sovQuery(uint64(len(k))) + l - n += mapEntrySize + 1 + sovQuery(uint64(mapEntrySize)) - } - } - return n -} - -func (m *TokenBlackWhitesRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - return n -} - -func (m *TokenBlackWhitesResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Data != nil { - l = m.Data.Size() - n += 1 + l + sovQuery(uint64(l)) - } - return n -} - -func sovQuery(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozQuery(x uint64) (n int) { - return sovQuery(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *TokenAliasRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: TokenAliasRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: TokenAliasRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Symbol", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Symbol = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *TokenAliasResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: TokenAliasResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: TokenAliasResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Data == nil { - m.Data = &TokenAlias{} - } - if err := m.Data.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *AllTokenAliasesRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: AllTokenAliasesRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AllTokenAliasesRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *AllTokenAliasesResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: AllTokenAliasesResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AllTokenAliasesResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Data = append(m.Data, &TokenAlias{}) - if err := m.Data[len(m.Data)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DefaultDenom", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.DefaultDenom = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Bech32Prefix", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Bech32Prefix = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } + return n +} + +func (m *TokenBlackWhitesRequest) Size() (n int) { + if m == nil { + return 0 } + var l int + _ = l + return n +} - if iNdEx > l { - return io.ErrUnexpectedEOF +func (m *TokenBlackWhitesResponse) Size() (n int) { + if m == nil { + return 0 } - return nil + var l int + _ = l + l = m.Data.Size() + n += 1 + l + sovQuery(uint64(l)) + return n +} + +func sovQuery(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozQuery(x uint64) (n int) { + return sovQuery(uint64((x << 1) ^ uint64((int64(x) >> 63)))) } -func (m *TokenAliasesByDenomRequest) Unmarshal(dAtA []byte) error { +func (m *TokenInfoRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -2103,15 +1037,15 @@ func (m *TokenAliasesByDenomRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: TokenAliasesByDenomRequest: wiretype end group for non-group") + return fmt.Errorf("proto: TokenInfoRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: TokenAliasesByDenomRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: TokenInfoRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Denoms", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Denom", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -2139,7 +1073,7 @@ func (m *TokenAliasesByDenomRequest) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Denoms = append(m.Denoms, string(dAtA[iNdEx:postIndex])) + m.Denom = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -2162,7 +1096,7 @@ func (m *TokenAliasesByDenomRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *TokenAliasesByDenomResponse) Unmarshal(dAtA []byte) error { +func (m *TokenInfoResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -2185,10 +1119,10 @@ func (m *TokenAliasesByDenomResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: TokenAliasesByDenomResponse: wiretype end group for non-group") + return fmt.Errorf("proto: TokenInfoResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: TokenAliasesByDenomResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: TokenInfoResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -2221,240 +1155,15 @@ func (m *TokenAliasesByDenomResponse) Unmarshal(dAtA []byte) error { return io.ErrUnexpectedEOF } if m.Data == nil { - m.Data = make(map[string]*TokenAlias) - } - var mapkey string - var mapvalue *TokenAlias - for iNdEx < postIndex { - entryPreIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - if fieldNum == 1 { - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLenmapkey |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthQuery - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey < 0 { - return ErrInvalidLengthQuery - } - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - } else if fieldNum == 2 { - var mapmsglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - mapmsglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if mapmsglen < 0 { - return ErrInvalidLengthQuery - } - postmsgIndex := iNdEx + mapmsglen - if postmsgIndex < 0 { - return ErrInvalidLengthQuery - } - if postmsgIndex > l { - return io.ErrUnexpectedEOF - } - mapvalue = &TokenAlias{} - if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil { - return err - } - iNdEx = postmsgIndex - } else { - iNdEx = entryPreIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } + m.Data = &TokenInfo{} } - m.Data[mapkey] = mapvalue - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { + if err := m.Data.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *TokenRateRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: TokenRateRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: TokenRateRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Denom", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Denom = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *TokenRateResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: TokenRateResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: TokenRateResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: + case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Supply", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -2481,10 +1190,7 @@ func (m *TokenRateResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.Data == nil { - m.Data = &TokenRate{} - } - if err := m.Data.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.Supply.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -2509,7 +1215,7 @@ func (m *TokenRateResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *AllTokenRatesRequest) Unmarshal(dAtA []byte) error { +func (m *AllTokenInfosRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -2532,10 +1238,10 @@ func (m *AllTokenRatesRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: AllTokenRatesRequest: wiretype end group for non-group") + return fmt.Errorf("proto: AllTokenInfosRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: AllTokenRatesRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: AllTokenInfosRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { default: @@ -2559,7 +1265,7 @@ func (m *AllTokenRatesRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *AllTokenRatesResponse) Unmarshal(dAtA []byte) error { +func (m *AllTokenInfosResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -2582,10 +1288,10 @@ func (m *AllTokenRatesResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: AllTokenRatesResponse: wiretype end group for non-group") + return fmt.Errorf("proto: AllTokenInfosResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: AllTokenRatesResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: AllTokenInfosResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -2617,7 +1323,7 @@ func (m *AllTokenRatesResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Data = append(m.Data, &TokenRate{}) + m.Data = append(m.Data, TokenInfoResponse{}) if err := m.Data[len(m.Data)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } @@ -2643,7 +1349,7 @@ func (m *AllTokenRatesResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *TokenRatesByDenomRequest) Unmarshal(dAtA []byte) error { +func (m *TokenInfosByDenomRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -2666,10 +1372,10 @@ func (m *TokenRatesByDenomRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: TokenRatesByDenomRequest: wiretype end group for non-group") + return fmt.Errorf("proto: TokenInfosByDenomRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: TokenRatesByDenomRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: TokenInfosByDenomRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -2725,7 +1431,7 @@ func (m *TokenRatesByDenomRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *TokenRatesByDenomResponse) Unmarshal(dAtA []byte) error { +func (m *TokenInfosByDenomResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -2748,10 +1454,10 @@ func (m *TokenRatesByDenomResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: TokenRatesByDenomResponse: wiretype end group for non-group") + return fmt.Errorf("proto: TokenInfosByDenomResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: TokenRatesByDenomResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: TokenInfosByDenomResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -2784,10 +1490,10 @@ func (m *TokenRatesByDenomResponse) Unmarshal(dAtA []byte) error { return io.ErrUnexpectedEOF } if m.Data == nil { - m.Data = make(map[string]*TokenRate) + m.Data = make(map[string]TokenInfoResponse) } var mapkey string - var mapvalue *TokenRate + mapvalue := &TokenInfoResponse{} for iNdEx < postIndex { entryPreIndex := iNdEx var wire uint64 @@ -2861,7 +1567,7 @@ func (m *TokenRatesByDenomResponse) Unmarshal(dAtA []byte) error { if postmsgIndex > l { return io.ErrUnexpectedEOF } - mapvalue = &TokenRate{} + mapvalue = &TokenInfoResponse{} if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil { return err } @@ -2881,7 +1587,7 @@ func (m *TokenRatesByDenomResponse) Unmarshal(dAtA []byte) error { iNdEx += skippy } } - m.Data[mapkey] = mapvalue + m.Data[mapkey] = *mapvalue iNdEx = postIndex default: iNdEx = preIndex @@ -3012,9 +1718,6 @@ func (m *TokenBlackWhitesResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.Data == nil { - m.Data = &TokensWhiteBlack{} - } if err := m.Data.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } diff --git a/x/tokens/types/query.pb.gw.go b/x/tokens/types/query.pb.gw.go index 6874cb6aa..bce99add2 100644 --- a/x/tokens/types/query.pb.gw.go +++ b/x/tokens/types/query.pb.gw.go @@ -33,38 +33,110 @@ var _ = utilities.NewDoubleArray var _ = descriptor.ForMessage var _ = metadata.Join -func request_Query_GetAllTokenAliases_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq AllTokenAliasesRequest +var ( + filter_Query_GetTokenInfo_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + +func request_Query_GetTokenInfo_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq TokenInfoRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_GetTokenInfo_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.GetTokenInfo(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_GetTokenInfo_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq TokenInfoRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_GetTokenInfo_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.GetTokenInfo(ctx, &protoReq) + return msg, metadata, err + +} + +func request_Query_GetAllTokenInfos_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq AllTokenInfosRequest + var metadata runtime.ServerMetadata + + msg, err := client.GetAllTokenInfos(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_GetAllTokenInfos_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq AllTokenInfosRequest + var metadata runtime.ServerMetadata + + msg, err := server.GetAllTokenInfos(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_Query_GetTokenInfosByDenom_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + +func request_Query_GetTokenInfosByDenom_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq TokenInfosByDenomRequest var metadata runtime.ServerMetadata - msg, err := client.GetAllTokenAliases(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_GetTokenInfosByDenom_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.GetTokenInfosByDenom(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err } -func local_request_Query_GetAllTokenAliases_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq AllTokenAliasesRequest +func local_request_Query_GetTokenInfosByDenom_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq TokenInfosByDenomRequest var metadata runtime.ServerMetadata - msg, err := server.GetAllTokenAliases(ctx, &protoReq) + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_GetTokenInfosByDenom_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.GetTokenInfosByDenom(ctx, &protoReq) return msg, metadata, err } -func request_Query_GetAllTokenRates_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq AllTokenRatesRequest +func request_Query_GetTokenBlackWhites_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq TokenBlackWhitesRequest var metadata runtime.ServerMetadata - msg, err := client.GetAllTokenRates(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + msg, err := client.GetTokenBlackWhites(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err } -func local_request_Query_GetAllTokenRates_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq AllTokenRatesRequest +func local_request_Query_GetTokenBlackWhites_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq TokenBlackWhitesRequest var metadata runtime.ServerMetadata - msg, err := server.GetAllTokenRates(ctx, &protoReq) + msg, err := server.GetTokenBlackWhites(ctx, &protoReq) return msg, metadata, err } @@ -75,7 +147,53 @@ func local_request_Query_GetAllTokenRates_0(ctx context.Context, marshaler runti // Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterQueryHandlerFromEndpoint instead. func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, server QueryServer) error { - mux.Handle("GET", pattern_Query_GetAllTokenAliases_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("GET", pattern_Query_GetTokenInfo_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Query_GetTokenInfo_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_GetTokenInfo_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_GetAllTokenInfos_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Query_GetAllTokenInfos_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_GetAllTokenInfos_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_GetTokenInfosByDenom_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream @@ -86,7 +204,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_Query_GetAllTokenAliases_0(rctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_Query_GetTokenInfosByDenom_0(rctx, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { @@ -94,11 +212,11 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv return } - forward_Query_GetAllTokenAliases_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Query_GetTokenInfosByDenom_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("GET", pattern_Query_GetAllTokenRates_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("GET", pattern_Query_GetTokenBlackWhites_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream @@ -109,7 +227,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_Query_GetAllTokenRates_0(rctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_Query_GetTokenBlackWhites_0(rctx, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { @@ -117,7 +235,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv return } - forward_Query_GetAllTokenRates_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Query_GetTokenBlackWhites_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -162,7 +280,47 @@ func RegisterQueryHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc // "QueryClient" to call the correct interceptors. func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, client QueryClient) error { - mux.Handle("GET", pattern_Query_GetAllTokenAliases_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("GET", pattern_Query_GetTokenInfo_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Query_GetTokenInfo_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_GetTokenInfo_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_GetAllTokenInfos_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Query_GetAllTokenInfos_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_GetAllTokenInfos_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_GetTokenInfosByDenom_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) @@ -171,18 +329,18 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_Query_GetAllTokenAliases_0(rctx, inboundMarshaler, client, req, pathParams) + resp, md, err := request_Query_GetTokenInfosByDenom_0(rctx, inboundMarshaler, client, req, pathParams) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_Query_GetAllTokenAliases_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Query_GetTokenInfosByDenom_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("GET", pattern_Query_GetAllTokenRates_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("GET", pattern_Query_GetTokenBlackWhites_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) @@ -191,14 +349,14 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_Query_GetAllTokenRates_0(rctx, inboundMarshaler, client, req, pathParams) + resp, md, err := request_Query_GetTokenBlackWhites_0(rctx, inboundMarshaler, client, req, pathParams) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_Query_GetAllTokenRates_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Query_GetTokenBlackWhites_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -206,13 +364,21 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie } var ( - pattern_Query_GetAllTokenAliases_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"kira", "tokens", "aliases"}, "", runtime.AssumeColonVerbOpt(false))) + pattern_Query_GetTokenInfo_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"kira", "tokens", "info"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_GetAllTokenInfos_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"kira", "tokens", "infos"}, "", runtime.AssumeColonVerbOpt(false))) - pattern_Query_GetAllTokenRates_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"kira", "tokens", "rates"}, "", runtime.AssumeColonVerbOpt(false))) + pattern_Query_GetTokenInfosByDenom_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"kira", "tokens", "infos_by_denom"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_GetTokenBlackWhites_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"kira", "tokens", "black_whites"}, "", runtime.AssumeColonVerbOpt(false))) ) var ( - forward_Query_GetAllTokenAliases_0 = runtime.ForwardResponseMessage + forward_Query_GetTokenInfo_0 = runtime.ForwardResponseMessage + + forward_Query_GetAllTokenInfos_0 = runtime.ForwardResponseMessage + + forward_Query_GetTokenInfosByDenom_0 = runtime.ForwardResponseMessage - forward_Query_GetAllTokenRates_0 = runtime.ForwardResponseMessage + forward_Query_GetTokenBlackWhites_0 = runtime.ForwardResponseMessage ) diff --git a/x/tokens/types/rate.pb.go b/x/tokens/types/rate.pb.go deleted file mode 100644 index 5d73fa6ab..000000000 --- a/x/tokens/types/rate.pb.go +++ /dev/null @@ -1,1084 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: kira/tokens/rate.proto - -package types - -import ( - fmt "fmt" - github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" - _ "github.com/cosmos/gogoproto/gogoproto" - proto "github.com/cosmos/gogoproto/proto" - io "io" - math "math" - math_bits "math/bits" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -type TokenRate struct { - Denom string `protobuf:"bytes,1,opt,name=denom,proto3" json:"denom,omitempty"` - FeeRate github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,2,opt,name=fee_rate,json=feeRate,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"fee_rate" yaml:"fee_rate"` - FeePayments bool `protobuf:"varint,3,opt,name=fee_payments,json=feePayments,proto3" json:"fee_payments,omitempty"` - StakeCap github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,4,opt,name=stake_cap,json=stakeCap,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"stake_cap" yaml:"stake_cap"` - StakeMin github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,5,opt,name=stake_min,json=stakeMin,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"stake_min" yaml:"stake_min"` - StakeToken bool `protobuf:"varint,6,opt,name=stake_token,json=stakeToken,proto3" json:"stake_token,omitempty"` - Invalidated bool `protobuf:"varint,7,opt,name=invalidated,proto3" json:"invalidated,omitempty"` -} - -func (m *TokenRate) Reset() { *m = TokenRate{} } -func (m *TokenRate) String() string { return proto.CompactTextString(m) } -func (*TokenRate) ProtoMessage() {} -func (*TokenRate) Descriptor() ([]byte, []int) { - return fileDescriptor_d415c64b17c96dda, []int{0} -} -func (m *TokenRate) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *TokenRate) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_TokenRate.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *TokenRate) XXX_Merge(src proto.Message) { - xxx_messageInfo_TokenRate.Merge(m, src) -} -func (m *TokenRate) XXX_Size() int { - return m.Size() -} -func (m *TokenRate) XXX_DiscardUnknown() { - xxx_messageInfo_TokenRate.DiscardUnknown(m) -} - -var xxx_messageInfo_TokenRate proto.InternalMessageInfo - -func (m *TokenRate) GetDenom() string { - if m != nil { - return m.Denom - } - return "" -} - -func (m *TokenRate) GetFeePayments() bool { - if m != nil { - return m.FeePayments - } - return false -} - -func (m *TokenRate) GetStakeToken() bool { - if m != nil { - return m.StakeToken - } - return false -} - -func (m *TokenRate) GetInvalidated() bool { - if m != nil { - return m.Invalidated - } - return false -} - -type MsgUpsertTokenRate struct { - Denom string `protobuf:"bytes,1,opt,name=denom,proto3" json:"denom,omitempty"` - Rate github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,2,opt,name=rate,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"rate" yaml:"rate"` - FeePayments bool `protobuf:"varint,3,opt,name=fee_payments,json=feePayments,proto3" json:"fee_payments,omitempty"` - StakeCap github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,4,opt,name=stake_cap,json=stakeCap,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"stake_cap" yaml:"stake_cap"` - StakeMin github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,5,opt,name=stake_min,json=stakeMin,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"stake_min" yaml:"stake_min"` - StakeToken bool `protobuf:"varint,6,opt,name=stake_token,json=stakeToken,proto3" json:"stake_token,omitempty"` - Invalidated bool `protobuf:"varint,7,opt,name=invalidated,proto3" json:"invalidated,omitempty"` - Proposer github_com_cosmos_cosmos_sdk_types.AccAddress `protobuf:"bytes,8,opt,name=proposer,proto3,casttype=github.com/cosmos/cosmos-sdk/types.AccAddress" json:"proposer,omitempty" yaml:"proposer"` -} - -func (m *MsgUpsertTokenRate) Reset() { *m = MsgUpsertTokenRate{} } -func (m *MsgUpsertTokenRate) String() string { return proto.CompactTextString(m) } -func (*MsgUpsertTokenRate) ProtoMessage() {} -func (*MsgUpsertTokenRate) Descriptor() ([]byte, []int) { - return fileDescriptor_d415c64b17c96dda, []int{1} -} -func (m *MsgUpsertTokenRate) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MsgUpsertTokenRate) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgUpsertTokenRate.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *MsgUpsertTokenRate) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgUpsertTokenRate.Merge(m, src) -} -func (m *MsgUpsertTokenRate) XXX_Size() int { - return m.Size() -} -func (m *MsgUpsertTokenRate) XXX_DiscardUnknown() { - xxx_messageInfo_MsgUpsertTokenRate.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgUpsertTokenRate proto.InternalMessageInfo - -func (m *MsgUpsertTokenRate) GetDenom() string { - if m != nil { - return m.Denom - } - return "" -} - -func (m *MsgUpsertTokenRate) GetFeePayments() bool { - if m != nil { - return m.FeePayments - } - return false -} - -func (m *MsgUpsertTokenRate) GetStakeToken() bool { - if m != nil { - return m.StakeToken - } - return false -} - -func (m *MsgUpsertTokenRate) GetInvalidated() bool { - if m != nil { - return m.Invalidated - } - return false -} - -func (m *MsgUpsertTokenRate) GetProposer() github_com_cosmos_cosmos_sdk_types.AccAddress { - if m != nil { - return m.Proposer - } - return nil -} - -func init() { - proto.RegisterType((*TokenRate)(nil), "kira.tokens.TokenRate") - proto.RegisterType((*MsgUpsertTokenRate)(nil), "kira.tokens.MsgUpsertTokenRate") -} - -func init() { proto.RegisterFile("kira/tokens/rate.proto", fileDescriptor_d415c64b17c96dda) } - -var fileDescriptor_d415c64b17c96dda = []byte{ - // 430 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x94, 0xb1, 0x6e, 0xd4, 0x30, - 0x18, 0xc7, 0x2f, 0xf4, 0xda, 0xe6, 0x9c, 0x4a, 0x20, 0xab, 0x42, 0x16, 0x43, 0x72, 0x64, 0x40, - 0x59, 0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, 0x7c, 0xc9, 0x14, 0x3d, 0x16, - 0x0a, 0x32, 0x0d, 0x0d, 0x65, 0xd9, 0x97, 0xe1, 0x7e, 0xb0, 0xc2, 0x67, 0x7b, 0xf6, 0xf7, 0x7f, - 0xfa, 0x37, 0x00, 0x00, 0xff, 0xff, 0xf6, 0xd1, 0xe1, 0x89, 0x3b, 0x04, 0x00, 0x00, -} - -func (m *TokenRate) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *TokenRate) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *TokenRate) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Invalidated { - i-- - if m.Invalidated { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x38 - } - if m.StakeToken { - i-- - if m.StakeToken { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x30 - } - { - size := m.StakeMin.Size() - i -= size - if _, err := m.StakeMin.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintRate(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x2a - { - size := m.StakeCap.Size() - i -= size - if _, err := m.StakeCap.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintRate(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - if m.FeePayments { - i-- - if m.FeePayments { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x18 - } - { - size := m.FeeRate.Size() - i -= size - if _, err := m.FeeRate.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintRate(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - if len(m.Denom) > 0 { - i -= len(m.Denom) - copy(dAtA[i:], m.Denom) - i = encodeVarintRate(dAtA, i, uint64(len(m.Denom))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *MsgUpsertTokenRate) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *MsgUpsertTokenRate) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MsgUpsertTokenRate) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Proposer) > 0 { - i -= len(m.Proposer) - copy(dAtA[i:], m.Proposer) - i = encodeVarintRate(dAtA, i, uint64(len(m.Proposer))) - i-- - dAtA[i] = 0x42 - } - if m.Invalidated { - i-- - if m.Invalidated { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x38 - } - if m.StakeToken { - i-- - if m.StakeToken { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x30 - } - { - size := m.StakeMin.Size() - i -= size - if _, err := m.StakeMin.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintRate(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x2a - { - size := m.StakeCap.Size() - i -= size - if _, err := m.StakeCap.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintRate(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - if m.FeePayments { - i-- - if m.FeePayments { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x18 - } - { - size := m.Rate.Size() - i -= size - if _, err := m.Rate.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintRate(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - if len(m.Denom) > 0 { - i -= len(m.Denom) - copy(dAtA[i:], m.Denom) - i = encodeVarintRate(dAtA, i, uint64(len(m.Denom))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func encodeVarintRate(dAtA []byte, offset int, v uint64) int { - offset -= sovRate(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *TokenRate) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Denom) - if l > 0 { - n += 1 + l + sovRate(uint64(l)) - } - l = m.FeeRate.Size() - n += 1 + l + sovRate(uint64(l)) - if m.FeePayments { - n += 2 - } - l = m.StakeCap.Size() - n += 1 + l + sovRate(uint64(l)) - l = m.StakeMin.Size() - n += 1 + l + sovRate(uint64(l)) - if m.StakeToken { - n += 2 - } - if m.Invalidated { - n += 2 - } - return n -} - -func (m *MsgUpsertTokenRate) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Denom) - if l > 0 { - n += 1 + l + sovRate(uint64(l)) - } - l = m.Rate.Size() - n += 1 + l + sovRate(uint64(l)) - if m.FeePayments { - n += 2 - } - l = m.StakeCap.Size() - n += 1 + l + sovRate(uint64(l)) - l = m.StakeMin.Size() - n += 1 + l + sovRate(uint64(l)) - if m.StakeToken { - n += 2 - } - if m.Invalidated { - n += 2 - } - l = len(m.Proposer) - if l > 0 { - n += 1 + l + sovRate(uint64(l)) - } - return n -} - -func sovRate(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozRate(x uint64) (n int) { - return sovRate(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *TokenRate) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRate - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: TokenRate: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: TokenRate: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Denom", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRate - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthRate - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthRate - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Denom = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FeeRate", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRate - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthRate - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthRate - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.FeeRate.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FeePayments", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRate - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.FeePayments = bool(v != 0) - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StakeCap", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRate - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthRate - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthRate - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.StakeCap.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StakeMin", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRate - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthRate - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthRate - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.StakeMin.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field StakeToken", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRate - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.StakeToken = bool(v != 0) - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Invalidated", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRate - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Invalidated = bool(v != 0) - default: - iNdEx = preIndex - skippy, err := skipRate(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthRate - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *MsgUpsertTokenRate) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRate - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: MsgUpsertTokenRate: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgUpsertTokenRate: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Denom", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRate - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthRate - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthRate - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Denom = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Rate", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRate - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthRate - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthRate - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Rate.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FeePayments", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRate - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.FeePayments = bool(v != 0) - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StakeCap", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRate - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthRate - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthRate - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.StakeCap.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StakeMin", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRate - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthRate - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthRate - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.StakeMin.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field StakeToken", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRate - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.StakeToken = bool(v != 0) - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Invalidated", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRate - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Invalidated = bool(v != 0) - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Proposer", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowRate - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthRate - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthRate - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Proposer = append(m.Proposer[:0], dAtA[iNdEx:postIndex]...) - if m.Proposer == nil { - m.Proposer = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipRate(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthRate - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipRate(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowRate - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowRate - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowRate - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthRate - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupRate - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthRate - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthRate = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowRate = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupRate = fmt.Errorf("proto: unexpected end of group") -) diff --git a/x/tokens/types/token.pb.go b/x/tokens/types/token.pb.go new file mode 100644 index 000000000..135abe026 --- /dev/null +++ b/x/tokens/types/token.pb.go @@ -0,0 +1,1385 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: kira/tokens/token.proto + +package types + +import ( + fmt "fmt" + github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" + io "io" + math "math" + math_bits "math/bits" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +type TokenInfo struct { + Denom string `protobuf:"bytes,1,opt,name=denom,proto3" json:"denom,omitempty"` + TokenType string `protobuf:"bytes,2,opt,name=token_type,json=tokenType,proto3" json:"token_type,omitempty"` + FeeRate github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,3,opt,name=fee_rate,json=feeRate,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"fee_rate"` + FeeEnabled bool `protobuf:"varint,4,opt,name=fee_enabled,json=feeEnabled,proto3" json:"fee_enabled,omitempty"` + Supply github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,5,opt,name=supply,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"supply"` + SupplyCap github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,6,opt,name=supply_cap,json=supplyCap,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"supply_cap"` + StakeCap github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,7,opt,name=stake_cap,json=stakeCap,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"stake_cap" yaml:"stake_cap"` + StakeMin github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,8,opt,name=stake_min,json=stakeMin,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"stake_min" yaml:"stake_min"` + StakeEnabled bool `protobuf:"varint,9,opt,name=stake_enabled,json=stakeEnabled,proto3" json:"stake_enabled,omitempty"` + Inactive bool `protobuf:"varint,10,opt,name=inactive,proto3" json:"inactive,omitempty"` + Symbol string `protobuf:"bytes,11,opt,name=symbol,proto3" json:"symbol,omitempty"` + Name string `protobuf:"bytes,12,opt,name=name,proto3" json:"name,omitempty"` + Icon string `protobuf:"bytes,13,opt,name=icon,proto3" json:"icon,omitempty"` + Decimals uint32 `protobuf:"varint,14,opt,name=decimals,proto3" json:"decimals,omitempty"` + Description string `protobuf:"bytes,15,opt,name=description,proto3" json:"description,omitempty"` + Website string `protobuf:"bytes,16,opt,name=website,proto3" json:"website,omitempty"` + Social string `protobuf:"bytes,17,opt,name=social,proto3" json:"social,omitempty"` + Holders uint64 `protobuf:"varint,18,opt,name=holders,proto3" json:"holders,omitempty"` + MintingFee github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,19,opt,name=minting_fee,json=mintingFee,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"minting_fee"` + Owner string `protobuf:"bytes,20,opt,name=owner,proto3" json:"owner,omitempty"` + OwnerEditDisabled bool `protobuf:"varint,21,opt,name=owner_edit_disabled,json=ownerEditDisabled,proto3" json:"owner_edit_disabled,omitempty"` + NftMetadata string `protobuf:"bytes,22,opt,name=nft_metadata,json=nftMetadata,proto3" json:"nft_metadata,omitempty"` + NftHash string `protobuf:"bytes,23,opt,name=nft_hash,json=nftHash,proto3" json:"nft_hash,omitempty"` +} + +func (m *TokenInfo) Reset() { *m = TokenInfo{} } +func (m *TokenInfo) String() string { return proto.CompactTextString(m) } +func (*TokenInfo) ProtoMessage() {} +func (*TokenInfo) Descriptor() ([]byte, []int) { + return fileDescriptor_0ed83e3668468753, []int{0} +} +func (m *TokenInfo) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *TokenInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_TokenInfo.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *TokenInfo) XXX_Merge(src proto.Message) { + xxx_messageInfo_TokenInfo.Merge(m, src) +} +func (m *TokenInfo) XXX_Size() int { + return m.Size() +} +func (m *TokenInfo) XXX_DiscardUnknown() { + xxx_messageInfo_TokenInfo.DiscardUnknown(m) +} + +var xxx_messageInfo_TokenInfo proto.InternalMessageInfo + +func (m *TokenInfo) GetDenom() string { + if m != nil { + return m.Denom + } + return "" +} + +func (m *TokenInfo) GetTokenType() string { + if m != nil { + return m.TokenType + } + return "" +} + +func (m *TokenInfo) GetFeeEnabled() bool { + if m != nil { + return m.FeeEnabled + } + return false +} + +func (m *TokenInfo) GetStakeEnabled() bool { + if m != nil { + return m.StakeEnabled + } + return false +} + +func (m *TokenInfo) GetInactive() bool { + if m != nil { + return m.Inactive + } + return false +} + +func (m *TokenInfo) GetSymbol() string { + if m != nil { + return m.Symbol + } + return "" +} + +func (m *TokenInfo) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +func (m *TokenInfo) GetIcon() string { + if m != nil { + return m.Icon + } + return "" +} + +func (m *TokenInfo) GetDecimals() uint32 { + if m != nil { + return m.Decimals + } + return 0 +} + +func (m *TokenInfo) GetDescription() string { + if m != nil { + return m.Description + } + return "" +} + +func (m *TokenInfo) GetWebsite() string { + if m != nil { + return m.Website + } + return "" +} + +func (m *TokenInfo) GetSocial() string { + if m != nil { + return m.Social + } + return "" +} + +func (m *TokenInfo) GetHolders() uint64 { + if m != nil { + return m.Holders + } + return 0 +} + +func (m *TokenInfo) GetOwner() string { + if m != nil { + return m.Owner + } + return "" +} + +func (m *TokenInfo) GetOwnerEditDisabled() bool { + if m != nil { + return m.OwnerEditDisabled + } + return false +} + +func (m *TokenInfo) GetNftMetadata() string { + if m != nil { + return m.NftMetadata + } + return "" +} + +func (m *TokenInfo) GetNftHash() string { + if m != nil { + return m.NftHash + } + return "" +} + +func init() { + proto.RegisterType((*TokenInfo)(nil), "kira.tokens.TokenInfo") +} + +func init() { proto.RegisterFile("kira/tokens/token.proto", fileDescriptor_0ed83e3668468753) } + +var fileDescriptor_0ed83e3668468753 = []byte{ + // 578 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x54, 0x4f, 0x6f, 0xd3, 0x30, + 0x1c, 0x6d, 0x60, 0x6b, 0x9b, 0x5f, 0x37, 0xd8, 0xbc, 0xb1, 0x99, 0x49, 0xa4, 0x65, 0x48, 0xa8, + 0x17, 0x92, 0x03, 0x37, 0x8e, 0xdd, 0x1f, 0x51, 0xa1, 0x09, 0x29, 0xda, 0x89, 0x4b, 0xe4, 0x26, + 0xbf, 0xb4, 0x56, 0x13, 0x3b, 0x8a, 0x3d, 0x46, 0xbf, 0x05, 0x1f, 0x6b, 0xc7, 0x1d, 0x11, 0x87, + 0x09, 0x6d, 0xe2, 0x0b, 0xf0, 0x09, 0x90, 0xed, 0xb4, 0x1a, 0xdc, 0xb6, 0x93, 0x7f, 0xef, 0x3d, + 0xfb, 0xfd, 0xec, 0x27, 0xdb, 0xb0, 0x3f, 0xe7, 0x35, 0x8b, 0xb4, 0x9c, 0xa3, 0x50, 0x6e, 0x08, + 0xab, 0x5a, 0x6a, 0x49, 0x7a, 0x46, 0x08, 0x9d, 0x70, 0xb0, 0x3b, 0x95, 0x53, 0x69, 0xf9, 0xc8, + 0x54, 0x6e, 0xca, 0xe1, 0xef, 0x0e, 0xf8, 0xe7, 0x66, 0xc2, 0x58, 0xe4, 0x92, 0xec, 0xc2, 0x7a, + 0x86, 0x42, 0x96, 0xd4, 0x1b, 0x78, 0x43, 0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, 0x01, 0x74, 0xb9, + 0x60, 0xa9, 0xe6, 0x5f, 0x91, 0x82, 0xd5, 0x57, 0x98, 0xec, 0x41, 0x5b, 0x2d, 0xca, 0x89, 0x2c, + 0x68, 0xcf, 0x5e, 0x90, 0x06, 0x11, 0x02, 0x6b, 0x82, 0x95, 0x48, 0x37, 0x2c, 0x6b, 0x6b, 0xc3, + 0xf1, 0x54, 0x0a, 0xba, 0xe9, 0x38, 0x53, 0x1b, 0xef, 0x0c, 0x53, 0x5e, 0xb2, 0x42, 0xd1, 0x67, + 0x03, 0x6f, 0xb8, 0x19, 0xaf, 0x30, 0x19, 0x40, 0x2f, 0x43, 0x95, 0xd6, 0xbc, 0xd2, 0x5c, 0x0a, + 0xfa, 0xdc, 0x2e, 0xbb, 0x4f, 0x11, 0x0a, 0x9d, 0x4b, 0x9c, 0x28, 0xae, 0x91, 0x6e, 0x59, 0x75, + 0x09, 0xed, 0xbe, 0x64, 0xca, 0x59, 0x41, 0xb7, 0x9b, 0x7d, 0x59, 0x64, 0x56, 0xcc, 0x64, 0x91, + 0x61, 0xad, 0x28, 0x19, 0x78, 0xc3, 0xb5, 0x78, 0x09, 0xc9, 0x67, 0xe8, 0x95, 0x5c, 0x68, 0x2e, + 0xa6, 0x49, 0x8e, 0x48, 0x77, 0x1e, 0x75, 0x39, 0xa0, 0xb1, 0x38, 0x45, 0x34, 0xaf, 0x4a, 0x5e, + 0x0a, 0xac, 0xe9, 0xae, 0x7b, 0x55, 0x16, 0x90, 0x10, 0x76, 0x6c, 0x91, 0x60, 0xc6, 0x75, 0x92, + 0x71, 0xe5, 0x72, 0x7f, 0x61, 0x73, 0xdd, 0xb6, 0xd2, 0x49, 0xc6, 0xf5, 0x71, 0x23, 0x90, 0xd7, + 0xb0, 0x21, 0x72, 0x9d, 0x94, 0xa8, 0x59, 0xc6, 0x34, 0xa3, 0x7b, 0x2e, 0x05, 0x91, 0xeb, 0xb3, + 0x86, 0x22, 0x2f, 0xa1, 0x6b, 0xa6, 0xcc, 0x98, 0x9a, 0xd1, 0x7d, 0x17, 0x83, 0xc8, 0xf5, 0x47, + 0xa6, 0x66, 0xa3, 0xd1, 0xd5, 0x6d, 0xe0, 0x5d, 0xdf, 0x06, 0xde, 0xaf, 0xdb, 0xc0, 0xfb, 0x7e, + 0x17, 0xb4, 0xae, 0xef, 0x82, 0xd6, 0x8f, 0xbb, 0xa0, 0xf5, 0x65, 0x78, 0xef, 0x44, 0x9f, 0x78, + 0xcd, 0x8e, 0x64, 0x8d, 0x91, 0xc2, 0x39, 0xe3, 0xd1, 0xb7, 0xd5, 0xa7, 0x62, 0xce, 0x35, 0x69, + 0xdb, 0x2f, 0xe3, 0xfd, 0xdf, 0x00, 0x00, 0x00, 0xff, 0xff, 0x09, 0x1a, 0x25, 0x8f, 0x70, 0x04, + 0x00, 0x00, +} + +func (m *TokenInfo) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *TokenInfo) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *TokenInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.NftHash) > 0 { + i -= len(m.NftHash) + copy(dAtA[i:], m.NftHash) + i = encodeVarintToken(dAtA, i, uint64(len(m.NftHash))) + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0xba + } + if len(m.NftMetadata) > 0 { + i -= len(m.NftMetadata) + copy(dAtA[i:], m.NftMetadata) + i = encodeVarintToken(dAtA, i, uint64(len(m.NftMetadata))) + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0xb2 + } + if m.OwnerEditDisabled { + i-- + if m.OwnerEditDisabled { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0xa8 + } + if len(m.Owner) > 0 { + i -= len(m.Owner) + copy(dAtA[i:], m.Owner) + i = encodeVarintToken(dAtA, i, uint64(len(m.Owner))) + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0xa2 + } + { + size := m.MintingFee.Size() + i -= size + if _, err := m.MintingFee.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintToken(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0x9a + if m.Holders != 0 { + i = encodeVarintToken(dAtA, i, uint64(m.Holders)) + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0x90 + } + if len(m.Social) > 0 { + i -= len(m.Social) + copy(dAtA[i:], m.Social) + i = encodeVarintToken(dAtA, i, uint64(len(m.Social))) + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0x8a + } + if len(m.Website) > 0 { + i -= len(m.Website) + copy(dAtA[i:], m.Website) + i = encodeVarintToken(dAtA, i, uint64(len(m.Website))) + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0x82 + } + if len(m.Description) > 0 { + i -= len(m.Description) + copy(dAtA[i:], m.Description) + i = encodeVarintToken(dAtA, i, uint64(len(m.Description))) + i-- + dAtA[i] = 0x7a + } + if m.Decimals != 0 { + i = encodeVarintToken(dAtA, i, uint64(m.Decimals)) + i-- + dAtA[i] = 0x70 + } + if len(m.Icon) > 0 { + i -= len(m.Icon) + copy(dAtA[i:], m.Icon) + i = encodeVarintToken(dAtA, i, uint64(len(m.Icon))) + i-- + dAtA[i] = 0x6a + } + if len(m.Name) > 0 { + i -= len(m.Name) + copy(dAtA[i:], m.Name) + i = encodeVarintToken(dAtA, i, uint64(len(m.Name))) + i-- + dAtA[i] = 0x62 + } + if len(m.Symbol) > 0 { + i -= len(m.Symbol) + copy(dAtA[i:], m.Symbol) + i = encodeVarintToken(dAtA, i, uint64(len(m.Symbol))) + i-- + dAtA[i] = 0x5a + } + if m.Inactive { + i-- + if m.Inactive { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x50 + } + if m.StakeEnabled { + i-- + if m.StakeEnabled { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x48 + } + { + size := m.StakeMin.Size() + i -= size + if _, err := m.StakeMin.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintToken(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x42 + { + size := m.StakeCap.Size() + i -= size + if _, err := m.StakeCap.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintToken(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x3a + { + size := m.SupplyCap.Size() + i -= size + if _, err := m.SupplyCap.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintToken(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x32 + { + size := m.Supply.Size() + i -= size + if _, err := m.Supply.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintToken(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x2a + if m.FeeEnabled { + i-- + if m.FeeEnabled { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x20 + } + { + size := m.FeeRate.Size() + i -= size + if _, err := m.FeeRate.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintToken(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + if len(m.TokenType) > 0 { + i -= len(m.TokenType) + copy(dAtA[i:], m.TokenType) + i = encodeVarintToken(dAtA, i, uint64(len(m.TokenType))) + i-- + dAtA[i] = 0x12 + } + if len(m.Denom) > 0 { + i -= len(m.Denom) + copy(dAtA[i:], m.Denom) + i = encodeVarintToken(dAtA, i, uint64(len(m.Denom))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func encodeVarintToken(dAtA []byte, offset int, v uint64) int { + offset -= sovToken(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *TokenInfo) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Denom) + if l > 0 { + n += 1 + l + sovToken(uint64(l)) + } + l = len(m.TokenType) + if l > 0 { + n += 1 + l + sovToken(uint64(l)) + } + l = m.FeeRate.Size() + n += 1 + l + sovToken(uint64(l)) + if m.FeeEnabled { + n += 2 + } + l = m.Supply.Size() + n += 1 + l + sovToken(uint64(l)) + l = m.SupplyCap.Size() + n += 1 + l + sovToken(uint64(l)) + l = m.StakeCap.Size() + n += 1 + l + sovToken(uint64(l)) + l = m.StakeMin.Size() + n += 1 + l + sovToken(uint64(l)) + if m.StakeEnabled { + n += 2 + } + if m.Inactive { + n += 2 + } + l = len(m.Symbol) + if l > 0 { + n += 1 + l + sovToken(uint64(l)) + } + l = len(m.Name) + if l > 0 { + n += 1 + l + sovToken(uint64(l)) + } + l = len(m.Icon) + if l > 0 { + n += 1 + l + sovToken(uint64(l)) + } + if m.Decimals != 0 { + n += 1 + sovToken(uint64(m.Decimals)) + } + l = len(m.Description) + if l > 0 { + n += 1 + l + sovToken(uint64(l)) + } + l = len(m.Website) + if l > 0 { + n += 2 + l + sovToken(uint64(l)) + } + l = len(m.Social) + if l > 0 { + n += 2 + l + sovToken(uint64(l)) + } + if m.Holders != 0 { + n += 2 + sovToken(uint64(m.Holders)) + } + l = m.MintingFee.Size() + n += 2 + l + sovToken(uint64(l)) + l = len(m.Owner) + if l > 0 { + n += 2 + l + sovToken(uint64(l)) + } + if m.OwnerEditDisabled { + n += 3 + } + l = len(m.NftMetadata) + if l > 0 { + n += 2 + l + sovToken(uint64(l)) + } + l = len(m.NftHash) + if l > 0 { + n += 2 + l + sovToken(uint64(l)) + } + return n +} + +func sovToken(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozToken(x uint64) (n int) { + return sovToken(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *TokenInfo) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowToken + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: TokenInfo: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: TokenInfo: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Denom", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowToken + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthToken + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthToken + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Denom = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TokenType", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowToken + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthToken + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthToken + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.TokenType = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FeeRate", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowToken + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthToken + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthToken + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.FeeRate.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field FeeEnabled", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowToken + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.FeeEnabled = bool(v != 0) + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Supply", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowToken + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthToken + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthToken + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Supply.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SupplyCap", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowToken + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthToken + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthToken + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.SupplyCap.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StakeCap", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowToken + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthToken + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthToken + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.StakeCap.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StakeMin", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowToken + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthToken + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthToken + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.StakeMin.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 9: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field StakeEnabled", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowToken + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.StakeEnabled = bool(v != 0) + case 10: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Inactive", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowToken + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.Inactive = bool(v != 0) + case 11: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Symbol", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowToken + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthToken + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthToken + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Symbol = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 12: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowToken + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthToken + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthToken + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Name = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 13: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Icon", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowToken + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthToken + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthToken + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Icon = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 14: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Decimals", wireType) + } + m.Decimals = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowToken + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Decimals |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 15: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Description", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowToken + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthToken + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthToken + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Description = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 16: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Website", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowToken + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthToken + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthToken + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Website = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 17: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Social", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowToken + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthToken + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthToken + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Social = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 18: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Holders", wireType) + } + m.Holders = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowToken + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Holders |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 19: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MintingFee", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowToken + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthToken + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthToken + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.MintingFee.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 20: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Owner", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowToken + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthToken + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthToken + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Owner = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 21: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field OwnerEditDisabled", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowToken + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.OwnerEditDisabled = bool(v != 0) + case 22: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NftMetadata", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowToken + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthToken + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthToken + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.NftMetadata = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 23: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NftHash", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowToken + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthToken + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthToken + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.NftHash = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipToken(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthToken + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipToken(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowToken + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowToken + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowToken + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthToken + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupToken + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthToken + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthToken = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowToken = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupToken = fmt.Errorf("proto: unexpected end of group") +) diff --git a/x/tokens/types/tx.pb.go b/x/tokens/types/tx.pb.go index 13e4e5382..ece8c92f0 100644 --- a/x/tokens/types/tx.pb.go +++ b/x/tokens/types/tx.pb.go @@ -6,6 +6,7 @@ package types import ( context "context" fmt "fmt" + github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" _ "github.com/cosmos/gogoproto/gogoproto" grpc1 "github.com/cosmos/gogoproto/grpc" proto "github.com/cosmos/gogoproto/proto" @@ -28,21 +29,45 @@ var _ = math.Inf // proto package needs to be updated. const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package -type MsgUpsertTokenAliasResponse struct { +type MsgUpsertTokenInfo struct { + Denom string `protobuf:"bytes,1,opt,name=denom,proto3" json:"denom,omitempty"` + TokenType string `protobuf:"bytes,2,opt,name=token_type,json=tokenType,proto3" json:"token_type,omitempty"` + FeeRate github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,3,opt,name=fee_rate,json=feeRate,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"fee_rate"` + FeeEnabled bool `protobuf:"varint,4,opt,name=fee_enabled,json=feeEnabled,proto3" json:"fee_enabled,omitempty"` + Supply github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,5,opt,name=supply,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"supply"` + SupplyCap github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,6,opt,name=supply_cap,json=supplyCap,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"supply_cap"` + StakeCap github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,7,opt,name=stake_cap,json=stakeCap,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"stake_cap" yaml:"stake_cap"` + StakeMin github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,8,opt,name=stake_min,json=stakeMin,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"stake_min" yaml:"stake_min"` + StakeEnabled bool `protobuf:"varint,9,opt,name=stake_enabled,json=stakeEnabled,proto3" json:"stake_enabled,omitempty"` + Inactive bool `protobuf:"varint,10,opt,name=inactive,proto3" json:"inactive,omitempty"` + Symbol string `protobuf:"bytes,11,opt,name=symbol,proto3" json:"symbol,omitempty"` + Name string `protobuf:"bytes,12,opt,name=name,proto3" json:"name,omitempty"` + Icon string `protobuf:"bytes,13,opt,name=icon,proto3" json:"icon,omitempty"` + Decimals uint32 `protobuf:"varint,14,opt,name=decimals,proto3" json:"decimals,omitempty"` + Description string `protobuf:"bytes,15,opt,name=description,proto3" json:"description,omitempty"` + Website string `protobuf:"bytes,16,opt,name=website,proto3" json:"website,omitempty"` + Social string `protobuf:"bytes,17,opt,name=social,proto3" json:"social,omitempty"` + Holders uint64 `protobuf:"varint,18,opt,name=holders,proto3" json:"holders,omitempty"` + MintingFee github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,19,opt,name=minting_fee,json=mintingFee,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"minting_fee"` + Owner string `protobuf:"bytes,20,opt,name=owner,proto3" json:"owner,omitempty"` + OwnerEditDisabled bool `protobuf:"varint,21,opt,name=owner_edit_disabled,json=ownerEditDisabled,proto3" json:"owner_edit_disabled,omitempty"` + NftMetadata string `protobuf:"bytes,22,opt,name=nft_metadata,json=nftMetadata,proto3" json:"nft_metadata,omitempty"` + NftHash string `protobuf:"bytes,23,opt,name=nft_hash,json=nftHash,proto3" json:"nft_hash,omitempty"` + Proposer github_com_cosmos_cosmos_sdk_types.AccAddress `protobuf:"bytes,24,opt,name=proposer,proto3,casttype=github.com/cosmos/cosmos-sdk/types.AccAddress" json:"proposer,omitempty" yaml:"proposer"` } -func (m *MsgUpsertTokenAliasResponse) Reset() { *m = MsgUpsertTokenAliasResponse{} } -func (m *MsgUpsertTokenAliasResponse) String() string { return proto.CompactTextString(m) } -func (*MsgUpsertTokenAliasResponse) ProtoMessage() {} -func (*MsgUpsertTokenAliasResponse) Descriptor() ([]byte, []int) { +func (m *MsgUpsertTokenInfo) Reset() { *m = MsgUpsertTokenInfo{} } +func (m *MsgUpsertTokenInfo) String() string { return proto.CompactTextString(m) } +func (*MsgUpsertTokenInfo) ProtoMessage() {} +func (*MsgUpsertTokenInfo) Descriptor() ([]byte, []int) { return fileDescriptor_9bac5a72e1a3117c, []int{0} } -func (m *MsgUpsertTokenAliasResponse) XXX_Unmarshal(b []byte) error { +func (m *MsgUpsertTokenInfo) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *MsgUpsertTokenAliasResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *MsgUpsertTokenInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_MsgUpsertTokenAliasResponse.Marshal(b, m, deterministic) + return xxx_messageInfo_MsgUpsertTokenInfo.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -52,33 +77,263 @@ func (m *MsgUpsertTokenAliasResponse) XXX_Marshal(b []byte, deterministic bool) return b[:n], nil } } -func (m *MsgUpsertTokenAliasResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgUpsertTokenAliasResponse.Merge(m, src) +func (m *MsgUpsertTokenInfo) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgUpsertTokenInfo.Merge(m, src) } -func (m *MsgUpsertTokenAliasResponse) XXX_Size() int { +func (m *MsgUpsertTokenInfo) XXX_Size() int { return m.Size() } -func (m *MsgUpsertTokenAliasResponse) XXX_DiscardUnknown() { - xxx_messageInfo_MsgUpsertTokenAliasResponse.DiscardUnknown(m) +func (m *MsgUpsertTokenInfo) XXX_DiscardUnknown() { + xxx_messageInfo_MsgUpsertTokenInfo.DiscardUnknown(m) } -var xxx_messageInfo_MsgUpsertTokenAliasResponse proto.InternalMessageInfo +var xxx_messageInfo_MsgUpsertTokenInfo proto.InternalMessageInfo -type MsgUpsertTokenRateResponse struct { +func (m *MsgUpsertTokenInfo) GetDenom() string { + if m != nil { + return m.Denom + } + return "" +} + +func (m *MsgUpsertTokenInfo) GetTokenType() string { + if m != nil { + return m.TokenType + } + return "" +} + +func (m *MsgUpsertTokenInfo) GetFeeEnabled() bool { + if m != nil { + return m.FeeEnabled + } + return false +} + +func (m *MsgUpsertTokenInfo) GetStakeEnabled() bool { + if m != nil { + return m.StakeEnabled + } + return false +} + +func (m *MsgUpsertTokenInfo) GetInactive() bool { + if m != nil { + return m.Inactive + } + return false +} + +func (m *MsgUpsertTokenInfo) GetSymbol() string { + if m != nil { + return m.Symbol + } + return "" +} + +func (m *MsgUpsertTokenInfo) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +func (m *MsgUpsertTokenInfo) GetIcon() string { + if m != nil { + return m.Icon + } + return "" +} + +func (m *MsgUpsertTokenInfo) GetDecimals() uint32 { + if m != nil { + return m.Decimals + } + return 0 +} + +func (m *MsgUpsertTokenInfo) GetDescription() string { + if m != nil { + return m.Description + } + return "" +} + +func (m *MsgUpsertTokenInfo) GetWebsite() string { + if m != nil { + return m.Website + } + return "" +} + +func (m *MsgUpsertTokenInfo) GetSocial() string { + if m != nil { + return m.Social + } + return "" +} + +func (m *MsgUpsertTokenInfo) GetHolders() uint64 { + if m != nil { + return m.Holders + } + return 0 +} + +func (m *MsgUpsertTokenInfo) GetOwner() string { + if m != nil { + return m.Owner + } + return "" +} + +func (m *MsgUpsertTokenInfo) GetOwnerEditDisabled() bool { + if m != nil { + return m.OwnerEditDisabled + } + return false +} + +func (m *MsgUpsertTokenInfo) GetNftMetadata() string { + if m != nil { + return m.NftMetadata + } + return "" +} + +func (m *MsgUpsertTokenInfo) GetNftHash() string { + if m != nil { + return m.NftHash + } + return "" +} + +func (m *MsgUpsertTokenInfo) GetProposer() github_com_cosmos_cosmos_sdk_types.AccAddress { + if m != nil { + return m.Proposer + } + return nil +} + +type MsgUpsertTokenInfoResponse struct { } -func (m *MsgUpsertTokenRateResponse) Reset() { *m = MsgUpsertTokenRateResponse{} } -func (m *MsgUpsertTokenRateResponse) String() string { return proto.CompactTextString(m) } -func (*MsgUpsertTokenRateResponse) ProtoMessage() {} -func (*MsgUpsertTokenRateResponse) Descriptor() ([]byte, []int) { +func (m *MsgUpsertTokenInfoResponse) Reset() { *m = MsgUpsertTokenInfoResponse{} } +func (m *MsgUpsertTokenInfoResponse) String() string { return proto.CompactTextString(m) } +func (*MsgUpsertTokenInfoResponse) ProtoMessage() {} +func (*MsgUpsertTokenInfoResponse) Descriptor() ([]byte, []int) { return fileDescriptor_9bac5a72e1a3117c, []int{1} } -func (m *MsgUpsertTokenRateResponse) XXX_Unmarshal(b []byte) error { +func (m *MsgUpsertTokenInfoResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgUpsertTokenInfoResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgUpsertTokenInfoResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgUpsertTokenInfoResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgUpsertTokenInfoResponse.Merge(m, src) +} +func (m *MsgUpsertTokenInfoResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgUpsertTokenInfoResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgUpsertTokenInfoResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgUpsertTokenInfoResponse proto.InternalMessageInfo + +type MsgEthereumTx struct { + TxType string `protobuf:"bytes,1,opt,name=tx_type,json=txType,proto3" json:"tx_type,omitempty"` + Sender string `protobuf:"bytes,2,opt,name=sender,proto3" json:"sender,omitempty"` + Hash string `protobuf:"bytes,3,opt,name=hash,proto3" json:"hash,omitempty"` + Data []byte `protobuf:"bytes,4,opt,name=data,proto3" json:"data,omitempty"` +} + +func (m *MsgEthereumTx) Reset() { *m = MsgEthereumTx{} } +func (m *MsgEthereumTx) String() string { return proto.CompactTextString(m) } +func (*MsgEthereumTx) ProtoMessage() {} +func (*MsgEthereumTx) Descriptor() ([]byte, []int) { + return fileDescriptor_9bac5a72e1a3117c, []int{2} +} +func (m *MsgEthereumTx) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgEthereumTx) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgEthereumTx.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgEthereumTx) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgEthereumTx.Merge(m, src) +} +func (m *MsgEthereumTx) XXX_Size() int { + return m.Size() +} +func (m *MsgEthereumTx) XXX_DiscardUnknown() { + xxx_messageInfo_MsgEthereumTx.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgEthereumTx proto.InternalMessageInfo + +func (m *MsgEthereumTx) GetTxType() string { + if m != nil { + return m.TxType + } + return "" +} + +func (m *MsgEthereumTx) GetSender() string { + if m != nil { + return m.Sender + } + return "" +} + +func (m *MsgEthereumTx) GetHash() string { + if m != nil { + return m.Hash + } + return "" +} + +func (m *MsgEthereumTx) GetData() []byte { + if m != nil { + return m.Data + } + return nil +} + +type MsgEthereumTxResponse struct { +} + +func (m *MsgEthereumTxResponse) Reset() { *m = MsgEthereumTxResponse{} } +func (m *MsgEthereumTxResponse) String() string { return proto.CompactTextString(m) } +func (*MsgEthereumTxResponse) ProtoMessage() {} +func (*MsgEthereumTxResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_9bac5a72e1a3117c, []int{3} +} +func (m *MsgEthereumTxResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *MsgUpsertTokenRateResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *MsgEthereumTxResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_MsgUpsertTokenRateResponse.Marshal(b, m, deterministic) + return xxx_messageInfo_MsgEthereumTxResponse.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -88,44 +343,78 @@ func (m *MsgUpsertTokenRateResponse) XXX_Marshal(b []byte, deterministic bool) ( return b[:n], nil } } -func (m *MsgUpsertTokenRateResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgUpsertTokenRateResponse.Merge(m, src) +func (m *MsgEthereumTxResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgEthereumTxResponse.Merge(m, src) } -func (m *MsgUpsertTokenRateResponse) XXX_Size() int { +func (m *MsgEthereumTxResponse) XXX_Size() int { return m.Size() } -func (m *MsgUpsertTokenRateResponse) XXX_DiscardUnknown() { - xxx_messageInfo_MsgUpsertTokenRateResponse.DiscardUnknown(m) +func (m *MsgEthereumTxResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgEthereumTxResponse.DiscardUnknown(m) } -var xxx_messageInfo_MsgUpsertTokenRateResponse proto.InternalMessageInfo +var xxx_messageInfo_MsgEthereumTxResponse proto.InternalMessageInfo func init() { - proto.RegisterType((*MsgUpsertTokenAliasResponse)(nil), "kira.tokens.MsgUpsertTokenAliasResponse") - proto.RegisterType((*MsgUpsertTokenRateResponse)(nil), "kira.tokens.MsgUpsertTokenRateResponse") + proto.RegisterType((*MsgUpsertTokenInfo)(nil), "kira.tokens.MsgUpsertTokenInfo") + proto.RegisterType((*MsgUpsertTokenInfoResponse)(nil), "kira.tokens.MsgUpsertTokenInfoResponse") + proto.RegisterType((*MsgEthereumTx)(nil), "kira.tokens.MsgEthereumTx") + proto.RegisterType((*MsgEthereumTxResponse)(nil), "kira.tokens.MsgEthereumTxResponse") } func init() { proto.RegisterFile("kira/tokens/tx.proto", fileDescriptor_9bac5a72e1a3117c) } var fileDescriptor_9bac5a72e1a3117c = []byte{ - // 264 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0xc9, 0xce, 0x2c, 0x4a, - 0xd4, 0x2f, 0xc9, 0xcf, 0x4e, 0xcd, 0x2b, 0xd6, 0x2f, 0xa9, 0xd0, 0x2b, 0x28, 0xca, 0x2f, 0xc9, - 0x17, 0xe2, 0x06, 0x89, 0xea, 0x41, 0x44, 0xa5, 0x44, 0xd2, 0xf3, 0xd3, 0xf3, 0xc1, 0xe2, 0xfa, - 0x20, 0x16, 0x44, 0x89, 0x94, 0x38, 0xb2, 0xc6, 0xc4, 0x9c, 0xcc, 0xc4, 0x62, 0xa8, 0x84, 0x14, - 0xb2, 0x44, 0x41, 0x51, 0x7e, 0x41, 0x7e, 0x71, 0x62, 0x0e, 0x54, 0x4e, 0x0c, 0x59, 0xae, 0x28, - 0xb1, 0x24, 0x15, 0x2a, 0x2e, 0x81, 0x2c, 0x9e, 0x56, 0x94, 0x9a, 0x5a, 0x05, 0x95, 0x51, 0x92, - 0xe5, 0x92, 0xf6, 0x2d, 0x4e, 0x0f, 0x2d, 0x28, 0x4e, 0x2d, 0x2a, 0x09, 0x01, 0xc9, 0x3b, 0x82, - 0xac, 0x0a, 0x4a, 0x2d, 0x2e, 0xc8, 0xcf, 0x2b, 0x4e, 0x55, 0x92, 0xe1, 0x92, 0x42, 0x95, 0x0e, - 0x4a, 0x2c, 0x49, 0x85, 0xc9, 0x1a, 0x1d, 0x62, 0xe4, 0x62, 0xf6, 0x2d, 0x4e, 0x17, 0x8a, 0xe3, - 0x12, 0x40, 0x37, 0x41, 0x48, 0x41, 0x0f, 0xc9, 0x8f, 0x7a, 0x58, 0xec, 0x90, 0xd2, 0x20, 0xa4, - 0x02, 0x66, 0x8f, 0x50, 0x34, 0x17, 0x3f, 0x9a, 0x13, 0x84, 0xe4, 0xf1, 0x68, 0x06, 0x29, 0x90, - 0x52, 0x27, 0xa0, 0x00, 0x66, 0xb8, 0x93, 0xd3, 0x89, 0x47, 0x72, 0x8c, 0x17, 0x1e, 0xc9, 0x31, - 0x3e, 0x78, 0x24, 0xc7, 0x38, 0xe1, 0xb1, 0x1c, 0xc3, 0x85, 0xc7, 0x72, 0x0c, 0x37, 0x1e, 0xcb, - 0x31, 0x44, 0x69, 0xa4, 0x67, 0x96, 0x64, 0x94, 0x26, 0xe9, 0x25, 0xe7, 0xe7, 0xea, 0x7b, 0x67, - 0x16, 0x25, 0x3a, 0xe7, 0x17, 0xa5, 0xea, 0x17, 0xa7, 0x66, 0x27, 0x66, 0xea, 0x57, 0xc0, 0xa3, - 0xb4, 0xb2, 0x20, 0xb5, 0x38, 0x89, 0x0d, 0x1c, 0x98, 0xc6, 0x80, 0x00, 0x00, 0x00, 0xff, 0xff, - 0x3c, 0xa0, 0x8a, 0xb7, 0xee, 0x01, 0x00, 0x00, + // 779 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x55, 0x41, 0x6f, 0x1b, 0x45, + 0x14, 0xce, 0x92, 0xd4, 0xb1, 0x9f, 0x1d, 0xd2, 0x4e, 0xd3, 0x66, 0xb0, 0xc0, 0x36, 0x8b, 0x04, + 0xbe, 0x74, 0x2d, 0xc1, 0x8d, 0x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a, 0x27, 0x00, + 0x00, 0xff, 0xff, 0x52, 0x92, 0xb4, 0x37, 0x7b, 0x06, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -140,10 +429,10 @@ const _ = grpc.SupportPackageIsVersion4 // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. type MsgClient interface { - // UpsertTokenAlias defines a method to upsert token alias - UpsertTokenAlias(ctx context.Context, in *MsgUpsertTokenAlias, opts ...grpc.CallOption) (*MsgUpsertTokenAliasResponse, error) - // UpsertTokenRate defines a method to upsert token rate - UpsertTokenRate(ctx context.Context, in *MsgUpsertTokenRate, opts ...grpc.CallOption) (*MsgUpsertTokenRateResponse, error) + // UpsertTokenInfo defines a method to upsert token rate + UpsertTokenInfo(ctx context.Context, in *MsgUpsertTokenInfo, opts ...grpc.CallOption) (*MsgUpsertTokenInfoResponse, error) + // EthereumTx defines a method to send ethereum transaction + EthereumTx(ctx context.Context, in *MsgEthereumTx, opts ...grpc.CallOption) (*MsgEthereumTxResponse, error) } type msgClient struct { @@ -154,18 +443,18 @@ func NewMsgClient(cc grpc1.ClientConn) MsgClient { return &msgClient{cc} } -func (c *msgClient) UpsertTokenAlias(ctx context.Context, in *MsgUpsertTokenAlias, opts ...grpc.CallOption) (*MsgUpsertTokenAliasResponse, error) { - out := new(MsgUpsertTokenAliasResponse) - err := c.cc.Invoke(ctx, "/kira.tokens.Msg/UpsertTokenAlias", in, out, opts...) +func (c *msgClient) UpsertTokenInfo(ctx context.Context, in *MsgUpsertTokenInfo, opts ...grpc.CallOption) (*MsgUpsertTokenInfoResponse, error) { + out := new(MsgUpsertTokenInfoResponse) + err := c.cc.Invoke(ctx, "/kira.tokens.Msg/UpsertTokenInfo", in, out, opts...) if err != nil { return nil, err } return out, nil } -func (c *msgClient) UpsertTokenRate(ctx context.Context, in *MsgUpsertTokenRate, opts ...grpc.CallOption) (*MsgUpsertTokenRateResponse, error) { - out := new(MsgUpsertTokenRateResponse) - err := c.cc.Invoke(ctx, "/kira.tokens.Msg/UpsertTokenRate", in, out, opts...) +func (c *msgClient) EthereumTx(ctx context.Context, in *MsgEthereumTx, opts ...grpc.CallOption) (*MsgEthereumTxResponse, error) { + out := new(MsgEthereumTxResponse) + err := c.cc.Invoke(ctx, "/kira.tokens.Msg/EthereumTx", in, out, opts...) if err != nil { return nil, err } @@ -174,59 +463,59 @@ func (c *msgClient) UpsertTokenRate(ctx context.Context, in *MsgUpsertTokenRate, // MsgServer is the server API for Msg service. type MsgServer interface { - // UpsertTokenAlias defines a method to upsert token alias - UpsertTokenAlias(context.Context, *MsgUpsertTokenAlias) (*MsgUpsertTokenAliasResponse, error) - // UpsertTokenRate defines a method to upsert token rate - UpsertTokenRate(context.Context, *MsgUpsertTokenRate) (*MsgUpsertTokenRateResponse, error) + // UpsertTokenInfo defines a method to upsert token rate + UpsertTokenInfo(context.Context, *MsgUpsertTokenInfo) (*MsgUpsertTokenInfoResponse, error) + // EthereumTx defines a method to send ethereum transaction + EthereumTx(context.Context, *MsgEthereumTx) (*MsgEthereumTxResponse, error) } // UnimplementedMsgServer can be embedded to have forward compatible implementations. type UnimplementedMsgServer struct { } -func (*UnimplementedMsgServer) UpsertTokenAlias(ctx context.Context, req *MsgUpsertTokenAlias) (*MsgUpsertTokenAliasResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method UpsertTokenAlias not implemented") +func (*UnimplementedMsgServer) UpsertTokenInfo(ctx context.Context, req *MsgUpsertTokenInfo) (*MsgUpsertTokenInfoResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpsertTokenInfo not implemented") } -func (*UnimplementedMsgServer) UpsertTokenRate(ctx context.Context, req *MsgUpsertTokenRate) (*MsgUpsertTokenRateResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method UpsertTokenRate not implemented") +func (*UnimplementedMsgServer) EthereumTx(ctx context.Context, req *MsgEthereumTx) (*MsgEthereumTxResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method EthereumTx not implemented") } func RegisterMsgServer(s grpc1.Server, srv MsgServer) { s.RegisterService(&_Msg_serviceDesc, srv) } -func _Msg_UpsertTokenAlias_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgUpsertTokenAlias) +func _Msg_UpsertTokenInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgUpsertTokenInfo) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(MsgServer).UpsertTokenAlias(ctx, in) + return srv.(MsgServer).UpsertTokenInfo(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/kira.tokens.Msg/UpsertTokenAlias", + FullMethod: "/kira.tokens.Msg/UpsertTokenInfo", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).UpsertTokenAlias(ctx, req.(*MsgUpsertTokenAlias)) + return srv.(MsgServer).UpsertTokenInfo(ctx, req.(*MsgUpsertTokenInfo)) } return interceptor(ctx, in, info, handler) } -func _Msg_UpsertTokenRate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgUpsertTokenRate) +func _Msg_EthereumTx_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgEthereumTx) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(MsgServer).UpsertTokenRate(ctx, in) + return srv.(MsgServer).EthereumTx(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/kira.tokens.Msg/UpsertTokenRate", + FullMethod: "/kira.tokens.Msg/EthereumTx", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).UpsertTokenRate(ctx, req.(*MsgUpsertTokenRate)) + return srv.(MsgServer).EthereumTx(ctx, req.(*MsgEthereumTx)) } return interceptor(ctx, in, info, handler) } @@ -236,19 +525,277 @@ var _Msg_serviceDesc = grpc.ServiceDesc{ HandlerType: (*MsgServer)(nil), Methods: []grpc.MethodDesc{ { - MethodName: "UpsertTokenAlias", - Handler: _Msg_UpsertTokenAlias_Handler, + MethodName: "UpsertTokenInfo", + Handler: _Msg_UpsertTokenInfo_Handler, }, { - MethodName: "UpsertTokenRate", - Handler: _Msg_UpsertTokenRate_Handler, + MethodName: "EthereumTx", + Handler: _Msg_EthereumTx_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "kira/tokens/tx.proto", } -func (m *MsgUpsertTokenAliasResponse) Marshal() (dAtA []byte, err error) { +func (m *MsgUpsertTokenInfo) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgUpsertTokenInfo) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgUpsertTokenInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Proposer) > 0 { + i -= len(m.Proposer) + copy(dAtA[i:], m.Proposer) + i = encodeVarintTx(dAtA, i, uint64(len(m.Proposer))) + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0xc2 + } + if len(m.NftHash) > 0 { + i -= len(m.NftHash) + copy(dAtA[i:], m.NftHash) + i = encodeVarintTx(dAtA, i, uint64(len(m.NftHash))) + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0xba + } + if len(m.NftMetadata) > 0 { + i -= len(m.NftMetadata) + copy(dAtA[i:], m.NftMetadata) + i = encodeVarintTx(dAtA, i, uint64(len(m.NftMetadata))) + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0xb2 + } + if m.OwnerEditDisabled { + i-- + if m.OwnerEditDisabled { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0xa8 + } + if len(m.Owner) > 0 { + i -= len(m.Owner) + copy(dAtA[i:], m.Owner) + i = encodeVarintTx(dAtA, i, uint64(len(m.Owner))) + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0xa2 + } + { + size := m.MintingFee.Size() + i -= size + if _, err := m.MintingFee.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0x9a + if m.Holders != 0 { + i = encodeVarintTx(dAtA, i, uint64(m.Holders)) + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0x90 + } + if len(m.Social) > 0 { + i -= len(m.Social) + copy(dAtA[i:], m.Social) + i = encodeVarintTx(dAtA, i, uint64(len(m.Social))) + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0x8a + } + if len(m.Website) > 0 { + i -= len(m.Website) + copy(dAtA[i:], m.Website) + i = encodeVarintTx(dAtA, i, uint64(len(m.Website))) + i-- + dAtA[i] = 0x1 + i-- + dAtA[i] = 0x82 + } + if len(m.Description) > 0 { + i -= len(m.Description) + copy(dAtA[i:], m.Description) + i = encodeVarintTx(dAtA, i, uint64(len(m.Description))) + i-- + dAtA[i] = 0x7a + } + if m.Decimals != 0 { + i = encodeVarintTx(dAtA, i, uint64(m.Decimals)) + i-- + dAtA[i] = 0x70 + } + if len(m.Icon) > 0 { + i -= len(m.Icon) + copy(dAtA[i:], m.Icon) + i = encodeVarintTx(dAtA, i, uint64(len(m.Icon))) + i-- + dAtA[i] = 0x6a + } + if len(m.Name) > 0 { + i -= len(m.Name) + copy(dAtA[i:], m.Name) + i = encodeVarintTx(dAtA, i, uint64(len(m.Name))) + i-- + dAtA[i] = 0x62 + } + if len(m.Symbol) > 0 { + i -= len(m.Symbol) + copy(dAtA[i:], m.Symbol) + i = encodeVarintTx(dAtA, i, uint64(len(m.Symbol))) + i-- + dAtA[i] = 0x5a + } + if m.Inactive { + i-- + if m.Inactive { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x50 + } + if m.StakeEnabled { + i-- + if m.StakeEnabled { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x48 + } + { + size := m.StakeMin.Size() + i -= size + if _, err := m.StakeMin.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x42 + { + size := m.StakeCap.Size() + i -= size + if _, err := m.StakeCap.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x3a + { + size := m.SupplyCap.Size() + i -= size + if _, err := m.SupplyCap.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x32 + { + size := m.Supply.Size() + i -= size + if _, err := m.Supply.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x2a + if m.FeeEnabled { + i-- + if m.FeeEnabled { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x20 + } + { + size := m.FeeRate.Size() + i -= size + if _, err := m.FeeRate.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + if len(m.TokenType) > 0 { + i -= len(m.TokenType) + copy(dAtA[i:], m.TokenType) + i = encodeVarintTx(dAtA, i, uint64(len(m.TokenType))) + i-- + dAtA[i] = 0x12 + } + if len(m.Denom) > 0 { + i -= len(m.Denom) + copy(dAtA[i:], m.Denom) + i = encodeVarintTx(dAtA, i, uint64(len(m.Denom))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgUpsertTokenInfoResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgUpsertTokenInfoResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgUpsertTokenInfoResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *MsgEthereumTx) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -258,20 +805,48 @@ func (m *MsgUpsertTokenAliasResponse) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *MsgUpsertTokenAliasResponse) MarshalTo(dAtA []byte) (int, error) { +func (m *MsgEthereumTx) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *MsgUpsertTokenAliasResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *MsgEthereumTx) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l + if len(m.Data) > 0 { + i -= len(m.Data) + copy(dAtA[i:], m.Data) + i = encodeVarintTx(dAtA, i, uint64(len(m.Data))) + i-- + dAtA[i] = 0x22 + } + if len(m.Hash) > 0 { + i -= len(m.Hash) + copy(dAtA[i:], m.Hash) + i = encodeVarintTx(dAtA, i, uint64(len(m.Hash))) + i-- + dAtA[i] = 0x1a + } + if len(m.Sender) > 0 { + i -= len(m.Sender) + copy(dAtA[i:], m.Sender) + i = encodeVarintTx(dAtA, i, uint64(len(m.Sender))) + i-- + dAtA[i] = 0x12 + } + if len(m.TxType) > 0 { + i -= len(m.TxType) + copy(dAtA[i:], m.TxType) + i = encodeVarintTx(dAtA, i, uint64(len(m.TxType))) + i-- + dAtA[i] = 0xa + } return len(dAtA) - i, nil } -func (m *MsgUpsertTokenRateResponse) Marshal() (dAtA []byte, err error) { +func (m *MsgEthereumTxResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -281,12 +856,12 @@ func (m *MsgUpsertTokenRateResponse) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *MsgUpsertTokenRateResponse) MarshalTo(dAtA []byte) (int, error) { +func (m *MsgEthereumTxResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *MsgUpsertTokenRateResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *MsgEthereumTxResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -305,16 +880,128 @@ func encodeVarintTx(dAtA []byte, offset int, v uint64) int { dAtA[offset] = uint8(v) return base } -func (m *MsgUpsertTokenAliasResponse) Size() (n int) { +func (m *MsgUpsertTokenInfo) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Denom) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.TokenType) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = m.FeeRate.Size() + n += 1 + l + sovTx(uint64(l)) + if m.FeeEnabled { + n += 2 + } + l = m.Supply.Size() + n += 1 + l + sovTx(uint64(l)) + l = m.SupplyCap.Size() + n += 1 + l + sovTx(uint64(l)) + l = m.StakeCap.Size() + n += 1 + l + sovTx(uint64(l)) + l = m.StakeMin.Size() + n += 1 + l + sovTx(uint64(l)) + if m.StakeEnabled { + n += 2 + } + if m.Inactive { + n += 2 + } + l = len(m.Symbol) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.Name) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.Icon) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + if m.Decimals != 0 { + n += 1 + sovTx(uint64(m.Decimals)) + } + l = len(m.Description) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.Website) + if l > 0 { + n += 2 + l + sovTx(uint64(l)) + } + l = len(m.Social) + if l > 0 { + n += 2 + l + sovTx(uint64(l)) + } + if m.Holders != 0 { + n += 2 + sovTx(uint64(m.Holders)) + } + l = m.MintingFee.Size() + n += 2 + l + sovTx(uint64(l)) + l = len(m.Owner) + if l > 0 { + n += 2 + l + sovTx(uint64(l)) + } + if m.OwnerEditDisabled { + n += 3 + } + l = len(m.NftMetadata) + if l > 0 { + n += 2 + l + sovTx(uint64(l)) + } + l = len(m.NftHash) + if l > 0 { + n += 2 + l + sovTx(uint64(l)) + } + l = len(m.Proposer) + if l > 0 { + n += 2 + l + sovTx(uint64(l)) + } + return n +} + +func (m *MsgUpsertTokenInfoResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *MsgEthereumTx) Size() (n int) { if m == nil { return 0 } var l int _ = l + l = len(m.TxType) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.Sender) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.Hash) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.Data) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } return n } -func (m *MsgUpsertTokenRateResponse) Size() (n int) { +func (m *MsgEthereumTxResponse) Size() (n int) { if m == nil { return 0 } @@ -329,7 +1016,7 @@ func sovTx(x uint64) (n int) { func sozTx(x uint64) (n int) { return sovTx(uint64((x << 1) ^ uint64((int64(x) >> 63)))) } -func (m *MsgUpsertTokenAliasResponse) Unmarshal(dAtA []byte) error { +func (m *MsgUpsertTokenInfo) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -352,12 +1039,950 @@ func (m *MsgUpsertTokenAliasResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MsgUpsertTokenAliasResponse: wiretype end group for non-group") + return fmt.Errorf("proto: MsgUpsertTokenInfo: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MsgUpsertTokenAliasResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MsgUpsertTokenInfo: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Denom", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Denom = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TokenType", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.TokenType = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FeeRate", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.FeeRate.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field FeeEnabled", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.FeeEnabled = bool(v != 0) + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Supply", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Supply.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SupplyCap", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.SupplyCap.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StakeCap", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.StakeCap.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StakeMin", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.StakeMin.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 9: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field StakeEnabled", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.StakeEnabled = bool(v != 0) + case 10: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Inactive", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.Inactive = bool(v != 0) + case 11: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Symbol", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Symbol = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 12: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Name = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 13: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Icon", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Icon = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 14: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Decimals", wireType) + } + m.Decimals = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Decimals |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 15: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Description", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Description = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 16: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Website", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Website = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 17: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Social", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Social = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 18: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Holders", wireType) + } + m.Holders = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Holders |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 19: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MintingFee", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.MintingFee.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 20: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Owner", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Owner = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 21: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field OwnerEditDisabled", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.OwnerEditDisabled = bool(v != 0) + case 22: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NftMetadata", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.NftMetadata = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 23: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NftHash", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.NftHash = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 24: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Proposer", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Proposer = append(m.Proposer[:0], dAtA[iNdEx:postIndex]...) + if m.Proposer == nil { + m.Proposer = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgUpsertTokenInfoResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgUpsertTokenInfoResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgUpsertTokenInfoResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgEthereumTx) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgEthereumTx: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgEthereumTx: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TxType", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.TxType = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sender", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Sender = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Hash", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Hash = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Data = append(m.Data[:0], dAtA[iNdEx:postIndex]...) + if m.Data == nil { + m.Data = []byte{} + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipTx(dAtA[iNdEx:]) @@ -379,7 +2004,7 @@ func (m *MsgUpsertTokenAliasResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *MsgUpsertTokenRateResponse) Unmarshal(dAtA []byte) error { +func (m *MsgEthereumTxResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -402,10 +2027,10 @@ func (m *MsgUpsertTokenRateResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MsgUpsertTokenRateResponse: wiretype end group for non-group") + return fmt.Errorf("proto: MsgEthereumTxResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MsgUpsertTokenRateResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MsgEthereumTxResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { default: diff --git a/x/tokens/types/types.go b/x/tokens/types/types.go index 299b31e5a..5217891a4 100644 --- a/x/tokens/types/types.go +++ b/x/tokens/types/types.go @@ -1,45 +1,65 @@ package types import ( - sdk "github.com/cosmos/cosmos-sdk/types" + "cosmossdk.io/math" ) -// NewTokenAlias generates a new token alias struct. -func NewTokenAlias( +// NewTokenInfo generates a new token rate struct. +func NewTokenInfo( + denom string, + tokenType string, + feeRate math.LegacyDec, + feeEnabled bool, + supply math.Int, + supplyCap math.Int, + stakeCap math.LegacyDec, + stakeMin math.Int, + stakeEnabled bool, + inactive bool, symbol string, name string, icon string, decimals uint32, - denoms []string, - invalidated bool, -) *TokenAlias { - return &TokenAlias{ - Symbol: symbol, - Name: name, - Icon: icon, - Decimals: decimals, - Denoms: denoms, - Invalidated: invalidated, + description string, + website string, + social string, + holders uint64, + mintingFee math.Int, + owner string, + ownerEditDisabled bool, + nftMetadata string, + nftHash string, +) TokenInfo { + if tokenType == "adr43" { + decimals = 0 } -} - -// NewTokenRate generates a new token rate struct. -func NewTokenRate( - denom string, - feeRate sdk.Dec, - feePayments bool, - stakeCap sdk.Dec, - stakeMin sdk.Int, - stakeToken bool, - invalidated bool, -) *TokenRate { - return &TokenRate{ - Denom: denom, - FeeRate: feeRate, - FeePayments: feePayments, - StakeCap: stakeCap, - StakeMin: stakeMin, - StakeToken: stakeToken, - Invalidated: invalidated, + if tokenType == "adr20" { + nftHash = "" + nftMetadata = "" + } + return TokenInfo{ + Denom: denom, + TokenType: tokenType, + FeeRate: feeRate, + FeeEnabled: feeEnabled, + Supply: supply, + SupplyCap: supplyCap, + StakeCap: stakeCap, + StakeMin: stakeMin, + StakeEnabled: stakeEnabled, + Inactive: inactive, + Symbol: symbol, + Name: name, + Icon: icon, + Decimals: decimals, + Description: description, + Website: website, + Social: social, + Holders: holders, + MintingFee: mintingFee, + Owner: owner, + OwnerEditDisabled: ownerEditDisabled, + NftMetadata: nftMetadata, + NftHash: nftHash, } } diff --git a/x/ubi/keeper/keeper.go b/x/ubi/keeper/keeper.go index 4edcc72d7..538e35bd3 100644 --- a/x/ubi/keeper/keeper.go +++ b/x/ubi/keeper/keeper.go @@ -15,16 +15,23 @@ type Keeper struct { bk types.BankKeeper sk types.SpendingKeeper dk types.DistrKeeper + tk types.TokensKeeper } // NewKeeper returns instance of a keeper -func NewKeeper(storeKey storetypes.StoreKey, cdc codec.BinaryCodec, bk types.BankKeeper, sk types.SpendingKeeper, dk types.DistrKeeper) Keeper { +func NewKeeper(storeKey storetypes.StoreKey, cdc codec.BinaryCodec, + bk types.BankKeeper, + sk types.SpendingKeeper, + dk types.DistrKeeper, + tk types.TokensKeeper, +) Keeper { return Keeper{ cdc: cdc, storeKey: storeKey, bk: bk, sk: sk, dk: dk, + tk: tk, } } diff --git a/x/ubi/keeper/ubi.go b/x/ubi/keeper/ubi.go index e3041aea6..44f7ddf6b 100644 --- a/x/ubi/keeper/ubi.go +++ b/x/ubi/keeper/ubi.go @@ -4,11 +4,11 @@ import ( "fmt" "strings" + errorsmod "cosmossdk.io/errors" "github.com/cosmos/cosmos-sdk/store/prefix" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/KiraCore/sekai/x/ubi/types" - sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" minttypes "github.com/cosmos/cosmos-sdk/x/mint/types" ) @@ -53,7 +53,7 @@ func (k Keeper) DeleteUBIRecord(ctx sdk.Context, name string) error { store := ctx.KVStore(k.storeKey) key := append([]byte(types.PrefixKeyUBIRecord), []byte(name)...) if !store.Has(key) { - return sdkerrors.Wrap(types.ErrUBIRecordDoesNotExists, fmt.Sprintf("ubi record does not exist: %s", name)) + return errorsmod.Wrap(types.ErrUBIRecordDoesNotExists, fmt.Sprintf("ubi record does not exist: %s", name)) } store.Delete(key) @@ -87,7 +87,7 @@ func (k Keeper) ProcessUBIRecord(ctx sdk.Context, record types.UBIRecord) error } coin := sdk.NewCoin(defaultDenom, amount) - err := k.bk.MintCoins(ctx, minttypes.ModuleName, sdk.NewCoins(coin)) + err := k.tk.MintCoins(ctx, minttypes.ModuleName, sdk.NewCoins(coin)) if err != nil { return err } diff --git a/x/ubi/module.go b/x/ubi/module.go index c72a0ee73..785068e51 100644 --- a/x/ubi/module.go +++ b/x/ubi/module.go @@ -117,7 +117,6 @@ func (am AppModule) QuerierRoute() string { return ubitypes.QuerierRoute } - func (am AppModule) BeginBlock(clientCtx sdk.Context, block abci.RequestBeginBlock) {} func (am AppModule) EndBlock(ctx sdk.Context, block abci.RequestEndBlock) []abci.ValidatorUpdate { diff --git a/x/ubi/types/expected_keepers.go b/x/ubi/types/expected_keepers.go index e2ef22d49..191d79534 100644 --- a/x/ubi/types/expected_keepers.go +++ b/x/ubi/types/expected_keepers.go @@ -3,6 +3,7 @@ package types import ( govtypes "github.com/KiraCore/sekai/x/gov/types" spendingtypes "github.com/KiraCore/sekai/x/spending/types" + tokenstypes "github.com/KiraCore/sekai/x/tokens/types" sdk "github.com/cosmos/cosmos-sdk/types" ) @@ -22,3 +23,9 @@ type SpendingKeeper interface { type DistrKeeper interface { InflationPossible(ctx sdk.Context) bool } + +// TokensKeeper defines expected interface needed from tokens keeper +type TokensKeeper interface { + MintCoins(ctx sdk.Context, moduleName string, amt sdk.Coins) error + GetTokenInfo(ctx sdk.Context, denom string) *tokenstypes.TokenInfo +} diff --git a/x/upgrade/legacy/v0317/genesis.pb.go b/x/upgrade/legacy/v0317/genesis.pb.go new file mode 100644 index 000000000..2af963bdb --- /dev/null +++ b/x/upgrade/legacy/v0317/genesis.pb.go @@ -0,0 +1,440 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: kira/upgrade/genesis.proto + +package types + +import ( + fmt "fmt" + _ "github.com/gogo/protobuf/gogoproto" + proto "github.com/gogo/protobuf/proto" + io "io" + math "math" + math_bits "math/bits" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +type GenesisStateV0317 struct { + Version string `protobuf:"bytes,1,opt,name=version,proto3" json:"version,omitempty"` + CurrentPlan *PlanV0317 `protobuf:"bytes,2,opt,name=current_plan,json=currentPlan,proto3" json:"current_plan,omitempty"` + NextPlan *PlanV0317 `protobuf:"bytes,3,opt,name=next_plan,json=nextPlan,proto3" json:"next_plan,omitempty"` +} + +func (m *GenesisStateV0317) Reset() { *m = GenesisStateV0317{} } +func (m *GenesisStateV0317) String() string { return proto.CompactTextString(m) } +func (*GenesisStateV0317) ProtoMessage() {} +func (*GenesisStateV0317) Descriptor() ([]byte, []int) { + return fileDescriptor_af8e84a023ffb915, []int{0} +} +func (m *GenesisStateV0317) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *GenesisStateV0317) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_GenesisStateV0317.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *GenesisStateV0317) XXX_Merge(src proto.Message) { + xxx_messageInfo_GenesisStateV0317.Merge(m, src) +} +func (m *GenesisStateV0317) XXX_Size() int { + return m.Size() +} +func (m *GenesisStateV0317) XXX_DiscardUnknown() { + xxx_messageInfo_GenesisStateV0317.DiscardUnknown(m) +} + +var xxx_messageInfo_GenesisStateV0317 proto.InternalMessageInfo + +func (m *GenesisStateV0317) GetVersion() string { + if m != nil { + return m.Version + } + return "" +} + +func (m *GenesisStateV0317) GetCurrentPlan() *PlanV0317 { + if m != nil { + return m.CurrentPlan + } + return nil +} + +func (m *GenesisStateV0317) GetNextPlan() *PlanV0317 { + if m != nil { + return m.NextPlan + } + return nil +} + +func init() { + proto.RegisterType((*GenesisStateV0317)(nil), "kira.upgrade.GenesisStateV0317") +} + +func init() { proto.RegisterFile("kira/upgrade/genesis.proto", fileDescriptor_af8e84a023ffb915) } + +var fileDescriptor_af8e84a023ffb915 = []byte{ + // 237 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0xca, 0xce, 0x2c, 0x4a, + 0xd4, 0x2f, 0x2d, 0x48, 0x2f, 0x4a, 0x4c, 0x49, 0xd5, 0x4f, 0x4f, 0xcd, 0x4b, 0x2d, 0xce, 0x2c, + 0xd6, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x01, 0xc9, 0xe9, 0x41, 0xe5, 0xa4, 0x44, 0xd2, + 0xf3, 0xd3, 0xf3, 0xc1, 0x12, 0xfa, 0x20, 0x16, 0x44, 0x8d, 0x94, 0x38, 0x8a, 0xfe, 0x82, 0x9c, + 0xc4, 0x3c, 0x88, 0x84, 0xd2, 0x04, 0x46, 0x2e, 0x1e, 0x77, 0x88, 0x71, 0xc1, 0x25, 0x89, 0x25, + 0xa9, 0x42, 0x12, 0x5c, 0xec, 0x65, 0xa9, 0x45, 0xc5, 0x99, 0xf9, 0x79, 0x12, 0x8c, 0x0a, 0x8c, + 0x1a, 0x9c, 0x41, 0x30, 0xae, 0x90, 0x29, 0x17, 0x4f, 0x72, 0x69, 0x51, 0x51, 0x6a, 0x5e, 0x49, + 0x3c, 0xc8, 0x00, 0x09, 0x26, 0x05, 0x46, 0x0d, 0x6e, 0x23, 0x21, 0x3d, 0x64, 0xeb, 0xf5, 0x02, + 0x72, 0x12, 0xf3, 0x82, 0xb8, 0xa1, 0xea, 0x40, 0x1c, 0x21, 0x7d, 0x2e, 0xce, 0xbc, 0xd4, 0x0a, + 0xa8, 0x1e, 0x66, 0x9c, 0x7a, 0x38, 0x40, 0x8a, 0x40, 0x2c, 0x27, 0xe7, 0x13, 0x8f, 0xe4, 0x18, + 0x2f, 0x3c, 0x92, 0x63, 0x7c, 0xf0, 0x48, 0x8e, 0x71, 0xc2, 0x63, 0x39, 0x86, 0x0b, 0x8f, 0xe5, + 0x18, 0x6e, 0x3c, 0x96, 0x63, 0x88, 0xd2, 0x4c, 0xcf, 0x2c, 0xc9, 0x28, 0x4d, 0xd2, 0x4b, 0xce, + 0xcf, 0xd5, 0xf7, 0xce, 0x2c, 0x4a, 0x74, 0xce, 0x2f, 0x4a, 0xd5, 0x2f, 0x4e, 0xcd, 0x4e, 0xcc, + 0xd4, 0xaf, 0x80, 0x7b, 0xae, 0xa4, 0xb2, 0x20, 0xb5, 0x38, 0x89, 0x0d, 0xec, 0x3d, 0x63, 0x40, + 0x00, 0x00, 0x00, 0xff, 0xff, 0xba, 0x62, 0x45, 0x6f, 0x39, 0x01, 0x00, 0x00, +} + +func (m *GenesisStateV0317) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *GenesisStateV0317) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GenesisStateV0317) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.NextPlan != nil { + { + size, err := m.NextPlan.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + if m.CurrentPlan != nil { + { + size, err := m.CurrentPlan.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if len(m.Version) > 0 { + i -= len(m.Version) + copy(dAtA[i:], m.Version) + i = encodeVarintGenesis(dAtA, i, uint64(len(m.Version))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func encodeVarintGenesis(dAtA []byte, offset int, v uint64) int { + offset -= sovGenesis(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *GenesisStateV0317) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Version) + if l > 0 { + n += 1 + l + sovGenesis(uint64(l)) + } + if m.CurrentPlan != nil { + l = m.CurrentPlan.Size() + n += 1 + l + sovGenesis(uint64(l)) + } + if m.NextPlan != nil { + l = m.NextPlan.Size() + n += 1 + l + sovGenesis(uint64(l)) + } + return n +} + +func sovGenesis(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozGenesis(x uint64) (n int) { + return sovGenesis(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *GenesisStateV0317) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: GenesisStateV0317: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GenesisStateV0317: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Version = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CurrentPlanV0317", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.CurrentPlan == nil { + m.CurrentPlan = &PlanV0317{} + } + if err := m.CurrentPlan.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NextPlanV0317", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.NextPlan == nil { + m.NextPlan = &PlanV0317{} + } + if err := m.NextPlan.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenesis(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenesis + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipGenesis(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowGenesis + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowGenesis + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowGenesis + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthGenesis + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupGenesis + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthGenesis + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthGenesis = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowGenesis = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupGenesis = fmt.Errorf("proto: unexpected end of group") +) \ No newline at end of file diff --git a/x/upgrade/legacy/v0317/plan.pb.go b/x/upgrade/legacy/v0317/plan.pb.go new file mode 100644 index 000000000..77519f6d1 --- /dev/null +++ b/x/upgrade/legacy/v0317/plan.pb.go @@ -0,0 +1,818 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: kira/upgrade/plan.proto + +package types + +import ( + fmt "fmt" + _ "github.com/gogo/protobuf/gogoproto" + proto "github.com/gogo/protobuf/proto" + io "io" + math "math" + math_bits "math/bits" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +type PlanV0317 struct { + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Resources []ResourceV0317 `protobuf:"bytes,2,rep,name=resources,proto3" json:"resources"` + UpgradeTime int64 `protobuf:"varint,3,opt,name=upgrade_time,json=upgradeTime,proto3" json:"upgrade_time,omitempty"` + OldChainId string `protobuf:"bytes,4,opt,name=old_chain_id,json=oldChainId,proto3" json:"old_chain_id,omitempty"` + NewChainId string `protobuf:"bytes,5,opt,name=new_chain_id,json=newChainId,proto3" json:"new_chain_id,omitempty"` + RollbackChecksum string `protobuf:"bytes,6,opt,name=rollback_checksum,json=rollbackChecksum,proto3" json:"rollback_checksum,omitempty"` + MaxEnrolmentDuration int64 `protobuf:"varint,7,opt,name=max_enrolment_duration,json=maxEnrolmentDuration,proto3" json:"max_enrolment_duration,omitempty"` + InstateUpgrade bool `protobuf:"varint,8,opt,name=instate_upgrade,json=instateUpgrade,proto3" json:"instate_upgrade,omitempty"` + RebootRequired bool `protobuf:"varint,9,opt,name=reboot_required,json=rebootRequired,proto3" json:"reboot_required,omitempty"` + SkipHandler bool `protobuf:"varint,10,opt,name=skip_handler,json=skipHandler,proto3" json:"skip_handler,omitempty"` + ProposalID uint64 `protobuf:"varint,11,opt,name=proposalID,proto3" json:"proposalID,omitempty"` + ProcessedNoVoteValidators bool `protobuf:"varint,12,opt,name=processed_no_vote_validators,json=processedNoVoteValidators,proto3" json:"processed_no_vote_validators,omitempty"` +} + +func (m *PlanV0317) Reset() { *m = PlanV0317{} } +func (m *PlanV0317) String() string { return proto.CompactTextString(m) } +func (*PlanV0317) ProtoMessage() {} +func (*PlanV0317) Descriptor() ([]byte, []int) { + return fileDescriptor_96c9a10c2f596dea, []int{0} +} +func (m *PlanV0317) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *PlanV0317) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_PlanV0317.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *PlanV0317) XXX_Merge(src proto.Message) { + xxx_messageInfo_PlanV0317.Merge(m, src) +} +func (m *PlanV0317) XXX_Size() int { + return m.Size() +} +func (m *PlanV0317) XXX_DiscardUnknown() { + xxx_messageInfo_PlanV0317.DiscardUnknown(m) +} + +var xxx_messageInfo_PlanV0317 proto.InternalMessageInfo + +func (m *PlanV0317) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +func (m *PlanV0317) GetResources() []ResourceV0317 { + if m != nil { + return m.Resources + } + return nil +} + +func (m *PlanV0317) GetUpgradeTime() int64 { + if m != nil { + return m.UpgradeTime + } + return 0 +} + +func (m *PlanV0317) GetOldChainId() string { + if m != nil { + return m.OldChainId + } + return "" +} + +func (m *PlanV0317) GetNewChainId() string { + if m != nil { + return m.NewChainId + } + return "" +} + +func (m *PlanV0317) GetRollbackChecksum() string { + if m != nil { + return m.RollbackChecksum + } + return "" +} + +func (m *PlanV0317) GetMaxEnrolmentDuration() int64 { + if m != nil { + return m.MaxEnrolmentDuration + } + return 0 +} + +func (m *PlanV0317) GetInstateUpgrade() bool { + if m != nil { + return m.InstateUpgrade + } + return false +} + +func (m *PlanV0317) GetRebootRequired() bool { + if m != nil { + return m.RebootRequired + } + return false +} + +func (m *PlanV0317) GetSkipHandler() bool { + if m != nil { + return m.SkipHandler + } + return false +} + +func (m *PlanV0317) GetProposalID() uint64 { + if m != nil { + return m.ProposalID + } + return 0 +} + +func (m *PlanV0317) GetProcessedNoVoteValidators() bool { + if m != nil { + return m.ProcessedNoVoteValidators + } + return false +} + +func init() { + proto.RegisterType((*PlanV0317)(nil), "kira.upgrade.PlanV0317") +} + +func init() { proto.RegisterFile("kira/upgrade/plan.proto", fileDescriptor_96c9a10c2f596dea) } + +var fileDescriptor_96c9a10c2f596dea = []byte{ + // 451 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x54, 0x92, 0x4f, 0x6f, 0xd3, 0x30, + 0x14, 0xc0, 0x1b, 0x5a, 0xc6, 0xe6, 0x56, 0xfc, 0xb1, 0xa6, 0x61, 0x2a, 0x14, 0x02, 0x17, 0x8a, + 0x90, 0x1a, 0x09, 0x38, 0x71, 0x41, 0x5a, 0x87, 0xc4, 0x84, 0x84, 0x50, 0x04, 0x3b, 0x70, 0xb1, + 0xdc, 0xf8, 0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0x51, + 0x59, 0x31, 0x43, 0x0b, 0xa9, 0x83, 0x42, 0xa8, 0x74, 0xb5, 0xdb, 0x22, 0xff, 0xa3, 0x02, 0x37, + 0xdf, 0x6b, 0x97, 0xe8, 0xf5, 0xbf, 0x00, 0x00, 0x00, 0xff, 0xff, 0xaa, 0x89, 0x0f, 0x8a, 0x9f, + 0x02, 0x00, 0x00, +} + +func (m *PlanV0317) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *PlanV0317) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *PlanV0317) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.ProcessedNoVoteValidators { + i-- + if m.ProcessedNoVoteValidators { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x60 + } + if m.ProposalID != 0 { + i = encodeVarintPlanV0317(dAtA, i, uint64(m.ProposalID)) + i-- + dAtA[i] = 0x58 + } + if m.SkipHandler { + i-- + if m.SkipHandler { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x50 + } + if m.RebootRequired { + i-- + if m.RebootRequired { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x48 + } + if m.InstateUpgrade { + i-- + if m.InstateUpgrade { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x40 + } + if m.MaxEnrolmentDuration != 0 { + i = encodeVarintPlanV0317(dAtA, i, uint64(m.MaxEnrolmentDuration)) + i-- + dAtA[i] = 0x38 + } + if len(m.RollbackChecksum) > 0 { + i -= len(m.RollbackChecksum) + copy(dAtA[i:], m.RollbackChecksum) + i = encodeVarintPlanV0317(dAtA, i, uint64(len(m.RollbackChecksum))) + i-- + dAtA[i] = 0x32 + } + if len(m.NewChainId) > 0 { + i -= len(m.NewChainId) + copy(dAtA[i:], m.NewChainId) + i = encodeVarintPlanV0317(dAtA, i, uint64(len(m.NewChainId))) + i-- + dAtA[i] = 0x2a + } + if len(m.OldChainId) > 0 { + i -= len(m.OldChainId) + copy(dAtA[i:], m.OldChainId) + i = encodeVarintPlanV0317(dAtA, i, uint64(len(m.OldChainId))) + i-- + dAtA[i] = 0x22 + } + if m.UpgradeTime != 0 { + i = encodeVarintPlanV0317(dAtA, i, uint64(m.UpgradeTime)) + i-- + dAtA[i] = 0x18 + } + if len(m.Resources) > 0 { + for iNdEx := len(m.Resources) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Resources[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintPlanV0317(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + } + if len(m.Name) > 0 { + i -= len(m.Name) + copy(dAtA[i:], m.Name) + i = encodeVarintPlanV0317(dAtA, i, uint64(len(m.Name))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func encodeVarintPlanV0317(dAtA []byte, offset int, v uint64) int { + offset -= sovPlanV0317(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *PlanV0317) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Name) + if l > 0 { + n += 1 + l + sovPlanV0317(uint64(l)) + } + if len(m.Resources) > 0 { + for _, e := range m.Resources { + l = e.Size() + n += 1 + l + sovPlanV0317(uint64(l)) + } + } + if m.UpgradeTime != 0 { + n += 1 + sovPlanV0317(uint64(m.UpgradeTime)) + } + l = len(m.OldChainId) + if l > 0 { + n += 1 + l + sovPlanV0317(uint64(l)) + } + l = len(m.NewChainId) + if l > 0 { + n += 1 + l + sovPlanV0317(uint64(l)) + } + l = len(m.RollbackChecksum) + if l > 0 { + n += 1 + l + sovPlanV0317(uint64(l)) + } + if m.MaxEnrolmentDuration != 0 { + n += 1 + sovPlanV0317(uint64(m.MaxEnrolmentDuration)) + } + if m.InstateUpgrade { + n += 2 + } + if m.RebootRequired { + n += 2 + } + if m.SkipHandler { + n += 2 + } + if m.ProposalID != 0 { + n += 1 + sovPlanV0317(uint64(m.ProposalID)) + } + if m.ProcessedNoVoteValidators { + n += 2 + } + return n +} + +func sovPlanV0317(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozPlanV0317(x uint64) (n int) { + return sovPlanV0317(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *PlanV0317) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPlanV0317 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: PlanV0317: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: PlanV0317: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPlanV0317 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthPlanV0317 + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthPlanV0317 + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Name = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Resources", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPlanV0317 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthPlanV0317 + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthPlanV0317 + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Resources = append(m.Resources, ResourceV0317{}) + if err := m.Resources[len(m.Resources)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field UpgradeTime", wireType) + } + m.UpgradeTime = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPlanV0317 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.UpgradeTime |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field OldChainId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPlanV0317 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthPlanV0317 + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthPlanV0317 + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.OldChainId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NewChainId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPlanV0317 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthPlanV0317 + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthPlanV0317 + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.NewChainId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RollbackChecksum", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPlanV0317 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthPlanV0317 + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthPlanV0317 + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.RollbackChecksum = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field MaxEnrolmentDuration", wireType) + } + m.MaxEnrolmentDuration = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPlanV0317 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.MaxEnrolmentDuration |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 8: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field InstateUpgrade", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPlanV0317 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.InstateUpgrade = bool(v != 0) + case 9: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field RebootRequired", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPlanV0317 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.RebootRequired = bool(v != 0) + case 10: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field SkipHandler", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPlanV0317 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.SkipHandler = bool(v != 0) + case 11: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ProposalID", wireType) + } + m.ProposalID = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPlanV0317 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.ProposalID |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 12: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ProcessedNoVoteValidators", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPlanV0317 + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.ProcessedNoVoteValidators = bool(v != 0) + default: + iNdEx = preIndex + skippy, err := skipPlanV0317(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthPlanV0317 + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipPlanV0317(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowPlanV0317 + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowPlanV0317 + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowPlanV0317 + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthPlanV0317 + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupPlanV0317 + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthPlanV0317 + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthPlanV0317 = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowPlanV0317 = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupPlanV0317 = fmt.Errorf("proto: unexpected end of group") +) \ No newline at end of file diff --git a/x/upgrade/legacy/v0317/upgrade.pb.go b/x/upgrade/legacy/v0317/upgrade.pb.go new file mode 100644 index 000000000..ed51d9d2a --- /dev/null +++ b/x/upgrade/legacy/v0317/upgrade.pb.go @@ -0,0 +1,502 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: kira/upgrade/upgrade.proto + +package types + +import ( + fmt "fmt" + _ "github.com/cosmos/cosmos-sdk/codec/types" + _ "github.com/gogo/protobuf/gogoproto" + proto "github.com/gogo/protobuf/proto" + io "io" + math "math" + math_bits "math/bits" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +type ResourceV0317 struct { + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Url string `protobuf:"bytes,2,opt,name=url,proto3" json:"url,omitempty"` + Version string `protobuf:"bytes,3,opt,name=version,proto3" json:"version,omitempty"` + Checksum string `protobuf:"bytes,4,opt,name=checksum,proto3" json:"checksum,omitempty"` +} + +func (m *ResourceV0317) Reset() { *m = ResourceV0317{} } +func (m *ResourceV0317) String() string { return proto.CompactTextString(m) } +func (*ResourceV0317) ProtoMessage() {} +func (*ResourceV0317) Descriptor() ([]byte, []int) { + return fileDescriptor_cfa79131e4b330bc, []int{2} +} +func (m *ResourceV0317) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ResourceV0317) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Resource.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *ResourceV0317) XXX_Merge(src proto.Message) { + xxx_messageInfo_Resource.Merge(m, src) +} +func (m *ResourceV0317) XXX_Size() int { + return m.Size() +} +func (m *ResourceV0317) XXX_DiscardUnknown() { + xxx_messageInfo_Resource.DiscardUnknown(m) +} + +var xxx_messageInfo_Resource proto.InternalMessageInfo + +func init() { + proto.RegisterType((*ResourceV0317)(nil), "kira.upgrade.ResourceV0317") +} + +func init() { proto.RegisterFile("kira/upgrade/upgrade.proto", fileDescriptor_cfa79131e4b330bc) } + +var fileDescriptor_cfa79131e4b330bc = []byte{ + // 500 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x92, 0x41, 0x6f, 0xd3, 0x30, + 0x14, 0xc7, 0x9b, 0xa6, 0x6c, 0xad, 0x5b, 0x6d, 0xc3, 0x9a, 0x86, 0xa9, 0x44, 0x56, 0x76, 0x59, + 0x11, 0x52, 0x23, 0x01, 0x17, 0x76, 0x5c, 0x41, 0x80, 0xb8, 0xa0, 0x00, 0x17, 0x2e, 0x91, 0x9b, + 0xbc, 0xa5, 0x56, 0x13, 0xbf, 0xe0, 0x24, 0xb4, 0xfb, 0x16, 0x7c, 0x04, 0x3e, 0x0b, 0xa7, 0x1e, + 0x77, 0xe4, 0x84, 0xa0, 0xbd, 0xf0, 0x31, 0x50, 0x6c, 0xa7, 0xe3, 0xc8, 0x29, 0xcf, 0xbf, 0xf7, + 0x4b, 0xec, 0xfc, 0x9f, 0xc9, 0x70, 0x21, 0x14, 0xf7, 0xab, 0x3c, 0x51, 0x3c, 0x86, 0xe6, 0x39, + 0xc9, 0x15, 0x96, 0x48, 0x07, 0x75, 0x6f, 0x62, 0xd9, 0xf0, 0x7e, 0x82, 0x98, 0xa4, 0xe0, 0xeb, + 0xde, 0xac, 0xba, 0xf2, 0xb9, 0xbc, 0x36, 0xe2, 0xf0, 0x38, 0xc1, 0x04, 0x75, 0xe9, 0xd7, 0x95, + 0xa1, 0x67, 0xdf, 0x5d, 0x72, 0xef, 0x9d, 0xc2, 0x1c, 0x0b, 0x9e, 0xbe, 0xc7, 0xab, 0x72, 0xc9, + 0x15, 0x7c, 0x34, 0x1f, 0xa3, 0x94, 0x74, 0x24, 0xcf, 0x80, 0x39, 0x23, 0x67, 0xdc, 0x0b, 0x74, + 0x4d, 0x2f, 0x48, 0x4f, 0x41, 0x81, 0x95, 0x8a, 0xa0, 0x60, 0xed, 0x91, 0x3b, 0xee, 0x3f, 0x39, + 0x99, 0xfc, 0x7b, 0x84, 0x49, 0x60, 0xdb, 0x97, 0x9d, 0xf5, 0xcf, 0xd3, 0x56, 0x70, 0xab, 0xd3, + 0x87, 0x64, 0x60, 0xa5, 0xb0, 0x14, 0x19, 0x30, 0x77, 0xe4, 0x8c, 0xdd, 0xa0, 0x6f, 0xd9, 0x07, + 0x91, 0x01, 0x1d, 0x91, 0x01, 0xa6, 0x71, 0x18, 0xcd, 0xb9, 0x90, 0xa1, 0x88, 0x59, 0x47, 0x6f, + 0x4d, 0x30, 0x8d, 0xa7, 0x35, 0x7a, 0x13, 0xd7, 0x86, 0x84, 0xe5, 0xad, 0x71, 0xc7, 0x18, 0x12, + 0x96, 0x8d, 0xf1, 0x98, 0xdc, 0x55, 0x98, 0xa6, 0x33, 0x1e, 0x2d, 0xc2, 0x68, 0x0e, 0xd1, 0xa2, + 0xa8, 0x32, 0xb6, 0xa7, 0xb5, 0xa3, 0xa6, 0x31, 0xb5, 0x9c, 0x3e, 0x23, 0x27, 0x19, 0x5f, 0x85, + 0x20, 0x15, 0xa6, 0x19, 0xc8, 0x32, 0x8c, 0x2b, 0xc5, 0x4b, 0x81, 0x92, 0xed, 0xeb, 0xd3, 0x1d, + 0x67, 0x7c, 0xf5, 0xb2, 0x69, 0xbe, 0xb0, 0xbd, 0x3a, 0x99, 0x0c, 0x32, 0x64, 0x5d, 0x93, 0x4c, + 0x5d, 0xd3, 0x73, 0x72, 0x28, 0x64, 0x51, 0xf2, 0x12, 0x42, 0xfb, 0x47, 0xac, 0x37, 0x72, 0xc6, + 0xdd, 0xe0, 0xc0, 0xe2, 0x26, 0xd6, 0x73, 0x72, 0xa8, 0x60, 0x86, 0x58, 0x86, 0x0a, 0x3e, 0x57, + 0x42, 0x41, 0xcc, 0x88, 0x11, 0x0d, 0x0e, 0x2c, 0xad, 0xf3, 0x2a, 0x16, 0x22, 0x0f, 0xe7, 0x5c, + 0xc6, 0x29, 0x28, 0xd6, 0xd7, 0x56, 0xbf, 0x66, 0xaf, 0x0d, 0xba, 0xe8, 0xfc, 0xf9, 0x76, 0xea, + 0x9c, 0x3d, 0x27, 0x0f, 0x9a, 0x19, 0x4e, 0xb9, 0x8c, 0xe0, 0x7f, 0x26, 0x69, 0x5f, 0x9d, 0x93, + 0x6e, 0x33, 0x30, 0x7a, 0x40, 0xda, 0x22, 0xb6, 0x4e, 0x5b, 0xc4, 0xf4, 0x88, 0xb8, 0x95, 0x4a, + 0x59, 0x5b, 0x83, 0xba, 0xa4, 0x8c, 0xec, 0x7f, 0x01, 0x55, 0xd4, 0xf1, 0xb8, 0x9a, 0x36, 0x4b, + 0x3a, 0x24, 0xdd, 0x5d, 0xd6, 0x66, 0x68, 0xbb, 0xb5, 0xd9, 0xe9, 0xf2, 0xd5, 0xfa, 0xb7, 0xd7, + 0x5a, 0x6f, 0x3c, 0xe7, 0x66, 0xe3, 0x39, 0xbf, 0x36, 0x9e, 0xf3, 0x75, 0xeb, 0xb5, 0x6e, 0xb6, + 0x5e, 0xeb, 0xc7, 0xd6, 0x6b, 0x7d, 0x7a, 0x94, 0x88, 0x72, 0x5e, 0xcd, 0x26, 0x11, 0x66, 0xfe, + 0x5b, 0xa1, 0xf8, 0x14, 0x15, 0xf8, 0x05, 0x2c, 0xb8, 0xf0, 0x57, 0xbb, 0x9b, 0x5f, 0x5e, 0xe7, + 0x50, 0xcc, 0xf6, 0xf4, 0xcd, 0x7d, 0xfa, 0x37, 0x00, 0x00, 0xff, 0xff, 0xb2, 0x47, 0x76, 0x5e, + 0x16, 0x03, 0x00, 0x00, +} + + +func (this *ResourceV0317) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*ResourceV0317) + if !ok { + that2, ok := that.(ResourceV0317) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Id != that1.Id { + return false + } + if this.Url != that1.Url { + return false + } + if this.Version != that1.Version { + return false + } + if this.Checksum != that1.Checksum { + return false + } + return true +} + +func (m *ResourceV0317) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ResourceV0317) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ResourceV0317) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Checksum) > 0 { + i -= len(m.Checksum) + copy(dAtA[i:], m.Checksum) + i = encodeVarintUpgrade(dAtA, i, uint64(len(m.Checksum))) + i-- + dAtA[i] = 0x22 + } + if len(m.Version) > 0 { + i -= len(m.Version) + copy(dAtA[i:], m.Version) + i = encodeVarintUpgrade(dAtA, i, uint64(len(m.Version))) + i-- + dAtA[i] = 0x1a + } + if len(m.Url) > 0 { + i -= len(m.Url) + copy(dAtA[i:], m.Url) + i = encodeVarintUpgrade(dAtA, i, uint64(len(m.Url))) + i-- + dAtA[i] = 0x12 + } + if len(m.Id) > 0 { + i -= len(m.Id) + copy(dAtA[i:], m.Id) + i = encodeVarintUpgrade(dAtA, i, uint64(len(m.Id))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func encodeVarintUpgrade(dAtA []byte, offset int, v uint64) int { + offset -= sovUpgrade(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} + + +func (m *ResourceV0317) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Id) + if l > 0 { + n += 1 + l + sovUpgrade(uint64(l)) + } + l = len(m.Url) + if l > 0 { + n += 1 + l + sovUpgrade(uint64(l)) + } + l = len(m.Version) + if l > 0 { + n += 1 + l + sovUpgrade(uint64(l)) + } + l = len(m.Checksum) + if l > 0 { + n += 1 + l + sovUpgrade(uint64(l)) + } + return n +} + +func sovUpgrade(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozUpgrade(x uint64) (n int) { + return sovUpgrade(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} + + +func (m *ResourceV0317) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowUpgrade + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Resource: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Resource: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowUpgrade + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthUpgrade + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthUpgrade + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Id = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Url", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowUpgrade + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthUpgrade + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthUpgrade + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Url = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowUpgrade + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthUpgrade + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthUpgrade + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Version = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Checksum", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowUpgrade + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthUpgrade + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthUpgrade + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Checksum = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipUpgrade(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthUpgrade + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipUpgrade(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowUpgrade + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowUpgrade + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowUpgrade + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthUpgrade + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupUpgrade + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthUpgrade + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthUpgrade = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowUpgrade = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupUpgrade = fmt.Errorf("proto: unexpected end of group") +) \ No newline at end of file diff --git a/x/upgrade/module.go b/x/upgrade/module.go index 5f2233536..45c0b8729 100644 --- a/x/upgrade/module.go +++ b/x/upgrade/module.go @@ -3,6 +3,7 @@ package upgrade import ( "encoding/json" + sekaitypes "github.com/KiraCore/sekai/types" "github.com/KiraCore/sekai/x/upgrade/client/cli" "github.com/KiraCore/sekai/x/upgrade/keeper" "github.com/KiraCore/sekai/x/upgrade/types" @@ -41,6 +42,14 @@ func (b AppModuleBasic) DefaultGenesis(cdc codec.JSONCodec) json.RawMessage { // } func (b AppModuleBasic) ValidateGenesis(marshaler codec.JSONCodec, config client.TxEncodingConfig, message json.RawMessage) error { + genesis := types.GenesisState{} + err := marshaler.UnmarshalJSON(message, &genesis) + if err != nil { + return err + } + if sekaitypes.SekaiVersion != genesis.Version { + return types.ErrInvalidGenesisVersion + } return nil } @@ -90,6 +99,10 @@ func (am AppModule) InitGenesis( var genesisState types.GenesisState cdc.MustUnmarshalJSON(data, &genesisState) + if genesisState.Version != sekaitypes.SekaiVersion { + panic(types.ErrInvalidGenesisVersion) + } + if genesisState.CurrentPlan != nil { am.upgradeKeeper.SaveCurrentPlan(ctx, *genesisState.CurrentPlan) } diff --git a/x/upgrade/types/errors.go b/x/upgrade/types/errors.go index b8c7c3e01..881cad9f7 100644 --- a/x/upgrade/types/errors.go +++ b/x/upgrade/types/errors.go @@ -5,5 +5,6 @@ import ( ) var ( - ErrInvalidUpgradeTime = errors.Register(ModuleName, 1, "invalid upgrade time") + ErrInvalidUpgradeTime = errors.Register(ModuleName, 1, "invalid upgrade time") + ErrInvalidGenesisVersion = errors.Register(ModuleName, 2, "invalid genesis version") ) diff --git a/x/upgrade/types/genesis.go b/x/upgrade/types/genesis.go index 48181e444..373c354df 100644 --- a/x/upgrade/types/genesis.go +++ b/x/upgrade/types/genesis.go @@ -1,8 +1,13 @@ package types +import ( + sekaitypes "github.com/KiraCore/sekai/types" +) + // DefaultGenesis returns the default CustomGo genesis state func DefaultGenesis() *GenesisState { return &GenesisState{ + Version: sekaitypes.SekaiVersion, CurrentPlan: nil, NextPlan: nil, }