Skip to content

unioncredit/union-referral

Repository files navigation

UNION-Referral

test codecov

UNION Referral is a smart contract suite designed to boost the UNION community through a robust referral system. It streamlines community growth by seamlessly integrating access control, referral tracking, and member registration processes.

Install

To install dependencies:

git clone https://github.com/unioncredit/union-referral.git && cd union-referral
yarn install

Test & Run

To install Foundry (assuming a Linux or macOS System):

curl -L https://foundry.paradigm.xyz | bash

This will download foundryup. To start Foundry, run:

foundryup

To install dependencies:

forge install

To run tests:

forge test

The following modifiers are also available:

  • Level 2 (-vv): Logs emitted during tests are also displayed.
  • Level 3 (-vvv): Stack traces for failing tests are also displayed.
  • Level 4 (-vvvv): Stack traces for all tests are displayed, and setup traces for failing tests are displayed.
  • Level 5 (-vvvvv): Stack traces and setup traces are always displayed.

To profile gas usage:

forge test --gas-report
forge snapshot

Deploy

forge create --rpc-url <your_rpc_url> \
    --constructor-args <arg1> <arg2> ... \
    --private-key <your_private_key> \
    --etherscan-api-key <your_etherscan_api_key> \
    --verify \
    src/ContractName.sol:ContractName

Verify Contracts

forge verify-contract --chain <chain_name> \
    --etherscan-api-key <your_etherscan_api_key> \
    --constructor-args $(cast abi-encode "constructor(arg_type1, arg_type2, ...)" <arg1> <arg2> ... ) \
    <deployed_address> \
    src/ContractName.sol:ContractName

Deployed

Optimism:

Optimism-Goerli:

Base-Sepolia:

Base:

About

A smart contract suite designed to boost the UNION community through a robust referral system.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors