Skip to content

julienbrg/affix-contracts

Repository files navigation

Affix Contracts

Affix your onchain seal and let the world verify it.

Organisations, businesses and individuals can authenticate their documents using Filecoin while keeping their existing workflows intact. Anyone can then instantly verify that documents are genuine and unaltered.

Install

# Clone the repository
git clone https://github.com/julienbrg/affix-contracts.git
cd affix-contracts

# Install dependencies
bun install

# Build the project
forge build

Test

Run the basic test suite:

forge test

Deploy

In a seperated shell:

supersim fork --chains=op

Then:

forge script script/DeployAffixFactory.sol --rpc-url op --broadcast
forge script script/RegisterEntity.s.sol --rpc-url op --broadcast
forge script script/AddAgent.s.sol --rpc-url op --broadcast
forge script script/IssueDocument.s.sol --rpc-url op --broadcast
forge script script/VerifyDocument.s.sol --rpc-url op --broadcast

Deploy to OP Mainnet

1. Deploy Factory

forge script script/DeployAffixFactory.sol \
  --rpc-url optimism \
  --broadcast \
  --verify

2. Update Factory Address

After successful factory deployment, update the factory address in script/RegisterEntity.s.sol:

// Update this line with your deployed factory address
address constant AFFIX_FACTORY_ADDRESS = <NEW_FACTORY_ADDRESS>;

3. Register Entity

forge script script/RegisterEntity.s.sol \
  --rpc-url optimism \
  --broadcast \
  --verify

4. Add Agents (Optional)

forge script script/AddAgent.s.sol \
  --rpc-url optimism \
  --broadcast

5. Issue Documents

forge script script/IssueDocument.s.sol \
  --rpc-url optimism \
  --broadcast

Support

Feel free to reach out to Julien on Farcaster, Element, Status, Telegram, Twitter, Discord, or LinkedIn.

License

This project is licensed under the GNU General Public License v3.0.

built-with-ethereum-w3hc

About

Affix your digital seal and let the world verify it

Topics

Resources

License

Stars

Watchers

Forks