Project Requirements
Project Properties#
Add Contract Proto File#
Ensure to add a contract proto file in the contract directory of your project. This allows aelf’s contract patcher to process the DLL, enabling necessary injections for code checks during deployment. Without this, deployment will fail.
1src2├── Protobuf3│ └── contract4│ └── hello_world_contract.proto
Enable Overflow Checks#
Enable CheckForOverflowUnderflow for both Release and Debug modes. This ensures arithmetic operations that overflow will throw an OverflowException, preventing unpredictable results.
1<PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">2<CheckForOverflowUnderflow>true</CheckForOverflowUnderflow>3</PropertyGroup>45<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">6<CheckForOverflowUnderflow>true</CheckForOverflowUnderflow>7</PropertyGroup>
If your contract has unchecked arithmetic operations, deployment will fail.
Edited on: 15 July 2024 03:28:48 GMT+0