diff --git a/packages/nextjs/contracts/deployedContracts.ts b/packages/nextjs/contracts/deployedContracts.ts index 25751ce..48fb6ac 100755 --- a/packages/nextjs/contracts/deployedContracts.ts +++ b/packages/nextjs/contracts/deployedContracts.ts @@ -3,6 +3,518 @@ * You should not edit it manually or your changes might be overwritten. */ -const deployedContracts = {} as const; +const deployedContracts = { + sepolia: { + crowdfunding: { + address: + "0x75b54c5569d1780b70a5631a034eadd7f24cfeec1013956b71a41e91edd2b9", + abi: [ + { + type: "impl", + name: "CrowdFundingImpl", + interface_name: "contracts::crowdfunding::IFund", + }, + { + type: "struct", + name: "core::integer::u256", + members: [ + { + name: "low", + type: "core::integer::u128", + }, + { + name: "high", + type: "core::integer::u128", + }, + ], + }, + { + 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: "enum", + name: "core::bool", + variants: [ + { + name: "False", + type: "()", + }, + { + name: "True", + type: "()", + }, + ], + }, + { + type: "interface", + name: "contracts::crowdfunding::IFund", + items: [ + { + type: "function", + name: "get_fund_balance", + inputs: [], + outputs: [ + { + type: "core::integer::u256", + }, + ], + state_mutability: "view", + }, + { + type: "function", + name: "get_fund_target", + inputs: [], + outputs: [ + { + type: "core::integer::u256", + }, + ], + state_mutability: "view", + }, + { + type: "function", + name: "get_fund_description", + inputs: [], + outputs: [ + { + type: "core::felt252", + }, + ], + state_mutability: "view", + }, + { + type: "function", + name: "get_deadline", + inputs: [], + outputs: [ + { + type: "core::felt252", + }, + ], + state_mutability: "view", + }, + { + type: "function", + name: "get_token_symbol", + inputs: [], + outputs: [ + { + type: "core::byte_array::ByteArray", + }, + ], + state_mutability: "view", + }, + { + type: "function", + name: "get_token_address", + inputs: [], + outputs: [ + { + type: "core::starknet::contract_address::ContractAddress", + }, + ], + state_mutability: "view", + }, + { + type: "function", + name: "fund_to_contract", + inputs: [ + { + name: "amount", + type: "core::integer::u256", + }, + ], + outputs: [], + state_mutability: "external", + }, + { + type: "function", + name: "withdraw_funds", + inputs: [], + outputs: [], + state_mutability: "external", + }, + { + type: "function", + name: "reset_fund", + inputs: [ + { + name: "token", + type: "core::starknet::contract_address::ContractAddress", + }, + { + name: "grantee_address", + type: "core::starknet::contract_address::ContractAddress", + }, + { + name: "fund_target", + type: "core::integer::u256", + }, + { + name: "fund_description", + type: "core::felt252", + }, + { + name: "deadline", + type: "core::felt252", + }, + { + name: "initial_owner", + type: "core::starknet::contract_address::ContractAddress", + }, + ], + outputs: [], + state_mutability: "external", + }, + { + type: "function", + name: "get_owner", + inputs: [], + outputs: [ + { + type: "core::starknet::contract_address::ContractAddress", + }, + ], + state_mutability: "view", + }, + { + type: "function", + name: "get_active", + inputs: [], + outputs: [ + { + type: "core::bool", + }, + ], + state_mutability: "view", + }, + { + type: "function", + name: "set_active", + inputs: [ + { + name: "new_active", + type: "core::bool", + }, + ], + outputs: [], + state_mutability: "external", + }, + ], + }, + { + type: "impl", + name: "OwnableMixinImpl", + 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: "token", + type: "core::starknet::contract_address::ContractAddress", + }, + { + name: "grantee_address", + type: "core::starknet::contract_address::ContractAddress", + }, + { + name: "fund_target", + type: "core::integer::u256", + }, + { + name: "fund_description", + type: "core::felt252", + }, + { + name: "deadline", + type: "core::felt252", + }, + { + name: "initial_owner", + type: "core::starknet::contract_address::ContractAddress", + }, + ], + }, + { + 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: "contracts::crowdfunding::crowdfunding::SelfDestructed", + kind: "struct", + members: [ + { + name: "recipient", + type: "core::starknet::contract_address::ContractAddress", + kind: "data", + }, + { + name: "amount", + type: "core::integer::u256", + kind: "data", + }, + ], + }, + { + type: "event", + name: "contracts::crowdfunding::crowdfunding::Transfer", + kind: "struct", + members: [ + { + name: "from", + type: "core::starknet::contract_address::ContractAddress", + kind: "data", + }, + { + name: "to", + type: "core::starknet::contract_address::ContractAddress", + kind: "data", + }, + { + name: "amount", + type: "core::integer::u256", + kind: "data", + }, + ], + }, + { + type: "event", + name: "contracts::crowdfunding::crowdfunding::TransferFailed", + kind: "struct", + members: [ + { + name: "from", + type: "core::starknet::contract_address::ContractAddress", + kind: "data", + }, + { + name: "to", + type: "core::starknet::contract_address::ContractAddress", + kind: "data", + }, + { + name: "amount", + type: "core::integer::u256", + kind: "data", + }, + { + name: "error_message", + type: "core::felt252", + kind: "data", + }, + ], + }, + { + type: "event", + name: "contracts::crowdfunding::crowdfunding::ResetFund", + kind: "struct", + members: [ + { + name: "token", + type: "core::starknet::contract_address::ContractAddress", + kind: "data", + }, + { + name: "grantee_address", + type: "core::starknet::contract_address::ContractAddress", + kind: "data", + }, + { + name: "fund_target", + type: "core::integer::u256", + kind: "data", + }, + { + name: "fund_description", + type: "core::felt252", + kind: "data", + }, + { + name: "deadline", + type: "core::felt252", + kind: "data", + }, + { + name: "initial_owner", + type: "core::starknet::contract_address::ContractAddress", + kind: "data", + }, + ], + }, + { + type: "event", + name: "contracts::crowdfunding::crowdfunding::ActiveChanged", + kind: "struct", + members: [ + { + name: "active", + type: "core::bool", + kind: "data", + }, + ], + }, + { + type: "event", + name: "contracts::crowdfunding::crowdfunding::Event", + kind: "enum", + variants: [ + { + name: "OwnableEvent", + type: "openzeppelin_access::ownable::ownable::OwnableComponent::Event", + kind: "flat", + }, + { + name: "SelfDestructed", + type: "contracts::crowdfunding::crowdfunding::SelfDestructed", + kind: "nested", + }, + { + name: "Transfer", + type: "contracts::crowdfunding::crowdfunding::Transfer", + kind: "nested", + }, + { + name: "TransferFailed", + type: "contracts::crowdfunding::crowdfunding::TransferFailed", + kind: "nested", + }, + { + name: "ResetFund", + type: "contracts::crowdfunding::crowdfunding::ResetFund", + kind: "nested", + }, + { + name: "ActiveChanged", + type: "contracts::crowdfunding::crowdfunding::ActiveChanged", + kind: "nested", + }, + ], + }, + ], + classHash: + "0x640d3ce6692e83af96eace4533f5beeab9b548f99903de21b935a7f91d8f40b", + }, + }, +} as const; export default deployedContracts; diff --git a/packages/snfoundry/contracts/Scarb.toml b/packages/snfoundry/contracts/Scarb.toml index 1776f5b..203642e 100644 --- a/packages/snfoundry/contracts/Scarb.toml +++ b/packages/snfoundry/contracts/Scarb.toml @@ -18,7 +18,6 @@ cairo_test = "2.9.2" [[target.starknet-contract]] casm = true -sierra = true allowed-libfuncs-list.name = "experimental" [tool.fmt] diff --git a/packages/snfoundry/scripts-ts/deploy.ts b/packages/snfoundry/scripts-ts/deploy.ts index 71ed706..cedcf97 100644 --- a/packages/snfoundry/scripts-ts/deploy.ts +++ b/packages/snfoundry/scripts-ts/deploy.ts @@ -2,7 +2,7 @@ import { deployContract, executeDeployCalls, exportDeployments, - deployer, + deployer } from "./deploy-contract"; import { green } from "./helpers/colorize-log"; /**