├── .ci
└── ci_check.sh
├── .github
└── workflows
│ └── docker.yml
├── .gitignore
├── .travis.yml
├── Changelog.md
├── LICENSE
├── README.md
├── build.gradle
├── docker
├── build
│ ├── Dockerfile
│ └── build.sh
└── fisco
│ ├── Dockerfile
│ ├── build.sh
│ └── docker-start.sh
├── get_solc_js.sh
├── gradle
└── wrapper
│ ├── gradle-wrapper.jar
│ └── gradle-wrapper.properties
├── gradlew
├── gradlew.bat
├── how_to_update_logo.md
├── install_FAQ.md
├── release_note.txt
├── script
└── start.sh
├── sider.yml
├── src
├── main
│ ├── java
│ │ └── com
│ │ │ └── webank
│ │ │ └── webase
│ │ │ └── front
│ │ │ ├── Application.java
│ │ │ ├── abi
│ │ │ ├── AbiController.java
│ │ │ ├── AbiRepository.java
│ │ │ ├── AbiService.java
│ │ │ └── entity
│ │ │ │ ├── AbiInfo.java
│ │ │ │ └── ReqImportAbi.java
│ │ │ ├── base
│ │ │ ├── code
│ │ │ │ ├── ConstantCode.java
│ │ │ │ └── RetCode.java
│ │ │ ├── config
│ │ │ │ ├── MySecurityManagerConfig.java
│ │ │ │ ├── NoExitSecurityManager.java
│ │ │ │ ├── NodeConfig.java
│ │ │ │ ├── RabbitMQConfig.java
│ │ │ │ ├── RestTemplateConfig.java
│ │ │ │ ├── SwaggerConfig.java
│ │ │ │ ├── TomcatConfig.java
│ │ │ │ ├── Web3Config.java
│ │ │ │ └── WebMvcConfiguration.java
│ │ │ ├── controller
│ │ │ │ └── BaseController.java
│ │ │ ├── enums
│ │ │ │ ├── CertTypes.java
│ │ │ │ ├── ContractStatus.java
│ │ │ │ ├── DataStatus.java
│ │ │ │ ├── EventTypes.java
│ │ │ │ ├── KeyTypes.java
│ │ │ │ └── PrecompiledTypes.java
│ │ │ ├── exception
│ │ │ │ ├── ExceptionsHandler.java
│ │ │ │ └── FrontException.java
│ │ │ ├── properties
│ │ │ │ ├── Constants.java
│ │ │ │ └── VersionProperties.java
│ │ │ └── response
│ │ │ │ ├── BasePageResponse.java
│ │ │ │ └── BaseResponse.java
│ │ │ ├── cert
│ │ │ ├── FrontCertController.java
│ │ │ └── FrontCertService.java
│ │ │ ├── contract
│ │ │ ├── CnsRepository.java
│ │ │ ├── CommonContract.java
│ │ │ ├── ContractController.java
│ │ │ ├── ContractPathRepository.java
│ │ │ ├── ContractRepository.java
│ │ │ ├── ContractService.java
│ │ │ └── entity
│ │ │ │ ├── Cns.java
│ │ │ │ ├── Contract.java
│ │ │ │ ├── ContractPath.java
│ │ │ │ ├── ContractPathKey.java
│ │ │ │ ├── FileContentHandle.java
│ │ │ │ ├── RepCopyContractItem.java
│ │ │ │ ├── ReqContractCompile.java
│ │ │ │ ├── ReqContractPath.java
│ │ │ │ ├── ReqContractSave.java
│ │ │ │ ├── ReqCopyContracts.java
│ │ │ │ ├── ReqDeploy.java
│ │ │ │ ├── ReqDeployWithSign.java
│ │ │ │ ├── ReqListContract.java
│ │ │ │ ├── ReqMultiContractCompile.java
│ │ │ │ ├── ReqPageContract.java
│ │ │ │ ├── ReqQueryCns.java
│ │ │ │ ├── ReqRegisterCns.java
│ │ │ │ ├── ReqSendAbi.java
│ │ │ │ ├── RspContractCompile.java
│ │ │ │ ├── RspContractNoAbi.java
│ │ │ │ └── RspMultiContractCompile.java
│ │ │ ├── contractStore
│ │ │ ├── ContractFolderRepository.java
│ │ │ ├── ContractItemRepository.java
│ │ │ ├── ContractStoreController.java
│ │ │ ├── ContractStoreRepository.java
│ │ │ ├── ContractStoreService.java
│ │ │ ├── ContractStoreStartupRunner.java
│ │ │ ├── PresetDataService.java
│ │ │ ├── constant
│ │ │ │ ├── EvidenceConstantContext.java
│ │ │ │ ├── PointsConstantContext.java
│ │ │ │ ├── ProxyConstantContext.java
│ │ │ │ ├── SmartDevConstantContext.java
│ │ │ │ └── ToolsConstantContext.java
│ │ │ └── entity
│ │ │ │ ├── ContractFolderItem.java
│ │ │ │ ├── ContractItem.java
│ │ │ │ └── StoreItem.java
│ │ │ ├── event
│ │ │ ├── ContractEventInfoRepository.java
│ │ │ ├── EventController.java
│ │ │ ├── EventService.java
│ │ │ ├── MQPublisher.java
│ │ │ ├── MQService.java
│ │ │ ├── NewBlockEventInfoRepository.java
│ │ │ ├── callback
│ │ │ │ ├── ContractEventCallback.java
│ │ │ │ ├── NewBlockEventCallback.java
│ │ │ │ └── SyncEventLogCallback.java
│ │ │ └── entity
│ │ │ │ ├── ContractEventInfo.java
│ │ │ │ ├── DecodedEventLog.java
│ │ │ │ ├── EventTopicParam.java
│ │ │ │ ├── NewBlockEventInfo.java
│ │ │ │ ├── PublisherHelper.java
│ │ │ │ ├── ReqContractEventRegister.java
│ │ │ │ ├── ReqEventLogList.java
│ │ │ │ ├── ReqNewBlockEventRegister.java
│ │ │ │ ├── ReqUnregister.java
│ │ │ │ ├── RspContractInfo.java
│ │ │ │ ├── RspEventLog.java
│ │ │ │ └── message
│ │ │ │ ├── BlockPushMessage.java
│ │ │ │ ├── EventLogPushMessage.java
│ │ │ │ └── MQObject.java
│ │ │ ├── gm
│ │ │ └── EncryptTypeController.java
│ │ │ ├── keystore
│ │ │ ├── KeyStoreController.java
│ │ │ ├── KeyStoreService.java
│ │ │ ├── KeystoreRepository.java
│ │ │ └── entity
│ │ │ │ ├── EncodeInfo.java
│ │ │ │ ├── KeyStoreInfo.java
│ │ │ │ ├── MessageHashInfo.java
│ │ │ │ ├── ReqExport.java
│ │ │ │ ├── ReqImportPem.java
│ │ │ │ ├── ReqImportWithSign.java
│ │ │ │ ├── RspKeyFile.java
│ │ │ │ ├── RspMessageHashSignature.java
│ │ │ │ ├── RspUserInfo.java
│ │ │ │ └── SignInfo.java
│ │ │ ├── logparse
│ │ │ ├── LogParseController.java
│ │ │ ├── LogParseService.java
│ │ │ ├── entity
│ │ │ │ ├── CurrentState.java
│ │ │ │ ├── LogData.java
│ │ │ │ ├── NetWorkData.java
│ │ │ │ └── TxGasData.java
│ │ │ ├── repository
│ │ │ │ ├── CurrentStateRepository.java
│ │ │ │ ├── NetWorkDataRepository.java
│ │ │ │ └── TxGasDataRepository.java
│ │ │ └── util
│ │ │ │ ├── FileUtil.java
│ │ │ │ ├── LogParseUtil.java
│ │ │ │ └── LogTypes.java
│ │ │ ├── method
│ │ │ ├── MethodController.java
│ │ │ ├── MethodRepository.java
│ │ │ ├── MethodService.java
│ │ │ └── entity
│ │ │ │ ├── Method.java
│ │ │ │ ├── MethodHandle.java
│ │ │ │ ├── MethodKey.java
│ │ │ │ └── NewMethodInputParamHandle.java
│ │ │ ├── monitor
│ │ │ ├── MonitorController.java
│ │ │ ├── MonitorRepository.java
│ │ │ ├── MonitorService.java
│ │ │ └── entity
│ │ │ │ ├── GroupSizeInfo.java
│ │ │ │ └── Monitor.java
│ │ │ ├── performance
│ │ │ ├── PerformanceController.java
│ │ │ ├── PerformanceRepository.java
│ │ │ ├── PerformanceService.java
│ │ │ ├── entity
│ │ │ │ ├── Cpu.java
│ │ │ │ ├── Disk.java
│ │ │ │ ├── Memory.java
│ │ │ │ ├── Performance.java
│ │ │ │ └── ToggleHandle.java
│ │ │ └── result
│ │ │ │ ├── Data.java
│ │ │ │ ├── LineDataList.java
│ │ │ │ └── PerformanceData.java
│ │ │ ├── precompiledapi
│ │ │ ├── PrecompiledCommonInfo.java
│ │ │ ├── PrecompiledController.java
│ │ │ ├── PrecompiledService.java
│ │ │ ├── PrecompiledWithSignService.java
│ │ │ ├── crud
│ │ │ │ ├── CRUDParseUtils.java
│ │ │ │ ├── CRUDParseUtilsBack.java
│ │ │ │ └── Table.java
│ │ │ ├── entity
│ │ │ │ ├── ChainGovernanceHandle.java
│ │ │ │ ├── CnsHandle.java
│ │ │ │ ├── ConsensusHandle.java
│ │ │ │ ├── ContractManageResult.java
│ │ │ │ ├── ContractStatusHandle.java
│ │ │ │ ├── CrudHandle.java
│ │ │ │ ├── NodeInfo.java
│ │ │ │ ├── PermissionHandle.java
│ │ │ │ ├── PermissionState.java
│ │ │ │ ├── ReqAccountStatus.java
│ │ │ │ ├── ResSystemConfig.java
│ │ │ │ └── SystemConfigHandle.java
│ │ │ ├── permission
│ │ │ │ ├── ChainGovernController.java
│ │ │ │ ├── ChainGovernService.java
│ │ │ │ ├── PermissionManageController.java
│ │ │ │ └── PermissionManageService.java
│ │ │ └── sysconf
│ │ │ │ ├── PrecompiledSysConfigController.java
│ │ │ │ └── PrecompiledSysConfigService.java
│ │ │ ├── scaffold
│ │ │ ├── ScaffoldController.java
│ │ │ ├── ScaffoldService.java
│ │ │ └── entity
│ │ │ │ ├── ReqProject.java
│ │ │ │ └── RspFile.java
│ │ │ ├── solc
│ │ │ ├── SolcController.java
│ │ │ ├── SolcRepository.java
│ │ │ ├── SolcService.java
│ │ │ └── entity
│ │ │ │ ├── ReqUploadSolc.java
│ │ │ │ ├── RspDownload.java
│ │ │ │ └── SolcInfo.java
│ │ │ ├── task
│ │ │ ├── EventRegisterInitTask.java
│ │ │ └── SyncEventMapTask.java
│ │ │ ├── tool
│ │ │ ├── ToolController.java
│ │ │ └── entity
│ │ │ │ ├── ReqDecodeParam.java
│ │ │ │ ├── ReqPrivateKey.java
│ │ │ │ ├── ReqSign.java
│ │ │ │ ├── RspHash.java
│ │ │ │ ├── RspKeyPair.java
│ │ │ │ └── RspSignData.java
│ │ │ ├── transaction
│ │ │ ├── TransController.java
│ │ │ ├── TransService.java
│ │ │ └── entity
│ │ │ │ ├── ContractFunction.java
│ │ │ │ ├── ReqEncodeFunction.java
│ │ │ │ ├── ReqQueryTransHandle.java
│ │ │ │ ├── ReqSignMessageHash.java
│ │ │ │ ├── ReqSignedTransHandle.java
│ │ │ │ ├── ReqTransHandle.java
│ │ │ │ └── ReqTransHandleWithSign.java
│ │ │ ├── util
│ │ │ ├── AbiTypes.java
│ │ │ ├── AbiUtil.java
│ │ │ ├── Address.java
│ │ │ ├── AddressUtils.java
│ │ │ ├── AesUtils.java
│ │ │ ├── CleanPathUtil.java
│ │ │ ├── CommonUtils.java
│ │ │ ├── ContractAbiUtil.java
│ │ │ ├── ContractTypeUtil.java
│ │ │ ├── ErrorCodeHandleUtils.java
│ │ │ ├── FrontUtils.java
│ │ │ ├── JsonUtils.java
│ │ │ ├── NetUtils.java
│ │ │ ├── PemUtils.java
│ │ │ ├── PrecompiledUtils.java
│ │ │ ├── RabbitMQUtils.java
│ │ │ ├── StaticArrayReference.java
│ │ │ ├── ValidateUtil.java
│ │ │ ├── ZipUtils.java
│ │ │ └── pageutils
│ │ │ │ ├── List2Page.java
│ │ │ │ ├── Map2PagedList.java
│ │ │ │ ├── PageData.java
│ │ │ │ └── entity
│ │ │ │ └── MapHandle.java
│ │ │ ├── version
│ │ │ ├── VersionController.java
│ │ │ └── VersionService.java
│ │ │ └── web3api
│ │ │ ├── Web3ApiController.java
│ │ │ ├── Web3ApiService.java
│ │ │ └── entity
│ │ │ ├── GenerateGroupInfo.java
│ │ │ ├── NodeStatusInfo.java
│ │ │ ├── ReqGroupStatus.java
│ │ │ ├── RspSearchTransaction.java
│ │ │ ├── RspStatBlock.java
│ │ │ └── RspTransCountInfo.java
│ └── resources
│ │ ├── application-docker.yml
│ │ ├── application.yml
│ │ ├── files
│ │ └── ContractAbiMgr_
│ │ ├── libsigar-aarch64-linux.so
│ │ ├── libsigar-amd64-linux.so
│ │ ├── libsigar-universal64-macosx.dylib
│ │ ├── libsigar-x86-linux.so
│ │ ├── log4j2.xml
│ │ ├── static
│ │ ├── index.html
│ │ └── static
│ │ │ ├── css
│ │ │ ├── base.css
│ │ │ └── reset.css
│ │ │ ├── font
│ │ │ ├── webfont.eot
│ │ │ ├── webfont.svg
│ │ │ ├── webfont.ttf
│ │ │ ├── webfont.woff
│ │ │ └── webfont.woff2
│ │ │ ├── fonts
│ │ │ ├── element-icons.535877f.woff
│ │ │ ├── element-icons.732389d.ttf
│ │ │ ├── fontello.068ca2b.ttf
│ │ │ ├── fontello.e73a064.eot
│ │ │ ├── iconfont.8ddfca3.eot
│ │ │ └── iconfont.ee39531.ttf
│ │ │ ├── image
│ │ │ ├── banner.jpg
│ │ │ ├── block.png
│ │ │ ├── logo-2 copy@1.5x.jpg
│ │ │ ├── logo-title.png
│ │ │ ├── logo.jpg
│ │ │ ├── logo@2x.png
│ │ │ ├── nodes.png
│ │ │ ├── transation.png
│ │ │ ├── transationPedding.png
│ │ │ └── webase_35x35.png
│ │ │ ├── img
│ │ │ ├── fontello.9354499.svg
│ │ │ ├── iconfont.7fa1e8d.svg
│ │ │ ├── transation.1a3785f.png
│ │ │ └── transationPedding.d68f750.png
│ │ │ └── js
│ │ │ ├── 0.72a8638be3f2578f2c89.js
│ │ │ ├── 0.72a8638be3f2578f2c89.js.gz
│ │ │ ├── 1.33ee9b8c39800f3d213f.js
│ │ │ ├── 1.33ee9b8c39800f3d213f.js.gz
│ │ │ ├── 10.4ec34b4c668409851945.js
│ │ │ ├── 10.4ec34b4c668409851945.js.gz
│ │ │ ├── 11.2a8233ac71b1166c4189.js
│ │ │ ├── 12.80cc7afdc7d342baa5fb.js
│ │ │ ├── 12.80cc7afdc7d342baa5fb.js.gz
│ │ │ ├── 13.055b0a18633af2c97aa9.js
│ │ │ ├── 14.5dd9ee26d1fa8898120f.js
│ │ │ ├── 15.120cd94287d0c8f016f6.js
│ │ │ ├── 16.4d0153a2620c5489082b.js
│ │ │ ├── 17.4018b6dc2baa10d8984a.js
│ │ │ ├── 18.d979e449a918792042e9.js
│ │ │ ├── 19.9be217e8770c86e8fbf4.js
│ │ │ ├── 2.d72096adf45e163c6e76.js
│ │ │ ├── 3.c3f8a26693a51e8f4a0e.js
│ │ │ ├── 3.c3f8a26693a51e8f4a0e.js.gz
│ │ │ ├── 5.4fd886a4fb01bd5c33e2.js
│ │ │ ├── 5.4fd886a4fb01bd5c33e2.js.gz
│ │ │ ├── 6.72e85f85990d18eee042.js
│ │ │ ├── 6.72e85f85990d18eee042.js.gz
│ │ │ ├── 7.969ba5a2e03246b492cb.js
│ │ │ ├── 7.969ba5a2e03246b492cb.js.gz
│ │ │ ├── 8.3b8ae5b298eeba40c9cb.js
│ │ │ ├── 9.5047e29e39abbe3fdf76.js
│ │ │ ├── base-loading.js
│ │ │ ├── browserfs.min.js
│ │ │ ├── browserfs.min.js.gz
│ │ │ ├── runtime.6d624c115cb59024f6fe.js
│ │ │ ├── web3.min.js
│ │ │ └── web3.min.js.gz
│ │ ├── swagger
│ │ ├── favicon-16x16.png
│ │ ├── favicon-32x32.png
│ │ ├── index.html
│ │ ├── swagger-ui-bundle.js
│ │ ├── swagger-ui-bundle.js.map
│ │ ├── swagger-ui-standalone-preset.js
│ │ ├── swagger-ui-standalone-preset.js.map
│ │ ├── swagger-ui.css
│ │ ├── swagger-ui.css.map
│ │ ├── swagger-ui.js
│ │ └── swagger-ui.js.map
│ │ ├── template
│ │ └── warehouse
│ │ ├── contract.json
│ │ ├── folder.json
│ │ └── warehouse.json
└── test
│ ├── java
│ ├── com
│ │ └── webank
│ │ │ └── webase
│ │ │ └── front
│ │ │ ├── abi
│ │ │ └── AbiControllerTest.java
│ │ │ ├── base
│ │ │ ├── BasicTest.java
│ │ │ ├── SpringTestBase.java
│ │ │ └── TestBase.java
│ │ │ ├── cert
│ │ │ ├── NodeCrtTest.java
│ │ │ └── SdkCertTest.java
│ │ │ ├── contract
│ │ │ ├── ContractControllerTest.java
│ │ │ ├── ContractTest.java
│ │ │ └── TransControllerTest.java
│ │ │ ├── contractStore
│ │ │ └── ContractStoreServiceTest.java
│ │ │ ├── event
│ │ │ ├── EventControllerTestBase.java
│ │ │ ├── EventServiceTestBase.java
│ │ │ ├── MQPublisherTestBase.java
│ │ │ └── MQServiceTestBase.java
│ │ │ ├── gm
│ │ │ └── pressure
│ │ │ │ ├── PerformanceCollector.java
│ │ │ │ ├── PerformanceHelloWorld.java
│ │ │ │ └── PerformanceHelloWorldCallback.java
│ │ │ ├── keystore
│ │ │ ├── KeyStoreControllerTest.java
│ │ │ ├── KeyStoreFileTest.java
│ │ │ ├── PublicKeyTest.java
│ │ │ └── SignDataTestBase.java
│ │ │ ├── logparse
│ │ │ └── LogParseControllerTest.java
│ │ │ ├── monitor
│ │ │ └── ScheduledTest.java
│ │ │ ├── precompiledapi
│ │ │ ├── ChainGovernServiceTestBase.java
│ │ │ ├── CnsServiceTest.java
│ │ │ ├── ConsensusServiceTest.java
│ │ │ ├── CrudServiceTest.java
│ │ │ ├── PermissionServiceTest.java
│ │ │ ├── PrecompiledCommonTest.java
│ │ │ ├── PrecompiledSysConfigServiceTest.java
│ │ │ └── PrecompiledWithSignServiceTest.java
│ │ │ ├── scaffold
│ │ │ ├── ScaffoldBuildTest.java
│ │ │ ├── ScaffoldControllerTest.java
│ │ │ └── ScaffoldServiceTest.java
│ │ │ ├── task
│ │ │ └── RegisterTaskTestBase.java
│ │ │ ├── transaction
│ │ │ └── TransactionServiceTest.java
│ │ │ ├── util
│ │ │ ├── ContractAbiUtilTest.java
│ │ │ └── TransactionEncoderTest.java
│ │ │ ├── version
│ │ │ └── VersionControllerTest.java
│ │ │ └── web3j
│ │ │ ├── SolidityFunctionWrapperGeneratorTest.java
│ │ │ ├── SolidityTypeTest.java
│ │ │ ├── Web3ApiControllerTest.java
│ │ │ └── Web3jApITest.java
│ └── org
│ │ └── fisco
│ │ └── bcos
│ │ └── temp
│ │ ├── Asset.java
│ │ └── HelloWorld.java
│ └── resources
│ ├── applicationContext.xml
│ ├── config-example.toml
│ ├── contract
│ ├── HelloWorld.sol
│ ├── HelloWorldGM.sol
│ └── Ok.sol
│ ├── log4j.properties
│ └── solidity
│ ├── Evidence.abi
│ ├── Evidence.bin
│ ├── EvidenceSignersData.abi
│ ├── EvidenceSignersData.bin
│ ├── HelloWorld.abi
│ ├── HelloWorld.bin
│ ├── HelloWorldGM.abi
│ ├── HelloWorldGM.bin
│ └── Ok.abi
├── start.sh
├── status.sh
├── stop.sh
└── web
├── .babelrc
├── .editorconfig
├── .gitignore
├── .postcssrc.js
├── README.md
├── build
├── build.js
├── check-versions.js
├── update_module.js
├── utils.js
├── vue-loader.conf.js
├── webpack.base.conf.js
├── webpack.dev.conf.js
└── webpack.prod.conf.js
├── config
├── dev.env.js
├── index.js
└── prod.env.js
├── development.md
├── docs
└── nginx.conf
├── index.html
├── package.json
├── src
├── App.vue
├── assets
│ ├── css
│ │ └── common.css
│ └── icon
│ │ ├── demo.css
│ │ ├── demo_fontclass.html
│ │ ├── demo_index.html
│ │ ├── demo_symbol.html
│ │ ├── demo_unicode.html
│ │ ├── iconfont.css
│ │ ├── iconfont.eot
│ │ ├── iconfont.js
│ │ ├── iconfont.json
│ │ ├── iconfont.svg
│ │ ├── iconfont.ttf
│ │ ├── iconfont.woff
│ │ ├── iconfont.woff2
│ │ └── iconfont_webaas.css
├── bus.js
├── components
│ ├── Folder
│ │ └── index.vue
│ ├── LangSelect
│ │ └── index.vue
│ ├── Loading
│ │ ├── Loading.js
│ │ ├── index.js
│ │ └── index.vue
│ ├── SvgIcon
│ │ └── index.vue
│ ├── abiDialog.vue
│ ├── changePasswordDialog.vue
│ ├── contentHead.vue
│ ├── decodeLog
│ │ └── index.vue
│ ├── editor.vue
│ ├── metricChart.vue
│ ├── sendTransaction.vue
│ └── transactionDetail.vue
├── directives
│ └── input-filter
│ │ ├── index.js
│ │ └── inputFilter.js
├── lang
│ ├── en.js
│ ├── index.js
│ └── zh.js
├── main.js
├── mock.js
├── router
│ └── index.js
├── store
│ ├── actions.js
│ ├── index.js
│ └── mutations.js
├── svgIcons
│ ├── index.js
│ └── svg
│ │ ├── certification.svg
│ │ ├── comingSoon.svg
│ │ ├── evidence.svg
│ │ ├── evidenceId.svg
│ │ ├── points.svg
│ │ ├── pointsId.svg
│ │ ├── propertyId.svg
│ │ ├── supply.svg
│ │ ├── toolboxId.svg
│ │ ├── tools.svg
│ │ └── traceId.svg
├── util
│ ├── SM2Sign.js
│ ├── api.js
│ ├── compile.js
│ ├── constant.js
│ ├── errcode.js
│ ├── ethAbi.js
│ ├── file.worker.js
│ ├── filter.js
│ ├── http.js
│ ├── message.js
│ ├── sm_sha.js
│ ├── sm_sm3.js
│ ├── sm_utils.js
│ ├── url.js
│ ├── util.js
│ └── validate.js
└── views
│ ├── abiList
│ ├── components
│ │ ├── importAbi.vue
│ │ └── updateAbi.vue
│ └── index.vue
│ ├── blank
│ └── index.vue
│ ├── blockEvent
│ ├── components
│ │ └── blockEventDialog.vue
│ └── index.vue
│ ├── chaincode
│ ├── components
│ │ ├── code.vue
│ │ └── contractCatalog.vue
│ ├── contract.vue
│ ├── dialog
│ │ ├── abiDialog.vue
│ │ ├── addFile.vue
│ │ ├── addFolder.vue
│ │ ├── changeUser.vue
│ │ ├── checkEventDialog.vue
│ │ ├── checkEventResult.vue
│ │ ├── editor.vue
│ │ ├── exportProject.vue
│ │ ├── importFrom.vue
│ │ ├── mgmtCns.vue
│ │ └── selectCatalog.vue
│ └── oldContract.vue
│ ├── contractEvent
│ ├── components
│ │ └── contractEventDialog.vue
│ └── index.vue
│ ├── contractWarehouse
│ └── index.vue
│ ├── eventCheck
│ └── index.vue
│ ├── group
│ └── index.vue
│ ├── home
│ ├── components
│ │ ├── chart.vue
│ │ ├── transaction.vue
│ │ └── transactionDetail.vue
│ └── home.vue
│ ├── hostMetric
│ └── index.vue
│ ├── index
│ ├── main.vue
│ └── sidebar.vue
│ ├── nodesMetric
│ └── index.vue
│ ├── onlineTools
│ └── index.vue
│ ├── parseAbi
│ └── index.vue
│ ├── privateKeyManagement
│ ├── dialog
│ │ ├── exportKey.vue
│ │ └── importKey.vue
│ ├── index.vue
│ └── privateKeyManagement.css
│ └── toolsContract
│ ├── components
│ ├── code.vue
│ ├── components
│ │ └── File.vue
│ ├── contractCatalog.vue
│ └── createUser.vue
│ └── index.vue
└── static
├── .gitkeep
├── css
├── base.css
└── reset.css
├── font
├── webfont.eot
├── webfont.svg
├── webfont.ttf
├── webfont.woff
└── webfont.woff2
├── image
├── banner.jpg
├── block.png
├── logo-2 copy@1.5x.jpg
├── logo-title.png
├── logo.jpg
├── logo@2x.png
├── nodes.png
├── transation.png
├── transationPedding.png
└── webase_35x35.png
└── js
├── base-loading.js
├── browserfs.min.js
└── web3.min.js
/.ci/ci_check.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | set -e
4 |
5 | curl -LO https://raw.githubusercontent.com/FISCO-BCOS/FISCO-BCOS/dev/tools/build_chain.sh && chmod u+x build_chain.sh
6 | bash <(curl -s https://raw.githubusercontent.com/FISCO-BCOS/FISCO-BCOS/dev/tools/ci/download_bin.sh) -b dev -m
7 | echo "127.0.0.1:4 agency1 1,2,3" > ipconf
8 | ./build_chain.sh -e bin/fisco-bcos -f ipconf -p 30300,20200,8545 -v 2.7.2
9 | ./nodes/127.0.0.1/start_all.sh
10 | ./nodes/127.0.0.1/fisco-bcos -v
11 | cp nodes/127.0.0.1/sdk/* src/main/resources/
12 | cp nodes/127.0.0.1/sdk/* src/test/resources/
13 | #./gradlew verifyGoogleJavaFormat
14 | # test module needs optimization
15 | ./gradlew build -x test
16 | #./gradlew test
17 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Created by .ignore support plugin (hsz.mobi)
2 | ### Java template
3 | *.class
4 |
5 |
6 | # Package Files #
7 | *.war
8 | *.ear
9 |
10 | ### Gradle template
11 | .gradle
12 | /build
13 | gradle.properties
14 | .project
15 |
16 | # Avoid ignoring Gradle wrapper jar file (.jar files are usually ignored)
17 | !gradle-wrapper.jar
18 |
19 | # Cache of project
20 | .gradletasknamecache
21 |
22 | # Work around https://youtrack.jetbrains.com/issue/IDEA-116898
23 | # gradle/wrapper/gradle-wrapper.properties
24 |
25 | .idea
26 | *.iml
27 |
28 | # OS X
29 | .DS_Store
30 |
31 | /target
32 | /out
33 | /h2
34 | /conf
35 | /log
36 | /dist
37 | /bin
38 | *.crt
39 | *.key
40 | *.publickey
41 | h2
42 |
43 | /lib/
44 | solcjs
45 | v0.*.*.js
46 | v0.*.*.js.gz
47 | /output/
48 | /conf/
49 |
50 |
51 |
--------------------------------------------------------------------------------
/.travis.yml:
--------------------------------------------------------------------------------
1 | branches:
2 | only:
3 | - master
4 | - dev
5 |
6 | language: java
7 | services:
8 | - mysql
9 | matrix:
10 | # fast_finish: true
11 | include:
12 | - language: java
13 | jdk: openjdk8
14 | os: linux
15 | dist: xenial
16 | sudo: required
17 |
18 | - language: java
19 | jdk: openjdk9
20 | os: linux
21 | dist: xenial
22 | sudo: required
23 |
24 | - language: java
25 | jdk: openjdk10
26 | os: linux
27 | dist: xenial
28 | sudo: required
29 |
30 | - language: java
31 | jdk: openjdk11
32 | os: linux
33 | dist: xenial
34 | sudo: required
35 |
36 | - language: java
37 | jdk: openjdk12
38 | os: linux
39 | dist: xenial
40 | sudo: required
41 |
42 | - language: java
43 | jdk: openjdk13
44 | os: linux
45 | dist: xenial
46 | sudo: required
47 |
48 | - language: java
49 | jdk: openjdk14
50 | os: linux
51 | dist: xenial
52 | sudo: required
53 |
54 | before_cache:
55 | - rm -f $HOME/.gradle/caches/modules-2/modules-2.lock
56 | - rm -fr $HOME/.gradle/caches/*/plugin-resolution/
57 | cache:
58 | directories:
59 | - $HOME/.gradle/caches/
60 | - $HOME/.gradle/wrapper/
61 | before_install:
62 | - gradle wrapper
63 | script: |
64 | bash .ci/ci_check.sh
65 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # 节点前置服务
2 | [](https://webasedoc.readthedocs.io/zh_CN/latest/docs/WeBASE/CONTRIBUTING.html)
3 | [](https://www.codefactor.io/repository/github/webankblockchain/webase-front)
4 | [](https://github.com/WeBankBlockchain/WeBASE-Front)
5 | [](http://www.apache.org/licenses/)
6 | [](https://github.com/WeBankBlockchain/WeBASE-Front/releases)
7 |
8 | ## 简介
9 | WeBASE-Front是和FISCO BCOS节点配合使用的一个子系统,需要和节点统计部署,目前支持FISCO BCOS 2.0以上版本,可通过HTTP请求和节点进行通信,集成了web3sdk(java-sdk),对接口进行了封装和抽象,具备可视化控制台,可以在控制台上查看交易和区块详情,开发智能合约,管理私钥,并对节点健康度进行监控和统计。 快速安装请查看[WeBASE-Front快速入门搭建](https://webasedoc.readthedocs.io/zh_CN/latest/docs/WeBASE-Install/developer.html)。详细介绍请查看[WeBASE-Front在线文档](https://webasedoc.readthedocs.io/zh_CN/latest/docs/WeBASE-Front/index.html)
10 |
11 | ## 贡献说明
12 | 请阅读我们的[贡献文档](https://webasedoc.readthedocs.io/zh_CN/latest/docs/WeBASE/CONTRIBUTING.html),了解如何贡献代码,并提交你的贡献。
13 |
14 | 希望在您的参与下,WeBASE会越来越好!
15 |
16 | ## 社区
17 | 联系我们:webase@webank.com
18 |
--------------------------------------------------------------------------------
/docker/build/Dockerfile:
--------------------------------------------------------------------------------
1 | FROM ubuntu:18.04 as prod
2 |
3 | #RUN apk --no-cache add bash curl wget
4 | RUN apt-get update \
5 | && apt-get -y install openjdk-8-jre \
6 | && rm -rf /var/lib/apt/lists/*
7 |
8 | COPY gradle /dist/gradle
9 | COPY static /dist/static
10 | COPY lib /dist/lib
11 | COPY conf_template /dist/conf
12 | COPY apps /dist/apps
13 |
14 | # run with 'sdk' volume
15 | RUN mkdir -p /dist/sdk
16 |
17 | WORKDIR /dist
18 | EXPOSE 5002
19 |
20 | ENV CLASSPATH "/dist/conf/:/dist/apps/*:/dist/lib/*"
21 |
22 | ENV JAVA_OPTS " -server -Dfile.encoding=UTF-8 -Xmx512m -Xms512m -Xmn256m -Xss512k -XX:MetaspaceSize=256m -XX:MaxMetaspaceSize=512m -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/log/heap_error.log -XX:+UseG1GC -XX:MaxGCPauseMillis=200 "
23 | ENV APP_MAIN "com.webank.webase.front.Application"
24 |
25 | # start commond
26 | ENTRYPOINT cp -r /dist/sdk/* /dist/conf/ && java ${JAVA_OPTS} -Djdk.tls.namedGroups="secp256k1", -Duser.timezone="Asia/Shanghai" -Djava.security.egd=file:/dev/./urandom, -Djava.library.path=/dist/conf -cp ${CLASSPATH} ${APP_MAIN}
27 |
--------------------------------------------------------------------------------
/docker/fisco/Dockerfile:
--------------------------------------------------------------------------------
1 | # choose bcos image
2 | ARG BCOS_IMG_VERSION
3 | FROM fiscoorg/fiscobcos:${BCOS_IMG_VERSION:-v2.8.0}
4 | LABEL maintainer service@fisco.com.cn
5 |
6 | # bcos config files
7 | WORKDIR /bcos
8 | # WeBASE-Front files
9 | WORKDIR /front
10 |
11 | # setup JDK
12 | RUN apt-get update \
13 | && apt-get -y install openjdk-8-jdk \
14 | && rm -rf /var/lib/apt/lists/*
15 |
16 | ENV JAVA_HOME /usr/lib/jvm/java-8-openjdk-amd64
17 | ENV CLASSPATH $JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
18 | ENV PATH $JAVA_HOME/bin:$PATH
19 |
20 | # COPY start shell of bcos and front
21 | COPY ["docker/fisco/docker-start.sh", "/docker-start.sh"]
22 |
23 | # COPY front files
24 | # cache lib layer
25 | # replace start.sh of front(use active profile)
26 | COPY ["dist/*.sh", "/front/"]
27 | COPY ["dist/lib/", "/front/lib/"]
28 | COPY ["dist/conf_template/", "/front/conf/"]
29 | COPY ["dist/static/", "/front/static/"]
30 | COPY ["dist/gradle/", "/front/gradle/"]
31 | COPY ["dist/apps/", "/front/apps/"]
32 |
33 | # expose port
34 | EXPOSE 30300 20200 8545 5002
35 |
36 | # start
37 | ENTRYPOINT ["bash","/docker-start.sh"]
38 |
--------------------------------------------------------------------------------
/docker/fisco/docker-start.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | # start bcos
4 | cd /data && /usr/local/bin/fisco-bcos -c /data/config.ini >>nohup.out &
5 |
6 | # start front
7 | cp -r /data/sdk/* /front/conf/
8 | cd /front && bash start.sh
9 |
10 | # keep container running
11 | tail -f /docker-start.sh
12 |
13 |
14 |
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WeBankBlockchain/WeBASE-Front/b8070ec961ded585572e1e7950e2408de682d2d9/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | distributionBase=GRADLE_USER_HOME
2 | distributionPath=wrapper/dists
3 | distributionUrl=https\://services.gradle.org/distributions/gradle-6.6.1-bin.zip
4 | zipStoreBase=GRADLE_USER_HOME
5 | zipStorePath=wrapper/dists
6 |
--------------------------------------------------------------------------------
/how_to_update_logo.md:
--------------------------------------------------------------------------------
1 | # Second quarter 第二季
2 |
3 | ## task11:修改WeBASE-Front前端项目中的logo
4 |
5 | ### 第一步:克隆WeBASE-Front项目
6 |
7 | ``git clone https://github.com/WeBankBlockchain/WeBASE-Front.git``
8 | ``git clone https://gitee.com/WeBank/WeBASE-Front.git``
9 |
10 | ### 第二步:修改WeBASE-Front前端项目logo
11 |
12 | > 注意:修改的logo图片类型以及名称需要跟原来的一致
13 |
14 | 在 /WeBASE-Front/src/main/resources/static/static/image 目录下找到 logo.jpg 将其替换调即可
15 |
16 | 如果是浏览器显示的logo则修改 /WeBASE-Front/src/main/resources/static/static/image 目录下的 webase_35x35.png
17 |
18 | ### 第三步:编译代码
19 |
20 | 在 WeBASE-Front 目录下运行命令:
21 |
22 | ```bash
23 | chmod +x ./gradlew && ./gradlew build -x test
24 | ```
25 |
26 | ### 第四步:修改配置
27 |
28 | 按照[官方的配置说明](https://webasedoc.readthedocs.io/zh_CN/latest/docs/WeBASE-Front/install.html#id6)即可
29 |
30 | #### 第五步:启动
31 |
32 | 返回到dist目录执行:
33 |
34 | ```bash
35 | 启动: bash start.sh
36 | 停止: bash stop.sh
37 | 检查: bash status.sh
38 | ```
--------------------------------------------------------------------------------
/install_FAQ.md:
--------------------------------------------------------------------------------
1 | # 常见问题解答
2 |
3 | ### 一般问题
4 | * 1:执行shell脚本报下面错误permission denied:
5 |
6 | 答:chmod +x 给文件增加权限
7 |
8 | * 2: eclipse环境编译源码失败,错误提示如下;
9 | ```
10 | ...
11 | /data/temp/WeBASE-Front/src/main/java/com/webank/webase/front/performance/PerformanceService.java:167: error: cannot find symbol
12 | log.info("begin sync performance");
13 | ^
14 | symbol: variable log
15 | location: class PerformanceService
16 | Note: /data/temp/WeBASE-Front/src/main/java/com/webank/webase/front/contract/CommonContract.java uses or overrides a deprecated API.
17 | Note: Recompile with -Xlint:deprecation for details.
18 | Note: Some input files use unchecked or unsafe operations.
19 | Note: Recompile with -Xlint:unchecked for details.
20 | 100 errors
21 |
22 | > Task :compileJava FAILED
23 |
24 | FAILURE: Build failed with an exception.
25 | ...
26 | ```
27 |
28 | 答:问题是不能编译Lombok注解 ,修改 build.gradle文件,将以下代码的注释加上
29 | ```
30 | //annotationProcessor 'org.projectlombok:lombok:1.18.6'
31 | ```
32 |
33 |
34 | * 3: 节点运行一段时间后新增了一个群组,front查不到新群组信息。
35 |
36 | 答: 调用 http://{ip}:{port}/WeBASE-Front/8081/1/web3/refresh 方法,即可手动更新。
37 |
38 |
39 | * 4: 觉得url中WeBASE-Front输入比较麻烦,怎么修改?
40 |
41 | 答:修改application.yml 文件中的context-path即可:
42 | ```
43 | server:
44 | port: 8081
45 | context-path: /WeBASE-Front //修改此处即可如 webase-front;
46 | ```
--------------------------------------------------------------------------------
/release_note.txt:
--------------------------------------------------------------------------------
1 | v1.5.5
2 |
--------------------------------------------------------------------------------
/sider.yml:
--------------------------------------------------------------------------------
1 | linter:
2 | pmd_java:
3 | dir: src/main/java
4 | encoding: Shift_JIS
5 | min_priority: 2
6 | eslint:
7 | dir: web/src
8 | ext: ".js"
9 | checkstyle:
10 | dir: src/main/java
11 | ignore:
12 | - warning
13 | - info
14 | misspell:
15 | targets:
16 | - src/main/java
17 | - src/test/java
18 | locale: US
19 | goodcheck:
20 | target:
21 | - src/main/java
22 | - src/test/java
23 |
--------------------------------------------------------------------------------
/src/main/java/com/webank/webase/front/abi/AbiRepository.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright 2014-2020 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.webank.webase.front.abi;
18 |
19 | import com.webank.webase.front.abi.entity.AbiInfo;
20 | import org.springframework.data.domain.Pageable;
21 | import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
22 | import org.springframework.data.repository.CrudRepository;
23 |
24 | import java.util.List;
25 |
26 | /**
27 | * @author marsli
28 | */
29 | public interface AbiRepository extends CrudRepository,
30 | JpaSpecificationExecutor {
31 |
32 | AbiInfo findByAbiId(Long abiId);
33 |
34 | AbiInfo findByGroupIdAndContractAddress(Integer groupId, String address);
35 |
36 | AbiInfo findByGroupIdAndContractName(Integer groupId, String userName);
37 |
38 | List findByGroupId(Integer groupId, Pageable pageable);
39 |
40 | List findByGroupId(Integer groupId);
41 | }
42 |
--------------------------------------------------------------------------------
/src/main/java/com/webank/webase/front/abi/entity/ReqImportAbi.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright 2014-2020 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.webank.webase.front.abi.entity;
18 |
19 | import lombok.Data;
20 | import javax.validation.constraints.NotBlank;
21 |
22 | import javax.validation.constraints.NotNull;
23 | import java.util.List;
24 |
25 | /**
26 | * unique contractName_groupId
27 | * @author marsli
28 | */
29 | @Data
30 | public class ReqImportAbi {
31 | private Long abiId;
32 | @NotNull
33 | private Integer groupId;
34 | @NotBlank
35 | private String contractName;
36 | @NotBlank
37 | private String contractAddress;
38 | @NotNull
39 | private List contractAbi;
40 | }
41 |
--------------------------------------------------------------------------------
/src/main/java/com/webank/webase/front/base/code/RetCode.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2014-2020 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.webank.webase.front.base.code;
17 |
18 | import lombok.Data;
19 |
20 | /**
21 | * Constant Return Code
22 | */
23 | @Data
24 | public class RetCode {
25 | private Integer code;
26 | private String message;
27 |
28 | public RetCode() {}
29 |
30 | public RetCode(int code, String message) {
31 | this.code = code;
32 | this.message = message;
33 | }
34 |
35 | public static RetCode mark(int code, String message) {
36 | return new RetCode(code, message);
37 | }
38 |
39 | public static RetCode mark(Integer code) {
40 | return new RetCode(code, null);
41 | }
42 |
43 | @Override
44 | public String toString() {
45 | return "{" + "\"code\":" + code + ", \"msg\":\"" + message + "\"}";
46 | }
47 | }
48 |
--------------------------------------------------------------------------------
/src/main/java/com/webank/webase/front/base/config/MySecurityManagerConfig.java:
--------------------------------------------------------------------------------
1 | package com.webank.webase.front.base.config;
2 |
3 | import lombok.extern.slf4j.Slf4j;
4 |
5 | @Slf4j
6 | public class MySecurityManagerConfig {
7 |
8 | public static void forbidSystemExitCall() {
9 | // Set current security manager.
10 | // If the argument is null and no security manager has been established then no action is taken
11 | System.setSecurityManager(new NoExitSecurityManager());
12 | }
13 |
14 | public static void enableSystemExitCall() {
15 | System.setSecurityManager( null ) ;
16 | }
17 |
18 | }
19 |
--------------------------------------------------------------------------------
/src/main/java/com/webank/webase/front/base/config/NoExitSecurityManager.java:
--------------------------------------------------------------------------------
1 | package com.webank.webase.front.base.config;
2 |
3 | import java.security.Permission;
4 |
5 | public class NoExitSecurityManager extends SecurityManager {
6 | @Override
7 | public void checkExit(int status) {
8 | throw new SecurityException();
9 | }
10 |
11 | @Override
12 | public void checkPermission( Permission permission ) {
13 | if( "exitVM".equals( permission.getName() ) ) {
14 | throw new SecurityException();
15 | }
16 | }
17 |
18 | }
19 |
--------------------------------------------------------------------------------
/src/main/java/com/webank/webase/front/base/config/TomcatConfig.java:
--------------------------------------------------------------------------------
1 | //package com.webank.webase.front.base.config;
2 | //
3 | //import com.webank.webase.front.base.properties.Constants;
4 | //import org.apache.coyote.http11.Http11NioProtocol;
5 | //import org.springframework.beans.factory.annotation.Autowired;
6 | //import org.springframework.boot.context.embedded.EmbeddedServletContainerFactory;
7 | //import org.springframework.boot.context.embedded.tomcat.TomcatEmbeddedServletContainerFactory;
8 | //import org.springframework.context.annotation.Bean;
9 | //import org.springframework.context.annotation.Configuration;
10 | //
11 | //@Configuration
12 | //public class TomcatConfig {
13 | //
14 | // @Autowired
15 | // Constants constantProperties;
16 | // @Bean
17 | // public EmbeddedServletContainerFactory createEmbeddedServletContainerFactory() {
18 | // TomcatEmbeddedServletContainerFactory tomcatFactory = new TomcatEmbeddedServletContainerFactory();
19 | // tomcatFactory.addConnectorCustomizers(connector -> {
20 | // Http11NioProtocol protocol = (Http11NioProtocol) connector.getProtocolHandler();
21 | // protocol.setKeepAliveTimeout(constantProperties.getKeepAliveTimeout()* 1000);
22 | // protocol.setMaxKeepAliveRequests(constantProperties.getKeepAliveRequests());
23 | // });
24 | // return tomcatFactory;
25 | // }
26 | //}
27 |
--------------------------------------------------------------------------------
/src/main/java/com/webank/webase/front/base/config/WebMvcConfiguration.java:
--------------------------------------------------------------------------------
1 | //package com.webank.webase.front.base.config;
2 | //
3 | //import static com.webank.webase.front.base.properties.Constants.SOLC_DIR_PATH_CONFIG;
4 | //
5 | //import java.io.File;
6 | //import lombok.extern.slf4j.Slf4j;
7 | //import org.springframework.context.annotation.Configuration;
8 | //import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
9 | //import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;
10 | //
11 | //@Slf4j
12 | //@Configuration
13 | //public class WebMvcConfiguration extends WebMvcConfigurerAdapter {
14 | //
15 | // @Override
16 | // public void addResourceHandlers(ResourceHandlerRegistry registry) {
17 | // // File fileDir = new File(SOLC_DIR_PATH);
18 | // // String path = fileDir.getAbsolutePath();
19 | // // registry.addResourceHandler("/solcjs/**").addResourceLocations("file:/" + path + File.separator);
20 | //
21 | // // web request uri of "/solcjs/**", return the files in /solcjs/xx.js
22 | // registry.addResourceHandler("/solcjs/**").addResourceLocations("classpath:/" + SOLC_DIR_PATH_CONFIG + File.separator);
23 | // super.addResourceHandlers(registry);
24 | // }
25 | //}
--------------------------------------------------------------------------------
/src/main/java/com/webank/webase/front/base/enums/CertTypes.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2014-2020 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.webank.webase.front.base.enums;
18 |
19 | /**
20 | * cert type enums
21 | * chain: ca.crt, node: node.crt
22 | * sdk: certs in sdk directory
23 | */
24 | public enum CertTypes {
25 | /**
26 | * ca.crt
27 | */
28 | CHAIN(1),
29 | /**
30 | * node.crt(node cert)
31 | */
32 | NODE(2),
33 | /**
34 | * others: gm encrypt cert
35 | */
36 | OTHERS(3);
37 |
38 | private int value;
39 |
40 | CertTypes(Integer certTypes) {
41 | this.value = certTypes;
42 | }
43 |
44 | public int getValue() {
45 | return this.value;
46 | }
47 | }
48 |
--------------------------------------------------------------------------------
/src/main/java/com/webank/webase/front/base/enums/ContractStatus.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2014-2020 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.webank.webase.front.base.enums;
17 |
18 | /**
19 | * Enumeration of contract status.
20 | */
21 | public enum ContractStatus {
22 |
23 | /**
24 | * not deployed
25 | */
26 | NOTDEPLOYED(1),
27 | /**
28 | * deployed
29 | */
30 | DEPLOYED(2),
31 | /**
32 | * fail to deploy
33 | */
34 | DEPLOYMENTFAILED(3);
35 |
36 | private int value;
37 |
38 | ContractStatus(Integer dataStatus) {
39 | this.value = dataStatus;
40 | }
41 |
42 | public int getValue() {
43 | return this.value;
44 | }
45 | }
46 |
--------------------------------------------------------------------------------
/src/main/java/com/webank/webase/front/base/enums/DataStatus.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2014-2020 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.webank.webase.front.base.enums;
17 |
18 | /**
19 | * Enumeration of data status.
20 | */
21 | public enum DataStatus {
22 | /**
23 | * normal status
24 | */
25 | NORMAL(1),
26 | /**
27 | * abnormal/invalid status
28 | */
29 | INVALID(2);
30 |
31 | private int value;
32 |
33 | DataStatus(Integer dataStatus) {
34 | this.value = dataStatus;
35 | }
36 |
37 | public int getValue() {
38 | return this.value;
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/src/main/java/com/webank/webase/front/base/enums/EventTypes.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright 2014-2020 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.webank.webase.front.base.enums;
18 |
19 | public enum EventTypes {
20 |
21 | /**
22 | * new block event notify type
23 | */
24 | BLOCK_NOTIFY(1),
25 |
26 | /**
27 | * contract event notify type
28 | */
29 | EVENT_LOG_PUSH(2),
30 |
31 | /**
32 | * others ex: sdk error message
33 | */
34 | OTHERS(3);
35 |
36 | private int value;
37 |
38 | EventTypes(Integer eventType) {
39 | this.value = eventType;
40 | }
41 |
42 | public int getValue() {
43 | return this.value;
44 | }
45 | }
46 |
--------------------------------------------------------------------------------
/src/main/java/com/webank/webase/front/base/enums/KeyTypes.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2014-2020 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.webank.webase.front.base.enums;
17 |
18 | /**
19 | * Enumeration of key type.
20 | */
21 | public enum KeyTypes {
22 |
23 | /**
24 | * local db's user
25 | */
26 | LOCALUSER(0),
27 | /**
28 | * created random user for query
29 | */
30 | LOCALRANDOM(1),
31 | /**
32 | * external user
33 | */
34 | EXTERNALUSER(2);
35 |
36 | private int value;
37 |
38 | KeyTypes(int type) {
39 | this.value = type;
40 | }
41 |
42 | public int getValue() {
43 | return this.value;
44 | }
45 | }
46 |
--------------------------------------------------------------------------------
/src/main/java/com/webank/webase/front/base/properties/VersionProperties.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright 2014-2020 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
5 | * in compliance with the License. You may obtain a copy of the License at
6 | *
7 | * http://www.apache.org/licenses/LICENSE-2.0
8 | *
9 | * Unless required by applicable law or agreed to in writing, software distributed under the License
10 | * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
11 | * or implied. See the License for the specific language governing permissions and limitations under
12 | * the License.
13 | */
14 |
15 | package com.webank.webase.front.base.properties;
16 |
17 | import lombok.Data;
18 | import org.springframework.beans.factory.annotation.Value;
19 | import org.springframework.stereotype.Component;
20 |
21 | /**
22 | * load 'version' in .yml
23 | */
24 | @Data
25 | @Component
26 | public class VersionProperties {
27 |
28 | @Value("${version}")
29 | private String version;
30 | }
31 |
--------------------------------------------------------------------------------
/src/main/java/com/webank/webase/front/contract/CnsRepository.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2014-2020 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.webank.webase.front.contract;
17 |
18 | import com.webank.webase.front.contract.entity.Cns;
19 | import java.util.List;
20 | import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
21 | import org.springframework.data.jpa.repository.Query;
22 | import org.springframework.data.repository.CrudRepository;
23 |
24 | public interface CnsRepository extends CrudRepository,
25 | JpaSpecificationExecutor {
26 |
27 | List findByGroupIdAndContractName(int groupId, String contractName);
28 |
29 | @Query(nativeQuery=true, value = "select * from Cns n where n.group_id = ?1 and n.contract_address = ?2 order by n.modify_time desc limit 1")
30 | Cns findByAddressLimitOne(int groupId, String contractAddress);
31 | }
32 |
--------------------------------------------------------------------------------
/src/main/java/com/webank/webase/front/contract/ContractPathRepository.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2014-2020 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.webank.webase.front.contract;
17 |
18 | import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
19 | import org.springframework.data.repository.CrudRepository;
20 | import com.webank.webase.front.contract.entity.ContractPath;
21 | import com.webank.webase.front.contract.entity.ContractPathKey;
22 |
23 | public interface ContractPathRepository extends CrudRepository,
24 | JpaSpecificationExecutor {
25 | }
26 |
--------------------------------------------------------------------------------
/src/main/java/com/webank/webase/front/contract/entity/ContractPath.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2014-2020 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.webank.webase.front.contract.entity;
17 |
18 | import java.io.Serializable;
19 | import java.time.LocalDateTime;
20 | import javax.persistence.Entity;
21 | import javax.persistence.Id;
22 | import javax.persistence.IdClass;
23 | import lombok.Data;
24 |
25 | /**
26 | * Entity of contract path in web solidity IDE in db(using h2.db)
27 | */
28 | @Data
29 | @Entity
30 | @IdClass(ContractPathKey.class)
31 | public class ContractPath implements Serializable {
32 | private static final long serialVersionUID = 3286516914027062194L;
33 | @Id
34 | private Integer groupId;
35 | @Id
36 | private String contractPath;
37 | private LocalDateTime createTime;
38 | private LocalDateTime modifyTime;
39 | }
40 |
--------------------------------------------------------------------------------
/src/main/java/com/webank/webase/front/contract/entity/ContractPathKey.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright 2014-2020 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
5 | * in compliance with the License. You may obtain a copy of the License at
6 | *
7 | * http://www.apache.org/licenses/LICENSE-2.0
8 | *
9 | * Unless required by applicable law or agreed to in writing, software distributed under the License
10 | * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
11 | * or implied. See the License for the specific language governing permissions and limitations under
12 | * the License.
13 | */
14 | package com.webank.webase.front.contract.entity;
15 |
16 | import java.io.Serializable;
17 | import lombok.AllArgsConstructor;
18 | import lombok.Data;
19 | import lombok.NoArgsConstructor;
20 |
21 | /**
22 | * Pk of table contract path.
23 | */
24 | @Data
25 | @AllArgsConstructor
26 | @NoArgsConstructor
27 | public class ContractPathKey implements Serializable {
28 | private static final long serialVersionUID = 713233686141669428L;
29 | private Integer groupId;
30 | private String contractPath;
31 | }
--------------------------------------------------------------------------------
/src/main/java/com/webank/webase/front/contract/entity/FileContentHandle.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2014-2020 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.webank.webase.front.contract.entity;
17 | import lombok.Data;
18 |
19 | import java.io.InputStream;
20 |
21 | /**
22 | * handle contract file's content from entity to .java file
23 | */
24 | @Data
25 | public class FileContentHandle {
26 | private String fileName;
27 | private InputStream inputStream;
28 |
29 | public FileContentHandle(String fileName, InputStream inputStream) {
30 | this.fileName = fileName;
31 | this.inputStream = inputStream;
32 | }
33 |
34 | }
35 |
36 |
--------------------------------------------------------------------------------
/src/main/java/com/webank/webase/front/contract/entity/RepCopyContractItem.java:
--------------------------------------------------------------------------------
1 | package com.webank.webase.front.contract.entity;
2 |
3 | import lombok.Data;
4 |
5 | @Data
6 | public class RepCopyContractItem {
7 | private String contractName;
8 | private String contractSource;
9 | }
10 |
--------------------------------------------------------------------------------
/src/main/java/com/webank/webase/front/contract/entity/ReqContractCompile.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2014-2020 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.webank.webase.front.contract.entity;
17 |
18 | import lombok.Data;
19 | import javax.validation.constraints.NotBlank;
20 |
21 | @Data
22 | public class ReqContractCompile {
23 | // name of contract
24 | @NotBlank
25 | private String contractName;
26 | // Base64 of the contract source
27 | @NotBlank
28 | private String solidityBase64;
29 | }
30 |
--------------------------------------------------------------------------------
/src/main/java/com/webank/webase/front/contract/entity/ReqContractPath.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright 2014-2020 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
5 | * in compliance with the License. You may obtain a copy of the License at
6 | *
7 | * http://www.apache.org/licenses/LICENSE-2.0
8 | *
9 | * Unless required by applicable law or agreed to in writing, software distributed under the License
10 | * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
11 | * or implied. See the License for the specific language governing permissions and limitations under
12 | * the License.
13 | */
14 | package com.webank.webase.front.contract.entity;
15 |
16 |
17 | import javax.validation.constraints.NotNull;
18 | import lombok.Data;
19 | import javax.validation.constraints.NotBlank;
20 |
21 | @Data
22 | public class ReqContractPath {
23 | @NotNull
24 | private Integer groupId;
25 | @NotBlank
26 | private String contractPath;
27 | }
28 |
--------------------------------------------------------------------------------
/src/main/java/com/webank/webase/front/contract/entity/ReqContractSave.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright 2014-2020 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
5 | * in compliance with the License. You may obtain a copy of the License at
6 | *
7 | * http://www.apache.org/licenses/LICENSE-2.0
8 | *
9 | * Unless required by applicable law or agreed to in writing, software distributed under the License
10 | * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
11 | * or implied. See the License for the specific language governing permissions and limitations under
12 | * the License.
13 | */
14 | package com.webank.webase.front.contract.entity;
15 |
16 |
17 | import javax.validation.constraints.NotNull;
18 | import lombok.Data;
19 | import javax.validation.constraints.NotBlank;
20 |
21 | @Data
22 | public class ReqContractSave {
23 |
24 | @NotNull
25 | private Integer groupId;
26 | private Long contractId;
27 | @NotBlank
28 | private String contractName;
29 | private String version;
30 | @NotBlank
31 | private String contractPath;
32 | private String contractSource;
33 | private String contractAbi;
34 | /**
35 | * 合约编译的bytecode(bin),用于部署合约
36 | */
37 | private String bytecodeBin;
38 | /**
39 | * 合约编译的runtime-bytecode(runtime-bin),用于交易解析
40 | */
41 | private String contractBin;
42 |
43 | private String contractAddress;
44 | }
45 |
--------------------------------------------------------------------------------
/src/main/java/com/webank/webase/front/contract/entity/ReqCopyContracts.java:
--------------------------------------------------------------------------------
1 | package com.webank.webase.front.contract.entity;
2 |
3 | import lombok.Data;
4 |
5 | import java.util.List;
6 | @Data
7 | public class ReqCopyContracts {
8 | private Integer groupId;
9 | private String contractPath;
10 | private List contractItems;
11 | }
12 |
--------------------------------------------------------------------------------
/src/main/java/com/webank/webase/front/contract/entity/ReqDeployWithSign.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2014-2020 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.webank.webase.front.contract.entity;
17 |
18 | import java.util.ArrayList;
19 | import java.util.List;
20 | import javax.validation.constraints.NotBlank;
21 | import javax.validation.constraints.NotEmpty;
22 | import com.webank.webase.front.base.code.ConstantCode;
23 | import lombok.Data;
24 |
25 | /**
26 | * deployWithSign interface parameter.
27 | * v1.3.0+ default with sign
28 | */
29 | @Data
30 | @Deprecated
31 | public class ReqDeployWithSign {
32 | private int groupId = 1;
33 | private int signUserId = 100001;
34 | /**
35 | * 合约编译的bytecode(bin),用于部署合约
36 | */
37 | @NotBlank(message = ConstantCode.PARAM_FAIL_BYTECODE_BIN_IS_EMPTY)
38 | private String bytecodeBin;
39 | @NotEmpty(message = ConstantCode.PARAM_FAIL_ABIINFO_IS_EMPTY)
40 | private List contractAbi;
41 | private List funcParam = new ArrayList<>();
42 | }
43 |
--------------------------------------------------------------------------------
/src/main/java/com/webank/webase/front/contract/entity/ReqListContract.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright 2014-2020 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
5 | * in compliance with the License. You may obtain a copy of the License at
6 | *
7 | * http://www.apache.org/licenses/LICENSE-2.0
8 | *
9 | * Unless required by applicable law or agreed to in writing, software distributed under the License
10 | * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
11 | * or implied. See the License for the specific language governing permissions and limitations under
12 | * the License.
13 | */
14 |
15 | package com.webank.webase.front.contract.entity;
16 |
17 | import java.util.List;
18 | import lombok.Data;
19 |
20 | /**
21 | * for contract IDE
22 | */
23 | @Data
24 | public class ReqListContract {
25 | private Integer groupId;
26 | /**
27 | * list contract by multi path
28 | */
29 | private List contractPathList;
30 | }
31 |
--------------------------------------------------------------------------------
/src/main/java/com/webank/webase/front/contract/entity/ReqMultiContractCompile.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2014-2019 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.webank.webase.front.contract.entity;
17 |
18 | import lombok.Data;
19 | import javax.validation.constraints.NotBlank;
20 |
21 | @Data
22 | public class ReqMultiContractCompile {
23 | // Base64 of the contract zip source
24 | @NotBlank
25 | private String contractZipBase64;
26 | }
27 |
--------------------------------------------------------------------------------
/src/main/java/com/webank/webase/front/contract/entity/ReqPageContract.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright 2014-2020 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
5 | * in compliance with the License. You may obtain a copy of the License at
6 | *
7 | * http://www.apache.org/licenses/LICENSE-2.0
8 | *
9 | * Unless required by applicable law or agreed to in writing, software distributed under the License
10 | * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
11 | * or implied. See the License for the specific language governing permissions and limitations under
12 | * the License.
13 | */
14 | package com.webank.webase.front.contract.entity;
15 |
16 | import lombok.Data;
17 |
18 | @Data
19 | public class ReqPageContract {
20 |
21 | private Integer groupId;
22 | private String contractName;
23 | private String contractAddress;
24 | private Integer contractStatus;
25 | private Integer pageNumber;
26 | private Integer pageSize;
27 | /**
28 | * list contract by path
29 | */
30 | private String contractPath;
31 | }
--------------------------------------------------------------------------------
/src/main/java/com/webank/webase/front/contract/entity/ReqQueryCns.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2014-2020 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.webank.webase.front.contract.entity;
17 |
18 | import com.webank.webase.front.base.code.ConstantCode;
19 | import javax.validation.constraints.NotNull;
20 | import lombok.Data;
21 | import javax.validation.constraints.NotBlank;
22 |
23 | /**
24 | * ReqQueryCns.
25 | */
26 | @Data
27 | public class ReqQueryCns {
28 | @NotNull(message = ConstantCode.PARAM_FAIL_GROUP_ID_IS_EMPTY_STRING)
29 | private Integer groupId;
30 | @NotBlank(message = ConstantCode.PARAM_FAIL_CONTRACT_ADDRESS_EMPTY)
31 | private String contractAddress;
32 | }
33 |
--------------------------------------------------------------------------------
/src/main/java/com/webank/webase/front/contract/entity/ReqSendAbi.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright 2014-2020 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
5 | * in compliance with the License. You may obtain a copy of the License at
6 | *
7 | * http://www.apache.org/licenses/LICENSE-2.0
8 | *
9 | * Unless required by applicable law or agreed to in writing, software distributed under the License
10 | * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
11 | * or implied. See the License for the specific language governing permissions and limitations under
12 | * the License.
13 | */
14 | package com.webank.webase.front.contract.entity;
15 |
16 | import com.webank.webase.front.base.code.ConstantCode;
17 | import java.util.List;
18 | import lombok.Data;
19 | import org.fisco.bcos.sdk.abi.wrapper.ABIDefinition;
20 | import javax.validation.constraints.NotEmpty;
21 |
22 |
23 | /**
24 | * abiMeta interface parameter.
25 | */
26 | @Data
27 | public class ReqSendAbi {
28 | private Integer groupId;
29 | private String contractName;
30 | // @NotBlank(message = ConstantCode.PARAM_FAIL_VERSION_IS_EMPTY)
31 | // private String version;
32 | private String address;
33 | @NotEmpty(message = ConstantCode.PARAM_FAIL_ABIINFO_IS_EMPTY)
34 | private List abiInfo;
35 | /**
36 | * 合约编译的runtime-bytecode(runtime-bin),用于交易解析
37 | */
38 | private String contractBin;
39 | private String packageName;
40 | }
41 |
--------------------------------------------------------------------------------
/src/main/java/com/webank/webase/front/contract/entity/RspContractCompile.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2014-2020 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.webank.webase.front.contract.entity;
17 |
18 | import lombok.AllArgsConstructor;
19 | import lombok.Data;
20 | import lombok.NoArgsConstructor;
21 |
22 | @Data
23 | @NoArgsConstructor
24 | @AllArgsConstructor
25 | public class RspContractCompile {
26 | private String contractName;
27 | private String contractAbi;
28 | /**
29 | * 合约编译的bytecode(bin),用于部署合约
30 | */
31 | private String bytecodeBin;
32 | private String errors;
33 |
34 | }
35 |
--------------------------------------------------------------------------------
/src/main/java/com/webank/webase/front/contract/entity/RspContractNoAbi.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright 2014-2020 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
5 | * in compliance with the License. You may obtain a copy of the License at
6 | *
7 | * http://www.apache.org/licenses/LICENSE-2.0
8 | *
9 | * Unless required by applicable law or agreed to in writing, software distributed under the License
10 | * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
11 | * or implied. See the License for the specific language governing permissions and limitations under
12 | * the License.
13 | */
14 |
15 | package com.webank.webase.front.contract.entity;
16 |
17 | import java.time.LocalDateTime;
18 | import lombok.Data;
19 |
20 | @Data
21 | public class RspContractNoAbi {
22 | private Long id;
23 | private Integer groupId;
24 | private String contractAddress;
25 | private String description;
26 | private LocalDateTime createTime;
27 | private LocalDateTime modifyTime;
28 | // abiInfo not contains below, but contractInfo contains
29 | private Integer contractStatus;
30 | private String contractPath;
31 | private String contractName;
32 | private LocalDateTime deployTime;
33 |
34 | }
35 |
--------------------------------------------------------------------------------
/src/main/java/com/webank/webase/front/contract/entity/RspMultiContractCompile.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2014-2019 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.webank.webase.front.contract.entity;
17 |
18 | import lombok.AllArgsConstructor;
19 | import lombok.Data;
20 | import lombok.NoArgsConstructor;
21 |
22 | @Data
23 | @NoArgsConstructor
24 | @AllArgsConstructor
25 | public class RspMultiContractCompile {
26 | private String contractName;
27 | private String contractAbi;
28 | private String contractSource;
29 | private String bytecodeBin;
30 | }
31 |
--------------------------------------------------------------------------------
/src/main/java/com/webank/webase/front/contractStore/ContractFolderRepository.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2014-2020 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.webank.webase.front.contractStore;
17 |
18 |
19 | import com.webank.webase.front.contractStore.entity.ContractFolderItem;
20 | import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
21 | import org.springframework.data.repository.CrudRepository;
22 |
23 | import java.util.List;
24 |
25 | public interface ContractFolderRepository extends CrudRepository,
26 | JpaSpecificationExecutor {
27 |
28 | ContractFolderItem findByContractFolderId(Long contractFolderId);
29 |
30 | List findByStoreId(Long storeId);
31 |
32 | List findAll();
33 |
34 | }
35 |
--------------------------------------------------------------------------------
/src/main/java/com/webank/webase/front/contractStore/ContractItemRepository.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2014-2020 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.webank.webase.front.contractStore;
17 |
18 |
19 | import com.webank.webase.front.contractStore.entity.ContractItem;
20 | import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
21 | import org.springframework.data.repository.CrudRepository;
22 |
23 | import java.util.List;
24 |
25 | public interface ContractItemRepository extends CrudRepository,
26 | JpaSpecificationExecutor {
27 |
28 | ContractItem findByContractId(Long contractId);
29 |
30 | List findByContractFolderId(Long contractFolderId);
31 |
32 | List findAll();
33 |
34 | }
35 |
--------------------------------------------------------------------------------
/src/main/java/com/webank/webase/front/contractStore/ContractStoreRepository.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2014-2020 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.webank.webase.front.contractStore;
17 |
18 |
19 | import com.webank.webase.front.contractStore.entity.StoreItem;
20 | import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
21 | import org.springframework.data.repository.CrudRepository;
22 |
23 | import java.util.List;
24 |
25 | public interface ContractStoreRepository extends CrudRepository,
26 | JpaSpecificationExecutor {
27 |
28 | StoreItem findByStoreId(Long storeId);
29 |
30 | List findAll();
31 |
32 | }
33 |
--------------------------------------------------------------------------------
/src/main/java/com/webank/webase/front/contractStore/ContractStoreStartupRunner.java:
--------------------------------------------------------------------------------
1 | package com.webank.webase.front.contractStore;
2 |
3 | import org.springframework.beans.factory.annotation.Autowired;
4 | import org.springframework.boot.CommandLineRunner;
5 | import org.springframework.stereotype.Component;
6 |
7 | @Component
8 | public class ContractStoreStartupRunner implements CommandLineRunner {
9 |
10 | @Autowired
11 | PresetDataService presetDataService;
12 |
13 | @Override
14 | public void run(String... args) throws Exception {
15 | presetDataService.initPresetData();
16 | }
17 | }
18 |
19 |
--------------------------------------------------------------------------------
/src/main/java/com/webank/webase/front/contractStore/entity/ContractFolderItem.java:
--------------------------------------------------------------------------------
1 | package com.webank.webase.front.contractStore.entity;
2 |
3 | import lombok.Data;
4 |
5 | import javax.persistence.*;
6 | import java.time.LocalDateTime;
7 |
8 | /**
9 | * contract folder item
10 | * @author mingzhenliu
11 | */
12 | @Entity
13 | @Data
14 | @Table(uniqueConstraints = {
15 | @UniqueConstraint(name = "unique_contractId", columnNames = {"contractFolderId"})
16 | })
17 | public class ContractFolderItem {
18 | @Id
19 | private Long contractFolderId;
20 | private Long storeId;
21 | private String contractFolderName;
22 | @Column(columnDefinition = "mediumtext")
23 | private String contractFolderDesc;
24 | @Column(columnDefinition = "mediumtext")
25 | private String contractFolderDetail;
26 | @Column(columnDefinition = "mediumtext")
27 | private String contractFolderDesc_en;
28 | @Column(columnDefinition = "mediumtext")
29 | private String contractFolderDetail_en;
30 | private LocalDateTime createTime;
31 | private LocalDateTime modifyTime;
32 | }
33 |
--------------------------------------------------------------------------------
/src/main/java/com/webank/webase/front/contractStore/entity/ContractItem.java:
--------------------------------------------------------------------------------
1 | package com.webank.webase.front.contractStore.entity;
2 |
3 | import lombok.Data;
4 |
5 | import javax.persistence.*;
6 | import java.time.LocalDateTime;
7 |
8 | /**
9 | * contract item
10 | * @author mingzhenliu
11 | */
12 | @Entity
13 | @Data
14 | @Table(uniqueConstraints = {
15 | @UniqueConstraint(name = "unique_contractId", columnNames = {"contractId"})
16 | })
17 | public class ContractItem {
18 | @Id
19 | private Long contractId;
20 | private Long contractFolderId;
21 | private String contractName;
22 | @Column(columnDefinition = "mediumtext")
23 | private String contractDesc;
24 | @Column(columnDefinition = "mediumtext")
25 | private String contractSrc;
26 | @Column(columnDefinition = "mediumtext")
27 | private String contractDesc_en;
28 | private LocalDateTime createTime;
29 | private LocalDateTime modifyTime;
30 | }
31 |
--------------------------------------------------------------------------------
/src/main/java/com/webank/webase/front/contractStore/entity/StoreItem.java:
--------------------------------------------------------------------------------
1 | package com.webank.webase.front.contractStore.entity;
2 |
3 | import lombok.Data;
4 | import javax.persistence.*;
5 | import java.time.LocalDateTime;
6 |
7 | /**
8 | * contract store item
9 | * @author mingzhenliu
10 | */
11 | @Entity
12 | @Data
13 | @Table(uniqueConstraints = {
14 | @UniqueConstraint(name = "unique_storeId", columnNames = {"storeId"})
15 | })
16 | public class StoreItem {
17 | @Id
18 | private Long storeId;
19 | private String storeName;
20 | private String storeName_en;
21 | private String storeType;
22 | @Column(columnDefinition = "mediumtext")
23 | private String storeIcon;
24 | @Column(columnDefinition = "mediumtext")
25 | private String storeDesc;
26 | @Column(columnDefinition = "mediumtext")
27 | private String storeDetail;
28 | @Column(columnDefinition = "mediumtext")
29 | private String storeDesc_en;
30 | @Column(columnDefinition = "mediumtext")
31 | private String storeDetail_en;
32 | private LocalDateTime createTime;
33 | private LocalDateTime modifyTime;
34 | }
35 |
--------------------------------------------------------------------------------
/src/main/java/com/webank/webase/front/event/ContractEventInfoRepository.java:
--------------------------------------------------------------------------------
1 | package com.webank.webase.front.event;
2 |
3 | import com.webank.webase.front.event.entity.ContractEventInfo;
4 | import org.springframework.data.domain.Pageable;
5 | import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
6 | import org.springframework.data.jpa.repository.Query;
7 | import org.springframework.data.repository.CrudRepository;
8 |
9 | import java.util.List;
10 |
11 | /**
12 | * @author marsli
13 | */
14 | public interface ContractEventInfoRepository extends CrudRepository,
15 | JpaSpecificationExecutor {
16 |
17 | List findByAppId(String appId);
18 |
19 | List findByGroupId(int groupId);
20 |
21 | List findByQueueName(String queueName);
22 |
23 | List findByGroupIdAndContractAddress(int groupId, String contractAddress);
24 |
25 | List findByExchangeNameAndRoutingKey(String exchangeName, String routingKey);
26 |
27 | List findByGroupId(int groupId, Pageable pageable);
28 |
29 | List findByGroupIdAndAppId(int groupId, String appId);
30 |
31 | /**
32 | * check unique by appId exchangeName queueName and contractAddress
33 | */
34 | @Query(value = "select c from ContractEventInfo c where c.appId = ?1 and c.exchangeName = ?2 "
35 | + "and c.queueName = ?3 and c.contractAddress = ?4")
36 | ContractEventInfo findContractEventInfo(
37 | String appId, String exchangeName, String queueName, String contractAddress);
38 | }
--------------------------------------------------------------------------------
/src/main/java/com/webank/webase/front/event/MQPublisher.java:
--------------------------------------------------------------------------------
1 | package com.webank.webase.front.event;
2 |
3 | import lombok.extern.slf4j.Slf4j;
4 | import org.springframework.amqp.rabbit.core.RabbitTemplate;
5 | import org.springframework.beans.factory.annotation.Autowired;
6 | import org.springframework.stereotype.Component;
7 |
8 | /**
9 | * 将RabbitTemplate方法进行简单封装,将message发送到指定的exchange
10 | * MQ publisher to send message @param: MqObject
11 | * @author marsli
12 | */
13 | @Slf4j
14 | @Component
15 | public class MQPublisher {
16 |
17 | @Autowired
18 | private RabbitTemplate rabbitTemplate;
19 |
20 | /**
21 | * use string to send message
22 | * @param exchangeName
23 | * @param messageStr
24 | */
25 | public void sendToTradeFinishedByString(String exchangeName, String routingKey,
26 | String messageStr) {
27 | log.debug("sendToTradeFinishedByString exchangeName:{}, routingKey:{}, messageStr:{}",
28 | exchangeName, routingKey, messageStr);
29 | rabbitTemplate.convertAndSend(exchangeName, routingKey, messageStr);
30 | }
31 |
32 | // public void sendToTradeFinished(String exchangeName, MqObject mqObject) {
33 | // // 设置mqObject.toString().getBytes()
34 | // Message message = MessageBuilder.withBody(mqObject.toString().getBytes())
35 | // .setHeader("type", "block")
36 | // .setMessageId(UUID.randomUUID()+"")
37 | // .build();
38 | // rabbitTemplate.convertAndSend(exchangeName,"", message);
39 | // }
40 |
41 | }
42 |
--------------------------------------------------------------------------------
/src/main/java/com/webank/webase/front/event/entity/DecodedEventLog.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright 2014-2020 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
5 | * in compliance with the License. You may obtain a copy of the License at
6 | *
7 | * http://www.apache.org/licenses/LICENSE-2.0
8 | *
9 | * Unless required by applicable law or agreed to in writing, software distributed under the License
10 | * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
11 | * or implied. See the License for the specific language governing permissions and limitations under
12 | * the License.
13 | */
14 |
15 | package com.webank.webase.front.event.entity;
16 |
17 | import java.util.List;
18 | import lombok.AllArgsConstructor;
19 | import lombok.Data;
20 | import org.fisco.bcos.sdk.model.EventLog;
21 |
22 | @Data
23 | @AllArgsConstructor
24 | public class DecodedEventLog {
25 | private EventLog log;
26 | private List data;
27 | }
28 |
--------------------------------------------------------------------------------
/src/main/java/com/webank/webase/front/event/entity/EventTopicParam.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright 2014-2020 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
5 | * in compliance with the License. You may obtain a copy of the License at
6 | *
7 | * http://www.apache.org/licenses/LICENSE-2.0
8 | *
9 | * Unless required by applicable law or agreed to in writing, software distributed under the License
10 | * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
11 | * or implied. See the License for the specific language governing permissions and limitations under
12 | * the License.
13 | */
14 |
15 | package com.webank.webase.front.event.entity;
16 |
17 | import lombok.AllArgsConstructor;
18 | import lombok.Data;
19 | import lombok.NoArgsConstructor;
20 |
21 | /**
22 | * event's topics, one eventName topic (sha name(type) as topic) and most 3 indexed param topic(sha value as topic)
23 | */
24 | @Data
25 | @AllArgsConstructor
26 | @NoArgsConstructor
27 | public class EventTopicParam {
28 | private String eventName;
29 | private IndexedParamType indexed1;
30 | private IndexedParamType indexed2;
31 | private IndexedParamType indexed3;
32 |
33 |
34 | @Data
35 | @AllArgsConstructor
36 | @NoArgsConstructor
37 | public static class IndexedParamType {
38 | private String type;
39 | // indexed value
40 | private String value;
41 |
42 | }
43 | }
44 |
--------------------------------------------------------------------------------
/src/main/java/com/webank/webase/front/event/entity/PublisherHelper.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright 2014-2020 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.webank.webase.front.event.entity;
18 |
19 | import lombok.AllArgsConstructor;
20 | import lombok.Data;
21 | import lombok.NoArgsConstructor;
22 |
23 | /**
24 | * used in ne block event static map
25 | */
26 | @Data
27 | @NoArgsConstructor
28 | @AllArgsConstructor
29 | public class PublisherHelper {
30 |
31 | private Integer groupId;
32 | private String exchangeName;
33 | private String routingKey;
34 | }
35 |
--------------------------------------------------------------------------------
/src/main/java/com/webank/webase/front/event/entity/RspContractInfo.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright 2014-2020 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
5 | * in compliance with the License. You may obtain a copy of the License at
6 | *
7 | * http://www.apache.org/licenses/LICENSE-2.0
8 | *
9 | * Unless required by applicable law or agreed to in writing, software distributed under the License
10 | * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
11 | * or implied. See the License for the specific language governing permissions and limitations under
12 | * the License.
13 | */
14 |
15 | package com.webank.webase.front.event.entity;
16 |
17 | import lombok.AllArgsConstructor;
18 | import lombok.Data;
19 |
20 | @Data
21 | @AllArgsConstructor
22 | public class RspContractInfo {
23 | private String type;
24 | private String contractAddress;
25 | private String contractName;
26 | }
27 |
--------------------------------------------------------------------------------
/src/main/java/com/webank/webase/front/event/entity/RspEventLog.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright 2014-2020 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
5 | * in compliance with the License. You may obtain a copy of the License at
6 | *
7 | * http://www.apache.org/licenses/LICENSE-2.0
8 | *
9 | * Unless required by applicable law or agreed to in writing, software distributed under the License
10 | * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
11 | * or implied. See the License for the specific language governing permissions and limitations under
12 | * the License.
13 | */
14 |
15 | package com.webank.webase.front.event.entity;
16 |
17 | import java.util.List;
18 | import lombok.AllArgsConstructor;
19 | import lombok.Data;
20 | import org.fisco.bcos.sdk.model.EventLog;
21 |
22 | @Data
23 | @AllArgsConstructor
24 | public class RspEventLog {
25 | private Integer Status;
26 | private List logs;
27 | }
28 |
--------------------------------------------------------------------------------
/src/main/java/com/webank/webase/front/event/entity/message/MQObject.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2014-2020 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.webank.webase.front.event.entity.message;
17 |
18 | import java.io.Serializable;
19 |
20 | /**
21 | * @author marsli
22 | */
23 | public interface MQObject extends Serializable {
24 | }
25 |
--------------------------------------------------------------------------------
/src/main/java/com/webank/webase/front/keystore/KeystoreRepository.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2014-2020 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.webank.webase.front.keystore;
17 |
18 |
19 | import com.webank.webase.front.keystore.entity.KeyStoreInfo;
20 | import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
21 | import org.springframework.data.repository.CrudRepository;
22 |
23 | public interface KeystoreRepository extends CrudRepository,
24 | JpaSpecificationExecutor {
25 |
26 | KeyStoreInfo findByAddress(String address);
27 |
28 | KeyStoreInfo findBySignUserId(String signUserId);
29 |
30 | KeyStoreInfo findByUserName(String userName);
31 |
32 | KeyStoreInfo findByUserNameAndType(String userName, int type);
33 | }
34 |
--------------------------------------------------------------------------------
/src/main/java/com/webank/webase/front/keystore/entity/EncodeInfo.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2014-2020 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
5 | * in compliance with the License. You may obtain a copy of the License at
6 | *
7 | * http://www.apache.org/licenses/LICENSE-2.0
8 | *
9 | * Unless required by applicable law or agreed to in writing, software distributed under the License
10 | * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
11 | * or implied. See the License for the specific language governing permissions and limitations under
12 | * the License.
13 | */
14 |
15 | package com.webank.webase.front.keystore.entity;
16 |
17 | import lombok.AllArgsConstructor;
18 | import lombok.Data;
19 | import lombok.NoArgsConstructor;
20 |
21 | /**
22 | * EncodeInfo
23 | */
24 | @Data
25 | @AllArgsConstructor
26 | @NoArgsConstructor
27 | public class EncodeInfo {
28 | /**
29 | * signUserId in webase-sign
30 | */
31 | private String signUserId;
32 | private String encodedDataStr;
33 | }
34 |
--------------------------------------------------------------------------------
/src/main/java/com/webank/webase/front/keystore/entity/KeyStoreInfo.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2014-2020 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.webank.webase.front.keystore.entity;
17 |
18 | import lombok.Data;
19 |
20 | import javax.persistence.Entity;
21 | import javax.persistence.Id;
22 |
23 | /**
24 | * KeyStoreInfo as user's key pair
25 | */
26 | @Data
27 | @Entity
28 | public class KeyStoreInfo {
29 | @Id
30 | private String address;
31 | private String publicKey;
32 | /**
33 | * not store private key in db
34 | * v1.5.0 if return private key, use base64 format
35 | */
36 | private String privateKey;
37 | private String userName;
38 | /**
39 | * 0:local, 1:random, 2:external
40 | */
41 | private int type;
42 | /**
43 | * webase-sign signUserId
44 | */
45 | private String signUserId;
46 | private String appId;
47 | }
48 |
--------------------------------------------------------------------------------
/src/main/java/com/webank/webase/front/keystore/entity/MessageHashInfo.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2014-2020 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
5 | * in compliance with the License. You may obtain a copy of the License at
6 | *
7 | * http://www.apache.org/licenses/LICENSE-2.0
8 | *
9 | * Unless required by applicable law or agreed to in writing, software distributed under the License
10 | * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
11 | * or implied. See the License for the specific language governing permissions and limitations under
12 | * the License.
13 | */
14 |
15 | package com.webank.webase.front.keystore.entity;
16 |
17 | import lombok.Data;
18 |
19 | /**
20 | * EncodeInfo
21 | */
22 | @Data
23 | public class MessageHashInfo {
24 | /**
25 | * userId deprecated, use signUserId instead
26 | */
27 | private String signUserId;
28 | private String messageHash;
29 | }
30 |
--------------------------------------------------------------------------------
/src/main/java/com/webank/webase/front/keystore/entity/ReqExport.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright 2014-2020 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
5 | * in compliance with the License. You may obtain a copy of the License at
6 | *
7 | * http://www.apache.org/licenses/LICENSE-2.0
8 | *
9 | * Unless required by applicable law or agreed to in writing, software distributed under the License
10 | * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
11 | * or implied. See the License for the specific language governing permissions and limitations under
12 | * the License.
13 | */
14 |
15 | package com.webank.webase.front.keystore.entity;
16 |
17 | import lombok.Data;
18 | import lombok.NoArgsConstructor;
19 |
20 | @Data
21 | @NoArgsConstructor
22 | public class ReqExport {
23 | private String userAddress;
24 | private String signUserId;
25 | private String p12Password;
26 | }
27 |
--------------------------------------------------------------------------------
/src/main/java/com/webank/webase/front/keystore/entity/ReqImportPem.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright 2014-2020 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.webank.webase.front.keystore.entity;
18 |
19 | import lombok.Data;
20 | import lombok.NoArgsConstructor;
21 | import javax.validation.constraints.NotBlank;
22 |
23 | /**
24 | * import pem private key
25 | */
26 | @Data
27 | @NoArgsConstructor
28 | public class ReqImportPem {
29 | @NotBlank
30 | private String pemContent;
31 | private String userName;
32 | }
33 |
--------------------------------------------------------------------------------
/src/main/java/com/webank/webase/front/keystore/entity/ReqImportWithSign.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright 2014-2020 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.webank.webase.front.keystore.entity;
18 |
19 | import lombok.Data;
20 | import lombok.NoArgsConstructor;
21 |
22 | @Data
23 | @NoArgsConstructor
24 | public class ReqImportWithSign {
25 | private String signUserId;
26 | private String appId;
27 | /**
28 | * encoded in base64 format
29 | */
30 | private String privateKey;
31 | }
32 |
--------------------------------------------------------------------------------
/src/main/java/com/webank/webase/front/keystore/entity/RspKeyFile.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright 2014-2020 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
5 | * in compliance with the License. You may obtain a copy of the License at
6 | *
7 | * http://www.apache.org/licenses/LICENSE-2.0
8 | *
9 | * Unless required by applicable law or agreed to in writing, software distributed under the License
10 | * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
11 | * or implied. See the License for the specific language governing permissions and limitations under
12 | * the License.
13 | */
14 |
15 | package com.webank.webase.front.keystore.entity;
16 |
17 | import java.util.Base64;
18 | import lombok.Data;
19 | import lombok.NoArgsConstructor;
20 |
21 | @Data
22 | @NoArgsConstructor
23 | public class RspKeyFile {
24 | private String fileName;
25 | private String fileStreamBase64;
26 |
27 | public RspKeyFile(String fileName, byte[] inputStream) {
28 | this.fileName = fileName;
29 | this.fileStreamBase64 = Base64.getEncoder().encodeToString(inputStream);
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/src/main/java/com/webank/webase/front/keystore/entity/RspMessageHashSignature.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright 2014-2020 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.webank.webase.front.keystore.entity;
18 |
19 | import lombok.Data;
20 |
21 | /**
22 | * response without private key
23 | * @author mingzhenliu
24 | */
25 | @Data
26 | public class RspMessageHashSignature {
27 | private Byte v;
28 | private String r;
29 | private String s;
30 | private String p;
31 |
32 | }
33 |
--------------------------------------------------------------------------------
/src/main/java/com/webank/webase/front/keystore/entity/RspUserInfo.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright 2014-2020 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.webank.webase.front.keystore.entity;
18 |
19 | import lombok.Data;
20 |
21 | /**
22 | * entity from webase-sign
23 | */
24 | @Data
25 | public class RspUserInfo {
26 | private String signUserId;
27 | private String appId;
28 | private String address;
29 | private String publicKey;
30 | /**
31 | * using same aesKey to encrypted in sign
32 | * decrypted in webase-front
33 | * and encoded in base64
34 | */
35 | private String privateKey;
36 | private String description;
37 | private Integer encryptType;
38 | }
39 |
--------------------------------------------------------------------------------
/src/main/java/com/webank/webase/front/keystore/entity/SignInfo.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2014-2020 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
5 | * in compliance with the License. You may obtain a copy of the License at
6 | *
7 | * http://www.apache.org/licenses/LICENSE-2.0
8 | *
9 | * Unless required by applicable law or agreed to in writing, software distributed under the License
10 | * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
11 | * or implied. See the License for the specific language governing permissions and limitations under
12 | * the License.
13 | */
14 |
15 | package com.webank.webase.front.keystore.entity;
16 |
17 | import lombok.Data;
18 |
19 | /**
20 | * SignInfo. get from webase-sign
21 | */
22 | @Data
23 | public class SignInfo {
24 | private String signDataStr;
25 | }
26 |
--------------------------------------------------------------------------------
/src/main/java/com/webank/webase/front/logparse/entity/CurrentState.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2014-2019 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
5 | * in compliance with the License. You may obtain a copy of the License at
6 | *
7 | * http://www.apache.org/licenses/LICENSE-2.0
8 | *
9 | * Unless required by applicable law or agreed to in writing, software distributed under the License
10 | * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
11 | * or implied. See the License for the specific language governing permissions and limitations under
12 | * the License.
13 | */
14 | package com.webank.webase.front.logparse.entity;
15 |
16 | import javax.persistence.Column;
17 | import javax.persistence.Entity;
18 | import javax.persistence.Id;
19 | import lombok.Data;
20 |
21 | @Data
22 | @Entity(name="t_current_state")
23 | public class CurrentState {
24 | @Id
25 | private Integer id;
26 | @Column(name = "file_name")
27 | private String fileName;
28 | @Column(name = "current_size")
29 | private Long currentSize;
30 |
31 | public CurrentState() {}
32 |
33 | public CurrentState(Integer id, String fileName, Long currentSize) {
34 | super();
35 | this.id = id;
36 | this.fileName = fileName;
37 | this.currentSize = currentSize;
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/src/main/java/com/webank/webase/front/logparse/entity/LogData.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2014-2019 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
5 | * in compliance with the License. You may obtain a copy of the License at
6 | *
7 | * http://www.apache.org/licenses/LICENSE-2.0
8 | *
9 | * Unless required by applicable law or agreed to in writing, software distributed under the License
10 | * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
11 | * or implied. See the License for the specific language governing permissions and limitations under
12 | * the License.
13 | */
14 | package com.webank.webase.front.logparse.entity;
15 |
16 | import com.webank.webase.front.logparse.util.LogTypes;
17 | import lombok.Data;
18 |
19 |
20 | @Data
21 | public class LogData {
22 |
23 | private LogTypes logType;
24 | private String logData;
25 | private Long timestamp;
26 |
27 | public LogData(Long timestamp, LogTypes logType, String logData) {
28 | super();
29 | this.logType = logType;
30 | this.logData = logData;
31 | this.timestamp = timestamp;
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/src/main/java/com/webank/webase/front/logparse/repository/CurrentStateRepository.java:
--------------------------------------------------------------------------------
1 |
2 |
3 | /*
4 | * Copyright 2014-2019 the original author or authors.
5 | *
6 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
7 | * in compliance with the License. You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing, software distributed under the License
12 | * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
13 | * or implied. See the License for the specific language governing permissions and limitations under
14 | * the License.
15 | */
16 | package com.webank.webase.front.logparse.repository;
17 |
18 | import com.webank.webase.front.logparse.entity.CurrentState;
19 | import org.springframework.data.repository.CrudRepository;
20 |
21 |
22 | public interface CurrentStateRepository extends CrudRepository {
23 |
24 | }
25 |
--------------------------------------------------------------------------------
/src/main/java/com/webank/webase/front/logparse/repository/NetWorkDataRepository.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2014-2019 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
5 | * in compliance with the License. You may obtain a copy of the License at
6 | *
7 | * http://www.apache.org/licenses/LICENSE-2.0
8 | *
9 | * Unless required by applicable law or agreed to in writing, software distributed under the License
10 | * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
11 | * or implied. See the License for the specific language governing permissions and limitations under
12 | * the License.
13 | */
14 | package com.webank.webase.front.logparse.repository;
15 |
16 | import com.webank.webase.front.logparse.entity.NetWorkData;
17 | import javax.transaction.Transactional;
18 | import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
19 | import org.springframework.data.jpa.repository.Modifying;
20 | import org.springframework.data.jpa.repository.Query;
21 | import org.springframework.data.repository.CrudRepository;
22 |
23 | public interface NetWorkDataRepository
24 | extends CrudRepository, JpaSpecificationExecutor {
25 |
26 | @Modifying
27 | @Transactional
28 | @Query(value = "delete from t_network_data t where t.group_id = ?1 and t.timestamp< ?2",
29 | nativeQuery = true)
30 | public int deleteTimeAgo(int groupId, Long keepEndDate);
31 | }
32 |
--------------------------------------------------------------------------------
/src/main/java/com/webank/webase/front/logparse/repository/TxGasDataRepository.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2014-2019 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
5 | * in compliance with the License. You may obtain a copy of the License at
6 | *
7 | * http://www.apache.org/licenses/LICENSE-2.0
8 | *
9 | * Unless required by applicable law or agreed to in writing, software distributed under the License
10 | * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
11 | * or implied. See the License for the specific language governing permissions and limitations under
12 | * the License.
13 | */
14 | package com.webank.webase.front.logparse.repository;
15 |
16 | import com.webank.webase.front.logparse.entity.TxGasData;
17 | import javax.transaction.Transactional;
18 | import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
19 | import org.springframework.data.jpa.repository.Modifying;
20 | import org.springframework.data.jpa.repository.Query;
21 | import org.springframework.data.repository.CrudRepository;
22 |
23 | public interface TxGasDataRepository
24 | extends CrudRepository, JpaSpecificationExecutor {
25 |
26 | @Modifying
27 | @Transactional
28 | @Query(value = "delete from t_tx_gas_data t where t.group_id = ?1 and t.timestamp < ?2",
29 | nativeQuery = true)
30 | public int deleteTimeAgo(int groupId, Long time);
31 | }
32 |
--------------------------------------------------------------------------------
/src/main/java/com/webank/webase/front/logparse/util/LogTypes.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2014-2019 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
5 | * in compliance with the License. You may obtain a copy of the License at
6 | *
7 | * http://www.apache.org/licenses/LICENSE-2.0
8 | *
9 | * Unless required by applicable law or agreed to in writing, software distributed under the License
10 | * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
11 | * or implied. See the License for the specific language governing permissions and limitations under
12 | * the License.
13 | */
14 |
15 | package com.webank.webase.front.logparse.util;
16 |
17 | /**
18 | * log type enums
19 | */
20 | public enum LogTypes {
21 |
22 | UNKNOWN(0),
23 |
24 | NETWORK(1),
25 |
26 | TxGAS(2);
27 |
28 | private int value;
29 |
30 | LogTypes(Integer logTypes) {
31 | this.value = logTypes;
32 | }
33 |
34 | public int getValue() {
35 | return this.value;
36 | }
37 |
38 | public static boolean isInclude(int key) {
39 | boolean include = false;
40 | for (LogTypes e : LogTypes.values()) {
41 | if (e.getValue() == key) {
42 | include = true;
43 | break;
44 | }
45 | }
46 | return include;
47 | }
48 | }
49 |
--------------------------------------------------------------------------------
/src/main/java/com/webank/webase/front/method/MethodRepository.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright 2014-2020 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.webank.webase.front.method;
17 |
18 | import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
19 | import org.springframework.data.repository.CrudRepository;
20 | import com.webank.webase.front.method.entity.Method;
21 | import com.webank.webase.front.method.entity.MethodKey;
22 |
23 | public interface MethodRepository extends CrudRepository,
24 | JpaSpecificationExecutor {
25 |
26 | }
27 |
--------------------------------------------------------------------------------
/src/main/java/com/webank/webase/front/method/entity/Method.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright 2014-2020 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
5 | * in compliance with the License. You may obtain a copy of the License at
6 | *
7 | * http://www.apache.org/licenses/LICENSE-2.0
8 | *
9 | * Unless required by applicable law or agreed to in writing, software distributed under the License
10 | * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
11 | * or implied. See the License for the specific language governing permissions and limitations under
12 | * the License.
13 | */
14 | package com.webank.webase.front.method.entity;
15 |
16 | import java.io.Serializable;
17 | import javax.persistence.Column;
18 | import javax.persistence.Entity;
19 | import javax.persistence.Id;
20 | import javax.persistence.IdClass;
21 | import lombok.Data;
22 |
23 | /**
24 | * Entity class of table tb_method.
25 | */
26 | @Data
27 | @Entity
28 | @IdClass(MethodKey.class)
29 | public class Method implements Serializable {
30 | private static final long serialVersionUID = 3286516914027062194L;
31 | @Id
32 | private String methodId;
33 | @Id
34 | private Integer groupId;
35 | @Column(columnDefinition = "text")
36 | private String abiInfo;
37 | private String methodType;
38 | }
--------------------------------------------------------------------------------
/src/main/java/com/webank/webase/front/method/entity/MethodHandle.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright 2014-2020 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.webank.webase.front.method.entity;
17 |
18 | import javax.validation.constraints.NotBlank;
19 | import lombok.Data;
20 |
21 | /**
22 | * method input entity.
23 | */
24 | @Data
25 | public class MethodHandle {
26 | @NotBlank
27 | private String methodId;
28 | @NotBlank
29 | private String abiInfo;
30 | @NotBlank
31 | private String methodType;
32 | }
33 |
--------------------------------------------------------------------------------
/src/main/java/com/webank/webase/front/method/entity/MethodKey.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright 2014-2020 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
5 | * in compliance with the License. You may obtain a copy of the License at
6 | *
7 | * http://www.apache.org/licenses/LICENSE-2.0
8 | *
9 | * Unless required by applicable law or agreed to in writing, software distributed under the License
10 | * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
11 | * or implied. See the License for the specific language governing permissions and limitations under
12 | * the License.
13 | */
14 | package com.webank.webase.front.method.entity;
15 |
16 | import java.io.Serializable;
17 | import lombok.Data;
18 |
19 | /**
20 | * Pk of table tb_method.
21 | */
22 | @Data
23 | public class MethodKey implements Serializable {
24 | private static final long serialVersionUID = 6135785965389059052L;
25 | private String methodId;
26 | private Integer groupId;
27 | }
--------------------------------------------------------------------------------
/src/main/java/com/webank/webase/front/method/entity/NewMethodInputParamHandle.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright 2014-2020 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
5 | * in compliance with the License. You may obtain a copy of the License at
6 | *
7 | * http://www.apache.org/licenses/LICENSE-2.0
8 | *
9 | * Unless required by applicable law or agreed to in writing, software distributed under the License
10 | * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
11 | * or implied. See the License for the specific language governing permissions and limitations under
12 | * the License.
13 | */
14 | package com.webank.webase.front.method.entity;
15 |
16 |
17 | import java.util.List;
18 | import javax.validation.constraints.NotNull;
19 | import lombok.Data;
20 |
21 | /**
22 | * entity of newMethod input.
23 | */
24 | @Data
25 | public class NewMethodInputParamHandle {
26 | @NotNull
27 | private Integer groupId;
28 | @NotNull
29 | List methodHandleList;
30 | }
31 |
--------------------------------------------------------------------------------
/src/main/java/com/webank/webase/front/monitor/entity/GroupSizeInfo.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2014-2019 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
5 | * in compliance with the License. You may obtain a copy of the License at
6 | *
7 | * http://www.apache.org/licenses/LICENSE-2.0
8 | *
9 | * Unless required by applicable law or agreed to in writing, software distributed under the License
10 | * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
11 | * or implied. See the License for the specific language governing permissions and limitations under
12 | * the License.
13 | */
14 | package com.webank.webase.front.monitor.entity;
15 |
16 | import lombok.Data;
17 |
18 | @Data
19 | public class GroupSizeInfo {
20 |
21 | private int groupId;
22 | private String groupName;
23 | private String path;
24 | private long size;
25 |
26 | public GroupSizeInfo(int groupId, String groupName, String path, long size) {
27 | super();
28 | this.groupId = groupId;
29 | this.groupName = groupName;
30 | this.path = path;
31 | this.size = size;
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/src/main/java/com/webank/webase/front/monitor/entity/Monitor.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2014-2020 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
5 | * in compliance with the License. You may obtain a copy of the License at
6 | *
7 | * http://www.apache.org/licenses/LICENSE-2.0
8 | *
9 | * Unless required by applicable law or agreed to in writing, software distributed under the License
10 | * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
11 | * or implied. See the License for the specific language governing permissions and limitations under
12 | * the License.
13 | */
14 | package com.webank.webase.front.monitor.entity;
15 |
16 | import java.math.BigInteger;
17 | import javax.persistence.Entity;
18 | import javax.persistence.GeneratedValue;
19 | import javax.persistence.GenerationType;
20 | import javax.persistence.Id;
21 | import javax.persistence.Index;
22 | import javax.persistence.Table;
23 | import lombok.Data;
24 |
25 | /**
26 | * entity of Node Monitor in db
27 | */
28 | @Data
29 | @Entity
30 | @Table(indexes = {@Index(columnList = "groupId", unique = false)})
31 | public class Monitor {
32 | @Id
33 | @GeneratedValue(strategy = GenerationType.AUTO)
34 | private Long id;
35 | private BigInteger blockHeight;
36 | private BigInteger pbftView;
37 | private BigInteger pendingTransactionCount;
38 | private int groupId = 1;
39 | private Long timestamp;
40 | }
41 |
--------------------------------------------------------------------------------
/src/main/java/com/webank/webase/front/performance/entity/Performance.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2014-2020 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.webank.webase.front.performance.entity;
17 |
18 | import java.math.BigDecimal;
19 | import javax.persistence.Entity;
20 | import javax.persistence.GeneratedValue;
21 | import javax.persistence.GenerationType;
22 | import javax.persistence.Id;
23 | import lombok.Data;
24 |
25 | @Entity
26 | @Data
27 | public class Performance {
28 | @Id
29 | @GeneratedValue(strategy = GenerationType.AUTO)
30 | private Long id;
31 | private BigDecimal cpuUseRatio;
32 | private BigDecimal diskUseRatio;
33 | private BigDecimal memoryUseRatio;
34 | // download bps(bit per second)
35 | private BigDecimal rxbps;
36 | // upload bps(bit per second)
37 | private BigDecimal txbps;
38 | private Long timestamp;
39 | }
40 |
--------------------------------------------------------------------------------
/src/main/java/com/webank/webase/front/performance/entity/ToggleHandle.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2014-2020 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.webank.webase.front.performance.entity;
17 |
18 | import lombok.Data;
19 |
20 | @Data
21 | public class ToggleHandle {
22 | private boolean enable;
23 | }
24 |
--------------------------------------------------------------------------------
/src/main/java/com/webank/webase/front/performance/result/Data.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2014-2020 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.webank.webase.front.performance.result;
17 |
18 | /**
19 | * DATA ENTITY of node monitor and host monitor (performance) module
20 | * related with LineDataList and PerformanceData
21 | * LineDataList => Data => PerformanceData
22 | */
23 | @lombok.Data
24 | public class Data {
25 | private LineDataList lineDataList;
26 | private LineDataList contrastDataList;
27 |
28 | public Data(LineDataList lineDataList, LineDataList contrastDataList) {
29 | this.lineDataList = lineDataList;
30 | this.contrastDataList = contrastDataList;
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/src/main/java/com/webank/webase/front/performance/result/LineDataList.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2014-2020 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.webank.webase.front.performance.result;
17 |
18 | import lombok.Data;
19 |
20 | import java.math.BigDecimal;
21 | import java.util.List;
22 |
23 | /**
24 | * DATA UNIT of monitor data
25 | * LineDataList => Data => PerformanceData
26 | * containing list of result number which comes from monitor result
27 | */
28 | @Data
29 | public class LineDataList {
30 | List timestampList;
31 | List valueList;
32 |
33 | public LineDataList(List timestampList, List valueList) {
34 | this.timestampList = timestampList;
35 | this.valueList = valueList;
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/src/main/java/com/webank/webase/front/performance/result/PerformanceData.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2014-2020 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.webank.webase.front.performance.result;
17 |
18 | /**
19 | * Performance data handle(DTO) of monitor and performance module
20 | * performance response to web
21 | */
22 | @lombok.Data
23 | public class PerformanceData {
24 | private String metricType;
25 | private Data data;
26 |
27 | public PerformanceData(String metricType, Data data) {
28 | this.metricType = metricType;
29 | this.data = data;
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/src/main/java/com/webank/webase/front/precompiledapi/entity/ChainGovernanceHandle.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright 2014-2020 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
5 | * in compliance with the License. You may obtain a copy of the License at
6 | *
7 | * http://www.apache.org/licenses/LICENSE-2.0
8 | *
9 | * Unless required by applicable law or agreed to in writing, software distributed under the License
10 | * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
11 | * or implied. See the License for the specific language governing permissions and limitations under
12 | * the License.
13 | */
14 |
15 | package com.webank.webase.front.precompiledapi.entity;
16 |
17 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
18 | import com.webank.webase.front.base.code.ConstantCode;
19 | import javax.validation.constraints.NotNull;
20 | import lombok.Data;
21 |
22 | @Data
23 | @JsonIgnoreProperties(ignoreUnknown = true)
24 | public class ChainGovernanceHandle {
25 | // defaultValue = "1"
26 | @NotNull(message = ConstantCode.PARAM_FAIL_GROUPID_IS_EMPTY)
27 | private Integer groupId;
28 | @NotNull(message = ConstantCode.PARAM_FAIL_FROM_IS_EMPTY)
29 | private String signUserId;
30 | private String address;
31 | private Integer weight;
32 | private Integer threshold;
33 | }
34 |
--------------------------------------------------------------------------------
/src/main/java/com/webank/webase/front/precompiledapi/entity/CnsHandle.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2014-2020 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.webank.webase.front.precompiledapi.entity;
17 |
18 | import com.webank.webase.front.base.code.ConstantCode;
19 | import lombok.Data;
20 | import javax.validation.constraints.NotBlank;
21 |
22 | import javax.validation.constraints.NotNull;
23 |
24 | @Data
25 | public class CnsHandle {
26 |
27 | // defaultValue = "1"
28 | @NotNull(message = ConstantCode.PARAM_FAIL_GROUPID_IS_EMPTY)
29 | private int groupId;
30 | @NotBlank(message = ConstantCode.PARAM_FAIL_FROM_IS_EMPTY)
31 | private String signUserId;
32 | @NotBlank(message = ConstantCode.PARAM_FAIL_CONTRACT_NAME_IS_EMPTY)
33 | private String contractName;
34 | private String contractNameAndVersion;
35 | private String version;
36 | // register
37 | private String contractAddress;
38 | private String abi;
39 | @Deprecated
40 | private String fromAddress;
41 | }
42 |
--------------------------------------------------------------------------------
/src/main/java/com/webank/webase/front/precompiledapi/entity/ConsensusHandle.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2014-2020 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.webank.webase.front.precompiledapi.entity;
17 |
18 | import com.webank.webase.front.base.code.ConstantCode;
19 | import lombok.Data;
20 | import javax.validation.constraints.NotBlank;
21 |
22 | import javax.validation.constraints.NotNull;
23 |
24 | @Data
25 | public class ConsensusHandle {
26 | @NotNull(message = ConstantCode.PARAM_FAIL_GROUPID_IS_EMPTY)
27 | private int groupId;
28 | @NotBlank(message = ConstantCode.PARAM_FAIL_NODE_TYPE_IS_EMPTY)
29 | private String nodeType;
30 | @NotBlank(message = ConstantCode.PARAM_FAIL_FROM_IS_EMPTY)
31 | private String signUserId;
32 | @NotBlank(message = ConstantCode.PARAM_FAIL_NODE_ID_IS_EMPTY)
33 | private String nodeId;
34 | @Deprecated
35 | private String fromAddress;
36 | }
37 |
--------------------------------------------------------------------------------
/src/main/java/com/webank/webase/front/precompiledapi/entity/ContractManageResult.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright 2014-2019 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
5 | * in compliance with the License. You may obtain a copy of the License at
6 | *
7 | * http://www.apache.org/licenses/LICENSE-2.0
8 | *
9 | * Unless required by applicable law or agreed to in writing, software distributed under the License
10 | * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
11 | * or implied. See the License for the specific language governing permissions and limitations under
12 | * the License.
13 | */
14 | package com.webank.webase.front.precompiledapi.entity;
15 |
16 | import lombok.Data;
17 |
18 | @Data
19 | public class ContractManageResult {
20 | private Integer code;
21 | private String msg;
22 | }
23 |
--------------------------------------------------------------------------------
/src/main/java/com/webank/webase/front/precompiledapi/entity/ContractStatusHandle.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2014-2019 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.webank.webase.front.precompiledapi.entity;
17 |
18 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
19 | import com.webank.webase.front.base.code.ConstantCode;
20 | import javax.validation.constraints.NotNull;
21 | import lombok.Data;
22 | import javax.validation.constraints.NotBlank;
23 |
24 | @Data
25 | @JsonIgnoreProperties(ignoreUnknown = true)
26 | public class ContractStatusHandle {
27 | @NotNull(message = ConstantCode.PARAM_FAIL_GROUPID_IS_EMPTY)
28 | private int groupId;
29 | @NotBlank(message = ConstantCode.PARAM_FAIL_CONTRACT_ADDRESS_EMPTY)
30 | private String contractAddress;
31 | @NotBlank(message = ConstantCode.PARAM_FAIL_CONTRACT_HANDLE_TYPE_EMPTY)
32 | private String handleType;
33 | private String signUserId;
34 | private String grantAddress;
35 | }
36 |
--------------------------------------------------------------------------------
/src/main/java/com/webank/webase/front/precompiledapi/entity/CrudHandle.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2014-2020 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.webank.webase.front.precompiledapi.entity;
17 |
18 | import com.webank.webase.front.base.code.ConstantCode;
19 | import lombok.Data;
20 | import javax.validation.constraints.NotBlank;
21 |
22 | import javax.validation.constraints.NotNull;
23 |
24 | @Data
25 | public class CrudHandle {
26 | @NotNull(message = ConstantCode.PARAM_FAIL_GROUPID_IS_EMPTY)
27 | private int groupId;
28 | @NotBlank(message = ConstantCode.PARAM_FAIL_FROM_IS_EMPTY)
29 | private String signUserId;
30 | private String sql;
31 | @Deprecated
32 | private String fromAddress;
33 | }
34 |
--------------------------------------------------------------------------------
/src/main/java/com/webank/webase/front/precompiledapi/entity/NodeInfo.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2014-2020 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.webank.webase.front.precompiledapi.entity;
17 |
18 | import lombok.AllArgsConstructor;
19 | import lombok.Data;
20 |
21 | @Data
22 | @AllArgsConstructor
23 | public class NodeInfo {
24 | private String nodeId;
25 | private String nodeType;
26 | }
27 |
--------------------------------------------------------------------------------
/src/main/java/com/webank/webase/front/precompiledapi/entity/PermissionHandle.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2014-2020 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.webank.webase.front.precompiledapi.entity;
17 |
18 | import com.webank.webase.front.base.code.ConstantCode;
19 | import lombok.Data;
20 |
21 | import javax.validation.constraints.NotNull;
22 |
23 | /**
24 | * handle POST request for permission controller
25 | */
26 | @Data
27 | public class PermissionHandle {
28 | // defaultValue = "1"
29 | @NotNull(message = ConstantCode.PARAM_FAIL_GROUPID_IS_EMPTY)
30 | private int groupId;
31 | private String permissionType;
32 | @NotNull(message = ConstantCode.PARAM_FAIL_FROM_IS_EMPTY)
33 | private String signUserId;
34 | @NotNull(message = ConstantCode.PARAM_FAIL_USER_IS_EMPTY_STRING)
35 | private String address;
36 | private String tableName;
37 | private PermissionState permissionState;
38 | @Deprecated
39 | private String fromAddress;
40 | }
41 |
--------------------------------------------------------------------------------
/src/main/java/com/webank/webase/front/precompiledapi/entity/PermissionState.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2014-2020 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.webank.webase.front.precompiledapi.entity;
17 |
18 | import com.webank.webase.front.base.code.ConstantCode;
19 | import lombok.Data;
20 |
21 | import javax.validation.constraints.NotNull;
22 |
23 | /**
24 | * handle POST permission state in api("/sorted") in permission controller
25 | */
26 | @Data
27 | public class PermissionState {
28 | // 0 means revoked, 1 means granted
29 | @NotNull(message = ConstantCode.PARAM_FAIL_PERMISSION_STATE_ALL_CONNOT_BE_EMPTY)
30 | private int deployAndCreate;
31 | @NotNull(message = ConstantCode.PARAM_FAIL_PERMISSION_STATE_ALL_CONNOT_BE_EMPTY)
32 | private int cns;
33 | @NotNull(message = ConstantCode.PARAM_FAIL_PERMISSION_STATE_ALL_CONNOT_BE_EMPTY)
34 | private int sysConfig;
35 | @NotNull(message = ConstantCode.PARAM_FAIL_PERMISSION_STATE_ALL_CONNOT_BE_EMPTY)
36 | private int node;
37 | }
38 |
--------------------------------------------------------------------------------
/src/main/java/com/webank/webase/front/precompiledapi/entity/ReqAccountStatus.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright 2014-2020 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
5 | * in compliance with the License. You may obtain a copy of the License at
6 | *
7 | * http://www.apache.org/licenses/LICENSE-2.0
8 | *
9 | * Unless required by applicable law or agreed to in writing, software distributed under the License
10 | * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
11 | * or implied. See the License for the specific language governing permissions and limitations under
12 | * the License.
13 | */
14 |
15 | package com.webank.webase.front.precompiledapi.entity;
16 |
17 | import java.util.List;
18 | import javax.validation.constraints.NotNull;
19 | import lombok.Data;
20 |
21 | @Data
22 | public class ReqAccountStatus {
23 | @NotNull
24 | private Integer groupId;
25 | @NotNull
26 | private List addressList;
27 | }
28 |
--------------------------------------------------------------------------------
/src/main/java/com/webank/webase/front/precompiledapi/entity/ResSystemConfig.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2014-2019 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
5 | * in compliance with the License. You may obtain a copy of the License at
6 | *
7 | * http://www.apache.org/licenses/LICENSE-2.0
8 | *
9 | * Unless required by applicable law or agreed to in writing, software distributed under the License
10 | * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
11 | * or implied. See the License for the specific language governing permissions and limitations under
12 | * the License.
13 | */
14 | package com.webank.webase.front.precompiledapi.entity;
15 |
16 | import lombok.Data;
17 |
18 | /**
19 | * handle POST request to manage system config value check param's validation
20 | */
21 | @Data
22 | public class ResSystemConfig {
23 | private int groupId;
24 | private String configKey;
25 | private String configValue;
26 | }
27 |
--------------------------------------------------------------------------------
/src/main/java/com/webank/webase/front/precompiledapi/entity/SystemConfigHandle.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2014-2020 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.webank.webase.front.precompiledapi.entity;
17 |
18 | import com.webank.webase.front.base.code.ConstantCode;
19 | import lombok.Data;
20 | import javax.validation.constraints.NotBlank;
21 |
22 | import javax.validation.constraints.NotNull;
23 |
24 | /**
25 | * handle POST request to manage system config value
26 | * check param's validation
27 | */
28 | @Data
29 | public class SystemConfigHandle {
30 |
31 | @NotNull(message = ConstantCode.PARAM_FAIL_GROUPID_IS_EMPTY)
32 | private int groupId;
33 | @NotNull(message = ConstantCode.PARAM_FAIL_FROM_IS_EMPTY)
34 | private String signUserId;
35 | @NotBlank(message = ConstantCode.PARAM_FAIL_CONFIG_KEY_IS_EMPTY)
36 | private String configKey;
37 | @NotBlank(message = ConstantCode.PARAM_FAIL_CONFIG_VALUE_IS_EMPTY)
38 | private String configValue;
39 | @Deprecated
40 | private String fromAddress;
41 | }
42 |
--------------------------------------------------------------------------------
/src/main/java/com/webank/webase/front/scaffold/entity/ReqProject.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright 2014-2020 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
5 | * in compliance with the License. You may obtain a copy of the License at
6 | *
7 | * http://www.apache.org/licenses/LICENSE-2.0
8 | *
9 | * Unless required by applicable law or agreed to in writing, software distributed under the License
10 | * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
11 | * or implied. See the License for the specific language governing permissions and limitations under
12 | * the License.
13 | */
14 |
15 | package com.webank.webase.front.scaffold.entity;
16 |
17 | import java.util.List;
18 | import javax.validation.constraints.NotNull;
19 | import lombok.Data;
20 | import lombok.NoArgsConstructor;
21 | import javax.validation.constraints.NotBlank;
22 |
23 | /**
24 | * @author marsli
25 | */
26 | @Data
27 | @NoArgsConstructor
28 | public class ReqProject {
29 | @NotNull
30 | private List contractIdList;
31 | @NotBlank
32 | private String group;
33 | @NotBlank
34 | private String artifactName;
35 | @NotNull
36 | private Integer groupId;
37 | /**
38 | * channel ip for exported project to connect node
39 | */
40 | private String channelIp;
41 | private Integer channelPort;
42 | /**
43 | * select multi user to export in project by p12 format
44 | */
45 | private List userAddressList;
46 | }
47 |
--------------------------------------------------------------------------------
/src/main/java/com/webank/webase/front/scaffold/entity/RspFile.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright 2014-2020 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
5 | * in compliance with the License. You may obtain a copy of the License at
6 | *
7 | * http://www.apache.org/licenses/LICENSE-2.0
8 | *
9 | * Unless required by applicable law or agreed to in writing, software distributed under the License
10 | * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
11 | * or implied. See the License for the specific language governing permissions and limitations under
12 | * the License.
13 | */
14 |
15 | package com.webank.webase.front.scaffold.entity;
16 |
17 | import lombok.AllArgsConstructor;
18 | import lombok.Data;
19 | import lombok.NoArgsConstructor;
20 |
21 | /**
22 | * @author marsli
23 | */
24 | @Data
25 | @NoArgsConstructor
26 | @AllArgsConstructor
27 | public class RspFile {
28 | private String fileName;
29 | private String fileStreamBase64;
30 |
31 | }
32 |
--------------------------------------------------------------------------------
/src/main/java/com/webank/webase/front/solc/SolcRepository.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright 2014-2020 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.webank.webase.front.solc;
18 |
19 | import com.webank.webase.front.solc.entity.SolcInfo;
20 | import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
21 | import org.springframework.data.repository.CrudRepository;
22 |
23 | import java.util.List;
24 |
25 | public interface SolcRepository extends CrudRepository,
26 | JpaSpecificationExecutor {
27 |
28 | List findAll();
29 |
30 | SolcInfo findBySolcName(String fileName);
31 |
32 | SolcInfo findByMd5(String md5);
33 | }
34 |
--------------------------------------------------------------------------------
/src/main/java/com/webank/webase/front/solc/entity/ReqUploadSolc.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright 2014-2020 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.webank.webase.front.solc.entity;
18 |
19 | import lombok.Data;
20 | import javax.validation.constraints.NotBlank;
21 | import org.springframework.web.multipart.MultipartFile;
22 |
23 | import javax.validation.constraints.NotNull;
24 |
25 | @Data
26 | public class ReqUploadSolc {
27 | /**
28 | * ex: solc-0.4.25-a0b332...
29 | */
30 | @NotBlank
31 | private String fileName;
32 | @NotNull
33 | private MultipartFile solcFile;
34 | private String description;
35 | }
36 |
--------------------------------------------------------------------------------
/src/main/java/com/webank/webase/front/solc/entity/RspDownload.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright 2014-2020 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.webank.webase.front.solc.entity;
18 |
19 | import lombok.AllArgsConstructor;
20 | import lombok.Data;
21 |
22 | import java.io.InputStream;
23 |
24 | @Data
25 | @AllArgsConstructor
26 | public class RspDownload {
27 | private String fileName;
28 | private InputStream inputStream;
29 | }
30 |
--------------------------------------------------------------------------------
/src/main/java/com/webank/webase/front/solc/entity/SolcInfo.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright 2014-2020 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.webank.webase.front.solc.entity;
18 |
19 | import lombok.Data;
20 |
21 | import javax.persistence.*;
22 | import java.time.LocalDateTime;
23 |
24 | @Data
25 | @Entity
26 | @Table(uniqueConstraints = {
27 | @UniqueConstraint(name = "unique_file_name", columnNames = {"solcName"}),
28 | @UniqueConstraint(name = "unique_md5", columnNames = {"md5"})
29 | })
30 | public class SolcInfo {
31 | @Id
32 | @GeneratedValue(strategy = GenerationType.AUTO)
33 | private Integer solcId;
34 | private String solcName;
35 | private Integer fileSize;
36 | private String md5;
37 | // private String filePath;
38 | private String description;
39 | private LocalDateTime createTime;
40 | }
41 |
--------------------------------------------------------------------------------
/src/main/java/com/webank/webase/front/tool/entity/ReqDecodeParam.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright 2014-2020 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
5 | * in compliance with the License. You may obtain a copy of the License at
6 | *
7 | * http://www.apache.org/licenses/LICENSE-2.0
8 | *
9 | * Unless required by applicable law or agreed to in writing, software distributed under the License
10 | * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
11 | * or implied. See the License for the specific language governing permissions and limitations under
12 | * the License.
13 | */
14 |
15 | package com.webank.webase.front.tool.entity;
16 |
17 | import java.util.List;
18 | import javax.validation.constraints.NotNull;
19 | import lombok.Data;
20 |
21 | /**
22 | * decode tx receipt's input/output
23 | */
24 | @Data
25 | public class ReqDecodeParam {
26 |
27 | /**
28 | * 1-decode input, 2-decode output
29 | */
30 | @NotNull
31 | private Integer decodeType;
32 |
33 | private String input;
34 | private String output;
35 | private List abiList;
36 | /**
37 | * add in 1.5.0, not null if decode output
38 | */
39 | private String methodName;
40 | }
41 |
--------------------------------------------------------------------------------
/src/main/java/com/webank/webase/front/tool/entity/ReqPrivateKey.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright 2014-2020 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
5 | * in compliance with the License. You may obtain a copy of the License at
6 | *
7 | * http://www.apache.org/licenses/LICENSE-2.0
8 | *
9 | * Unless required by applicable law or agreed to in writing, software distributed under the License
10 | * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
11 | * or implied. See the License for the specific language governing permissions and limitations under
12 | * the License.
13 | */
14 |
15 | package com.webank.webase.front.tool.entity;
16 |
17 | import lombok.Data;
18 | import lombok.NoArgsConstructor;
19 |
20 | @Data
21 | @NoArgsConstructor
22 | public class ReqPrivateKey {
23 |
24 | /**
25 | * string of BigInteger
26 | */
27 | private String privateKey;
28 | }
29 |
--------------------------------------------------------------------------------
/src/main/java/com/webank/webase/front/tool/entity/ReqSign.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright 2014-2020 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
5 | * in compliance with the License. You may obtain a copy of the License at
6 | *
7 | * http://www.apache.org/licenses/LICENSE-2.0
8 | *
9 | * Unless required by applicable law or agreed to in writing, software distributed under the License
10 | * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
11 | * or implied. See the License for the specific language governing permissions and limitations under
12 | * the License.
13 | */
14 |
15 | package com.webank.webase.front.tool.entity;
16 |
17 | import lombok.Data;
18 | import lombok.NoArgsConstructor;
19 |
20 | @Data
21 | @NoArgsConstructor
22 | public class ReqSign {
23 | private String rawData;
24 | private String privateKey;
25 | }
26 |
--------------------------------------------------------------------------------
/src/main/java/com/webank/webase/front/tool/entity/RspHash.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright 2014-2020 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
5 | * in compliance with the License. You may obtain a copy of the License at
6 | *
7 | * http://www.apache.org/licenses/LICENSE-2.0
8 | *
9 | * Unless required by applicable law or agreed to in writing, software distributed under the License
10 | * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
11 | * or implied. See the License for the specific language governing permissions and limitations under
12 | * the License.
13 | */
14 |
15 | package com.webank.webase.front.tool.entity;
16 |
17 | import lombok.AllArgsConstructor;
18 | import lombok.Data;
19 |
20 | @Data
21 | @AllArgsConstructor
22 | public class RspHash {
23 | private String hashValue;
24 | private Integer encryptType;
25 | }
26 |
--------------------------------------------------------------------------------
/src/main/java/com/webank/webase/front/tool/entity/RspKeyPair.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright 2014-2020 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
5 | * in compliance with the License. You may obtain a copy of the License at
6 | *
7 | * http://www.apache.org/licenses/LICENSE-2.0
8 | *
9 | * Unless required by applicable law or agreed to in writing, software distributed under the License
10 | * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
11 | * or implied. See the License for the specific language governing permissions and limitations under
12 | * the License.
13 | */
14 |
15 | package com.webank.webase.front.tool.entity;
16 |
17 | import lombok.Data;
18 | import lombok.NoArgsConstructor;
19 | import org.fisco.bcos.sdk.crypto.keypair.CryptoKeyPair;
20 |
21 | @Data
22 | @NoArgsConstructor
23 | public class RspKeyPair {
24 | // all hex string
25 | private String privateKey;
26 | private String publicKey;
27 | private String address;
28 | private Integer encryptType;
29 |
30 | public RspKeyPair(CryptoKeyPair keyPair, Integer encryptType) {
31 | // no prefix
32 | this.privateKey = keyPair.getHexPrivateKey();
33 | // with prefix
34 | this.publicKey = keyPair.getHexPublicKey();
35 | this.address = keyPair.getAddress();
36 | this.encryptType = encryptType;
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/src/main/java/com/webank/webase/front/tool/entity/RspSignData.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright 2014-2020 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
5 | * in compliance with the License. You may obtain a copy of the License at
6 | *
7 | * http://www.apache.org/licenses/LICENSE-2.0
8 | *
9 | * Unless required by applicable law or agreed to in writing, software distributed under the License
10 | * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
11 | * or implied. See the License for the specific language governing permissions and limitations under
12 | * the License.
13 | */
14 |
15 | package com.webank.webase.front.tool.entity;
16 |
17 | import lombok.AllArgsConstructor;
18 | import lombok.Data;
19 | import org.fisco.bcos.sdk.crypto.signature.SignatureResult;
20 |
21 | @Data
22 | @AllArgsConstructor
23 | public class RspSignData {
24 | private SignatureResult signatureData;
25 | private Integer encryptType;
26 | }
27 |
--------------------------------------------------------------------------------
/src/main/java/com/webank/webase/front/transaction/entity/ContractFunction.java:
--------------------------------------------------------------------------------
1 | package com.webank.webase.front.transaction.entity;
2 |
3 | import lombok.Builder;
4 | import lombok.Data;
5 | import lombok.experimental.Accessors;
6 |
7 | import java.util.List;
8 | import org.fisco.bcos.sdk.abi.TypeReference;
9 | import org.fisco.bcos.sdk.abi.datatypes.Type;
10 |
11 | /**
12 | * abi's function information.
13 | */
14 | @Data
15 | @Builder
16 | @Accessors(chain = true)
17 | public class ContractFunction {
18 | String funcName;
19 | Boolean constant;
20 | List inputList;
21 | List outputList;
22 | List finalInputs;
23 | List> finalOutputs;
24 | }
25 |
--------------------------------------------------------------------------------
/src/main/java/com/webank/webase/front/transaction/entity/ReqEncodeFunction.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright 2014-2020 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
5 | * in compliance with the License. You may obtain a copy of the License at
6 | *
7 | * http://www.apache.org/licenses/LICENSE-2.0
8 | *
9 | * Unless required by applicable law or agreed to in writing, software distributed under the License
10 | * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
11 | * or implied. See the License for the specific language governing permissions and limitations under
12 | * the License.
13 | */
14 |
15 | package com.webank.webase.front.transaction.entity;
16 |
17 | import java.util.List;
18 | import javax.validation.constraints.NotNull;
19 | import lombok.Data;
20 | import javax.validation.constraints.NotBlank;
21 |
22 | /**
23 | * get encoded function string
24 | * @author marsli
25 | */
26 | @Data
27 | public class ReqEncodeFunction {
28 | @NotBlank
29 | private String funcName;
30 | @NotNull
31 | private List contractAbi;
32 | @NotNull
33 | private List funcParam;
34 | }
35 |
--------------------------------------------------------------------------------
/src/main/java/com/webank/webase/front/transaction/entity/ReqQueryTransHandle.java:
--------------------------------------------------------------------------------
1 | package com.webank.webase.front.transaction.entity;
2 |
3 |
4 | import javax.validation.constraints.NotNull;
5 | import lombok.Data;
6 | import javax.validation.constraints.NotBlank;
7 |
8 | @Data
9 | public class ReqQueryTransHandle {
10 |
11 | private String encodeStr;
12 | @NotNull
13 | private String contractAddress;
14 | private String funcName;
15 | @NotBlank
16 | private String contractAbi;
17 | private String userAddress = "0xdbF03B407c01E7cD3CBea99509d93f8DDDC8C6FB";
18 | private int groupId =1 ;
19 | }
20 |
--------------------------------------------------------------------------------
/src/main/java/com/webank/webase/front/transaction/entity/ReqSignMessageHash.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2014-2020 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.webank.webase.front.transaction.entity;
17 |
18 | import com.webank.webase.front.base.code.ConstantCode;
19 | import lombok.AllArgsConstructor;
20 | import lombok.Data;
21 | import lombok.NoArgsConstructor;
22 | import javax.validation.constraints.NotBlank;
23 |
24 | import javax.validation.constraints.NotNull;
25 |
26 | /**
27 | * signMessageHash interface parameter.
28 | */
29 | @Data
30 | @NoArgsConstructor
31 | @AllArgsConstructor
32 | public class ReqSignMessageHash {
33 | /**
34 | * user address
35 | */
36 | @NotNull(message = ConstantCode.PARAM_FAIL_USER_IS_EMPTY_STRING)
37 | private String user;
38 | @NotBlank
39 | private String hash;
40 | private String signUserId;
41 |
42 | }
43 |
--------------------------------------------------------------------------------
/src/main/java/com/webank/webase/front/transaction/entity/ReqSignedTransHandle.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2014-2020 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.webank.webase.front.transaction.entity;
17 |
18 | import javax.validation.constraints.NotNull;
19 | import lombok.Data;
20 |
21 | /**
22 | * transHandler interface parameter.
23 | * handle transactions of deploy/call contract
24 | */
25 | @Data
26 | public class ReqSignedTransHandle {
27 | private String signedStr;
28 | private Boolean sync;
29 | @NotNull
30 | private int groupId =1 ;
31 |
32 | }
33 |
--------------------------------------------------------------------------------
/src/main/java/com/webank/webase/front/util/pageutils/entity/MapHandle.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2014-2020 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.webank.webase.front.util.pageutils.entity;
17 |
18 | import lombok.Data;
19 |
20 | /**
21 | * data unit to handle map2PagedList tool
22 | * @param
23 | */
24 | @Data
25 | public class MapHandle {
26 | private String key;
27 | private Object data;
28 |
29 | public MapHandle(String key, Object data) {
30 | this.key = key;
31 | this.data = data;
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/src/main/java/com/webank/webase/front/web3api/entity/GenerateGroupInfo.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright 2014-2020 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
5 | * in compliance with the License. You may obtain a copy of the License at
6 | *
7 | * http://www.apache.org/licenses/LICENSE-2.0
8 | *
9 | * Unless required by applicable law or agreed to in writing, software distributed under the License
10 | * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
11 | * or implied. See the License for the specific language governing permissions and limitations under
12 | * the License.
13 | */
14 | package com.webank.webase.front.web3api.entity;
15 |
16 | import java.math.BigInteger;
17 | import java.util.List;
18 | import lombok.AllArgsConstructor;
19 | import lombok.Data;
20 | import lombok.NoArgsConstructor;
21 |
22 | @Data
23 | @NoArgsConstructor
24 | @AllArgsConstructor
25 | public class GenerateGroupInfo {
26 | private int generateGroupId;
27 | private BigInteger timestamp;
28 | private List nodeList;
29 | }
30 |
--------------------------------------------------------------------------------
/src/main/java/com/webank/webase/front/web3api/entity/NodeStatusInfo.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright 2014-2020 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
5 | * in compliance with the License. You may obtain a copy of the License at
6 | *
7 | * http://www.apache.org/licenses/LICENSE-2.0
8 | *
9 | * Unless required by applicable law or agreed to in writing, software distributed under the License
10 | * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
11 | * or implied. See the License for the specific language governing permissions and limitations under
12 | * the License.
13 | */
14 | package com.webank.webase.front.web3api.entity;
15 |
16 | import java.math.BigInteger;
17 | import java.time.LocalDateTime;
18 | import lombok.AllArgsConstructor;
19 | import lombok.Data;
20 | import lombok.NoArgsConstructor;
21 |
22 | @Data
23 | @NoArgsConstructor
24 | @AllArgsConstructor
25 | public class NodeStatusInfo {
26 |
27 | private String nodeId;
28 | private BigInteger blockNumber;
29 | private BigInteger pbftView;
30 | private Integer status;
31 | private LocalDateTime latestStatusUpdateTime;
32 | }
33 |
--------------------------------------------------------------------------------
/src/main/java/com/webank/webase/front/web3api/entity/ReqGroupStatus.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright 2014-2020 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.webank.webase.front.web3api.entity;
18 |
19 | import lombok.Data;
20 |
21 | import java.util.List;
22 |
23 | /**
24 | * group status: "INEXISTENT"、"STOPPING"、"RUNNING"、"STOPPED"、"DELETED"
25 | */
26 | @Data
27 | public class ReqGroupStatus {
28 | private List groupIdList;
29 | }
30 |
--------------------------------------------------------------------------------
/src/main/java/com/webank/webase/front/web3api/entity/RspStatBlock.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright 2014-2020 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
5 | * in compliance with the License. You may obtain a copy of the License at
6 | *
7 | * http://www.apache.org/licenses/LICENSE-2.0
8 | *
9 | * Unless required by applicable law or agreed to in writing, software distributed under the License
10 | * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
11 | * or implied. See the License for the specific language governing permissions and limitations under
12 | * the License.
13 | */
14 |
15 | package com.webank.webase.front.web3api.entity;
16 |
17 | import java.math.BigInteger;
18 | import lombok.AllArgsConstructor;
19 | import lombok.Data;
20 | import lombok.NoArgsConstructor;
21 |
22 | @Data
23 | @AllArgsConstructor
24 | @NoArgsConstructor
25 | public class RspStatBlock {
26 | private BigInteger blockNumber;
27 | private Long timestamp;
28 | private int txCount;
29 | }
30 |
--------------------------------------------------------------------------------
/src/main/java/com/webank/webase/front/web3api/entity/RspTransCountInfo.java:
--------------------------------------------------------------------------------
1 | package com.webank.webase.front.web3api.entity;
2 |
3 | import java.math.BigInteger;
4 | import lombok.AllArgsConstructor;
5 | import lombok.Data;
6 | import lombok.NoArgsConstructor;
7 |
8 | /**
9 | * for node-manager
10 | */
11 | @Data
12 | @AllArgsConstructor
13 | @NoArgsConstructor
14 | public class RspTransCountInfo {
15 | private BigInteger txSum;
16 | private BigInteger blockNumber;
17 | private BigInteger failedTxSum;
18 | }
--------------------------------------------------------------------------------
/src/main/resources/libsigar-aarch64-linux.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WeBankBlockchain/WeBASE-Front/b8070ec961ded585572e1e7950e2408de682d2d9/src/main/resources/libsigar-aarch64-linux.so
--------------------------------------------------------------------------------
/src/main/resources/libsigar-amd64-linux.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WeBankBlockchain/WeBASE-Front/b8070ec961ded585572e1e7950e2408de682d2d9/src/main/resources/libsigar-amd64-linux.so
--------------------------------------------------------------------------------
/src/main/resources/libsigar-universal64-macosx.dylib:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WeBankBlockchain/WeBASE-Front/b8070ec961ded585572e1e7950e2408de682d2d9/src/main/resources/libsigar-universal64-macosx.dylib
--------------------------------------------------------------------------------
/src/main/resources/libsigar-x86-linux.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WeBankBlockchain/WeBASE-Front/b8070ec961ded585572e1e7950e2408de682d2d9/src/main/resources/libsigar-x86-linux.so
--------------------------------------------------------------------------------
/src/main/resources/static/static/css/base.css:
--------------------------------------------------------------------------------
1 | @font-face {
2 | font-family: 'webfont';
3 | src: url('../font/webfont.eot'); /* IE9 */
4 | src: url('../font/webfont.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */
5 | url('../font/webfont.woff') format('woff'), /* chrome、firefox */
6 | url('../font/webfont.ttf') format('truetype'), /* chrome、firefox、opera、Safari, Android, iOS 4.2+*/
7 | url('../font/webfont.svg#webfont') format('svg'); /* iOS 4.1- */
8 | }
9 | .web-font {
10 | font-family: "webfont",Arial,sans-serif;
11 | /* font-size: 16px; */
12 | font-style: normal;
13 | -webkit-font-smoothing: antialiased;
14 | -moz-osx-font-smoothing: grayscale;
15 | }
--------------------------------------------------------------------------------
/src/main/resources/static/static/css/reset.css:
--------------------------------------------------------------------------------
1 | *{margin: 0;padding: 0;list-style: none;}
2 |
3 |
4 | body, h1, h2, h3, h4, h5, h6, hr, p, blockquote,
5 | dl, dt, dd, ul, ol, li,
6 | pre,
7 | form, fieldset, legend, button, input, textarea,
8 | th, td {
9 | margin: 0;
10 | padding: 0;
11 | }
12 | html,body{
13 | height: 100%;
14 | }
15 | body,
16 | button, input, select, textarea /* for ie */ {
17 | font: 14px/1.5 tahoma, arial, \5b8b\4f53, sans-serif;
18 | }
19 | h1, h2, h3, h4, h5, h6 { font-size: 100%; }
20 | address, cite, dfn, em, var { font-style: normal; }
21 | code, kbd, pre, samp { font-family: courier new, courier, monospace; }
22 | small { font-size: 14px; }
23 | ul, ol { list-style: none; }
24 | a { text-decoration: none; }
25 | a:hover { text-decoration: underline; }
26 | legend { color: #000; } /* for ie6 */
27 | fieldset, img { border: 0; }
28 | button, input, select, textarea { font-size: 100%; }
29 | table { border-collapse: collapse; border-spacing: 0; }
30 | .ks-clear:after, .clear:after {
31 | content: '\20';
32 | display: block;
33 | height: 0;
34 | clear: both;
35 | }
36 | .ks-clear, .clear {
37 | *zoom: 1;
38 | }
39 |
40 |
--------------------------------------------------------------------------------
/src/main/resources/static/static/font/webfont.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WeBankBlockchain/WeBASE-Front/b8070ec961ded585572e1e7950e2408de682d2d9/src/main/resources/static/static/font/webfont.eot
--------------------------------------------------------------------------------
/src/main/resources/static/static/font/webfont.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WeBankBlockchain/WeBASE-Front/b8070ec961ded585572e1e7950e2408de682d2d9/src/main/resources/static/static/font/webfont.ttf
--------------------------------------------------------------------------------
/src/main/resources/static/static/font/webfont.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WeBankBlockchain/WeBASE-Front/b8070ec961ded585572e1e7950e2408de682d2d9/src/main/resources/static/static/font/webfont.woff
--------------------------------------------------------------------------------
/src/main/resources/static/static/font/webfont.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WeBankBlockchain/WeBASE-Front/b8070ec961ded585572e1e7950e2408de682d2d9/src/main/resources/static/static/font/webfont.woff2
--------------------------------------------------------------------------------
/src/main/resources/static/static/fonts/element-icons.535877f.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WeBankBlockchain/WeBASE-Front/b8070ec961ded585572e1e7950e2408de682d2d9/src/main/resources/static/static/fonts/element-icons.535877f.woff
--------------------------------------------------------------------------------
/src/main/resources/static/static/fonts/element-icons.732389d.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WeBankBlockchain/WeBASE-Front/b8070ec961ded585572e1e7950e2408de682d2d9/src/main/resources/static/static/fonts/element-icons.732389d.ttf
--------------------------------------------------------------------------------
/src/main/resources/static/static/fonts/fontello.068ca2b.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WeBankBlockchain/WeBASE-Front/b8070ec961ded585572e1e7950e2408de682d2d9/src/main/resources/static/static/fonts/fontello.068ca2b.ttf
--------------------------------------------------------------------------------
/src/main/resources/static/static/fonts/fontello.e73a064.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WeBankBlockchain/WeBASE-Front/b8070ec961ded585572e1e7950e2408de682d2d9/src/main/resources/static/static/fonts/fontello.e73a064.eot
--------------------------------------------------------------------------------
/src/main/resources/static/static/fonts/iconfont.8ddfca3.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WeBankBlockchain/WeBASE-Front/b8070ec961ded585572e1e7950e2408de682d2d9/src/main/resources/static/static/fonts/iconfont.8ddfca3.eot
--------------------------------------------------------------------------------
/src/main/resources/static/static/fonts/iconfont.ee39531.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WeBankBlockchain/WeBASE-Front/b8070ec961ded585572e1e7950e2408de682d2d9/src/main/resources/static/static/fonts/iconfont.ee39531.ttf
--------------------------------------------------------------------------------
/src/main/resources/static/static/image/banner.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WeBankBlockchain/WeBASE-Front/b8070ec961ded585572e1e7950e2408de682d2d9/src/main/resources/static/static/image/banner.jpg
--------------------------------------------------------------------------------
/src/main/resources/static/static/image/block.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WeBankBlockchain/WeBASE-Front/b8070ec961ded585572e1e7950e2408de682d2d9/src/main/resources/static/static/image/block.png
--------------------------------------------------------------------------------
/src/main/resources/static/static/image/logo-2 copy@1.5x.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WeBankBlockchain/WeBASE-Front/b8070ec961ded585572e1e7950e2408de682d2d9/src/main/resources/static/static/image/logo-2 copy@1.5x.jpg
--------------------------------------------------------------------------------
/src/main/resources/static/static/image/logo-title.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WeBankBlockchain/WeBASE-Front/b8070ec961ded585572e1e7950e2408de682d2d9/src/main/resources/static/static/image/logo-title.png
--------------------------------------------------------------------------------
/src/main/resources/static/static/image/logo.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WeBankBlockchain/WeBASE-Front/b8070ec961ded585572e1e7950e2408de682d2d9/src/main/resources/static/static/image/logo.jpg
--------------------------------------------------------------------------------
/src/main/resources/static/static/image/logo@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WeBankBlockchain/WeBASE-Front/b8070ec961ded585572e1e7950e2408de682d2d9/src/main/resources/static/static/image/logo@2x.png
--------------------------------------------------------------------------------
/src/main/resources/static/static/image/nodes.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WeBankBlockchain/WeBASE-Front/b8070ec961ded585572e1e7950e2408de682d2d9/src/main/resources/static/static/image/nodes.png
--------------------------------------------------------------------------------
/src/main/resources/static/static/image/transation.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WeBankBlockchain/WeBASE-Front/b8070ec961ded585572e1e7950e2408de682d2d9/src/main/resources/static/static/image/transation.png
--------------------------------------------------------------------------------
/src/main/resources/static/static/image/transationPedding.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WeBankBlockchain/WeBASE-Front/b8070ec961ded585572e1e7950e2408de682d2d9/src/main/resources/static/static/image/transationPedding.png
--------------------------------------------------------------------------------
/src/main/resources/static/static/image/webase_35x35.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WeBankBlockchain/WeBASE-Front/b8070ec961ded585572e1e7950e2408de682d2d9/src/main/resources/static/static/image/webase_35x35.png
--------------------------------------------------------------------------------
/src/main/resources/static/static/img/transation.1a3785f.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WeBankBlockchain/WeBASE-Front/b8070ec961ded585572e1e7950e2408de682d2d9/src/main/resources/static/static/img/transation.1a3785f.png
--------------------------------------------------------------------------------
/src/main/resources/static/static/img/transationPedding.d68f750.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WeBankBlockchain/WeBASE-Front/b8070ec961ded585572e1e7950e2408de682d2d9/src/main/resources/static/static/img/transationPedding.d68f750.png
--------------------------------------------------------------------------------
/src/main/resources/static/static/js/0.72a8638be3f2578f2c89.js.gz:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WeBankBlockchain/WeBASE-Front/b8070ec961ded585572e1e7950e2408de682d2d9/src/main/resources/static/static/js/0.72a8638be3f2578f2c89.js.gz
--------------------------------------------------------------------------------
/src/main/resources/static/static/js/1.33ee9b8c39800f3d213f.js.gz:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WeBankBlockchain/WeBASE-Front/b8070ec961ded585572e1e7950e2408de682d2d9/src/main/resources/static/static/js/1.33ee9b8c39800f3d213f.js.gz
--------------------------------------------------------------------------------
/src/main/resources/static/static/js/10.4ec34b4c668409851945.js.gz:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WeBankBlockchain/WeBASE-Front/b8070ec961ded585572e1e7950e2408de682d2d9/src/main/resources/static/static/js/10.4ec34b4c668409851945.js.gz
--------------------------------------------------------------------------------
/src/main/resources/static/static/js/12.80cc7afdc7d342baa5fb.js.gz:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WeBankBlockchain/WeBASE-Front/b8070ec961ded585572e1e7950e2408de682d2d9/src/main/resources/static/static/js/12.80cc7afdc7d342baa5fb.js.gz
--------------------------------------------------------------------------------
/src/main/resources/static/static/js/13.055b0a18633af2c97aa9.js:
--------------------------------------------------------------------------------
1 | (window.webpackJsonp=window.webpackJsonp||[]).push([[13,14,15,16,17,18,19],{0:function(e,n){},"9e9m":function(e,n,o){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var u,t=o("oCYn");var a=new((u=t)&&u.__esModule?u:{default:u}).default;n.default=a}}]);
--------------------------------------------------------------------------------
/src/main/resources/static/static/js/14.5dd9ee26d1fa8898120f.js:
--------------------------------------------------------------------------------
1 | (window.webpackJsonp=window.webpackJsonp||[]).push([[14,15,16,17,18,19],{"9e9m":function(e,n,o){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var u,a=o("oCYn");var d=new((u=a)&&u.__esModule?u:{default:u}).default;n.default=d}}]);
--------------------------------------------------------------------------------
/src/main/resources/static/static/js/15.120cd94287d0c8f016f6.js:
--------------------------------------------------------------------------------
1 | (window.webpackJsonp=window.webpackJsonp||[]).push([[15,14,16,17,18,19],{"9e9m":function(e,n,o){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var u,a=o("oCYn");var d=new((u=a)&&u.__esModule?u:{default:u}).default;n.default=d}}]);
--------------------------------------------------------------------------------
/src/main/resources/static/static/js/16.4d0153a2620c5489082b.js:
--------------------------------------------------------------------------------
1 | (window.webpackJsonp=window.webpackJsonp||[]).push([[16,14,15,17,18,19],{"9e9m":function(e,n,o){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var u,a=o("oCYn");var d=new((u=a)&&u.__esModule?u:{default:u}).default;n.default=d}}]);
--------------------------------------------------------------------------------
/src/main/resources/static/static/js/17.4018b6dc2baa10d8984a.js:
--------------------------------------------------------------------------------
1 | (window.webpackJsonp=window.webpackJsonp||[]).push([[17,14,15,16,18,19],{"9e9m":function(e,n,o){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var u,a=o("oCYn");var d=new((u=a)&&u.__esModule?u:{default:u}).default;n.default=d}}]);
--------------------------------------------------------------------------------
/src/main/resources/static/static/js/18.d979e449a918792042e9.js:
--------------------------------------------------------------------------------
1 | (window.webpackJsonp=window.webpackJsonp||[]).push([[18,14,15,16,17,19],{"9e9m":function(e,n,o){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var u,a=o("oCYn");var d=new((u=a)&&u.__esModule?u:{default:u}).default;n.default=d}}]);
--------------------------------------------------------------------------------
/src/main/resources/static/static/js/19.9be217e8770c86e8fbf4.js:
--------------------------------------------------------------------------------
1 | (window.webpackJsonp=window.webpackJsonp||[]).push([[19,14,15,16,17,18],{"9e9m":function(e,n,o){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var u,a=o("oCYn");var d=new((u=a)&&u.__esModule?u:{default:u}).default;n.default=d}}]);
--------------------------------------------------------------------------------
/src/main/resources/static/static/js/3.c3f8a26693a51e8f4a0e.js.gz:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WeBankBlockchain/WeBASE-Front/b8070ec961ded585572e1e7950e2408de682d2d9/src/main/resources/static/static/js/3.c3f8a26693a51e8f4a0e.js.gz
--------------------------------------------------------------------------------
/src/main/resources/static/static/js/5.4fd886a4fb01bd5c33e2.js.gz:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WeBankBlockchain/WeBASE-Front/b8070ec961ded585572e1e7950e2408de682d2d9/src/main/resources/static/static/js/5.4fd886a4fb01bd5c33e2.js.gz
--------------------------------------------------------------------------------
/src/main/resources/static/static/js/6.72e85f85990d18eee042.js.gz:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WeBankBlockchain/WeBASE-Front/b8070ec961ded585572e1e7950e2408de682d2d9/src/main/resources/static/static/js/6.72e85f85990d18eee042.js.gz
--------------------------------------------------------------------------------
/src/main/resources/static/static/js/7.969ba5a2e03246b492cb.js.gz:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WeBankBlockchain/WeBASE-Front/b8070ec961ded585572e1e7950e2408de682d2d9/src/main/resources/static/static/js/7.969ba5a2e03246b492cb.js.gz
--------------------------------------------------------------------------------
/src/main/resources/static/static/js/base-loading.js:
--------------------------------------------------------------------------------
1 | if (window.location.hash == '#/contract') {
2 | var _PageHeight = document.documentElement.clientHeight,
3 | _PageWidth = document.documentElement.clientWidth;
4 | var _LoadingTop = _PageHeight > 61 ? (_PageHeight - 61) / 2 : 0,
5 | _LoadingLeft = _PageWidth > 215 ? (_PageWidth - 215) / 2 : 0;
6 | var _LoadingHtml = '
';
7 | document.write(_LoadingHtml);
8 | document.onreadystatechange = completeLoading;
9 | function completeLoading() {
10 | if (document.readyState == "complete") {
11 | var loadingMask = document.getElementById('loadingDiv');
12 | loadingMask.parentNode.removeChild(loadingMask);
13 | }
14 | }
15 | }
--------------------------------------------------------------------------------
/src/main/resources/static/static/js/browserfs.min.js.gz:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WeBankBlockchain/WeBASE-Front/b8070ec961ded585572e1e7950e2408de682d2d9/src/main/resources/static/static/js/browserfs.min.js.gz
--------------------------------------------------------------------------------
/src/main/resources/static/static/js/web3.min.js.gz:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WeBankBlockchain/WeBASE-Front/b8070ec961ded585572e1e7950e2408de682d2d9/src/main/resources/static/static/js/web3.min.js.gz
--------------------------------------------------------------------------------
/src/main/resources/swagger/favicon-16x16.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WeBankBlockchain/WeBASE-Front/b8070ec961ded585572e1e7950e2408de682d2d9/src/main/resources/swagger/favicon-16x16.png
--------------------------------------------------------------------------------
/src/main/resources/swagger/favicon-32x32.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WeBankBlockchain/WeBASE-Front/b8070ec961ded585572e1e7950e2408de682d2d9/src/main/resources/swagger/favicon-32x32.png
--------------------------------------------------------------------------------
/src/main/resources/swagger/swagger-ui.css.map:
--------------------------------------------------------------------------------
1 | {"version":3,"sources":[],"names":[],"mappings":"","file":"swagger-ui.css","sourceRoot":""}
--------------------------------------------------------------------------------
/src/test/java/com/webank/webase/front/base/SpringTestBase.java:
--------------------------------------------------------------------------------
1 | package com.webank.webase.front.base;
2 |
3 | import com.webank.webase.front.Application;
4 | import org.junit.runner.RunWith;
5 | import org.springframework.boot.test.context.SpringBootTest;
6 | import org.springframework.test.context.junit4.SpringRunner;
7 | import org.springframework.test.context.web.WebAppConfiguration;
8 |
9 | @RunWith(SpringRunner.class)
10 | @SpringBootTest(classes = Application.class)
11 | @WebAppConfiguration
12 | public class SpringTestBase {
13 | }
--------------------------------------------------------------------------------
/src/test/java/com/webank/webase/front/gm/pressure/PerformanceHelloWorldCallback.java:
--------------------------------------------------------------------------------
1 | package com.webank.webase.front.gm.pressure;
2 |
3 | import com.fasterxml.jackson.databind.DeserializationFeature;
4 | import com.fasterxml.jackson.databind.ObjectMapper;
5 | import org.fisco.bcos.sdk.model.TransactionReceipt;
6 | import org.fisco.bcos.sdk.model.callback.TransactionCallback;
7 | import org.slf4j.Logger;
8 | import org.slf4j.LoggerFactory;
9 |
10 | public class PerformanceHelloWorldCallback extends TransactionCallback {
11 | private static ObjectMapper objectMapper = new ObjectMapper();
12 |
13 | public static Logger logger = LoggerFactory.getLogger(PerformanceHelloWorldCallback.class);
14 |
15 | private Long startTime = System.currentTimeMillis();
16 |
17 | private PerformanceCollector collector;
18 |
19 | public PerformanceCollector getCollector() { return collector; }
20 |
21 | public void setCollector(PerformanceCollector collector) {
22 | this.collector = collector;
23 | }
24 |
25 | PerformanceHelloWorldCallback() {
26 | objectMapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES,
27 | false);
28 | }
29 |
30 | @Override
31 | public void onResponse(TransactionReceipt receipt) {
32 | Long cost = System.currentTimeMillis() - startTime;
33 |
34 | try {
35 | collector.onMessage(receipt, cost);
36 | } catch (Exception e) {
37 | logger.error("onMessage error: ", e);
38 | }
39 | }
40 |
41 | }
42 |
--------------------------------------------------------------------------------
/src/test/java/com/webank/webase/front/task/RegisterTaskTestBase.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright 2014-2020 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.webank.webase.front.task;
18 |
19 | import com.webank.webase.front.base.SpringTestBase;
20 | import org.junit.Test;
21 | import org.springframework.beans.factory.annotation.Autowired;
22 |
23 | public class RegisterTaskTestBase extends SpringTestBase {
24 | @Autowired
25 | EventRegisterInitTask eventRegisterInitTask;
26 | @Autowired
27 | SyncEventMapTask mapTask;
28 |
29 | @Test
30 | public void testRegisterEventLogPushTask() {
31 | eventRegisterInitTask.syncEventRegisterTask();
32 | }
33 |
34 | @Test
35 | public void testSyncMapTask() {
36 | mapTask.syncEventMapTask();
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/src/test/resources/contract/HelloWorld.sol:
--------------------------------------------------------------------------------
1 | pragma solidity ^0.4.24;
2 |
3 | contract HelloWorld
4 | {
5 | uint256[] ua;
6 | function set(uint256[] memory _ua) public {
7 | ua = _ua;
8 | }
9 |
10 | function get() view public returns(uint256[]) {
11 | return ua;
12 | }
13 | }
--------------------------------------------------------------------------------
/src/test/resources/contract/HelloWorldGM.sol:
--------------------------------------------------------------------------------
1 | pragma solidity ^0.4.24;
2 |
3 | contract HelloWorldGM{
4 | string name;
5 |
6 | constructor() public{
7 | name = "Hello, World!";
8 | }
9 |
10 | function get() constant public returns(string){
11 | return name;
12 | }
13 |
14 | function set(string n) public{
15 | name = n;
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/src/test/resources/contract/Ok.sol:
--------------------------------------------------------------------------------
1 | pragma solidity ^0.4.24;
2 | contract Ok{
3 |
4 | struct Account{
5 | address account;
6 | uint balance;
7 | }
8 |
9 | struct Translog {
10 | string time;
11 | address from;
12 | address to;
13 | uint amount;
14 | }
15 |
16 | Account from;
17 | Account to;
18 | event TransEvent(uint num);
19 | Translog[] log;
20 |
21 | function Ok(){
22 | from.account=0x1;
23 | from.balance=10000000000;
24 | to.account=0x2;
25 | to.balance=0;
26 |
27 | }
28 |
29 | function get()constant returns(uint){
30 | return to.balance;
31 | }
32 |
33 | function trans(uint num){
34 | if (from.balance < num || to.balance + num < to.balance)
35 | return; // Deny overflow
36 |
37 | from.balance=from.balance-num;
38 | to.balance+=num;
39 | TransEvent(num);
40 | log.push(Translog("20170413",from.account,to.account,num));
41 | }
42 | }
--------------------------------------------------------------------------------
/src/test/resources/log4j.properties:
--------------------------------------------------------------------------------
1 | ### set log levels ###
2 | log4j.rootLogger = DEBUG , C , D , E
3 | #log4j.rootLogger = DEBUG , D , E
4 |
5 | ###output the log information to the console###
6 | log4j.appender.C = org.apache.log4j.ConsoleAppender
7 | log4j.appender.C.Target = System.out
8 | log4j.appender.C.layout = org.apache.log4j.PatternLayout
9 | log4j.appender.C.layout.ConversionPattern = [%p] [%-d{yyyy-MM-dd HH:mm:ss}] %C.%M(%L) | %m%n
10 |
11 | ### output the INFO level log information to the =./log/demo_debug.log ###
12 | log4j.appender.D = org.apache.log4j.DailyRollingFileAppender
13 | log4j.appender.D.File = ./log/demo_debug.log
14 | log4j.appender.D.Append = true
15 | log4j.appender.D.Threshold = DEBUG
16 | log4j.appender.D.layout = org.apache.log4j.PatternLayout
17 | log4j.appender.D.layout.ConversionPattern = [%p] [%-d{yyyy-MM-dd HH:mm:ss}] %C.%M(%L) | %m%n
18 |
19 | ### output the ERROR level log information to the=./log/demo_error.log ###
20 | log4j.appender.E = org.apache.log4j.DailyRollingFileAppender
21 | log4j.appender.E.File = ./log/demo_error.log
22 | log4j.appender.E.Append = true
23 | log4j.appender.E.Threshold = ERROR
24 | log4j.appender.E.layout = org.apache.log4j.PatternLayout
25 | log4j.appender.E.layout.ConversionPattern = [%p] [%-d{yyyy-MM-dd HH:mm:ss}] %C.%M(%L) | %m%n
--------------------------------------------------------------------------------
/src/test/resources/solidity/EvidenceSignersData.abi:
--------------------------------------------------------------------------------
1 | [{"constant":true,"inputs":[{"name":"index","type":"uint256"}],"name":"getSigner","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"addr","type":"address"}],"name":"verify","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"getSigners","outputs":[{"name":"","type":"address[]"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"evi","type":"string"},{"name":"info","type":"string"},{"name":"id","type":"string"},{"name":"v","type":"uint8"},{"name":"r","type":"bytes32"},{"name":"s","type":"bytes32"}],"name":"newEvidence","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"nonpayable","type":"function"},
2 | {"constant":true,"inputs":[],"name":"getSignersSize","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},
3 | {"inputs":[{"name":"evidenceSigners","type":"address[]"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"},
4 | {"anonymous":false,"inputs":[{"indexed":false,"name":"addr","type":"address"}],"name":"newEvidenceEvent","type":"event"}]
--------------------------------------------------------------------------------
/src/test/resources/solidity/HelloWorld.abi:
--------------------------------------------------------------------------------
1 | [{"constant":true,"inputs":[],"name":"get","outputs":[{"name":"","type":"uint256[]"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_ua","type":"uint256[]"}],"name":"set","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"}]
--------------------------------------------------------------------------------
/src/test/resources/solidity/HelloWorld.bin:
--------------------------------------------------------------------------------
1 | 608060405234801561001057600080fd5b50610233806100206000396000f30060806040526004361061004c576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680636d4ce63c146100515780636ea9bfc5146100bd575b600080fd5b34801561005d57600080fd5b50610066610123565b6040518080602001828103825283818151815260200191508051906020019060200280838360005b838110156100a957808201518184015260208101905061008e565b505050509050019250505060405180910390f35b3480156100c957600080fd5b506101216004803603810190808035906020019082018035906020019080806020026020016040519081016040528093929190818152602001838360200280828437820191505050505050919291929050505061017b565b005b6060600080548060200260200160405190810160405280929190818152602001828054801561017157602002820191906000526020600020905b81548152602001906001019080831161015d575b5050505050905090565b8060009080519060200190610191929190610195565b5050565b8280548282559060005260206000209081019282156101d1579160200282015b828111156101d05782518255916020019190600101906101b5565b5b5090506101de91906101e2565b5090565b61020491905b808211156102005760008160009055506001016101e8565b5090565b905600a165627a7a723058203c4a2561bb7fc792f0e012c886b7646a93fc55165ff257e255bd93fd475b2c240029
--------------------------------------------------------------------------------
/src/test/resources/solidity/HelloWorldGM.abi:
--------------------------------------------------------------------------------
1 | [{"constant":true,"inputs":[],"name":"get","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"n","type":"string"}],"name":"set","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"inputs":[],"payable":false,"stateMutability":"nonpayable","type":"constructor"}]
--------------------------------------------------------------------------------
/src/test/resources/solidity/Ok.abi:
--------------------------------------------------------------------------------
1 | [{"constant":false,"inputs":[{"name":"num","type":"uint256"}],"name":"trans","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"get","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"inputs":[],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"name":"num","type":"uint256"}],"name":"TransEvent","type":"event"}]
--------------------------------------------------------------------------------
/status.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | APP_MAIN=com.webank.webase.front.Application
4 | CURRENT_DIR=$(pwd)/
5 | CONF_DIR=${CURRENT_DIR}conf
6 |
7 | SERVER_PORT=$(cat $CONF_DIR/application.yml | grep "server:" -A 3 | grep "port" | awk '{print $2}'| sed 's/\r//')
8 | if [ ${SERVER_PORT}"" = "" ];then
9 | echo "$CONF_DIR/application.yml server port has not been configured"
10 | exit -1
11 | fi
12 |
13 | processPid=0
14 | checkProcess(){
15 | server_pid=$(ps aux | grep java | grep $CURRENT_DIR | grep $APP_MAIN | awk '{print $2}')
16 | if [ -n "$server_pid" ]; then
17 | processPid=$server_pid
18 | else
19 | processPid=0
20 | fi
21 | }
22 |
23 | status(){
24 | checkProcess
25 | echo "==============================================================================================="
26 | if [ $processPid -ne 0 ]; then
27 | echo "Server $APP_MAIN Port $SERVER_PORT is running PID($processPid)"
28 | echo "==============================================================================================="
29 | else
30 | echo "Server $APP_MAIN Port $SERVER_PORT is not running"
31 | echo "==============================================================================================="
32 | fi
33 | }
34 |
35 | status
36 |
--------------------------------------------------------------------------------
/stop.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | APP_MAIN=com.webank.webase.front.Application
4 | CURRENT_DIR=$(pwd)/
5 | CONF_DIR=${CURRENT_DIR}conf
6 |
7 | SERVER_PORT=$(cat $CONF_DIR/application.yml | grep "server:" -A 3 | grep "port" | awk '{print $2}'| sed 's/\r//')
8 | if [ ${SERVER_PORT}"" = "" ];then
9 | echo "$CONF_DIR/application.yml server port has not been configured"
10 | exit -1
11 | fi
12 |
13 | processPid=0
14 | checkProcess(){
15 | server_pid=$(ps aux | grep java | grep $CURRENT_DIR | grep $APP_MAIN | awk '{print $2}')
16 | if [ -n "$server_pid" ]; then
17 | processPid=$server_pid
18 | else
19 | processPid=0
20 | fi
21 | }
22 |
23 | stop(){
24 | checkProcess
25 | echo "==============================================================================================="
26 | if [ $processPid -ne 0 ]; then
27 | echo -n "Stopping Server $APP_MAIN Port $SERVER_PORT PID($processPid)..."
28 | kill -9 $processPid
29 | if [ $? -eq 0 ]; then
30 | echo "[Success]"
31 | echo "==============================================================================================="
32 | else
33 | echo "[Failed]"
34 | echo "==============================================================================================="
35 | fi
36 | else
37 | echo "Server $APP_MAIN Port $SERVER_PORT is not running"
38 | echo "==============================================================================================="
39 | fi
40 | }
41 |
42 | stop
--------------------------------------------------------------------------------
/web/.babelrc:
--------------------------------------------------------------------------------
1 | {
2 | "presets": [
3 | ["env", {
4 | // "modules": false,
5 | "targets": {
6 | "browsers": ["> 1%", "last 2 versions", "not ie <= 8"]
7 | }
8 | }],
9 | "stage-2"
10 | ],
11 | "plugins": [
12 | "transform-vue-jsx",
13 | "transform-runtime",
14 | [
15 | "component",
16 | {
17 | "libraryName": "element-ui",
18 | "styleLibraryName": "theme-chalk"
19 | }
20 | ]
21 | ]
22 | }
23 |
--------------------------------------------------------------------------------
/web/.editorconfig:
--------------------------------------------------------------------------------
1 | root = true
2 |
3 | [*]
4 | charset = utf-8
5 | indent_style = space
6 | indent_size = 2
7 | end_of_line = lf
8 | insert_final_newline = true
9 | trim_trailing_whitespace = true
10 |
--------------------------------------------------------------------------------
/web/.gitignore:
--------------------------------------------------------------------------------
1 | .DS_Store
2 | node_modules/
3 | dist/
4 | npm-debug.log*
5 | yarn-debug.log*
6 | yarn-error.log*
7 | **/*.log
8 |
9 | # Editor directories and files
10 | .idea
11 | .vscode
12 | *.suo
13 | *.ntvs*
14 | *.njsproj
15 | *.sln
16 | *.local
17 |
18 | package-lock.json
19 | v0.*.js
20 | v0.*.js.gz
21 |
--------------------------------------------------------------------------------
/web/.postcssrc.js:
--------------------------------------------------------------------------------
1 | // https://github.com/michael-ciniawsky/postcss-load-config
2 |
3 | module.exports = {
4 | "plugins": {
5 | "postcss-import": {},
6 | "postcss-url": {},
7 | // to edit target browsers: use "browserslist" field in package.json
8 | "autoprefixer": {}
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/web/build/build.js:
--------------------------------------------------------------------------------
1 | 'use strict'
2 | require('./check-versions')()
3 |
4 | // process.env.NODE_ENV = 'production'
5 |
6 | const ora = require('ora')
7 | const rm = require('rimraf')
8 | const path = require('path')
9 | const chalk = require('chalk')
10 | const webpack = require('webpack')
11 | const config = require('../config')
12 | const webpackConfig = require('./webpack.prod.conf')
13 |
14 | const spinner = ora('building for production...')
15 | spinner.start()
16 |
17 | rm(path.join(config.build.assetsRoot, config.build.assetsSubDirectory), err => {
18 | if (err) throw err
19 | webpack(webpackConfig, (err, stats) => {
20 | spinner.stop()
21 | if (err) throw err
22 | process.stdout.write(stats.toString({
23 | colors: true,
24 | modules: false,
25 | children: false, // If you are using ts-loader, setting this to true will make TypeScript errors show up during build.
26 | chunks: false,
27 | chunkModules: false
28 | }) + '\n\n')
29 |
30 | if (stats.hasErrors()) {
31 | console.log(chalk.red(' Build failed with errors.\n'))
32 | process.exit(1)
33 | }
34 |
35 | console.log(chalk.cyan(' Build complete.\n'))
36 | console.log(chalk.yellow(
37 | ' Tip: built files are meant to be served over an HTTP server.\n' +
38 | ' Opening index.html over file:// won\'t work.\n'
39 | ))
40 | })
41 | })
42 |
--------------------------------------------------------------------------------
/web/build/check-versions.js:
--------------------------------------------------------------------------------
1 | 'use strict'
2 | const chalk = require('chalk')
3 | const semver = require('semver')
4 | const packageConfig = require('../package.json')
5 | const shell = require('shelljs')
6 |
7 | function exec (cmd) {
8 | return require('child_process').execSync(cmd).toString().trim()
9 | }
10 |
11 | const versionRequirements = [
12 | {
13 | name: 'node',
14 | currentVersion: semver.clean(process.version),
15 | versionRequirement: packageConfig.engines.node
16 | }
17 | ]
18 |
19 | if (shell.which('npm')) {
20 | versionRequirements.push({
21 | name: 'npm',
22 | currentVersion: exec('npm --version'),
23 | versionRequirement: packageConfig.engines.npm
24 | })
25 | }
26 |
27 | module.exports = function () {
28 | const warnings = []
29 |
30 | for (let i = 0; i < versionRequirements.length; i++) {
31 | const mod = versionRequirements[i]
32 |
33 | if (!semver.satisfies(mod.currentVersion, mod.versionRequirement)) {
34 | warnings.push(mod.name + ': ' +
35 | chalk.red(mod.currentVersion) + ' should be ' +
36 | chalk.green(mod.versionRequirement)
37 | )
38 | }
39 | }
40 |
41 | if (warnings.length) {
42 | console.log('')
43 | console.log(chalk.yellow('To use this template, you must update following to modules:'))
44 | console.log()
45 |
46 | for (let i = 0; i < warnings.length; i++) {
47 | const warning = warnings[i]
48 | console.log(' ' + warning)
49 | }
50 |
51 | console.log()
52 | process.exit(1)
53 | }
54 | }
55 |
--------------------------------------------------------------------------------
/web/build/vue-loader.conf.js:
--------------------------------------------------------------------------------
1 | 'use strict'
2 | const utils = require('./utils')
3 | const config = require('../config')
4 | const isProduction = process.env.NODE_ENV === 'production'
5 | const sourceMapEnabled = isProduction
6 | ? config.build.productionSourceMap
7 | : config.dev.cssSourceMap
8 |
9 | module.exports = {
10 | loaders: utils.cssLoaders({
11 | sourceMap: sourceMapEnabled,
12 | extract: isProduction
13 | }),
14 | cssSourceMap: sourceMapEnabled,
15 | cacheBusting: config.dev.cacheBusting,
16 | transformToRequire: {
17 | video: ['src', 'poster'],
18 | source: 'src',
19 | img: 'src',
20 | image: 'xlink:href'
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/web/config/dev.env.js:
--------------------------------------------------------------------------------
1 | 'use strict'
2 | const merge = require('webpack-merge')
3 | const prodEnv = require('./prod.env')
4 |
5 | module.exports = merge(prodEnv, {
6 | NODE_ENV: '"development"',
7 | // MGR_PATH: '"/mgr"',
8 | // HANDLE_PATH: '"/handle"',
9 | })
10 |
--------------------------------------------------------------------------------
/web/config/prod.env.js:
--------------------------------------------------------------------------------
1 | 'use strict'
2 | module.exports = {
3 | NODE_ENV: '"production"',
4 | // HANDLE_PATH: '"/handle"'
5 | }
6 |
--------------------------------------------------------------------------------
/web/src/assets/icon/iconfont.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WeBankBlockchain/WeBASE-Front/b8070ec961ded585572e1e7950e2408de682d2d9/web/src/assets/icon/iconfont.eot
--------------------------------------------------------------------------------
/web/src/assets/icon/iconfont.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WeBankBlockchain/WeBASE-Front/b8070ec961ded585572e1e7950e2408de682d2d9/web/src/assets/icon/iconfont.ttf
--------------------------------------------------------------------------------
/web/src/assets/icon/iconfont.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WeBankBlockchain/WeBASE-Front/b8070ec961ded585572e1e7950e2408de682d2d9/web/src/assets/icon/iconfont.woff
--------------------------------------------------------------------------------
/web/src/assets/icon/iconfont.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WeBankBlockchain/WeBASE-Front/b8070ec961ded585572e1e7950e2408de682d2d9/web/src/assets/icon/iconfont.woff2
--------------------------------------------------------------------------------
/web/src/assets/icon/iconfont_webaas.css:
--------------------------------------------------------------------------------
1 | [class^="wbs-icon"], [class*=" wbs-icon"] {
2 | font-family: "iconfont" !important;
3 | font-size: 18px;
4 | font-style: normal;
5 | -webkit-font-smoothing: antialiased;
6 | -moz-osx-font-smoothing: grayscale;
7 | }
8 |
--------------------------------------------------------------------------------
/web/src/bus.js:
--------------------------------------------------------------------------------
1 | import Vue from 'vue'
2 | const Bus = new Vue()
3 | export default Bus
--------------------------------------------------------------------------------
/web/src/components/LangSelect/index.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 | 中 文
4 | English
5 |
6 |
7 |
8 |
33 |
--------------------------------------------------------------------------------
/web/src/components/Loading/Loading.js:
--------------------------------------------------------------------------------
1 | // plugins/loading/loading.js
2 | import Vue from 'vue'
3 | import Loading from './index.vue'
4 |
5 | const Mask = Vue.extend(Loading)
6 |
7 | const toggleLoading = (el, binding) => {
8 | if (binding.value) {
9 | Vue.nextTick(() => {
10 | // 控制loading组件显示
11 | el.instance.visible = true
12 | // 插入到目标元素
13 | insertDom(el, el, binding)
14 | })
15 | } else {
16 | el.instance.visible = false
17 | }
18 | }
19 |
20 | const insertDom = (parent, el) => {
21 | parent.appendChild(el.mask)
22 | }
23 |
24 | export default {
25 | bind: function (el, binding, vnode) {
26 | const mask = new Mask({
27 | el: document.createElement('div'),
28 | data() { }
29 | })
30 | el.instance = mask
31 | el.mask = mask.$el
32 | el.maskStyle = {}
33 | binding.value && toggleLoading(el, binding)
34 | },
35 | update: function (el, binding) {
36 | if (binding.oldValue !== binding.value) {
37 | toggleLoading(el, binding)
38 | }
39 | },
40 | unbind: function (el, binding) {
41 | el.instance && el.instance.$destroy()
42 | }
43 | }
44 |
--------------------------------------------------------------------------------
/web/src/components/Loading/index.js:
--------------------------------------------------------------------------------
1 | import loading from './Loading'
2 | export default {
3 | install(Vue) {
4 | Vue.directive('Loaded', loading)
5 | }
6 | }
--------------------------------------------------------------------------------
/web/src/components/Loading/index.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
8 |
9 |
10 |
20 |
39 |
--------------------------------------------------------------------------------
/web/src/components/SvgIcon/index.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
34 |
35 |
--------------------------------------------------------------------------------
/web/src/directives/input-filter/index.js:
--------------------------------------------------------------------------------
1 | import inputFilter from './inputFilter'
2 |
3 | const install = function (Vue) {
4 | Vue.directive('inputFilter', inputFilter)
5 | }
6 |
7 | if (window.Vue) {
8 | window.inputFilter = inputFilter
9 | Vue.use(install)
10 | }
11 |
12 | inputFilter.install = install
13 | export default inputFilter
14 |
--------------------------------------------------------------------------------
/web/src/lang/index.js:
--------------------------------------------------------------------------------
1 | import Vue from 'vue'
2 | import VueI18n from 'vue-i18n'
3 | import Cookies from 'js-cookie'
4 | import elementEnLocale from 'element-ui/lib/locale/lang/en' // element-ui lang
5 | import elementZhLocale from 'element-ui/lib/locale/lang/zh-CN'// element-ui lang
6 | import enLocale from './en'
7 | import zhLocale from './zh'
8 |
9 | Vue.use(VueI18n)
10 |
11 | const messages = {
12 | en: {
13 | ...enLocale,
14 | ...elementEnLocale
15 | },
16 | zh: {
17 | ...zhLocale,
18 | ...elementZhLocale
19 | }
20 | }
21 | export function getLanguage() {
22 | const chooseLanguage = Cookies.get('language')
23 | if (chooseLanguage) return chooseLanguage
24 |
25 | // if has not choose language
26 | const language = (navigator.language || navigator.browserLanguage).toLowerCase()
27 | const locales = Object.keys(messages)
28 | for (const locale of locales) {
29 | if (language.indexOf(locale) > -1) {
30 | return locale
31 | }
32 | }
33 | return 'en'
34 | }
35 | const i18n = new VueI18n({
36 | // set locale
37 | // options: en | zh | es
38 | locale: getLanguage(),
39 | // set locale messages
40 | messages
41 | })
42 |
43 | export default i18n
44 |
--------------------------------------------------------------------------------
/web/src/mock.js:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2014-2019 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | const Mock = require('mockjs');
17 |
18 | let dayLyData = { "code": 0, "data": { "TxDaily": [{ "Day": "2018-11-09", "NetworkId": "1", "TxCount": 11 }, { "Day": "2018-11-12", "NetworkId": "1", "TxCount": 9 }] }, "message": "Success" };
19 |
20 | Mock.mock('/api/bcosproxy/interface', (req, res) => {
21 | req.body = JSON.parse(req.body)
22 | if (req.body.Module === 'tx_dayly' && req.body.Operation === 'get_dayly') {
23 | return dayLyData;
24 | }
25 |
26 |
27 | });
28 |
--------------------------------------------------------------------------------
/web/src/store/actions.js:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2014-2019 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
--------------------------------------------------------------------------------
/web/src/store/mutations.js:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2014-2019 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
--------------------------------------------------------------------------------
/web/src/svgIcons/index.js:
--------------------------------------------------------------------------------
1 | import Vue from "vue"
2 | import SvgIcon from "@/components/SvgIcon"
3 |
4 | Vue.component("svg-icon",SvgIcon);
5 |
6 | const req = require.context("./svg",false,/\.svg$/)
7 | const requireAll = requireContext => requireContext.keys().map(requireContext)
8 | requireAll(req)
--------------------------------------------------------------------------------
/web/src/svgIcons/svg/evidence.svg:
--------------------------------------------------------------------------------
1 | 合约仓库图标
--------------------------------------------------------------------------------
/web/src/svgIcons/svg/evidenceId.svg:
--------------------------------------------------------------------------------
1 | 合约仓库图标
--------------------------------------------------------------------------------
/web/src/util/ethAbi.js:
--------------------------------------------------------------------------------
1 | import utils from "./sm_sha"
2 | let web3Abi = require("web3-eth-abi");
3 | var _ = require('underscore');
4 |
5 | let ethAbi = web3Abi;
6 | ethAbi.smEncodeFunctionSignature = function (functionName) {
7 | if (_.isObject(functionName)) {
8 | functionName = utils._jsonInterfaceMethodToString(functionName);
9 | }
10 |
11 | return "0x" + utils.sha4(functionName).slice(0, 8);
12 | }
13 | ethAbi.smEncodeEventSignature = function (functionName) {
14 | if (_.isObject(functionName)) {
15 | functionName = utils._jsonInterfaceMethodToString(functionName);
16 | }
17 |
18 | return "0x" + utils.sha4(functionName);
19 | };
20 | ethAbi.smEncodeFunctionCall = function (jsonInterface, params) {
21 | return this.smEncodeFunctionSignature(jsonInterface) + this.encodeParameters(jsonInterface.inputs, params).replace('0x', '');
22 | };
23 | module.exports = ethAbi
24 |
--------------------------------------------------------------------------------
/web/src/util/message.js:
--------------------------------------------------------------------------------
1 | /**重置message,防止重复点击重复弹出message弹框 */
2 | import { Message } from "element-ui";
3 | let messageInstance = null;
4 | let mainMessage = function DoneMessage(options) {
5 | //如果弹窗已存在先关闭
6 | if (messageInstance) {
7 | messageInstance.close();
8 | }
9 | messageInstance = Message(options);
10 | }
11 | let arr = ['success', 'warning', 'info', 'error'];
12 | arr.forEach(function (type) {
13 | mainMessage[type] = function (options) {
14 | if (typeof options === 'string') {
15 | options = {
16 | message: options
17 | };
18 | }
19 | options.type = type;
20 | return mainMessage(options);
21 | };
22 | });
23 | export const message = mainMessage;
--------------------------------------------------------------------------------
/web/src/util/sm_sha.js:
--------------------------------------------------------------------------------
1 | let web3Utils = require("web3-utils");
2 | var gm = require('./SM2Sign')
3 |
4 | let utils = web3Utils
5 | utils.sha4 = function (value) {
6 | value = new Buffer(value);
7 | var _digstData = gm.sm3Digest(value);
8 | var digstData = new Buffer(_digstData, 'hex').toString('hex');
9 | return digstData;
10 | }
11 | module.exports = utils
12 |
13 |
--------------------------------------------------------------------------------
/web/src/util/sm_utils.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Utils for SM2 and SM3 module
3 | */
4 | var utils = exports
5 | // var BN = require('bn.js');
6 | // var crypto = require('crypto');
7 |
8 | utils.strToBytes = strToBytes;
9 | // utils.hashToBN = hashToBN;
10 | // utils.random = random;
11 |
12 | function strToBytes(s) {
13 | var ch, st, re = [];
14 | for (var i = 0; i < s.length; i++ ) {
15 | ch = s.charCodeAt(i); // get char
16 | st = []; // set up "stack"
17 | do {
18 | st.push( ch & 0xFF ); // push byte to stack
19 | ch = ch >> 8; // shift value down by 1 byte
20 | }
21 | while ( ch );
22 | // add stack contents to result
23 | // done because chars have "wrong" endianness
24 | re = re.concat( st.reverse() );
25 | }
26 | return re;
27 | }
28 |
29 | // function hashToBN(hash) {
30 | // if (typeof hash == 'string') {
31 | // return new BN(hash, 16);
32 | // } else {
33 | // var hex = '';
34 | // for (var i = 0; i < hash.length; i++) {
35 | // var b = hash[i].toString(16);
36 | // if (b.length == 1) {
37 | // hex += '0';
38 | // }
39 | // hex += b;
40 | // }
41 | // return new BN(hex, 16);
42 | // }
43 | // }
44 |
45 | /**
46 | * Generate cryptographic random value.
47 | *
48 | * @param {Number} n: byte length of the generated value
49 | */
50 | // function random(n) {
51 | // return crypto.randomBytes(n).toString('hex')
52 | // }
--------------------------------------------------------------------------------
/web/src/util/url.js:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2014-2019 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | /*mgr*/
18 | // let mgr = process.env.MGR_PATH;
19 | let handle = process.env.HANDLE_PATH;
20 | export default {
21 | // ORG_LIST: `${mgr}/webase-node-mgr`,
22 | FRONT_PROXY: `${handle}/WeBASE-Front`
23 | }
24 |
--------------------------------------------------------------------------------
/web/src/views/blank/index.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
37 |
38 |
40 |
--------------------------------------------------------------------------------
/web/static/.gitkeep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WeBankBlockchain/WeBASE-Front/b8070ec961ded585572e1e7950e2408de682d2d9/web/static/.gitkeep
--------------------------------------------------------------------------------
/web/static/css/base.css:
--------------------------------------------------------------------------------
1 | @font-face {
2 | font-family: 'webfont';
3 | src: url('../font/webfont.eot'); /* IE9 */
4 | src: url('../font/webfont.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */
5 | url('../font/webfont.woff') format('woff'), /* chrome、firefox */
6 | url('../font/webfont.ttf') format('truetype'), /* chrome、firefox、opera、Safari, Android, iOS 4.2+*/
7 | url('../font/webfont.svg#webfont') format('svg'); /* iOS 4.1- */
8 | }
9 | .web-font {
10 | font-family: "webfont",Arial,sans-serif;
11 | /* font-size: 16px; */
12 | font-style: normal;
13 | -webkit-font-smoothing: antialiased;
14 | -moz-osx-font-smoothing: grayscale;
15 | }
--------------------------------------------------------------------------------
/web/static/css/reset.css:
--------------------------------------------------------------------------------
1 | *{margin: 0;padding: 0;list-style: none;}
2 |
3 |
4 | body, h1, h2, h3, h4, h5, h6, hr, p, blockquote,
5 | dl, dt, dd, ul, ol, li,
6 | pre,
7 | form, fieldset, legend, button, input, textarea,
8 | th, td {
9 | margin: 0;
10 | padding: 0;
11 | }
12 | html,body{
13 | height: 100%;
14 | }
15 | body,
16 | button, input, select, textarea /* for ie */ {
17 | font: 14px/1.5 tahoma, arial, \5b8b\4f53, sans-serif;
18 | }
19 | h1, h2, h3, h4, h5, h6 { font-size: 100%; }
20 | address, cite, dfn, em, var { font-style: normal; }
21 | code, kbd, pre, samp { font-family: courier new, courier, monospace; }
22 | small { font-size: 14px; }
23 | ul, ol { list-style: none; }
24 | a { text-decoration: none; }
25 | a:hover { text-decoration: underline; }
26 | legend { color: #000; } /* for ie6 */
27 | fieldset, img { border: 0; }
28 | button, input, select, textarea { font-size: 100%; }
29 | table { border-collapse: collapse; border-spacing: 0; }
30 | .ks-clear:after, .clear:after {
31 | content: '\20';
32 | display: block;
33 | height: 0;
34 | clear: both;
35 | }
36 | .ks-clear, .clear {
37 | *zoom: 1;
38 | }
39 |
40 |
--------------------------------------------------------------------------------
/web/static/font/webfont.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WeBankBlockchain/WeBASE-Front/b8070ec961ded585572e1e7950e2408de682d2d9/web/static/font/webfont.eot
--------------------------------------------------------------------------------
/web/static/font/webfont.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WeBankBlockchain/WeBASE-Front/b8070ec961ded585572e1e7950e2408de682d2d9/web/static/font/webfont.ttf
--------------------------------------------------------------------------------
/web/static/font/webfont.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WeBankBlockchain/WeBASE-Front/b8070ec961ded585572e1e7950e2408de682d2d9/web/static/font/webfont.woff
--------------------------------------------------------------------------------
/web/static/font/webfont.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WeBankBlockchain/WeBASE-Front/b8070ec961ded585572e1e7950e2408de682d2d9/web/static/font/webfont.woff2
--------------------------------------------------------------------------------
/web/static/image/banner.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WeBankBlockchain/WeBASE-Front/b8070ec961ded585572e1e7950e2408de682d2d9/web/static/image/banner.jpg
--------------------------------------------------------------------------------
/web/static/image/block.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WeBankBlockchain/WeBASE-Front/b8070ec961ded585572e1e7950e2408de682d2d9/web/static/image/block.png
--------------------------------------------------------------------------------
/web/static/image/logo-2 copy@1.5x.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WeBankBlockchain/WeBASE-Front/b8070ec961ded585572e1e7950e2408de682d2d9/web/static/image/logo-2 copy@1.5x.jpg
--------------------------------------------------------------------------------
/web/static/image/logo-title.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WeBankBlockchain/WeBASE-Front/b8070ec961ded585572e1e7950e2408de682d2d9/web/static/image/logo-title.png
--------------------------------------------------------------------------------
/web/static/image/logo.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WeBankBlockchain/WeBASE-Front/b8070ec961ded585572e1e7950e2408de682d2d9/web/static/image/logo.jpg
--------------------------------------------------------------------------------
/web/static/image/logo@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WeBankBlockchain/WeBASE-Front/b8070ec961ded585572e1e7950e2408de682d2d9/web/static/image/logo@2x.png
--------------------------------------------------------------------------------
/web/static/image/nodes.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WeBankBlockchain/WeBASE-Front/b8070ec961ded585572e1e7950e2408de682d2d9/web/static/image/nodes.png
--------------------------------------------------------------------------------
/web/static/image/transation.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WeBankBlockchain/WeBASE-Front/b8070ec961ded585572e1e7950e2408de682d2d9/web/static/image/transation.png
--------------------------------------------------------------------------------
/web/static/image/transationPedding.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WeBankBlockchain/WeBASE-Front/b8070ec961ded585572e1e7950e2408de682d2d9/web/static/image/transationPedding.png
--------------------------------------------------------------------------------
/web/static/image/webase_35x35.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/WeBankBlockchain/WeBASE-Front/b8070ec961ded585572e1e7950e2408de682d2d9/web/static/image/webase_35x35.png
--------------------------------------------------------------------------------
/web/static/js/base-loading.js:
--------------------------------------------------------------------------------
1 | if (window.location.hash == '#/contract') {
2 | var _PageHeight = document.documentElement.clientHeight,
3 | _PageWidth = document.documentElement.clientWidth;
4 | var _LoadingTop = _PageHeight > 61 ? (_PageHeight - 61) / 2 : 0,
5 | _LoadingLeft = _PageWidth > 215 ? (_PageWidth - 215) / 2 : 0;
6 | var _LoadingHtml = '
';
7 | document.write(_LoadingHtml);
8 | document.onreadystatechange = completeLoading;
9 | function completeLoading() {
10 | if (document.readyState == "complete") {
11 | var loadingMask = document.getElementById('loadingDiv');
12 | loadingMask.parentNode.removeChild(loadingMask);
13 | }
14 | }
15 | }
--------------------------------------------------------------------------------