Skip to the content.

Netlify Status

A Warrant Canary Smart Contract with Enclosed Funds

This project is a warrant canary contract, which allows users of the contract to passively inform a broad audience that a certain event has happened by not updating the a timestamp in the contract. Additionally, a user can enclose funds in the contract which can be moved by a predefined third party to their own wallet after expiration of the warrant canary. In this configuration the contract acts like a dead man’s switch. It is written in solidity, so it runs on Ethereum or any EVM compatible chain.

A user can do several different interactions:

A trusted third party can:

The general audience can:

The owner of the contract can:

Website

The scroll testnet website can be reached by: https://warrantcanary-testnet.haurog.xyz/ or https://warrantcanary-testnet.netlify.app/

The scroll mainnet website can be reached by: https://warrantcanary-scroll-mainnet.haurog.xyz/ or https://warrantcanary-scroll.netlify.app/

https://user-images.githubusercontent.com/36535774/143702192-58e3da3f-898c-4b6f-a4e5-dc094dee31ba.mp4

Design Patterns Decisions

Avoiding Attack Vectors and Bugs

Deployed Address

Directory Structure

Run Tests Locally

This repository has been migrated from truffle to hardhat on the October 27th 2023. This means that the directory structure, tests and deployment are in a bit of a mixed state of truffle and hardhat style.

Deployment

This repository uses frame.sh to connect to a hardware wallet to do the deployment. The chain to deploy needs to be also selected in the header of the deploy script: scripts/deploy.js

To scroll sepolia testnet:

npx hardhat run --network scrollSepolia scripts/deploy.js --verbose

To scroll mainnet:

npx hardhat run --network scrollMainnet scripts/deploy.js --verbose

Verify: Verification is done by hand. First flatten the contract by running

npx hardhat flatten > Flattened.sol

Then go to the scroll explorer and the contract address and verify manually: Example scroll Sepolia testnet: https://sepolia.scrollscan.com/address/0xdefd37cfe93f8b50ec4332bdacdaf4eadfc78be3 Example Scroll Mainnet: https://scrollscan.com/address/0xdefd37cfe93f8b50ec4332bdacdaf4eadfc78be3

Possible Improvements and Known Issues