Testing Framework
Initialize Development Environment
Ask Claude:
Initialize a new Zetrix smart contract development environmentClaude will:
Use
zetrix_contract_init_dev_environmentCreate folder structure:
contracts/- Main contract source filescontracts/library/- Reusable modulescontracts/specs/- Test specificationstest/- Integration testsscripts/- Build, merge, deployment scripts.env- Configuration file
TEST_INVOKE Function
Execute transactions and validate results:
TEST_INVOKE(
"Test description",
contractAddress,
txInitiator,
{
method: "methodName",
params: {
param1: "value1",
param2: "value2"
}
},
TEST_RESULT.SUCCESS // or TEST_RESULT.FAILED
);Example:
TEST_QUERY Function
Query contract state and validate:
Example:
Last updated