Skip to content

Commit

Permalink
feat:add comments to enhance code readability
Browse files Browse the repository at this point in the history
  • Loading branch information
David20240718 committed Jun 27, 2024
1 parent 1b650b1 commit 9ab3a99
Show file tree
Hide file tree
Showing 40 changed files with 54 additions and 48 deletions.
2 changes: 2 additions & 0 deletions .bettercodehub.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# Depth of components to analyze (2 levels deep)
component_depth: 2

# Programming languages to analyze
languages:
- csharp
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -312,4 +312,4 @@ tools
.idea/.idea.AElf/.idea/projectSettingsUpdater.xml
.idea/.idea.AElf/.idea/vcs.xml
.idea/.idea.AElf/.idea/workspace.xml
.idea/.idea.AElf/riderModule.iml
.idea/.idea.AElf/riderModule.iml
2 changes: 1 addition & 1 deletion .readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ sphinx:
# Optionally build your docs in additional formats such as PDF and ePub
formats: all

# Optionally set the version of Python and requirements required to build your docs
# Optionally set the version of python and requirements required to build your docs
python:
version: 3.7
install:
Expand Down
3 changes: 2 additions & 1 deletion AElf.ContractTools.targets
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@
</PropertyGroup>
</Otherwise>
</Choose>


<!-- Generate protobuf code before building and getting the target path -->
<Target Name="GenerateProtobufCode" BeforeTargets="BeforeBuild;GetTargetPath">
<PropertyGroup>
<LocalProtobufDir>$(ProjectDir)/Protobuf</LocalProtobufDir>
Expand Down
3 changes: 1 addition & 2 deletions AElf.Contracts.sln
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@

Microsoft Visual Studio Solution File, Format Version 12.00
Microsoft Visual Studio Solution File, Format Version 12.00
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "contract", "contract", "{651F0F6E-86CF-42D2-9110-5F3EAE5704F0}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{26990847-E0A2-4FCC-8C71-267CA77557CD}"
Expand Down
29 changes: 16 additions & 13 deletions AElf.sln.DotSettings
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:s="clr-namespace:System;assembly=mscorlib"
xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml"
xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
<s:Boolean x:Key="/Default/CodeEditing/SuppressNullableWarningFix/Enabled/@EntryValue">False</s:Boolean>
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=JS/@EntryIndexedValue">JS</s:String>
<s:Boolean x:Key="/Default/UserDictionary/Words/=aelf/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=appsettings/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=blockchain/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=Blockchains/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=DPOS/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=grpc/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=hangfire/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=Merkle/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=pubkey/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=Ssdb/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=Xunit/@EntryIndexedValue">True</s:Boolean></wpf:ResourceDictionary>
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=JS/@EntryIndexedValue">JS</s:String>
<s:Boolean x:Key="/Default/UserDictionary/Words/=aelf/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=appsettings/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=blockchain/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=Blockchains/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=DPOS/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=grpc/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=hangfire/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=Merkle/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=pubkey/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=Ssdb/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=Xunit/@EntryIndexedValue">True</s:Boolean></wpf:ResourceDictionary>
1 change: 1 addition & 0 deletions CodeCoverage.runsettings
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- This XML defines run settings for code coverage. -->
<!-- File name extension must be .runsettings -->
<RunSettings>
<DataCollectionRunSettings>
Expand Down
1 change: 1 addition & 0 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# appveyor configuration file
version: 1.0.0.{build}
skip_tags: true
os: Windows Server 2012 R2
Expand Down
1 change: 1 addition & 0 deletions azure-myget-publish.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# Azure DevOps pipeline configuration for publishing NuGet packages to MyGet
pool:
vmImage: ubuntu-latest
pr: none
Expand Down
2 changes: 1 addition & 1 deletion azure-pipelines.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# File: azure-pipelines.yml
# Azure Pipelines configuration file
jobs:
- template: templates/build-template-window.yml
parameters:
Expand Down
1 change: 0 additions & 1 deletion build.cake
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,6 @@ Task("Test-with-Codecov")
actions.Add(action);
}


