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

Adds API support for Dropper v0.2.0 #275

Merged
merged 42 commits into from
Apr 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
4d7a49c
settings.py cleanup
zomglings Mar 29, 2023
9989f52
Little more cleanup in settings.py
zomglings Mar 29, 2023
a310791
Moved alembic/ directory into api/
zomglings Mar 29, 2023
59b2f3e
Extracted ABIs
zomglings Mar 29, 2023
7700055
Moved alembic related files into api/
zomglings Mar 29, 2023
035d1b5
Fixed AWS_DEFAULT_REGION stuff
zomglings Mar 29, 2023
d226ff3
Added CLI command to sign message hex bytes
zomglings Apr 5, 2023
3ddb903
Black formatting
zomglings Apr 5, 2023
7d39d29
Database schema update (and alembic migration)
zomglings Apr 5, 2023
60b4e33
Create and lookup registered contracts from CLI
zomglings Apr 5, 2023
7d7fb60
Added "engineapi contracts delete" command
zomglings Apr 5, 2023
f63e21d
Downgraded alembic migration
zomglings Apr 5, 2023
0e291b6
First API endpoint
zomglings Apr 5, 2023
82f6969
POST endpoint for contract registration
zomglings Apr 5, 2023
6f6cb1d
repr errors
zomglings Apr 5, 2023
bc88b71
All routes for managing registered contracts
zomglings Apr 5, 2023
b8e8562
Added /contracts/types endpoint
zomglings Apr 5, 2023
baea055
Docstrings on API
zomglings Apr 5, 2023
8728b07
whitelisted docs pages
zomglings Apr 5, 2023
7bbbfb4
Removed unused imports
zomglings Apr 5, 2023
89916f0
isort on new files
zomglings Apr 5, 2023
ace275c
isort on models.py
zomglings Apr 5, 2023
8ece45e
Removed copilot comment
zomglings Apr 6, 2023
f9c8899
Updated call_requests model
zomglings Apr 6, 2023
255e4f3
Module rename: registered_contracts -> contracts
zomglings Apr 6, 2023
ff40826
There was a collision before between contracts/ and contracts.py
zomglings Apr 6, 2023
c0221ba
Fixed contracts_actions import in cli.py
zomglings Apr 6, 2023
508d831
Added request_calls and CLI command to add call requests to DB
zomglings Apr 6, 2023
2b94530
Changed call_specs structure
zomglings Apr 6, 2023
aba9c85
Added "engineapi engine-db contracts requests" command
zomglings Apr 6, 2023
7de70b8
Added TODO for call request deletion
zomglings Apr 6, 2023
87bb710
Created endpoints to list and add call requests to the /contracts API
zomglings Apr 6, 2023
46b70b0
Bumped engineapi version to 0.0.4
zomglings Apr 6, 2023
c784648
TODO in models
zomglings Apr 6, 2023
a9f2346
First batch of fixes from @kompotkot review
zomglings Apr 10, 2023
8ce02ab
More fixes
zomglings Apr 10, 2023
df32b50
POSTing requests now returns number of requests added
zomglings Apr 10, 2023
52729df
Constrained web3 to <6
zomglings Apr 10, 2023
d6f414e
Pinned eip712 version to 0.1.0
zomglings Apr 10, 2023
b73f0d9
Added TODO for contract_type validation
zomglings Apr 10, 2023
7d20da8
ENGINE_DEV=1 no longer bypasses ENGINE_DB_URI_READ_ONLY check
zomglings Apr 10, 2023
195715f
Added TODO for deletion of call_requests
zomglings Apr 10, 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
351 changes: 351 additions & 0 deletions abi/CraftingFacet.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,351 @@
[
{
"inputs": [
{
"components": [
{
"components": [
{
"internalType": "uint256",
"name": "tokenType",
"type": "uint256"
},
{
"internalType": "address",
"name": "tokenAddress",
"type": "address"
},
{
"internalType": "uint256",
"name": "tokenId",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "amount",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "tokenAction",
"type": "uint256"
}
],
"internalType": "struct CraftingInputItem[]",
"name": "inputs",
"type": "tuple[]"
},
{
"components": [
{
"internalType": "uint256",
"name": "tokenType",
"type": "uint256"
},
{
"internalType": "address",
"name": "tokenAddress",
"type": "address"
},
{
"internalType": "uint256",
"name": "tokenId",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "amount",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "tokenAction",
"type": "uint256"
}
],
"internalType": "struct CraftingOutputItem[]",
"name": "outputs",
"type": "tuple[]"
},
{
"internalType": "bool",
"name": "isActive",
"type": "bool"
}
],
"internalType": "struct Recipe",
"name": "recipe",
"type": "tuple"
}
],
"name": "addRecipe",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "recipeId",
"type": "uint256"
}
],
"name": "craft",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "recipeId",
"type": "uint256"
}
],
"name": "getRecipe",
"outputs": [
{
"components": [
{
"components": [
{
"internalType": "uint256",
"name": "tokenType",
"type": "uint256"
},
{
"internalType": "address",
"name": "tokenAddress",
"type": "address"
},
{
"internalType": "uint256",
"name": "tokenId",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "amount",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "tokenAction",
"type": "uint256"
}
],
"internalType": "struct CraftingInputItem[]",
"name": "inputs",
"type": "tuple[]"
},
{
"components": [
{
"internalType": "uint256",
"name": "tokenType",
"type": "uint256"
},
{
"internalType": "address",
"name": "tokenAddress",
"type": "address"
},
{
"internalType": "uint256",
"name": "tokenId",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "amount",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "tokenAction",
"type": "uint256"
}
],
"internalType": "struct CraftingOutputItem[]",
"name": "outputs",
"type": "tuple[]"
},
{
"internalType": "bool",
"name": "isActive",
"type": "bool"
}
],
"internalType": "struct Recipe",
"name": "",
"type": "tuple"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "numRecipes",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "",
"type": "address"
},
{
"internalType": "address",
"name": "",
"type": "address"
},
{
"internalType": "uint256[]",
"name": "",
"type": "uint256[]"
},
{
"internalType": "uint256[]",
"name": "",
"type": "uint256[]"
},
{
"internalType": "bytes",
"name": "",
"type": "bytes"
}
],
"name": "onERC1155BatchReceived",
"outputs": [
{
"internalType": "bytes4",
"name": "",
"type": "bytes4"
}
],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "",
"type": "address"
},
{
"internalType": "address",
"name": "",
"type": "address"
},
{
"internalType": "uint256",
"name": "",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "",
"type": "uint256"
},
{
"internalType": "bytes",
"name": "",
"type": "bytes"
}
],
"name": "onERC1155Received",
"outputs": [
{
"internalType": "bytes4",
"name": "",
"type": "bytes4"
}
],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "",
"type": "address"
},
{
"internalType": "address",
"name": "",
"type": "address"
},
{
"internalType": "uint256",
"name": "",
"type": "uint256"
},
{
"internalType": "bytes",
"name": "",
"type": "bytes"
}
],
"name": "onERC721Received",
"outputs": [
{
"internalType": "bytes4",
"name": "",
"type": "bytes4"
}
],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "terminusAddress",
"type": "address"
},
{
"internalType": "uint256",
"name": "tokenId",
"type": "uint256"
}
],
"name": "setTerminusAuth",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes4",
"name": "interfaceId",
"type": "bytes4"
}
],
"name": "supportsInterface",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "view",
"type": "function"
}
]
26 changes: 26 additions & 0 deletions abi/Diamond.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
[
{
"inputs": [
{
"internalType": "address",
"name": "_contractOwner",
"type": "address"
},
{
"internalType": "address",
"name": "_diamondCutFacet",
"type": "address"
}
],
"stateMutability": "payable",
"type": "constructor"
},
{
"stateMutability": "payable",
"type": "fallback"
},
{
"stateMutability": "payable",
"type": "receive"
}
]
Loading