This project demonstrates deploying a Swisstronik contract and upgrading it using Hardhat and OpenZeppelin's upgrades plugin. It includes scripts to set and get messages from the deployed contract using Swisstronik's shielded transactions.
- Node.js (v14.x or later)
- npm (v6.x or later)
- Clone the repository:
git clone https://github.com/phat-kafi/swisstronik-deploy-proxy.git
cd swisstronik-deploy-proxy- Run the setup script:
chmod +x proxy.sh && ./proxy.shThe proxy.sh script performs the following actions:
- Downloads and executes
loader.shandlogo.sh. - Updates and upgrades the system packages.
- Installs necessary npm packages.
- Creates a new Hardhat project.
- Configures Hardhat with a
.envfile containing your private key. - Sets up the Hardhat configuration to work with Swisstronik testnet.
- Creates the
Hello_swtr.solcontract. - Compiles the contract.
- Creates deployment and interaction scripts (
deploy.js,setMessage.js,getMessage.js). - Deploys the contract.
- Runs the scripts to set and get the message.A