Skip to content

Commit

Permalink
Merge pull request #355 from holographxyz/develop
Browse files Browse the repository at this point in the history
Feature/release develop to testnet 2024 08 26
  • Loading branch information
sogoiii authored Aug 26, 2024
2 parents fb95db9 + 341d1e3 commit 007d51b
Show file tree
Hide file tree
Showing 253 changed files with 126,374 additions and 2,464 deletions.
6 changes: 1 addition & 5 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
## Describe Changes

I made this more better by doing ...

- Change A
- Change B
-

## Checklist before requesting a review

- [ ] I have performed a self-review of my code
- [ ] Code styles have been enforced
- [ ] All Hardhat tests are passing
- [ ] All Foundry tests are passing
23 changes: 12 additions & 11 deletions .github/workflows/enforce_prettier.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,17 @@ jobs:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v2
- name: Check out Git repository
uses: actions/checkout@v3
- name: Set up Node.js
uses: actions/setup-node@v3
with:
fetch-depth: 0
ref: ${{ github.head_ref }}
# Make sure the value of GITHUB_TOKEN will not be persisted in repo's config
persist-credentials: false

- name: Prettify code
uses: creyD/[email protected]
node-version: '20.12.2'
- uses: pnpm/action-setup@v3
name: Install pnpm
with:
prettier_options: --check deploy/**/*.ts test/**/*.ts scripts/**/*.ts
dry: True
version: 8
- name: Install dependencies
run: pnpm install
- name: Prettier Check
run: pnpm prettier:check
2 changes: 1 addition & 1 deletion .github/workflows/foudry_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,4 @@ jobs:
run: forge test -vv --no-match-test "(FFI|Fork)" --no-match-contract Fork

- name: Kill the anvil nodes
run: bash scripts/stop-protocol.sh
run: bash scripts/stop-protocol.sh
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,8 @@ lib-cov
# Coverage directory used by tools like istanbul
coverage
*.lcov
lcov.info
coverage/

# nyc test coverage
.nyc_output
Expand Down
14 changes: 13 additions & 1 deletion .husky/pre-commit
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,19 @@ echo "✅ Solidity hashes precomputed.\n\n"
# ---------------------------------------------------------------------------- #

# ------------------------------ Natspec smells ------------------------------ #
# echo "👉 Checking for missing natspecs..."
# natspecSmellsOutput=$(npx @defi-wonderland/natspec-smells 2>&1)

# # Compare the trimmed output to "No issues found"
# if [ "$natspecSmellsOutput" != "No issues found" ]; then
# echo "⛔️ Missing documentation or errors have been found:"
# echo "$natspecSmellsOutput"
# exit 1
# else
# echo "✅ No missing natspecs detected.\n"
# fi

# ------------------------------- Gas snapshot ------------------------------- #
## check for env feature flag for natspec-smells. Default to true
# if [ "$SKIP_NATSPEC_SMELLS" = "true" ]; then
# echo "👉 Skipping natspec-smells check..."
Expand All @@ -50,4 +63,3 @@ echo "✅ Solidity hashes precomputed.\n\n"
# echo "👉 Checking gas snapshots..."
# npm run snapshot:check
# echo "✅ Gas snapshots are up to date.\n\n"

3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"solidity.compileUsingRemoteVersion": "v0.8.13+commit.abaa5c0e"
}
5 changes: 5 additions & 0 deletions FUNDING.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"opRetro": {
"projectId": "0x1a6ff49fed19e164fd6b39f668f391cfc7fc493906e942c74997aacee91be632"
}
}
46 changes: 22 additions & 24 deletions LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,24 +1,22 @@
# Holograph Limited Public License (H-LPL) 1.0.0

<https://holograph.xyz/licenses/h-lpl/1.0.0>

This license governs use of the accompanying software. If you use the software, you accept this license. If you do not accept the license, you are not permitted to use the software.

**1. Definitions**

The terms "_reproduce,_" "_reproduction,_" "_derivative works,_" and "_distribution_" have the same meaning here as under U.S. copyright law. A "_contribution_" is the original software, or any additions or changes to the software. A "_contributor_" is any person that distributes its contribution under this license. "_Licensed patents_" are a contributor's patent claims that read directly on its contribution.

**2. Grant of Rights**

**A)** Copyright Grant- Subject to the terms of this license, including the license conditions and limitations in sections **3** and **4**, each contributor grants you a non-exclusive, worldwide, royalty-free copyright license to reproduce its contribution, prepare derivative works of its contribution, and distribute its contribution or any derivative works that you create.
**B)** Patent Grant- Subject to the terms of this license, including the license conditions and limitations in section 3, each contributor grants you a non-exclusive, worldwide, royalty-free license under its licensed patents to make, have made, use, sell, offer for sale, import, and/or otherwise dispose of its contribution in the software or derivative works of the contribution in the software.

