diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md
new file mode 100644
index 0000000..ea59817
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/bug_report.md
@@ -0,0 +1,33 @@
+---
+name: 👾 Bug Report
+about: Report a bug or issue with the project.
+title: ''
+labels: 'bug'
+assignees: ''
+
+---
+
+### Description
+A clear and concise description of what the bug is.
+
+### Steps To Reproduce
+1. Log in...
+2. Ensure that...
+3. Allow a long period of inactivity to pass...
+4. Observe that...
+5. Attempt to log in...
+
+### Current Behavior
+- After the period of inactivity...
+- When the user tries to log in using another method...
+- This causes a bug due to...
+
+### Expected Behavior
+- After a long period of inactivity...
+- When a user logs in successfully...
+- This ensures that only...
+
+### Environment
+- Platform: PC
+- Node: v18.18.0
+- Browser: Chrome 126.0.6478.56
\ No newline at end of file
diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml
new file mode 100644
index 0000000..163c1c4
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/config.yml
@@ -0,0 +1,10 @@
+blank_issues_enabled: false
+issue_template:
+ - name: 👾 Bug Report
+ description: Report a bug or issue with the project.
+ labels: ["bug"]
+ template: bug_report.md
+ - name: 💡 Feature Request
+ description: Create a new ticket for a new feature request.
+ labels: ["enhancement"]
+ template: feature_request.md
\ No newline at end of file
diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md
new file mode 100644
index 0000000..a4b8175
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/feature_request.md
@@ -0,0 +1,27 @@
+---
+name: 💡 Feature Request
+about: Create a new ticket for a new feature request
+title: ''
+labels: 'enhancement'
+assignees: ''
+
+---
+
+### Expected Behavior
+Describe the expected behavior here.
+
+### Specifications
+As a `user`, I would like to `action` so that `reason`.
+
+**Features:**
+- describe feature details here.
+
+**Development Tasks:**
+- [ ] Task 1
+- [ ] Task 2
+
+### Dependencies
+List any dependencies that are required for this feature by providing links to the issues or repositories.
+
+### References
+List any references that are related to this feature request.
\ No newline at end of file
diff --git a/.github/workflows/mainnet-package.yaml b/.github/workflows/mainnet-package.yaml
new file mode 100644
index 0000000..13bc440
--- /dev/null
+++ b/.github/workflows/mainnet-package.yaml
@@ -0,0 +1,76 @@
+name: build and package
+on:
+ push:
+ tags:
+ - "v*.*.*"
+env:
+ DOTNET_INSTALL_DIR: "./.dotnet"
+jobs:
+ publish:
+ runs-on: ebridge-runner
+ strategy:
+ matrix:
+ servicename:
+ [
+ AElf.CrossChainServer.AuthServer,
+ AElf.CrossChainServer.EntityHandler,
+ AElf.CrossChainServer.HttpApi.Host,
+ AElf.CrossChainServer.DbMigrator
+ ]
+ steps:
+ - uses: actions/checkout@v4
+ - uses: actions/setup-dotnet@v4
+ with:
+ dotnet-version: '8.0' # which dotnet version is required?
+ - run: dotnet publish src/${{ matrix.servicename }}/${{ matrix.servicename }}.csproj -o out/${{ matrix.servicename }}
+ - name: Upload build artifacts
+ uses: actions/upload-artifact@v4
+ with:
+ name: ${{ matrix.servicename }}
+ path: out/${{ matrix.servicename }}
+ retention-days: 1
+ build-and-push-image:
+ needs: publish
+ runs-on: ebridge-runner
+ strategy:
+ matrix:
+ servicename:
+ [
+ AElf.CrossChainServer.AuthServer,
+ AElf.CrossChainServer.EntityHandler,
+ AElf.CrossChainServer.HttpApi.Host,
+ AElf.CrossChainServer.DbMigrator
+ ]
+ permissions:
+ contents: read
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v4
+ - name: Download a single artifact
+ uses: actions/download-artifact@v4
+ with:
+ name: ${{ matrix.servicename }}
+ path: out/${{ matrix.servicename }}
+ - name: Create image tag
+ id: meta
+ uses: docker/metadata-action@v5
+ with:
+ images: ${{ secrets.REPOSITORY_REGION }}-docker.pkg.dev/${{ secrets.PROJECT_ID }}/${{ secrets.REPOSITORY }}/${{ matrix.servicename }}
+ tags: |
+ type=ref,event=tag
+ - # Setting up Docker Buildx with docker-container driver is required
+ # at the moment to be able to use a subdirectory with Git context
+ name: Set up Docker Buildx
+ uses: docker/setup-buildx-action@v3
+ - name: Build and push
+ uses: docker/build-push-action@v5
+ with:
+ context: .
+ push: true
+ build-args: |
+ servicename=${{ matrix.servicename }}
+ platforms: linux/amd64
+ tags: ${{ steps.meta.outputs.tags }}
+ labels: ${{ steps.meta.outputs.labels }}
+# cache-from: type=gha
+# cache-to: type=gha,mode=max
\ No newline at end of file
diff --git a/.github/workflows/security.yml b/.github/workflows/security.yml
new file mode 100644
index 0000000..62cc37d
--- /dev/null
+++ b/.github/workflows/security.yml
@@ -0,0 +1,23 @@
+name: Security Review
+
+permissions:
+ pull-requests: write
+ contents: read
+
+on:
+ pull_request:
+
+jobs:
+ security:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v4
+ with:
+ ref: ${{ github.event.pull_request.head.sha || github.sha }}
+ fetch-depth: 2
+
+ - uses: Portkey-Wallet/claude-code-security-review@main
+ with:
+ comment-pr: true
+ claude-api-key: ${{ secrets.CLAUDE_API_KEY }}
+ run-every-commit: true
diff --git a/.github/workflows/sonarqube.yaml b/.github/workflows/sonarqube.yaml
new file mode 100644
index 0000000..c3e4c3f
--- /dev/null
+++ b/.github/workflows/sonarqube.yaml
@@ -0,0 +1,43 @@
+on:
+ pull_request:
+ types: [opened, synchronize, reopened]
+
+name: PR Static Code Analysis
+jobs:
+ static-code-analysis:
+ runs-on: ubuntu-latest
+ steps:
+ - name: Code Checkout
+ uses: actions/checkout@v4
+ with:
+ fetch-depth: 0
+ - uses: actions/setup-dotnet@v4
+ with:
+ dotnet-version: '8.0'
+ - name: Set up JDK 17
+ uses: actions/setup-java@v4
+ with:
+ distribution: 'temurin'
+ java-version: 17
+ - name: Cache SonarQube packages
+ uses: actions/cache@v4
+ with:
+ path: ~/.sonar/cache
+ key: ${{ runner.os }}-sonar
+ restore-keys: ${{ runner.os }}-sonar
+ - name: Cache SonarQube scanner
+ id: cache-sonar-scanner
+ uses: actions/cache@v4
+ with:
+ path: ./.sonar/scanner
+ key: ${{ runner.os }}-sonar-scanner
+ restore-keys: ${{ runner.os }}-sonar-scanner
+ - name: Install SonarScanner for .NET
+ run: dotnet tool update dotnet-sonarscanner --tool-path ./.sonar/scanner
+ - name: Add .NET global tools to PATH
+ run: echo "$HOME/.dotnet/tools" >> $GITHUB_PATH
+ - name: Begin SonarQube analysis
+ run: |
+ ./.sonar/scanner/dotnet-sonarscanner begin /k:"ebridge-server" /d:sonar.host.url="${{ secrets.SONAR_HOST_URL }}" /d:sonar.token="${{ secrets.SONAR_TOKEN }}"
+ dotnet build
+ ./.sonar/scanner/dotnet-sonarscanner end /d:sonar.token="${{ secrets.SONAR_TOKEN }}"
\ No newline at end of file
diff --git a/.github/workflows/test-with-code-coverage.yml b/.github/workflows/test-with-code-coverage.yml
new file mode 100644
index 0000000..fe70243
--- /dev/null
+++ b/.github/workflows/test-with-code-coverage.yml
@@ -0,0 +1,61 @@
+name: Test with code coverage
+
+on:
+ push:
+ branches:
+ - 'release/*'
+
+env:
+ DOTNET_INSTALL_DIR: "./.dotnet"
+
+jobs:
+ test:
+ runs-on: ubuntu-latest
+ permissions:
+ pull-requests: write
+ contents: write
+ services:
+ elasticsearch:
+ image: elasticsearch:7.17.0
+ ports:
+ - 9200:9200
+ options: -e="discovery.type=single-node" -e="xpack.security.enabled=false" --health-cmd="curl http://localhost:9200/_cluster/health" --health-interval=10s --health-timeout=5s --health-retries=10
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v4
+ - name: Setup dotnet
+ uses: actions/setup-dotnet@v4
+ with:
+ dotnet-version: '8.0'
+ #- name: Verify Elasticsearch connection
+ # env:
+ # ELASTIC_SEARCH_URL: http://127.0.0.1:${{ job.services.elasticsearch.ports[9200] }}
+ # run: |
+ # echo $ELASTIC_SEARCH_URL
+ # curl -fsSL "$ELASTIC_SEARCH_URL/_cat/health?h=status"
+ - name: Download AElf build tools
+ run: bash scripts/download_binary.sh
+
+ - name: Install protobuf
+ run: bash scripts/install_protobuf.sh
+
+ - name: Install dependencies
+ run: dotnet restore --verbosity quiet
+
+ - name: Build
+ run: dotnet build --no-restore /clp:ErrorsOnly /p:GeneratePackageOnBuild=false --verbosity quiet
+
+ - name: Test
+ run: |
+ for name in `ls ./test/*.Tests/*.csproj | awk '{print $NF}'`;
+ do
+ dotnet test ${name} --no-restore --no-build --logger trx --settings CodeCoverage.runsettings --results-directory coverage --collect:"XPlat Code Coverage"
+ done
+
+ - name: Upload coverage reports to Codecov
+ uses: codecov/codecov-action@v4
+ with:
+ fail_ci_if_error: true
+ files: coverage/*/coverage.cobertura.xml
+ env:
+ CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
\ No newline at end of file
diff --git a/.github/workflows/testnet-package.yaml b/.github/workflows/testnet-package.yaml
new file mode 100644
index 0000000..afda7b0
--- /dev/null
+++ b/.github/workflows/testnet-package.yaml
@@ -0,0 +1,132 @@
+name: build and package
+on:
+ push:
+ branches:
+ - 'release/*'
+
+run-name: Deploy eBridgeServer on ${{ github.ref }} to Testnet from ${{ github.sha }})
+
+env:
+ DOTNET_INSTALL_DIR: "./.dotnet"
+
+concurrency:
+ group: workflow-${{ github.ref }}
+ cancel-in-progress: true
+
+jobs:
+ publish:
+ runs-on: ebridge-runner
+ strategy:
+ matrix:
+ servicename:
+ [
+ AElf.CrossChainServer.AuthServer,
+ AElf.CrossChainServer.EntityHandler,
+ AElf.CrossChainServer.HttpApi.Host
+ ]
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v4
+
+ - uses: actions/setup-dotnet@v4
+ with:
+ dotnet-version: "8.0"
+
+ - name: Cache NuGet Packages
+ id: nuget-packages
+ uses: actions/cache@v4
+ env:
+ cache-name: nuget-package-cache
+ with:
+ path: ~/.nuget/packages
+ key: ${{ runner.os }}-${{ env.cache-name }}-${{ matrix.servicename }}
+
+ - name: List NuGet Packages
+ if: ${{ steps.nuget-packages.outputs.cache-hit == 'true' }}
+ continue-on-error: true
+ run: ls -lh ~/.nuget/packages
+
+ - name: Publish .NET service
+ run: dotnet publish src/${{ matrix.servicename }}/${{ matrix.servicename }}.csproj -o out/${{ matrix.servicename }}
+
+ - name: Upload build artifacts
+ uses: actions/upload-artifact@v4
+ with:
+ name: ${{ matrix.servicename }}
+ path: out/${{ matrix.servicename }}
+ retention-days: 1
+
+ build-and-push-image:
+ needs: publish
+ runs-on: ebridge-runner
+ strategy:
+ matrix:
+ servicename:
+ [
+ AElf.CrossChainServer.AuthServer,
+ AElf.CrossChainServer.EntityHandler,
+ AElf.CrossChainServer.HttpApi.Host
+ ]
+ permissions:
+ contents: read
+ outputs:
+ short_sha: ${{ steps.vars.outputs.short_sha }}
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v4
+
+ - name: Set short git commit SHA
+ id: vars
+ run: |
+ calculatedSha=$(git rev-parse --short ${{ github.sha }})
+ echo "short_sha=$calculatedSha" >> "$GITHUB_OUTPUT"
+
+ - name: Download a single artifact
+ uses: actions/download-artifact@v4
+ with:
+ name: ${{ matrix.servicename }}
+ path: out/${{ matrix.servicename }}
+
+ - name: Create image tag
+ id: meta
+ uses: docker/metadata-action@v5
+ with:
+ images: ${{ secrets.REPOSITORY_REGION }}-docker.pkg.dev/${{ secrets.PROJECT_ID }}/${{ secrets.REPOSITORY }}/${{ matrix.servicename }}
+ tags: |
+ type=sha
+
+ - name: Set up Docker Buildx
+ uses: docker/setup-buildx-action@v3
+
+ - name: Build and push
+ uses: docker/build-push-action@v5
+ with:
+ context: .
+ push: true
+ build-args: |
+ servicename=${{ matrix.servicename }}
+ platforms: linux/amd64
+ tags: ${{ steps.meta.outputs.tags }}
+ labels: ${{ steps.meta.outputs.labels }}
+# cache-from: type=gha
+# cache-to: type=gha,mode=max
+
+ dispatch:
+ runs-on: eBridge-runner
+ needs: build-and-push-image
+ steps:
+ - name: Deploy
+ uses: actions/github-script@v6
+ with:
+ github-token: ${{ secrets.TOK }}
+ script: |
+ await github.rest.actions.createWorkflowDispatch({
+ owner: 'eBridgeCrosschain',
+ repo: 'devops',
+ workflow_id: 'deployment_testnet.yaml',
+ ref: 'main',
+ inputs: {
+ appName: 'ebridge-backend',
+ commit_sha: 'sha-${{ needs.build-and-push-image.outputs.short_sha }}',
+ }
+ })
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..a36f45f
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,264 @@
+## Ignore Visual Studio temporary files, build results, and
+## files generated by popular Visual Studio add-ons.
+
+# User-specific files
+*.suo
+*.user
+*.userosscache
+*.sln.docstates
+
+# User-specific files (MonoDevelop/Xamarin Studio)
+*.userprefs
+
+# Build results
+[Dd]ebug/
+[Dd]ebugPublic/
+[Rr]elease/
+[Rr]eleases/
+x64/
+x86/
+bld/
+[Bb]in/
+[Oo]bj/
+[Ll]og/
+.dotnet
+
+# Visual Studio 2015 cache/options directory
+.vs/
+# Uncomment if you have tasks that create the project's static files in wwwroot
+#wwwroot/
+
+# MSTest test Results
+[Tt]est[Rr]esult*/
+[Bb]uild[Ll]og.*
+
+# NUNIT
+*.VisualState.xml
+TestResult.xml
+
+# Build Results of an ATL Project
+[Dd]ebugPS/
+[Rr]eleasePS/
+dlldata.c
+
+# DNX
+project.lock.json
+artifacts/
+
+*_i.c
+*_p.c
+*_i.h
+*.ilk
+*.meta
+*.obj
+*.pch
+*.pdb
+*.pgc
+*.pgd
+*.rsp
+*.sbr
+*.tlb
+*.tli
+*.tlh
+*.tmp
+*.tmp_proj
+*.log
+*.vspscc
+*.vssscc
+.builds
+*.pidb
+*.svclog
+*.scc
+
+# Chutzpah Test files
+_Chutzpah*
+
+# Visual C++ cache files
+ipch/
+*.aps
+*.ncb
+*.opendb
+*.opensdf
+*.sdf
+*.cachefile
+*.VC.db
+*.VC.VC.opendb
+
+# Visual Studio profiler
+*.psess
+*.vsp
+*.vspx
+*.sap
+
+# TFS 2012 Local Workspace
+$tf/
+
+# Guidance Automation Toolkit
+*.gpState
+
+# ReSharper is a .NET coding add-in
+_ReSharper*/
+*.[Rr]e[Ss]harper
+*.DotSettings.user
+
+# JustCode is a .NET coding add-in
+.JustCode
+
+# TeamCity is a build add-in
+_TeamCity*
+
+# DotCover is a Code Coverage Tool
+*.dotCover
+
+# NCrunch
+_NCrunch_*
+.*crunch*.local.xml
+nCrunchTemp_*
+
+# MightyMoose
+*.mm.*
+AutoTest.Net/
+
+# Web workbench (sass)
+.sass-cache/
+
+# Installshield output folder
+[Ee]xpress/
+
+# DocProject is a documentation generator add-in
+DocProject/buildhelp/
+DocProject/Help/*.HxT
+DocProject/Help/*.HxC
+DocProject/Help/*.hhc
+DocProject/Help/*.hhk
+DocProject/Help/*.hhp
+DocProject/Help/Html2
+DocProject/Help/html
+
+# Click-Once directory
+publish/
+
+# Publish Web Output
+*.[Pp]ublish.xml
+*.azurePubxml
+# TODO: Comment the next line if you want to checkin your web deploy settings
+# but database connection strings (with potential passwords) will be unencrypted
+*.pubxml
+*.publishproj
+
+# Microsoft Azure Web App publish settings. Comment the next line if you want to
+# checkin your Azure Web App publish settings, but sensitive information contained
+# in these scripts will be unencrypted
+PublishScripts/
+
+# NuGet Packages
+*.nupkg
+# The packages folder can be ignored because of Package Restore
+**/packages/*
+# except build/, which is used as an MSBuild target.
+!**/packages/build/
+# Uncomment if necessary however generally it will be regenerated when needed
+#!**/packages/repositories.config
+# NuGet v3's project.json files produces more ignoreable files
+*.nuget.props
+*.nuget.targets
+
+# Microsoft Azure Build Output
+csx/
+*.build.csdef
+
+# Microsoft Azure Emulator
+ecf/
+rcf/
+
+# Windows Store app package directories and files
+AppPackages/
+BundleArtifacts/
+Package.StoreAssociation.xml
+_pkginfo.txt
+
+# Visual Studio cache files
+# files ending in .cache can be ignored
+*.[Cc]ache
+# but keep track of directories ending in .cache
+!*.[Cc]ache/
+
+# Others
+ClientBin/
+~$*
+*~
+*.dbmdl
+*.dbproj.schemaview
+*.pfx
+*.publishsettings
+node_modules/
+orleans.codegen.cs
+
+# Since there are multiple workflows, uncomment next line to ignore bower_components
+# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
+#bower_components/
+
+# RIA/Silverlight projects
+Generated_Code/
+
+# Backup & report files from converting an old project file
+# to a newer Visual Studio version. Backup files are not needed,
+# because we have git ;-)
+_UpgradeReport_Files/
+Backup*/
+UpgradeLog*.XML
+UpgradeLog*.htm
+
+# SQL Server files
+*.mdf
+*.ldf
+
+# Business Intelligence projects
+*.rdl.data
+*.bim.layout
+*.bim_*.settings
+
+# Microsoft Fakes
+FakesAssemblies/
+
+# GhostDoc plugin setting file
+*.GhostDoc.xml
+
+# Node.js Tools for Visual Studio
+.ntvs_analysis.dat
+
+# Visual Studio 6 build log
+*.plg
+
+# Visual Studio 6 workspace options file
+*.opt
+
+# Visual Studio LightSwitch build output
+**/*.HTMLClient/GeneratedArtifacts
+**/*.DesktopClient/GeneratedArtifacts
+**/*.DesktopClient/ModelManifest.xml
+**/*.Server/GeneratedArtifacts
+**/*.Server/ModelManifest.xml
+_Pvt_Extensions
+
+# Paket dependency manager
+.paket/paket.exe
+paket-files/
+
+# FAKE - F# Make
+.fake/
+
+# JetBrains Rider
+.idea/
+*.sln.iml
+
+#Codecov
+CodeCoverage
+
+src/AElf.CrossChainServer.HttpApi.Host/Logs/*
+src/AElf.CrossChainServer.IdentityServer/Logs/*
+src/AElf.CrossChainServer.DbMigrator/Logs/*
+src/AElf.CrossChainServer.EntityHandler/Logs/*
+src/AElf.CrossChainServer.ContractEventHandler/Logs/*
+
+**/wwwroot/libs/*
diff --git a/AElf.CrossChainServer.sln b/AElf.CrossChainServer.sln
new file mode 100644
index 0000000..2047560
--- /dev/null
+++ b/AElf.CrossChainServer.sln
@@ -0,0 +1,165 @@
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio Version 16
+VisualStudioVersion = 16.0.29020.237
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AElf.CrossChainServer.Domain", "src\AElf.CrossChainServer.Domain\AElf.CrossChainServer.Domain.csproj", "{554AD327-6DBA-4F8F-96F8-81CE7A0C863F}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AElf.CrossChainServer.Application", "src\AElf.CrossChainServer.Application\AElf.CrossChainServer.Application.csproj", "{1A94A50E-06DC-43C1-80B5-B662820EC3EB}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AElf.CrossChainServer.EntityFrameworkCore", "src\AElf.CrossChainServer.EntityFrameworkCore\AElf.CrossChainServer.EntityFrameworkCore.csproj", "{C956DD76-69C8-4A9C-83EA-D17DF83340FD}"
+EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{CA9AC87F-097E-4F15-8393-4BC07735A5B0}"
+EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{04DBDB01-70F4-4E06-B468-8F87850B22BE}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AElf.CrossChainServer.Application.Tests", "test\AElf.CrossChainServer.Application.Tests\AElf.CrossChainServer.Application.Tests.csproj", "{50B2631D-129C-47B3-A587-029CCD6099BC}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AElf.CrossChainServer.Domain.Shared", "src\AElf.CrossChainServer.Domain.Shared\AElf.CrossChainServer.Domain.Shared.csproj", "{42F719ED-8413-4895-B5B4-5AB56079BC66}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AElf.CrossChainServer.Application.Contracts", "src\AElf.CrossChainServer.Application.Contracts\AElf.CrossChainServer.Application.Contracts.csproj", "{520659C8-C734-4298-A3DA-B539DB9DFC0B}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AElf.CrossChainServer.HttpApi", "src\AElf.CrossChainServer.HttpApi\AElf.CrossChainServer.HttpApi.csproj", "{4164BDF7-F527-4E85-9CE6-E3C2D7426A27}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AElf.CrossChainServer.HttpApi.Client", "src\AElf.CrossChainServer.HttpApi.Client\AElf.CrossChainServer.HttpApi.Client.csproj", "{3B5A0094-670D-4BB1-BFDD-61B88A8773DC}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AElf.CrossChainServer.HttpApi.Host", "src\AElf.CrossChainServer.HttpApi.Host\AElf.CrossChainServer.HttpApi.Host.csproj", "{E6D5BF0E-DE92-4D82-A352-EF04B37CB11C}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AElf.CrossChainServer.EntityFrameworkCore.Tests", "test\AElf.CrossChainServer.EntityFrameworkCore.Tests\AElf.CrossChainServer.EntityFrameworkCore.Tests.csproj", "{1FE30EB9-74A9-47F5-A9F6-7B1FAB672D81}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AElf.CrossChainServer.TestBase", "test\AElf.CrossChainServer.TestBase\AElf.CrossChainServer.TestBase.csproj", "{91853F21-9CD9-4132-BC29-A7D5D84FFFE7}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AElf.CrossChainServer.Domain.Tests", "test\AElf.CrossChainServer.Domain.Tests\AElf.CrossChainServer.Domain.Tests.csproj", "{E512F4D9-9375-480F-A2F6-A46509F9D824}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AElf.CrossChainServer.HttpApi.Client.ConsoleTestApp", "test\AElf.CrossChainServer.HttpApi.Client.ConsoleTestApp\AElf.CrossChainServer.HttpApi.Client.ConsoleTestApp.csproj", "{EF480016-9127-4916-8735-D2466BDBC582}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AElf.CrossChainServer.DbMigrator", "src\AElf.CrossChainServer.DbMigrator\AElf.CrossChainServer.DbMigrator.csproj", "{AA94D832-1CCC-4715-95A9-A483F23A1A5D}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AElf.CrossChainServer.Worker", "src\AElf.CrossChainServer.Worker\AElf.CrossChainServer.Worker.csproj", "{68CC1E16-7370-4F26-A728-11CA1E17BAFC}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AElf.CrossChainServer.EntityHandler.Core", "src\AElf.CrossChainServer.EntityHandler.Core\AElf.CrossChainServer.EntityHandler.Core.csproj", "{DE635372-2830-49D6-8AB3-0718747EE28A}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AElf.CrossChainServer.EntityHandler", "src\AElf.CrossChainServer.EntityHandler\AElf.CrossChainServer.EntityHandler.csproj", "{07B948AC-AACC-4A84-9C59-E7CF0BD8DB29}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AElf.CrossChainServer.AetherlinkApi", "src\AElf.CrossChainServer.AetherlinkApi\AElf.CrossChainServer.AetherlinkApi.csproj", "{9311BF41-D5E8-4BD4-8B18-BE3ED24848E9}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AElf.CrossChainServer.AuthServer", "src\AElf.CrossChainServer.AuthServer\AElf.CrossChainServer.AuthServer.csproj", "{81A49BEA-810A-4591-B0FF-FFB765685C75}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AElf.CrossChainServer.EvmIndexer", "src\AElf.CrossChainServer.EvmIndexer\AElf.CrossChainServer.EvmIndexer.csproj", "{CE0B99D2-DBC4-421A-8684-50463B7D2F3E}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Any CPU = Debug|Any CPU
+ Release|Any CPU = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {554AD327-6DBA-4F8F-96F8-81CE7A0C863F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {554AD327-6DBA-4F8F-96F8-81CE7A0C863F}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {554AD327-6DBA-4F8F-96F8-81CE7A0C863F}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {554AD327-6DBA-4F8F-96F8-81CE7A0C863F}.Release|Any CPU.Build.0 = Release|Any CPU
+ {1A94A50E-06DC-43C1-80B5-B662820EC3EB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {1A94A50E-06DC-43C1-80B5-B662820EC3EB}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {1A94A50E-06DC-43C1-80B5-B662820EC3EB}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {1A94A50E-06DC-43C1-80B5-B662820EC3EB}.Release|Any CPU.Build.0 = Release|Any CPU
+ {C956DD76-69C8-4A9C-83EA-D17DF83340FD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {C956DD76-69C8-4A9C-83EA-D17DF83340FD}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {C956DD76-69C8-4A9C-83EA-D17DF83340FD}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {C956DD76-69C8-4A9C-83EA-D17DF83340FD}.Release|Any CPU.Build.0 = Release|Any CPU
+ {50B2631D-129C-47B3-A587-029CCD6099BC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {50B2631D-129C-47B3-A587-029CCD6099BC}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {50B2631D-129C-47B3-A587-029CCD6099BC}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {50B2631D-129C-47B3-A587-029CCD6099BC}.Release|Any CPU.Build.0 = Release|Any CPU
+ {42F719ED-8413-4895-B5B4-5AB56079BC66}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {42F719ED-8413-4895-B5B4-5AB56079BC66}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {42F719ED-8413-4895-B5B4-5AB56079BC66}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {42F719ED-8413-4895-B5B4-5AB56079BC66}.Release|Any CPU.Build.0 = Release|Any CPU
+ {520659C8-C734-4298-A3DA-B539DB9DFC0B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {520659C8-C734-4298-A3DA-B539DB9DFC0B}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {520659C8-C734-4298-A3DA-B539DB9DFC0B}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {520659C8-C734-4298-A3DA-B539DB9DFC0B}.Release|Any CPU.Build.0 = Release|Any CPU
+ {4164BDF7-F527-4E85-9CE6-E3C2D7426A27}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {4164BDF7-F527-4E85-9CE6-E3C2D7426A27}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {4164BDF7-F527-4E85-9CE6-E3C2D7426A27}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {4164BDF7-F527-4E85-9CE6-E3C2D7426A27}.Release|Any CPU.Build.0 = Release|Any CPU
+ {3B5A0094-670D-4BB1-BFDD-61B88A8773DC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {3B5A0094-670D-4BB1-BFDD-61B88A8773DC}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {3B5A0094-670D-4BB1-BFDD-61B88A8773DC}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {3B5A0094-670D-4BB1-BFDD-61B88A8773DC}.Release|Any CPU.Build.0 = Release|Any CPU
+ {E6D5BF0E-DE92-4D82-A352-EF04B37CB11C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {E6D5BF0E-DE92-4D82-A352-EF04B37CB11C}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {E6D5BF0E-DE92-4D82-A352-EF04B37CB11C}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {E6D5BF0E-DE92-4D82-A352-EF04B37CB11C}.Release|Any CPU.Build.0 = Release|Any CPU
+ {1FE30EB9-74A9-47F5-A9F6-7B1FAB672D81}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {1FE30EB9-74A9-47F5-A9F6-7B1FAB672D81}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {1FE30EB9-74A9-47F5-A9F6-7B1FAB672D81}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {1FE30EB9-74A9-47F5-A9F6-7B1FAB672D81}.Release|Any CPU.Build.0 = Release|Any CPU
+ {91853F21-9CD9-4132-BC29-A7D5D84FFFE7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {91853F21-9CD9-4132-BC29-A7D5D84FFFE7}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {91853F21-9CD9-4132-BC29-A7D5D84FFFE7}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {91853F21-9CD9-4132-BC29-A7D5D84FFFE7}.Release|Any CPU.Build.0 = Release|Any CPU
+ {E512F4D9-9375-480F-A2F6-A46509F9D824}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {E512F4D9-9375-480F-A2F6-A46509F9D824}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {E512F4D9-9375-480F-A2F6-A46509F9D824}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {E512F4D9-9375-480F-A2F6-A46509F9D824}.Release|Any CPU.Build.0 = Release|Any CPU
+ {EF480016-9127-4916-8735-D2466BDBC582}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {EF480016-9127-4916-8735-D2466BDBC582}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {EF480016-9127-4916-8735-D2466BDBC582}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {EF480016-9127-4916-8735-D2466BDBC582}.Release|Any CPU.Build.0 = Release|Any CPU
+ {AA94D832-1CCC-4715-95A9-A483F23A1A5D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {AA94D832-1CCC-4715-95A9-A483F23A1A5D}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {AA94D832-1CCC-4715-95A9-A483F23A1A5D}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {AA94D832-1CCC-4715-95A9-A483F23A1A5D}.Release|Any CPU.Build.0 = Release|Any CPU
+ {68CC1E16-7370-4F26-A728-11CA1E17BAFC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {68CC1E16-7370-4F26-A728-11CA1E17BAFC}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {68CC1E16-7370-4F26-A728-11CA1E17BAFC}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {68CC1E16-7370-4F26-A728-11CA1E17BAFC}.Release|Any CPU.Build.0 = Release|Any CPU
+ {DE635372-2830-49D6-8AB3-0718747EE28A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {DE635372-2830-49D6-8AB3-0718747EE28A}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {DE635372-2830-49D6-8AB3-0718747EE28A}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {DE635372-2830-49D6-8AB3-0718747EE28A}.Release|Any CPU.Build.0 = Release|Any CPU
+ {07B948AC-AACC-4A84-9C59-E7CF0BD8DB29}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {07B948AC-AACC-4A84-9C59-E7CF0BD8DB29}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {07B948AC-AACC-4A84-9C59-E7CF0BD8DB29}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {07B948AC-AACC-4A84-9C59-E7CF0BD8DB29}.Release|Any CPU.Build.0 = Release|Any CPU
+ {9311BF41-D5E8-4BD4-8B18-BE3ED24848E9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {9311BF41-D5E8-4BD4-8B18-BE3ED24848E9}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {9311BF41-D5E8-4BD4-8B18-BE3ED24848E9}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {9311BF41-D5E8-4BD4-8B18-BE3ED24848E9}.Release|Any CPU.Build.0 = Release|Any CPU
+ {81A49BEA-810A-4591-B0FF-FFB765685C75}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {81A49BEA-810A-4591-B0FF-FFB765685C75}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {81A49BEA-810A-4591-B0FF-FFB765685C75}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {81A49BEA-810A-4591-B0FF-FFB765685C75}.Release|Any CPU.Build.0 = Release|Any CPU
+ {CE0B99D2-DBC4-421A-8684-50463B7D2F3E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {CE0B99D2-DBC4-421A-8684-50463B7D2F3E}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {CE0B99D2-DBC4-421A-8684-50463B7D2F3E}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {CE0B99D2-DBC4-421A-8684-50463B7D2F3E}.Release|Any CPU.Build.0 = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+ GlobalSection(NestedProjects) = preSolution
+ {554AD327-6DBA-4F8F-96F8-81CE7A0C863F} = {CA9AC87F-097E-4F15-8393-4BC07735A5B0}
+ {1A94A50E-06DC-43C1-80B5-B662820EC3EB} = {CA9AC87F-097E-4F15-8393-4BC07735A5B0}
+ {C956DD76-69C8-4A9C-83EA-D17DF83340FD} = {CA9AC87F-097E-4F15-8393-4BC07735A5B0}
+ {50B2631D-129C-47B3-A587-029CCD6099BC} = {04DBDB01-70F4-4E06-B468-8F87850B22BE}
+ {42F719ED-8413-4895-B5B4-5AB56079BC66} = {CA9AC87F-097E-4F15-8393-4BC07735A5B0}
+ {520659C8-C734-4298-A3DA-B539DB9DFC0B} = {CA9AC87F-097E-4F15-8393-4BC07735A5B0}
+ {4164BDF7-F527-4E85-9CE6-E3C2D7426A27} = {CA9AC87F-097E-4F15-8393-4BC07735A5B0}
+ {3B5A0094-670D-4BB1-BFDD-61B88A8773DC} = {CA9AC87F-097E-4F15-8393-4BC07735A5B0}
+ {E6D5BF0E-DE92-4D82-A352-EF04B37CB11C} = {CA9AC87F-097E-4F15-8393-4BC07735A5B0}
+ {1FE30EB9-74A9-47F5-A9F6-7B1FAB672D81} = {04DBDB01-70F4-4E06-B468-8F87850B22BE}
+ {91853F21-9CD9-4132-BC29-A7D5D84FFFE7} = {04DBDB01-70F4-4E06-B468-8F87850B22BE}
+ {E512F4D9-9375-480F-A2F6-A46509F9D824} = {04DBDB01-70F4-4E06-B468-8F87850B22BE}
+ {EF480016-9127-4916-8735-D2466BDBC582} = {04DBDB01-70F4-4E06-B468-8F87850B22BE}
+ {AA94D832-1CCC-4715-95A9-A483F23A1A5D} = {CA9AC87F-097E-4F15-8393-4BC07735A5B0}
+ {68CC1E16-7370-4F26-A728-11CA1E17BAFC} = {CA9AC87F-097E-4F15-8393-4BC07735A5B0}
+ {DE635372-2830-49D6-8AB3-0718747EE28A} = {CA9AC87F-097E-4F15-8393-4BC07735A5B0}
+ {07B948AC-AACC-4A84-9C59-E7CF0BD8DB29} = {CA9AC87F-097E-4F15-8393-4BC07735A5B0}
+ {9311BF41-D5E8-4BD4-8B18-BE3ED24848E9} = {CA9AC87F-097E-4F15-8393-4BC07735A5B0}
+ {81A49BEA-810A-4591-B0FF-FFB765685C75} = {CA9AC87F-097E-4F15-8393-4BC07735A5B0}
+ {CE0B99D2-DBC4-421A-8684-50463B7D2F3E} = {CA9AC87F-097E-4F15-8393-4BC07735A5B0}
+ EndGlobalSection
+ GlobalSection(ExtensibilityGlobals) = postSolution
+ SolutionGuid = {28315BFD-90E7-4E14-A2EA-F3D23AF4126F}
+ EndGlobalSection
+EndGlobal
diff --git a/AElf.CrossChainServer.sln.DotSettings b/AElf.CrossChainServer.sln.DotSettings
new file mode 100644
index 0000000..cb0b2c9
--- /dev/null
+++ b/AElf.CrossChainServer.sln.DotSettings
@@ -0,0 +1,23 @@
+
+ True
+ WARNING
+ WARNING
+ WARNING
+ WARNING
+ WARNING
+ WARNING
+ WARNING
+ WARNING
+ Required
+ Required
+ Required
+ Required
+ False
+ True
+ False
+ False
+ True
+ False
+ False
+ SQL
+
\ No newline at end of file
diff --git a/CodeCoverage.runsettings b/CodeCoverage.runsettings
new file mode 100755
index 0000000..290c399
--- /dev/null
+++ b/CodeCoverage.runsettings
@@ -0,0 +1,46 @@
+
+
+
+
+
+
+
+ cobertura
+ [xunit.*]*,[*Tests]*
+
+ **/test/**/*.cs,
+ **/src/AElf.CrossChainServer.AuthServer/**/*.cs,
+ **/src/AElf.CrossChainServer.AetherlinkApi/**/*.cs,
+ **/src/AElf.CrossChainServer.EvmIndexer/**/*.cs,
+ **/src/AElf.CrossChainServer.Worker/**/*.cs,
+ **/src/AElf.CrossChainServer.DbMigrator/**/*.cs,
+ **/src/AElf.CrossChainServer.EntityHandler/**/*.cs,
+ **/src/AElf.CrossChainServer.HttpApi.Host/**/*.cs,
+ **/src/AElf.CrossChainServer.HttpApi.Client/**/*.cs,
+ **/src/AElf.CrossChainServer.Application.Contracts/**/*.cs,
+ **/src/AElf.CrossChainServer.EntityFrameworkCore/Migrations/*.cs,
+ **/src/AElf.CrossChainServer.Application/Contracts/**/*.cs,
+ **/src/AElf.CrossChainServer.Application/Chains/*.cs,
+ **/src/AElf.CrossChainServer.Application/Chains/Ton/*.cs,
+ **/src/AElf.CrossChainServer.Application/Indexer/**/*.cs,
+ **/src/AElf.CrossChainServer.Application/CrossChain/AetherlinkOptions.cs,
+ **/src/AElf.CrossChainServer.Application/CrossChain/CrossChainTransferAppService.ExceptionHandler.cs,
+ **/src/AElf.CrossChainServer.Application/CrossChain/IAetherLinkProvider.cs,
+ **/src/AElf.CrossChainServer.Application/CrossChain/ICheckTransferProvider.cs,
+ **/src/AElf.CrossChainServer.Application/TokenAccess/**/*.cs,
+ **/src/AElf.CrossChainServer.Application/TokenPool/ITokenLiquidityMonitorProvider.cs,
+ **/src/AElf.CrossChainServer.Domain/Notify/*.cs,
+ **/src/AElf.CrossChainServer.Domain/Data/**/*.cs,
+ **/src/AElf.CrossChainServer.Domain/OpenIddict/*.cs,
+ **/src/AElf.CrossChainServer.Domain/Chains/ChainDataSeedContributor.cs,
+ **/src/AElf.CrossChainServer.Domain.Shared/*.cs,
+ **/src/AElf.CrossChainServer.EntityFrameworkCore/EntityFrameworkCore/CrossChainServerDbContextFactory.cs,
+ **/src/AElf.CrossChainServer.EntityFrameworkCore/EntityFrameworkCore/EntityFrameworkCoreCrossChainServerDbSchemaMigrator.cs,
+ **/src/AElf.CrossChainServer.Application/HttpClient/*.cs
+ Obsolete,GeneratedCodeAttribute
+ false
+
+
+
+
+
\ No newline at end of file
diff --git a/Dockerfile b/Dockerfile
new file mode 100644
index 0000000..d2aee1c
--- /dev/null
+++ b/Dockerfile
@@ -0,0 +1,4 @@
+FROM mcr.microsoft.com/dotnet/sdk:8.0.302-1
+ARG servicename
+WORKDIR /app
+COPY out/$servicename .
\ No newline at end of file
diff --git a/NuGet.Config b/NuGet.Config
new file mode 100644
index 0000000..9210a2e
--- /dev/null
+++ b/NuGet.Config
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/azure-pipelines.yml b/azure-pipelines.yml
new file mode 100755
index 0000000..4d33a37
--- /dev/null
+++ b/azure-pipelines.yml
@@ -0,0 +1,30 @@
+jobs:
+ # All tasks on Linux
+ - job: build_all_linux
+ displayName: Build all tasks (Linux)
+ timeoutInMinutes: 120
+ pool:
+ vmImage: ubuntu-latest
+ steps:
+ - task: UseDotNet@2
+ displayName: 'Install .NET Core SDK'
+ inputs:
+ version: 8.0.x
+ - script: cd scripts && bash elasticsearch-linux.sh
+ displayName: 'Start an elasticsearch'
+ - script: bash build.sh --target=Build
+ displayName: 'Build'
+# - task: PublishTestResults@2
+# condition: always()
+# inputs:
+# testRunner: VSTest
+# testResultsFiles: '**/*.trx'
+# - task: reportgenerator@5
+# displayName: ReportGenerator
+# inputs:
+# reports: '$(Build.SourcesDirectory)/test/*/TestResults/*/coverage.cobertura.xml'
+# targetdir: '$(Build.SourcesDirectory)/CodeCoverage'
+# reporttypes: 'Cobertura'
+# assemblyfilters: '-xunit*'
+# - script: bash build.sh --target=Upload-Coverage-Azure
+# displayName: 'Upload data to Codecov'
\ No newline at end of file
diff --git a/build.cake b/build.cake
new file mode 100755
index 0000000..7b94d1b
--- /dev/null
+++ b/build.cake
@@ -0,0 +1,78 @@
+#tool nuget:?package=Codecov
+#addin nuget:?package=Cake.Codecov&version=0.8.0
+
+var target = Argument("target", "Default");
+var configuration = Argument("configuration", "Debug");
+var rootPath = "./";
+var srcPath = rootPath + "src/";
+var testPath = rootPath + "test/";
+var solution = rootPath + "AElf.CrossChainServer.sln";
+
+Task("Clean")
+ .Description("clean up project cache")
+ .Does(() =>
+{
+ CleanDirectories(srcPath + "**/bin");
+ CleanDirectories(srcPath + "**/obj");
+ CleanDirectories(testPath + "**/bin");
+ CleanDirectories(testPath + "**/obj");
+});
+
+Task("Restore")
+ .Description("restore project dependencies")
+ .Does(() =>
+{
+ DotNetCoreRestore(solution, new DotNetCoreRestoreSettings
+ {
+ Verbosity = DotNetCoreVerbosity.Quiet,
+ Sources = new [] { "https://www.myget.org/F/aelf-project-dev/api/v3/index.json", "https://api.nuget.org/v3/index.json" }
+ });
+});
+Task("Build")
+ .Description("Compilation project")
+ .IsDependentOn("Clean")
+ .IsDependentOn("Restore")
+ .Does(() =>
+{
+ var buildSetting = new DotNetCoreBuildSettings{
+ NoRestore = true,
+ Configuration = configuration,
+ ArgumentCustomization = args => {
+ return args.Append("/clp:ErrorsOnly")
+ .Append("-v quiet");}
+ };
+
+ DotNetCoreBuild(solution, buildSetting);
+});
+
+Task("Test-with-Codecov")
+ .Description("operation tes")
+ .IsDependentOn("Build")
+ .Does(() =>
+{
+ var testSetting = new DotNetCoreTestSettings{
+ Configuration = configuration,
+ NoRestore = true,
+ NoBuild = true,
+ ArgumentCustomization = args => {
+ return args
+ .Append("--logger trx")
+ .Append("--settings CodeCoverage.runsettings")
+ .Append("--collect:\"XPlat Code Coverage\"");
+ }
+ };
+ var testProjects = GetFiles("./test/*.Tests/*.csproj");
+ var testProjectList = testProjects.OrderBy(p=>p.FullPath).ToList();
+ foreach(var testProject in testProjectList)
+ {
+ DotNetCoreTest(testProject.FullPath, testSetting);
+ }
+});
+
+Task("Upload-Coverage-Azure")
+ .Does(() =>
+{
+ Codecov("./CodeCoverage/Cobertura.xml","$CODECOV_TOKEN");
+});
+
+RunTarget(target);
diff --git a/build.config b/build.config
new file mode 100755
index 0000000..610a1ce
--- /dev/null
+++ b/build.config
@@ -0,0 +1,3 @@
+#!/usr/bin/env bash
+CAKE_VERSION=0.37.0
+DOTNET_VERSION=8.0.302
diff --git a/build.ps1 b/build.ps1
new file mode 100755
index 0000000..e48d09a
--- /dev/null
+++ b/build.ps1
@@ -0,0 +1,154 @@
+#!/usr/bin/env pwsh
+$DotNetInstallerUri = 'https://dot.net/v1/dotnet-install.ps1';
+$DotNetUnixInstallerUri = 'https://dot.net/v1/dotnet-install.sh'
+$DotNetChannel = 'LTS'
+$PSScriptRoot = Split-Path $MyInvocation.MyCommand.Path -Parent
+
+[string] $CakeVersion = ''
+[string] $DotNetVersion= ''
+foreach($line in Get-Content (Join-Path $PSScriptRoot 'build.config'))
+{
+ if ($line -like 'CAKE_VERSION=*') {
+ $CakeVersion = $line.SubString(13)
+ }
+ elseif ($line -like 'DOTNET_VERSION=*') {
+ $DotNetVersion =$line.SubString(15)
+ }
+}
+
+
+if ([string]::IsNullOrEmpty($CakeVersion) -or [string]::IsNullOrEmpty($DotNetVersion)) {
+ 'Failed to parse Cake / .NET Core SDK Version'
+ exit 1
+}
+
+# Make sure tools folder exists
+$ToolPath = Join-Path $PSScriptRoot "tools"
+if (!(Test-Path $ToolPath)) {
+ Write-Verbose "Creating tools directory..."
+ New-Item -Path $ToolPath -Type Directory -Force | out-null
+}
+
+
+if ($PSVersionTable.PSEdition -ne 'Core') {
+ # Attempt to set highest encryption available for SecurityProtocol.
+ # PowerShell will not set this by default (until maybe .NET 4.6.x). This
+ # will typically produce a message for PowerShell v2 (just an info
+ # message though)
+ try {
+ # Set TLS 1.2 (3072), then TLS 1.1 (768), then TLS 1.0 (192), finally SSL 3.0 (48)
+ # Use integers because the enumeration values for TLS 1.2 and TLS 1.1 won't
+ # exist in .NET 4.0, even though they are addressable if .NET 4.5+ is
+ # installed (.NET 4.5 is an in-place upgrade).
+ [System.Net.ServicePointManager]::SecurityProtocol = 3072 -bor 768 -bor 192 -bor 48
+ } catch {
+ Write-Output 'Unable to set PowerShell to use TLS 1.2 and TLS 1.1 due to old .NET Framework installed. If you see underlying connection closed or trust errors, you may need to upgrade to .NET Framework 4.5+ and PowerShell v3'
+ }
+}
+
+###########################################################################
+# INSTALL .NET CORE CLI
+###########################################################################
+
+$env:DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1
+$env:DOTNET_CLI_TELEMETRY_OPTOUT=1
+$env:DOTNET_ROLL_FORWARD_ON_NO_CANDIDATE_FX=2
+
+
+Function Remove-PathVariable([string]$VariableToRemove)
+{
+ $SplitChar = ';'
+ if ($IsMacOS -or $IsLinux) {
+ $SplitChar = ':'
+ }
+
+ $path = [Environment]::GetEnvironmentVariable("PATH", "User")
+ if ($path -ne $null)
+ {
+ $newItems = $path.Split($SplitChar, [StringSplitOptions]::RemoveEmptyEntries) | Where-Object { "$($_)" -inotlike $VariableToRemove }
+ [Environment]::SetEnvironmentVariable("PATH", [System.String]::Join($SplitChar, $newItems), "User")
+ }
+
+ $path = [Environment]::GetEnvironmentVariable("PATH", "Process")
+ if ($path -ne $null)
+ {
+ $newItems = $path.Split($SplitChar, [StringSplitOptions]::RemoveEmptyEntries) | Where-Object { "$($_)" -inotlike $VariableToRemove }
+ [Environment]::SetEnvironmentVariable("PATH", [System.String]::Join($SplitChar, $newItems), "Process")
+ }
+}
+
+# Get .NET Core CLI path if installed.
+$FoundDotNetCliVersion = $null;
+if (Get-Command dotnet -ErrorAction SilentlyContinue) {
+ $FoundDotNetCliVersion = dotnet --version;
+}
+
+if($FoundDotNetCliVersion -ne $DotNetVersion) {
+ $InstallPath = Join-Path $PSScriptRoot ".dotnet"
+ if (!(Test-Path $InstallPath)) {
+ New-Item -Path $InstallPath -ItemType Directory -Force | Out-Null;
+ }
+
+ if ($IsMacOS -or $IsLinux) {
+ $ScriptPath = Join-Path $InstallPath 'dotnet-install.sh'
+ (New-Object System.Net.WebClient).DownloadFile($DotNetUnixInstallerUri, $ScriptPath);
+ & bash $ScriptPath --version "$DotNetVersion" --install-dir "$InstallPath" --channel "$DotNetChannel" --no-path
+
+ Remove-PathVariable "$InstallPath"
+ $env:PATH = "$($InstallPath):$env:PATH"
+ }
+ else {
+ $ScriptPath = Join-Path $InstallPath 'dotnet-install.ps1'
+ (New-Object System.Net.WebClient).DownloadFile($DotNetInstallerUri, $ScriptPath);
+ & $ScriptPath -Channel $DotNetChannel -Version $DotNetVersion -InstallDir $InstallPath;
+
+ Remove-PathVariable "$InstallPath"
+ $env:PATH = "$InstallPath;$env:PATH"
+ }
+ $env:DOTNET_ROOT=$InstallPath
+}
+
+###########################################################################
+# INSTALL CAKE
+###########################################################################
+
+# Make sure Cake has been installed.
+[string] $CakeExePath = ''
+[string] $CakeInstalledVersion = Get-Command dotnet-cake -ErrorAction SilentlyContinue | % {&$_.Source --version}
+
+if ($CakeInstalledVersion -eq $CakeVersion) {
+ # Cake found locally
+ $CakeExePath = (Get-Command dotnet-cake).Source
+}
+else {
+ $CakePath = [System.IO.Path]::Combine($ToolPath,'.store', 'cake.tool', $CakeVersion) # Old PowerShell versions Join-Path only supports one child path
+
+ $CakeExePath = (Get-ChildItem -Path $ToolPath -Filter "dotnet-cake*" -File| ForEach-Object FullName | Select-Object -First 1)
+
+
+ if ((!(Test-Path -Path $CakePath -PathType Container)) -or (!(Test-Path $CakeExePath -PathType Leaf))) {
+
+ if ((![string]::IsNullOrEmpty($CakeExePath)) -and (Test-Path $CakeExePath -PathType Leaf))
+ {
+ & dotnet tool uninstall --tool-path $ToolPath Cake.Tool
+ }
+
+ & dotnet tool install --tool-path $ToolPath --version $CakeVersion Cake.Tool
+ if ($LASTEXITCODE -ne 0)
+ {
+ 'Failed to install cake'
+ exit 1
+ }
+ $CakeExePath = (Get-ChildItem -Path $ToolPath -Filter "dotnet-cake*" -File| ForEach-Object FullName | Select-Object -First 1)
+ }
+}
+
+###########################################################################
+# RUN BUILD SCRIPT
+###########################################################################
+& "$CakeExePath" ./build.cake --bootstrap
+if ($LASTEXITCODE -eq 0)
+{
+ & "$CakeExePath" ./build.cake $args
+}
+exit $LASTEXITCODE
\ No newline at end of file
diff --git a/build.sh b/build.sh
new file mode 100755
index 0000000..06bcee8
--- /dev/null
+++ b/build.sh
@@ -0,0 +1,75 @@
+#!/usr/bin/env bash
+# Define varibles
+SCRIPT_DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
+source $SCRIPT_DIR/build.config
+TOOLS_DIR=$SCRIPT_DIR/tools
+CAKE_EXE=$TOOLS_DIR/dotnet-cake
+CAKE_PATH=$TOOLS_DIR/.store/cake.tool/$CAKE_VERSION
+
+if [ "$CAKE_VERSION" = "" ] || [ "$DOTNET_VERSION" = "" ]; then
+ echo "An error occured while parsing Cake / .NET Core SDK version."
+ exit 1
+fi
+
+# Make sure the tools folder exist.
+if [ ! -d "$TOOLS_DIR" ]; then
+ mkdir "$TOOLS_DIR"
+fi
+
+###########################################################################
+# INSTALL .NET CORE CLI
+###########################################################################
+
+export DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1
+export DOTNET_CLI_TELEMETRY_OPTOUT=1
+export DOTNET_SYSTEM_NET_HTTP_USESOCKETSHTTPHANDLER=0
+export DOTNET_ROLL_FORWARD_ON_NO_CANDIDATE_FX=2
+
+DOTNET_INSTALLED_VERSION=$(dotnet --version 2>&1)
+
+if [ "$DOTNET_VERSION" != "$DOTNET_INSTALLED_VERSION" ]; then
+ echo "Installing .NET CLI..."
+ if [ ! -d "$SCRIPT_DIR/.dotnet" ]; then
+ mkdir "$SCRIPT_DIR/.dotnet"
+ fi
+ curl -Lsfo "$SCRIPT_DIR/.dotnet/dotnet-install.sh" https://dot.net/v1/dotnet-install.sh
+ bash "$SCRIPT_DIR/.dotnet/dotnet-install.sh" --version $DOTNET_VERSION --install-dir .dotnet --no-path
+ export PATH="$SCRIPT_DIR/.dotnet":$PATH
+ export DOTNET_ROOT="$SCRIPT_DIR/.dotnet"
+fi
+
+###########################################################################
+# INSTALL CAKE
+###########################################################################
+
+CAKE_INSTALLED_VERSION=$(dotnet-cake --version 2>&1)
+
+if [ "$CAKE_VERSION" != "$CAKE_INSTALLED_VERSION" ]; then
+ if [ ! -f "$CAKE_EXE" ] || [ ! -d "$CAKE_PATH" ]; then
+ if [ -f "$CAKE_EXE" ]; then
+ dotnet tool uninstall --tool-path $TOOLS_DIR Cake.Tool
+ fi
+
+ echo "Installing Cake $CAKE_VERSION..."
+ dotnet tool install --tool-path $TOOLS_DIR --version $CAKE_VERSION Cake.Tool
+ if [ $? -ne 0 ]; then
+ echo "An error occured while installing Cake."
+ exit 1
+ fi
+ fi
+
+ # Make sure that Cake has been installed.
+ if [ ! -f "$CAKE_EXE" ]; then
+ echo "Could not find Cake.exe at '$CAKE_EXE'."
+ exit 1
+ fi
+else
+ CAKE_EXE="dotnet-cake"
+fi
+
+###########################################################################
+# RUN BUILD SCRIPT
+###########################################################################
+
+# Start Cake
+(exec "$CAKE_EXE" build.cake --bootstrap) && (exec "$CAKE_EXE" build.cake "$@")
\ No newline at end of file
diff --git a/codecov.sh b/codecov.sh
new file mode 100755
index 0000000..6b97c5b
--- /dev/null
+++ b/codecov.sh
@@ -0,0 +1,12 @@
+#!/usr/bin/env bash
+
+TOKEN=$1
+rm -r ./test/*.Tests/TestResults
+rm -r CodeCoverage
+for name in `ls ./test/*.Tests/*.csproj | awk '{print $NF}'`;
+do
+ echo ${name}
+ dotnet test ${name} --logger trx --settings CodeCoverage.runsettings --collect:"XPlat Code Coverage"
+done
+reportgenerator /test/*/TestResults/*/coverage.cobertura.xml -reports:./test/*/TestResults/*/coverage.cobertura.xml -targetdir:./CodeCoverage -reporttypes:Cobertura -assemblyfilters:-xunit*
+codecov -f ./CodeCoverage/Cobertura.xml -t ${TOKEN}
\ No newline at end of file
diff --git a/codecov.yml b/codecov.yml
new file mode 100755
index 0000000..23be405
--- /dev/null
+++ b/codecov.yml
@@ -0,0 +1,3 @@
+codecov:
+ notify:
+ after_n_builds: 1
\ No newline at end of file
diff --git a/common.props b/common.props
new file mode 100644
index 0000000..6ef9bae
--- /dev/null
+++ b/common.props
@@ -0,0 +1,15 @@
+
+
+ latest
+ 1.0.0
+ $(NoWarn);CS1591
+ app
+
+
+
+
+ $(NoWarn);0436
+
+
+
+
\ No newline at end of file
diff --git a/scripts/download_binary.bat b/scripts/download_binary.bat
new file mode 100644
index 0000000..02382a3
--- /dev/null
+++ b/scripts/download_binary.bat
@@ -0,0 +1,16 @@
+SET scriptdir=%~dp0
+
+SET version=v1.0.3
+SET filename=contract_csharp_plugin-%version%-win32.zip
+
+SET url=https://github.com/AElfProject/contract-plugin/releases/download/%version%/%filename%
+SET file=%scriptdir%%filename%
+
+if not exist "%scriptdir%contract_csharp_plugin.exe" (
+ if not exist "%file%" (
+ echo "download contract plugin from: %url%"
+ powershell -Command "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; Invoke-WebRequest -Uri '%url%' -OutFile '%file%'"
+ )
+ echo "unzip file: %file%"
+ unzip %scriptdir%%filename% -d %scriptdir%
+)
diff --git a/scripts/download_binary.sh b/scripts/download_binary.sh
new file mode 100644
index 0000000..49b8fdb
--- /dev/null
+++ b/scripts/download_binary.sh
@@ -0,0 +1,33 @@
+#!/usr/bin/env bash
+scriptdir=`dirname "$0"`
+
+d="Darwin"
+l="Linux"
+if [[ "$(uname -s | grep ${d})" != "" ]]; then
+ osn="macosx"
+elif [[ "$(uname -s | grep ${l})" != "" ]]; then
+ osn="linux"
+else
+ osn="windows"
+fi
+
+plugin="${scriptdir}/contract_csharp_plugin"
+
+version="v1.0.3"
+
+if [[ ! -f ${plugin} ]]; then
+ if [[ ${osn} == "macosx" ]]; then
+ suffix="osx"
+ elif [[ ${osn} == "linux" ]]; then
+ suffix="linux"
+ fi
+ filename=contract_csharp_plugin-${version}-${suffix}.zip
+ # Make sure you grab the latest version
+ if [[ ! -f ${filename} ]]; then
+ echo "download contract plugin ${filename} from github"
+ curl -OL https://github.com/AElfProject/contract-plugin/releases/download/${version}/${filename}
+ fi
+
+ # Unzip
+ unzip -o ${filename} -d "${scriptdir}"
+fi
diff --git a/scripts/elasticsearch-linux.sh b/scripts/elasticsearch-linux.sh
new file mode 100644
index 0000000..3b29595
--- /dev/null
+++ b/scripts/elasticsearch-linux.sh
@@ -0,0 +1,7 @@
+#!/bin/bash
+wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-7.15.1-linux-x86_64.tar.gz
+tar xzvf elasticsearch-7.15.1-linux-x86_64.tar.gz
+cd elasticsearch-7.15.1/
+bin/elasticsearch -d
+sleep 30
+curl http://127.0.0.1:9200
diff --git a/scripts/elasticsearch-macOS.sh b/scripts/elasticsearch-macOS.sh
new file mode 100644
index 0000000..620e400
--- /dev/null
+++ b/scripts/elasticsearch-macOS.sh
@@ -0,0 +1,7 @@
+#!/bin/bash
+wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-7.15.1-darwin-x86_64.tar.gz
+tar xzvf elasticsearch-7.15.1-darwin-x86_64.tar.gz
+cd elasticsearch-7.15.1/
+bin/elasticsearch -d
+sleep 30
+curl http://127.0.0.1:9200
diff --git a/scripts/elasticsearch-windows.ps1 b/scripts/elasticsearch-windows.ps1
new file mode 100644
index 0000000..c435a76
--- /dev/null
+++ b/scripts/elasticsearch-windows.ps1
@@ -0,0 +1,9 @@
+#!/usr/bin/env pwsh
+$WebClient = New-Object System.Net.WebClient
+$WebClient.DownloadFile("https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-7.15.1-windows-x86_64.zip","elasticsearch.zip")
+Expand-Archive -Path elasticsearch.zip -DestinationPath elasticsearch;
+cd elasticsearch/elasticsearch-7.15.1/
+.\bin\elasticsearch-service.bat install
+.\bin\elasticsearch-service.bat start
+sleep 30
+curl http://127.0.0.1:9200
diff --git a/scripts/install_protobuf.sh b/scripts/install_protobuf.sh
new file mode 100644
index 0000000..0d6400d
--- /dev/null
+++ b/scripts/install_protobuf.sh
@@ -0,0 +1,38 @@
+#!/bin/bash
+
+d="Darwin"
+l="Linux"
+if [[ "$(uname -s | grep ${d})" != "" ]]; then
+ osn="macosx"
+elif [[ "$(uname -s | grep ${l})" != "" ]]; then
+ osn="linux"
+else
+ osn="windows"
+fi
+
+echo "Install protobuf on ${osn}"
+
+if [[ ${osn} == "macosx" ]]; then
+ curl -OL https://github.com/protocolbuffers/protobuf/releases/download/v3.11.4/protoc-3.11.4-osx-x86_64.zip
+ unzip protoc-3.11.4-osx-x86_64.zip -d protoc3
+ sudo mv protoc3/bin/* /usr/local/bin/
+ sudo mv protoc3/include/* /usr/local/include
+ sudo chown ${USER} /usr/local/bin/protoc
+ sudo chown -R ${USER} /usr/local/include/google
+elif [[ ${osn} == "linux" ]]; then
+ # Make sure you grab the latest version
+ curl -OL https://github.com/google/protobuf/releases/download/v3.11.4/protoc-3.11.4-linux-x86_64.zip
+
+ # Unzip
+ unzip protoc-3.11.4-linux-x86_64.zip -d protoc3
+
+ # Move protoc to /usr/local/bin/
+ sudo mv protoc3/bin/* /usr/local/bin/
+
+ # Move protoc3/include to /usr/local/include/
+ sudo mv protoc3/include/* /usr/local/include/
+
+ # Optional: change owner
+ sudo chown ${USER} /usr/local/bin/protoc
+ sudo chown -R ${USER} /usr/local/include/google
+fi
diff --git a/src/AElf.CrossChainServer.AetherlinkApi/AElf.CrossChainServer.AetherlinkApi.csproj b/src/AElf.CrossChainServer.AetherlinkApi/AElf.CrossChainServer.AetherlinkApi.csproj
new file mode 100644
index 0000000..8ef07a2
--- /dev/null
+++ b/src/AElf.CrossChainServer.AetherlinkApi/AElf.CrossChainServer.AetherlinkApi.csproj
@@ -0,0 +1,18 @@
+
+
+
+
+
+ net8.0
+ AElf.AetherlinkApi
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/AElf.CrossChainServer.AetherlinkApi/CrossChainServerAetherlinkApiModule.cs b/src/AElf.CrossChainServer.AetherlinkApi/CrossChainServerAetherlinkApiModule.cs
new file mode 100644
index 0000000..1d39cf6
--- /dev/null
+++ b/src/AElf.CrossChainServer.AetherlinkApi/CrossChainServerAetherlinkApiModule.cs
@@ -0,0 +1,18 @@
+using AElf.CrossChainServer.TokenPrice;
+using Aetherlink.PriceServer;
+using Microsoft.Extensions.DependencyInjection;
+using Volo.Abp.Modularity;
+
+namespace AElf.AetherlinkApi;
+
+[DependsOn(
+ typeof(AetherlinkPriceServerModule)
+)]
+public class CrossChainServerAetherlinkApiModule : AbpModule
+{
+ public override void ConfigureServices(ServiceConfigurationContext context)
+ {
+ var configuration = context.Services.GetConfiguration();
+ context.Services.AddSingleton();
+ }
+}
\ No newline at end of file
diff --git a/src/AElf.CrossChainServer.AetherlinkApi/TokenPriceProvider.cs b/src/AElf.CrossChainServer.AetherlinkApi/TokenPriceProvider.cs
new file mode 100644
index 0000000..8483f71
--- /dev/null
+++ b/src/AElf.CrossChainServer.AetherlinkApi/TokenPriceProvider.cs
@@ -0,0 +1,62 @@
+using System;
+using System.Globalization;
+using System.Threading.Tasks;
+using AElf.CrossChainServer.TokenPrice;
+using AElf.ExceptionHandler;
+using Aetherlink.PriceServer;
+using Aetherlink.PriceServer.Dtos;
+using Serilog;
+using Volo.Abp.DependencyInjection;
+
+namespace AElf.AetherlinkApi;
+
+public class TokenPriceProvider : ITokenPriceProvider, ISingletonDependency
+{
+ private readonly IPriceServerProvider _priceServerProvider;
+
+ public TokenPriceProvider(IPriceServerProvider priceServerProvider)
+ {
+ _priceServerProvider = priceServerProvider;
+ }
+
+ [ExceptionHandler(typeof(Exception), Message = "GetPrice Error", LogOnly = true)]
+ public async Task GetPriceAsync(string pair)
+ {
+ var result = await _priceServerProvider.GetAggregatedTokenPriceAsync(new GetAggregatedTokenPriceRequestDto
+ {
+ TokenPair = pair,
+ AggregateType = AggregateType.Latest
+ });
+ var data = result.Data;
+ if (data == null)
+ {
+ Log.Error(
+ "Get token price from Aetherlink price service failed.");
+ return 0;
+ }
+ Log.Information(
+ "Get token price from Aetherlink price service, pair: {pair}, price: {price}, decimal: {tokenDecimal}",
+ data.TokenPair, data.Price, data.Decimal);
+
+ return (decimal)(data.Price / Math.Pow(10, (double)data.Decimal));
+ }
+
+ [ExceptionHandler(typeof(Exception), Message = "Get history price error", LogOnly = true)]
+ public async Task GetHistoryPriceAsync(string pair, string dateTime)
+ {
+ var date = DateTime.ParseExact(dateTime, "dd-MM-yyyy", CultureInfo.InvariantCulture).ToString("yyyyMMdd");
+
+ var tokenPair = pair;
+ var result = (await _priceServerProvider.GetDailyPriceAsync(new GetDailyPriceRequestDto
+ {
+ TokenPair = tokenPair,
+ TimeStamp = date
+ })).Data;
+
+ Log.Information(
+ "Get history token price from Aetherlink price service, tokenPair: {tokenPair}, TimeStamp: {date}, result.Price: {resultPrice}, result.Decimal: {resultDecimal}",
+ tokenPair, date, result.Price, result.Decimal);
+
+ return (decimal)(result.Price / Math.Pow(10, (double)result.Decimal));
+ }
+}
\ No newline at end of file
diff --git a/src/AElf.CrossChainServer.Application.Contracts/AElf.CrossChainServer.Application.Contracts.csproj b/src/AElf.CrossChainServer.Application.Contracts/AElf.CrossChainServer.Application.Contracts.csproj
new file mode 100644
index 0000000..7e40ce4
--- /dev/null
+++ b/src/AElf.CrossChainServer.Application.Contracts/AElf.CrossChainServer.Application.Contracts.csproj
@@ -0,0 +1,35 @@
+
+
+
+
+
+ net8.0
+ AElf.CrossChainServer
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/AElf.CrossChainServer.Application.Contracts/Chains/BlockDto.cs b/src/AElf.CrossChainServer.Application.Contracts/Chains/BlockDto.cs
new file mode 100644
index 0000000..9eef924
--- /dev/null
+++ b/src/AElf.CrossChainServer.Application.Contracts/Chains/BlockDto.cs
@@ -0,0 +1,28 @@
+using System;
+using System.Collections.Generic;
+
+namespace AElf.CrossChainServer.Chains;
+
+public class BlockDto
+{
+ public string BlockHash { get; set; }
+ public BlockHeaderDto Header { get; set; }
+ public BlockBodyDto Body { get; set; }
+}
+
+public class BlockHeaderDto
+{
+ public string PreviousBlockHash { get; set; }
+ public long Height { get; set; }
+
+ public DateTime Time { get; set; }
+
+ public string ChainId { get; set; }
+}
+
+public class BlockBodyDto
+{
+ public int TransactionsCount { get; set; }
+
+ public List Transactions { get; set; }
+}
\ No newline at end of file
diff --git a/src/AElf.CrossChainServer.Application.Contracts/Chains/ChainDto.cs b/src/AElf.CrossChainServer.Application.Contracts/Chains/ChainDto.cs
new file mode 100644
index 0000000..5f6c077
--- /dev/null
+++ b/src/AElf.CrossChainServer.Application.Contracts/Chains/ChainDto.cs
@@ -0,0 +1,16 @@
+using Volo.Abp.Application.Dtos;
+
+namespace AElf.CrossChainServer.Chains
+{
+ public class ChainDto: EntityDto
+ {
+ public string Name { get; set; }
+ ///
+ /// 0: AElf, 1: Evm, 2:TVM
+ ///
+ public BlockchainType Type { get; set; }
+ public bool IsMainChain { get; set; }
+ public int AElfChainId { get; set; }
+ public string BlockChain { get; set; }
+ }
+}
\ No newline at end of file
diff --git a/src/AElf.CrossChainServer.Application.Contracts/Chains/ChainStatusDto.cs b/src/AElf.CrossChainServer.Application.Contracts/Chains/ChainStatusDto.cs
new file mode 100644
index 0000000..ecac992
--- /dev/null
+++ b/src/AElf.CrossChainServer.Application.Contracts/Chains/ChainStatusDto.cs
@@ -0,0 +1,8 @@
+namespace AElf.CrossChainServer.Chains;
+
+public class ChainStatusDto
+{
+ public string ChainId { get; set; }
+ public long BlockHeight { get; set; }
+ public long ConfirmedBlockHeight { get; set; }
+}
\ No newline at end of file
diff --git a/src/AElf.CrossChainServer.Application.Contracts/Chains/CreateChainInput.cs b/src/AElf.CrossChainServer.Application.Contracts/Chains/CreateChainInput.cs
new file mode 100644
index 0000000..8f95cb5
--- /dev/null
+++ b/src/AElf.CrossChainServer.Application.Contracts/Chains/CreateChainInput.cs
@@ -0,0 +1,8 @@
+namespace AElf.CrossChainServer.Chains
+{
+ public class CreateChainInput
+ {
+ public int Id { get; set; }
+ public string Name { get; set; }
+ }
+}
\ No newline at end of file
diff --git a/src/AElf.CrossChainServer.Application.Contracts/Chains/FilterLogDto.cs b/src/AElf.CrossChainServer.Application.Contracts/Chains/FilterLogDto.cs
new file mode 100644
index 0000000..2fc57c1
--- /dev/null
+++ b/src/AElf.CrossChainServer.Application.Contracts/Chains/FilterLogDto.cs
@@ -0,0 +1,23 @@
+using System.Collections.Generic;
+using Nethereum.Hex.HexTypes;
+
+namespace AElf.CrossChainServer.Chains;
+
+public class FilterLogsDto
+{
+ public List Logs { get; set; }
+}
+
+public class FilterLog
+{
+ public bool Removed { get; set; }
+ public string Type { get; set; }
+ public long LogIndex { get; set; }
+ public string TransactionHash { get; set; }
+ public long TransactionIndex { get; set; }
+ public string BlockHash { get; set; }
+ public long BlockNumber { get; set; }
+ public string Address { get; set; }
+ public string Data { get; set; }
+ public object[] Topics { get; set; }
+}
diff --git a/src/AElf.CrossChainServer.Application.Contracts/Chains/FilterLogsAndEventsDto.cs b/src/AElf.CrossChainServer.Application.Contracts/Chains/FilterLogsAndEventsDto.cs
new file mode 100644
index 0000000..7fae68d
--- /dev/null
+++ b/src/AElf.CrossChainServer.Application.Contracts/Chains/FilterLogsAndEventsDto.cs
@@ -0,0 +1,17 @@
+using System.Collections.Generic;
+using Nethereum.ABI.FunctionEncoding.Attributes;
+using Nethereum.Contracts;
+
+namespace AElf.CrossChainServer.Chains;
+
+public class FilterLogsAndEventsDto where TEventDTO : IEventDTO, new()
+{
+ public List> Events { get; set; }
+}
+
+public class EventLogs where TEventDTO : IEventDTO, new()
+{
+ public TEventDTO Event { get; set; }
+
+ public FilterLog Log { get; set; }
+}
\ No newline at end of file
diff --git a/src/AElf.CrossChainServer.Application.Contracts/Chains/GetChainsInput.cs b/src/AElf.CrossChainServer.Application.Contracts/Chains/GetChainsInput.cs
new file mode 100644
index 0000000..2636943
--- /dev/null
+++ b/src/AElf.CrossChainServer.Application.Contracts/Chains/GetChainsInput.cs
@@ -0,0 +1,6 @@
+namespace AElf.CrossChainServer.Chains;
+
+public class GetChainsInput
+{
+ public BlockchainType? Type { get; set; }
+}
\ No newline at end of file
diff --git a/src/AElf.CrossChainServer.Application.Contracts/Chains/GetTonTransactionInput.cs b/src/AElf.CrossChainServer.Application.Contracts/Chains/GetTonTransactionInput.cs
new file mode 100644
index 0000000..c64732d
--- /dev/null
+++ b/src/AElf.CrossChainServer.Application.Contracts/Chains/GetTonTransactionInput.cs
@@ -0,0 +1,8 @@
+namespace AElf.CrossChainServer.Chains;
+
+public class GetTonTransactionInput
+{
+ public string ChainId { get; set; }
+ public string ContractAddress { get; set; }
+ public string LatestTransactionLt { get; set; }
+}
\ No newline at end of file
diff --git a/src/AElf.CrossChainServer.Application.Contracts/Chains/IBlockchainAppService.cs b/src/AElf.CrossChainServer.Application.Contracts/Chains/IBlockchainAppService.cs
new file mode 100644
index 0000000..ccc6a28
--- /dev/null
+++ b/src/AElf.CrossChainServer.Application.Contracts/Chains/IBlockchainAppService.cs
@@ -0,0 +1,25 @@
+using System.Collections.Generic;
+using System.Threading.Tasks;
+using AElf.Client.Dto;
+using AElf.CrossChainServer.Tokens;
+using Nethereum.ABI.FunctionEncoding.Attributes;
+
+namespace AElf.CrossChainServer.Chains
+{
+ public interface IBlockchainAppService
+ {
+ Task GetTokenInfoAsync(string chainId, string address, string symbol = null);
+ Task GetBlockByHeightAsync(string chainId, long height, bool includeTransactions = false);
+ Task GetChainStatusAsync(string chainId);
+ Task GetTransactionResultAsync(string chainId, string transactionId);
+ Task GetMerklePathAsync(string chainId, string transactionId);
+ Task> GetTonTransactionAsync(GetTonTransactionInput input);
+ Task GetTonUserFriendlyAddressAsync(string chainId, string address);
+ Task GetContractLogsAsync(string chainId, string contractAddress, long startHeight, long endHeight);
+ Task GetChainHeightAsync(string chainId);
+
+ Task> GetContractLogsAndParseAsync(string chainId,
+ string contractAddress, long startHeight, long endHeight, string logSignature)
+ where TEventDto : IEventDTO, new();
+ }
+}
\ No newline at end of file
diff --git a/src/AElf.CrossChainServer.Application.Contracts/Chains/IChainAppService.cs b/src/AElf.CrossChainServer.Application.Contracts/Chains/IChainAppService.cs
new file mode 100644
index 0000000..15e7d86
--- /dev/null
+++ b/src/AElf.CrossChainServer.Application.Contracts/Chains/IChainAppService.cs
@@ -0,0 +1,16 @@
+using System.Threading.Tasks;
+using Volo.Abp.Application.Dtos;
+
+namespace AElf.CrossChainServer.Chains
+{
+ public interface IChainAppService
+ {
+ Task> GetListAsync(GetChainsInput input);
+
+ Task GetAsync(string id);
+
+ Task GetByNameAsync(string name);
+
+ Task GetByAElfChainIdAsync(int aelfChainId);
+ }
+}
\ No newline at end of file
diff --git a/src/AElf.CrossChainServer.Application.Contracts/Chains/TonAddressHelper.cs b/src/AElf.CrossChainServer.Application.Contracts/Chains/TonAddressHelper.cs
new file mode 100644
index 0000000..c962473
--- /dev/null
+++ b/src/AElf.CrossChainServer.Application.Contracts/Chains/TonAddressHelper.cs
@@ -0,0 +1,92 @@
+using TonSdk.Core;
+
+namespace AElf.CrossChainServer.Chains;
+
+public partial class TonAddressHelper
+{
+ public static string GetTonUserFriendlyAddress(string rawAddress, bool isTestOnly = false,
+ bool isBounceable = false)
+ {
+ var splitRaw = rawAddress.Split(":");
+ var wc = int.Parse(splitRaw[0]);
+ var hash = ByteArrayHelper.HexStringToByteArray(splitRaw[1]);
+ var address = new Address(wc, hash, new AddressRewriteOptions
+ {
+ Bounceable = isBounceable,
+ TestOnly = isTestOnly
+ });
+ return address.ToString();
+ }
+
+ public static string GetTonRawAddress(string address)
+ {
+ var tonAddress = new Address(address);
+ var hash = tonAddress.GetHash();
+ var wc = tonAddress.GetWorkchain();
+ var raw = wc + ":" + hash.ToHex();
+ return raw;
+ }
+
+ public static bool IsTonFriendlyAddress(string source)
+ {
+ // Check length
+ if (source.Length != 48)
+ {
+ return false;
+ }
+
+ // Check if address is valid base64
+ return Base64Regex().IsMatch(source);
+ }
+
+ public static bool IsTonRawAddress(string source)
+ {
+ // Check if has delimiter
+ if (!source.Contains(':'))
+ {
+ return false;
+ }
+
+ var parts = source.Split(':');
+ if (parts.Length != 2)
+ {
+ return false;
+ }
+
+ var wc = parts[0];
+ var hash = parts[1];
+
+ // Check if wc is valid
+ if (!int.TryParse(wc, out _))
+ {
+ return false;
+ }
+
+ // Check if hash is valid
+ if (!HashRegex().IsMatch(hash.ToLower()))
+ {
+ return false;
+ }
+
+ // Check if hash length is correct
+ return hash.Length == 64;
+ }
+
+ public static string ConvertRawAddressToFriendly(string address, bool isTestOnly = false, bool isBounceable = false)
+ {
+ return IsTonRawAddress(address) ? GetTonUserFriendlyAddress(address, isTestOnly, isBounceable) : address;
+ }
+
+ [System.Text.RegularExpressions.GeneratedRegex(@"^[A-Za-z0-9+/_-]+$")]
+ private static partial System.Text.RegularExpressions.Regex Base64Regex();
+
+ [System.Text.RegularExpressions.GeneratedRegex(@"^[a-f0-9]+$")]
+ private static partial System.Text.RegularExpressions.Regex HashRegex();
+}
+
+public class AddressRewriteOptions : IAddressRewriteOptions
+{
+ public int? Workchain { get; set; }
+ public bool? Bounceable { get; set; }
+ public bool? TestOnly { get; set; }
+}
\ No newline at end of file
diff --git a/src/AElf.CrossChainServer.Application.Contracts/Chains/TonApiTransactionDto.cs b/src/AElf.CrossChainServer.Application.Contracts/Chains/TonApiTransactionDto.cs
new file mode 100644
index 0000000..c545864
--- /dev/null
+++ b/src/AElf.CrossChainServer.Application.Contracts/Chains/TonApiTransactionDto.cs
@@ -0,0 +1,110 @@
+using System.Collections.Generic;
+
+namespace AElf.CrossChainServer.Chains;
+
+public class TonApiTransactionDto
+{
+ public string Hash { get; set; }
+ public long Lt { get; set; }
+ public TonApiAccountDto Account { get; set; }
+ public bool Success { get; set; }
+ public long Utime { get; set; }
+ public string OrigStatus { get; set; }
+ public string EndStatus { get; set; }
+ public long TotalFees { get; set; }
+ public long EndBalance { get; set; }
+ public string TransactionType { get; set; }
+ public string StateUpdateOld { get; set; }
+ public string StateUpdateNew { get; set; }
+ public TonapiMessageDto InMsg { get; set; }
+ public List OutMsg { get; set; }
+ public string Block { get; set; }
+ public string PrevTransHash { get; set; }
+ public long PrevTransLt { get; set; }
+ public TonapiComputePhaseDto ComputePhase { get; set; }
+ public TonapiStoragePhaseDto StoragePhase { get; set; }
+ public TonapiCreditPhaseDto CreditPhase { get; set; }
+ public TonapiActionPhaseDto ActionPhase { get; set; }
+ public string BouncePhase { get; set; }
+ public bool Aborted { get; set; }
+ public bool Destroyed { get; set; }
+ public string Raw { get; set; }
+}
+
+public class TonApiAccountDto
+{
+ public string Address { get; set; }
+ public string Name { get; set; }
+ public bool IsScam { get; set; }
+ public string Icon { get; set; }
+ public bool IsWallet { get; set; }
+}
+
+public class TonapiMessageDto
+{
+ public string MsgType { get; set; }
+ public long CreatedLt { get; set; }
+ public bool IhrDisabled { get; set; }
+ public bool Bounce { get; set; }
+ public bool Bounced { get; set; }
+ public long Value { get; set; }
+ public long FwdFee { get; set; }
+ public long IhrFee { get; set; }
+ public TonApiAccountDto Destination { get; set; }
+ public TonApiAccountDto Source { get; set; }
+ public long ImportFee { get; set; }
+ public long CreatedAt { get; set; }
+ public string OpCode { get; set; }
+ public InitDto Init { get; set; }
+ public string Hash { get; set; }
+ public string RawBody { get; set; }
+ public string DecodedOpName { get; set; }
+ public DecodedBodyDto DecodedBody { get; set; }
+}
+
+public class InitDto
+{
+ public string Boc { get; set; }
+ public List Interfaces { get; set; }
+}
+
+public class TonapiComputePhaseDto
+{
+ public bool Skipped { get; set; }
+ public string SkipReason { get; set; }
+ public bool Success { get; set; }
+ public long GasFees { get; set; }
+ public long GasUsed { get; set; }
+ public long VmSteps { get; set; }
+ public int ExitCode { get; set; }
+ public string ExitCodeDescription { get; set; }
+}
+
+public class TonapiStoragePhaseDto
+{
+ public long FeesCollected { get; set; }
+ public long FeesDue { get; set; }
+ public string StatusChange { get; set; }
+}
+
+public class TonapiCreditPhaseDto
+{
+ public long FeesCollected { get; set; }
+ public long Credit { get; set; }
+}
+
+public class TonapiActionPhaseDto
+{
+ public bool Success { get; set; }
+ public int ResultCode { get; set; }
+ public int TotalActions { get; set; }
+ public int SkippedActions { get; set; }
+ public long FwdFees { get; set; }
+ public long TotalFees { get; set; }
+ public string ResultCodeDescription { get; set; }
+}
+
+public class DecodedBodyDto
+{
+ public string Payload { get; set; }
+}
\ No newline at end of file
diff --git a/src/AElf.CrossChainServer.Application.Contracts/Chains/TonTransactionDto.cs b/src/AElf.CrossChainServer.Application.Contracts/Chains/TonTransactionDto.cs
new file mode 100644
index 0000000..49dbfc7
--- /dev/null
+++ b/src/AElf.CrossChainServer.Application.Contracts/Chains/TonTransactionDto.cs
@@ -0,0 +1,59 @@
+using System.Collections.Generic;
+
+namespace AElf.CrossChainServer.Chains;
+
+public class TonTransactionDto
+{
+ public string Account { get; set; }
+ public TonBlockIdDto BlockRef { get; set; }
+ public string Hash { get; set; }
+ public TonMessageDto InMsg { get; set; }
+ public long McBlockSeqno { get; set; }
+ public string Lt { get; set; }
+ public int Now { get; set; }
+ public string OrigStatus { get; set; }
+ public List OutMsgs { get; set; }
+ public string PrevTransHash { get; set; }
+ public string PrevTransLt { get; set; }
+ public string TotalFees { get; set; }
+ public string TraceId { get; set; }
+}
+
+public class TonBlockIdDto
+{
+ public long Seqno { get; set; }
+ public string Shard { get; set; }
+ public int Workchain { get; set; }
+}
+
+public class TonMessageDto
+{
+ public bool? Bounce { get; set; }
+ public bool? Bounced { get; set; }
+ public string CreatedAt { get; set; }
+ public string CreatedLt { get; set; }
+ public string Destination { get; set; }
+ public string FwdFee { get; set; }
+ public string Hash { get; set; }
+ public bool? IhrDisabled { get; set; }
+ public string IhrFee { get; set; }
+ public string ImportFee { get; set; }
+ public TonMessageContentDto InitState { get; set; }
+ public TonMessageContentDto MessageContent { get; set; }
+ public string Opcode { get; set; }
+ public string Source { get; set; }
+ public string Value { get; set; }
+}
+
+public class TonMessageContentDto
+{
+ public string Body { get; set; }
+ public TonDecodedContentDto Decoded { get; set; }
+ public string Hash { get; set; }
+}
+
+public class TonDecodedContentDto
+{
+ public string Comment { get; set; }
+ public string Type { get; set; }
+}
\ No newline at end of file
diff --git a/src/AElf.CrossChainServer.Application.Contracts/Chains/TransactionResultDto.cs b/src/AElf.CrossChainServer.Application.Contracts/Chains/TransactionResultDto.cs
new file mode 100644
index 0000000..67dc513
--- /dev/null
+++ b/src/AElf.CrossChainServer.Application.Contracts/Chains/TransactionResultDto.cs
@@ -0,0 +1,14 @@
+using AElf.Client.Dto;
+
+namespace AElf.CrossChainServer.Chains;
+
+public class TransactionResultDto
+{
+ public string ChainId { get; set; }
+ public bool IsMined { get; set; }
+ public bool IsFailed { get; set; }
+ public long BlockHeight { get; set; }
+ public string BlockHash { get; set; }
+ public TransactionDto Transaction { get; set; }
+ public LogEventDto[] Logs { get; set; }
+}
\ No newline at end of file
diff --git a/src/AElf.CrossChainServer.Application.Contracts/Contracts/Acs0.c.cs b/src/AElf.CrossChainServer.Application.Contracts/Contracts/Acs0.c.cs
new file mode 100644
index 0000000..9bd543f
--- /dev/null
+++ b/src/AElf.CrossChainServer.Application.Contracts/Contracts/Acs0.c.cs
@@ -0,0 +1,303 @@
+//
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: acs0.proto
+//
+// Original file comments:
+// *
+// AElf Standards ACS0(Contract Deployment Standard)
+//
+// Used to manage the deployment and update of contracts.
+#pragma warning disable 0414, 1591
+#region Designer generated code
+
+using System.Collections.Generic;
+using aelf = global::AElf.CSharp.Core;
+
+namespace AElf.Standards.ACS0 {
+
+ #region Events
+ internal partial class ContractProposed : aelf::IEvent
+ {
+ public global::System.Collections.Generic.IEnumerable GetIndexed()
+ {
+ return new List
+ {
+ };
+ }
+
+ public ContractProposed GetNonIndexed()
+ {
+ return new ContractProposed
+ {
+ ProposedContractInputHash = ProposedContractInputHash,
+ };
+ }
+ }
+
+ internal partial class ContractDeployed : aelf::IEvent
+ {
+ public global::System.Collections.Generic.IEnumerable GetIndexed()
+ {
+ return new List
+ {
+ new ContractDeployed
+ {
+ Author = Author
+ },
+ new ContractDeployed
+ {
+ CodeHash = CodeHash
+ },
+ };
+ }
+
+ public ContractDeployed GetNonIndexed()
+ {
+ return new ContractDeployed
+ {
+ Address = Address,
+ Version = Version,
+ Name = Name,
+ };
+ }
+ }
+
+ internal partial class CodeCheckRequired : aelf::IEvent
+ {
+ public global::System.Collections.Generic.IEnumerable GetIndexed()
+ {
+ return new List
+ {
+ };
+ }
+
+ public CodeCheckRequired GetNonIndexed()
+ {
+ return new CodeCheckRequired
+ {
+ Code = Code,
+ ProposedContractInputHash = ProposedContractInputHash,
+ Category = Category,
+ IsSystemContract = IsSystemContract,
+ };
+ }
+ }
+
+ internal partial class CodeUpdated : aelf::IEvent
+ {
+ public global::System.Collections.Generic.IEnumerable GetIndexed()
+ {
+ return new List
+ {
+ new CodeUpdated
+ {
+ Address = Address
+ },
+ };
+ }
+
+ public CodeUpdated GetNonIndexed()
+ {
+ return new CodeUpdated
+ {
+ OldCodeHash = OldCodeHash,
+ NewCodeHash = NewCodeHash,
+ Version = Version,
+ };
+ }
+ }
+
+ #endregion
+ internal static partial class ACS0Container
+ {
+ static readonly string __ServiceName = "acs0.ACS0";
+
+ #region Marshallers
+ static readonly aelf::Marshaller __Marshaller_acs0_SystemContractDeploymentInput = aelf::Marshallers.Create((arg) => global::Google.Protobuf.MessageExtensions.ToByteArray(arg), global::AElf.Standards.ACS0.SystemContractDeploymentInput.Parser.ParseFrom);
+ static readonly aelf::Marshaller __Marshaller_aelf_Address = aelf::Marshallers.Create((arg) => global::Google.Protobuf.MessageExtensions.ToByteArray(arg), global::AElf.Types.Address.Parser.ParseFrom);
+ static readonly aelf::Marshaller __Marshaller_acs0_ContractDeploymentInput = aelf::Marshallers.Create((arg) => global::Google.Protobuf.MessageExtensions.ToByteArray(arg), global::AElf.Standards.ACS0.ContractDeploymentInput.Parser.ParseFrom);
+ static readonly aelf::Marshaller __Marshaller_acs0_ContractUpdateInput = aelf::Marshallers.Create((arg) => global::Google.Protobuf.MessageExtensions.ToByteArray(arg), global::AElf.Standards.ACS0.ContractUpdateInput.Parser.ParseFrom);
+ static readonly aelf::Marshaller __Marshaller_aelf_Hash = aelf::Marshallers.Create((arg) => global::Google.Protobuf.MessageExtensions.ToByteArray(arg), global::AElf.Types.Hash.Parser.ParseFrom);
+ static readonly aelf::Marshaller __Marshaller_acs0_ContractCodeCheckInput = aelf::Marshallers.Create((arg) => global::Google.Protobuf.MessageExtensions.ToByteArray(arg), global::AElf.Standards.ACS0.ContractCodeCheckInput.Parser.ParseFrom);
+ static readonly aelf::Marshaller __Marshaller_acs0_ReleaseContractInput = aelf::Marshallers.Create((arg) => global::Google.Protobuf.MessageExtensions.ToByteArray(arg), global::AElf.Standards.ACS0.ReleaseContractInput.Parser.ParseFrom);
+ static readonly aelf::Marshaller __Marshaller_google_protobuf_Empty = aelf::Marshallers.Create((arg) => global::Google.Protobuf.MessageExtensions.ToByteArray(arg), global::Google.Protobuf.WellKnownTypes.Empty.Parser.ParseFrom);
+ static readonly aelf::Marshaller __Marshaller_acs0_ValidateSystemContractAddressInput = aelf::Marshallers.Create((arg) => global::Google.Protobuf.MessageExtensions.ToByteArray(arg), global::AElf.Standards.ACS0.ValidateSystemContractAddressInput.Parser.ParseFrom);
+ static readonly aelf::Marshaller __Marshaller_google_protobuf_BoolValue = aelf::Marshallers.Create((arg) => global::Google.Protobuf.MessageExtensions.ToByteArray(arg), global::Google.Protobuf.WellKnownTypes.BoolValue.Parser.ParseFrom);
+ static readonly aelf::Marshaller __Marshaller_google_protobuf_Int64Value = aelf::Marshallers.Create((arg) => global::Google.Protobuf.MessageExtensions.ToByteArray(arg), global::Google.Protobuf.WellKnownTypes.Int64Value.Parser.ParseFrom);
+ static readonly aelf::Marshaller __Marshaller_acs0_ContractInfo = aelf::Marshallers.Create((arg) => global::Google.Protobuf.MessageExtensions.ToByteArray(arg), global::AElf.Standards.ACS0.ContractInfo.Parser.ParseFrom);
+ static readonly aelf::Marshaller __Marshaller_aelf_SmartContractRegistration = aelf::Marshallers.Create((arg) => global::Google.Protobuf.MessageExtensions.ToByteArray(arg), global::AElf.Types.SmartContractRegistration.Parser.ParseFrom);
+ static readonly aelf::Marshaller __Marshaller_acs0_ContractCodeHashList = aelf::Marshallers.Create((arg) => global::Google.Protobuf.MessageExtensions.ToByteArray(arg), global::AElf.Standards.ACS0.ContractCodeHashList.Parser.ParseFrom);
+ #endregion
+
+ #region Methods
+ static readonly aelf::Method __Method_DeploySystemSmartContract = new aelf::Method(
+ aelf::MethodType.Action,
+ __ServiceName,
+ "DeploySystemSmartContract",
+ __Marshaller_acs0_SystemContractDeploymentInput,
+ __Marshaller_aelf_Address);
+
+ static readonly aelf::Method __Method_DeploySmartContract = new aelf::Method(
+ aelf::MethodType.Action,
+ __ServiceName,
+ "DeploySmartContract",
+ __Marshaller_acs0_ContractDeploymentInput,
+ __Marshaller_aelf_Address);
+
+ static readonly aelf::Method __Method_UpdateSmartContract = new aelf::Method(
+ aelf::MethodType.Action,
+ __ServiceName,
+ "UpdateSmartContract",
+ __Marshaller_acs0_ContractUpdateInput,
+ __Marshaller_aelf_Address);
+
+ static readonly aelf::Method __Method_ProposeNewContract = new aelf::Method(
+ aelf::MethodType.Action,
+ __ServiceName,
+ "ProposeNewContract",
+ __Marshaller_acs0_ContractDeploymentInput,
+ __Marshaller_aelf_Hash);
+
+ static readonly aelf::Method __Method_ProposeContractCodeCheck = new aelf::Method(
+ aelf::MethodType.Action,
+ __ServiceName,
+ "ProposeContractCodeCheck",
+ __Marshaller_acs0_ContractCodeCheckInput,
+ __Marshaller_aelf_Hash);
+
+ static readonly aelf::Method __Method_ProposeUpdateContract = new aelf::Method(
+ aelf::MethodType.Action,
+ __ServiceName,
+ "ProposeUpdateContract",
+ __Marshaller_acs0_ContractUpdateInput,
+ __Marshaller_aelf_Hash);
+
+ static readonly aelf::Method __Method_ReleaseApprovedContract = new aelf::Method(
+ aelf::MethodType.Action,
+ __ServiceName,
+ "ReleaseApprovedContract",
+ __Marshaller_acs0_ReleaseContractInput,
+ __Marshaller_google_protobuf_Empty);
+
+ static readonly aelf::Method __Method_ReleaseCodeCheckedContract = new aelf::Method(
+ aelf::MethodType.Action,
+ __ServiceName,
+ "ReleaseCodeCheckedContract",
+ __Marshaller_acs0_ReleaseContractInput,
+ __Marshaller_google_protobuf_Empty);
+
+ static readonly aelf::Method __Method_ValidateSystemContractAddress = new aelf::Method(
+ aelf::MethodType.Action,
+ __ServiceName,
+ "ValidateSystemContractAddress",
+ __Marshaller_acs0_ValidateSystemContractAddressInput,
+ __Marshaller_google_protobuf_Empty);
+
+ static readonly aelf::Method __Method_SetContractProposerRequiredState = new aelf::Method(
+ aelf::MethodType.Action,
+ __ServiceName,
+ "SetContractProposerRequiredState",
+ __Marshaller_google_protobuf_BoolValue,
+ __Marshaller_google_protobuf_Empty);
+
+ static readonly aelf::Method __Method_CurrentContractSerialNumber = new aelf::Method(
+ aelf::MethodType.View,
+ __ServiceName,
+ "CurrentContractSerialNumber",
+ __Marshaller_google_protobuf_Empty,
+ __Marshaller_google_protobuf_Int64Value);
+
+ static readonly aelf::Method __Method_GetContractInfo = new aelf::Method(
+ aelf::MethodType.View,
+ __ServiceName,
+ "GetContractInfo",
+ __Marshaller_aelf_Address,
+ __Marshaller_acs0_ContractInfo);
+
+ static readonly aelf::Method __Method_GetContractAuthor = new aelf::Method(
+ aelf::MethodType.View,
+ __ServiceName,
+ "GetContractAuthor",
+ __Marshaller_aelf_Address,
+ __Marshaller_aelf_Address);
+
+ static readonly aelf::Method __Method_GetContractHash = new aelf::Method(
+ aelf::MethodType.View,
+ __ServiceName,
+ "GetContractHash",
+ __Marshaller_aelf_Address,
+ __Marshaller_aelf_Hash);
+
+ static readonly aelf::Method __Method_GetContractAddressByName = new aelf::Method(
+ aelf::MethodType.View,
+ __ServiceName,
+ "GetContractAddressByName",
+ __Marshaller_aelf_Hash,
+ __Marshaller_aelf_Address);
+
+ static readonly aelf::Method __Method_GetSmartContractRegistrationByAddress = new aelf::Method(
+ aelf::MethodType.View,
+ __ServiceName,
+ "GetSmartContractRegistrationByAddress",
+ __Marshaller_aelf_Address,
+ __Marshaller_aelf_SmartContractRegistration);
+
+ static readonly aelf::Method __Method_GetSmartContractRegistrationByCodeHash = new aelf::Method(
+ aelf::MethodType.View,
+ __ServiceName,
+ "GetSmartContractRegistrationByCodeHash",
+ __Marshaller_aelf_Hash,
+ __Marshaller_aelf_SmartContractRegistration);
+
+ static readonly aelf::Method __Method_GetContractCodeHashListByDeployingBlockHeight = new aelf::Method(
+ aelf::MethodType.View,
+ __ServiceName,
+ "GetContractCodeHashListByDeployingBlockHeight",
+ __Marshaller_google_protobuf_Int64Value,
+ __Marshaller_acs0_ContractCodeHashList);
+
+ #endregion
+
+ #region Descriptors
+ public static global::Google.Protobuf.Reflection.ServiceDescriptor Descriptor
+ {
+ get { return global::AElf.Standards.ACS0.Acs0Reflection.Descriptor.Services[0]; }
+ }
+
+ public static global::System.Collections.Generic.IReadOnlyList Descriptors
+ {
+ get
+ {
+ return new global::System.Collections.Generic.List()
+ {
+ global::AElf.Standards.ACS0.Acs0Reflection.Descriptor.Services[0],
+ };
+ }
+ }
+ #endregion
+
+ public class ACS0ReferenceState : global::AElf.Sdk.CSharp.State.ContractReferenceState
+ {
+ internal global::AElf.Sdk.CSharp.State.MethodReference DeploySystemSmartContract { get; set; }
+ internal global::AElf.Sdk.CSharp.State.MethodReference DeploySmartContract { get; set; }
+ internal global::AElf.Sdk.CSharp.State.MethodReference UpdateSmartContract { get; set; }
+ internal global::AElf.Sdk.CSharp.State.MethodReference ProposeNewContract { get; set; }
+ internal global::AElf.Sdk.CSharp.State.MethodReference ProposeContractCodeCheck { get; set; }
+ internal global::AElf.Sdk.CSharp.State.MethodReference ProposeUpdateContract { get; set; }
+ internal global::AElf.Sdk.CSharp.State.MethodReference ReleaseApprovedContract { get; set; }
+ internal global::AElf.Sdk.CSharp.State.MethodReference ReleaseCodeCheckedContract { get; set; }
+ internal global::AElf.Sdk.CSharp.State.MethodReference ValidateSystemContractAddress { get; set; }
+ internal global::AElf.Sdk.CSharp.State.MethodReference SetContractProposerRequiredState { get; set; }
+ internal global::AElf.Sdk.CSharp.State.MethodReference CurrentContractSerialNumber { get; set; }
+ internal global::AElf.Sdk.CSharp.State.MethodReference GetContractInfo { get; set; }
+ internal global::AElf.Sdk.CSharp.State.MethodReference GetContractAuthor { get; set; }
+ internal global::AElf.Sdk.CSharp.State.MethodReference GetContractHash { get; set; }
+ internal global::AElf.Sdk.CSharp.State.MethodReference GetContractAddressByName { get; set; }
+ internal global::AElf.Sdk.CSharp.State.MethodReference GetSmartContractRegistrationByAddress { get; set; }
+ internal global::AElf.Sdk.CSharp.State.MethodReference GetSmartContractRegistrationByCodeHash { get; set; }
+ internal global::AElf.Sdk.CSharp.State.MethodReference GetContractCodeHashListByDeployingBlockHeight { get; set; }
+ }
+ }
+}
+#endregion
+
diff --git a/src/AElf.CrossChainServer.Application.Contracts/Contracts/Acs0.g.cs b/src/AElf.CrossChainServer.Application.Contracts/Contracts/Acs0.g.cs
new file mode 100644
index 0000000..8d2298c
--- /dev/null
+++ b/src/AElf.CrossChainServer.Application.Contracts/Contracts/Acs0.g.cs
@@ -0,0 +1,3071 @@
+//
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: acs0.proto
+//
+#pragma warning disable 1591, 0612, 3021
+#region Designer generated code
+
+using pb = global::Google.Protobuf;
+using pbc = global::Google.Protobuf.Collections;
+using pbr = global::Google.Protobuf.Reflection;
+using scg = global::System.Collections.Generic;
+namespace AElf.Standards.ACS0 {
+
+ /// Holder for reflection information generated from acs0.proto
+ internal static partial class Acs0Reflection {
+
+ #region Descriptor
+ /// File descriptor for acs0.proto
+ public static pbr::FileDescriptor Descriptor {
+ get { return descriptor; }
+ }
+ private static pbr::FileDescriptor descriptor;
+
+ static Acs0Reflection() {
+ byte[] descriptorData = global::System.Convert.FromBase64String(
+ string.Concat(
+ "CgphY3MwLnByb3RvEgRhY3MwGg9hZWxmL2NvcmUucHJvdG8aEmFlbGYvb3B0",
+ "aW9ucy5wcm90bxobZ29vZ2xlL3Byb3RvYnVmL2VtcHR5LnByb3RvGh5nb29n",
+ "bGUvcHJvdG9idWYvd3JhcHBlcnMucHJvdG8iogEKDENvbnRyYWN0SW5mbxIV",
+ "Cg1zZXJpYWxfbnVtYmVyGAEgASgDEh0KBmF1dGhvchgCIAEoCzINLmFlbGYu",
+ "QWRkcmVzcxIQCghjYXRlZ29yeRgDIAEoERIdCgljb2RlX2hhc2gYBCABKAsy",
+ "Ci5hZWxmLkhhc2gSGgoSaXNfc3lzdGVtX2NvbnRyYWN0GAUgASgIEg8KB3Zl",
+ "cnNpb24YBiABKAUiOQoXQ29udHJhY3REZXBsb3ltZW50SW5wdXQSEAoIY2F0",
+ "ZWdvcnkYASABKBESDAoEY29kZRgCIAEoDCL7AgodU3lzdGVtQ29udHJhY3RE",
+ "ZXBsb3ltZW50SW5wdXQSEAoIY2F0ZWdvcnkYASABKBESDAoEY29kZRgCIAEo",
+ "DBIYCgRuYW1lGAMgASgLMgouYWVsZi5IYXNoEmkKHHRyYW5zYWN0aW9uX21l",
+ "dGhvZF9jYWxsX2xpc3QYBCABKAsyQy5hY3MwLlN5c3RlbUNvbnRyYWN0RGVw",
+ "bG95bWVudElucHV0LlN5c3RlbVRyYW5zYWN0aW9uTWV0aG9kQ2FsbExpc3Qa",
+ "QgobU3lzdGVtVHJhbnNhY3Rpb25NZXRob2RDYWxsEhMKC21ldGhvZF9uYW1l",
+ "GAEgASgJEg4KBnBhcmFtcxgCIAEoDBpxCh9TeXN0ZW1UcmFuc2FjdGlvbk1l",
+ "dGhvZENhbGxMaXN0Ek4KBXZhbHVlGAEgAygLMj8uYWNzMC5TeXN0ZW1Db250",
+ "cmFjdERlcGxveW1lbnRJbnB1dC5TeXN0ZW1UcmFuc2FjdGlvbk1ldGhvZENh",
+ "bGwiQwoTQ29udHJhY3RVcGRhdGVJbnB1dBIeCgdhZGRyZXNzGAEgASgLMg0u",
+ "YWVsZi5BZGRyZXNzEgwKBGNvZGUYAiABKAwi0wEKFkNvbnRyYWN0Q29kZUNo",
+ "ZWNrSW5wdXQSFgoOY29udHJhY3RfaW5wdXQYASABKAwSHgoWaXNfY29udHJh",
+ "Y3RfZGVwbG95bWVudBgCIAEoCBIhChljb2RlX2NoZWNrX3JlbGVhc2VfbWV0",
+ "aG9kGAMgASgJEjAKHHByb3Bvc2VkX2NvbnRyYWN0X2lucHV0X2hhc2gYBCAB",
+ "KAsyCi5hZWxmLkhhc2gSEAoIY2F0ZWdvcnkYBSABKBESGgoSaXNfc3lzdGVt",
+ "X2NvbnRyYWN0GAYgASgIIkoKEENvbnRyYWN0UHJvcG9zZWQSMAoccHJvcG9z",
+ "ZWRfY29udHJhY3RfaW5wdXRfaGFzaBgBIAEoCzIKLmFlbGYuSGFzaDoEoLsY",
+ "ASKvAQoQQ29udHJhY3REZXBsb3llZBIkCgZhdXRob3IYASABKAsyDS5hZWxm",
+ "LkFkZHJlc3NCBYiP9QEBEiQKCWNvZGVfaGFzaBgCIAEoCzIKLmFlbGYuSGFz",
+ "aEIFiI/1AQESHgoHYWRkcmVzcxgDIAEoCzINLmFlbGYuQWRkcmVzcxIPCgd2",
+ "ZXJzaW9uGAQgASgFEhgKBE5hbWUYBSABKAsyCi5hZWxmLkhhc2g6BKC7GAEi",
+ "hwEKEUNvZGVDaGVja1JlcXVpcmVkEgwKBGNvZGUYASABKAwSMAoccHJvcG9z",
+ "ZWRfY29udHJhY3RfaW5wdXRfaGFzaBgCIAEoCzIKLmFlbGYuSGFzaBIQCghj",
+ "YXRlZ29yeRgDIAEoERIaChJpc19zeXN0ZW1fY29udHJhY3QYBCABKAg6BKC7",
+ "GAEikQEKC0NvZGVVcGRhdGVkEiUKB2FkZHJlc3MYASABKAsyDS5hZWxmLkFk",
+ "ZHJlc3NCBYiP9QEBEiEKDW9sZF9jb2RlX2hhc2gYAiABKAsyCi5hZWxmLkhh",
+ "c2gSIQoNbmV3X2NvZGVfaGFzaBgDIAEoCzIKLmFlbGYuSGFzaBIPCgd2ZXJz",
+ "aW9uGAQgASgFOgSguxgBInMKIlZhbGlkYXRlU3lzdGVtQ29udHJhY3RBZGRy",
+ "ZXNzSW5wdXQSLQoZc3lzdGVtX2NvbnRyYWN0X2hhc2hfbmFtZRgBIAEoCzIK",
+ "LmFlbGYuSGFzaBIeCgdhZGRyZXNzGAIgASgLMg0uYWVsZi5BZGRyZXNzImkK",
+ "FFJlbGVhc2VDb250cmFjdElucHV0Eh8KC3Byb3Bvc2FsX2lkGAEgASgLMgou",
+ "YWVsZi5IYXNoEjAKHHByb3Bvc2VkX2NvbnRyYWN0X2lucHV0X2hhc2gYAiAB",
+ "KAsyCi5hZWxmLkhhc2giMQoUQ29udHJhY3RDb2RlSGFzaExpc3QSGQoFdmFs",
+ "dWUYASADKAsyCi5hZWxmLkhhc2gilAEKE0NvbnRyYWN0Q29kZUhhc2hNYXAS",
+ "MwoFdmFsdWUYASADKAsyJC5hY3MwLkNvbnRyYWN0Q29kZUhhc2hNYXAuVmFs",
+ "dWVFbnRyeRpICgpWYWx1ZUVudHJ5EgsKA2tleRgBIAEoAxIpCgV2YWx1ZRgC",
+ "IAEoCzIaLmFjczAuQ29udHJhY3RDb2RlSGFzaExpc3Q6AjgBMogLCgRBQ1Mw",
+ "ElEKGURlcGxveVN5c3RlbVNtYXJ0Q29udHJhY3QSIy5hY3MwLlN5c3RlbUNv",
+ "bnRyYWN0RGVwbG95bWVudElucHV0Gg0uYWVsZi5BZGRyZXNzIgASRQoTRGVw",
+ "bG95U21hcnRDb250cmFjdBIdLmFjczAuQ29udHJhY3REZXBsb3ltZW50SW5w",
+ "dXQaDS5hZWxmLkFkZHJlc3MiABJBChNVcGRhdGVTbWFydENvbnRyYWN0Ehku",
+ "YWNzMC5Db250cmFjdFVwZGF0ZUlucHV0Gg0uYWVsZi5BZGRyZXNzIgASQQoS",
+ "UHJvcG9zZU5ld0NvbnRyYWN0Eh0uYWNzMC5Db250cmFjdERlcGxveW1lbnRJ",
+ "bnB1dBoKLmFlbGYuSGFzaCIAEkYKGFByb3Bvc2VDb250cmFjdENvZGVDaGVj",
+ "axIcLmFjczAuQ29udHJhY3RDb2RlQ2hlY2tJbnB1dBoKLmFlbGYuSGFzaCIA",
+ "EkAKFVByb3Bvc2VVcGRhdGVDb250cmFjdBIZLmFjczAuQ29udHJhY3RVcGRh",
+ "dGVJbnB1dBoKLmFlbGYuSGFzaCIAEk8KF1JlbGVhc2VBcHByb3ZlZENvbnRy",
+ "YWN0EhouYWNzMC5SZWxlYXNlQ29udHJhY3RJbnB1dBoWLmdvb2dsZS5wcm90",
+ "b2J1Zi5FbXB0eSIAElIKGlJlbGVhc2VDb2RlQ2hlY2tlZENvbnRyYWN0Ehou",
+ "YWNzMC5SZWxlYXNlQ29udHJhY3RJbnB1dBoWLmdvb2dsZS5wcm90b2J1Zi5F",
+ "bXB0eSIAEmMKHVZhbGlkYXRlU3lzdGVtQ29udHJhY3RBZGRyZXNzEiguYWNz",
+ "MC5WYWxpZGF0ZVN5c3RlbUNvbnRyYWN0QWRkcmVzc0lucHV0GhYuZ29vZ2xl",
+ "LnByb3RvYnVmLkVtcHR5IgASWAogU2V0Q29udHJhY3RQcm9wb3NlclJlcXVp",
+ "cmVkU3RhdGUSGi5nb29nbGUucHJvdG9idWYuQm9vbFZhbHVlGhYuZ29vZ2xl",
+ "LnByb3RvYnVmLkVtcHR5IgASWQobQ3VycmVudENvbnRyYWN0U2VyaWFsTnVt",
+ "YmVyEhYuZ29vZ2xlLnByb3RvYnVmLkVtcHR5GhsuZ29vZ2xlLnByb3RvYnVm",
+ "LkludDY0VmFsdWUiBYiJ9wEBEjsKD0dldENvbnRyYWN0SW5mbxINLmFlbGYu",
+ "QWRkcmVzcxoSLmFjczAuQ29udHJhY3RJbmZvIgWIifcBARI4ChFHZXRDb250",
+ "cmFjdEF1dGhvchINLmFlbGYuQWRkcmVzcxoNLmFlbGYuQWRkcmVzcyIFiIn3",
+ "AQESMwoPR2V0Q29udHJhY3RIYXNoEg0uYWVsZi5BZGRyZXNzGgouYWVsZi5I",
+ "YXNoIgWIifcBARI8ChhHZXRDb250cmFjdEFkZHJlc3NCeU5hbWUSCi5hZWxm",
+ "Lkhhc2gaDS5hZWxmLkFkZHJlc3MiBYiJ9wEBEl4KJUdldFNtYXJ0Q29udHJh",
+ "Y3RSZWdpc3RyYXRpb25CeUFkZHJlc3MSDS5hZWxmLkFkZHJlc3MaHy5hZWxm",
+ "LlNtYXJ0Q29udHJhY3RSZWdpc3RyYXRpb24iBYiJ9wEBElwKJkdldFNtYXJ0",
+ "Q29udHJhY3RSZWdpc3RyYXRpb25CeUNvZGVIYXNoEgouYWVsZi5IYXNoGh8u",
+ "YWVsZi5TbWFydENvbnRyYWN0UmVnaXN0cmF0aW9uIgWIifcBARJvCi1HZXRD",
+ "b250cmFjdENvZGVIYXNoTGlzdEJ5RGVwbG95aW5nQmxvY2tIZWlnaHQSGy5n",
+ "b29nbGUucHJvdG9idWYuSW50NjRWYWx1ZRoaLmFjczAuQ29udHJhY3RDb2Rl",
+ "SGFzaExpc3QiBYiJ9wEBQhaqAhNBRWxmLlN0YW5kYXJkcy5BQ1MwUABiBnBy",
+ "b3RvMw=="));
+ descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
+ new pbr::FileDescriptor[] { global::AElf.Types.CoreReflection.Descriptor, global::AElf.OptionsReflection.Descriptor, global::Google.Protobuf.WellKnownTypes.EmptyReflection.Descriptor, global::Google.Protobuf.WellKnownTypes.WrappersReflection.Descriptor, },
+ new pbr::GeneratedClrTypeInfo(null, null, new pbr::GeneratedClrTypeInfo[] {
+ new pbr::GeneratedClrTypeInfo(typeof(global::AElf.Standards.ACS0.ContractInfo), global::AElf.Standards.ACS0.ContractInfo.Parser, new[]{ "SerialNumber", "Author", "Category", "CodeHash", "IsSystemContract", "Version" }, null, null, null, null),
+ new pbr::GeneratedClrTypeInfo(typeof(global::AElf.Standards.ACS0.ContractDeploymentInput), global::AElf.Standards.ACS0.ContractDeploymentInput.Parser, new[]{ "Category", "Code" }, null, null, null, null),
+ new pbr::GeneratedClrTypeInfo(typeof(global::AElf.Standards.ACS0.SystemContractDeploymentInput), global::AElf.Standards.ACS0.SystemContractDeploymentInput.Parser, new[]{ "Category", "Code", "Name", "TransactionMethodCallList" }, null, null, null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::AElf.Standards.ACS0.SystemContractDeploymentInput.Types.SystemTransactionMethodCall), global::AElf.Standards.ACS0.SystemContractDeploymentInput.Types.SystemTransactionMethodCall.Parser, new[]{ "MethodName", "Params" }, null, null, null, null),
+ new pbr::GeneratedClrTypeInfo(typeof(global::AElf.Standards.ACS0.SystemContractDeploymentInput.Types.SystemTransactionMethodCallList), global::AElf.Standards.ACS0.SystemContractDeploymentInput.Types.SystemTransactionMethodCallList.Parser, new[]{ "Value" }, null, null, null, null)}),
+ new pbr::GeneratedClrTypeInfo(typeof(global::AElf.Standards.ACS0.ContractUpdateInput), global::AElf.Standards.ACS0.ContractUpdateInput.Parser, new[]{ "Address", "Code" }, null, null, null, null),
+ new pbr::GeneratedClrTypeInfo(typeof(global::AElf.Standards.ACS0.ContractCodeCheckInput), global::AElf.Standards.ACS0.ContractCodeCheckInput.Parser, new[]{ "ContractInput", "IsContractDeployment", "CodeCheckReleaseMethod", "ProposedContractInputHash", "Category", "IsSystemContract" }, null, null, null, null),
+ new pbr::GeneratedClrTypeInfo(typeof(global::AElf.Standards.ACS0.ContractProposed), global::AElf.Standards.ACS0.ContractProposed.Parser, new[]{ "ProposedContractInputHash" }, null, null, null, null),
+ new pbr::GeneratedClrTypeInfo(typeof(global::AElf.Standards.ACS0.ContractDeployed), global::AElf.Standards.ACS0.ContractDeployed.Parser, new[]{ "Author", "CodeHash", "Address", "Version", "Name" }, null, null, null, null),
+ new pbr::GeneratedClrTypeInfo(typeof(global::AElf.Standards.ACS0.CodeCheckRequired), global::AElf.Standards.ACS0.CodeCheckRequired.Parser, new[]{ "Code", "ProposedContractInputHash", "Category", "IsSystemContract" }, null, null, null, null),
+ new pbr::GeneratedClrTypeInfo(typeof(global::AElf.Standards.ACS0.CodeUpdated), global::AElf.Standards.ACS0.CodeUpdated.Parser, new[]{ "Address", "OldCodeHash", "NewCodeHash", "Version" }, null, null, null, null),
+ new pbr::GeneratedClrTypeInfo(typeof(global::AElf.Standards.ACS0.ValidateSystemContractAddressInput), global::AElf.Standards.ACS0.ValidateSystemContractAddressInput.Parser, new[]{ "SystemContractHashName", "Address" }, null, null, null, null),
+ new pbr::GeneratedClrTypeInfo(typeof(global::AElf.Standards.ACS0.ReleaseContractInput), global::AElf.Standards.ACS0.ReleaseContractInput.Parser, new[]{ "ProposalId", "ProposedContractInputHash" }, null, null, null, null),
+ new pbr::GeneratedClrTypeInfo(typeof(global::AElf.Standards.ACS0.ContractCodeHashList), global::AElf.Standards.ACS0.ContractCodeHashList.Parser, new[]{ "Value" }, null, null, null, null),
+ new pbr::GeneratedClrTypeInfo(typeof(global::AElf.Standards.ACS0.ContractCodeHashMap), global::AElf.Standards.ACS0.ContractCodeHashMap.Parser, new[]{ "Value" }, null, null, null, new pbr::GeneratedClrTypeInfo[] { null, })
+ }));
+ }
+ #endregion
+
+ }
+ #region Messages
+ internal sealed partial class ContractInfo : pb::IMessage {
+ private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new ContractInfo());
+ private pb::UnknownFieldSet _unknownFields;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pb::MessageParser Parser { get { return _parser; } }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pbr::MessageDescriptor Descriptor {
+ get { return global::AElf.Standards.ACS0.Acs0Reflection.Descriptor.MessageTypes[0]; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ pbr::MessageDescriptor pb::IMessage.Descriptor {
+ get { return Descriptor; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public ContractInfo() {
+ OnConstruction();
+ }
+
+ partial void OnConstruction();
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public ContractInfo(ContractInfo other) : this() {
+ serialNumber_ = other.serialNumber_;
+ author_ = other.author_ != null ? other.author_.Clone() : null;
+ category_ = other.category_;
+ codeHash_ = other.codeHash_ != null ? other.codeHash_.Clone() : null;
+ isSystemContract_ = other.isSystemContract_;
+ version_ = other.version_;
+ _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public ContractInfo Clone() {
+ return new ContractInfo(this);
+ }
+
+ /// Field number for the "serial_number" field.
+ public const int SerialNumberFieldNumber = 1;
+ private long serialNumber_;
+ ///
+ /// The serial number of the contract.
+ ///
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public long SerialNumber {
+ get { return serialNumber_; }
+ set {
+ serialNumber_ = value;
+ }
+ }
+
+ /// Field number for the "author" field.
+ public const int AuthorFieldNumber = 2;
+ private global::AElf.Types.Address author_;
+ ///
+ /// The author of the contract, this is the person who deployed the contract.
+ ///
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public global::AElf.Types.Address Author {
+ get { return author_; }
+ set {
+ author_ = value;
+ }
+ }
+
+ /// Field number for the "category" field.
+ public const int CategoryFieldNumber = 3;
+ private int category_;
+ ///
+ /// The category of contract code(0: C#).
+ ///
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int Category {
+ get { return category_; }
+ set {
+ category_ = value;
+ }
+ }
+
+ /// Field number for the "code_hash" field.
+ public const int CodeHashFieldNumber = 4;
+ private global::AElf.Types.Hash codeHash_;
+ ///
+ /// The hash of the contract code.
+ ///
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public global::AElf.Types.Hash CodeHash {
+ get { return codeHash_; }
+ set {
+ codeHash_ = value;
+ }
+ }
+
+ /// Field number for the "is_system_contract" field.
+ public const int IsSystemContractFieldNumber = 5;
+ private bool isSystemContract_;
+ ///
+ /// Whether it is a system contract.
+ ///
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool IsSystemContract {
+ get { return isSystemContract_; }
+ set {
+ isSystemContract_ = value;
+ }
+ }
+
+ /// Field number for the "version" field.
+ public const int VersionFieldNumber = 6;
+ private int version_;
+ ///
+ /// The version of the current contract.
+ ///
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int Version {
+ get { return version_; }
+ set {
+ version_ = value;
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override bool Equals(object other) {
+ return Equals(other as ContractInfo);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool Equals(ContractInfo other) {
+ if (ReferenceEquals(other, null)) {
+ return false;
+ }
+ if (ReferenceEquals(other, this)) {
+ return true;
+ }
+ if (SerialNumber != other.SerialNumber) return false;
+ if (!object.Equals(Author, other.Author)) return false;
+ if (Category != other.Category) return false;
+ if (!object.Equals(CodeHash, other.CodeHash)) return false;
+ if (IsSystemContract != other.IsSystemContract) return false;
+ if (Version != other.Version) return false;
+ return Equals(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override int GetHashCode() {
+ int hash = 1;
+ if (SerialNumber != 0L) hash ^= SerialNumber.GetHashCode();
+ if (author_ != null) hash ^= Author.GetHashCode();
+ if (Category != 0) hash ^= Category.GetHashCode();
+ if (codeHash_ != null) hash ^= CodeHash.GetHashCode();
+ if (IsSystemContract != false) hash ^= IsSystemContract.GetHashCode();
+ if (Version != 0) hash ^= Version.GetHashCode();
+ if (_unknownFields != null) {
+ hash ^= _unknownFields.GetHashCode();
+ }
+ return hash;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override string ToString() {
+ return pb::JsonFormatter.ToDiagnosticString(this);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void WriteTo(pb::CodedOutputStream output) {
+ if (SerialNumber != 0L) {
+ output.WriteRawTag(8);
+ output.WriteInt64(SerialNumber);
+ }
+ if (author_ != null) {
+ output.WriteRawTag(18);
+ output.WriteMessage(Author);
+ }
+ if (Category != 0) {
+ output.WriteRawTag(24);
+ output.WriteSInt32(Category);
+ }
+ if (codeHash_ != null) {
+ output.WriteRawTag(34);
+ output.WriteMessage(CodeHash);
+ }
+ if (IsSystemContract != false) {
+ output.WriteRawTag(40);
+ output.WriteBool(IsSystemContract);
+ }
+ if (Version != 0) {
+ output.WriteRawTag(48);
+ output.WriteInt32(Version);
+ }
+ if (_unknownFields != null) {
+ _unknownFields.WriteTo(output);
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int CalculateSize() {
+ int size = 0;
+ if (SerialNumber != 0L) {
+ size += 1 + pb::CodedOutputStream.ComputeInt64Size(SerialNumber);
+ }
+ if (author_ != null) {
+ size += 1 + pb::CodedOutputStream.ComputeMessageSize(Author);
+ }
+ if (Category != 0) {
+ size += 1 + pb::CodedOutputStream.ComputeSInt32Size(Category);
+ }
+ if (codeHash_ != null) {
+ size += 1 + pb::CodedOutputStream.ComputeMessageSize(CodeHash);
+ }
+ if (IsSystemContract != false) {
+ size += 1 + 1;
+ }
+ if (Version != 0) {
+ size += 1 + pb::CodedOutputStream.ComputeInt32Size(Version);
+ }
+ if (_unknownFields != null) {
+ size += _unknownFields.CalculateSize();
+ }
+ return size;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(ContractInfo other) {
+ if (other == null) {
+ return;
+ }
+ if (other.SerialNumber != 0L) {
+ SerialNumber = other.SerialNumber;
+ }
+ if (other.author_ != null) {
+ if (author_ == null) {
+ Author = new global::AElf.Types.Address();
+ }
+ Author.MergeFrom(other.Author);
+ }
+ if (other.Category != 0) {
+ Category = other.Category;
+ }
+ if (other.codeHash_ != null) {
+ if (codeHash_ == null) {
+ CodeHash = new global::AElf.Types.Hash();
+ }
+ CodeHash.MergeFrom(other.CodeHash);
+ }
+ if (other.IsSystemContract != false) {
+ IsSystemContract = other.IsSystemContract;
+ }
+ if (other.Version != 0) {
+ Version = other.Version;
+ }
+ _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(pb::CodedInputStream input) {
+ uint tag;
+ while ((tag = input.ReadTag()) != 0) {
+ switch(tag) {
+ default:
+ _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
+ break;
+ case 8: {
+ SerialNumber = input.ReadInt64();
+ break;
+ }
+ case 18: {
+ if (author_ == null) {
+ Author = new global::AElf.Types.Address();
+ }
+ input.ReadMessage(Author);
+ break;
+ }
+ case 24: {
+ Category = input.ReadSInt32();
+ break;
+ }
+ case 34: {
+ if (codeHash_ == null) {
+ CodeHash = new global::AElf.Types.Hash();
+ }
+ input.ReadMessage(CodeHash);
+ break;
+ }
+ case 40: {
+ IsSystemContract = input.ReadBool();
+ break;
+ }
+ case 48: {
+ Version = input.ReadInt32();
+ break;
+ }
+ }
+ }
+ }
+
+ }
+
+ internal sealed partial class ContractDeploymentInput : pb::IMessage {
+ private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new ContractDeploymentInput());
+ private pb::UnknownFieldSet _unknownFields;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pb::MessageParser Parser { get { return _parser; } }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pbr::MessageDescriptor Descriptor {
+ get { return global::AElf.Standards.ACS0.Acs0Reflection.Descriptor.MessageTypes[1]; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ pbr::MessageDescriptor pb::IMessage.Descriptor {
+ get { return Descriptor; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public ContractDeploymentInput() {
+ OnConstruction();
+ }
+
+ partial void OnConstruction();
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public ContractDeploymentInput(ContractDeploymentInput other) : this() {
+ category_ = other.category_;
+ code_ = other.code_;
+ _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public ContractDeploymentInput Clone() {
+ return new ContractDeploymentInput(this);
+ }
+
+ /// Field number for the "category" field.
+ public const int CategoryFieldNumber = 1;
+ private int category_;
+ ///
+ /// The category of contract code(0: C#).
+ ///
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int Category {
+ get { return category_; }
+ set {
+ category_ = value;
+ }
+ }
+
+ /// Field number for the "code" field.
+ public const int CodeFieldNumber = 2;
+ private pb::ByteString code_ = pb::ByteString.Empty;
+ ///
+ /// The byte array of the contract code.
+ ///
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public pb::ByteString Code {
+ get { return code_; }
+ set {
+ code_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override bool Equals(object other) {
+ return Equals(other as ContractDeploymentInput);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool Equals(ContractDeploymentInput other) {
+ if (ReferenceEquals(other, null)) {
+ return false;
+ }
+ if (ReferenceEquals(other, this)) {
+ return true;
+ }
+ if (Category != other.Category) return false;
+ if (Code != other.Code) return false;
+ return Equals(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override int GetHashCode() {
+ int hash = 1;
+ if (Category != 0) hash ^= Category.GetHashCode();
+ if (Code.Length != 0) hash ^= Code.GetHashCode();
+ if (_unknownFields != null) {
+ hash ^= _unknownFields.GetHashCode();
+ }
+ return hash;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override string ToString() {
+ return pb::JsonFormatter.ToDiagnosticString(this);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void WriteTo(pb::CodedOutputStream output) {
+ if (Category != 0) {
+ output.WriteRawTag(8);
+ output.WriteSInt32(Category);
+ }
+ if (Code.Length != 0) {
+ output.WriteRawTag(18);
+ output.WriteBytes(Code);
+ }
+ if (_unknownFields != null) {
+ _unknownFields.WriteTo(output);
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int CalculateSize() {
+ int size = 0;
+ if (Category != 0) {
+ size += 1 + pb::CodedOutputStream.ComputeSInt32Size(Category);
+ }
+ if (Code.Length != 0) {
+ size += 1 + pb::CodedOutputStream.ComputeBytesSize(Code);
+ }
+ if (_unknownFields != null) {
+ size += _unknownFields.CalculateSize();
+ }
+ return size;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(ContractDeploymentInput other) {
+ if (other == null) {
+ return;
+ }
+ if (other.Category != 0) {
+ Category = other.Category;
+ }
+ if (other.Code.Length != 0) {
+ Code = other.Code;
+ }
+ _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(pb::CodedInputStream input) {
+ uint tag;
+ while ((tag = input.ReadTag()) != 0) {
+ switch(tag) {
+ default:
+ _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
+ break;
+ case 8: {
+ Category = input.ReadSInt32();
+ break;
+ }
+ case 18: {
+ Code = input.ReadBytes();
+ break;
+ }
+ }
+ }
+ }
+
+ }
+
+ internal sealed partial class SystemContractDeploymentInput : pb::IMessage {
+ private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new SystemContractDeploymentInput());
+ private pb::UnknownFieldSet _unknownFields;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pb::MessageParser Parser { get { return _parser; } }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pbr::MessageDescriptor Descriptor {
+ get { return global::AElf.Standards.ACS0.Acs0Reflection.Descriptor.MessageTypes[2]; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ pbr::MessageDescriptor pb::IMessage.Descriptor {
+ get { return Descriptor; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public SystemContractDeploymentInput() {
+ OnConstruction();
+ }
+
+ partial void OnConstruction();
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public SystemContractDeploymentInput(SystemContractDeploymentInput other) : this() {
+ category_ = other.category_;
+ code_ = other.code_;
+ name_ = other.name_ != null ? other.name_.Clone() : null;
+ transactionMethodCallList_ = other.transactionMethodCallList_ != null ? other.transactionMethodCallList_.Clone() : null;
+ _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public SystemContractDeploymentInput Clone() {
+ return new SystemContractDeploymentInput(this);
+ }
+
+ /// Field number for the "category" field.
+ public const int CategoryFieldNumber = 1;
+ private int category_;
+ ///
+ /// The category of contract code(0: C#).
+ ///
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int Category {
+ get { return category_; }
+ set {
+ category_ = value;
+ }
+ }
+
+ /// Field number for the "code" field.
+ public const int CodeFieldNumber = 2;
+ private pb::ByteString code_ = pb::ByteString.Empty;
+ ///
+ /// The byte array of the contract code.
+ ///
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public pb::ByteString Code {
+ get { return code_; }
+ set {
+ code_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
+ }
+ }
+
+ /// Field number for the "name" field.
+ public const int NameFieldNumber = 3;
+ private global::AElf.Types.Hash name_;
+ ///
+ /// The name of the contract. It has to be unique.
+ ///
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public global::AElf.Types.Hash Name {
+ get { return name_; }
+ set {
+ name_ = value;
+ }
+ }
+
+ /// Field number for the "transaction_method_call_list" field.
+ public const int TransactionMethodCallListFieldNumber = 4;
+ private global::AElf.Standards.ACS0.SystemContractDeploymentInput.Types.SystemTransactionMethodCallList transactionMethodCallList_;
+ ///
+ /// An initial list of transactions for the system contract,
+ /// which is executed in sequence when the contract is deployed.
+ ///
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public global::AElf.Standards.ACS0.SystemContractDeploymentInput.Types.SystemTransactionMethodCallList TransactionMethodCallList {
+ get { return transactionMethodCallList_; }
+ set {
+ transactionMethodCallList_ = value;
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override bool Equals(object other) {
+ return Equals(other as SystemContractDeploymentInput);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool Equals(SystemContractDeploymentInput other) {
+ if (ReferenceEquals(other, null)) {
+ return false;
+ }
+ if (ReferenceEquals(other, this)) {
+ return true;
+ }
+ if (Category != other.Category) return false;
+ if (Code != other.Code) return false;
+ if (!object.Equals(Name, other.Name)) return false;
+ if (!object.Equals(TransactionMethodCallList, other.TransactionMethodCallList)) return false;
+ return Equals(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override int GetHashCode() {
+ int hash = 1;
+ if (Category != 0) hash ^= Category.GetHashCode();
+ if (Code.Length != 0) hash ^= Code.GetHashCode();
+ if (name_ != null) hash ^= Name.GetHashCode();
+ if (transactionMethodCallList_ != null) hash ^= TransactionMethodCallList.GetHashCode();
+ if (_unknownFields != null) {
+ hash ^= _unknownFields.GetHashCode();
+ }
+ return hash;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override string ToString() {
+ return pb::JsonFormatter.ToDiagnosticString(this);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void WriteTo(pb::CodedOutputStream output) {
+ if (Category != 0) {
+ output.WriteRawTag(8);
+ output.WriteSInt32(Category);
+ }
+ if (Code.Length != 0) {
+ output.WriteRawTag(18);
+ output.WriteBytes(Code);
+ }
+ if (name_ != null) {
+ output.WriteRawTag(26);
+ output.WriteMessage(Name);
+ }
+ if (transactionMethodCallList_ != null) {
+ output.WriteRawTag(34);
+ output.WriteMessage(TransactionMethodCallList);
+ }
+ if (_unknownFields != null) {
+ _unknownFields.WriteTo(output);
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int CalculateSize() {
+ int size = 0;
+ if (Category != 0) {
+ size += 1 + pb::CodedOutputStream.ComputeSInt32Size(Category);
+ }
+ if (Code.Length != 0) {
+ size += 1 + pb::CodedOutputStream.ComputeBytesSize(Code);
+ }
+ if (name_ != null) {
+ size += 1 + pb::CodedOutputStream.ComputeMessageSize(Name);
+ }
+ if (transactionMethodCallList_ != null) {
+ size += 1 + pb::CodedOutputStream.ComputeMessageSize(TransactionMethodCallList);
+ }
+ if (_unknownFields != null) {
+ size += _unknownFields.CalculateSize();
+ }
+ return size;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(SystemContractDeploymentInput other) {
+ if (other == null) {
+ return;
+ }
+ if (other.Category != 0) {
+ Category = other.Category;
+ }
+ if (other.Code.Length != 0) {
+ Code = other.Code;
+ }
+ if (other.name_ != null) {
+ if (name_ == null) {
+ Name = new global::AElf.Types.Hash();
+ }
+ Name.MergeFrom(other.Name);
+ }
+ if (other.transactionMethodCallList_ != null) {
+ if (transactionMethodCallList_ == null) {
+ TransactionMethodCallList = new global::AElf.Standards.ACS0.SystemContractDeploymentInput.Types.SystemTransactionMethodCallList();
+ }
+ TransactionMethodCallList.MergeFrom(other.TransactionMethodCallList);
+ }
+ _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(pb::CodedInputStream input) {
+ uint tag;
+ while ((tag = input.ReadTag()) != 0) {
+ switch(tag) {
+ default:
+ _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
+ break;
+ case 8: {
+ Category = input.ReadSInt32();
+ break;
+ }
+ case 18: {
+ Code = input.ReadBytes();
+ break;
+ }
+ case 26: {
+ if (name_ == null) {
+ Name = new global::AElf.Types.Hash();
+ }
+ input.ReadMessage(Name);
+ break;
+ }
+ case 34: {
+ if (transactionMethodCallList_ == null) {
+ TransactionMethodCallList = new global::AElf.Standards.ACS0.SystemContractDeploymentInput.Types.SystemTransactionMethodCallList();
+ }
+ input.ReadMessage(TransactionMethodCallList);
+ break;
+ }
+ }
+ }
+ }
+
+ #region Nested types
+ /// Container for nested types declared in the SystemContractDeploymentInput message type.
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static partial class Types {
+ internal sealed partial class SystemTransactionMethodCall : pb::IMessage {
+ private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new SystemTransactionMethodCall());
+ private pb::UnknownFieldSet _unknownFields;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pb::MessageParser Parser { get { return _parser; } }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pbr::MessageDescriptor Descriptor {
+ get { return global::AElf.Standards.ACS0.SystemContractDeploymentInput.Descriptor.NestedTypes[0]; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ pbr::MessageDescriptor pb::IMessage.Descriptor {
+ get { return Descriptor; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public SystemTransactionMethodCall() {
+ OnConstruction();
+ }
+
+ partial void OnConstruction();
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public SystemTransactionMethodCall(SystemTransactionMethodCall other) : this() {
+ methodName_ = other.methodName_;
+ params_ = other.params_;
+ _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public SystemTransactionMethodCall Clone() {
+ return new SystemTransactionMethodCall(this);
+ }
+
+ /// Field number for the "method_name" field.
+ public const int MethodNameFieldNumber = 1;
+ private string methodName_ = "";
+ ///
+ /// The method name of system transaction.
+ ///
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public string MethodName {
+ get { return methodName_; }
+ set {
+ methodName_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
+ }
+ }
+
+ /// Field number for the "params" field.
+ public const int ParamsFieldNumber = 2;
+ private pb::ByteString params_ = pb::ByteString.Empty;
+ ///
+ /// The params of system transaction method.
+ ///
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public pb::ByteString Params {
+ get { return params_; }
+ set {
+ params_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override bool Equals(object other) {
+ return Equals(other as SystemTransactionMethodCall);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool Equals(SystemTransactionMethodCall other) {
+ if (ReferenceEquals(other, null)) {
+ return false;
+ }
+ if (ReferenceEquals(other, this)) {
+ return true;
+ }
+ if (MethodName != other.MethodName) return false;
+ if (Params != other.Params) return false;
+ return Equals(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override int GetHashCode() {
+ int hash = 1;
+ if (MethodName.Length != 0) hash ^= MethodName.GetHashCode();
+ if (Params.Length != 0) hash ^= Params.GetHashCode();
+ if (_unknownFields != null) {
+ hash ^= _unknownFields.GetHashCode();
+ }
+ return hash;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override string ToString() {
+ return pb::JsonFormatter.ToDiagnosticString(this);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void WriteTo(pb::CodedOutputStream output) {
+ if (MethodName.Length != 0) {
+ output.WriteRawTag(10);
+ output.WriteString(MethodName);
+ }
+ if (Params.Length != 0) {
+ output.WriteRawTag(18);
+ output.WriteBytes(Params);
+ }
+ if (_unknownFields != null) {
+ _unknownFields.WriteTo(output);
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int CalculateSize() {
+ int size = 0;
+ if (MethodName.Length != 0) {
+ size += 1 + pb::CodedOutputStream.ComputeStringSize(MethodName);
+ }
+ if (Params.Length != 0) {
+ size += 1 + pb::CodedOutputStream.ComputeBytesSize(Params);
+ }
+ if (_unknownFields != null) {
+ size += _unknownFields.CalculateSize();
+ }
+ return size;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(SystemTransactionMethodCall other) {
+ if (other == null) {
+ return;
+ }
+ if (other.MethodName.Length != 0) {
+ MethodName = other.MethodName;
+ }
+ if (other.Params.Length != 0) {
+ Params = other.Params;
+ }
+ _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(pb::CodedInputStream input) {
+ uint tag;
+ while ((tag = input.ReadTag()) != 0) {
+ switch(tag) {
+ default:
+ _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
+ break;
+ case 10: {
+ MethodName = input.ReadString();
+ break;
+ }
+ case 18: {
+ Params = input.ReadBytes();
+ break;
+ }
+ }
+ }
+ }
+
+ }
+
+ internal sealed partial class SystemTransactionMethodCallList : pb::IMessage {
+ private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new SystemTransactionMethodCallList());
+ private pb::UnknownFieldSet _unknownFields;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pb::MessageParser Parser { get { return _parser; } }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pbr::MessageDescriptor Descriptor {
+ get { return global::AElf.Standards.ACS0.SystemContractDeploymentInput.Descriptor.NestedTypes[1]; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ pbr::MessageDescriptor pb::IMessage.Descriptor {
+ get { return Descriptor; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public SystemTransactionMethodCallList() {
+ OnConstruction();
+ }
+
+ partial void OnConstruction();
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public SystemTransactionMethodCallList(SystemTransactionMethodCallList other) : this() {
+ value_ = other.value_.Clone();
+ _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public SystemTransactionMethodCallList Clone() {
+ return new SystemTransactionMethodCallList(this);
+ }
+
+ /// Field number for the "value" field.
+ public const int ValueFieldNumber = 1;
+ private static readonly pb::FieldCodec _repeated_value_codec
+ = pb::FieldCodec.ForMessage(10, global::AElf.Standards.ACS0.SystemContractDeploymentInput.Types.SystemTransactionMethodCall.Parser);
+ private readonly pbc::RepeatedField value_ = new pbc::RepeatedField();
+ ///
+ /// The list of system transactions.
+ ///
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public pbc::RepeatedField Value {
+ get { return value_; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override bool Equals(object other) {
+ return Equals(other as SystemTransactionMethodCallList);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool Equals(SystemTransactionMethodCallList other) {
+ if (ReferenceEquals(other, null)) {
+ return false;
+ }
+ if (ReferenceEquals(other, this)) {
+ return true;
+ }
+ if(!value_.Equals(other.value_)) return false;
+ return Equals(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override int GetHashCode() {
+ int hash = 1;
+ hash ^= value_.GetHashCode();
+ if (_unknownFields != null) {
+ hash ^= _unknownFields.GetHashCode();
+ }
+ return hash;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override string ToString() {
+ return pb::JsonFormatter.ToDiagnosticString(this);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void WriteTo(pb::CodedOutputStream output) {
+ value_.WriteTo(output, _repeated_value_codec);
+ if (_unknownFields != null) {
+ _unknownFields.WriteTo(output);
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int CalculateSize() {
+ int size = 0;
+ size += value_.CalculateSize(_repeated_value_codec);
+ if (_unknownFields != null) {
+ size += _unknownFields.CalculateSize();
+ }
+ return size;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(SystemTransactionMethodCallList other) {
+ if (other == null) {
+ return;
+ }
+ value_.Add(other.value_);
+ _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(pb::CodedInputStream input) {
+ uint tag;
+ while ((tag = input.ReadTag()) != 0) {
+ switch(tag) {
+ default:
+ _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
+ break;
+ case 10: {
+ value_.AddEntriesFrom(input, _repeated_value_codec);
+ break;
+ }
+ }
+ }
+ }
+
+ }
+
+ }
+ #endregion
+
+ }
+
+ internal sealed partial class ContractUpdateInput : pb::IMessage {
+ private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new ContractUpdateInput());
+ private pb::UnknownFieldSet _unknownFields;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pb::MessageParser Parser { get { return _parser; } }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pbr::MessageDescriptor Descriptor {
+ get { return global::AElf.Standards.ACS0.Acs0Reflection.Descriptor.MessageTypes[3]; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ pbr::MessageDescriptor pb::IMessage.Descriptor {
+ get { return Descriptor; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public ContractUpdateInput() {
+ OnConstruction();
+ }
+
+ partial void OnConstruction();
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public ContractUpdateInput(ContractUpdateInput other) : this() {
+ address_ = other.address_ != null ? other.address_.Clone() : null;
+ code_ = other.code_;
+ _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public ContractUpdateInput Clone() {
+ return new ContractUpdateInput(this);
+ }
+
+ /// Field number for the "address" field.
+ public const int AddressFieldNumber = 1;
+ private global::AElf.Types.Address address_;
+ ///
+ /// The contract address that needs to be updated.
+ ///
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public global::AElf.Types.Address Address {
+ get { return address_; }
+ set {
+ address_ = value;
+ }
+ }
+
+ /// Field number for the "code" field.
+ public const int CodeFieldNumber = 2;
+ private pb::ByteString code_ = pb::ByteString.Empty;
+ ///
+ /// The byte array of the new contract code.
+ ///
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public pb::ByteString Code {
+ get { return code_; }
+ set {
+ code_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override bool Equals(object other) {
+ return Equals(other as ContractUpdateInput);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool Equals(ContractUpdateInput other) {
+ if (ReferenceEquals(other, null)) {
+ return false;
+ }
+ if (ReferenceEquals(other, this)) {
+ return true;
+ }
+ if (!object.Equals(Address, other.Address)) return false;
+ if (Code != other.Code) return false;
+ return Equals(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override int GetHashCode() {
+ int hash = 1;
+ if (address_ != null) hash ^= Address.GetHashCode();
+ if (Code.Length != 0) hash ^= Code.GetHashCode();
+ if (_unknownFields != null) {
+ hash ^= _unknownFields.GetHashCode();
+ }
+ return hash;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override string ToString() {
+ return pb::JsonFormatter.ToDiagnosticString(this);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void WriteTo(pb::CodedOutputStream output) {
+ if (address_ != null) {
+ output.WriteRawTag(10);
+ output.WriteMessage(Address);
+ }
+ if (Code.Length != 0) {
+ output.WriteRawTag(18);
+ output.WriteBytes(Code);
+ }
+ if (_unknownFields != null) {
+ _unknownFields.WriteTo(output);
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int CalculateSize() {
+ int size = 0;
+ if (address_ != null) {
+ size += 1 + pb::CodedOutputStream.ComputeMessageSize(Address);
+ }
+ if (Code.Length != 0) {
+ size += 1 + pb::CodedOutputStream.ComputeBytesSize(Code);
+ }
+ if (_unknownFields != null) {
+ size += _unknownFields.CalculateSize();
+ }
+ return size;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(ContractUpdateInput other) {
+ if (other == null) {
+ return;
+ }
+ if (other.address_ != null) {
+ if (address_ == null) {
+ Address = new global::AElf.Types.Address();
+ }
+ Address.MergeFrom(other.Address);
+ }
+ if (other.Code.Length != 0) {
+ Code = other.Code;
+ }
+ _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(pb::CodedInputStream input) {
+ uint tag;
+ while ((tag = input.ReadTag()) != 0) {
+ switch(tag) {
+ default:
+ _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
+ break;
+ case 10: {
+ if (address_ == null) {
+ Address = new global::AElf.Types.Address();
+ }
+ input.ReadMessage(Address);
+ break;
+ }
+ case 18: {
+ Code = input.ReadBytes();
+ break;
+ }
+ }
+ }
+ }
+
+ }
+
+ internal sealed partial class ContractCodeCheckInput : pb::IMessage {
+ private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new ContractCodeCheckInput());
+ private pb::UnknownFieldSet _unknownFields;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pb::MessageParser Parser { get { return _parser; } }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pbr::MessageDescriptor Descriptor {
+ get { return global::AElf.Standards.ACS0.Acs0Reflection.Descriptor.MessageTypes[4]; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ pbr::MessageDescriptor pb::IMessage.Descriptor {
+ get { return Descriptor; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public ContractCodeCheckInput() {
+ OnConstruction();
+ }
+
+ partial void OnConstruction();
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public ContractCodeCheckInput(ContractCodeCheckInput other) : this() {
+ contractInput_ = other.contractInput_;
+ isContractDeployment_ = other.isContractDeployment_;
+ codeCheckReleaseMethod_ = other.codeCheckReleaseMethod_;
+ proposedContractInputHash_ = other.proposedContractInputHash_ != null ? other.proposedContractInputHash_.Clone() : null;
+ category_ = other.category_;
+ isSystemContract_ = other.isSystemContract_;
+ _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public ContractCodeCheckInput Clone() {
+ return new ContractCodeCheckInput(this);
+ }
+
+ /// Field number for the "contract_input" field.
+ public const int ContractInputFieldNumber = 1;
+ private pb::ByteString contractInput_ = pb::ByteString.Empty;
+ ///
+ /// The byte array of the contract code to be checked.
+ ///
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public pb::ByteString ContractInput {
+ get { return contractInput_; }
+ set {
+ contractInput_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
+ }
+ }
+
+ /// Field number for the "is_contract_deployment" field.
+ public const int IsContractDeploymentFieldNumber = 2;
+ private bool isContractDeployment_;
+ ///
+ /// Whether the input contract is to be deployed or updated.
+ ///
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool IsContractDeployment {
+ get { return isContractDeployment_; }
+ set {
+ isContractDeployment_ = value;
+ }
+ }
+
+ /// Field number for the "code_check_release_method" field.
+ public const int CodeCheckReleaseMethodFieldNumber = 3;
+ private string codeCheckReleaseMethod_ = "";
+ ///
+ /// Method to call after code check complete(DeploySmartContract or UpdateSmartContract).
+ ///
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public string CodeCheckReleaseMethod {
+ get { return codeCheckReleaseMethod_; }
+ set {
+ codeCheckReleaseMethod_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
+ }
+ }
+
+ /// Field number for the "proposed_contract_input_hash" field.
+ public const int ProposedContractInputHashFieldNumber = 4;
+ private global::AElf.Types.Hash proposedContractInputHash_;
+ ///
+ /// The id of the proposed contract.
+ ///
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public global::AElf.Types.Hash ProposedContractInputHash {
+ get { return proposedContractInputHash_; }
+ set {
+ proposedContractInputHash_ = value;
+ }
+ }
+
+ /// Field number for the "category" field.
+ public const int CategoryFieldNumber = 5;
+ private int category_;
+ ///
+ /// The category of contract code(0: C#).
+ ///
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int Category {
+ get { return category_; }
+ set {
+ category_ = value;
+ }
+ }
+
+ /// Field number for the "is_system_contract" field.
+ public const int IsSystemContractFieldNumber = 6;
+ private bool isSystemContract_;
+ ///
+ /// Indicates if the contract is the system contract.
+ ///
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool IsSystemContract {
+ get { return isSystemContract_; }
+ set {
+ isSystemContract_ = value;
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override bool Equals(object other) {
+ return Equals(other as ContractCodeCheckInput);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool Equals(ContractCodeCheckInput other) {
+ if (ReferenceEquals(other, null)) {
+ return false;
+ }
+ if (ReferenceEquals(other, this)) {
+ return true;
+ }
+ if (ContractInput != other.ContractInput) return false;
+ if (IsContractDeployment != other.IsContractDeployment) return false;
+ if (CodeCheckReleaseMethod != other.CodeCheckReleaseMethod) return false;
+ if (!object.Equals(ProposedContractInputHash, other.ProposedContractInputHash)) return false;
+ if (Category != other.Category) return false;
+ if (IsSystemContract != other.IsSystemContract) return false;
+ return Equals(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override int GetHashCode() {
+ int hash = 1;
+ if (ContractInput.Length != 0) hash ^= ContractInput.GetHashCode();
+ if (IsContractDeployment != false) hash ^= IsContractDeployment.GetHashCode();
+ if (CodeCheckReleaseMethod.Length != 0) hash ^= CodeCheckReleaseMethod.GetHashCode();
+ if (proposedContractInputHash_ != null) hash ^= ProposedContractInputHash.GetHashCode();
+ if (Category != 0) hash ^= Category.GetHashCode();
+ if (IsSystemContract != false) hash ^= IsSystemContract.GetHashCode();
+ if (_unknownFields != null) {
+ hash ^= _unknownFields.GetHashCode();
+ }
+ return hash;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override string ToString() {
+ return pb::JsonFormatter.ToDiagnosticString(this);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void WriteTo(pb::CodedOutputStream output) {
+ if (ContractInput.Length != 0) {
+ output.WriteRawTag(10);
+ output.WriteBytes(ContractInput);
+ }
+ if (IsContractDeployment != false) {
+ output.WriteRawTag(16);
+ output.WriteBool(IsContractDeployment);
+ }
+ if (CodeCheckReleaseMethod.Length != 0) {
+ output.WriteRawTag(26);
+ output.WriteString(CodeCheckReleaseMethod);
+ }
+ if (proposedContractInputHash_ != null) {
+ output.WriteRawTag(34);
+ output.WriteMessage(ProposedContractInputHash);
+ }
+ if (Category != 0) {
+ output.WriteRawTag(40);
+ output.WriteSInt32(Category);
+ }
+ if (IsSystemContract != false) {
+ output.WriteRawTag(48);
+ output.WriteBool(IsSystemContract);
+ }
+ if (_unknownFields != null) {
+ _unknownFields.WriteTo(output);
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int CalculateSize() {
+ int size = 0;
+ if (ContractInput.Length != 0) {
+ size += 1 + pb::CodedOutputStream.ComputeBytesSize(ContractInput);
+ }
+ if (IsContractDeployment != false) {
+ size += 1 + 1;
+ }
+ if (CodeCheckReleaseMethod.Length != 0) {
+ size += 1 + pb::CodedOutputStream.ComputeStringSize(CodeCheckReleaseMethod);
+ }
+ if (proposedContractInputHash_ != null) {
+ size += 1 + pb::CodedOutputStream.ComputeMessageSize(ProposedContractInputHash);
+ }
+ if (Category != 0) {
+ size += 1 + pb::CodedOutputStream.ComputeSInt32Size(Category);
+ }
+ if (IsSystemContract != false) {
+ size += 1 + 1;
+ }
+ if (_unknownFields != null) {
+ size += _unknownFields.CalculateSize();
+ }
+ return size;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(ContractCodeCheckInput other) {
+ if (other == null) {
+ return;
+ }
+ if (other.ContractInput.Length != 0) {
+ ContractInput = other.ContractInput;
+ }
+ if (other.IsContractDeployment != false) {
+ IsContractDeployment = other.IsContractDeployment;
+ }
+ if (other.CodeCheckReleaseMethod.Length != 0) {
+ CodeCheckReleaseMethod = other.CodeCheckReleaseMethod;
+ }
+ if (other.proposedContractInputHash_ != null) {
+ if (proposedContractInputHash_ == null) {
+ ProposedContractInputHash = new global::AElf.Types.Hash();
+ }
+ ProposedContractInputHash.MergeFrom(other.ProposedContractInputHash);
+ }
+ if (other.Category != 0) {
+ Category = other.Category;
+ }
+ if (other.IsSystemContract != false) {
+ IsSystemContract = other.IsSystemContract;
+ }
+ _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(pb::CodedInputStream input) {
+ uint tag;
+ while ((tag = input.ReadTag()) != 0) {
+ switch(tag) {
+ default:
+ _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
+ break;
+ case 10: {
+ ContractInput = input.ReadBytes();
+ break;
+ }
+ case 16: {
+ IsContractDeployment = input.ReadBool();
+ break;
+ }
+ case 26: {
+ CodeCheckReleaseMethod = input.ReadString();
+ break;
+ }
+ case 34: {
+ if (proposedContractInputHash_ == null) {
+ ProposedContractInputHash = new global::AElf.Types.Hash();
+ }
+ input.ReadMessage(ProposedContractInputHash);
+ break;
+ }
+ case 40: {
+ Category = input.ReadSInt32();
+ break;
+ }
+ case 48: {
+ IsSystemContract = input.ReadBool();
+ break;
+ }
+ }
+ }
+ }
+
+ }
+
+ internal sealed partial class ContractProposed : pb::IMessage {
+ private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new ContractProposed());
+ private pb::UnknownFieldSet _unknownFields;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pb::MessageParser Parser { get { return _parser; } }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pbr::MessageDescriptor Descriptor {
+ get { return global::AElf.Standards.ACS0.Acs0Reflection.Descriptor.MessageTypes[5]; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ pbr::MessageDescriptor pb::IMessage.Descriptor {
+ get { return Descriptor; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public ContractProposed() {
+ OnConstruction();
+ }
+
+ partial void OnConstruction();
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public ContractProposed(ContractProposed other) : this() {
+ proposedContractInputHash_ = other.proposedContractInputHash_ != null ? other.proposedContractInputHash_.Clone() : null;
+ _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public ContractProposed Clone() {
+ return new ContractProposed(this);
+ }
+
+ /// Field number for the "proposed_contract_input_hash" field.
+ public const int ProposedContractInputHashFieldNumber = 1;
+ private global::AElf.Types.Hash proposedContractInputHash_;
+ ///
+ /// The id of the proposed contract.
+ ///
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public global::AElf.Types.Hash ProposedContractInputHash {
+ get { return proposedContractInputHash_; }
+ set {
+ proposedContractInputHash_ = value;
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override bool Equals(object other) {
+ return Equals(other as ContractProposed);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool Equals(ContractProposed other) {
+ if (ReferenceEquals(other, null)) {
+ return false;
+ }
+ if (ReferenceEquals(other, this)) {
+ return true;
+ }
+ if (!object.Equals(ProposedContractInputHash, other.ProposedContractInputHash)) return false;
+ return Equals(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override int GetHashCode() {
+ int hash = 1;
+ if (proposedContractInputHash_ != null) hash ^= ProposedContractInputHash.GetHashCode();
+ if (_unknownFields != null) {
+ hash ^= _unknownFields.GetHashCode();
+ }
+ return hash;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override string ToString() {
+ return pb::JsonFormatter.ToDiagnosticString(this);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void WriteTo(pb::CodedOutputStream output) {
+ if (proposedContractInputHash_ != null) {
+ output.WriteRawTag(10);
+ output.WriteMessage(ProposedContractInputHash);
+ }
+ if (_unknownFields != null) {
+ _unknownFields.WriteTo(output);
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int CalculateSize() {
+ int size = 0;
+ if (proposedContractInputHash_ != null) {
+ size += 1 + pb::CodedOutputStream.ComputeMessageSize(ProposedContractInputHash);
+ }
+ if (_unknownFields != null) {
+ size += _unknownFields.CalculateSize();
+ }
+ return size;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(ContractProposed other) {
+ if (other == null) {
+ return;
+ }
+ if (other.proposedContractInputHash_ != null) {
+ if (proposedContractInputHash_ == null) {
+ ProposedContractInputHash = new global::AElf.Types.Hash();
+ }
+ ProposedContractInputHash.MergeFrom(other.ProposedContractInputHash);
+ }
+ _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(pb::CodedInputStream input) {
+ uint tag;
+ while ((tag = input.ReadTag()) != 0) {
+ switch(tag) {
+ default:
+ _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
+ break;
+ case 10: {
+ if (proposedContractInputHash_ == null) {
+ ProposedContractInputHash = new global::AElf.Types.Hash();
+ }
+ input.ReadMessage(ProposedContractInputHash);
+ break;
+ }
+ }
+ }
+ }
+
+ }
+
+ internal sealed partial class ContractDeployed : pb::IMessage {
+ private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new ContractDeployed());
+ private pb::UnknownFieldSet _unknownFields;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pb::MessageParser Parser { get { return _parser; } }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pbr::MessageDescriptor Descriptor {
+ get { return global::AElf.Standards.ACS0.Acs0Reflection.Descriptor.MessageTypes[6]; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ pbr::MessageDescriptor pb::IMessage.Descriptor {
+ get { return Descriptor; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public ContractDeployed() {
+ OnConstruction();
+ }
+
+ partial void OnConstruction();
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public ContractDeployed(ContractDeployed other) : this() {
+ author_ = other.author_ != null ? other.author_.Clone() : null;
+ codeHash_ = other.codeHash_ != null ? other.codeHash_.Clone() : null;
+ address_ = other.address_ != null ? other.address_.Clone() : null;
+ version_ = other.version_;
+ name_ = other.name_ != null ? other.name_.Clone() : null;
+ _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public ContractDeployed Clone() {
+ return new ContractDeployed(this);
+ }
+
+ /// Field number for the "author" field.
+ public const int AuthorFieldNumber = 1;
+ private global::AElf.Types.Address author_;
+ ///
+ /// The author of the contract, this is the person who deployed the contract.
+ ///
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public global::AElf.Types.Address Author {
+ get { return author_; }
+ set {
+ author_ = value;
+ }
+ }
+
+ /// Field number for the "code_hash" field.
+ public const int CodeHashFieldNumber = 2;
+ private global::AElf.Types.Hash codeHash_;
+ ///
+ /// The hash of the contract code.
+ ///
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public global::AElf.Types.Hash CodeHash {
+ get { return codeHash_; }
+ set {
+ codeHash_ = value;
+ }
+ }
+
+ /// Field number for the "address" field.
+ public const int AddressFieldNumber = 3;
+ private global::AElf.Types.Address address_;
+ ///
+ /// The address of the contract.
+ ///
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public global::AElf.Types.Address Address {
+ get { return address_; }
+ set {
+ address_ = value;
+ }
+ }
+
+ /// Field number for the "version" field.
+ public const int VersionFieldNumber = 4;
+ private int version_;
+ ///
+ /// The version of the current contract.
+ ///
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int Version {
+ get { return version_; }
+ set {
+ version_ = value;
+ }
+ }
+
+ /// Field number for the "Name" field.
+ public const int NameFieldNumber = 5;
+ private global::AElf.Types.Hash name_;
+ ///
+ /// The name of the contract. It has to be unique.
+ ///
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public global::AElf.Types.Hash Name {
+ get { return name_; }
+ set {
+ name_ = value;
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override bool Equals(object other) {
+ return Equals(other as ContractDeployed);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool Equals(ContractDeployed other) {
+ if (ReferenceEquals(other, null)) {
+ return false;
+ }
+ if (ReferenceEquals(other, this)) {
+ return true;
+ }
+ if (!object.Equals(Author, other.Author)) return false;
+ if (!object.Equals(CodeHash, other.CodeHash)) return false;
+ if (!object.Equals(Address, other.Address)) return false;
+ if (Version != other.Version) return false;
+ if (!object.Equals(Name, other.Name)) return false;
+ return Equals(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override int GetHashCode() {
+ int hash = 1;
+ if (author_ != null) hash ^= Author.GetHashCode();
+ if (codeHash_ != null) hash ^= CodeHash.GetHashCode();
+ if (address_ != null) hash ^= Address.GetHashCode();
+ if (Version != 0) hash ^= Version.GetHashCode();
+ if (name_ != null) hash ^= Name.GetHashCode();
+ if (_unknownFields != null) {
+ hash ^= _unknownFields.GetHashCode();
+ }
+ return hash;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override string ToString() {
+ return pb::JsonFormatter.ToDiagnosticString(this);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void WriteTo(pb::CodedOutputStream output) {
+ if (author_ != null) {
+ output.WriteRawTag(10);
+ output.WriteMessage(Author);
+ }
+ if (codeHash_ != null) {
+ output.WriteRawTag(18);
+ output.WriteMessage(CodeHash);
+ }
+ if (address_ != null) {
+ output.WriteRawTag(26);
+ output.WriteMessage(Address);
+ }
+ if (Version != 0) {
+ output.WriteRawTag(32);
+ output.WriteInt32(Version);
+ }
+ if (name_ != null) {
+ output.WriteRawTag(42);
+ output.WriteMessage(Name);
+ }
+ if (_unknownFields != null) {
+ _unknownFields.WriteTo(output);
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int CalculateSize() {
+ int size = 0;
+ if (author_ != null) {
+ size += 1 + pb::CodedOutputStream.ComputeMessageSize(Author);
+ }
+ if (codeHash_ != null) {
+ size += 1 + pb::CodedOutputStream.ComputeMessageSize(CodeHash);
+ }
+ if (address_ != null) {
+ size += 1 + pb::CodedOutputStream.ComputeMessageSize(Address);
+ }
+ if (Version != 0) {
+ size += 1 + pb::CodedOutputStream.ComputeInt32Size(Version);
+ }
+ if (name_ != null) {
+ size += 1 + pb::CodedOutputStream.ComputeMessageSize(Name);
+ }
+ if (_unknownFields != null) {
+ size += _unknownFields.CalculateSize();
+ }
+ return size;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(ContractDeployed other) {
+ if (other == null) {
+ return;
+ }
+ if (other.author_ != null) {
+ if (author_ == null) {
+ Author = new global::AElf.Types.Address();
+ }
+ Author.MergeFrom(other.Author);
+ }
+ if (other.codeHash_ != null) {
+ if (codeHash_ == null) {
+ CodeHash = new global::AElf.Types.Hash();
+ }
+ CodeHash.MergeFrom(other.CodeHash);
+ }
+ if (other.address_ != null) {
+ if (address_ == null) {
+ Address = new global::AElf.Types.Address();
+ }
+ Address.MergeFrom(other.Address);
+ }
+ if (other.Version != 0) {
+ Version = other.Version;
+ }
+ if (other.name_ != null) {
+ if (name_ == null) {
+ Name = new global::AElf.Types.Hash();
+ }
+ Name.MergeFrom(other.Name);
+ }
+ _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(pb::CodedInputStream input) {
+ uint tag;
+ while ((tag = input.ReadTag()) != 0) {
+ switch(tag) {
+ default:
+ _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
+ break;
+ case 10: {
+ if (author_ == null) {
+ Author = new global::AElf.Types.Address();
+ }
+ input.ReadMessage(Author);
+ break;
+ }
+ case 18: {
+ if (codeHash_ == null) {
+ CodeHash = new global::AElf.Types.Hash();
+ }
+ input.ReadMessage(CodeHash);
+ break;
+ }
+ case 26: {
+ if (address_ == null) {
+ Address = new global::AElf.Types.Address();
+ }
+ input.ReadMessage(Address);
+ break;
+ }
+ case 32: {
+ Version = input.ReadInt32();
+ break;
+ }
+ case 42: {
+ if (name_ == null) {
+ Name = new global::AElf.Types.Hash();
+ }
+ input.ReadMessage(Name);
+ break;
+ }
+ }
+ }
+ }
+
+ }
+
+ internal sealed partial class CodeCheckRequired : pb::IMessage {
+ private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new CodeCheckRequired());
+ private pb::UnknownFieldSet _unknownFields;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pb::MessageParser Parser { get { return _parser; } }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pbr::MessageDescriptor Descriptor {
+ get { return global::AElf.Standards.ACS0.Acs0Reflection.Descriptor.MessageTypes[7]; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ pbr::MessageDescriptor pb::IMessage.Descriptor {
+ get { return Descriptor; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public CodeCheckRequired() {
+ OnConstruction();
+ }
+
+ partial void OnConstruction();
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public CodeCheckRequired(CodeCheckRequired other) : this() {
+ code_ = other.code_;
+ proposedContractInputHash_ = other.proposedContractInputHash_ != null ? other.proposedContractInputHash_.Clone() : null;
+ category_ = other.category_;
+ isSystemContract_ = other.isSystemContract_;
+ _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public CodeCheckRequired Clone() {
+ return new CodeCheckRequired(this);
+ }
+
+ /// Field number for the "code" field.
+ public const int CodeFieldNumber = 1;
+ private pb::ByteString code_ = pb::ByteString.Empty;
+ ///
+ /// The byte array of the contract code.
+ ///
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public pb::ByteString Code {
+ get { return code_; }
+ set {
+ code_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
+ }
+ }
+
+ /// Field number for the "proposed_contract_input_hash" field.
+ public const int ProposedContractInputHashFieldNumber = 2;
+ private global::AElf.Types.Hash proposedContractInputHash_;
+ ///
+ /// The id of the proposed contract.
+ ///
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public global::AElf.Types.Hash ProposedContractInputHash {
+ get { return proposedContractInputHash_; }
+ set {
+ proposedContractInputHash_ = value;
+ }
+ }
+
+ /// Field number for the "category" field.
+ public const int CategoryFieldNumber = 3;
+ private int category_;
+ ///
+ /// The category of contract code(0: C#).
+ ///
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int Category {
+ get { return category_; }
+ set {
+ category_ = value;
+ }
+ }
+
+ /// Field number for the "is_system_contract" field.
+ public const int IsSystemContractFieldNumber = 4;
+ private bool isSystemContract_;
+ ///
+ /// Indicates if the contract is the system contract.
+ ///
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool IsSystemContract {
+ get { return isSystemContract_; }
+ set {
+ isSystemContract_ = value;
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override bool Equals(object other) {
+ return Equals(other as CodeCheckRequired);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool Equals(CodeCheckRequired other) {
+ if (ReferenceEquals(other, null)) {
+ return false;
+ }
+ if (ReferenceEquals(other, this)) {
+ return true;
+ }
+ if (Code != other.Code) return false;
+ if (!object.Equals(ProposedContractInputHash, other.ProposedContractInputHash)) return false;
+ if (Category != other.Category) return false;
+ if (IsSystemContract != other.IsSystemContract) return false;
+ return Equals(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override int GetHashCode() {
+ int hash = 1;
+ if (Code.Length != 0) hash ^= Code.GetHashCode();
+ if (proposedContractInputHash_ != null) hash ^= ProposedContractInputHash.GetHashCode();
+ if (Category != 0) hash ^= Category.GetHashCode();
+ if (IsSystemContract != false) hash ^= IsSystemContract.GetHashCode();
+ if (_unknownFields != null) {
+ hash ^= _unknownFields.GetHashCode();
+ }
+ return hash;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override string ToString() {
+ return pb::JsonFormatter.ToDiagnosticString(this);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void WriteTo(pb::CodedOutputStream output) {
+ if (Code.Length != 0) {
+ output.WriteRawTag(10);
+ output.WriteBytes(Code);
+ }
+ if (proposedContractInputHash_ != null) {
+ output.WriteRawTag(18);
+ output.WriteMessage(ProposedContractInputHash);
+ }
+ if (Category != 0) {
+ output.WriteRawTag(24);
+ output.WriteSInt32(Category);
+ }
+ if (IsSystemContract != false) {
+ output.WriteRawTag(32);
+ output.WriteBool(IsSystemContract);
+ }
+ if (_unknownFields != null) {
+ _unknownFields.WriteTo(output);
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int CalculateSize() {
+ int size = 0;
+ if (Code.Length != 0) {
+ size += 1 + pb::CodedOutputStream.ComputeBytesSize(Code);
+ }
+ if (proposedContractInputHash_ != null) {
+ size += 1 + pb::CodedOutputStream.ComputeMessageSize(ProposedContractInputHash);
+ }
+ if (Category != 0) {
+ size += 1 + pb::CodedOutputStream.ComputeSInt32Size(Category);
+ }
+ if (IsSystemContract != false) {
+ size += 1 + 1;
+ }
+ if (_unknownFields != null) {
+ size += _unknownFields.CalculateSize();
+ }
+ return size;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(CodeCheckRequired other) {
+ if (other == null) {
+ return;
+ }
+ if (other.Code.Length != 0) {
+ Code = other.Code;
+ }
+ if (other.proposedContractInputHash_ != null) {
+ if (proposedContractInputHash_ == null) {
+ ProposedContractInputHash = new global::AElf.Types.Hash();
+ }
+ ProposedContractInputHash.MergeFrom(other.ProposedContractInputHash);
+ }
+ if (other.Category != 0) {
+ Category = other.Category;
+ }
+ if (other.IsSystemContract != false) {
+ IsSystemContract = other.IsSystemContract;
+ }
+ _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(pb::CodedInputStream input) {
+ uint tag;
+ while ((tag = input.ReadTag()) != 0) {
+ switch(tag) {
+ default:
+ _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
+ break;
+ case 10: {
+ Code = input.ReadBytes();
+ break;
+ }
+ case 18: {
+ if (proposedContractInputHash_ == null) {
+ ProposedContractInputHash = new global::AElf.Types.Hash();
+ }
+ input.ReadMessage(ProposedContractInputHash);
+ break;
+ }
+ case 24: {
+ Category = input.ReadSInt32();
+ break;
+ }
+ case 32: {
+ IsSystemContract = input.ReadBool();
+ break;
+ }
+ }
+ }
+ }
+
+ }
+
+ internal sealed partial class CodeUpdated : pb::IMessage {
+ private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new CodeUpdated());
+ private pb::UnknownFieldSet _unknownFields;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pb::MessageParser Parser { get { return _parser; } }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pbr::MessageDescriptor Descriptor {
+ get { return global::AElf.Standards.ACS0.Acs0Reflection.Descriptor.MessageTypes[8]; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ pbr::MessageDescriptor pb::IMessage.Descriptor {
+ get { return Descriptor; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public CodeUpdated() {
+ OnConstruction();
+ }
+
+ partial void OnConstruction();
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public CodeUpdated(CodeUpdated other) : this() {
+ address_ = other.address_ != null ? other.address_.Clone() : null;
+ oldCodeHash_ = other.oldCodeHash_ != null ? other.oldCodeHash_.Clone() : null;
+ newCodeHash_ = other.newCodeHash_ != null ? other.newCodeHash_.Clone() : null;
+ version_ = other.version_;
+ _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public CodeUpdated Clone() {
+ return new CodeUpdated(this);
+ }
+
+ /// Field number for the "address" field.
+ public const int AddressFieldNumber = 1;
+ private global::AElf.Types.Address address_;
+ ///
+ /// The address of the updated contract.
+ ///
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public global::AElf.Types.Address Address {
+ get { return address_; }
+ set {
+ address_ = value;
+ }
+ }
+
+ /// Field number for the "old_code_hash" field.
+ public const int OldCodeHashFieldNumber = 2;
+ private global::AElf.Types.Hash oldCodeHash_;
+ ///
+ /// The byte array of the old contract code.
+ ///
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public global::AElf.Types.Hash OldCodeHash {
+ get { return oldCodeHash_; }
+ set {
+ oldCodeHash_ = value;
+ }
+ }
+
+ /// Field number for the "new_code_hash" field.
+ public const int NewCodeHashFieldNumber = 3;
+ private global::AElf.Types.Hash newCodeHash_;
+ ///
+ /// The byte array of the new contract code.
+ ///
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public global::AElf.Types.Hash NewCodeHash {
+ get { return newCodeHash_; }
+ set {
+ newCodeHash_ = value;
+ }
+ }
+
+ /// Field number for the "version" field.
+ public const int VersionFieldNumber = 4;
+ private int version_;
+ ///
+ /// The version of the current contract.
+ ///
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int Version {
+ get { return version_; }
+ set {
+ version_ = value;
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override bool Equals(object other) {
+ return Equals(other as CodeUpdated);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool Equals(CodeUpdated other) {
+ if (ReferenceEquals(other, null)) {
+ return false;
+ }
+ if (ReferenceEquals(other, this)) {
+ return true;
+ }
+ if (!object.Equals(Address, other.Address)) return false;
+ if (!object.Equals(OldCodeHash, other.OldCodeHash)) return false;
+ if (!object.Equals(NewCodeHash, other.NewCodeHash)) return false;
+ if (Version != other.Version) return false;
+ return Equals(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override int GetHashCode() {
+ int hash = 1;
+ if (address_ != null) hash ^= Address.GetHashCode();
+ if (oldCodeHash_ != null) hash ^= OldCodeHash.GetHashCode();
+ if (newCodeHash_ != null) hash ^= NewCodeHash.GetHashCode();
+ if (Version != 0) hash ^= Version.GetHashCode();
+ if (_unknownFields != null) {
+ hash ^= _unknownFields.GetHashCode();
+ }
+ return hash;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override string ToString() {
+ return pb::JsonFormatter.ToDiagnosticString(this);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void WriteTo(pb::CodedOutputStream output) {
+ if (address_ != null) {
+ output.WriteRawTag(10);
+ output.WriteMessage(Address);
+ }
+ if (oldCodeHash_ != null) {
+ output.WriteRawTag(18);
+ output.WriteMessage(OldCodeHash);
+ }
+ if (newCodeHash_ != null) {
+ output.WriteRawTag(26);
+ output.WriteMessage(NewCodeHash);
+ }
+ if (Version != 0) {
+ output.WriteRawTag(32);
+ output.WriteInt32(Version);
+ }
+ if (_unknownFields != null) {
+ _unknownFields.WriteTo(output);
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int CalculateSize() {
+ int size = 0;
+ if (address_ != null) {
+ size += 1 + pb::CodedOutputStream.ComputeMessageSize(Address);
+ }
+ if (oldCodeHash_ != null) {
+ size += 1 + pb::CodedOutputStream.ComputeMessageSize(OldCodeHash);
+ }
+ if (newCodeHash_ != null) {
+ size += 1 + pb::CodedOutputStream.ComputeMessageSize(NewCodeHash);
+ }
+ if (Version != 0) {
+ size += 1 + pb::CodedOutputStream.ComputeInt32Size(Version);
+ }
+ if (_unknownFields != null) {
+ size += _unknownFields.CalculateSize();
+ }
+ return size;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(CodeUpdated other) {
+ if (other == null) {
+ return;
+ }
+ if (other.address_ != null) {
+ if (address_ == null) {
+ Address = new global::AElf.Types.Address();
+ }
+ Address.MergeFrom(other.Address);
+ }
+ if (other.oldCodeHash_ != null) {
+ if (oldCodeHash_ == null) {
+ OldCodeHash = new global::AElf.Types.Hash();
+ }
+ OldCodeHash.MergeFrom(other.OldCodeHash);
+ }
+ if (other.newCodeHash_ != null) {
+ if (newCodeHash_ == null) {
+ NewCodeHash = new global::AElf.Types.Hash();
+ }
+ NewCodeHash.MergeFrom(other.NewCodeHash);
+ }
+ if (other.Version != 0) {
+ Version = other.Version;
+ }
+ _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(pb::CodedInputStream input) {
+ uint tag;
+ while ((tag = input.ReadTag()) != 0) {
+ switch(tag) {
+ default:
+ _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
+ break;
+ case 10: {
+ if (address_ == null) {
+ Address = new global::AElf.Types.Address();
+ }
+ input.ReadMessage(Address);
+ break;
+ }
+ case 18: {
+ if (oldCodeHash_ == null) {
+ OldCodeHash = new global::AElf.Types.Hash();
+ }
+ input.ReadMessage(OldCodeHash);
+ break;
+ }
+ case 26: {
+ if (newCodeHash_ == null) {
+ NewCodeHash = new global::AElf.Types.Hash();
+ }
+ input.ReadMessage(NewCodeHash);
+ break;
+ }
+ case 32: {
+ Version = input.ReadInt32();
+ break;
+ }
+ }
+ }
+ }
+
+ }
+
+ internal sealed partial class ValidateSystemContractAddressInput : pb::IMessage {
+ private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new ValidateSystemContractAddressInput());
+ private pb::UnknownFieldSet _unknownFields;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pb::MessageParser Parser { get { return _parser; } }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pbr::MessageDescriptor Descriptor {
+ get { return global::AElf.Standards.ACS0.Acs0Reflection.Descriptor.MessageTypes[9]; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ pbr::MessageDescriptor pb::IMessage.Descriptor {
+ get { return Descriptor; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public ValidateSystemContractAddressInput() {
+ OnConstruction();
+ }
+
+ partial void OnConstruction();
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public ValidateSystemContractAddressInput(ValidateSystemContractAddressInput other) : this() {
+ systemContractHashName_ = other.systemContractHashName_ != null ? other.systemContractHashName_.Clone() : null;
+ address_ = other.address_ != null ? other.address_.Clone() : null;
+ _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public ValidateSystemContractAddressInput Clone() {
+ return new ValidateSystemContractAddressInput(this);
+ }
+
+ /// Field number for the "system_contract_hash_name" field.
+ public const int SystemContractHashNameFieldNumber = 1;
+ private global::AElf.Types.Hash systemContractHashName_;
+ ///
+ /// The name hash of the contract.
+ ///
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public global::AElf.Types.Hash SystemContractHashName {
+ get { return systemContractHashName_; }
+ set {
+ systemContractHashName_ = value;
+ }
+ }
+
+ /// Field number for the "address" field.
+ public const int AddressFieldNumber = 2;
+ private global::AElf.Types.Address address_;
+ ///
+ /// The address of the contract.
+ ///
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public global::AElf.Types.Address Address {
+ get { return address_; }
+ set {
+ address_ = value;
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override bool Equals(object other) {
+ return Equals(other as ValidateSystemContractAddressInput);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool Equals(ValidateSystemContractAddressInput other) {
+ if (ReferenceEquals(other, null)) {
+ return false;
+ }
+ if (ReferenceEquals(other, this)) {
+ return true;
+ }
+ if (!object.Equals(SystemContractHashName, other.SystemContractHashName)) return false;
+ if (!object.Equals(Address, other.Address)) return false;
+ return Equals(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override int GetHashCode() {
+ int hash = 1;
+ if (systemContractHashName_ != null) hash ^= SystemContractHashName.GetHashCode();
+ if (address_ != null) hash ^= Address.GetHashCode();
+ if (_unknownFields != null) {
+ hash ^= _unknownFields.GetHashCode();
+ }
+ return hash;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override string ToString() {
+ return pb::JsonFormatter.ToDiagnosticString(this);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void WriteTo(pb::CodedOutputStream output) {
+ if (systemContractHashName_ != null) {
+ output.WriteRawTag(10);
+ output.WriteMessage(SystemContractHashName);
+ }
+ if (address_ != null) {
+ output.WriteRawTag(18);
+ output.WriteMessage(Address);
+ }
+ if (_unknownFields != null) {
+ _unknownFields.WriteTo(output);
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int CalculateSize() {
+ int size = 0;
+ if (systemContractHashName_ != null) {
+ size += 1 + pb::CodedOutputStream.ComputeMessageSize(SystemContractHashName);
+ }
+ if (address_ != null) {
+ size += 1 + pb::CodedOutputStream.ComputeMessageSize(Address);
+ }
+ if (_unknownFields != null) {
+ size += _unknownFields.CalculateSize();
+ }
+ return size;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(ValidateSystemContractAddressInput other) {
+ if (other == null) {
+ return;
+ }
+ if (other.systemContractHashName_ != null) {
+ if (systemContractHashName_ == null) {
+ SystemContractHashName = new global::AElf.Types.Hash();
+ }
+ SystemContractHashName.MergeFrom(other.SystemContractHashName);
+ }
+ if (other.address_ != null) {
+ if (address_ == null) {
+ Address = new global::AElf.Types.Address();
+ }
+ Address.MergeFrom(other.Address);
+ }
+ _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(pb::CodedInputStream input) {
+ uint tag;
+ while ((tag = input.ReadTag()) != 0) {
+ switch(tag) {
+ default:
+ _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
+ break;
+ case 10: {
+ if (systemContractHashName_ == null) {
+ SystemContractHashName = new global::AElf.Types.Hash();
+ }
+ input.ReadMessage(SystemContractHashName);
+ break;
+ }
+ case 18: {
+ if (address_ == null) {
+ Address = new global::AElf.Types.Address();
+ }
+ input.ReadMessage(Address);
+ break;
+ }
+ }
+ }
+ }
+
+ }
+
+ internal sealed partial class ReleaseContractInput : pb::IMessage {
+ private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new ReleaseContractInput());
+ private pb::UnknownFieldSet _unknownFields;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pb::MessageParser Parser { get { return _parser; } }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pbr::MessageDescriptor Descriptor {
+ get { return global::AElf.Standards.ACS0.Acs0Reflection.Descriptor.MessageTypes[10]; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ pbr::MessageDescriptor pb::IMessage.Descriptor {
+ get { return Descriptor; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public ReleaseContractInput() {
+ OnConstruction();
+ }
+
+ partial void OnConstruction();
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public ReleaseContractInput(ReleaseContractInput other) : this() {
+ proposalId_ = other.proposalId_ != null ? other.proposalId_.Clone() : null;
+ proposedContractInputHash_ = other.proposedContractInputHash_ != null ? other.proposedContractInputHash_.Clone() : null;
+ _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public ReleaseContractInput Clone() {
+ return new ReleaseContractInput(this);
+ }
+
+ /// Field number for the "proposal_id" field.
+ public const int ProposalIdFieldNumber = 1;
+ private global::AElf.Types.Hash proposalId_;
+ ///
+ /// The hash of the proposal.
+ ///
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public global::AElf.Types.Hash ProposalId {
+ get { return proposalId_; }
+ set {
+ proposalId_ = value;
+ }
+ }
+
+ /// Field number for the "proposed_contract_input_hash" field.
+ public const int ProposedContractInputHashFieldNumber = 2;
+ private global::AElf.Types.Hash proposedContractInputHash_;
+ ///
+ /// The id of the proposed contract.
+ ///
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public global::AElf.Types.Hash ProposedContractInputHash {
+ get { return proposedContractInputHash_; }
+ set {
+ proposedContractInputHash_ = value;
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override bool Equals(object other) {
+ return Equals(other as ReleaseContractInput);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool Equals(ReleaseContractInput other) {
+ if (ReferenceEquals(other, null)) {
+ return false;
+ }
+ if (ReferenceEquals(other, this)) {
+ return true;
+ }
+ if (!object.Equals(ProposalId, other.ProposalId)) return false;
+ if (!object.Equals(ProposedContractInputHash, other.ProposedContractInputHash)) return false;
+ return Equals(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override int GetHashCode() {
+ int hash = 1;
+ if (proposalId_ != null) hash ^= ProposalId.GetHashCode();
+ if (proposedContractInputHash_ != null) hash ^= ProposedContractInputHash.GetHashCode();
+ if (_unknownFields != null) {
+ hash ^= _unknownFields.GetHashCode();
+ }
+ return hash;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override string ToString() {
+ return pb::JsonFormatter.ToDiagnosticString(this);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void WriteTo(pb::CodedOutputStream output) {
+ if (proposalId_ != null) {
+ output.WriteRawTag(10);
+ output.WriteMessage(ProposalId);
+ }
+ if (proposedContractInputHash_ != null) {
+ output.WriteRawTag(18);
+ output.WriteMessage(ProposedContractInputHash);
+ }
+ if (_unknownFields != null) {
+ _unknownFields.WriteTo(output);
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int CalculateSize() {
+ int size = 0;
+ if (proposalId_ != null) {
+ size += 1 + pb::CodedOutputStream.ComputeMessageSize(ProposalId);
+ }
+ if (proposedContractInputHash_ != null) {
+ size += 1 + pb::CodedOutputStream.ComputeMessageSize(ProposedContractInputHash);
+ }
+ if (_unknownFields != null) {
+ size += _unknownFields.CalculateSize();
+ }
+ return size;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(ReleaseContractInput other) {
+ if (other == null) {
+ return;
+ }
+ if (other.proposalId_ != null) {
+ if (proposalId_ == null) {
+ ProposalId = new global::AElf.Types.Hash();
+ }
+ ProposalId.MergeFrom(other.ProposalId);
+ }
+ if (other.proposedContractInputHash_ != null) {
+ if (proposedContractInputHash_ == null) {
+ ProposedContractInputHash = new global::AElf.Types.Hash();
+ }
+ ProposedContractInputHash.MergeFrom(other.ProposedContractInputHash);
+ }
+ _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(pb::CodedInputStream input) {
+ uint tag;
+ while ((tag = input.ReadTag()) != 0) {
+ switch(tag) {
+ default:
+ _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
+ break;
+ case 10: {
+ if (proposalId_ == null) {
+ ProposalId = new global::AElf.Types.Hash();
+ }
+ input.ReadMessage(ProposalId);
+ break;
+ }
+ case 18: {
+ if (proposedContractInputHash_ == null) {
+ ProposedContractInputHash = new global::AElf.Types.Hash();
+ }
+ input.ReadMessage(ProposedContractInputHash);
+ break;
+ }
+ }
+ }
+ }
+
+ }
+
+ internal sealed partial class ContractCodeHashList : pb::IMessage {
+ private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new ContractCodeHashList());
+ private pb::UnknownFieldSet _unknownFields;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pb::MessageParser Parser { get { return _parser; } }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pbr::MessageDescriptor Descriptor {
+ get { return global::AElf.Standards.ACS0.Acs0Reflection.Descriptor.MessageTypes[11]; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ pbr::MessageDescriptor pb::IMessage.Descriptor {
+ get { return Descriptor; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public ContractCodeHashList() {
+ OnConstruction();
+ }
+
+ partial void OnConstruction();
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public ContractCodeHashList(ContractCodeHashList other) : this() {
+ value_ = other.value_.Clone();
+ _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public ContractCodeHashList Clone() {
+ return new ContractCodeHashList(this);
+ }
+
+ /// Field number for the "value" field.
+ public const int ValueFieldNumber = 1;
+ private static readonly pb::FieldCodec _repeated_value_codec
+ = pb::FieldCodec.ForMessage(10, global::AElf.Types.Hash.Parser);
+ private readonly pbc::RepeatedField value_ = new pbc::RepeatedField();
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public pbc::RepeatedField Value {
+ get { return value_; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override bool Equals(object other) {
+ return Equals(other as ContractCodeHashList);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool Equals(ContractCodeHashList other) {
+ if (ReferenceEquals(other, null)) {
+ return false;
+ }
+ if (ReferenceEquals(other, this)) {
+ return true;
+ }
+ if(!value_.Equals(other.value_)) return false;
+ return Equals(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override int GetHashCode() {
+ int hash = 1;
+ hash ^= value_.GetHashCode();
+ if (_unknownFields != null) {
+ hash ^= _unknownFields.GetHashCode();
+ }
+ return hash;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override string ToString() {
+ return pb::JsonFormatter.ToDiagnosticString(this);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void WriteTo(pb::CodedOutputStream output) {
+ value_.WriteTo(output, _repeated_value_codec);
+ if (_unknownFields != null) {
+ _unknownFields.WriteTo(output);
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int CalculateSize() {
+ int size = 0;
+ size += value_.CalculateSize(_repeated_value_codec);
+ if (_unknownFields != null) {
+ size += _unknownFields.CalculateSize();
+ }
+ return size;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(ContractCodeHashList other) {
+ if (other == null) {
+ return;
+ }
+ value_.Add(other.value_);
+ _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(pb::CodedInputStream input) {
+ uint tag;
+ while ((tag = input.ReadTag()) != 0) {
+ switch(tag) {
+ default:
+ _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
+ break;
+ case 10: {
+ value_.AddEntriesFrom(input, _repeated_value_codec);
+ break;
+ }
+ }
+ }
+ }
+
+ }
+
+ internal sealed partial class ContractCodeHashMap : pb::IMessage {
+ private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new ContractCodeHashMap());
+ private pb::UnknownFieldSet _unknownFields;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pb::MessageParser Parser { get { return _parser; } }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pbr::MessageDescriptor Descriptor {
+ get { return global::AElf.Standards.ACS0.Acs0Reflection.Descriptor.MessageTypes[12]; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ pbr::MessageDescriptor pb::IMessage.Descriptor {
+ get { return Descriptor; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public ContractCodeHashMap() {
+ OnConstruction();
+ }
+
+ partial void OnConstruction();
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public ContractCodeHashMap(ContractCodeHashMap other) : this() {
+ value_ = other.value_.Clone();
+ _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public ContractCodeHashMap Clone() {
+ return new ContractCodeHashMap(this);
+ }
+
+ /// Field number for the "value" field.
+ public const int ValueFieldNumber = 1;
+ private static readonly pbc::MapField.Codec _map_value_codec
+ = new pbc::MapField.Codec(pb::FieldCodec.ForInt64(8, 0L), pb::FieldCodec.ForMessage(18, global::AElf.Standards.ACS0.ContractCodeHashList.Parser), 10);
+ private readonly pbc::MapField value_ = new pbc::MapField();
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public pbc::MapField Value {
+ get { return value_; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override bool Equals(object other) {
+ return Equals(other as ContractCodeHashMap);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool Equals(ContractCodeHashMap other) {
+ if (ReferenceEquals(other, null)) {
+ return false;
+ }
+ if (ReferenceEquals(other, this)) {
+ return true;
+ }
+ if (!Value.Equals(other.Value)) return false;
+ return Equals(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override int GetHashCode() {
+ int hash = 1;
+ hash ^= Value.GetHashCode();
+ if (_unknownFields != null) {
+ hash ^= _unknownFields.GetHashCode();
+ }
+ return hash;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override string ToString() {
+ return pb::JsonFormatter.ToDiagnosticString(this);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void WriteTo(pb::CodedOutputStream output) {
+ value_.WriteTo(output, _map_value_codec);
+ if (_unknownFields != null) {
+ _unknownFields.WriteTo(output);
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int CalculateSize() {
+ int size = 0;
+ size += value_.CalculateSize(_map_value_codec);
+ if (_unknownFields != null) {
+ size += _unknownFields.CalculateSize();
+ }
+ return size;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(ContractCodeHashMap other) {
+ if (other == null) {
+ return;
+ }
+ value_.Add(other.value_);
+ _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(pb::CodedInputStream input) {
+ uint tag;
+ while ((tag = input.ReadTag()) != 0) {
+ switch(tag) {
+ default:
+ _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
+ break;
+ case 10: {
+ value_.AddEntriesFrom(input, _map_value_codec);
+ break;
+ }
+ }
+ }
+ }
+
+ }
+
+ #endregion
+
+}
+
+#endregion Designer generated code
diff --git a/src/AElf.CrossChainServer.Application.Contracts/Contracts/Acs1.g.cs b/src/AElf.CrossChainServer.Application.Contracts/Contracts/Acs1.g.cs
new file mode 100644
index 0000000..28dde5b
--- /dev/null
+++ b/src/AElf.CrossChainServer.Application.Contracts/Contracts/Acs1.g.cs
@@ -0,0 +1,405 @@
+//
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: acs1.proto
+//
+#pragma warning disable 1591, 0612, 3021
+#region Designer generated code
+
+using pb = global::Google.Protobuf;
+using pbc = global::Google.Protobuf.Collections;
+using pbr = global::Google.Protobuf.Reflection;
+using scg = global::System.Collections.Generic;
+namespace AElf.Standards.ACS1 {
+
+ /// Holder for reflection information generated from acs1.proto
+ public static partial class Acs1Reflection {
+
+ #region Descriptor
+ /// File descriptor for acs1.proto
+ public static pbr::FileDescriptor Descriptor {
+ get { return descriptor; }
+ }
+ private static pbr::FileDescriptor descriptor;
+
+ static Acs1Reflection() {
+ byte[] descriptorData = global::System.Convert.FromBase64String(
+ string.Concat(
+ "CgphY3MxLnByb3RvEgRhY3MxGhJhZWxmL29wdGlvbnMucHJvdG8aG2dvb2ds",
+ "ZS9wcm90b2J1Zi9lbXB0eS5wcm90bxoeZ29vZ2xlL3Byb3RvYnVmL3dyYXBw",
+ "ZXJzLnByb3RvGg9hZWxmL2NvcmUucHJvdG8aFGF1dGhvcml0eV9pbmZvLnBy",
+ "b3RvIloKCk1ldGhvZEZlZXMSEwoLbWV0aG9kX25hbWUYASABKAkSHQoEZmVl",
+ "cxgCIAMoCzIPLmFjczEuTWV0aG9kRmVlEhgKEGlzX3NpemVfZmVlX2ZyZWUY",
+ "AyABKAgiLgoJTWV0aG9kRmVlEg4KBnN5bWJvbBgBIAEoCRIRCgliYXNpY19m",
+ "ZWUYAiABKAMyrgIKGU1ldGhvZEZlZVByb3ZpZGVyQ29udHJhY3QSOgoMU2V0",
+ "TWV0aG9kRmVlEhAuYWNzMS5NZXRob2RGZWVzGhYuZ29vZ2xlLnByb3RvYnVm",
+ "LkVtcHR5IgASRQoZQ2hhbmdlTWV0aG9kRmVlQ29udHJvbGxlchIOLkF1dGhv",
+ "cml0eUluZm8aFi5nb29nbGUucHJvdG9idWYuRW1wdHkiABJFCgxHZXRNZXRo",
+ "b2RGZWUSHC5nb29nbGUucHJvdG9idWYuU3RyaW5nVmFsdWUaEC5hY3MxLk1l",
+ "dGhvZEZlZXMiBYiJ9wEBEkcKFkdldE1ldGhvZEZlZUNvbnRyb2xsZXISFi5n",
+ "b29nbGUucHJvdG9idWYuRW1wdHkaDi5BdXRob3JpdHlJbmZvIgWIifcBAUIf",
+ "qgITQUVsZi5TdGFuZGFyZHMuQUNTMYqS9AEEYWNzMVAAUAFQAmIGcHJvdG8z"));
+ descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
+ new pbr::FileDescriptor[] { global::AElf.OptionsReflection.Descriptor, global::Google.Protobuf.WellKnownTypes.EmptyReflection.Descriptor, global::Google.Protobuf.WellKnownTypes.WrappersReflection.Descriptor, global::AElf.Types.CoreReflection.Descriptor, global::AuthorityInfoReflection.Descriptor, },
+ new pbr::GeneratedClrTypeInfo(null, null, new pbr::GeneratedClrTypeInfo[] {
+ new pbr::GeneratedClrTypeInfo(typeof(global::AElf.Standards.ACS1.MethodFees), global::AElf.Standards.ACS1.MethodFees.Parser, new[]{ "MethodName", "Fees", "IsSizeFeeFree" }, null, null, null, null),
+ new pbr::GeneratedClrTypeInfo(typeof(global::AElf.Standards.ACS1.MethodFee), global::AElf.Standards.ACS1.MethodFee.Parser, new[]{ "Symbol", "BasicFee" }, null, null, null, null)
+ }));
+ }
+ #endregion
+
+ }
+ #region Messages
+ public sealed partial class MethodFees : pb::IMessage {
+ private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new MethodFees());
+ private pb::UnknownFieldSet _unknownFields;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pb::MessageParser Parser { get { return _parser; } }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pbr::MessageDescriptor Descriptor {
+ get { return global::AElf.Standards.ACS1.Acs1Reflection.Descriptor.MessageTypes[0]; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ pbr::MessageDescriptor pb::IMessage.Descriptor {
+ get { return Descriptor; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public MethodFees() {
+ OnConstruction();
+ }
+
+ partial void OnConstruction();
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public MethodFees(MethodFees other) : this() {
+ methodName_ = other.methodName_;
+ fees_ = other.fees_.Clone();
+ isSizeFeeFree_ = other.isSizeFeeFree_;
+ _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public MethodFees Clone() {
+ return new MethodFees(this);
+ }
+
+ /// Field number for the "method_name" field.
+ public const int MethodNameFieldNumber = 1;
+ private string methodName_ = "";
+ ///
+ /// The name of the method to be charged.
+ ///
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public string MethodName {
+ get { return methodName_; }
+ set {
+ methodName_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
+ }
+ }
+
+ /// Field number for the "fees" field.
+ public const int FeesFieldNumber = 2;
+ private static readonly pb::FieldCodec _repeated_fees_codec
+ = pb::FieldCodec.ForMessage(18, global::AElf.Standards.ACS1.MethodFee.Parser);
+ private readonly pbc::RepeatedField fees_ = new pbc::RepeatedField();
+ ///
+ /// List of fees to be charged.
+ ///
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public pbc::RepeatedField Fees {
+ get { return fees_; }
+ }
+
+ /// Field number for the "is_size_fee_free" field.
+ public const int IsSizeFeeFreeFieldNumber = 3;
+ private bool isSizeFeeFree_;
+ ///
+ /// Optional based on the implementation of SetMethodFee method.
+ ///
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool IsSizeFeeFree {
+ get { return isSizeFeeFree_; }
+ set {
+ isSizeFeeFree_ = value;
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override bool Equals(object other) {
+ return Equals(other as MethodFees);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool Equals(MethodFees other) {
+ if (ReferenceEquals(other, null)) {
+ return false;
+ }
+ if (ReferenceEquals(other, this)) {
+ return true;
+ }
+ if (MethodName != other.MethodName) return false;
+ if(!fees_.Equals(other.fees_)) return false;
+ if (IsSizeFeeFree != other.IsSizeFeeFree) return false;
+ return Equals(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override int GetHashCode() {
+ int hash = 1;
+ if (MethodName.Length != 0) hash ^= MethodName.GetHashCode();
+ hash ^= fees_.GetHashCode();
+ if (IsSizeFeeFree != false) hash ^= IsSizeFeeFree.GetHashCode();
+ if (_unknownFields != null) {
+ hash ^= _unknownFields.GetHashCode();
+ }
+ return hash;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override string ToString() {
+ return pb::JsonFormatter.ToDiagnosticString(this);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void WriteTo(pb::CodedOutputStream output) {
+ if (MethodName.Length != 0) {
+ output.WriteRawTag(10);
+ output.WriteString(MethodName);
+ }
+ fees_.WriteTo(output, _repeated_fees_codec);
+ if (IsSizeFeeFree != false) {
+ output.WriteRawTag(24);
+ output.WriteBool(IsSizeFeeFree);
+ }
+ if (_unknownFields != null) {
+ _unknownFields.WriteTo(output);
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int CalculateSize() {
+ int size = 0;
+ if (MethodName.Length != 0) {
+ size += 1 + pb::CodedOutputStream.ComputeStringSize(MethodName);
+ }
+ size += fees_.CalculateSize(_repeated_fees_codec);
+ if (IsSizeFeeFree != false) {
+ size += 1 + 1;
+ }
+ if (_unknownFields != null) {
+ size += _unknownFields.CalculateSize();
+ }
+ return size;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(MethodFees other) {
+ if (other == null) {
+ return;
+ }
+ if (other.MethodName.Length != 0) {
+ MethodName = other.MethodName;
+ }
+ fees_.Add(other.fees_);
+ if (other.IsSizeFeeFree != false) {
+ IsSizeFeeFree = other.IsSizeFeeFree;
+ }
+ _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(pb::CodedInputStream input) {
+ uint tag;
+ while ((tag = input.ReadTag()) != 0) {
+ switch(tag) {
+ default:
+ _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
+ break;
+ case 10: {
+ MethodName = input.ReadString();
+ break;
+ }
+ case 18: {
+ fees_.AddEntriesFrom(input, _repeated_fees_codec);
+ break;
+ }
+ case 24: {
+ IsSizeFeeFree = input.ReadBool();
+ break;
+ }
+ }
+ }
+ }
+
+ }
+
+ public sealed partial class MethodFee : pb::IMessage {
+ private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new MethodFee());
+ private pb::UnknownFieldSet _unknownFields;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pb::MessageParser Parser { get { return _parser; } }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public static pbr::MessageDescriptor Descriptor {
+ get { return global::AElf.Standards.ACS1.Acs1Reflection.Descriptor.MessageTypes[1]; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ pbr::MessageDescriptor pb::IMessage.Descriptor {
+ get { return Descriptor; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public MethodFee() {
+ OnConstruction();
+ }
+
+ partial void OnConstruction();
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public MethodFee(MethodFee other) : this() {
+ symbol_ = other.symbol_;
+ basicFee_ = other.basicFee_;
+ _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public MethodFee Clone() {
+ return new MethodFee(this);
+ }
+
+ /// Field number for the "symbol" field.
+ public const int SymbolFieldNumber = 1;
+ private string symbol_ = "";
+ ///
+ /// The token symbol of the method fee.
+ ///
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public string Symbol {
+ get { return symbol_; }
+ set {
+ symbol_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
+ }
+ }
+
+ /// Field number for the "basic_fee" field.
+ public const int BasicFeeFieldNumber = 2;
+ private long basicFee_;
+ ///
+ /// The amount of fees to be charged.
+ ///
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public long BasicFee {
+ get { return basicFee_; }
+ set {
+ basicFee_ = value;
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override bool Equals(object other) {
+ return Equals(other as MethodFee);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public bool Equals(MethodFee other) {
+ if (ReferenceEquals(other, null)) {
+ return false;
+ }
+ if (ReferenceEquals(other, this)) {
+ return true;
+ }
+ if (Symbol != other.Symbol) return false;
+ if (BasicFee != other.BasicFee) return false;
+ return Equals(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override int GetHashCode() {
+ int hash = 1;
+ if (Symbol.Length != 0) hash ^= Symbol.GetHashCode();
+ if (BasicFee != 0L) hash ^= BasicFee.GetHashCode();
+ if (_unknownFields != null) {
+ hash ^= _unknownFields.GetHashCode();
+ }
+ return hash;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public override string ToString() {
+ return pb::JsonFormatter.ToDiagnosticString(this);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void WriteTo(pb::CodedOutputStream output) {
+ if (Symbol.Length != 0) {
+ output.WriteRawTag(10);
+ output.WriteString(Symbol);
+ }
+ if (BasicFee != 0L) {
+ output.WriteRawTag(16);
+ output.WriteInt64(BasicFee);
+ }
+ if (_unknownFields != null) {
+ _unknownFields.WriteTo(output);
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public int CalculateSize() {
+ int size = 0;
+ if (Symbol.Length != 0) {
+ size += 1 + pb::CodedOutputStream.ComputeStringSize(Symbol);
+ }
+ if (BasicFee != 0L) {
+ size += 1 + pb::CodedOutputStream.ComputeInt64Size(BasicFee);
+ }
+ if (_unknownFields != null) {
+ size += _unknownFields.CalculateSize();
+ }
+ return size;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(MethodFee other) {
+ if (other == null) {
+ return;
+ }
+ if (other.Symbol.Length != 0) {
+ Symbol = other.Symbol;
+ }
+ if (other.BasicFee != 0L) {
+ BasicFee = other.BasicFee;
+ }
+ _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ public void MergeFrom(pb::CodedInputStream input) {
+ uint tag;
+ while ((tag = input.ReadTag()) != 0) {
+ switch(tag) {
+ default:
+ _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
+ break;
+ case 10: {
+ Symbol = input.ReadString();
+ break;
+ }
+ case 16: {
+ BasicFee = input.ReadInt64();
+ break;
+ }
+ }
+ }
+ }
+
+ }
+
+ #endregion
+
+}
+
+#endregion Designer generated code
diff --git a/src/AElf.CrossChainServer.Application.Contracts/Contracts/Acs11.c.cs b/src/AElf.CrossChainServer.Application.Contracts/Contracts/Acs11.c.cs
new file mode 100644
index 0000000..5628f3f
--- /dev/null
+++ b/src/AElf.CrossChainServer.Application.Contracts/Contracts/Acs11.c.cs
@@ -0,0 +1,82 @@
+//
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: acs11.proto
+//
+// Original file comments:
+// *
+// AElf Standards ACS11(Consensus Standard)
+//
+// Used to customize consensus mechanisms for cross chain.
+#pragma warning disable 0414, 1591
+#region Designer generated code
+
+using System.Collections.Generic;
+using aelf = global::AElf.CSharp.Core;
+
+namespace AElf.Standards.ACS11 {
+
+ #region Events
+ #endregion
+ internal static partial class CrossChainInteractionContractContainer
+ {
+ static readonly string __ServiceName = "acs11.CrossChainInteractionContract";
+
+ #region Marshallers
+ static readonly aelf::Marshaller __Marshaller_google_protobuf_BytesValue = aelf::Marshallers.Create((arg) => global::Google.Protobuf.MessageExtensions.ToByteArray(arg), global::Google.Protobuf.WellKnownTypes.BytesValue.Parser.ParseFrom);
+ static readonly aelf::Marshaller __Marshaller_google_protobuf_Empty = aelf::Marshallers.Create((arg) => global::Google.Protobuf.MessageExtensions.ToByteArray(arg), global::Google.Protobuf.WellKnownTypes.Empty.Parser.ParseFrom);
+ static readonly aelf::Marshaller __Marshaller_aelf_Address = aelf::Marshallers.Create((arg) => global::Google.Protobuf.MessageExtensions.ToByteArray(arg), global::AElf.Types.Address.Parser.ParseFrom);
+ static readonly aelf::Marshaller __Marshaller_google_protobuf_BoolValue = aelf::Marshallers.Create((arg) => global::Google.Protobuf.MessageExtensions.ToByteArray(arg), global::Google.Protobuf.WellKnownTypes.BoolValue.Parser.ParseFrom);
+ #endregion
+
+ #region Methods
+ static readonly aelf::Method __Method_UpdateInformationFromCrossChain = new aelf::Method(
+ aelf::MethodType.Action,
+ __ServiceName,
+ "UpdateInformationFromCrossChain",
+ __Marshaller_google_protobuf_BytesValue,
+ __Marshaller_google_protobuf_Empty);
+
+ static readonly aelf::Method __Method_GetChainInitializationInformation = new aelf::Method(
+ aelf::MethodType.View,
+ __ServiceName,
+ "GetChainInitializationInformation",
+ __Marshaller_google_protobuf_BytesValue,
+ __Marshaller_google_protobuf_BytesValue);
+
+ static readonly aelf::Method __Method_CheckCrossChainIndexingPermission = new aelf::Method(
+ aelf::MethodType.View,
+ __ServiceName,
+ "CheckCrossChainIndexingPermission",
+ __Marshaller_aelf_Address,
+ __Marshaller_google_protobuf_BoolValue);
+
+ #endregion
+
+ #region Descriptors
+ public static global::Google.Protobuf.Reflection.ServiceDescriptor Descriptor
+ {
+ get { return global::AElf.Standards.ACS11.Acs11Reflection.Descriptor.Services[0]; }
+ }
+
+ public static global::System.Collections.Generic.IReadOnlyList Descriptors
+ {
+ get
+ {
+ return new global::System.Collections.Generic.List()
+ {
+ global::AElf.Standards.ACS11.Acs11Reflection.Descriptor.Services[0],
+ };
+ }
+ }
+ #endregion
+
+ public class CrossChainInteractionContractReferenceState : global::AElf.Sdk.CSharp.State.ContractReferenceState
+ {
+ internal global::AElf.Sdk.CSharp.State.MethodReference UpdateInformationFromCrossChain { get; set; }
+ internal global::AElf.Sdk.CSharp.State.MethodReference GetChainInitializationInformation { get; set; }
+ internal global::AElf.Sdk.CSharp.State.MethodReference CheckCrossChainIndexingPermission { get; set; }
+ }
+ }
+}
+#endregion
+
diff --git a/src/AElf.CrossChainServer.Application.Contracts/Contracts/Acs11.g.cs b/src/AElf.CrossChainServer.Application.Contracts/Contracts/Acs11.g.cs
new file mode 100644
index 0000000..185c260
--- /dev/null
+++ b/src/AElf.CrossChainServer.Application.Contracts/Contracts/Acs11.g.cs
@@ -0,0 +1,47 @@
+//
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: acs11.proto
+//
+#pragma warning disable 1591, 0612, 3021
+#region Designer generated code
+
+using pb = global::Google.Protobuf;
+using pbc = global::Google.Protobuf.Collections;
+using pbr = global::Google.Protobuf.Reflection;
+using scg = global::System.Collections.Generic;
+namespace AElf.Standards.ACS11 {
+
+ /// Holder for reflection information generated from acs11.proto
+ internal static partial class Acs11Reflection {
+
+ #region Descriptor
+ /// File descriptor for acs11.proto
+ public static pbr::FileDescriptor Descriptor {
+ get { return descriptor; }
+ }
+ private static pbr::FileDescriptor descriptor;
+
+ static Acs11Reflection() {
+ byte[] descriptorData = global::System.Convert.FromBase64String(
+ string.Concat(
+ "CgthY3MxMS5wcm90bxIFYWNzMTEaEmFlbGYvb3B0aW9ucy5wcm90bxoPYWVs",
+ "Zi9jb3JlLnByb3RvGh5nb29nbGUvcHJvdG9idWYvd3JhcHBlcnMucHJvdG8a",
+ "G2dvb2dsZS9wcm90b2J1Zi9lbXB0eS5wcm90bzK2AgodQ3Jvc3NDaGFpbklu",
+ "dGVyYWN0aW9uQ29udHJhY3QSWAofVXBkYXRlSW5mb3JtYXRpb25Gcm9tQ3Jv",
+ "c3NDaGFpbhIbLmdvb2dsZS5wcm90b2J1Zi5CeXRlc1ZhbHVlGhYuZ29vZ2xl",
+ "LnByb3RvYnVmLkVtcHR5IgASZAohR2V0Q2hhaW5Jbml0aWFsaXphdGlvbklu",
+ "Zm9ybWF0aW9uEhsuZ29vZ2xlLnByb3RvYnVmLkJ5dGVzVmFsdWUaGy5nb29n",
+ "bGUucHJvdG9idWYuQnl0ZXNWYWx1ZSIFiIn3AQESVQohQ2hlY2tDcm9zc0No",
+ "YWluSW5kZXhpbmdQZXJtaXNzaW9uEg0uYWVsZi5BZGRyZXNzGhouZ29vZ2xl",
+ "LnByb3RvYnVmLkJvb2xWYWx1ZSIFiIn3AQFCIaoCFEFFbGYuU3RhbmRhcmRz",
+ "LkFDUzExipL0AQVhY3MxMWIGcHJvdG8z"));
+ descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
+ new pbr::FileDescriptor[] { global::AElf.OptionsReflection.Descriptor, global::AElf.Types.CoreReflection.Descriptor, global::Google.Protobuf.WellKnownTypes.WrappersReflection.Descriptor, global::Google.Protobuf.WellKnownTypes.EmptyReflection.Descriptor, },
+ new pbr::GeneratedClrTypeInfo(null, null, null));
+ }
+ #endregion
+
+ }
+}
+
+#endregion Designer generated code
diff --git a/src/AElf.CrossChainServer.Application.Contracts/Contracts/Acs12.g.cs b/src/AElf.CrossChainServer.Application.Contracts/Contracts/Acs12.g.cs
new file mode 100644
index 0000000..e039976
--- /dev/null
+++ b/src/AElf.CrossChainServer.Application.Contracts/Contracts/Acs12.g.cs
@@ -0,0 +1,506 @@
+//
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: acs12.proto
+//
+#pragma warning disable 1591, 0612, 3021, 8981
+#region Designer generated code
+
+using pb = global::Google.Protobuf;
+using pbc = global::Google.Protobuf.Collections;
+using pbr = global::Google.Protobuf.Reflection;
+using scg = global::System.Collections.Generic;
+namespace AElf.Standards.ACS12 {
+
+ /// Holder for reflection information generated from acs12.proto
+ public static partial class Acs12Reflection {
+
+ #region Descriptor
+ /// File descriptor for acs12.proto
+ public static pbr::FileDescriptor Descriptor {
+ get { return descriptor; }
+ }
+ private static pbr::FileDescriptor descriptor;
+
+ static Acs12Reflection() {
+ byte[] descriptorData = global::System.Convert.FromBase64String(
+ string.Concat(
+ "CgthY3MxMi5wcm90bxIFYWNzMTIaEmFlbGYvb3B0aW9ucy5wcm90bxobZ29v",
+ "Z2xlL3Byb3RvYnVmL2VtcHR5LnByb3RvGh5nb29nbGUvcHJvdG9idWYvd3Jh",
+ "cHBlcnMucHJvdG8aD2FlbGYvY29yZS5wcm90byJeChZVc2VyQ29udHJhY3RN",
+ "ZXRob2RGZWVzEioKBGZlZXMYAiADKAsyHC5hY3MxMi5Vc2VyQ29udHJhY3RN",
+ "ZXRob2RGZWUSGAoQaXNfc2l6ZV9mZWVfZnJlZRgDIAEoCCI6ChVVc2VyQ29u",
+ "dHJhY3RNZXRob2RGZWUSDgoGc3ltYm9sGAEgASgJEhEKCWJhc2ljX2ZlZRgC",
+ "IAEoAzIOCgxVc2VyQ29udHJhY3RCIaoCFEFFbGYuU3RhbmRhcmRzLkFDUzEy",
+ "ipL0AQVhY3MxMlAAUAFQAmIGcHJvdG8z"));
+ descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
+ new pbr::FileDescriptor[] { global::AElf.OptionsReflection.Descriptor, global::Google.Protobuf.WellKnownTypes.EmptyReflection.Descriptor, global::Google.Protobuf.WellKnownTypes.WrappersReflection.Descriptor, global::AElf.Types.CoreReflection.Descriptor, },
+ new pbr::GeneratedClrTypeInfo(null, null, new pbr::GeneratedClrTypeInfo[] {
+ new pbr::GeneratedClrTypeInfo(typeof(global::AElf.Standards.ACS12.UserContractMethodFees), global::AElf.Standards.ACS12.UserContractMethodFees.Parser, new[]{ "Fees", "IsSizeFeeFree" }, null, null, null, null),
+ new pbr::GeneratedClrTypeInfo(typeof(global::AElf.Standards.ACS12.UserContractMethodFee), global::AElf.Standards.ACS12.UserContractMethodFee.Parser, new[]{ "Symbol", "BasicFee" }, null, null, null, null)
+ }));
+ }
+ #endregion
+
+ }
+ #region Messages
+ ///
+ ///Specified method fee for user contract.
+ ///
+ public sealed partial class UserContractMethodFees : pb::IMessage
+ #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
+ , pb::IBufferMessage
+ #endif
+ {
+ private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new UserContractMethodFees());
+ private pb::UnknownFieldSet _unknownFields;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public static pb::MessageParser Parser { get { return _parser; } }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public static pbr::MessageDescriptor Descriptor {
+ get { return global::AElf.Standards.ACS12.Acs12Reflection.Descriptor.MessageTypes[0]; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ pbr::MessageDescriptor pb::IMessage.Descriptor {
+ get { return Descriptor; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public UserContractMethodFees() {
+ OnConstruction();
+ }
+
+ partial void OnConstruction();
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public UserContractMethodFees(UserContractMethodFees other) : this() {
+ fees_ = other.fees_.Clone();
+ isSizeFeeFree_ = other.isSizeFeeFree_;
+ _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public UserContractMethodFees Clone() {
+ return new UserContractMethodFees(this);
+ }
+
+ /// Field number for the "fees" field.
+ public const int FeesFieldNumber = 2;
+ private static readonly pb::FieldCodec _repeated_fees_codec
+ = pb::FieldCodec.ForMessage(18, global::AElf.Standards.ACS12.UserContractMethodFee.Parser);
+ private readonly pbc::RepeatedField fees_ = new pbc::RepeatedField();
+ ///
+ /// List of fees to be charged.
+ ///
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public pbc::RepeatedField Fees {
+ get { return fees_; }
+ }
+
+ /// Field number for the "is_size_fee_free" field.
+ public const int IsSizeFeeFreeFieldNumber = 3;
+ private bool isSizeFeeFree_;
+ ///
+ /// Optional based on the implementation of SetConfiguration method.
+ ///
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public bool IsSizeFeeFree {
+ get { return isSizeFeeFree_; }
+ set {
+ isSizeFeeFree_ = value;
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public override bool Equals(object other) {
+ return Equals(other as UserContractMethodFees);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public bool Equals(UserContractMethodFees other) {
+ if (ReferenceEquals(other, null)) {
+ return false;
+ }
+ if (ReferenceEquals(other, this)) {
+ return true;
+ }
+ if(!fees_.Equals(other.fees_)) return false;
+ if (IsSizeFeeFree != other.IsSizeFeeFree) return false;
+ return Equals(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public override int GetHashCode() {
+ int hash = 1;
+ hash ^= fees_.GetHashCode();
+ if (IsSizeFeeFree != false) hash ^= IsSizeFeeFree.GetHashCode();
+ if (_unknownFields != null) {
+ hash ^= _unknownFields.GetHashCode();
+ }
+ return hash;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public override string ToString() {
+ return pb::JsonFormatter.ToDiagnosticString(this);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public void WriteTo(pb::CodedOutputStream output) {
+ #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
+ output.WriteRawMessage(this);
+ #else
+ fees_.WriteTo(output, _repeated_fees_codec);
+ if (IsSizeFeeFree != false) {
+ output.WriteRawTag(24);
+ output.WriteBool(IsSizeFeeFree);
+ }
+ if (_unknownFields != null) {
+ _unknownFields.WriteTo(output);
+ }
+ #endif
+ }
+
+ #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
+ fees_.WriteTo(ref output, _repeated_fees_codec);
+ if (IsSizeFeeFree != false) {
+ output.WriteRawTag(24);
+ output.WriteBool(IsSizeFeeFree);
+ }
+ if (_unknownFields != null) {
+ _unknownFields.WriteTo(ref output);
+ }
+ }
+ #endif
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public int CalculateSize() {
+ int size = 0;
+ size += fees_.CalculateSize(_repeated_fees_codec);
+ if (IsSizeFeeFree != false) {
+ size += 1 + 1;
+ }
+ if (_unknownFields != null) {
+ size += _unknownFields.CalculateSize();
+ }
+ return size;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public void MergeFrom(UserContractMethodFees other) {
+ if (other == null) {
+ return;
+ }
+ fees_.Add(other.fees_);
+ if (other.IsSizeFeeFree != false) {
+ IsSizeFeeFree = other.IsSizeFeeFree;
+ }
+ _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public void MergeFrom(pb::CodedInputStream input) {
+ #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
+ input.ReadRawMessage(this);
+ #else
+ uint tag;
+ while ((tag = input.ReadTag()) != 0) {
+ switch(tag) {
+ default:
+ _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
+ break;
+ case 18: {
+ fees_.AddEntriesFrom(input, _repeated_fees_codec);
+ break;
+ }
+ case 24: {
+ IsSizeFeeFree = input.ReadBool();
+ break;
+ }
+ }
+ }
+ #endif
+ }
+
+ #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
+ uint tag;
+ while ((tag = input.ReadTag()) != 0) {
+ switch(tag) {
+ default:
+ _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
+ break;
+ case 18: {
+ fees_.AddEntriesFrom(ref input, _repeated_fees_codec);
+ break;
+ }
+ case 24: {
+ IsSizeFeeFree = input.ReadBool();
+ break;
+ }
+ }
+ }
+ }
+ #endif
+
+ }
+
+ public sealed partial class UserContractMethodFee : pb::IMessage
+ #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
+ , pb::IBufferMessage
+ #endif
+ {
+ private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new UserContractMethodFee());
+ private pb::UnknownFieldSet _unknownFields;
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public static pb::MessageParser Parser { get { return _parser; } }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public static pbr::MessageDescriptor Descriptor {
+ get { return global::AElf.Standards.ACS12.Acs12Reflection.Descriptor.MessageTypes[1]; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ pbr::MessageDescriptor pb::IMessage.Descriptor {
+ get { return Descriptor; }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public UserContractMethodFee() {
+ OnConstruction();
+ }
+
+ partial void OnConstruction();
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public UserContractMethodFee(UserContractMethodFee other) : this() {
+ symbol_ = other.symbol_;
+ basicFee_ = other.basicFee_;
+ _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public UserContractMethodFee Clone() {
+ return new UserContractMethodFee(this);
+ }
+
+ /// Field number for the "symbol" field.
+ public const int SymbolFieldNumber = 1;
+ private string symbol_ = "";
+ ///
+ /// The token symbol of the method fee.
+ ///
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public string Symbol {
+ get { return symbol_; }
+ set {
+ symbol_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
+ }
+ }
+
+ /// Field number for the "basic_fee" field.
+ public const int BasicFeeFieldNumber = 2;
+ private long basicFee_;
+ ///
+ /// The amount of fees to be charged.
+ ///
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public long BasicFee {
+ get { return basicFee_; }
+ set {
+ basicFee_ = value;
+ }
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public override bool Equals(object other) {
+ return Equals(other as UserContractMethodFee);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public bool Equals(UserContractMethodFee other) {
+ if (ReferenceEquals(other, null)) {
+ return false;
+ }
+ if (ReferenceEquals(other, this)) {
+ return true;
+ }
+ if (Symbol != other.Symbol) return false;
+ if (BasicFee != other.BasicFee) return false;
+ return Equals(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public override int GetHashCode() {
+ int hash = 1;
+ if (Symbol.Length != 0) hash ^= Symbol.GetHashCode();
+ if (BasicFee != 0L) hash ^= BasicFee.GetHashCode();
+ if (_unknownFields != null) {
+ hash ^= _unknownFields.GetHashCode();
+ }
+ return hash;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public override string ToString() {
+ return pb::JsonFormatter.ToDiagnosticString(this);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public void WriteTo(pb::CodedOutputStream output) {
+ #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
+ output.WriteRawMessage(this);
+ #else
+ if (Symbol.Length != 0) {
+ output.WriteRawTag(10);
+ output.WriteString(Symbol);
+ }
+ if (BasicFee != 0L) {
+ output.WriteRawTag(16);
+ output.WriteInt64(BasicFee);
+ }
+ if (_unknownFields != null) {
+ _unknownFields.WriteTo(output);
+ }
+ #endif
+ }
+
+ #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
+ if (Symbol.Length != 0) {
+ output.WriteRawTag(10);
+ output.WriteString(Symbol);
+ }
+ if (BasicFee != 0L) {
+ output.WriteRawTag(16);
+ output.WriteInt64(BasicFee);
+ }
+ if (_unknownFields != null) {
+ _unknownFields.WriteTo(ref output);
+ }
+ }
+ #endif
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public int CalculateSize() {
+ int size = 0;
+ if (Symbol.Length != 0) {
+ size += 1 + pb::CodedOutputStream.ComputeStringSize(Symbol);
+ }
+ if (BasicFee != 0L) {
+ size += 1 + pb::CodedOutputStream.ComputeInt64Size(BasicFee);
+ }
+ if (_unknownFields != null) {
+ size += _unknownFields.CalculateSize();
+ }
+ return size;
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public void MergeFrom(UserContractMethodFee other) {
+ if (other == null) {
+ return;
+ }
+ if (other.Symbol.Length != 0) {
+ Symbol = other.Symbol;
+ }
+ if (other.BasicFee != 0L) {
+ BasicFee = other.BasicFee;
+ }
+ _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
+ }
+
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ public void MergeFrom(pb::CodedInputStream input) {
+ #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
+ input.ReadRawMessage(this);
+ #else
+ uint tag;
+ while ((tag = input.ReadTag()) != 0) {
+ switch(tag) {
+ default:
+ _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
+ break;
+ case 10: {
+ Symbol = input.ReadString();
+ break;
+ }
+ case 16: {
+ BasicFee = input.ReadInt64();
+ break;
+ }
+ }
+ }
+ #endif
+ }
+
+ #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+ [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
+ void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
+ uint tag;
+ while ((tag = input.ReadTag()) != 0) {
+ switch(tag) {
+ default:
+ _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
+ break;
+ case 10: {
+ Symbol = input.ReadString();
+ break;
+ }
+ case 16: {
+ BasicFee = input.ReadInt64();
+ break;
+ }
+ }
+ }
+ }
+ #endif
+
+ }
+
+ #endregion
+
+}
+
+#endregion Designer generated code
diff --git a/src/AElf.CrossChainServer.Application.Contracts/Contracts/Acs3.c.cs b/src/AElf.CrossChainServer.Application.Contracts/Contracts/Acs3.c.cs
new file mode 100644
index 0000000..ee36bd3
--- /dev/null
+++ b/src/AElf.CrossChainServer.Application.Contracts/Contracts/Acs3.c.cs
@@ -0,0 +1,285 @@
+//
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: acs3.proto
+//
+// Original file comments:
+// *
+// AElf Standards ACS3(Contract Proposal Standard)
+//
+// Used for governance through proposals.
+#pragma warning disable 0414, 1591
+#region Designer generated code
+
+using System.Collections.Generic;
+using aelf = global::AElf.CSharp.Core;
+
+namespace AElf.Standards.ACS3 {
+
+ #region Events
+ internal partial class ProposalCreated : aelf::IEvent
+ {
+ public global::System.Collections.Generic.IEnumerable GetIndexed()
+ {
+ return new List
+ {
+ new ProposalCreated
+ {
+ OrganizationAddress = OrganizationAddress
+ },
+ };
+ }
+
+ public ProposalCreated GetNonIndexed()
+ {
+ return new ProposalCreated
+ {
+ ProposalId = ProposalId,
+ };
+ }
+ }
+
+ internal partial class ProposalReleased : aelf::IEvent
+ {
+ public global::System.Collections.Generic.IEnumerable GetIndexed()
+ {
+ return new List
+ {
+ new ProposalReleased
+ {
+ OrganizationAddress = OrganizationAddress
+ },
+ };
+ }
+
+ public ProposalReleased GetNonIndexed()
+ {
+ return new ProposalReleased
+ {
+ ProposalId = ProposalId,
+ };
+ }
+ }
+
+ internal partial class OrganizationCreated : aelf::IEvent
+ {
+ public global::System.Collections.Generic.IEnumerable GetIndexed()
+ {
+ return new List
+ {
+ };
+ }
+
+ public OrganizationCreated GetNonIndexed()
+ {
+ return new OrganizationCreated
+ {
+ OrganizationAddress = OrganizationAddress,
+ };
+ }
+ }
+
+ internal partial class ReceiptCreated : aelf::IEvent
+ {
+ public global::System.Collections.Generic.IEnumerable GetIndexed()
+ {
+ return new List
+ {
+ new ReceiptCreated
+ {
+ OrganizationAddress = OrganizationAddress
+ },
+ };
+ }
+
+ public ReceiptCreated GetNonIndexed()
+ {
+ return new ReceiptCreated
+ {
+ ProposalId = ProposalId,
+ Address = Address,
+ ReceiptType = ReceiptType,
+ Time = Time,
+ };
+ }
+ }
+
+ internal partial class OrganizationWhiteListChanged : aelf::IEvent
+ {
+ public global::System.Collections.Generic.IEnumerable GetIndexed()
+ {
+ return new List
+ {
+ };
+ }
+
+ public OrganizationWhiteListChanged GetNonIndexed()
+ {
+ return new OrganizationWhiteListChanged
+ {
+ OrganizationAddress = OrganizationAddress,
+ ProposerWhiteList = ProposerWhiteList,
+ };
+ }
+ }
+
+ internal partial class OrganizationThresholdChanged : aelf::IEvent
+ {
+ public global::System.Collections.Generic.IEnumerable GetIndexed()
+ {
+ return new List
+ {
+ };
+ }
+
+ public OrganizationThresholdChanged GetNonIndexed()
+ {
+ return new OrganizationThresholdChanged
+ {
+ OrganizationAddress = OrganizationAddress,
+ ProposerReleaseThreshold = ProposerReleaseThreshold,
+ };
+ }
+ }
+
+ #endregion
+ internal static partial class AuthorizationContractContainer
+ {
+ static readonly string __ServiceName = "acs3.AuthorizationContract";
+
+ #region Marshallers
+ static readonly aelf::Marshaller __Marshaller_acs3_CreateProposalInput = aelf::Marshallers.Create((arg) => global::Google.Protobuf.MessageExtensions.ToByteArray(arg), global::AElf.Standards.ACS3.CreateProposalInput.Parser.ParseFrom);
+ static readonly aelf::Marshaller __Marshaller_aelf_Hash = aelf::Marshallers.Create((arg) => global::Google.Protobuf.MessageExtensions.ToByteArray(arg), global::AElf.Types.Hash.Parser.ParseFrom);
+ static readonly aelf::Marshaller __Marshaller_google_protobuf_Empty = aelf::Marshallers.Create((arg) => global::Google.Protobuf.MessageExtensions.ToByteArray(arg), global::Google.Protobuf.WellKnownTypes.Empty.Parser.ParseFrom);
+ static readonly aelf::Marshaller __Marshaller_acs3_ProposalReleaseThreshold = aelf::Marshallers.Create((arg) => global::Google.Protobuf.MessageExtensions.ToByteArray(arg), global::AElf.Standards.ACS3.ProposalReleaseThreshold.Parser.ParseFrom);
+ static readonly aelf::Marshaller __Marshaller_acs3_ProposerWhiteList = aelf::Marshallers.Create((arg) => global::Google.Protobuf.MessageExtensions.ToByteArray(arg), global::AElf.Standards.ACS3.ProposerWhiteList.Parser.ParseFrom);
+ static readonly aelf::Marshaller __Marshaller_acs3_CreateProposalBySystemContractInput = aelf::Marshallers.Create((arg) => global::Google.Protobuf.MessageExtensions.ToByteArray(arg), global::AElf.Standards.ACS3.CreateProposalBySystemContractInput.Parser.ParseFrom);
+ static readonly aelf::Marshaller __Marshaller_acs3_ProposalOutput = aelf::Marshallers.Create((arg) => global::Google.Protobuf.MessageExtensions.ToByteArray(arg), global::AElf.Standards.ACS3.ProposalOutput.Parser.ParseFrom);
+ static readonly aelf::Marshaller __Marshaller_aelf_Address = aelf::Marshallers.Create((arg) => global::Google.Protobuf.MessageExtensions.ToByteArray(arg), global::AElf.Types.Address.Parser.ParseFrom);
+ static readonly aelf::Marshaller __Marshaller_google_protobuf_BoolValue = aelf::Marshallers.Create((arg) => global::Google.Protobuf.MessageExtensions.ToByteArray(arg), global::Google.Protobuf.WellKnownTypes.BoolValue.Parser.ParseFrom);
+ static readonly aelf::Marshaller __Marshaller_acs3_ValidateProposerInWhiteListInput = aelf::Marshallers.Create((arg) => global::Google.Protobuf.MessageExtensions.ToByteArray(arg), global::AElf.Standards.ACS3.ValidateProposerInWhiteListInput.Parser.ParseFrom);
+ #endregion
+
+ #region Methods
+ static readonly aelf::Method __Method_CreateProposal = new aelf::Method(
+ aelf::MethodType.Action,
+ __ServiceName,
+ "CreateProposal",
+ __Marshaller_acs3_CreateProposalInput,
+ __Marshaller_aelf_Hash);
+
+ static readonly aelf::Method __Method_Approve = new aelf::Method(
+ aelf::MethodType.Action,
+ __ServiceName,
+ "Approve",
+ __Marshaller_aelf_Hash,
+ __Marshaller_google_protobuf_Empty);
+
+ static readonly aelf::Method __Method_Reject = new aelf::Method