Ch 1: Making the Kernel
Defining the kernel
// SPDX-License-Identifier: MIT License
pragma solidity ^0.8.13;
contract Walnut {
suint256 kernel; // The shielded kernel (number inside the Walnut)
event Shake(address indexed player);
// Constructor to initialize the kernel
// Note: use uint256 here, not suint256 — constructor calldata is not
// encrypted (CREATE/CREATE2 does not use Seismic transactions), so
// shielded constructor parameters would leak their values.
constructor(uint256 _kernel) {
kernel = suint256(_kernel);
}
}Last updated

