Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions .github/workflows/Echidna.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Echidna Fuzzer
on: pull_request

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Setup node LTS
uses: actions/setup-node@v3
with:
node-version: 14.18.2

- name: Install packages
run: |
cp .env.dev .env
npm install
- name: Compile contracts
run: npx hardhat compile

- name: Run Echidna
uses: crytic/echidna-action@v2
with:
solc-version: 0.8.16
files: .
contract: LearnToEarn
test-mode: exploration
crytic-args: --hardhat-ignore-compile
6 changes: 4 additions & 2 deletions .github/workflows/SlitherAnalyzer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,13 @@ jobs:
analyze:
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write
steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Setup node LTS
uses: actions/setup-node@v3
with:
Expand All @@ -26,9 +27,10 @@ jobs:
npm install

- name: Run Slither
uses: crytic/slither-action@v0.2.0
uses: crytic/slither-action@v0.3.0
id: slither
with:
node-version: 16
sarif: results.sarif
fail-on: none

Expand Down
235 changes: 235 additions & 0 deletions .openzeppelin/goerli.json
Original file line number Diff line number Diff line change
Expand Up @@ -2408,6 +2408,241 @@
}
}
}
},
"8564a9bc3d42b1604cd9ed8bfef0ddc8cc8b2ee693b88d00c9eb61147d10b2d6": {
"address": "0x3BC749cbcF5C6130D47978c52dAfeb566edC47EC",
"txHash": "0xa7c5644c36781daa0f2ae654c3019cb8ef0c822632f86d7ec1118b484b63ee56",
"layout": {
"storage": [
{
"label": "_initialized",
"offset": 0,
"slot": "0",
"type": "t_uint8",
"contract": "Initializable",
"src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:62",
"retypedFrom": "bool"
},
{
"label": "_initializing",
"offset": 1,
"slot": "0",
"type": "t_bool",
"contract": "Initializable",
"src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:67"
},
{
"label": "_status",
"offset": 0,
"slot": "1",
"type": "t_uint256",
"contract": "ReentrancyGuardUpgradeable",
"src": "@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol:38"
},
{
"label": "__gap",
"offset": 0,
"slot": "2",
"type": "t_array(t_uint256)49_storage",
"contract": "ReentrancyGuardUpgradeable",
"src": "@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol:74"
},
{
"label": "__gap",
"offset": 0,
"slot": "51",
"type": "t_array(t_uint256)50_storage",
"contract": "ContextUpgradeable",
"src": "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol:36"
},
{
"label": "_owner",
"offset": 0,
"slot": "101",
"type": "t_address",
"contract": "OwnableUpgradeable",
"src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:22"
},
{
"label": "__gap",
"offset": 0,
"slot": "102",
"type": "t_array(t_uint256)49_storage",
"contract": "OwnableUpgradeable",
"src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:94"
},
{
"label": "courseData",
"offset": 0,
"slot": "151",
"type": "t_mapping(t_bytes32,t_struct(Course)5371_storage)",
"contract": "LearnToEarn",
"src": "contracts/LearnToEarn.sol:17"
},
{
"label": "learnerData",
"offset": 0,
"slot": "152",
"type": "t_mapping(t_bytes32,t_mapping(t_address,t_struct(Learner)5381_storage))",
"contract": "LearnToEarn",
"src": "contracts/LearnToEarn.sol:20"
}
],
"types": {
"t_address": {
"label": "address",
"numberOfBytes": "20"
},
"t_array(t_uint256)49_storage": {
"label": "uint256[49]",
"numberOfBytes": "1568"
},
"t_array(t_uint256)50_storage": {
"label": "uint256[50]",
"numberOfBytes": "1600"
},
"t_array(t_uint256)dyn_storage": {
"label": "uint256[]",
"numberOfBytes": "32"
},
"t_bool": {
"label": "bool",
"numberOfBytes": "1"
},
"t_bytes32": {
"label": "bytes32",
"numberOfBytes": "32"
},
"t_mapping(t_address,t_struct(Learner)5381_storage)": {
"label": "mapping(address => struct Learner)",
"numberOfBytes": "32"
},
"t_mapping(t_bytes32,t_mapping(t_address,t_struct(Learner)5381_storage))": {
"label": "mapping(bytes32 => mapping(address => struct Learner))",
"numberOfBytes": "32"
},
"t_mapping(t_bytes32,t_struct(Course)5371_storage)": {
"label": "mapping(bytes32 => struct Course)",
"numberOfBytes": "32"
},
"t_struct(Course)5371_storage": {
"label": "struct Course",
"members": [
{
"label": "creator",
"type": "t_address",
"offset": 0,
"slot": "0"
},
{
"label": "rewardAddress",
"type": "t_address",
"offset": 0,
"slot": "1"
},
{
"label": "budget",
"type": "t_uint256",
"offset": 0,
"slot": "2"
},
{
"label": "budgetAvailable",
"type": "t_uint256",
"offset": 0,
"slot": "3"
},
{
"label": "bonus",
"type": "t_uint256",
"offset": 0,
"slot": "4"
},
{
"label": "totalLearnersClaimedBonus",
"type": "t_uint256",
"offset": 0,
"slot": "5"
},
{
"label": "timeCreated",
"type": "t_uint256",
"offset": 0,
"slot": "6"
},
{
"label": "timeEndBonus",
"type": "t_uint256",
"offset": 0,
"slot": "7"
},
{
"label": "timeRemoved",
"type": "t_uint256",
"offset": 0,
"slot": "8"
},
{
"label": "isBonusToken",
"type": "t_bool",
"offset": 0,
"slot": "9"
},
{
"label": "canMintNFT",
"type": "t_bool",
"offset": 1,
"slot": "9"
},
{
"label": "isUsingDuration",
"type": "t_bool",
"offset": 2,
"slot": "9"
}
],
"numberOfBytes": "320"
},
"t_struct(Learner)5381_storage": {
"label": "struct Learner",
"members": [
{
"label": "timeStarted",
"type": "t_uint256",
"offset": 0,
"slot": "0"
},
{
"label": "timeCompleted",
"type": "t_uint256",
"offset": 0,
"slot": "1"
},
{
"label": "timeRewarded",
"type": "t_uint256",
"offset": 0,
"slot": "2"
},
{
"label": "nftIds",
"type": "t_array(t_uint256)dyn_storage",
"offset": 0,
"slot": "3"
}
],
"numberOfBytes": "128"
},
"t_uint256": {
"label": "uint256",
"numberOfBytes": "32"
},
"t_uint8": {
"label": "uint8",
"numberOfBytes": "1"
}
}
}
}
}
}
Loading