On this page
Contract Quickstart
Deploy your first smart contract to the Brixs Testnet! This guide covers writing, compiling, and deploying a basic Solidity contract to our enhanced EVM layer.
Step-by-Step Deployment
1. Write the Contract
Create a new file named HelloWorld.sol. This contract demonstrates basic state manipulation.
pragma solidity ^0.8.19;
contract HelloWorld {
string public message = "Hello, Brixs Network!";
address public owner;
constructor() {
owner = msg.sender;
}
function updateMessage(string memory newMessage) public {
require(msg.sender == owner, "Only owner can update");
message = newMessage;
}
}
2. Compile & Deploy
Use the native brx CLI to compile and deploy in one seamless command.
brx smart-contract deploy ./HelloWorld.sol --network testnet --private-key $PRIVATE_KEY
Success!
You will receive a transaction hash and the deployed contract address in your terminal. You can view this on the Brixs Explorer.
Interacting with the Contract
Phase 1: Engine Initialization
The first phase requires a comprehensive setup of the execution environment. The Brixs Native EVM initializes the state and establishes secure connections with the P2P network. This ensures that when the DPoS Sequencer begins proposing blocks, there are no bottlenecks in transaction ingestion.
Transactions are ordered securely by the Encrypted Mempool to prevent MEV. The Native EVM processes transactions while the ZK-SNARK Prover Engine generates validity proofs. Once processed, the Sequencer commits the block to the Ethereum L1, achieving Rollup Finality and inheriting Ethereum's cryptographic security.