Skip to content

Commit

Permalink
add haskeys module
Browse files Browse the repository at this point in the history
  • Loading branch information
dhvanipa committed Jan 30, 2024
1 parent fb7a674 commit 3252144
Show file tree
Hide file tree
Showing 49 changed files with 4,344 additions and 3,832 deletions.
7 changes: 7 additions & 0 deletions packages/cli/src/utils/deploy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import IBaseWorldData from "@latticexyz/world/abi/IBaseWorld.sol/IBaseWorld.json
import CoreModuleData from "@latticexyz/world/abi/CoreModule.sol/CoreModule.json" assert { type: "json" };
import KeysWithValueModuleData from "@latticexyz/world/abi/KeysWithValueModule.sol/KeysWithValueModule.json" assert { type: "json" };
import KeysInTableModuleData from "@latticexyz/world/abi/KeysInTableModule.sol/KeysInTableModule.json" assert { type: "json" };
import HasKeysModuleData from "@latticexyz/world/abi/HasKeysModule.sol/HasKeysModule.json" assert { type: "json" };
import UniqueEntityModuleData from "@latticexyz/world/abi/UniqueEntityModule.sol/UniqueEntityModule.json" assert { type: "json" };
import { tableIdToHex } from "@latticexyz/common";
import { abiTypesToSchema, schemaToHex } from "@latticexyz/protocol-parser";
Expand Down Expand Up @@ -124,6 +125,12 @@ export async function deploy(
disableTxWait,
"KeysInTableModule"
),
HasKeysModule: deployContract(
HasKeysModuleData.abi,
HasKeysModuleData.bytecode,
disableTxWait,
"HasKeysModule"
),
UniqueEntityModule: deployContract(
UniqueEntityModuleData.abi,
UniqueEntityModuleData.bytecode,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,118 +1,118 @@
[
{
"type": "function",
"name": "grantAccess",
"inputs": [
{
"name": "resourceSelector",
"type": "bytes32",
"internalType": "bytes32"
},
{
"name": "grantee",
"type": "address",
"internalType": "address"
}
],
"outputs": [],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "revokeAccess",
"inputs": [
{
"name": "resourceSelector",
"type": "bytes32",
"internalType": "bytes32"
},
{
"name": "grantee",
"type": "address",
"internalType": "address"
}
],
"outputs": [],
"stateMutability": "nonpayable"
},
{
"type": "error",
"name": "AccessDenied",
"inputs": [
{
"internalType": "string",
"name": "resource",
"type": "string",
"internalType": "string"
"type": "string"
},
{
"internalType": "address",
"name": "caller",
"type": "address",
"internalType": "address"
"type": "address"
}
]
],
"name": "AccessDenied",
"type": "error"
},
{
"type": "error",
"name": "PackedCounter_InvalidLength",
"inputs": [
{
"internalType": "uint256",
"name": "length",
"type": "uint256",
"internalType": "uint256"
"type": "uint256"
}
]
],
"name": "PackedCounter_InvalidLength",
"type": "error"
},
{
"type": "error",
"name": "SchemaLib_InvalidLength",
"inputs": [
{
"internalType": "uint256",
"name": "length",
"type": "uint256",
"internalType": "uint256"
"type": "uint256"
}
]
],
"name": "SchemaLib_InvalidLength",
"type": "error"
},
{
"type": "error",
"inputs": [],
"name": "SchemaLib_StaticTypeAfterDynamicType",
"inputs": []
"type": "error"
},
{
"type": "error",
"name": "Slice_OutOfBounds",
"inputs": [
{
"internalType": "bytes",
"name": "data",
"type": "bytes",
"internalType": "bytes"
"type": "bytes"
},
{
"internalType": "uint256",
"name": "start",
"type": "uint256",
"internalType": "uint256"
"type": "uint256"
},
{
"internalType": "uint256",
"name": "end",
"type": "uint256",
"internalType": "uint256"
"type": "uint256"
}
]
],
"name": "Slice_OutOfBounds",
"type": "error"
},
{
"type": "error",
"name": "StoreCore_InvalidDataLength",
"inputs": [
{
"internalType": "uint256",
"name": "expected",
"type": "uint256",
"internalType": "uint256"
"type": "uint256"
},
{
"internalType": "uint256",
"name": "received",
"type": "uint256",
"internalType": "uint256"
"type": "uint256"
}
],
"name": "StoreCore_InvalidDataLength",
"type": "error"
},
{
"inputs": [
{
"internalType": "bytes32",
"name": "resourceSelector",
"type": "bytes32"
},
{
"internalType": "address",
"name": "grantee",
"type": "address"
}
]
],
"name": "grantAccess",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes32",
"name": "resourceSelector",
"type": "bytes32"
},
{
"internalType": "address",
"name": "grantee",
"type": "address"
}
],
"name": "revokeAccess",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
}
]
Loading

0 comments on commit 3252144

Please sign in to comment.