diff --git a/.scripts/exportABi.ts b/.scripts/exportABi.ts new file mode 100644 index 000000000..314272d1d --- /dev/null +++ b/.scripts/exportABi.ts @@ -0,0 +1,57 @@ +import fs from "fs"; +import path from "path"; +import prettier from "prettier"; +import type { CompiledSierra } from "starknet"; + +const TARGET_DIR = path.join(__dirname, "../packages/core/src/abis"); +const deploymentsDir = path.join(__dirname, "../contracts/target/dev"); + +const generatedContractComment = `/** + * This file is autogenerated by + * You should not edit it manually or your changes might be overwritten. + */`; + +//get all contracts with .contract_class.json +const contracts = fs.readdirSync(deploymentsDir).filter((file) => + file.endsWith(".contract_class.json") +); +console.log('\x1b[32m Generating ABI export... \x1b[0m') + +const exportedContracts: string[] = []; + +//export all contract abi +contracts.forEach(async (contract) => { + const contractPath = path.join(deploymentsDir, contract); + const contractContent = fs.readFileSync(contractPath, "utf8"); + const contractData: CompiledSierra = JSON.parse(contractContent); + const abi = JSON.stringify(contractData.abi.filter((item) => item.type !== "l1_handler")); + + if (!fs.existsSync(TARGET_DIR)) { + fs.mkdirSync(TARGET_DIR); + } + + const contractName = contract.replace(".contract_class.json", ""); + exportedContracts.push(contractName); + + const targetPath = path.join(TARGET_DIR, `${contractName}.ts`); + const fileContent = `${generatedContractComment}\n\nexport default ${abi} as const;`; + + //save abi + fs.writeFileSync(targetPath, await prettier.format(fileContent, { parser: "typescript" })); +}); + +// Create index.ts file +const indexPath = path.join(TARGET_DIR, "index.ts"); +const indexContent = `${generatedContractComment} + +${exportedContracts.map(contract => `import ${contract} from './${contract}.js';`).join('\n')} + +export { + ${exportedContracts.join(',\n ')} +}; +`; + +fs.writeFileSync(indexPath, await prettier.format(indexContent, { parser: "typescript" })); + +console.log(`\x1b[32m exported contract abi's to ${TARGET_DIR} \x1b[0m`); +console.log(`\x1b[32m created index.ts file in ${TARGET_DIR} \x1b[0m`); diff --git a/README.md b/README.md index 735176198..db18f04ca 100644 --- a/README.md +++ b/README.md @@ -130,7 +130,7 @@ Check out our demo app showcasing a mini marketplace: [ArkProject SDK Demo](http 3. **Build Contracts** ```bash - cd contracts && scarb build --workspace + pnpm run build:contracts ``` 4. **Launch Katana** diff --git a/package.json b/package.json index 6514b91d3..07338b396 100644 --- a/package.json +++ b/package.json @@ -28,7 +28,8 @@ "deploy:starknet": "dotenv -- turbo run deploy:starknet", "deploy:starknet:local": "dotenv -- turbo run deploy:starknet:local --log-prefix=none", "deploy:starknet:tokens": "dotenv -- turbo run deploy:starknet:tokens --log-prefix=none", - "version:update": "bun .scripts/updateVersion.ts" + "version:update": "bun .scripts/updateVersion.ts", + "build:contracts": "cd contracts && scarb build && bun ../.scripts/exportABi.ts" }, "dependencies": { "@ark-project/eslint-config": "workspace:*", @@ -40,6 +41,7 @@ "dotenv-cli": "^7.3.0", "glob": "^10.3.10", "prettier": "^3.1.0", + "starknet": "6.7.0", "prettier-plugin-sort-imports": "^1.8.1", "turbo": "^1.13.3" }, diff --git a/packages/core/src/abis/ark_orderbook_orderbook.ts b/packages/core/src/abis/ark_orderbook_orderbook.ts new file mode 100644 index 000000000..d6045ef28 --- /dev/null +++ b/packages/core/src/abis/ark_orderbook_orderbook.ts @@ -0,0 +1,370 @@ +/** + * This file is autogenerated by + * You should not edit it manually or your changes might be overwritten. + */ + +export default [ + { + type: "impl", + name: "ImplOrderbook", + interface_name: "ark_orderbook::orderbook::Orderbook", + }, + { + type: "enum", + name: "ark_common::protocol::order_types::OrderType", + variants: [ + { name: "Listing", type: "()" }, + { name: "Auction", type: "()" }, + { name: "Offer", type: "()" }, + { name: "CollectionOffer", type: "()" }, + ], + }, + { + type: "enum", + name: "ark_common::protocol::order_types::OrderStatus", + variants: [ + { name: "Open", type: "()" }, + { name: "Fulfilled", type: "()" }, + { name: "Executed", type: "()" }, + { name: "CancelledUser", type: "()" }, + { name: "CancelledByNewOrder", type: "()" }, + { name: "CancelledAssetFault", type: "()" }, + { name: "CancelledOwnership", type: "()" }, + ], + }, + { + type: "enum", + name: "ark_common::protocol::order_types::RouteType", + variants: [ + { name: "Erc20ToErc721", type: "()" }, + { name: "Erc721ToErc20", type: "()" }, + ], + }, + { + type: "struct", + name: "core::integer::u256", + members: [ + { name: "low", type: "core::integer::u128" }, + { name: "high", type: "core::integer::u128" }, + ], + }, + { + type: "enum", + name: "core::option::Option::", + variants: [ + { name: "Some", type: "core::integer::u256" }, + { name: "None", type: "()" }, + ], + }, + { + type: "struct", + name: "core::array::Span::", + members: [ + { name: "snapshot", type: "@core::array::Array::" }, + ], + }, + { + type: "struct", + name: "ark_common::protocol::order_v1::OrderV1", + members: [ + { name: "route", type: "ark_common::protocol::order_types::RouteType" }, + { + name: "currency_address", + type: "core::starknet::contract_address::ContractAddress", + }, + { name: "currency_chain_id", type: "core::felt252" }, + { name: "salt", type: "core::felt252" }, + { + name: "offerer", + type: "core::starknet::contract_address::ContractAddress", + }, + { name: "token_chain_id", type: "core::felt252" }, + { + name: "token_address", + type: "core::starknet::contract_address::ContractAddress", + }, + { name: "token_id", type: "core::option::Option::" }, + { name: "quantity", type: "core::integer::u256" }, + { name: "start_amount", type: "core::integer::u256" }, + { name: "end_amount", type: "core::integer::u256" }, + { name: "start_date", type: "core::integer::u64" }, + { name: "end_date", type: "core::integer::u64" }, + { + name: "broker_id", + type: "core::starknet::contract_address::ContractAddress", + }, + { name: "additional_data", type: "core::array::Span::" }, + ], + }, + { + type: "interface", + name: "ark_orderbook::orderbook::Orderbook", + items: [ + { + type: "function", + name: "get_order_type", + inputs: [{ name: "order_hash", type: "core::felt252" }], + outputs: [{ type: "ark_common::protocol::order_types::OrderType" }], + state_mutability: "view", + }, + { + type: "function", + name: "get_order_status", + inputs: [{ name: "order_hash", type: "core::felt252" }], + outputs: [{ type: "ark_common::protocol::order_types::OrderStatus" }], + state_mutability: "view", + }, + { + type: "function", + name: "get_auction_expiration", + inputs: [{ name: "order_hash", type: "core::felt252" }], + outputs: [{ type: "core::integer::u64" }], + state_mutability: "view", + }, + { + type: "function", + name: "get_order", + inputs: [{ name: "order_hash", type: "core::felt252" }], + outputs: [{ type: "ark_common::protocol::order_v1::OrderV1" }], + state_mutability: "view", + }, + { + type: "function", + name: "get_order_hash", + inputs: [{ name: "token_hash", type: "core::felt252" }], + outputs: [{ type: "core::felt252" }], + state_mutability: "view", + }, + { + type: "function", + name: "upgrade", + inputs: [ + { name: "class_hash", type: "core::starknet::class_hash::ClassHash" }, + ], + outputs: [], + state_mutability: "external", + }, + { + type: "function", + name: "update_starknet_executor_address", + inputs: [ + { + name: "value", + type: "core::starknet::contract_address::ContractAddress", + }, + ], + outputs: [], + state_mutability: "external", + }, + ], + }, + { + type: "constructor", + name: "constructor", + inputs: [ + { + name: "admin", + type: "core::starknet::contract_address::ContractAddress", + }, + { name: "chain_id", type: "core::felt252" }, + ], + }, + { + type: "struct", + name: "ark_common::protocol::order_types::ExecutionValidationInfo", + members: [ + { name: "order_hash", type: "core::felt252" }, + { name: "transaction_hash", type: "core::felt252" }, + { name: "starknet_block_timestamp", type: "core::integer::u64" }, + { + name: "from", + type: "core::starknet::contract_address::ContractAddress", + }, + { name: "to", type: "core::starknet::contract_address::ContractAddress" }, + ], + }, + { + type: "struct", + name: "ark_common::protocol::order_types::CancelInfo", + members: [ + { name: "order_hash", type: "core::felt252" }, + { + name: "canceller", + type: "core::starknet::contract_address::ContractAddress", + }, + { name: "token_chain_id", type: "core::felt252" }, + { + name: "token_address", + type: "core::starknet::contract_address::ContractAddress", + }, + { name: "token_id", type: "core::option::Option::" }, + ], + }, + { + type: "enum", + name: "core::option::Option::", + variants: [ + { name: "Some", type: "core::felt252" }, + { name: "None", type: "()" }, + ], + }, + { + type: "struct", + name: "ark_common::protocol::order_types::FulfillInfo", + members: [ + { name: "order_hash", type: "core::felt252" }, + { + name: "related_order_hash", + type: "core::option::Option::", + }, + { + name: "fulfiller", + type: "core::starknet::contract_address::ContractAddress", + }, + { name: "token_chain_id", type: "core::felt252" }, + { + name: "token_address", + type: "core::starknet::contract_address::ContractAddress", + }, + { name: "token_id", type: "core::option::Option::" }, + { + name: "fulfill_broker_address", + type: "core::starknet::contract_address::ContractAddress", + }, + ], + }, + { + type: "event", + name: "ark_orderbook::orderbook::orderbook::OrderPlaced", + kind: "struct", + members: [ + { name: "order_hash", type: "core::felt252", kind: "key" }, + { name: "order_version", type: "core::felt252", kind: "key" }, + { + name: "order_type", + type: "ark_common::protocol::order_types::OrderType", + kind: "key", + }, + { + name: "cancelled_order_hash", + type: "core::option::Option::", + kind: "data", + }, + { + name: "order", + type: "ark_common::protocol::order_v1::OrderV1", + kind: "data", + }, + ], + }, + { + type: "event", + name: "ark_orderbook::orderbook::orderbook::OrderExecuted", + kind: "struct", + members: [ + { name: "order_hash", type: "core::felt252", kind: "key" }, + { + name: "order_status", + type: "ark_common::protocol::order_types::OrderStatus", + kind: "key", + }, + { name: "version", type: "core::integer::u8", kind: "data" }, + { name: "transaction_hash", type: "core::felt252", kind: "data" }, + { + name: "from", + type: "core::starknet::contract_address::ContractAddress", + kind: "data", + }, + { + name: "to", + type: "core::starknet::contract_address::ContractAddress", + kind: "data", + }, + ], + }, + { + type: "event", + name: "ark_orderbook::orderbook::orderbook::OrderCancelled", + kind: "struct", + members: [ + { name: "order_hash", type: "core::felt252", kind: "key" }, + { name: "reason", type: "core::felt252", kind: "key" }, + ], + }, + { + type: "event", + name: "ark_orderbook::orderbook::orderbook::RollbackStatus", + kind: "struct", + members: [ + { name: "order_hash", type: "core::felt252", kind: "key" }, + { name: "reason", type: "core::felt252", kind: "key" }, + ], + }, + { + type: "event", + name: "ark_orderbook::orderbook::orderbook::OrderFulfilled", + kind: "struct", + members: [ + { name: "order_hash", type: "core::felt252", kind: "key" }, + { + name: "fulfiller", + type: "core::starknet::contract_address::ContractAddress", + kind: "key", + }, + { + name: "related_order_hash", + type: "core::option::Option::", + kind: "key", + }, + ], + }, + { + type: "event", + name: "ark_orderbook::orderbook::orderbook::Upgraded", + kind: "struct", + members: [ + { + name: "class_hash", + type: "core::starknet::class_hash::ClassHash", + kind: "data", + }, + ], + }, + { + type: "event", + name: "ark_orderbook::orderbook::orderbook::Event", + kind: "enum", + variants: [ + { + name: "OrderPlaced", + type: "ark_orderbook::orderbook::orderbook::OrderPlaced", + kind: "nested", + }, + { + name: "OrderExecuted", + type: "ark_orderbook::orderbook::orderbook::OrderExecuted", + kind: "nested", + }, + { + name: "OrderCancelled", + type: "ark_orderbook::orderbook::orderbook::OrderCancelled", + kind: "nested", + }, + { + name: "RollbackStatus", + type: "ark_orderbook::orderbook::orderbook::RollbackStatus", + kind: "nested", + }, + { + name: "OrderFulfilled", + type: "ark_orderbook::orderbook::orderbook::OrderFulfilled", + kind: "nested", + }, + { + name: "Upgraded", + type: "ark_orderbook::orderbook::orderbook::Upgraded", + kind: "nested", + }, + ], + }, +] as const; diff --git a/packages/core/src/abis/ark_orderbook_orderbook_event_mock.ts b/packages/core/src/abis/ark_orderbook_orderbook_event_mock.ts new file mode 100644 index 000000000..eb823d12b --- /dev/null +++ b/packages/core/src/abis/ark_orderbook_orderbook_event_mock.ts @@ -0,0 +1,187 @@ +/** + * This file is autogenerated by + * You should not edit it manually or your changes might be overwritten. + */ + +export default [ + { + type: "enum", + name: "ark_common::protocol::order_types::OrderType", + variants: [ + { name: "Listing", type: "()" }, + { name: "Auction", type: "()" }, + { name: "Offer", type: "()" }, + { name: "CollectionOffer", type: "()" }, + ], + }, + { + type: "enum", + name: "core::option::Option::", + variants: [ + { name: "Some", type: "core::felt252" }, + { name: "None", type: "()" }, + ], + }, + { + type: "enum", + name: "ark_common::protocol::order_types::RouteType", + variants: [ + { name: "Erc20ToErc721", type: "()" }, + { name: "Erc721ToErc20", type: "()" }, + ], + }, + { + type: "struct", + name: "core::integer::u256", + members: [ + { name: "low", type: "core::integer::u128" }, + { name: "high", type: "core::integer::u128" }, + ], + }, + { + type: "enum", + name: "core::option::Option::", + variants: [ + { name: "Some", type: "core::integer::u256" }, + { name: "None", type: "()" }, + ], + }, + { + type: "struct", + name: "core::array::Span::", + members: [ + { name: "snapshot", type: "@core::array::Array::" }, + ], + }, + { + type: "struct", + name: "ark_common::protocol::order_v1::OrderV1", + members: [ + { name: "route", type: "ark_common::protocol::order_types::RouteType" }, + { + name: "currency_address", + type: "core::starknet::contract_address::ContractAddress", + }, + { name: "currency_chain_id", type: "core::felt252" }, + { name: "salt", type: "core::felt252" }, + { + name: "offerer", + type: "core::starknet::contract_address::ContractAddress", + }, + { name: "token_chain_id", type: "core::felt252" }, + { + name: "token_address", + type: "core::starknet::contract_address::ContractAddress", + }, + { name: "token_id", type: "core::option::Option::" }, + { name: "quantity", type: "core::integer::u256" }, + { name: "start_amount", type: "core::integer::u256" }, + { name: "end_amount", type: "core::integer::u256" }, + { name: "start_date", type: "core::integer::u64" }, + { name: "end_date", type: "core::integer::u64" }, + { + name: "broker_id", + type: "core::starknet::contract_address::ContractAddress", + }, + { name: "additional_data", type: "core::array::Span::" }, + ], + }, + { + type: "event", + name: "ark_orderbook::orderbook_event_mock::orderbook_event_mock::OrderPlaced", + kind: "struct", + members: [ + { name: "order_hash", type: "core::felt252", kind: "key" }, + { name: "order_version", type: "core::felt252", kind: "key" }, + { + name: "order_type", + type: "ark_common::protocol::order_types::OrderType", + kind: "key", + }, + { + name: "cancelled_order_hash", + type: "core::option::Option::", + kind: "data", + }, + { + name: "order", + type: "ark_common::protocol::order_v1::OrderV1", + kind: "data", + }, + ], + }, + { + type: "event", + name: "ark_orderbook::orderbook_event_mock::orderbook_event_mock::OrderExecuted", + kind: "struct", + members: [{ name: "order_hash", type: "core::felt252", kind: "key" }], + }, + { + type: "event", + name: "ark_orderbook::orderbook_event_mock::orderbook_event_mock::OrderCancelled", + kind: "struct", + members: [ + { name: "order_hash", type: "core::felt252", kind: "key" }, + { name: "reason", type: "core::felt252", kind: "key" }, + ], + }, + { + type: "event", + name: "ark_orderbook::orderbook_event_mock::orderbook_event_mock::RollbackStatus", + kind: "struct", + members: [ + { name: "order_hash", type: "core::felt252", kind: "key" }, + { name: "reason", type: "core::felt252", kind: "key" }, + ], + }, + { + type: "event", + name: "ark_orderbook::orderbook_event_mock::orderbook_event_mock::OrderFulfilled", + kind: "struct", + members: [ + { name: "order_hash", type: "core::felt252", kind: "key" }, + { + name: "fulfiller", + type: "core::starknet::contract_address::ContractAddress", + kind: "key", + }, + { + name: "related_order_hash", + type: "core::option::Option::", + kind: "key", + }, + ], + }, + { + type: "event", + name: "ark_orderbook::orderbook_event_mock::orderbook_event_mock::Event", + kind: "enum", + variants: [ + { + name: "OrderPlaced", + type: "ark_orderbook::orderbook_event_mock::orderbook_event_mock::OrderPlaced", + kind: "nested", + }, + { + name: "OrderExecuted", + type: "ark_orderbook::orderbook_event_mock::orderbook_event_mock::OrderExecuted", + kind: "nested", + }, + { + name: "OrderCancelled", + type: "ark_orderbook::orderbook_event_mock::orderbook_event_mock::OrderCancelled", + kind: "nested", + }, + { + name: "RollbackStatus", + type: "ark_orderbook::orderbook_event_mock::orderbook_event_mock::RollbackStatus", + kind: "nested", + }, + { + name: "OrderFulfilled", + type: "ark_orderbook::orderbook_event_mock::orderbook_event_mock::OrderFulfilled", + kind: "nested", + }, + ], + }, +] as const; diff --git a/packages/core/src/abis/ark_starknet_FreeMintERC20.ts b/packages/core/src/abis/ark_starknet_FreeMintERC20.ts new file mode 100644 index 000000000..795086a9d --- /dev/null +++ b/packages/core/src/abis/ark_starknet_FreeMintERC20.ts @@ -0,0 +1,298 @@ +/** + * This file is autogenerated by + * You should not edit it manually or your changes might be overwritten. + */ + +export default [ + { + type: "impl", + name: "ImplFreeMint", + interface_name: "ark_tokens::erc20::IFreeMint", + }, + { + type: "struct", + name: "core::integer::u256", + members: [ + { name: "low", type: "core::integer::u128" }, + { name: "high", type: "core::integer::u128" }, + ], + }, + { + type: "interface", + name: "ark_tokens::erc20::IFreeMint", + items: [ + { + type: "function", + name: "mint", + inputs: [ + { + name: "recipient", + type: "core::starknet::contract_address::ContractAddress", + }, + { name: "amount", type: "core::integer::u256" }, + ], + outputs: [], + state_mutability: "external", + }, + ], + }, + { + type: "impl", + name: "ERC20Impl", + interface_name: "openzeppelin::token::erc20::interface::IERC20", + }, + { + type: "enum", + name: "core::bool", + variants: [ + { name: "False", type: "()" }, + { name: "True", type: "()" }, + ], + }, + { + type: "interface", + name: "openzeppelin::token::erc20::interface::IERC20", + items: [ + { + type: "function", + name: "total_supply", + inputs: [], + outputs: [{ type: "core::integer::u256" }], + state_mutability: "view", + }, + { + type: "function", + name: "balance_of", + inputs: [ + { + name: "account", + type: "core::starknet::contract_address::ContractAddress", + }, + ], + outputs: [{ type: "core::integer::u256" }], + state_mutability: "view", + }, + { + type: "function", + name: "allowance", + inputs: [ + { + name: "owner", + type: "core::starknet::contract_address::ContractAddress", + }, + { + name: "spender", + type: "core::starknet::contract_address::ContractAddress", + }, + ], + outputs: [{ type: "core::integer::u256" }], + state_mutability: "view", + }, + { + type: "function", + name: "transfer", + inputs: [ + { + name: "recipient", + type: "core::starknet::contract_address::ContractAddress", + }, + { name: "amount", type: "core::integer::u256" }, + ], + outputs: [{ type: "core::bool" }], + state_mutability: "external", + }, + { + type: "function", + name: "transfer_from", + inputs: [ + { + name: "sender", + type: "core::starknet::contract_address::ContractAddress", + }, + { + name: "recipient", + type: "core::starknet::contract_address::ContractAddress", + }, + { name: "amount", type: "core::integer::u256" }, + ], + outputs: [{ type: "core::bool" }], + state_mutability: "external", + }, + { + type: "function", + name: "approve", + inputs: [ + { + name: "spender", + type: "core::starknet::contract_address::ContractAddress", + }, + { name: "amount", type: "core::integer::u256" }, + ], + outputs: [{ type: "core::bool" }], + state_mutability: "external", + }, + ], + }, + { + type: "impl", + name: "ERC20MetadataImpl", + interface_name: "openzeppelin::token::erc20::interface::IERC20Metadata", + }, + { + type: "struct", + name: "core::byte_array::ByteArray", + members: [ + { name: "data", type: "core::array::Array::" }, + { name: "pending_word", type: "core::felt252" }, + { name: "pending_word_len", type: "core::integer::u32" }, + ], + }, + { + type: "interface", + name: "openzeppelin::token::erc20::interface::IERC20Metadata", + items: [ + { + type: "function", + name: "name", + inputs: [], + outputs: [{ type: "core::byte_array::ByteArray" }], + state_mutability: "view", + }, + { + type: "function", + name: "symbol", + inputs: [], + outputs: [{ type: "core::byte_array::ByteArray" }], + state_mutability: "view", + }, + { + type: "function", + name: "decimals", + inputs: [], + outputs: [{ type: "core::integer::u8" }], + state_mutability: "view", + }, + ], + }, + { + type: "impl", + name: "ERC20CamelOnlyImpl", + interface_name: "openzeppelin::token::erc20::interface::IERC20CamelOnly", + }, + { + type: "interface", + name: "openzeppelin::token::erc20::interface::IERC20CamelOnly", + items: [ + { + type: "function", + name: "totalSupply", + inputs: [], + outputs: [{ type: "core::integer::u256" }], + state_mutability: "view", + }, + { + type: "function", + name: "balanceOf", + inputs: [ + { + name: "account", + type: "core::starknet::contract_address::ContractAddress", + }, + ], + outputs: [{ type: "core::integer::u256" }], + state_mutability: "view", + }, + { + type: "function", + name: "transferFrom", + inputs: [ + { + name: "sender", + type: "core::starknet::contract_address::ContractAddress", + }, + { + name: "recipient", + type: "core::starknet::contract_address::ContractAddress", + }, + { name: "amount", type: "core::integer::u256" }, + ], + outputs: [{ type: "core::bool" }], + state_mutability: "external", + }, + ], + }, + { + type: "constructor", + name: "constructor", + inputs: [ + { name: "initial_supply", type: "core::integer::u256" }, + { name: "name", type: "core::byte_array::ByteArray" }, + { name: "symbol", type: "core::byte_array::ByteArray" }, + ], + }, + { + type: "event", + name: "openzeppelin::token::erc20::erc20::ERC20Component::Transfer", + kind: "struct", + members: [ + { + name: "from", + type: "core::starknet::contract_address::ContractAddress", + kind: "key", + }, + { + name: "to", + type: "core::starknet::contract_address::ContractAddress", + kind: "key", + }, + { name: "value", type: "core::integer::u256", kind: "data" }, + ], + }, + { + type: "event", + name: "openzeppelin::token::erc20::erc20::ERC20Component::Approval", + kind: "struct", + members: [ + { + name: "owner", + type: "core::starknet::contract_address::ContractAddress", + kind: "key", + }, + { + name: "spender", + type: "core::starknet::contract_address::ContractAddress", + kind: "key", + }, + { name: "value", type: "core::integer::u256", kind: "data" }, + ], + }, + { + type: "event", + name: "openzeppelin::token::erc20::erc20::ERC20Component::Event", + kind: "enum", + variants: [ + { + name: "Transfer", + type: "openzeppelin::token::erc20::erc20::ERC20Component::Transfer", + kind: "nested", + }, + { + name: "Approval", + type: "openzeppelin::token::erc20::erc20::ERC20Component::Approval", + kind: "nested", + }, + ], + }, + { + type: "event", + name: "ark_tokens::erc20::FreeMintERC20::Event", + kind: "enum", + variants: [ + { + name: "ERC20Event", + type: "openzeppelin::token::erc20::erc20::ERC20Component::Event", + kind: "flat", + }, + ], + }, +] as const; diff --git a/packages/core/src/abis/ark_starknet_FreeMintNFT.ts b/packages/core/src/abis/ark_starknet_FreeMintNFT.ts new file mode 100644 index 000000000..7c0ecbf17 --- /dev/null +++ b/packages/core/src/abis/ark_starknet_FreeMintNFT.ts @@ -0,0 +1,425 @@ +/** + * This file is autogenerated by + * You should not edit it manually or your changes might be overwritten. + */ + +export default [ + { + type: "impl", + name: "ImplFreeMint", + interface_name: "ark_tokens::erc721::IFreeMint", + }, + { + type: "interface", + name: "ark_tokens::erc721::IFreeMint", + items: [ + { + type: "function", + name: "mint", + inputs: [ + { + name: "recipient", + type: "core::starknet::contract_address::ContractAddress", + }, + { name: "token_uri", type: "core::felt252" }, + ], + outputs: [], + state_mutability: "external", + }, + { + type: "function", + name: "get_current_token_id", + inputs: [], + outputs: [{ type: "core::felt252" }], + state_mutability: "view", + }, + ], + }, + { + type: "impl", + name: "ERC721MixinImpl", + interface_name: "openzeppelin::token::erc721::interface::ERC721ABI", + }, + { + type: "struct", + name: "core::integer::u256", + members: [ + { name: "low", type: "core::integer::u128" }, + { name: "high", type: "core::integer::u128" }, + ], + }, + { + type: "struct", + name: "core::array::Span::", + members: [ + { name: "snapshot", type: "@core::array::Array::" }, + ], + }, + { + type: "enum", + name: "core::bool", + variants: [ + { name: "False", type: "()" }, + { name: "True", type: "()" }, + ], + }, + { + type: "struct", + name: "core::byte_array::ByteArray", + members: [ + { name: "data", type: "core::array::Array::" }, + { name: "pending_word", type: "core::felt252" }, + { name: "pending_word_len", type: "core::integer::u32" }, + ], + }, + { + type: "interface", + name: "openzeppelin::token::erc721::interface::ERC721ABI", + items: [ + { + type: "function", + name: "balance_of", + inputs: [ + { + name: "account", + type: "core::starknet::contract_address::ContractAddress", + }, + ], + outputs: [{ type: "core::integer::u256" }], + state_mutability: "view", + }, + { + type: "function", + name: "owner_of", + inputs: [{ name: "token_id", type: "core::integer::u256" }], + outputs: [ + { type: "core::starknet::contract_address::ContractAddress" }, + ], + state_mutability: "view", + }, + { + type: "function", + name: "safe_transfer_from", + inputs: [ + { + name: "from", + type: "core::starknet::contract_address::ContractAddress", + }, + { + name: "to", + type: "core::starknet::contract_address::ContractAddress", + }, + { name: "token_id", type: "core::integer::u256" }, + { name: "data", type: "core::array::Span::" }, + ], + outputs: [], + state_mutability: "external", + }, + { + type: "function", + name: "transfer_from", + inputs: [ + { + name: "from", + type: "core::starknet::contract_address::ContractAddress", + }, + { + name: "to", + type: "core::starknet::contract_address::ContractAddress", + }, + { name: "token_id", type: "core::integer::u256" }, + ], + outputs: [], + state_mutability: "external", + }, + { + type: "function", + name: "approve", + inputs: [ + { + name: "to", + type: "core::starknet::contract_address::ContractAddress", + }, + { name: "token_id", type: "core::integer::u256" }, + ], + outputs: [], + state_mutability: "external", + }, + { + type: "function", + name: "set_approval_for_all", + inputs: [ + { + name: "operator", + type: "core::starknet::contract_address::ContractAddress", + }, + { name: "approved", type: "core::bool" }, + ], + outputs: [], + state_mutability: "external", + }, + { + type: "function", + name: "get_approved", + inputs: [{ name: "token_id", type: "core::integer::u256" }], + outputs: [ + { type: "core::starknet::contract_address::ContractAddress" }, + ], + state_mutability: "view", + }, + { + type: "function", + name: "is_approved_for_all", + inputs: [ + { + name: "owner", + type: "core::starknet::contract_address::ContractAddress", + }, + { + name: "operator", + type: "core::starknet::contract_address::ContractAddress", + }, + ], + outputs: [{ type: "core::bool" }], + state_mutability: "view", + }, + { + type: "function", + name: "supports_interface", + inputs: [{ name: "interface_id", type: "core::felt252" }], + outputs: [{ type: "core::bool" }], + state_mutability: "view", + }, + { + type: "function", + name: "name", + inputs: [], + outputs: [{ type: "core::byte_array::ByteArray" }], + state_mutability: "view", + }, + { + type: "function", + name: "symbol", + inputs: [], + outputs: [{ type: "core::byte_array::ByteArray" }], + state_mutability: "view", + }, + { + type: "function", + name: "token_uri", + inputs: [{ name: "token_id", type: "core::integer::u256" }], + outputs: [{ type: "core::byte_array::ByteArray" }], + state_mutability: "view", + }, + { + type: "function", + name: "balanceOf", + inputs: [ + { + name: "account", + type: "core::starknet::contract_address::ContractAddress", + }, + ], + outputs: [{ type: "core::integer::u256" }], + state_mutability: "view", + }, + { + type: "function", + name: "ownerOf", + inputs: [{ name: "tokenId", type: "core::integer::u256" }], + outputs: [ + { type: "core::starknet::contract_address::ContractAddress" }, + ], + state_mutability: "view", + }, + { + type: "function", + name: "safeTransferFrom", + inputs: [ + { + name: "from", + type: "core::starknet::contract_address::ContractAddress", + }, + { + name: "to", + type: "core::starknet::contract_address::ContractAddress", + }, + { name: "tokenId", type: "core::integer::u256" }, + { name: "data", type: "core::array::Span::" }, + ], + outputs: [], + state_mutability: "external", + }, + { + type: "function", + name: "transferFrom", + inputs: [ + { + name: "from", + type: "core::starknet::contract_address::ContractAddress", + }, + { + name: "to", + type: "core::starknet::contract_address::ContractAddress", + }, + { name: "tokenId", type: "core::integer::u256" }, + ], + outputs: [], + state_mutability: "external", + }, + { + type: "function", + name: "setApprovalForAll", + inputs: [ + { + name: "operator", + type: "core::starknet::contract_address::ContractAddress", + }, + { name: "approved", type: "core::bool" }, + ], + outputs: [], + state_mutability: "external", + }, + { + type: "function", + name: "getApproved", + inputs: [{ name: "tokenId", type: "core::integer::u256" }], + outputs: [ + { type: "core::starknet::contract_address::ContractAddress" }, + ], + state_mutability: "view", + }, + { + type: "function", + name: "isApprovedForAll", + inputs: [ + { + name: "owner", + type: "core::starknet::contract_address::ContractAddress", + }, + { + name: "operator", + type: "core::starknet::contract_address::ContractAddress", + }, + ], + outputs: [{ type: "core::bool" }], + state_mutability: "view", + }, + { + type: "function", + name: "tokenURI", + inputs: [{ name: "tokenId", type: "core::integer::u256" }], + outputs: [{ type: "core::byte_array::ByteArray" }], + state_mutability: "view", + }, + ], + }, + { + type: "constructor", + name: "constructor", + inputs: [ + { name: "name", type: "core::byte_array::ByteArray" }, + { name: "symbol", type: "core::byte_array::ByteArray" }, + { name: "base_uri", type: "core::byte_array::ByteArray" }, + ], + }, + { + type: "event", + name: "openzeppelin::token::erc721::erc721::ERC721Component::Transfer", + kind: "struct", + members: [ + { + name: "from", + type: "core::starknet::contract_address::ContractAddress", + kind: "key", + }, + { + name: "to", + type: "core::starknet::contract_address::ContractAddress", + kind: "key", + }, + { name: "token_id", type: "core::integer::u256", kind: "key" }, + ], + }, + { + type: "event", + name: "openzeppelin::token::erc721::erc721::ERC721Component::Approval", + kind: "struct", + members: [ + { + name: "owner", + type: "core::starknet::contract_address::ContractAddress", + kind: "key", + }, + { + name: "approved", + type: "core::starknet::contract_address::ContractAddress", + kind: "key", + }, + { name: "token_id", type: "core::integer::u256", kind: "key" }, + ], + }, + { + type: "event", + name: "openzeppelin::token::erc721::erc721::ERC721Component::ApprovalForAll", + kind: "struct", + members: [ + { + name: "owner", + type: "core::starknet::contract_address::ContractAddress", + kind: "key", + }, + { + name: "operator", + type: "core::starknet::contract_address::ContractAddress", + kind: "key", + }, + { name: "approved", type: "core::bool", kind: "data" }, + ], + }, + { + type: "event", + name: "openzeppelin::token::erc721::erc721::ERC721Component::Event", + kind: "enum", + variants: [ + { + name: "Transfer", + type: "openzeppelin::token::erc721::erc721::ERC721Component::Transfer", + kind: "nested", + }, + { + name: "Approval", + type: "openzeppelin::token::erc721::erc721::ERC721Component::Approval", + kind: "nested", + }, + { + name: "ApprovalForAll", + type: "openzeppelin::token::erc721::erc721::ERC721Component::ApprovalForAll", + kind: "nested", + }, + ], + }, + { + type: "event", + name: "openzeppelin::introspection::src5::SRC5Component::Event", + kind: "enum", + variants: [], + }, + { + type: "event", + name: "ark_tokens::erc721::FreeMintNFT::Event", + kind: "enum", + variants: [ + { + name: "ERC721Event", + type: "openzeppelin::token::erc721::erc721::ERC721Component::Event", + kind: "flat", + }, + { + name: "SRC5Event", + type: "openzeppelin::introspection::src5::SRC5Component::Event", + kind: "flat", + }, + ], + }, +] as const; diff --git a/packages/core/src/abis/ark_starknet_FreeMintNFTRoyalty.ts b/packages/core/src/abis/ark_starknet_FreeMintNFTRoyalty.ts new file mode 100644 index 000000000..3b09053e6 --- /dev/null +++ b/packages/core/src/abis/ark_starknet_FreeMintNFTRoyalty.ts @@ -0,0 +1,693 @@ +/** + * This file is autogenerated by + * You should not edit it manually or your changes might be overwritten. + */ + +export default [ + { + type: "impl", + name: "ImplFreeMint", + interface_name: "ark_tokens::erc721_royalty::IFreeMint", + }, + { + type: "interface", + name: "ark_tokens::erc721_royalty::IFreeMint", + items: [ + { + type: "function", + name: "mint", + inputs: [ + { + name: "recipient", + type: "core::starknet::contract_address::ContractAddress", + }, + { name: "token_uri", type: "core::felt252" }, + ], + outputs: [], + state_mutability: "external", + }, + { + type: "function", + name: "get_current_token_id", + inputs: [], + outputs: [{ type: "core::felt252" }], + state_mutability: "view", + }, + ], + }, + { + type: "impl", + name: "ERC721MixinImpl", + interface_name: "openzeppelin::token::erc721::interface::ERC721ABI", + }, + { + type: "struct", + name: "core::integer::u256", + members: [ + { name: "low", type: "core::integer::u128" }, + { name: "high", type: "core::integer::u128" }, + ], + }, + { + type: "struct", + name: "core::array::Span::", + members: [ + { name: "snapshot", type: "@core::array::Array::" }, + ], + }, + { + type: "enum", + name: "core::bool", + variants: [ + { name: "False", type: "()" }, + { name: "True", type: "()" }, + ], + }, + { + type: "struct", + name: "core::byte_array::ByteArray", + members: [ + { name: "data", type: "core::array::Array::" }, + { name: "pending_word", type: "core::felt252" }, + { name: "pending_word_len", type: "core::integer::u32" }, + ], + }, + { + type: "interface", + name: "openzeppelin::token::erc721::interface::ERC721ABI", + items: [ + { + type: "function", + name: "balance_of", + inputs: [ + { + name: "account", + type: "core::starknet::contract_address::ContractAddress", + }, + ], + outputs: [{ type: "core::integer::u256" }], + state_mutability: "view", + }, + { + type: "function", + name: "owner_of", + inputs: [{ name: "token_id", type: "core::integer::u256" }], + outputs: [ + { type: "core::starknet::contract_address::ContractAddress" }, + ], + state_mutability: "view", + }, + { + type: "function", + name: "safe_transfer_from", + inputs: [ + { + name: "from", + type: "core::starknet::contract_address::ContractAddress", + }, + { + name: "to", + type: "core::starknet::contract_address::ContractAddress", + }, + { name: "token_id", type: "core::integer::u256" }, + { name: "data", type: "core::array::Span::" }, + ], + outputs: [], + state_mutability: "external", + }, + { + type: "function", + name: "transfer_from", + inputs: [ + { + name: "from", + type: "core::starknet::contract_address::ContractAddress", + }, + { + name: "to", + type: "core::starknet::contract_address::ContractAddress", + }, + { name: "token_id", type: "core::integer::u256" }, + ], + outputs: [], + state_mutability: "external", + }, + { + type: "function", + name: "approve", + inputs: [ + { + name: "to", + type: "core::starknet::contract_address::ContractAddress", + }, + { name: "token_id", type: "core::integer::u256" }, + ], + outputs: [], + state_mutability: "external", + }, + { + type: "function", + name: "set_approval_for_all", + inputs: [ + { + name: "operator", + type: "core::starknet::contract_address::ContractAddress", + }, + { name: "approved", type: "core::bool" }, + ], + outputs: [], + state_mutability: "external", + }, + { + type: "function", + name: "get_approved", + inputs: [{ name: "token_id", type: "core::integer::u256" }], + outputs: [ + { type: "core::starknet::contract_address::ContractAddress" }, + ], + state_mutability: "view", + }, + { + type: "function", + name: "is_approved_for_all", + inputs: [ + { + name: "owner", + type: "core::starknet::contract_address::ContractAddress", + }, + { + name: "operator", + type: "core::starknet::contract_address::ContractAddress", + }, + ], + outputs: [{ type: "core::bool" }], + state_mutability: "view", + }, + { + type: "function", + name: "supports_interface", + inputs: [{ name: "interface_id", type: "core::felt252" }], + outputs: [{ type: "core::bool" }], + state_mutability: "view", + }, + { + type: "function", + name: "name", + inputs: [], + outputs: [{ type: "core::byte_array::ByteArray" }], + state_mutability: "view", + }, + { + type: "function", + name: "symbol", + inputs: [], + outputs: [{ type: "core::byte_array::ByteArray" }], + state_mutability: "view", + }, + { + type: "function", + name: "token_uri", + inputs: [{ name: "token_id", type: "core::integer::u256" }], + outputs: [{ type: "core::byte_array::ByteArray" }], + state_mutability: "view", + }, + { + type: "function", + name: "balanceOf", + inputs: [ + { + name: "account", + type: "core::starknet::contract_address::ContractAddress", + }, + ], + outputs: [{ type: "core::integer::u256" }], + state_mutability: "view", + }, + { + type: "function", + name: "ownerOf", + inputs: [{ name: "tokenId", type: "core::integer::u256" }], + outputs: [ + { type: "core::starknet::contract_address::ContractAddress" }, + ], + state_mutability: "view", + }, + { + type: "function", + name: "safeTransferFrom", + inputs: [ + { + name: "from", + type: "core::starknet::contract_address::ContractAddress", + }, + { + name: "to", + type: "core::starknet::contract_address::ContractAddress", + }, + { name: "tokenId", type: "core::integer::u256" }, + { name: "data", type: "core::array::Span::" }, + ], + outputs: [], + state_mutability: "external", + }, + { + type: "function", + name: "transferFrom", + inputs: [ + { + name: "from", + type: "core::starknet::contract_address::ContractAddress", + }, + { + name: "to", + type: "core::starknet::contract_address::ContractAddress", + }, + { name: "tokenId", type: "core::integer::u256" }, + ], + outputs: [], + state_mutability: "external", + }, + { + type: "function", + name: "setApprovalForAll", + inputs: [ + { + name: "operator", + type: "core::starknet::contract_address::ContractAddress", + }, + { name: "approved", type: "core::bool" }, + ], + outputs: [], + state_mutability: "external", + }, + { + type: "function", + name: "getApproved", + inputs: [{ name: "tokenId", type: "core::integer::u256" }], + outputs: [ + { type: "core::starknet::contract_address::ContractAddress" }, + ], + state_mutability: "view", + }, + { + type: "function", + name: "isApprovedForAll", + inputs: [ + { + name: "owner", + type: "core::starknet::contract_address::ContractAddress", + }, + { + name: "operator", + type: "core::starknet::contract_address::ContractAddress", + }, + ], + outputs: [{ type: "core::bool" }], + state_mutability: "view", + }, + { + type: "function", + name: "tokenURI", + inputs: [{ name: "tokenId", type: "core::integer::u256" }], + outputs: [{ type: "core::byte_array::ByteArray" }], + state_mutability: "view", + }, + ], + }, + { + type: "impl", + name: "ERC2981", + interface_name: "ark_oz::erc2981::interface::IERC2981", + }, + { + type: "interface", + name: "ark_oz::erc2981::interface::IERC2981", + items: [ + { + type: "function", + name: "royalty_info", + inputs: [ + { name: "token_id", type: "core::integer::u256" }, + { name: "sale_price", type: "core::integer::u256" }, + ], + outputs: [ + { + type: "(core::starknet::contract_address::ContractAddress, core::integer::u256)", + }, + ], + state_mutability: "view", + }, + ], + }, + { + type: "impl", + name: "ERC2981Setup", + interface_name: "ark_oz::erc2981::interface::IERC2981Setup", + }, + { + type: "struct", + name: "ark_oz::erc2981::fees::FeesRatio", + members: [ + { name: "numerator", type: "core::integer::u256" }, + { name: "denominator", type: "core::integer::u256" }, + ], + }, + { + type: "interface", + name: "ark_oz::erc2981::interface::IERC2981Setup", + items: [ + { + type: "function", + name: "default_royalty", + inputs: [], + outputs: [ + { + type: "(core::starknet::contract_address::ContractAddress, ark_oz::erc2981::fees::FeesRatio)", + }, + ], + state_mutability: "view", + }, + { + type: "function", + name: "set_default_royalty", + inputs: [ + { + name: "receiver", + type: "core::starknet::contract_address::ContractAddress", + }, + { name: "fees_ratio", type: "ark_oz::erc2981::fees::FeesRatio" }, + ], + outputs: [], + state_mutability: "external", + }, + { + type: "function", + name: "token_royalty", + inputs: [{ name: "token_id", type: "core::integer::u256" }], + outputs: [ + { + type: "(core::starknet::contract_address::ContractAddress, ark_oz::erc2981::fees::FeesRatio)", + }, + ], + state_mutability: "view", + }, + { + type: "function", + name: "set_token_royalty", + inputs: [ + { name: "token_id", type: "core::integer::u256" }, + { + name: "receiver", + type: "core::starknet::contract_address::ContractAddress", + }, + { name: "fees_ratio", type: "ark_oz::erc2981::fees::FeesRatio" }, + ], + outputs: [], + state_mutability: "external", + }, + ], + }, + { + type: "impl", + name: "OwnableMixin", + interface_name: "openzeppelin::access::ownable::interface::OwnableABI", + }, + { + type: "interface", + name: "openzeppelin::access::ownable::interface::OwnableABI", + items: [ + { + type: "function", + name: "owner", + inputs: [], + outputs: [ + { type: "core::starknet::contract_address::ContractAddress" }, + ], + state_mutability: "view", + }, + { + type: "function", + name: "transfer_ownership", + inputs: [ + { + name: "new_owner", + type: "core::starknet::contract_address::ContractAddress", + }, + ], + outputs: [], + state_mutability: "external", + }, + { + type: "function", + name: "renounce_ownership", + inputs: [], + outputs: [], + state_mutability: "external", + }, + { + type: "function", + name: "transferOwnership", + inputs: [ + { + name: "newOwner", + type: "core::starknet::contract_address::ContractAddress", + }, + ], + outputs: [], + state_mutability: "external", + }, + { + type: "function", + name: "renounceOwnership", + inputs: [], + outputs: [], + state_mutability: "external", + }, + ], + }, + { + type: "constructor", + name: "constructor", + inputs: [ + { name: "name", type: "core::byte_array::ByteArray" }, + { name: "symbol", type: "core::byte_array::ByteArray" }, + { name: "base_uri", type: "core::byte_array::ByteArray" }, + { + name: "owner", + type: "core::starknet::contract_address::ContractAddress", + }, + ], + }, + { + type: "event", + name: "openzeppelin::token::erc721::erc721::ERC721Component::Transfer", + kind: "struct", + members: [ + { + name: "from", + type: "core::starknet::contract_address::ContractAddress", + kind: "key", + }, + { + name: "to", + type: "core::starknet::contract_address::ContractAddress", + kind: "key", + }, + { name: "token_id", type: "core::integer::u256", kind: "key" }, + ], + }, + { + type: "event", + name: "openzeppelin::token::erc721::erc721::ERC721Component::Approval", + kind: "struct", + members: [ + { + name: "owner", + type: "core::starknet::contract_address::ContractAddress", + kind: "key", + }, + { + name: "approved", + type: "core::starknet::contract_address::ContractAddress", + kind: "key", + }, + { name: "token_id", type: "core::integer::u256", kind: "key" }, + ], + }, + { + type: "event", + name: "openzeppelin::token::erc721::erc721::ERC721Component::ApprovalForAll", + kind: "struct", + members: [ + { + name: "owner", + type: "core::starknet::contract_address::ContractAddress", + kind: "key", + }, + { + name: "operator", + type: "core::starknet::contract_address::ContractAddress", + kind: "key", + }, + { name: "approved", type: "core::bool", kind: "data" }, + ], + }, + { + type: "event", + name: "openzeppelin::token::erc721::erc721::ERC721Component::Event", + kind: "enum", + variants: [ + { + name: "Transfer", + type: "openzeppelin::token::erc721::erc721::ERC721Component::Transfer", + kind: "nested", + }, + { + name: "Approval", + type: "openzeppelin::token::erc721::erc721::ERC721Component::Approval", + kind: "nested", + }, + { + name: "ApprovalForAll", + type: "openzeppelin::token::erc721::erc721::ERC721Component::ApprovalForAll", + kind: "nested", + }, + ], + }, + { + type: "event", + name: "ark_oz::erc2981::erc2981::ERC2981Component::TokenRoyaltyUpdated", + kind: "struct", + members: [ + { name: "token_id", type: "core::integer::u256", kind: "key" }, + { + name: "fees_ratio", + type: "ark_oz::erc2981::fees::FeesRatio", + kind: "data", + }, + { + name: "receiver", + type: "core::starknet::contract_address::ContractAddress", + kind: "data", + }, + ], + }, + { + type: "event", + name: "ark_oz::erc2981::erc2981::ERC2981Component::DefaultRoyaltyUpdated", + kind: "struct", + members: [ + { + name: "fees_ratio", + type: "ark_oz::erc2981::fees::FeesRatio", + kind: "data", + }, + { + name: "receiver", + type: "core::starknet::contract_address::ContractAddress", + kind: "data", + }, + ], + }, + { + type: "event", + name: "ark_oz::erc2981::erc2981::ERC2981Component::Event", + kind: "enum", + variants: [ + { + name: "TokenRoyaltyUpdated", + type: "ark_oz::erc2981::erc2981::ERC2981Component::TokenRoyaltyUpdated", + kind: "nested", + }, + { + name: "DefaultRoyaltyUpdated", + type: "ark_oz::erc2981::erc2981::ERC2981Component::DefaultRoyaltyUpdated", + kind: "nested", + }, + ], + }, + { + type: "event", + name: "openzeppelin::introspection::src5::SRC5Component::Event", + kind: "enum", + variants: [], + }, + { + type: "event", + name: "openzeppelin::access::ownable::ownable::OwnableComponent::OwnershipTransferred", + kind: "struct", + members: [ + { + name: "previous_owner", + type: "core::starknet::contract_address::ContractAddress", + kind: "key", + }, + { + name: "new_owner", + type: "core::starknet::contract_address::ContractAddress", + kind: "key", + }, + ], + }, + { + type: "event", + name: "openzeppelin::access::ownable::ownable::OwnableComponent::OwnershipTransferStarted", + kind: "struct", + members: [ + { + name: "previous_owner", + type: "core::starknet::contract_address::ContractAddress", + kind: "key", + }, + { + name: "new_owner", + type: "core::starknet::contract_address::ContractAddress", + kind: "key", + }, + ], + }, + { + type: "event", + name: "openzeppelin::access::ownable::ownable::OwnableComponent::Event", + kind: "enum", + variants: [ + { + name: "OwnershipTransferred", + type: "openzeppelin::access::ownable::ownable::OwnableComponent::OwnershipTransferred", + kind: "nested", + }, + { + name: "OwnershipTransferStarted", + type: "openzeppelin::access::ownable::ownable::OwnableComponent::OwnershipTransferStarted", + kind: "nested", + }, + ], + }, + { + type: "event", + name: "ark_tokens::erc721_royalty::FreeMintNFTRoyalty::Event", + kind: "enum", + variants: [ + { + name: "ERC721Event", + type: "openzeppelin::token::erc721::erc721::ERC721Component::Event", + kind: "flat", + }, + { + name: "ERC2981Event", + type: "ark_oz::erc2981::erc2981::ERC2981Component::Event", + kind: "flat", + }, + { + name: "SRC5Event", + type: "openzeppelin::introspection::src5::SRC5Component::Event", + kind: "flat", + }, + { + name: "OwnableEvent", + type: "openzeppelin::access::ownable::ownable::OwnableComponent::Event", + kind: "flat", + }, + ], + }, +] as const; diff --git a/packages/core/src/abis/ark_starknet_appchain_messaging.ts b/packages/core/src/abis/ark_starknet_appchain_messaging.ts new file mode 100644 index 000000000..ebd59e409 --- /dev/null +++ b/packages/core/src/abis/ark_starknet_appchain_messaging.ts @@ -0,0 +1,255 @@ +/** + * This file is autogenerated by + * You should not edit it manually or your changes might be overwritten. + */ + +export default [ + { + type: "impl", + name: "AppchainMessagingUpgradeImpl", + interface_name: "ark_starknet::appchain_messaging::IUpgradeable", + }, + { + type: "interface", + name: "ark_starknet::appchain_messaging::IUpgradeable", + items: [ + { + type: "function", + name: "upgrade", + inputs: [ + { name: "class_hash", type: "core::starknet::class_hash::ClassHash" }, + ], + outputs: [], + state_mutability: "external", + }, + ], + }, + { + type: "impl", + name: "AppchainMessagingImpl", + interface_name: "ark_starknet::appchain_messaging::IAppchainMessaging", + }, + { + type: "struct", + name: "core::array::Span::", + members: [ + { name: "snapshot", type: "@core::array::Array::" }, + ], + }, + { + type: "interface", + name: "ark_starknet::appchain_messaging::IAppchainMessaging", + items: [ + { + type: "function", + name: "update_appchain_account_address", + inputs: [ + { + name: "appchain_address", + type: "core::starknet::contract_address::ContractAddress", + }, + ], + outputs: [], + state_mutability: "external", + }, + { + type: "function", + name: "send_message_to_appchain", + inputs: [ + { + name: "to_address", + type: "core::starknet::contract_address::ContractAddress", + }, + { name: "selector", type: "core::felt252" }, + { name: "payload", type: "core::array::Span::" }, + ], + outputs: [{ type: "(core::felt252, core::felt252)" }], + state_mutability: "external", + }, + { + type: "function", + name: "add_messages_hashes_from_appchain", + inputs: [ + { + name: "messages_hashes", + type: "core::array::Span::", + }, + ], + outputs: [], + state_mutability: "external", + }, + { + type: "function", + name: "consume_message_from_appchain", + inputs: [ + { + name: "from_address", + type: "core::starknet::contract_address::ContractAddress", + }, + { name: "payload", type: "core::array::Span::" }, + ], + outputs: [{ type: "core::felt252" }], + state_mutability: "external", + }, + { + type: "function", + name: "execute_message_from_appchain", + inputs: [ + { + name: "from_address", + type: "core::starknet::contract_address::ContractAddress", + }, + { + name: "to_address", + type: "core::starknet::contract_address::ContractAddress", + }, + { name: "selector", type: "core::felt252" }, + { name: "payload", type: "core::array::Span::" }, + ], + outputs: [], + state_mutability: "external", + }, + ], + }, + { + type: "constructor", + name: "constructor", + inputs: [ + { + name: "owner", + type: "core::starknet::contract_address::ContractAddress", + }, + { + name: "appchain_account", + type: "core::starknet::contract_address::ContractAddress", + }, + ], + }, + { + type: "event", + name: "ark_starknet::appchain_messaging::appchain_messaging::MessageSentToAppchain", + kind: "struct", + members: [ + { name: "message_hash", type: "core::felt252", kind: "key" }, + { + name: "from", + type: "core::starknet::contract_address::ContractAddress", + kind: "key", + }, + { + name: "to", + type: "core::starknet::contract_address::ContractAddress", + kind: "key", + }, + { name: "selector", type: "core::felt252", kind: "data" }, + { name: "nonce", type: "core::felt252", kind: "data" }, + { + name: "payload", + type: "core::array::Span::", + kind: "data", + }, + ], + }, + { + type: "event", + name: "ark_starknet::appchain_messaging::appchain_messaging::MessagesRegisteredFromAppchain", + kind: "struct", + members: [ + { + name: "messages_hashes", + type: "core::array::Span::", + kind: "data", + }, + ], + }, + { + type: "event", + name: "ark_starknet::appchain_messaging::appchain_messaging::MessageConsumed", + kind: "struct", + members: [ + { name: "message_hash", type: "core::felt252", kind: "key" }, + { + name: "from", + type: "core::starknet::contract_address::ContractAddress", + kind: "key", + }, + { + name: "to", + type: "core::starknet::contract_address::ContractAddress", + kind: "key", + }, + { + name: "payload", + type: "core::array::Span::", + kind: "data", + }, + ], + }, + { + type: "event", + name: "ark_starknet::appchain_messaging::appchain_messaging::MessageExecuted", + kind: "struct", + members: [ + { + name: "from_address", + type: "core::starknet::contract_address::ContractAddress", + kind: "key", + }, + { + name: "to_address", + type: "core::starknet::contract_address::ContractAddress", + kind: "key", + }, + { name: "selector", type: "core::felt252", kind: "key" }, + { + name: "payload", + type: "core::array::Span::", + kind: "data", + }, + ], + }, + { + type: "event", + name: "ark_starknet::appchain_messaging::appchain_messaging::Upgraded", + kind: "struct", + members: [ + { + name: "class_hash", + type: "core::starknet::class_hash::ClassHash", + kind: "data", + }, + ], + }, + { + type: "event", + name: "ark_starknet::appchain_messaging::appchain_messaging::Event", + kind: "enum", + variants: [ + { + name: "MessageSentToAppchain", + type: "ark_starknet::appchain_messaging::appchain_messaging::MessageSentToAppchain", + kind: "nested", + }, + { + name: "MessagesRegisteredFromAppchain", + type: "ark_starknet::appchain_messaging::appchain_messaging::MessagesRegisteredFromAppchain", + kind: "nested", + }, + { + name: "MessageConsumed", + type: "ark_starknet::appchain_messaging::appchain_messaging::MessageConsumed", + kind: "nested", + }, + { + name: "MessageExecuted", + type: "ark_starknet::appchain_messaging::appchain_messaging::MessageExecuted", + kind: "nested", + }, + { + name: "Upgraded", + type: "ark_starknet::appchain_messaging::appchain_messaging::Upgraded", + kind: "nested", + }, + ], + }, +] as const; diff --git a/packages/core/src/abis/ark_starknet_executor.ts b/packages/core/src/abis/ark_starknet_executor.ts new file mode 100644 index 000000000..48f860124 --- /dev/null +++ b/packages/core/src/abis/ark_starknet_executor.ts @@ -0,0 +1,564 @@ +/** + * This file is autogenerated by + * You should not edit it manually or your changes might be overwritten. + */ + +export default [ + { + type: "impl", + name: "ExecutorImpl", + interface_name: "ark_starknet::interfaces::IExecutor", + }, + { + type: "enum", + name: "core::option::Option::", + variants: [ + { name: "Some", type: "core::felt252" }, + { name: "None", type: "()" }, + ], + }, + { + type: "struct", + name: "core::integer::u256", + members: [ + { name: "low", type: "core::integer::u128" }, + { name: "high", type: "core::integer::u128" }, + ], + }, + { + type: "enum", + name: "core::option::Option::", + variants: [ + { name: "Some", type: "core::integer::u256" }, + { name: "None", type: "()" }, + ], + }, + { + type: "struct", + name: "ark_common::protocol::order_types::FulfillInfo", + members: [ + { name: "order_hash", type: "core::felt252" }, + { + name: "related_order_hash", + type: "core::option::Option::", + }, + { + name: "fulfiller", + type: "core::starknet::contract_address::ContractAddress", + }, + { name: "token_chain_id", type: "core::felt252" }, + { + name: "token_address", + type: "core::starknet::contract_address::ContractAddress", + }, + { name: "token_id", type: "core::option::Option::" }, + { + name: "fulfill_broker_address", + type: "core::starknet::contract_address::ContractAddress", + }, + ], + }, + { + type: "struct", + name: "ark_common::protocol::order_types::CancelInfo", + members: [ + { name: "order_hash", type: "core::felt252" }, + { + name: "canceller", + type: "core::starknet::contract_address::ContractAddress", + }, + { name: "token_chain_id", type: "core::felt252" }, + { + name: "token_address", + type: "core::starknet::contract_address::ContractAddress", + }, + { name: "token_id", type: "core::option::Option::" }, + ], + }, + { + type: "enum", + name: "ark_common::protocol::order_types::RouteType", + variants: [ + { name: "Erc20ToErc721", type: "()" }, + { name: "Erc721ToErc20", type: "()" }, + ], + }, + { + type: "struct", + name: "core::array::Span::", + members: [ + { name: "snapshot", type: "@core::array::Array::" }, + ], + }, + { + type: "struct", + name: "ark_common::protocol::order_v1::OrderV1", + members: [ + { name: "route", type: "ark_common::protocol::order_types::RouteType" }, + { + name: "currency_address", + type: "core::starknet::contract_address::ContractAddress", + }, + { name: "currency_chain_id", type: "core::felt252" }, + { name: "salt", type: "core::felt252" }, + { + name: "offerer", + type: "core::starknet::contract_address::ContractAddress", + }, + { name: "token_chain_id", type: "core::felt252" }, + { + name: "token_address", + type: "core::starknet::contract_address::ContractAddress", + }, + { name: "token_id", type: "core::option::Option::" }, + { name: "quantity", type: "core::integer::u256" }, + { name: "start_amount", type: "core::integer::u256" }, + { name: "end_amount", type: "core::integer::u256" }, + { name: "start_date", type: "core::integer::u64" }, + { name: "end_date", type: "core::integer::u64" }, + { + name: "broker_id", + type: "core::starknet::contract_address::ContractAddress", + }, + { name: "additional_data", type: "core::array::Span::" }, + ], + }, + { + type: "struct", + name: "ark_common::protocol::order_types::ExecutionInfo", + members: [ + { name: "order_hash", type: "core::felt252" }, + { + name: "nft_address", + type: "core::starknet::contract_address::ContractAddress", + }, + { + name: "nft_from", + type: "core::starknet::contract_address::ContractAddress", + }, + { + name: "nft_to", + type: "core::starknet::contract_address::ContractAddress", + }, + { name: "nft_token_id", type: "core::integer::u256" }, + { + name: "payment_from", + type: "core::starknet::contract_address::ContractAddress", + }, + { + name: "payment_to", + type: "core::starknet::contract_address::ContractAddress", + }, + { name: "payment_amount", type: "core::integer::u256" }, + { + name: "payment_currency_address", + type: "core::starknet::contract_address::ContractAddress", + }, + { name: "payment_currency_chain_id", type: "core::felt252" }, + { + name: "listing_broker_address", + type: "core::starknet::contract_address::ContractAddress", + }, + { + name: "fulfill_broker_address", + type: "core::starknet::contract_address::ContractAddress", + }, + ], + }, + { + type: "struct", + name: "ark_oz::erc2981::fees::FeesRatio", + members: [ + { name: "numerator", type: "core::integer::u256" }, + { name: "denominator", type: "core::integer::u256" }, + ], + }, + { + type: "struct", + name: "ark_starknet::interfaces::FeesAmount", + members: [ + { name: "fulfill_broker", type: "core::integer::u256" }, + { name: "listing_broker", type: "core::integer::u256" }, + { name: "ark", type: "core::integer::u256" }, + { name: "creator", type: "core::integer::u256" }, + ], + }, + { + type: "interface", + name: "ark_starknet::interfaces::IExecutor", + items: [ + { + type: "function", + name: "fulfill_order", + inputs: [ + { + name: "fulfillInfo", + type: "ark_common::protocol::order_types::FulfillInfo", + }, + ], + outputs: [], + state_mutability: "external", + }, + { + type: "function", + name: "cancel_order", + inputs: [ + { + name: "cancelInfo", + type: "ark_common::protocol::order_types::CancelInfo", + }, + ], + outputs: [], + state_mutability: "external", + }, + { + type: "function", + name: "create_order", + inputs: [ + { name: "order", type: "ark_common::protocol::order_v1::OrderV1" }, + ], + outputs: [], + state_mutability: "external", + }, + { + type: "function", + name: "execute_order", + inputs: [ + { + name: "execution_info", + type: "ark_common::protocol::order_types::ExecutionInfo", + }, + ], + outputs: [], + state_mutability: "external", + }, + { + type: "function", + name: "update_admin_address", + inputs: [ + { + name: "admin_address", + type: "core::starknet::contract_address::ContractAddress", + }, + ], + outputs: [], + state_mutability: "external", + }, + { + type: "function", + name: "update_orderbook_address", + inputs: [ + { + name: "orderbook_address", + type: "core::starknet::contract_address::ContractAddress", + }, + ], + outputs: [], + state_mutability: "external", + }, + { + type: "function", + name: "update_eth_address", + inputs: [ + { + name: "eth_address", + type: "core::starknet::contract_address::ContractAddress", + }, + ], + outputs: [], + state_mutability: "external", + }, + { + type: "function", + name: "update_messaging_address", + inputs: [ + { + name: "msger_address", + type: "core::starknet::contract_address::ContractAddress", + }, + ], + outputs: [], + state_mutability: "external", + }, + { + type: "function", + name: "get_messaging_address", + inputs: [], + outputs: [ + { type: "core::starknet::contract_address::ContractAddress" }, + ], + state_mutability: "view", + }, + { + type: "function", + name: "get_orderbook_address", + inputs: [], + outputs: [ + { type: "core::starknet::contract_address::ContractAddress" }, + ], + state_mutability: "view", + }, + { + type: "function", + name: "update_arkchain_orderbook_address", + inputs: [ + { + name: "orderbook_address", + type: "core::starknet::contract_address::ContractAddress", + }, + ], + outputs: [], + state_mutability: "external", + }, + { + type: "function", + name: "set_broker_fees", + inputs: [ + { name: "fees_ratio", type: "ark_oz::erc2981::fees::FeesRatio" }, + ], + outputs: [], + state_mutability: "external", + }, + { + type: "function", + name: "get_broker_fees", + inputs: [ + { + name: "broker_address", + type: "core::starknet::contract_address::ContractAddress", + }, + ], + outputs: [{ type: "ark_oz::erc2981::fees::FeesRatio" }], + state_mutability: "view", + }, + { + type: "function", + name: "set_ark_fees", + inputs: [ + { name: "fees_ratio", type: "ark_oz::erc2981::fees::FeesRatio" }, + ], + outputs: [], + state_mutability: "external", + }, + { + type: "function", + name: "get_ark_fees", + inputs: [], + outputs: [{ type: "ark_oz::erc2981::fees::FeesRatio" }], + state_mutability: "view", + }, + { + type: "function", + name: "get_default_creator_fees", + inputs: [], + outputs: [ + { + type: "(core::starknet::contract_address::ContractAddress, ark_oz::erc2981::fees::FeesRatio)", + }, + ], + state_mutability: "view", + }, + { + type: "function", + name: "set_default_creator_fees", + inputs: [ + { + name: "receiver", + type: "core::starknet::contract_address::ContractAddress", + }, + { name: "fees_ratio", type: "ark_oz::erc2981::fees::FeesRatio" }, + ], + outputs: [], + state_mutability: "external", + }, + { + type: "function", + name: "get_collection_creator_fees", + inputs: [ + { + name: "nft_address", + type: "core::starknet::contract_address::ContractAddress", + }, + ], + outputs: [ + { + type: "(core::starknet::contract_address::ContractAddress, ark_oz::erc2981::fees::FeesRatio)", + }, + ], + state_mutability: "view", + }, + { + type: "function", + name: "set_collection_creator_fees", + inputs: [ + { + name: "nft_address", + type: "core::starknet::contract_address::ContractAddress", + }, + { + name: "receiver", + type: "core::starknet::contract_address::ContractAddress", + }, + { name: "fees_ratio", type: "ark_oz::erc2981::fees::FeesRatio" }, + ], + outputs: [], + state_mutability: "external", + }, + { + type: "function", + name: "get_fees_amount", + inputs: [ + { + name: "fulfill_broker", + type: "core::starknet::contract_address::ContractAddress", + }, + { + name: "listing_broker", + type: "core::starknet::contract_address::ContractAddress", + }, + { + name: "nft_address", + type: "core::starknet::contract_address::ContractAddress", + }, + { name: "nft_token_id", type: "core::integer::u256" }, + { name: "payment_amount", type: "core::integer::u256" }, + ], + outputs: [{ type: "ark_starknet::interfaces::FeesAmount" }], + state_mutability: "view", + }, + ], + }, + { + type: "impl", + name: "ExecutorUpgradeImpl", + interface_name: "ark_starknet::interfaces::IUpgradable", + }, + { + type: "interface", + name: "ark_starknet::interfaces::IUpgradable", + items: [ + { + type: "function", + name: "upgrade", + inputs: [ + { name: "class_hash", type: "core::starknet::class_hash::ClassHash" }, + ], + outputs: [], + state_mutability: "external", + }, + ], + }, + { + type: "impl", + name: "ExecutorMaintenanceImpl", + interface_name: "ark_starknet::interfaces::IMaintenance", + }, + { + type: "enum", + name: "core::bool", + variants: [ + { name: "False", type: "()" }, + { name: "True", type: "()" }, + ], + }, + { + type: "interface", + name: "ark_starknet::interfaces::IMaintenance", + items: [ + { + type: "function", + name: "is_in_maintenance", + inputs: [], + outputs: [{ type: "core::bool" }], + state_mutability: "view", + }, + { + type: "function", + name: "set_maintenance_mode", + inputs: [{ name: "on", type: "core::bool" }], + outputs: [], + state_mutability: "external", + }, + ], + }, + { + type: "constructor", + name: "constructor", + inputs: [ + { + name: "admin_address", + type: "core::starknet::contract_address::ContractAddress", + }, + { + name: "eth_contract_address", + type: "core::starknet::contract_address::ContractAddress", + }, + { + name: "messaging_address", + type: "core::starknet::contract_address::ContractAddress", + }, + { name: "chain_id", type: "core::felt252" }, + ], + }, + { + type: "event", + name: "ark_starknet::executor::executor::OrderExecuted", + kind: "struct", + members: [ + { name: "order_hash", type: "core::felt252", kind: "key" }, + { name: "transaction_hash", type: "core::felt252", kind: "key" }, + { name: "block_timestamp", type: "core::integer::u64", kind: "data" }, + ], + }, + { + type: "event", + name: "ark_starknet::executor::executor::CollectionFallbackFees", + kind: "struct", + members: [ + { + name: "collection", + type: "core::starknet::contract_address::ContractAddress", + kind: "key", + }, + { name: "amount", type: "core::integer::u256", kind: "key" }, + { + name: "currency_contract", + type: "core::starknet::contract_address::ContractAddress", + kind: "data", + }, + { + name: "receiver", + type: "core::starknet::contract_address::ContractAddress", + kind: "data", + }, + ], + }, + { + type: "event", + name: "ark_starknet::executor::executor::ExecutorInMaintenance", + kind: "struct", + members: [{ name: "on", type: "core::bool", kind: "data" }], + }, + { + type: "event", + name: "ark_starknet::executor::executor::Event", + kind: "enum", + variants: [ + { + name: "OrderExecuted", + type: "ark_starknet::executor::executor::OrderExecuted", + kind: "nested", + }, + { + name: "CollectionFallbackFees", + type: "ark_starknet::executor::executor::CollectionFallbackFees", + kind: "nested", + }, + { + name: "ExecutorInMaintenance", + type: "ark_starknet::executor::executor::ExecutorInMaintenance", + kind: "nested", + }, + ], + }, +] as const; diff --git a/packages/core/src/abis/ark_tokens_FreeMintERC20.ts b/packages/core/src/abis/ark_tokens_FreeMintERC20.ts new file mode 100644 index 000000000..795086a9d --- /dev/null +++ b/packages/core/src/abis/ark_tokens_FreeMintERC20.ts @@ -0,0 +1,298 @@ +/** + * This file is autogenerated by + * You should not edit it manually or your changes might be overwritten. + */ + +export default [ + { + type: "impl", + name: "ImplFreeMint", + interface_name: "ark_tokens::erc20::IFreeMint", + }, + { + type: "struct", + name: "core::integer::u256", + members: [ + { name: "low", type: "core::integer::u128" }, + { name: "high", type: "core::integer::u128" }, + ], + }, + { + type: "interface", + name: "ark_tokens::erc20::IFreeMint", + items: [ + { + type: "function", + name: "mint", + inputs: [ + { + name: "recipient", + type: "core::starknet::contract_address::ContractAddress", + }, + { name: "amount", type: "core::integer::u256" }, + ], + outputs: [], + state_mutability: "external", + }, + ], + }, + { + type: "impl", + name: "ERC20Impl", + interface_name: "openzeppelin::token::erc20::interface::IERC20", + }, + { + type: "enum", + name: "core::bool", + variants: [ + { name: "False", type: "()" }, + { name: "True", type: "()" }, + ], + }, + { + type: "interface", + name: "openzeppelin::token::erc20::interface::IERC20", + items: [ + { + type: "function", + name: "total_supply", + inputs: [], + outputs: [{ type: "core::integer::u256" }], + state_mutability: "view", + }, + { + type: "function", + name: "balance_of", + inputs: [ + { + name: "account", + type: "core::starknet::contract_address::ContractAddress", + }, + ], + outputs: [{ type: "core::integer::u256" }], + state_mutability: "view", + }, + { + type: "function", + name: "allowance", + inputs: [ + { + name: "owner", + type: "core::starknet::contract_address::ContractAddress", + }, + { + name: "spender", + type: "core::starknet::contract_address::ContractAddress", + }, + ], + outputs: [{ type: "core::integer::u256" }], + state_mutability: "view", + }, + { + type: "function", + name: "transfer", + inputs: [ + { + name: "recipient", + type: "core::starknet::contract_address::ContractAddress", + }, + { name: "amount", type: "core::integer::u256" }, + ], + outputs: [{ type: "core::bool" }], + state_mutability: "external", + }, + { + type: "function", + name: "transfer_from", + inputs: [ + { + name: "sender", + type: "core::starknet::contract_address::ContractAddress", + }, + { + name: "recipient", + type: "core::starknet::contract_address::ContractAddress", + }, + { name: "amount", type: "core::integer::u256" }, + ], + outputs: [{ type: "core::bool" }], + state_mutability: "external", + }, + { + type: "function", + name: "approve", + inputs: [ + { + name: "spender", + type: "core::starknet::contract_address::ContractAddress", + }, + { name: "amount", type: "core::integer::u256" }, + ], + outputs: [{ type: "core::bool" }], + state_mutability: "external", + }, + ], + }, + { + type: "impl", + name: "ERC20MetadataImpl", + interface_name: "openzeppelin::token::erc20::interface::IERC20Metadata", + }, + { + type: "struct", + name: "core::byte_array::ByteArray", + members: [ + { name: "data", type: "core::array::Array::" }, + { name: "pending_word", type: "core::felt252" }, + { name: "pending_word_len", type: "core::integer::u32" }, + ], + }, + { + type: "interface", + name: "openzeppelin::token::erc20::interface::IERC20Metadata", + items: [ + { + type: "function", + name: "name", + inputs: [], + outputs: [{ type: "core::byte_array::ByteArray" }], + state_mutability: "view", + }, + { + type: "function", + name: "symbol", + inputs: [], + outputs: [{ type: "core::byte_array::ByteArray" }], + state_mutability: "view", + }, + { + type: "function", + name: "decimals", + inputs: [], + outputs: [{ type: "core::integer::u8" }], + state_mutability: "view", + }, + ], + }, + { + type: "impl", + name: "ERC20CamelOnlyImpl", + interface_name: "openzeppelin::token::erc20::interface::IERC20CamelOnly", + }, + { + type: "interface", + name: "openzeppelin::token::erc20::interface::IERC20CamelOnly", + items: [ + { + type: "function", + name: "totalSupply", + inputs: [], + outputs: [{ type: "core::integer::u256" }], + state_mutability: "view", + }, + { + type: "function", + name: "balanceOf", + inputs: [ + { + name: "account", + type: "core::starknet::contract_address::ContractAddress", + }, + ], + outputs: [{ type: "core::integer::u256" }], + state_mutability: "view", + }, + { + type: "function", + name: "transferFrom", + inputs: [ + { + name: "sender", + type: "core::starknet::contract_address::ContractAddress", + }, + { + name: "recipient", + type: "core::starknet::contract_address::ContractAddress", + }, + { name: "amount", type: "core::integer::u256" }, + ], + outputs: [{ type: "core::bool" }], + state_mutability: "external", + }, + ], + }, + { + type: "constructor", + name: "constructor", + inputs: [ + { name: "initial_supply", type: "core::integer::u256" }, + { name: "name", type: "core::byte_array::ByteArray" }, + { name: "symbol", type: "core::byte_array::ByteArray" }, + ], + }, + { + type: "event", + name: "openzeppelin::token::erc20::erc20::ERC20Component::Transfer", + kind: "struct", + members: [ + { + name: "from", + type: "core::starknet::contract_address::ContractAddress", + kind: "key", + }, + { + name: "to", + type: "core::starknet::contract_address::ContractAddress", + kind: "key", + }, + { name: "value", type: "core::integer::u256", kind: "data" }, + ], + }, + { + type: "event", + name: "openzeppelin::token::erc20::erc20::ERC20Component::Approval", + kind: "struct", + members: [ + { + name: "owner", + type: "core::starknet::contract_address::ContractAddress", + kind: "key", + }, + { + name: "spender", + type: "core::starknet::contract_address::ContractAddress", + kind: "key", + }, + { name: "value", type: "core::integer::u256", kind: "data" }, + ], + }, + { + type: "event", + name: "openzeppelin::token::erc20::erc20::ERC20Component::Event", + kind: "enum", + variants: [ + { + name: "Transfer", + type: "openzeppelin::token::erc20::erc20::ERC20Component::Transfer", + kind: "nested", + }, + { + name: "Approval", + type: "openzeppelin::token::erc20::erc20::ERC20Component::Approval", + kind: "nested", + }, + ], + }, + { + type: "event", + name: "ark_tokens::erc20::FreeMintERC20::Event", + kind: "enum", + variants: [ + { + name: "ERC20Event", + type: "openzeppelin::token::erc20::erc20::ERC20Component::Event", + kind: "flat", + }, + ], + }, +] as const; diff --git a/packages/core/src/abis/ark_tokens_FreeMintNFT.ts b/packages/core/src/abis/ark_tokens_FreeMintNFT.ts new file mode 100644 index 000000000..7c0ecbf17 --- /dev/null +++ b/packages/core/src/abis/ark_tokens_FreeMintNFT.ts @@ -0,0 +1,425 @@ +/** + * This file is autogenerated by + * You should not edit it manually or your changes might be overwritten. + */ + +export default [ + { + type: "impl", + name: "ImplFreeMint", + interface_name: "ark_tokens::erc721::IFreeMint", + }, + { + type: "interface", + name: "ark_tokens::erc721::IFreeMint", + items: [ + { + type: "function", + name: "mint", + inputs: [ + { + name: "recipient", + type: "core::starknet::contract_address::ContractAddress", + }, + { name: "token_uri", type: "core::felt252" }, + ], + outputs: [], + state_mutability: "external", + }, + { + type: "function", + name: "get_current_token_id", + inputs: [], + outputs: [{ type: "core::felt252" }], + state_mutability: "view", + }, + ], + }, + { + type: "impl", + name: "ERC721MixinImpl", + interface_name: "openzeppelin::token::erc721::interface::ERC721ABI", + }, + { + type: "struct", + name: "core::integer::u256", + members: [ + { name: "low", type: "core::integer::u128" }, + { name: "high", type: "core::integer::u128" }, + ], + }, + { + type: "struct", + name: "core::array::Span::", + members: [ + { name: "snapshot", type: "@core::array::Array::" }, + ], + }, + { + type: "enum", + name: "core::bool", + variants: [ + { name: "False", type: "()" }, + { name: "True", type: "()" }, + ], + }, + { + type: "struct", + name: "core::byte_array::ByteArray", + members: [ + { name: "data", type: "core::array::Array::" }, + { name: "pending_word", type: "core::felt252" }, + { name: "pending_word_len", type: "core::integer::u32" }, + ], + }, + { + type: "interface", + name: "openzeppelin::token::erc721::interface::ERC721ABI", + items: [ + { + type: "function", + name: "balance_of", + inputs: [ + { + name: "account", + type: "core::starknet::contract_address::ContractAddress", + }, + ], + outputs: [{ type: "core::integer::u256" }], + state_mutability: "view", + }, + { + type: "function", + name: "owner_of", + inputs: [{ name: "token_id", type: "core::integer::u256" }], + outputs: [ + { type: "core::starknet::contract_address::ContractAddress" }, + ], + state_mutability: "view", + }, + { + type: "function", + name: "safe_transfer_from", + inputs: [ + { + name: "from", + type: "core::starknet::contract_address::ContractAddress", + }, + { + name: "to", + type: "core::starknet::contract_address::ContractAddress", + }, + { name: "token_id", type: "core::integer::u256" }, + { name: "data", type: "core::array::Span::" }, + ], + outputs: [], + state_mutability: "external", + }, + { + type: "function", + name: "transfer_from", + inputs: [ + { + name: "from", + type: "core::starknet::contract_address::ContractAddress", + }, + { + name: "to", + type: "core::starknet::contract_address::ContractAddress", + }, + { name: "token_id", type: "core::integer::u256" }, + ], + outputs: [], + state_mutability: "external", + }, + { + type: "function", + name: "approve", + inputs: [ + { + name: "to", + type: "core::starknet::contract_address::ContractAddress", + }, + { name: "token_id", type: "core::integer::u256" }, + ], + outputs: [], + state_mutability: "external", + }, + { + type: "function", + name: "set_approval_for_all", + inputs: [ + { + name: "operator", + type: "core::starknet::contract_address::ContractAddress", + }, + { name: "approved", type: "core::bool" }, + ], + outputs: [], + state_mutability: "external", + }, + { + type: "function", + name: "get_approved", + inputs: [{ name: "token_id", type: "core::integer::u256" }], + outputs: [ + { type: "core::starknet::contract_address::ContractAddress" }, + ], + state_mutability: "view", + }, + { + type: "function", + name: "is_approved_for_all", + inputs: [ + { + name: "owner", + type: "core::starknet::contract_address::ContractAddress", + }, + { + name: "operator", + type: "core::starknet::contract_address::ContractAddress", + }, + ], + outputs: [{ type: "core::bool" }], + state_mutability: "view", + }, + { + type: "function", + name: "supports_interface", + inputs: [{ name: "interface_id", type: "core::felt252" }], + outputs: [{ type: "core::bool" }], + state_mutability: "view", + }, + { + type: "function", + name: "name", + inputs: [], + outputs: [{ type: "core::byte_array::ByteArray" }], + state_mutability: "view", + }, + { + type: "function", + name: "symbol", + inputs: [], + outputs: [{ type: "core::byte_array::ByteArray" }], + state_mutability: "view", + }, + { + type: "function", + name: "token_uri", + inputs: [{ name: "token_id", type: "core::integer::u256" }], + outputs: [{ type: "core::byte_array::ByteArray" }], + state_mutability: "view", + }, + { + type: "function", + name: "balanceOf", + inputs: [ + { + name: "account", + type: "core::starknet::contract_address::ContractAddress", + }, + ], + outputs: [{ type: "core::integer::u256" }], + state_mutability: "view", + }, + { + type: "function", + name: "ownerOf", + inputs: [{ name: "tokenId", type: "core::integer::u256" }], + outputs: [ + { type: "core::starknet::contract_address::ContractAddress" }, + ], + state_mutability: "view", + }, + { + type: "function", + name: "safeTransferFrom", + inputs: [ + { + name: "from", + type: "core::starknet::contract_address::ContractAddress", + }, + { + name: "to", + type: "core::starknet::contract_address::ContractAddress", + }, + { name: "tokenId", type: "core::integer::u256" }, + { name: "data", type: "core::array::Span::" }, + ], + outputs: [], + state_mutability: "external", + }, + { + type: "function", + name: "transferFrom", + inputs: [ + { + name: "from", + type: "core::starknet::contract_address::ContractAddress", + }, + { + name: "to", + type: "core::starknet::contract_address::ContractAddress", + }, + { name: "tokenId", type: "core::integer::u256" }, + ], + outputs: [], + state_mutability: "external", + }, + { + type: "function", + name: "setApprovalForAll", + inputs: [ + { + name: "operator", + type: "core::starknet::contract_address::ContractAddress", + }, + { name: "approved", type: "core::bool" }, + ], + outputs: [], + state_mutability: "external", + }, + { + type: "function", + name: "getApproved", + inputs: [{ name: "tokenId", type: "core::integer::u256" }], + outputs: [ + { type: "core::starknet::contract_address::ContractAddress" }, + ], + state_mutability: "view", + }, + { + type: "function", + name: "isApprovedForAll", + inputs: [ + { + name: "owner", + type: "core::starknet::contract_address::ContractAddress", + }, + { + name: "operator", + type: "core::starknet::contract_address::ContractAddress", + }, + ], + outputs: [{ type: "core::bool" }], + state_mutability: "view", + }, + { + type: "function", + name: "tokenURI", + inputs: [{ name: "tokenId", type: "core::integer::u256" }], + outputs: [{ type: "core::byte_array::ByteArray" }], + state_mutability: "view", + }, + ], + }, + { + type: "constructor", + name: "constructor", + inputs: [ + { name: "name", type: "core::byte_array::ByteArray" }, + { name: "symbol", type: "core::byte_array::ByteArray" }, + { name: "base_uri", type: "core::byte_array::ByteArray" }, + ], + }, + { + type: "event", + name: "openzeppelin::token::erc721::erc721::ERC721Component::Transfer", + kind: "struct", + members: [ + { + name: "from", + type: "core::starknet::contract_address::ContractAddress", + kind: "key", + }, + { + name: "to", + type: "core::starknet::contract_address::ContractAddress", + kind: "key", + }, + { name: "token_id", type: "core::integer::u256", kind: "key" }, + ], + }, + { + type: "event", + name: "openzeppelin::token::erc721::erc721::ERC721Component::Approval", + kind: "struct", + members: [ + { + name: "owner", + type: "core::starknet::contract_address::ContractAddress", + kind: "key", + }, + { + name: "approved", + type: "core::starknet::contract_address::ContractAddress", + kind: "key", + }, + { name: "token_id", type: "core::integer::u256", kind: "key" }, + ], + }, + { + type: "event", + name: "openzeppelin::token::erc721::erc721::ERC721Component::ApprovalForAll", + kind: "struct", + members: [ + { + name: "owner", + type: "core::starknet::contract_address::ContractAddress", + kind: "key", + }, + { + name: "operator", + type: "core::starknet::contract_address::ContractAddress", + kind: "key", + }, + { name: "approved", type: "core::bool", kind: "data" }, + ], + }, + { + type: "event", + name: "openzeppelin::token::erc721::erc721::ERC721Component::Event", + kind: "enum", + variants: [ + { + name: "Transfer", + type: "openzeppelin::token::erc721::erc721::ERC721Component::Transfer", + kind: "nested", + }, + { + name: "Approval", + type: "openzeppelin::token::erc721::erc721::ERC721Component::Approval", + kind: "nested", + }, + { + name: "ApprovalForAll", + type: "openzeppelin::token::erc721::erc721::ERC721Component::ApprovalForAll", + kind: "nested", + }, + ], + }, + { + type: "event", + name: "openzeppelin::introspection::src5::SRC5Component::Event", + kind: "enum", + variants: [], + }, + { + type: "event", + name: "ark_tokens::erc721::FreeMintNFT::Event", + kind: "enum", + variants: [ + { + name: "ERC721Event", + type: "openzeppelin::token::erc721::erc721::ERC721Component::Event", + kind: "flat", + }, + { + name: "SRC5Event", + type: "openzeppelin::introspection::src5::SRC5Component::Event", + kind: "flat", + }, + ], + }, +] as const; diff --git a/packages/core/src/abis/ark_tokens_FreeMintNFTRoyalty.ts b/packages/core/src/abis/ark_tokens_FreeMintNFTRoyalty.ts new file mode 100644 index 000000000..3b09053e6 --- /dev/null +++ b/packages/core/src/abis/ark_tokens_FreeMintNFTRoyalty.ts @@ -0,0 +1,693 @@ +/** + * This file is autogenerated by + * You should not edit it manually or your changes might be overwritten. + */ + +export default [ + { + type: "impl", + name: "ImplFreeMint", + interface_name: "ark_tokens::erc721_royalty::IFreeMint", + }, + { + type: "interface", + name: "ark_tokens::erc721_royalty::IFreeMint", + items: [ + { + type: "function", + name: "mint", + inputs: [ + { + name: "recipient", + type: "core::starknet::contract_address::ContractAddress", + }, + { name: "token_uri", type: "core::felt252" }, + ], + outputs: [], + state_mutability: "external", + }, + { + type: "function", + name: "get_current_token_id", + inputs: [], + outputs: [{ type: "core::felt252" }], + state_mutability: "view", + }, + ], + }, + { + type: "impl", + name: "ERC721MixinImpl", + interface_name: "openzeppelin::token::erc721::interface::ERC721ABI", + }, + { + type: "struct", + name: "core::integer::u256", + members: [ + { name: "low", type: "core::integer::u128" }, + { name: "high", type: "core::integer::u128" }, + ], + }, + { + type: "struct", + name: "core::array::Span::", + members: [ + { name: "snapshot", type: "@core::array::Array::" }, + ], + }, + { + type: "enum", + name: "core::bool", + variants: [ + { name: "False", type: "()" }, + { name: "True", type: "()" }, + ], + }, + { + type: "struct", + name: "core::byte_array::ByteArray", + members: [ + { name: "data", type: "core::array::Array::" }, + { name: "pending_word", type: "core::felt252" }, + { name: "pending_word_len", type: "core::integer::u32" }, + ], + }, + { + type: "interface", + name: "openzeppelin::token::erc721::interface::ERC721ABI", + items: [ + { + type: "function", + name: "balance_of", + inputs: [ + { + name: "account", + type: "core::starknet::contract_address::ContractAddress", + }, + ], + outputs: [{ type: "core::integer::u256" }], + state_mutability: "view", + }, + { + type: "function", + name: "owner_of", + inputs: [{ name: "token_id", type: "core::integer::u256" }], + outputs: [ + { type: "core::starknet::contract_address::ContractAddress" }, + ], + state_mutability: "view", + }, + { + type: "function", + name: "safe_transfer_from", + inputs: [ + { + name: "from", + type: "core::starknet::contract_address::ContractAddress", + }, + { + name: "to", + type: "core::starknet::contract_address::ContractAddress", + }, + { name: "token_id", type: "core::integer::u256" }, + { name: "data", type: "core::array::Span::" }, + ], + outputs: [], + state_mutability: "external", + }, + { + type: "function", + name: "transfer_from", + inputs: [ + { + name: "from", + type: "core::starknet::contract_address::ContractAddress", + }, + { + name: "to", + type: "core::starknet::contract_address::ContractAddress", + }, + { name: "token_id", type: "core::integer::u256" }, + ], + outputs: [], + state_mutability: "external", + }, + { + type: "function", + name: "approve", + inputs: [ + { + name: "to", + type: "core::starknet::contract_address::ContractAddress", + }, + { name: "token_id", type: "core::integer::u256" }, + ], + outputs: [], + state_mutability: "external", + }, + { + type: "function", + name: "set_approval_for_all", + inputs: [ + { + name: "operator", + type: "core::starknet::contract_address::ContractAddress", + }, + { name: "approved", type: "core::bool" }, + ], + outputs: [], + state_mutability: "external", + }, + { + type: "function", + name: "get_approved", + inputs: [{ name: "token_id", type: "core::integer::u256" }], + outputs: [ + { type: "core::starknet::contract_address::ContractAddress" }, + ], + state_mutability: "view", + }, + { + type: "function", + name: "is_approved_for_all", + inputs: [ + { + name: "owner", + type: "core::starknet::contract_address::ContractAddress", + }, + { + name: "operator", + type: "core::starknet::contract_address::ContractAddress", + }, + ], + outputs: [{ type: "core::bool" }], + state_mutability: "view", + }, + { + type: "function", + name: "supports_interface", + inputs: [{ name: "interface_id", type: "core::felt252" }], + outputs: [{ type: "core::bool" }], + state_mutability: "view", + }, + { + type: "function", + name: "name", + inputs: [], + outputs: [{ type: "core::byte_array::ByteArray" }], + state_mutability: "view", + }, + { + type: "function", + name: "symbol", + inputs: [], + outputs: [{ type: "core::byte_array::ByteArray" }], + state_mutability: "view", + }, + { + type: "function", + name: "token_uri", + inputs: [{ name: "token_id", type: "core::integer::u256" }], + outputs: [{ type: "core::byte_array::ByteArray" }], + state_mutability: "view", + }, + { + type: "function", + name: "balanceOf", + inputs: [ + { + name: "account", + type: "core::starknet::contract_address::ContractAddress", + }, + ], + outputs: [{ type: "core::integer::u256" }], + state_mutability: "view", + }, + { + type: "function", + name: "ownerOf", + inputs: [{ name: "tokenId", type: "core::integer::u256" }], + outputs: [ + { type: "core::starknet::contract_address::ContractAddress" }, + ], + state_mutability: "view", + }, + { + type: "function", + name: "safeTransferFrom", + inputs: [ + { + name: "from", + type: "core::starknet::contract_address::ContractAddress", + }, + { + name: "to", + type: "core::starknet::contract_address::ContractAddress", + }, + { name: "tokenId", type: "core::integer::u256" }, + { name: "data", type: "core::array::Span::" }, + ], + outputs: [], + state_mutability: "external", + }, + { + type: "function", + name: "transferFrom", + inputs: [ + { + name: "from", + type: "core::starknet::contract_address::ContractAddress", + }, + { + name: "to", + type: "core::starknet::contract_address::ContractAddress", + }, + { name: "tokenId", type: "core::integer::u256" }, + ], + outputs: [], + state_mutability: "external", + }, + { + type: "function", + name: "setApprovalForAll", + inputs: [ + { + name: "operator", + type: "core::starknet::contract_address::ContractAddress", + }, + { name: "approved", type: "core::bool" }, + ], + outputs: [], + state_mutability: "external", + }, + { + type: "function", + name: "getApproved", + inputs: [{ name: "tokenId", type: "core::integer::u256" }], + outputs: [ + { type: "core::starknet::contract_address::ContractAddress" }, + ], + state_mutability: "view", + }, + { + type: "function", + name: "isApprovedForAll", + inputs: [ + { + name: "owner", + type: "core::starknet::contract_address::ContractAddress", + }, + { + name: "operator", + type: "core::starknet::contract_address::ContractAddress", + }, + ], + outputs: [{ type: "core::bool" }], + state_mutability: "view", + }, + { + type: "function", + name: "tokenURI", + inputs: [{ name: "tokenId", type: "core::integer::u256" }], + outputs: [{ type: "core::byte_array::ByteArray" }], + state_mutability: "view", + }, + ], + }, + { + type: "impl", + name: "ERC2981", + interface_name: "ark_oz::erc2981::interface::IERC2981", + }, + { + type: "interface", + name: "ark_oz::erc2981::interface::IERC2981", + items: [ + { + type: "function", + name: "royalty_info", + inputs: [ + { name: "token_id", type: "core::integer::u256" }, + { name: "sale_price", type: "core::integer::u256" }, + ], + outputs: [ + { + type: "(core::starknet::contract_address::ContractAddress, core::integer::u256)", + }, + ], + state_mutability: "view", + }, + ], + }, + { + type: "impl", + name: "ERC2981Setup", + interface_name: "ark_oz::erc2981::interface::IERC2981Setup", + }, + { + type: "struct", + name: "ark_oz::erc2981::fees::FeesRatio", + members: [ + { name: "numerator", type: "core::integer::u256" }, + { name: "denominator", type: "core::integer::u256" }, + ], + }, + { + type: "interface", + name: "ark_oz::erc2981::interface::IERC2981Setup", + items: [ + { + type: "function", + name: "default_royalty", + inputs: [], + outputs: [ + { + type: "(core::starknet::contract_address::ContractAddress, ark_oz::erc2981::fees::FeesRatio)", + }, + ], + state_mutability: "view", + }, + { + type: "function", + name: "set_default_royalty", + inputs: [ + { + name: "receiver", + type: "core::starknet::contract_address::ContractAddress", + }, + { name: "fees_ratio", type: "ark_oz::erc2981::fees::FeesRatio" }, + ], + outputs: [], + state_mutability: "external", + }, + { + type: "function", + name: "token_royalty", + inputs: [{ name: "token_id", type: "core::integer::u256" }], + outputs: [ + { + type: "(core::starknet::contract_address::ContractAddress, ark_oz::erc2981::fees::FeesRatio)", + }, + ], + state_mutability: "view", + }, + { + type: "function", + name: "set_token_royalty", + inputs: [ + { name: "token_id", type: "core::integer::u256" }, + { + name: "receiver", + type: "core::starknet::contract_address::ContractAddress", + }, + { name: "fees_ratio", type: "ark_oz::erc2981::fees::FeesRatio" }, + ], + outputs: [], + state_mutability: "external", + }, + ], + }, + { + type: "impl", + name: "OwnableMixin", + interface_name: "openzeppelin::access::ownable::interface::OwnableABI", + }, + { + type: "interface", + name: "openzeppelin::access::ownable::interface::OwnableABI", + items: [ + { + type: "function", + name: "owner", + inputs: [], + outputs: [ + { type: "core::starknet::contract_address::ContractAddress" }, + ], + state_mutability: "view", + }, + { + type: "function", + name: "transfer_ownership", + inputs: [ + { + name: "new_owner", + type: "core::starknet::contract_address::ContractAddress", + }, + ], + outputs: [], + state_mutability: "external", + }, + { + type: "function", + name: "renounce_ownership", + inputs: [], + outputs: [], + state_mutability: "external", + }, + { + type: "function", + name: "transferOwnership", + inputs: [ + { + name: "newOwner", + type: "core::starknet::contract_address::ContractAddress", + }, + ], + outputs: [], + state_mutability: "external", + }, + { + type: "function", + name: "renounceOwnership", + inputs: [], + outputs: [], + state_mutability: "external", + }, + ], + }, + { + type: "constructor", + name: "constructor", + inputs: [ + { name: "name", type: "core::byte_array::ByteArray" }, + { name: "symbol", type: "core::byte_array::ByteArray" }, + { name: "base_uri", type: "core::byte_array::ByteArray" }, + { + name: "owner", + type: "core::starknet::contract_address::ContractAddress", + }, + ], + }, + { + type: "event", + name: "openzeppelin::token::erc721::erc721::ERC721Component::Transfer", + kind: "struct", + members: [ + { + name: "from", + type: "core::starknet::contract_address::ContractAddress", + kind: "key", + }, + { + name: "to", + type: "core::starknet::contract_address::ContractAddress", + kind: "key", + }, + { name: "token_id", type: "core::integer::u256", kind: "key" }, + ], + }, + { + type: "event", + name: "openzeppelin::token::erc721::erc721::ERC721Component::Approval", + kind: "struct", + members: [ + { + name: "owner", + type: "core::starknet::contract_address::ContractAddress", + kind: "key", + }, + { + name: "approved", + type: "core::starknet::contract_address::ContractAddress", + kind: "key", + }, + { name: "token_id", type: "core::integer::u256", kind: "key" }, + ], + }, + { + type: "event", + name: "openzeppelin::token::erc721::erc721::ERC721Component::ApprovalForAll", + kind: "struct", + members: [ + { + name: "owner", + type: "core::starknet::contract_address::ContractAddress", + kind: "key", + }, + { + name: "operator", + type: "core::starknet::contract_address::ContractAddress", + kind: "key", + }, + { name: "approved", type: "core::bool", kind: "data" }, + ], + }, + { + type: "event", + name: "openzeppelin::token::erc721::erc721::ERC721Component::Event", + kind: "enum", + variants: [ + { + name: "Transfer", + type: "openzeppelin::token::erc721::erc721::ERC721Component::Transfer", + kind: "nested", + }, + { + name: "Approval", + type: "openzeppelin::token::erc721::erc721::ERC721Component::Approval", + kind: "nested", + }, + { + name: "ApprovalForAll", + type: "openzeppelin::token::erc721::erc721::ERC721Component::ApprovalForAll", + kind: "nested", + }, + ], + }, + { + type: "event", + name: "ark_oz::erc2981::erc2981::ERC2981Component::TokenRoyaltyUpdated", + kind: "struct", + members: [ + { name: "token_id", type: "core::integer::u256", kind: "key" }, + { + name: "fees_ratio", + type: "ark_oz::erc2981::fees::FeesRatio", + kind: "data", + }, + { + name: "receiver", + type: "core::starknet::contract_address::ContractAddress", + kind: "data", + }, + ], + }, + { + type: "event", + name: "ark_oz::erc2981::erc2981::ERC2981Component::DefaultRoyaltyUpdated", + kind: "struct", + members: [ + { + name: "fees_ratio", + type: "ark_oz::erc2981::fees::FeesRatio", + kind: "data", + }, + { + name: "receiver", + type: "core::starknet::contract_address::ContractAddress", + kind: "data", + }, + ], + }, + { + type: "event", + name: "ark_oz::erc2981::erc2981::ERC2981Component::Event", + kind: "enum", + variants: [ + { + name: "TokenRoyaltyUpdated", + type: "ark_oz::erc2981::erc2981::ERC2981Component::TokenRoyaltyUpdated", + kind: "nested", + }, + { + name: "DefaultRoyaltyUpdated", + type: "ark_oz::erc2981::erc2981::ERC2981Component::DefaultRoyaltyUpdated", + kind: "nested", + }, + ], + }, + { + type: "event", + name: "openzeppelin::introspection::src5::SRC5Component::Event", + kind: "enum", + variants: [], + }, + { + type: "event", + name: "openzeppelin::access::ownable::ownable::OwnableComponent::OwnershipTransferred", + kind: "struct", + members: [ + { + name: "previous_owner", + type: "core::starknet::contract_address::ContractAddress", + kind: "key", + }, + { + name: "new_owner", + type: "core::starknet::contract_address::ContractAddress", + kind: "key", + }, + ], + }, + { + type: "event", + name: "openzeppelin::access::ownable::ownable::OwnableComponent::OwnershipTransferStarted", + kind: "struct", + members: [ + { + name: "previous_owner", + type: "core::starknet::contract_address::ContractAddress", + kind: "key", + }, + { + name: "new_owner", + type: "core::starknet::contract_address::ContractAddress", + kind: "key", + }, + ], + }, + { + type: "event", + name: "openzeppelin::access::ownable::ownable::OwnableComponent::Event", + kind: "enum", + variants: [ + { + name: "OwnershipTransferred", + type: "openzeppelin::access::ownable::ownable::OwnableComponent::OwnershipTransferred", + kind: "nested", + }, + { + name: "OwnershipTransferStarted", + type: "openzeppelin::access::ownable::ownable::OwnableComponent::OwnershipTransferStarted", + kind: "nested", + }, + ], + }, + { + type: "event", + name: "ark_tokens::erc721_royalty::FreeMintNFTRoyalty::Event", + kind: "enum", + variants: [ + { + name: "ERC721Event", + type: "openzeppelin::token::erc721::erc721::ERC721Component::Event", + kind: "flat", + }, + { + name: "ERC2981Event", + type: "ark_oz::erc2981::erc2981::ERC2981Component::Event", + kind: "flat", + }, + { + name: "SRC5Event", + type: "openzeppelin::introspection::src5::SRC5Component::Event", + kind: "flat", + }, + { + name: "OwnableEvent", + type: "openzeppelin::access::ownable::ownable::OwnableComponent::Event", + kind: "flat", + }, + ], + }, +] as const; diff --git a/packages/core/src/abis/index.ts b/packages/core/src/abis/index.ts new file mode 100644 index 000000000..b84b3dcee --- /dev/null +++ b/packages/core/src/abis/index.ts @@ -0,0 +1,30 @@ +/** + * This file is autogenerated by + * You should not edit it manually or your changes might be overwritten. + */ + +import ark_orderbook_orderbook from "./ark_orderbook_orderbook.js"; +import ark_orderbook_orderbook_event_mock from "./ark_orderbook_orderbook_event_mock.js"; +import ark_starknet_appchain_messaging from "./ark_starknet_appchain_messaging.js"; +import ark_starknet_executor from "./ark_starknet_executor.js"; +import ark_starknet_FreeMintNFT from "./ark_starknet_FreeMintNFT.js"; +import ark_starknet_FreeMintNFTRoyalty from "./ark_starknet_FreeMintNFTRoyalty.js"; +import ark_starknet_FreeMintERC20 from "./ark_starknet_FreeMintERC20.js"; +import ark_tokens_FreeMintNFT from "./ark_tokens_FreeMintNFT.js"; +import ark_tokens_FreeMintNFTRoyalty from "./ark_tokens_FreeMintNFTRoyalty.js"; +import ark_tokens_FreeMintERC20 from "./ark_tokens_FreeMintERC20.js"; +import solis_starknet_utils from "./solis_starknet_utils.js"; + +export { + ark_orderbook_orderbook, + ark_orderbook_orderbook_event_mock, + ark_starknet_appchain_messaging, + ark_starknet_executor, + ark_starknet_FreeMintNFT, + ark_starknet_FreeMintNFTRoyalty, + ark_starknet_FreeMintERC20, + ark_tokens_FreeMintNFT, + ark_tokens_FreeMintNFTRoyalty, + ark_tokens_FreeMintERC20, + solis_starknet_utils, +}; diff --git a/packages/core/src/abis/solis_starknet_utils.ts b/packages/core/src/abis/solis_starknet_utils.ts new file mode 100644 index 000000000..48483a803 --- /dev/null +++ b/packages/core/src/abis/solis_starknet_utils.ts @@ -0,0 +1,13 @@ +/** + * This file is autogenerated by + * You should not edit it manually or your changes might be overwritten. + */ + +export default [ + { + type: "event", + name: "solis::starknet_utils::starknet_utils::Event", + kind: "enum", + variants: [], + }, +] as const; diff --git a/packages/core/src/index.ts b/packages/core/src/index.ts index d53692761..cfa5c6ff8 100644 --- a/packages/core/src/index.ts +++ b/packages/core/src/index.ts @@ -47,3 +47,5 @@ export { networks, starknetEthContract } from "./constants.js"; + +export * as abis from "./abis/index.js"; diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index f6f6345f2..22d4ca7be 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -38,6 +38,9 @@ importers: prettier-plugin-sort-imports: specifier: ^1.8.1 version: 1.8.6(typescript@5.5.4) + starknet: + specifier: 6.7.0 + version: 6.7.0 turbo: specifier: ^1.13.3 version: 1.13.4 @@ -4709,9 +4712,16 @@ packages: resolution: {integrity: sha512-XlkWvfIm6RmsWtNJx+uqtKLS8eqFbxUg0ZzLXqY0caEy9l7hruX8IpiDnjsLavoBgqCCR71TqWO8MaXYheJ3RQ==} engines: {node: '>=10'} + starknet-types@0.0.4: + resolution: {integrity: sha512-PklqFeSp9gMqbzW5IbO8l1s3xsNZYkNG/x/gsytgYCIl6H/cqiwCZolVTneyTibvrdHOQ8kP3PXwfdsypudYqw==} + deprecated: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info. + starknet@6.11.0: resolution: {integrity: sha512-u50KrGDi9fbu1Ogu7ynwF/tSeFlp3mzOg1/Y5x50tYFICImo3OfY4lOz9OtYDk404HK4eUujKkhov9tG7GAKlg==} + starknet@6.7.0: + resolution: {integrity: sha512-8NMedKBfkg/oZUgTYNw9lKeNoNYakL/Roah2HwKzrVyvDxBs0arrNrR8No8+tTq0wQg0HGu1w+JIObynjHAK3w==} + stop-iteration-iterator@1.0.0: resolution: {integrity: sha512-iCGQj+0l0HOdZ2AEeBADlsRC+vsnDsZsbdSiH1yNSjcfKM7fdpCMfqAL/dwF5BLiw/XhRft/Wax6zQbhq2BcjQ==} engines: {node: '>= 0.4'} @@ -7972,7 +7982,7 @@ snapshots: eslint: 8.57.0 eslint-import-resolver-node: 0.3.9 eslint-import-resolver-typescript: 3.6.1(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.1.6))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.1.6))(eslint@8.57.0))(eslint@8.57.0) - eslint-plugin-import: 2.29.1(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.1.6))(eslint-import-resolver-typescript@3.6.1)(eslint@8.57.0) + eslint-plugin-import: 2.29.1(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.1.6))(eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.1.6))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.1.6))(eslint@8.57.0))(eslint@8.57.0))(eslint@8.57.0) eslint-plugin-jsx-a11y: 6.9.0(eslint@8.57.0) eslint-plugin-react: 7.35.0(eslint@8.57.0) eslint-plugin-react-hooks: 4.6.2(eslint@8.57.0) @@ -8009,7 +8019,7 @@ snapshots: enhanced-resolve: 5.17.1 eslint: 8.57.0 eslint-module-utils: 2.8.1(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.1.6))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.1.6))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.1.6))(eslint@8.57.0))(eslint@8.57.0))(eslint@8.57.0) - eslint-plugin-import: 2.29.1(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.1.6))(eslint-import-resolver-typescript@3.6.1)(eslint@8.57.0) + eslint-plugin-import: 2.29.1(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.1.6))(eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.1.6))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.1.6))(eslint@8.57.0))(eslint@8.57.0))(eslint@8.57.0) fast-glob: 3.3.2 get-tsconfig: 4.7.6 is-core-module: 2.15.1 @@ -8065,7 +8075,7 @@ snapshots: eslint: 8.57.0 ignore: 5.3.2 - eslint-plugin-import@2.29.1(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.1.6))(eslint-import-resolver-typescript@3.6.1)(eslint@8.57.0): + eslint-plugin-import@2.29.1(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.1.6))(eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.1.6))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1(@typescript-eslint/parser@6.21.0(eslint@8.57.0)(typescript@5.1.6))(eslint@8.57.0))(eslint@8.57.0))(eslint@8.57.0): dependencies: array-includes: 3.1.8 array.prototype.findlastindex: 1.2.5 @@ -10806,6 +10816,8 @@ snapshots: dependencies: escape-string-regexp: 2.0.0 + starknet-types@0.0.4: {} + starknet@6.11.0: dependencies: '@noble/curves': 1.4.2 @@ -10824,6 +10836,22 @@ snapshots: transitivePeerDependencies: - encoding + starknet@6.7.0: + dependencies: + '@noble/curves': 1.4.2 + '@scure/base': 1.1.7 + '@scure/starknet': 1.0.0 + abi-wan-kanabi: 2.2.3 + fetch-cookie: 3.0.1 + isomorphic-fetch: 3.0.0 + lossless-json: 4.0.1 + pako: 2.1.0 + starknet-types: 0.0.4 + ts-mixer: 6.0.4 + url-join: 4.0.1 + transitivePeerDependencies: + - encoding + stop-iteration-iterator@1.0.0: dependencies: internal-slot: 1.0.7