var options = new ParallelOptions {
MaxDegreeOfParallelism = 1,
//CancellationToken = cancellationToken
Expand Down
2 changes: 1 addition & 1 deletion build.config
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/usr/bin/env bash
CAKE_VERSION=0.37.0
DOTNET_VERSION=6.0.300
DOTNET_VERSION=6.0.300
1 change: 1 addition & 0 deletions build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ $PSScriptRoot = Split-Path $MyInvocation.MyCommand.Path -Parent

[string] $CakeVersion = ''
[string] $DotNetVersion= ''

foreach($line in Get-Content (Join-Path $PSScriptRoot 'build.config'))
{
if ($line -like 'CAKE_VERSION=*') {
Expand Down
2 changes: 1 addition & 1 deletion build.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/usr/bin/env bash
# Define varibles
# Define variables
SCRIPT_DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
source $SCRIPT_DIR/build.config
TOOLS_DIR=$SCRIPT_DIR/tools
Expand Down
2 changes: 1 addition & 1 deletion common.props
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@
<None Include="../../LICENSE" Pack="true" PackagePath=""/>
</ItemGroup>

</Project>
</Project>
1 change: 0 additions & 1 deletion docker/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,3 @@ services:
- 8001:8000
volumes:
- /opt:/opt

1 change: 0 additions & 1 deletion docker/start-cli.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,3 @@
BIND_VOLUME='-v /opt:/opt'
CONFIGURE_PATH='-w /opt/aelf-node'
docker run -it --rm $BIND_VOLUME $CONFIGURE_PATH aelf/node

2 changes: 1 addition & 1 deletion docker/start-node.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
PUBLISH_PORT='-p 6800:6800 -p 8000:8000'
BIND_VOLUME='-v /opt:/opt'
CONfIGURE_PATH='/opt/aelf-node'
docker run -itd $PUBLISH_PORT $BIND_VOLUME -w $CONfIGURE_PATH aelf/node dotnet /app/AElf.Launcher.dll --config.path $CONfIGURE_PATH
docker run -itd $PUBLISH_PORT $BIND_VOLUME -w $CONfIGURE_PATH aelf/node dotnet /app/AElf.Launcher.dll --config.path $CONfIGURE_PATH
2 changes: 1 addition & 1 deletion docs-sphinx/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -78,4 +78,4 @@ Welcome to AElf's official documentation!

tutorials/cross-chain/running-side-chain
tutorials/__run-node
getting-started/smart-contract-development/developing-smart-contracts/index
getting-started/smart-contract-development/developing-smart-contracts/index
2 changes: 1 addition & 1 deletion docs/main-structure.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,4 +88,4 @@
* [Google cloud](resources/cloud/gcp/GCP.md)
* [Browser Extension](resources/browser-extension.md)
* [Joining AElf's testnet](resources/testnet.md)
* [Running a side chain](tutorials/cross-chain/running-side-chain.md)
* [Running a side chain](tutorials/cross-chain/running-side-chain.md)
2 changes: 1 addition & 1 deletion scripts/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ dotnet build /clp:ErrorsOnly /p:GeneratePackageOnBuild=false -v quiet "AElf.All.
if [[ $? -ne 0 ]] ; then
echo "Build failed."
exit 1
fi
fi
2 changes: 1 addition & 1 deletion scripts/deploy_docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ docker build -t aelf/node:${TAG} ~/aelf/.
docker tag aelf/node:${TAG} aelf/node:latest
docker login -u="$DOCKER_USERNAME" -p="$DOCKER_PASSWORD"
docker push aelf/node:${TAG}
docker push aelf/node:latest
docker push aelf/node:latest
2 changes: 1 addition & 1 deletion scripts/deploy_myget.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,4 @@ do
fi
done
cd ../
done
done
2 changes: 1 addition & 1 deletion scripts/deploy_myget_daily.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,4 @@ do
fi
done
cd ../
done
done
2 changes: 1 addition & 1 deletion scripts/deploy_nuget.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,4 @@ do
fi
done
cd ../
done
done
2 changes: 1 addition & 1 deletion scripts/download_binary.bat
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ if not exist "%scriptdir%contract_csharp_plugin.exe" (
)
echo "unzip file: %file%"
unzip %scriptdir%%filename% -d %scriptdir%
)
)
2 changes: 1 addition & 1 deletion scripts/download_binary.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,4 @@ if [[ ! -f ${plugin} ]]; then

# Unzip
unzip -o ${filename} -d "${scriptdir}"
fi
fi
2 changes: 1 addition & 1 deletion scripts/generate_contract_base.bat
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ protoc --proto_path=../../protobuf ^
--contract_opt=%2,nocontract ^
--contract_out=./Protobuf/Generated ^
--plugin=protoc-gen-contract="%scriptdir%contract_csharp_plugin.exe" ^
%1
%1
2 changes: 1 addition & 1 deletion scripts/generate_contract_base.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ protoc --proto_path=${solutiondir}/protobuf \
--contract_opt="$2",nocontract \
--contract_out=./Protobuf/Generated \
--plugin=protoc-gen-contract=${plugin} \
$1
$1
2 changes: 1 addition & 1 deletion scripts/generate_contract_code.bat
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ protoc --proto_path=../../protobuf ^
--csharp_opt=file_extension=.g.cs ^
--contract_out=./Protobuf/Generated ^
--plugin=protoc-gen-contract="%scriptdir%contract_csharp_plugin.exe" ^
%*
%*
2 changes: 1 addition & 1 deletion scripts/generate_contract_code.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ protoc --proto_path=${solutiondir}/protobuf \
--csharp_opt=file_extension=.g.cs \
--contract_out=./Protobuf/Generated \
--plugin=protoc-gen-contract=${plugin} \
$@
$@
2 changes: 1 addition & 1 deletion scripts/generate_contract_reference.bat
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ protoc --proto_path=../../protobuf ^
--contract_opt=reference ^
--contract_out=internal_access:./Protobuf/Generated ^
--plugin=protoc-gen-contract="%scriptdir%contract_csharp_plugin.exe" ^
%*
%*
2 changes: 1 addition & 1 deletion scripts/generate_contract_reference.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ protoc --proto_path=${solutiondir}/protobuf \
--contract_opt=reference \
--contract_out=internal_access:./Protobuf/Generated \
--plugin=protoc-gen-contract="${plugin}" \
$@
$@
2 changes: 1 addition & 1 deletion scripts/generate_contract_stub.bat
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ protoc --proto_path=../../protobuf ^
--contract_opt=internal_access ^
--contract_out=./Protobuf/Generated ^
--plugin=protoc-gen-contract="%scriptdir%contract_csharp_plugin.exe" ^
%*
%*
2 changes: 1 addition & 1 deletion scripts/generate_contract_stub.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ protoc --proto_path=${solutiondir}/protobuf \
--contract_opt=internal_access \
--contract_out=${destdir} \
--plugin=protoc-gen-contract="${plugin}" \
$@
$@
2 changes: 1 addition & 1 deletion scripts/generate_event_only.bat
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ protoc --proto_path=../../protobuf ^
--contract_opt=nocontract ^
--contract_out=internal_access:./Protobuf/Generated ^
--plugin=protoc-gen-contract="%scriptdir%contract_csharp_plugin.exe" ^
%*
%*
2 changes: 1 addition & 1 deletion scripts/generate_event_only.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ protoc --proto_path=${solutiondir}/protobuf \
--contract_opt=nocontract \
--contract_out=internal_access:./Protobuf/Generated \
--plugin=protoc-gen-contract=${plugin} \
$@
$@
2 changes: 1 addition & 1 deletion scripts/install_protobuf.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,4 @@ elif [[ ${osn} == "linux" ]]; then
# Optional: change owner
sudo chown ${USER} /usr/local/bin/protoc
sudo chown -R ${USER} /usr/local/include/google
fi
fi
2 changes: 1 addition & 1 deletion scripts/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@ for i in *Tests ; do

echo "Test Run Successful."

done
done
2 changes: 1 addition & 1 deletion scripts/upload_coverage.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@

curl -s https://codecov.io/bash > codecov
chmod +x codecov
./codecov -f "../test/results/coverage.opencover.xml" -t $1
./codecov -f "../test/results/coverage.opencover.xml" -t $1

0 comments on commit 9ab3a99

Please sign in to comment.