Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minimal EIP2535 implementation of Inventory #324

Merged
merged 31 commits into from
Aug 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
3d9b86e
Updated .gitignore
zomglings Jul 27, 2023
63000ad
Removed old IInventory and LibInventory
zomglings Jul 27, 2023
09c5e0f
Removed old `contracts/InventorFacet.sol`
zomglings Jul 27, 2023
b5ccb1c
Renamed `enginecli` -> `web3cli`
zomglings Jul 27, 2023
2664149
Moved over Inventory code from G7DAO/contracts
zomglings Jul 27, 2023
dee709f
Updated InventoryFacet comment
Jul 27, 2023
9022045
Updated core.py to contain inventory_gogogo and related functionality
Jul 27, 2023
d155ed3
Ported over InventoryFacet...
Jul 27, 2023
ae699e2
Inventory Diamond storage slot...
Jul 28, 2023
fb0323c
onlyContractSubjectOwner -> onlySubjectTokenOwner
Jul 28, 2023
5041ead
Removed requireValidItemType modifier
Jul 28, 2023
56bfa77
Removed all functionality related to subject slots
Jul 28, 2023
bfe4910
`pragma solidity ^0.8.0;`
zomglings Jul 31, 2023
56f7530
Merge branch 'inventory' of github.com:moonstream-to/web3 into inventory
zomglings Jul 31, 2023
7bc0d19
Removed slot types
zomglings Jul 31, 2023
decb662
Nonunequippable -> persistent
zomglings Jul 31, 2023
23aeaad
Removed "SlotID" field from `Slot` struct
zomglings Jul 31, 2023
7ef0128
Changed indexing on `SlotCreated` events
zomglings Jul 31, 2023
11323bc
Added `NewSlotPersistence` event
zomglings Jul 31, 2023
a693c86
`createSlot` fires `NewSlotURI`, `NewSlotPersistence`
zomglings Jul 31, 2023
c331b01
IInventory - license
zomglings Jul 31, 2023
9046a23
`ContractAddressDesignated` -> `NewSubjectAddress`
zomglings Jul 31, 2023
0c134ff
Added tests for NewSlotURI and NewSlotPersistence...
zomglings Jul 31, 2023
b355204
Factored Inventory deployment into separate...
zomglings Jul 31, 2023
fb0b3d2
Tests for `setSlotPersistent`
zomglings Jul 31, 2023
fafb329
Added test for unequipping from persistent slot
zomglings Jul 31, 2023
2a1eff2
BROWNIE_LIB=1
zomglings Jul 31, 2023
dd38fe0
Updated chainlink version in brownie-config.yaml
zomglings Jul 31, 2023
e2f90f9
Fixed two tests based on @kellan-simiotics feedback
Aug 1, 2023
f38985f
Renamed test as per @kellan-simiotics suggestion
Aug 1, 2023
5405532
Fixed (thank you @kellan-simiotics again)
Aug 1, 2023
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
72 changes: 37 additions & 35 deletions .github/workflows/chainlink.yml
Original file line number Diff line number Diff line change
@@ -1,39 +1,41 @@
name: Chainlink protocol tests

