-
Notifications
You must be signed in to change notification settings - Fork 65
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Update abi automation for beta * Relax test requirements for now
- Loading branch information
1 parent
152b340
commit 3be16d1
Showing
12 changed files
with
417 additions
and
92 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,5 +1,4 @@ | ||
[submodule "packages/core-sdk/protocol-contracts"] | ||
path = packages/core-sdk/protocol-contracts | ||
url = https://github.com/storyprotocol/protocol-contracts | ||
url = https://github.com/storyprotocol/protocol-core | ||
branch = main | ||
|
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,22 +1,21 @@ | ||
compile_contracts: | ||
git submodule add -b main --force https://github.com/storyprotocol/protocol-contracts packages/core-sdk/protocol-contracts | ||
git submodule add -b main --force https://github.com/storyprotocol/protocol-core packages/core-sdk/protocol-contracts | ||
git submodule update --remote --merge | ||
cd packages/core-sdk/protocol-contracts && npm i | ||
cd packages/core-sdk/protocol-contracts && npm i && forge install | ||
|
||
solc --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/StoryProtocol.sol -o packages/core-sdk/src/abi/json/tmp/StoryProtocol | ||
solc --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/ip-org/IPOrgController.sol -o packages/core-sdk/src/abi/json/tmp/IPOrgController | ||
solc --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/LicenseRegistry.sol -o packages/core-sdk/src/abi/json/tmp/LicenseRegistry | ||
solc --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/registration/RegistrationModule.sol -o packages/core-sdk/src/abi/json/tmp/RegistrationModule | ||
solc --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/relationships/RelationshipModule.sol -o packages/core-sdk/src/abi/json/tmp/RelationshipModule | ||
solc --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 | ||
cp packages/core-sdk/src/abi/json/tmp/Errors/Errors.abi packages/core-sdk/src/abi/json/Errors.json | ||
solc --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/AccessController.sol -o packages/core-sdk/src/abi/json/tmp/AccessController | ||
solc --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/RegistrationModule.sol -o packages/core-sdk/src/abi/json/tmp/RegistrationModule | ||
solc --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/tagging/TaggingModule.sol -o packages/core-sdk/src/abi/json/tmp/TaggingModule | ||
solc --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/IIPAccountRegistry.sol -o packages/core-sdk/src/abi/json/tmp/IIPAccountRegistry | ||
solc --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 --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/ModuleRegistry.sol -o packages/core-sdk/src/abi/json/tmp/ModuleRegistry | ||
|
||
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/StoryProtocol/StoryProtocol.abi)"' as const;' > packages/core-sdk/src/abi/json/StoryProtocol.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/IPOrgController/IPOrgController.abi)"' as const;' > packages/core-sdk/src/abi/json/IPOrgController.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/AccessController/AccessController.abi)"' as const;' > packages/core-sdk/src/abi/json/AccessController.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/RegistrationModule/RegistrationModule.abi)"' as const;' > packages/core-sdk/src/abi/json/RegistrationModule.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/RelationshipModule/RelationshipModule.abi)"' as const;' > packages/core-sdk/src/abi/json/RelationshipModule.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/TaggingModule/TaggingModule.abi)"' as const;' > packages/core-sdk/src/abi/json/TaggingModule.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/IIPAccountRegistry/IIPAccountRegistry.abi)"' as const;' > packages/core-sdk/src/abi/json/IIPAccountRegistry.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/ModuleRegistry/ModuleRegistry.abi)"' as const;' > packages/core-sdk/src/abi/json/ModuleRegistry.abi.ts | ||
|
||
rm -rf packages/core-sdk/src/abi/json/tmp | ||
rm -rf packages/core-sdk/protocol-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
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 |
---|---|---|
@@ -0,0 +1,35 @@ | ||
export default [ | ||
{ | ||
inputs: [ | ||
{ | ||
internalType: "address", | ||
name: "ipAccount_", | ||
type: "address", | ||
}, | ||
{ | ||
internalType: "address", | ||
name: "signer_", | ||
type: "address", | ||
}, | ||
{ | ||
internalType: "address", | ||
name: "to_", | ||
type: "address", | ||
}, | ||
{ | ||
internalType: "bytes4", | ||
name: "func_", | ||
type: "bytes4", | ||
}, | ||
{ | ||
internalType: "uint8", | ||
name: "permission_", | ||
type: "uint8", | ||
}, | ||
], | ||
name: "setPermission", | ||
outputs: [], | ||
stateMutability: "nonpayable", | ||
type: "function", | ||
}, | ||
] as const; |
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 |
---|---|---|
@@ -0,0 +1,31 @@ | ||
export default [ | ||
{ | ||
inputs: [ | ||
{ | ||
internalType: "uint256", | ||
name: "chainId_", | ||
type: "uint256", | ||
}, | ||
{ | ||
internalType: "address", | ||
name: "tokenContract_", | ||
type: "address", | ||
}, | ||
{ | ||
internalType: "uint256", | ||
name: "tokenId_", | ||
type: "uint256", | ||
}, | ||
], | ||
name: "ipAccount", | ||
outputs: [ | ||
{ | ||
internalType: "address", | ||
name: "", | ||
type: "address", | ||
}, | ||
], | ||
stateMutability: "view", | ||
type: "function", | ||
}, | ||
] as const; |
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 |
---|---|---|
@@ -0,0 +1,161 @@ | ||
export default [ | ||
{ | ||
inputs: [ | ||
{ | ||
components: [ | ||
{ | ||
internalType: "uint256", | ||
name: "frameworkId", | ||
type: "uint256", | ||
}, | ||
{ | ||
internalType: "bytes[]", | ||
name: "mintingParamValues", | ||
type: "bytes[]", | ||
}, | ||
{ | ||
internalType: "bytes[]", | ||
name: "activationParamValues", | ||
type: "bytes[]", | ||
}, | ||
{ | ||
internalType: "bool", | ||
name: "needsActivation", | ||
type: "bool", | ||
}, | ||
{ | ||
internalType: "bytes[]", | ||
name: "linkParentParamValues", | ||
type: "bytes[]", | ||
}, | ||
], | ||
internalType: "struct Licensing.Policy", | ||
name: "pol", | ||
type: "tuple", | ||
}, | ||
], | ||
name: "addPolicy", | ||
outputs: [ | ||
{ | ||
internalType: "uint256", | ||
name: "policyId", | ||
type: "uint256", | ||
}, | ||
{ | ||
internalType: "bool", | ||
name: "isNew", | ||
type: "bool", | ||
}, | ||
], | ||
stateMutability: "nonpayable", | ||
type: "function", | ||
}, | ||
{ | ||
inputs: [ | ||
{ | ||
internalType: "address", | ||
name: "ipId", | ||
type: "address", | ||
}, | ||
{ | ||
internalType: "uint256", | ||
name: "polId", | ||
type: "uint256", | ||
}, | ||
], | ||
name: "addPolicyToIp", | ||
outputs: [ | ||
{ | ||
internalType: "uint256", | ||
name: "indexOnIpId", | ||
type: "uint256", | ||
}, | ||
], | ||
stateMutability: "nonpayable", | ||
type: "function", | ||
}, | ||
{ | ||
inputs: [ | ||
{ | ||
internalType: "address", | ||
name: "ipId", | ||
type: "address", | ||
}, | ||
{ | ||
components: [ | ||
{ | ||
internalType: "uint256", | ||
name: "frameworkId", | ||
type: "uint256", | ||
}, | ||
{ | ||
internalType: "bytes[]", | ||
name: "mintingParamValues", | ||
type: "bytes[]", | ||
}, | ||
{ | ||
internalType: "bytes[]", | ||
name: "activationParamValues", | ||
type: "bytes[]", | ||
}, | ||
{ | ||
internalType: "bool", | ||
name: "needsActivation", | ||
type: "bool", | ||
}, | ||
{ | ||
internalType: "bytes[]", | ||
name: "linkParentParamValues", | ||
type: "bytes[]", | ||
}, | ||
], | ||
internalType: "struct Licensing.Policy", | ||
name: "pol", | ||
type: "tuple", | ||
}, | ||
], | ||
name: "addPolicyToIp", | ||
outputs: [ | ||
{ | ||
internalType: "uint256", | ||
name: "policyId", | ||
type: "uint256", | ||
}, | ||
{ | ||
internalType: "bool", | ||
name: "isNew", | ||
type: "bool", | ||
}, | ||
{ | ||
internalType: "uint256", | ||
name: "indexOnIpId", | ||
type: "uint256", | ||
}, | ||
], | ||
stateMutability: "nonpayable", | ||
type: "function", | ||
}, | ||
{ | ||
inputs: [ | ||
{ | ||
internalType: "uint256", | ||
name: "licenseId", | ||
type: "uint256", | ||
}, | ||
{ | ||
internalType: "address", | ||
name: "childIpId", | ||
type: "address", | ||
}, | ||
{ | ||
internalType: "address", | ||
name: "holder", | ||
type: "address", | ||
}, | ||
], | ||
name: "linkIpToParent", | ||
outputs: [], | ||
stateMutability: "nonpayable", | ||
type: "function", | ||
}, | ||
] as const; |
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 |
---|---|---|
@@ -0,0 +1,39 @@ | ||
export default [ | ||
{ | ||
inputs: [ | ||
{ | ||
internalType: "address", | ||
name: "moduleAddress", | ||
type: "address", | ||
}, | ||
], | ||
name: "isRegistered", | ||
outputs: [ | ||
{ | ||
internalType: "bool", | ||
name: "", | ||
type: "bool", | ||
}, | ||
], | ||
stateMutability: "view", | ||
type: "function", | ||
}, | ||
{ | ||
inputs: [ | ||
{ | ||
internalType: "string", | ||
name: "name", | ||
type: "string", | ||
}, | ||
{ | ||
internalType: "address", | ||
name: "moduleAddress", | ||
type: "address", | ||
}, | ||
], | ||
name: "registerModule", | ||
outputs: [], | ||
stateMutability: "nonpayable", | ||
type: "function", | ||
}, | ||
] as const; |
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 |
---|---|---|
@@ -0,0 +1,69 @@ | ||
export default [ | ||
{ | ||
inputs: [ | ||
{ | ||
internalType: "uint256", | ||
name: "licenseId", | ||
type: "uint256", | ||
}, | ||
{ | ||
internalType: "address", | ||
name: "tokenContract", | ||
type: "address", | ||
}, | ||
{ | ||
internalType: "uint256", | ||
name: "tokenId", | ||
type: "uint256", | ||
}, | ||
{ | ||
internalType: "string", | ||
name: "ipName", | ||
type: "string", | ||
}, | ||
{ | ||
internalType: "string", | ||
name: "ipDescription", | ||
type: "string", | ||
}, | ||
{ | ||
internalType: "bytes32", | ||
name: "hash", | ||
type: "bytes32", | ||
}, | ||
], | ||
name: "registerDerivativeIp", | ||
outputs: [], | ||
stateMutability: "nonpayable", | ||
type: "function", | ||
}, | ||
{ | ||
inputs: [ | ||
{ | ||
internalType: "uint256", | ||
name: "policyId", | ||
type: "uint256", | ||
}, | ||
{ | ||
internalType: "address", | ||
name: "tokenContract", | ||
type: "address", | ||
}, | ||
{ | ||
internalType: "uint256", | ||
name: "tokenId", | ||
type: "uint256", | ||
}, | ||
], | ||
name: "registerRootIp", | ||
outputs: [ | ||
{ | ||
internalType: "address", | ||
name: "", | ||
type: "address", | ||
}, | ||
], | ||
stateMutability: "nonpayable", | ||
type: "function", | ||
}, | ||
] as const; |
Oops, something went wrong.