UNPKG

@river-build/generated

Version:

## How to generate contract types

266 lines 7.05 kB
{ "compiler": { "version": "0.8.24+commit.e11b9ed9" }, "language": "Solidity", "output": { "abi": [ { "inputs": [], "type": "error", "name": "TownsPoints__CheckInPeriodNotPassed" }, { "inputs": [], "type": "error", "name": "TownsPoints__InvalidArrayLength" }, { "inputs": [], "type": "error", "name": "TownsPoints__InvalidCallData" }, { "inputs": [], "type": "error", "name": "TownsPoints__InvalidSpace" }, { "inputs": [ { "internalType": "address", "name": "user", "type": "address", "indexed": true }, { "internalType": "uint256", "name": "points", "type": "uint256", "indexed": false }, { "internalType": "uint256", "name": "streak", "type": "uint256", "indexed": false }, { "internalType": "uint256", "name": "lastCheckIn", "type": "uint256", "indexed": false } ], "type": "event", "name": "CheckedIn", "anonymous": false }, { "inputs": [ { "internalType": "bytes", "name": "data", "type": "bytes" } ], "stateMutability": "nonpayable", "type": "function", "name": "batchMintPoints" }, { "inputs": [], "stateMutability": "nonpayable", "type": "function", "name": "checkIn" }, { "inputs": [ { "internalType": "address", "name": "user", "type": "address" } ], "stateMutability": "view", "type": "function", "name": "getCurrentStreak", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ] }, { "inputs": [ { "internalType": "address", "name": "user", "type": "address" } ], "stateMutability": "view", "type": "function", "name": "getLastCheckIn", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ] }, { "inputs": [ { "internalType": "enum ITownsPointsBase.Action", "name": "action", "type": "uint8" }, { "internalType": "bytes", "name": "data", "type": "bytes" } ], "stateMutability": "view", "type": "function", "name": "getPoints", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ] }, { "inputs": [ { "internalType": "address", "name": "to", "type": "address" }, { "internalType": "uint256", "name": "value", "type": "uint256" } ], "stateMutability": "nonpayable", "type": "function", "name": "mint" } ], "devdoc": { "kind": "dev", "methods": { "batchMintPoints(bytes)": { "details": "Only callable by the owner", "params": { "data": "The abi-encoded array of addresses and values to mint" } }, "checkIn()": { "details": "Users must wait at least 24 hours between check-insIf a user checks in within 48 hours of their last check-in, their streak continuesOtherwise, their streak resets to 1" }, "getCurrentStreak(address)": { "params": { "user": "The address of the user to query" }, "returns": { "_0": "The current streak count for the user" } }, "getLastCheckIn(address)": { "params": { "user": "The address of the user to query" }, "returns": { "_0": "The timestamp of the user's last check-in, 0 if never checked in" } }, "getPoints(uint8,bytes)": { "params": { "action": "The action to get the points from", "data": "The data of the action" } }, "mint(address,uint256)": { "details": "Only spaces can mint points", "params": { "to": "The address to mint the points to", "value": "The amount of points to mint" } } }, "version": 1 }, "userdoc": { "kind": "user", "methods": { "batchMintPoints(bytes)": { "notice": "Batch mint points to multiple users" }, "checkIn()": { "notice": "Allows a user to check in and earn points based on their streak" }, "getCurrentStreak(address)": { "notice": "Gets the current check-in streak for a user" }, "getLastCheckIn(address)": { "notice": "Gets the timestamp of the user's last check-in" }, "getPoints(uint8,bytes)": { "notice": "Get the points from an eligible action" }, "mint(address,uint256)": { "notice": "Mint points to a user" } }, "version": 1 } }, "settings": { "remappings": [ "@openzeppelin/=node_modules/@openzeppelin/", "@openzeppelin/contracts/=node_modules/@openzeppelin/contracts/", "@prb/math/=node_modules/@prb/math/src/", "@prb/test/=node_modules/@prb/test/src/", "@river-build/diamond/=node_modules/@river-build/diamond/", "@solidity/=node_modules/crypto-lib/src/", "account-abstraction/=node_modules/account-abstraction/contracts/", "crypto-lib/=node_modules/crypto-lib/src/", "ds-test/=node_modules/ds-test/src/", "forge-std/=node_modules/forge-std/src/", "hardhat-deploy/=node_modules/hardhat-deploy/", "solady/=node_modules/solady/src/" ], "optimizer": { "enabled": true, "runs": 200 }, "metadata": { "bytecodeHash": "none", "appendCBOR": false }, "compilationTarget": { "contracts/src/airdrop/points/ITownsPoints.sol": "ITownsPoints" }, "evmVersion": "paris", "libraries": {} }, "sources": { "contracts/src/airdrop/points/ITownsPoints.sol": { "keccak256": "0x74efd98d20c068690c7ab7d1cb9da3b479d5b6e8cd77f6a15397dc00bf7cffe3", "urls": [ "bzz-raw://3347da71749d97cc762da41e39426f9f29360a56ed4c2a4958181ef95ff7cff4", "dweb:/ipfs/QmaYFT3Vov6K4H64hQefiEzuzTGrcU4yBXiPFSCagdAukE" ], "license": "MIT" } }, "version": 1 }