on:
pull_request:
paths:
- "cli/chainlink/**"
- "contracts/mock/MockChainlinkCoordinator.sol"
- "contracts/mock/MockLinkToken.sol"
- "contracts/mock/MockVRFUser.sol"
- ".github/workflows/chainlink.yml"
branches:
- main
pull_request:
paths:
- "cli/chainlink/**"
- "contracts/mock/MockChainlinkCoordinator.sol"
- "contracts/mock/MockLinkToken.sol"
- "contracts/mock/MockVRFUser.sol"
- ".github/workflows/chainlink.yml"
branches:
- main
jobs:
build:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: "16"
- uses: actions/setup-python@v2
with:
python-version: "3.9"
- name: Install ganache
run: npm install -g ganache-cli
- name: Upgrade pip
env:
BROWNIE_LIB: 1
run: pip install -U pip
- name: Install additional dev dependencies
run: |
pip install black moonworm
- name: Install dependencies for CLI
working-directory: cli/
run: |
pip install -e .
- name: Run tests
working-directory: cli/
run: bash test.sh chainlink.test_chainlink
build:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: "16"
- uses: actions/setup-python@v2
with:
python-version: "3.9"
- name: Install ganache
run: npm install -g ganache-cli
- name: Upgrade pip
env:
BROWNIE_LIB: 1
run: pip install -U pip
- name: Install additional dev dependencies
run: |
pip install black moonworm
- name: Install dependencies for CLI
working-directory: cli/
env:
BROWNIE_LIB: 1
run: |
pip install -e .
- name: Run tests
working-directory: cli/
run: bash test.sh chainlink.test_chainlink
78 changes: 40 additions & 38 deletions .github/workflows/crafting.yml
Original file line number Diff line number Diff line change
@@ -1,42 +1,44 @@
name: Crafting system tests

on:
pull_request:
paths:
- "contracts/crafting/**"
- "contracts/mock/**"
- "cli/enginecli/test_crafting.py"
- "cli/enginecli/CraftingFacet.py"
- "cli/enginecli/Mock*.py"
- "cli/enginecli/Diamond*"
- "cli/enginecli/OwnershipFacet.py"
- ".github/workflows/crafting.yml"
branches:
- main
pull_request:
paths:
- "contracts/crafting/**"
- "contracts/mock/**"
- "cli/web3cli/test_crafting.py"
- "cli/web3cli/CraftingFacet.py"
- "cli/web3cli/Mock*.py"
- "cli/web3cli/Diamond*"
- "cli/web3cli/OwnershipFacet.py"
- ".github/workflows/crafting.yml"
branches:
- main
jobs:
build:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: "16"
- uses: actions/setup-python@v2
with:
python-version: "3.9"
- name: Install ganache
run: npm install -g ganache-cli
- name: Upgrade pip
env:
BROWNIE_LIB: 1
run: pip install -U pip
- name: Install additional dev dependencies
run: |
pip install black moonworm
- name: Install dependencies for CLI
working-directory: cli/
run: |
pip install -e .
- name: Run tests
working-directory: cli/
run: bash test.sh enginecli.test_crafting
build:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: "16"
- uses: actions/setup-python@v2
with:
python-version: "3.9"
- name: Install ganache
run: npm install -g ganache-cli
- name: Upgrade pip
env:
BROWNIE_LIB: 1
run: pip install -U pip
- name: Install additional dev dependencies
run: |
pip install black moonworm
- name: Install dependencies for CLI
working-directory: cli/
env:
BROWNIE_LIB: 1
run: |
pip install -e .
- name: Run tests
working-directory: cli/
run: bash test.sh web3cli.test_crafting
74 changes: 38 additions & 36 deletions .github/workflows/dropper.yml
Original file line number Diff line number Diff line change
@@ -1,40 +1,42 @@
name: Dropper system tests