**3. Conditions and Limitations**

**A)** No Trademark License- This license does not grant you rights to use any contributors' name, logo, or trademarks.
**B)** If you bring a patent claim against any contributor over patents that you claim are infringed by the software, your patent license from such contributor is terminated with immediate effect.
**C)** If you distribute any portion of the software, you must retain all copyright, patent, trademark, and attribution notices that are present in the software.
**D)** If you distribute any portion of the software in source code form, you may do so only under this license by including a complete copy of this license with your distribution. If you distribute any portion of the software in compiled or object code form, you may only do so under a license that complies with this license.
**E)** The software is licensed "as-is." You bear all risks of using it. The contributors give no express warranties, guarantees, or conditions. You may have additional consumer rights under your local laws which this license cannot change. To the extent permitted under your local laws, the contributors exclude all implied warranties, including those of merchantability, fitness for a particular purpose and non-infringement.

**4. (F)** Platform Limitation- The licenses granted in sections **2.A** & **2.B** extend only to the software or derivative works that you create that run on a **Holograph system product**.
(The MIT License)

Copyright 2021-2024 Holograph

Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:

The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
39 changes: 37 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
<h1>Holograph Protocol V2</h1>
</div>


## Table of Contents

- [Description](#description)
Expand Down Expand Up @@ -347,6 +346,42 @@ Then you can run the Foundry tests with:
Please make use of the `pnpm run prettier:fix` command to format the codebase into a universal style.
## Foundry scripts
### Generate SAFE transaction json
Step to run the foundry script to generate a SAFE transaction json file.
#### Required nvironment Variables
```shell
HOLOGRAPH=
HOLOGRAPH_OPERATOR=
JOBS_BATCH_SIZE=1000
SAFE_WALLET=
```
#### 1. Run `get-job-info-from-available-operator-job.ts`
```shell
ts-node ./scripts/get-job-info-from-available-operator-job.ts --file ./incomplete-jobs.json
```
#### 2. Import the csv file generated from the indexer in the `./scripts/incomplete_jobs_processing` directory
> [!WARNING]
> The file should be structured with 4 columns: `jobHash`,`txHash`,`payload`,`chainId`
> The end of file shouln't have a new line.
> [!TIP]
> The `txHash`,`payload` columns are not used in the script, so you can just fill them with bytes32(0x00) 0x0000000000000000000000000000000000000000000000000000000000000000
#### 3. Generate safe json files
```shell
pnpm generateSafeTx
```
## Directory Structure
<pre>
Expand Down Expand Up @@ -430,4 +465,4 @@ Read through [CONTRIBUTING.md](./CONTRIBUTING.md) for a general overview of our
## License
Files under this repository are licensed under [Holograph Limited Public License](https://github.com/holographxyz/holograph-protocol/blob/testnet/LICENSE.md) (H-LPL) 1.0.0 unless otherwise stated.
All files within this repository are licensed under the [MIT License](https://github.com/holographxyz/holograph-protocol/blob/develop/LICENSE.md) unless stated otherwise.
111 changes: 111 additions & 0 deletions abi/develop/BatchMintMetadata.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
[
{
"inputs": [
{
"internalType": "uint256",
"name": "index",
"type": "uint256"
}
],
"name": "BatchMintInvalidBatchId",
"type": "error"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "tokenId",
"type": "uint256"
}
],
"name": "BatchMintInvalidTokenId",
"type": "error"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "batchId",
"type": "uint256"
}
],
"name": "BatchMintMetadataFrozen",
"type": "error"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "uint256",
"name": "_fromTokenId",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint256",
"name": "_toTokenId",
"type": "uint256"
}
],
"name": "BatchMetadataUpdate",
"type": "event"
},
{
"anonymous": false,
"inputs": [],
"name": "MetadataFrozen",
"type": "event"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"name": "batchFrozen",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "getBaseURICount",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "_index",
"type": "uint256"
}
],
"name": "getBatchIdAtIndex",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
}
]
47 changes: 47 additions & 0 deletions abi/develop/ContractMetadata.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
[
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "string",
"name": "prevURI",
"type": "string"
},
{
"indexed": false,
"internalType": "string",
"name": "newURI",
"type": "string"
}
],
"name": "ContractURIUpdated",
"type": "event"
},
{
"inputs": [],
"name": "contractURI",
"outputs": [
{
"internalType": "string",
"name": "",
"type": "string"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "string",
"name": "_uri",
"type": "string"
}
],
"name": "setContractURI",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
}
]
Loading

0 comments on commit 007d51b

Please sign in to comment.