Fe (experimental)¶
Experimental
Fe is a research language whose syntax and compiler change between releases. PQWERAI treats it as experimental until compiler maturity, stable tooling and a security review gate pass. Do not deploy value-bearing Fe contracts.
| Compiler | Fe 26.5.1 (149c758); Windows exe SHA-256 7fe5339c…85d5f |
| Output | out/<Contract>.bin, .runtime.bin, .abi.json |
| Status | 🧪 Counter compiles, deploys and runs on chain 77240 (CLI). No events in the example. |
Example¶
Counter.fe
// Starter counter (Fe 26.5.1, EXPERIMENTAL). Unaudited example.
use std::abi::sol
msg CounterMsg {
#[selector = sol("increment()")]
Increment,
#[selector = sol("get()")]
Get -> u256,
}
struct CounterStore {
value: u256,
}
pub contract Counter {
mut store: CounterStore
init() uses (mut store) {
store.value = 0
}
recv CounterMsg {
Increment uses (mut store) {
store.value = store.value + 1
}
Get -> u256 uses (store) {
store.value
}
}
}
Build and deploy¶
fe build --standalone Counter.fe # writes out/Counter.bin, out/Counter.runtime.bin, out/Counter.abi.json
TX=$(cast send --async --keystore "$KEYSTORE" --password-file "$PASSWORD_FILE" --rpc-url "$RPC" --create "0x$(cat out/Counter.bin)")
cast receipt "$TX" contractAddress --rpc-url "$RPC"
Measured: 99 runtime bytes, 77,010 deployment gas, 43,304 gas for increment().
Caveats¶
- Language semantics may change in the next release; pin the compiler and keep the exact version with your sources.
- Few auditors and analysis tools support Fe.
- The ABI JSON comes from the compiler's
msgselectors; check it against the selectors you expect.
Sources at 72057fe3ec: developers/examples/languages/Counter.fe · architecture/MULTILANGUAGE_CONTRACTS.md
Found a problem? Report a documentation issue · Build testnet-rc1+72057fe3ec