on:
pull_request:
paths:
- "contracts/Dropper.sol"
- "contracts/mock/**"
- "cli/enginecli/test_dropper.py"
- "cli/enginecli/Dropper.py"
- "cli/enginecli/Mock*.py"
- ".github/workflows/dropper.yml"
branches:
- main
pull_request:
paths:
- "contracts/Dropper.sol"
- "contracts/mock/**"
- "cli/web3cli/test_dropper.py"
- "cli/web3cli/Dropper.py"
- "cli/web3cli/Mock*.py"
- ".github/workflows/dropper.yml"
branches:
- main
jobs:
build:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: "16"
- uses: actions/setup-python@v2
with:
python-version: "3.9"
- name: Install ganache
run: npm install -g ganache-cli
- name: Upgrade pip
env:
BROWNIE_LIB: 1
run: pip install -U pip
- name: Install additional dev dependencies
run: |
pip install black moonworm
- name: Install dependencies for CLI
working-directory: cli/
run: |
pip install -e .
- name: Run tests
working-directory: cli/
run: bash test.sh enginecli.test_dropper
build:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: "16"
- uses: actions/setup-python@v2
with:
python-version: "3.9"
- name: Install ganache
run: npm install -g ganache-cli
- name: Upgrade pip
env:
BROWNIE_LIB: 1
run: pip install -U pip
- name: Install additional dev dependencies
run: |
pip install black moonworm
- name: Install dependencies for CLI
working-directory: cli/
env:
BROWNIE_LIB: 1
run: |
pip install -e .
- name: Run tests
working-directory: cli/
run: bash test.sh web3cli.test_dropper
78 changes: 40 additions & 38 deletions .github/workflows/gofp.yml
Original file line number Diff line number Diff line change
@@ -1,42 +1,44 @@
name: Garden of Forking Paths system tests

on:
pull_request:
paths:
- "contracts/mechanics/garden-of-forking-paths/**"
- "contracts/mock/**"
- "cli/enginecli/test_gofp.py"
- "cli/enginecli/GOFPFacet.py"
- "cli/enginecli/Mock*.py"
- "cli/enginecli/Diamond*"
- "cli/enginecli/OwnershipFacet.py"
- ".github/workflows/gofp.yml"
branches:
- main
pull_request:
paths:
- "contracts/mechanics/garden-of-forking-paths/**"
- "contracts/mock/**"
- "cli/web3cli/test_gofp.py"
- "cli/web3cli/GOFPFacet.py"
- "cli/web3cli/Mock*.py"
- "cli/web3cli/Diamond*"
- "cli/web3cli/OwnershipFacet.py"
- ".github/workflows/gofp.yml"
branches:
- main
jobs:
build:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: "16"
- uses: actions/setup-python@v2
with:
python-version: "3.9"
- name: Install ganache
run: npm install -g ganache-cli
- name: Upgrade pip
env:
BROWNIE_LIB: 1
run: pip install -U pip
- name: Install additional dev dependencies
run: |
pip install black moonworm
- name: Install dependencies for CLI
working-directory: cli/
run: |
pip install -e .
- name: Run tests
working-directory: cli/
run: bash test.sh enginecli.test_gofp
build:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: "16"
- uses: actions/setup-python@v2
with:
python-version: "3.9"
- name: Install ganache
run: npm install -g ganache-cli
- name: Upgrade pip
env:
BROWNIE_LIB: 1
run: pip install -U pip
- name: Install additional dev dependencies
run: |
pip install black moonworm
- name: Install dependencies for CLI
working-directory: cli/
env:
BROWNIE_LIB: 1
run: |
pip install -e .
- name: Run tests
working-directory: cli/
run: bash test.sh web3cli.test_gofp
43 changes: 43 additions & 0 deletions .github/workflows/inventory.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Inventory system tests

on:
pull_request:
paths:
- "contracts/inventory/**"
- "contracts/mock/**"
- "cli/web3cli/test_inventory.py"
- "cli/web3cli/InventoryFacet.py"
- "cli/web3cli/IInventory.py"
- "cli/web3cli/inventory_events.py"
- ".github/workflows/inventory.yml"
branches:
- main
jobs:
build:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: "16"
- uses: actions/setup-python@v2
with:
python-version: "3.9"
- name: Install ganache
run: npm install -g ganache-cli
- name: Upgrade pip
env:
BROWNIE_LIB: 1
run: pip install -U pip
- name: Install additional dev dependencies
run: |
pip install black moonworm
- name: Install dependencies for CLI
working-directory: cli/
env:
BROWNIE_LIB: 1
run: |
pip install -e .
- name: Run tests
working-directory: cli/
run: bash test.sh web3cli.test_inventory
Loading