This repository contains the necessary scripts to set up and interact with a smart contract on the Swisstronik Testnet using Hardhat.
NodeJS >= v22.0.4
- Clone the Repository:
git clone https://github.com/dante4rt/swisstronik-testnet.git
cd swisstronik-testnet
- Run the Setup Script:
./swisstronik.sh
-
Follow the Prompts:
- Choose JavaScript when prompted.
- Use the default directory (just press Enter).
- Press y to confirm any prompts.
-
Copy your Contract address ... Swisstronik contract deployed to
###
... -
Upload your .sol contract file
- Create a repository in github
- Create a new file and name it:
Hello_swtr.sol
- paste following code in it and save it
// SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.19; contract Swisstronik { string private message; constructor(string memory _message) payable { message = _message; } function setMessage(string memory _message) public { message = _message; } function getMessage() public view returns(string memory) { return message; }
Submit your Hello_swtr.sol github url
+ contract address