-
Notifications
You must be signed in to change notification settings - Fork 45
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* config: periphery repo ABI generation * feat: add all SPG fns & events * config: add es2015 for promise in tsconfig * feat: new generated wagmi binding * feat: SPG resource * fix(test): basic single SPG test case * fix: remove test only * fix: imports and types * feat: SPG resource unit test * fix: optional params in create collection * fix: change fn & type name * feat: add all pil type tests * refactor: spg to nft client * fix: nft client test * lint: fix
- Loading branch information
Showing
14 changed files
with
738 additions
and
79 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,8 @@ | ||
[submodule "packages/core-sdk/protocol-contracts"] | ||
path = packages/core-sdk/protocol-contracts | ||
[submodule "packages/core-sdk/protocol-periphery-contracts"] | ||
path = packages/core-sdk/protocol-periphery-contracts | ||
url = https://github.com/storyprotocol/protocol-periphery-v1 | ||
branch = release-v1.x.x | ||
[submodule "packages/core-sdk/protocol-core-contracts"] | ||
path = packages/core-sdk/protocol-core-contracts | ||
url = https://github.com/storyprotocol/protocol-core-v1 | ||
branch = main | ||
branch = release-v1.x.x |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,31 @@ | ||
.PHONY: compile_contracts | ||
|
||
compile_contracts: | ||
git submodule add -b main --force https://github.com/storyprotocol/protocol-core-v1 packages/core-sdk/protocol-contracts | ||
rm -rf packages/core-sdk/src/abi/json/tmp | ||
|
||
git submodule add -b release-v1.x.x --force https://github.com/storyprotocol/protocol-core-v1 packages/core-sdk/protocol-core-contracts | ||
git submodule add -b release-v1.x.x --force https://github.com/storyprotocol/protocol-periphery-v1 packages/core-sdk/protocol-periphery-contracts | ||
git submodule update --remote --merge | ||
cd packages/core-sdk/protocol-contracts && yarn install | ||
|
||
solc @erc6551/=node_modules/erc6551/ --pretty-json --base-path packages/core-sdk/protocol-contracts --include-path packages/core-sdk/protocol-contracts/node_modules/ --abi packages/core-sdk/protocol-contracts/contracts/IPAccountImpl.sol -o packages/core-sdk/src/abi/json/tmp/IPAccountImpl | ||
solc @erc6551/=node_modules/erc6551/ --pretty-json --base-path packages/core-sdk/protocol-contracts --include-path packages/core-sdk/protocol-contracts/node_modules/ --abi packages/core-sdk/protocol-contracts/contracts/access/AccessController.sol -o packages/core-sdk/src/abi/json/tmp/AccessController | ||
solc @erc6551/=node_modules/erc6551/ --pretty-json --base-path packages/core-sdk/protocol-contracts --include-path packages/core-sdk/protocol-contracts/node_modules/ --abi packages/core-sdk/protocol-contracts/contracts/modules/dispute/DisputeModule.sol -o packages/core-sdk/src/abi/json/tmp/DisputeModule | ||
solc @erc6551/=node_modules/erc6551/ --pretty-json --base-path packages/core-sdk/protocol-contracts --include-path packages/core-sdk/protocol-contracts/node_modules/ --abi packages/core-sdk/protocol-contracts/contracts/modules/licensing/LicensingModule.sol -o packages/core-sdk/src/abi/json/tmp/LicensingModule | ||
solc @erc6551/=node_modules/erc6551/ --pretty-json --base-path packages/core-sdk/protocol-contracts --include-path packages/core-sdk/protocol-contracts/node_modules/ --abi packages/core-sdk/protocol-contracts/contracts/modules/royalty/policies/IpRoyaltyVault.sol -o packages/core-sdk/src/abi/json/tmp/Royalty | ||
solc @erc6551/=node_modules/erc6551/ --pretty-json --base-path packages/core-sdk/protocol-contracts --include-path packages/core-sdk/protocol-contracts/node_modules/ --abi packages/core-sdk/protocol-contracts/contracts/interfaces/registries/IIPAssetRegistry.sol -o packages/core-sdk/src/abi/json/tmp/IIPAssetRegistry | ||
solc @erc6551/=node_modules/erc6551/ --pretty-json --base-path packages/core-sdk/protocol-contracts --include-path packages/core-sdk/protocol-contracts/node_modules/ --abi packages/core-sdk/protocol-contracts/contracts/registries/LicenseRegistry.sol -o packages/core-sdk/src/abi/json/tmp/LicenseRegistry | ||
solc @erc6551/=node_modules/erc6551/ --pretty-json --base-path packages/core-sdk/protocol-contracts --include-path packages/core-sdk/protocol-contracts/node_modules/ --abi packages/core-sdk/protocol-contracts/contracts/registries/IPAssetRegistry.sol -o packages/core-sdk/src/abi/json/tmp/IPAssetRegistry | ||
solc @erc6551/=node_modules/erc6551/ --pretty-json --base-path packages/core-sdk/protocol-contracts --include-path packages/core-sdk/protocol-contracts/node_modules/ --abi packages/core-sdk/protocol-contracts/contracts/modules/licensing/PILicenseTemplate.sol -o packages/core-sdk/src/abi/json/tmp/PILicenseTemplate | ||
solc @erc6551/=node_modules/erc6551/ --pretty-json --base-path packages/core-sdk/protocol-contracts --include-path packages/core-sdk/protocol-contracts/node_modules/ --abi packages/core-sdk/protocol-contracts/contracts/lib/Errors.sol -o packages/core-sdk/src/abi/json/tmp/Errors | ||
cd packages/core-sdk/protocol-core-contracts && yarn install | ||
|
||
solc @erc6551/=node_modules/erc6551/ --pretty-json --base-path packages/core-sdk/protocol-core-contracts --include-path packages/core-sdk/protocol-core-contracts/node_modules/ --abi packages/core-sdk/protocol-core-contracts/contracts/IPAccountImpl.sol -o packages/core-sdk/src/abi/json/tmp/IPAccountImpl | ||
solc @erc6551/=node_modules/erc6551/ --pretty-json --base-path packages/core-sdk/protocol-core-contracts --include-path packages/core-sdk/protocol-core-contracts/node_modules/ --abi packages/core-sdk/protocol-core-contracts/contracts/access/AccessController.sol -o packages/core-sdk/src/abi/json/tmp/AccessController | ||
solc @erc6551/=node_modules/erc6551/ --pretty-json --base-path packages/core-sdk/protocol-core-contracts --include-path packages/core-sdk/protocol-core-contracts/node_modules/ --abi packages/core-sdk/protocol-core-contracts/contracts/modules/dispute/DisputeModule.sol -o packages/core-sdk/src/abi/json/tmp/DisputeModule | ||
solc @erc6551/=node_modules/erc6551/ --pretty-json --base-path packages/core-sdk/protocol-core-contracts --include-path packages/core-sdk/protocol-core-contracts/node_modules/ --abi packages/core-sdk/protocol-core-contracts/contracts/modules/licensing/LicensingModule.sol -o packages/core-sdk/src/abi/json/tmp/LicensingModule | ||
solc @erc6551/=node_modules/erc6551/ --pretty-json --base-path packages/core-sdk/protocol-core-contracts --include-path packages/core-sdk/protocol-core-contracts/node_modules/ --abi packages/core-sdk/protocol-core-contracts/contracts/modules/royalty/policies/IpRoyaltyVault.sol -o packages/core-sdk/src/abi/json/tmp/Royalty | ||
solc @erc6551/=node_modules/erc6551/ --pretty-json --base-path packages/core-sdk/protocol-core-contracts --include-path packages/core-sdk/protocol-core-contracts/node_modules/ --abi packages/core-sdk/protocol-core-contracts/contracts/interfaces/registries/IIPAssetRegistry.sol -o packages/core-sdk/src/abi/json/tmp/IIPAssetRegistry | ||
solc @erc6551/=node_modules/erc6551/ --pretty-json --base-path packages/core-sdk/protocol-core-contracts --include-path packages/core-sdk/protocol-core-contracts/node_modules/ --abi packages/core-sdk/protocol-core-contracts/contracts/registries/LicenseRegistry.sol -o packages/core-sdk/src/abi/json/tmp/LicenseRegistry | ||
solc @erc6551/=node_modules/erc6551/ --pretty-json --base-path packages/core-sdk/protocol-core-contracts --include-path packages/core-sdk/protocol-core-contracts/node_modules/ --abi packages/core-sdk/protocol-core-contracts/contracts/registries/IPAssetRegistry.sol -o packages/core-sdk/src/abi/json/tmp/IPAssetRegistry | ||
solc @erc6551/=node_modules/erc6551/ --pretty-json --base-path packages/core-sdk/protocol-core-contracts --include-path packages/core-sdk/protocol-core-contracts/node_modules/ --abi packages/core-sdk/protocol-core-contracts/contracts/modules/licensing/PILicenseTemplate.sol -o packages/core-sdk/src/abi/json/tmp/PILicenseTemplate | ||
solc @erc6551/=node_modules/erc6551/ --pretty-json --base-path packages/core-sdk/protocol-core-contracts --include-path packages/core-sdk/protocol-core-contracts/node_modules/ --abi packages/core-sdk/protocol-core-contracts/contracts/lib/Errors.sol -o packages/core-sdk/src/abi/json/tmp/Errors | ||
cp packages/core-sdk/src/abi/json/tmp/Errors/Errors.abi packages/core-sdk/src/abi/json/Errors.json | ||
|
||
echo 'export default '"$$(jq '.' packages/core-sdk/src/abi/json/Errors.json)"' as const;' > packages/core-sdk/src/abi/json/Errors.abi.ts | ||
echo 'export default '"$$(jq --argjson entities "$$(jq -c '.' packages/core-sdk/src/abi/sdkEntities.json)" 'map(select(.name as $$name | $$entities | if type == "array" then index($$name) else false end))' packages/core-sdk/src/abi/json/tmp/IPAccountImpl/IPAccountImpl.abi)"' as const;' > packages/core-sdk/src/abi/json/IPAccountImpl.abi.ts | ||
echo 'export default '"$$(jq --argjson entities "$$(jq -c '.' packages/core-sdk/src/abi/sdkEntities.json)" 'map(select(.name as $$name | $$entities | if type == "array" then index($$name) else false end))' packages/core-sdk/src/abi/json/tmp/DisputeModule/DisputeModule.abi)"' as const;' > packages/core-sdk/src/abi/json/DisputeModule.abi.ts | ||
echo 'export default '"$$(jq --argjson entities "$$(jq -c '.' packages/core-sdk/src/abi/sdkEntities.json)" 'map(select(.name as $$name | $$entities | if type == "array" then index($$name) else false end))' packages/core-sdk/src/abi/json/tmp/LicensingModule/LicensingModule.abi)"' as const;' > packages/core-sdk/src/abi/json/LicensingModule.abi.ts | ||
echo 'export default '"$$(jq --argjson entities "$$(jq -c '.' packages/core-sdk/src/abi/sdkEntities.json)" 'map(select(.name as $$name | $$entities | if type == "array" then index($$name) else false end))' packages/core-sdk/src/abi/json/tmp/Royalty/IpRoyaltyVault.abi)"' as const;' > packages/core-sdk/src/abi/json/IpRoyaltyVault.abi.ts | ||
echo 'export default '"$$(jq --argjson entities "$$(jq -c '.' packages/core-sdk/src/abi/sdkEntities.json)" 'map(select(.name as $$name | $$entities | if type == "array" then index($$name) else false end))' packages/core-sdk/src/abi/json/tmp/Royalty/IRoyaltyPolicyLAP.abi)"' as const;' > packages/core-sdk/src/abi/json/IRoyaltyPolicyLAP.abi.ts | ||
echo 'export default '"$$(jq --argjson entities "$$(jq -c '.' packages/core-sdk/src/abi/sdkEntities.json)" 'map(select(.name as $$name | $$entities | if type == "array" then index($$name) else false end))' packages/core-sdk/src/abi/json/tmp/LicensingModule/IRoyaltyModule.abi)"' as const;' > packages/core-sdk/src/abi/json/IRoyaltyModule.abi.ts | ||
echo 'export default '"$$(jq --argjson entities "$$(jq -c '.' packages/core-sdk/src/abi/sdkEntities.json)" 'map(select(.name as $$name | $$entities | if type == "array" then index($$name) else false end))' packages/core-sdk/src/abi/json/tmp/IPAssetRegistry/IIPAssetRegistry.abi)"' as const;' > packages/core-sdk/src/abi/json/IIPAssetRegistry.abi.ts | ||
echo 'export default '"$$(jq --argjson entities "$$(jq -c '.' packages/core-sdk/src/abi/sdkEntities.json)" 'map(select(.name as $$name | $$entities | if type == "array" then index($$name) else false end))' packages/core-sdk/src/abi/json/tmp/LicenseRegistry/LicenseRegistry.abi)"' as const;' > packages/core-sdk/src/abi/json/LicenseRegistry.abi.ts | ||
echo 'export default '"$$(jq --argjson entities "$$(jq -c '.' packages/core-sdk/src/abi/sdkEntities.json)" 'map(select(.name as $$name | $$entities | if type == "array" then index($$name) else false end))' packages/core-sdk/src/abi/json/tmp/PILicenseTemplate/IPILicenseTemplate.abi)"' as const;' > packages/core-sdk/src/abi/json/IPILicenseTemplate.abi.ts | ||
echo 'export default '"$$(jq --argjson entities "$$(jq -c '.' packages/core-sdk/src/abi/sdkEntities.json)" 'map(select(.name as $$name | $$entities | if type == "array" then index($$name) else false end))' packages/core-sdk/src/abi/json/tmp/LicensingModule/LicensingModule.abi)"' as const;' > packages/core-sdk/src/abi/json/LicensingModule.abi.ts | ||
echo 'export default '"$$(jq --argjson entities "$$(jq -c '.' packages/core-sdk/src/abi/sdkEntities.json)" 'map(select(.name as $$name | $$entities | if type == "array" then index($$name) else false end))' packages/core-sdk/src/abi/json/tmp/LicensingModule/ILicenseToken.abi)"' as const;' > packages/core-sdk/src/abi/json/ILicenseToken.abi.ts | ||
cd packages/core-sdk/protocol-periphery-contracts && yarn install | ||
|
||
solc @storyprotocol/core/=node_modules/@story-protocol/protocol-core/contracts/ --pretty-json --base-path packages/core-sdk/protocol-periphery-contracts --include-path packages/core-sdk/protocol-periphery-contracts/node_modules/ --abi packages/core-sdk/protocol-periphery-contracts/contracts/StoryProtocolGateway.sol -o packages/core-sdk/src/abi/json/tmp/StoryProtocolGateway | ||
solc @storyprotocol/core/=node_modules/@story-protocol/protocol-core/contracts/ --pretty-json --base-path packages/core-sdk/protocol-periphery-contracts --include-path packages/core-sdk/protocol-periphery-contracts/node_modules/ --abi packages/core-sdk/protocol-periphery-contracts/contracts/SPGNFT.sol -o packages/core-sdk/src/abi/json/tmp/SPGNFT | ||
|
||
rm -rf packages/core-sdk/src/abi/json/tmp | ||
rm -rf packages/core-sdk/protocol-contracts | ||
rm -rf packages/core-sdk/protocol-core-contracts | ||
rm -rf packages/core-sdk/protocol-periphery-contracts |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.