This repository is used to store test code, test the features of different versions of the solidity language features on XDC.
- Testing
block.blobbasefee
: global function, retrieve the blob base fee of the current block.
- Testing
blobhash(uint)
: global function, retrieving versioned hashes of blobs, akin to the homonymous Yul builtin. - Testing
blobbasefee()
: Yul builtin, retrieve the blob base fee of the current block. - Testing
blobhash()
: Yul builtin, retrieve the versioned hashes of blobs associated with the transaction. - Testing
mcopy()
: Yul builtin, cheaply copy data between memory areas. - Testing
tload()
andtstore()
: Yul builtin, load and store data from transient storage.
- Code Generator: Use
MCOPY
instead ofMLOAD/MSTORE
loop when copying byte arrays. - EVM: Set default EVM version to
cancun
. - Yul Analyzer: Emit transient storage warning only for the first occurrence of
tstore
.
- Introduce a new overload
require(bool, Error)
that allows usage ofrequire
functions with custom errors. This feature is available in the via-ir pipeline only.
- Make require(bool, Error) available when using the legacy pipeline.
- Yul: Parsing rules for source location comments have been relaxed: Whitespace between the location components as well as single-quoted code snippets are now allowed.
- if support transient storage state variables of value types.
Before starting, please ensure that your development environment meets the following requirements:
- Node.js: version 12.x or higher.
- npm: used to manage project dependencies.
-
Clone the repository
git clone [email protected]:JukLee0ira/solidityTesting.git cd solidityTesting
-
Install dependencies
Use npm to install the project dependencies:
npm install
-
Configure environment variables
Create a
.env
file in the project root directory and configure it according to the following example:PRIVATE_KEY=your private key RPC_URL=your RPC URL
Note: Please ensure that your private key and RPC URL are valid, and do not publicly expose your private key.
-
Compile contracts
Run the following command in the project root directory to compile the contracts:
npx hardhat compile
-
Run tests
Choose your test network and use the following command to run the tests:
npx hardhat test --network <your testnet>
now you should see the test results of each feature