Smart Contracts Overview

Overview

5xFaction is powered by a suite of smart contracts deployed on Arbitrum Sepolia testnet.


Contract Architecture

spinner

Contracts Overview

Contract
Purpose
Key Functions

FiveFaction

Core game logic

joinClan, stakeInk, withdrawInk, clearCanvas

MockUSDC

Test ERC20 token

mint, approve, transfer

MockDeFi

Simulated yield

deposit, withdraw, balanceOf


Key Functions

FiveFaction

Function
Description
Phase

joinClan(clan)

Join one of 5 factions

Deposit

stakeInk(amount)

Deposit USDC to back faction

Deposit

withdrawInk(amount)

Withdraw staked USDC

Any

clearCanvas()

End epoch, start new one

Post-Epoch

getAllClanTVLs()

Get TVL for all factions

View

getAllScores()

Get current scores

View

getWarriorInfo(addr)

Get user's stake info

View

MockUSDC

Function
Description

mint(to, amount)

Create test tokens

approve(spender, amount)

Approve contract spending

balanceOf(addr)

Check balance


Read More

Last updated