diff --git a/packages/nextjs/components/stake/StakeContractInteraction.tsx b/packages/nextjs/components/stake/StakeContractInteraction.tsx index 790f852eb..c7ac355c5 100644 --- a/packages/nextjs/components/stake/StakeContractInteraction.tsx +++ b/packages/nextjs/components/stake/StakeContractInteraction.tsx @@ -11,6 +11,7 @@ import { ethers } from "ethers"; import humanizeDuration from "humanize-duration"; import { uint256 } from "starknet-dev"; import { BigNumberish } from "starknet"; +import { useScaffoldMultiContractWrite } from "~~/hooks/scaffold-stark/useScaffoldMultiContractWrite"; export const StakeContractInteraction = () => { const { address: connectedAddress } = useAccount(); @@ -66,6 +67,21 @@ export const StakeContractInteraction = () => { functionName: "withdraw", }); + const {writeAsync: stakeEth} = useScaffoldMultiContractWrite({ + calls: [ + { + contractName: "Eth", + functionName: "approve", + args: [StakerContract?.address ?? "",10 ** 14], + }, + { + contractName: "Challenge1", + functionName: "stake", + args: [10 ** 14], + } + ] + }) + const wrapInTryCatch = (fn: () => Promise, errorMessageFnDescription: string) => async () => { try { @@ -158,7 +174,7 @@ export const StakeContractInteraction = () => { diff --git a/packages/nextjs/contracts/deployedContracts.ts b/packages/nextjs/contracts/deployedContracts.ts index a18b683d1..1af9a97b9 100644 --- a/packages/nextjs/contracts/deployedContracts.ts +++ b/packages/nextjs/contracts/deployedContracts.ts @@ -4,33 +4,16 @@ */ const deployedContracts = { - devnet: { - Challenge0: { + sepolia: { + ExampleExternalContract: { address: - "0x00a655888f0cb30b8aadca034f826658628d251efd18279e5f8953106a89cd9b", + "0x0129e446f7df55df520032100969dbc470c429126e47c2ae5734bc0cf66f0124", abi: [ { type: "impl", - name: "Challenge0Impl", - interface_name: "contracts::challenge0::IChallenge0", - }, - { - 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", - }, - ], + name: "ExampleExternalContractImpl", + interface_name: + "contracts::exampleExternalContract::IExampleExternalContract", }, { type: "struct", @@ -47,157 +30,76 @@ const deployedContracts = { ], }, { - type: "interface", - name: "contracts::challenge0::IChallenge0", - items: [ - { - type: "function", - name: "mint_item", - inputs: [ - { - name: "recipient", - type: "core::starknet::contract_address::ContractAddress", - }, - { - name: "uri", - type: "core::byte_array::ByteArray", - }, - ], - outputs: [ - { - type: "core::integer::u256", - }, - ], - state_mutability: "external", - }, - ], - }, - { - type: "impl", - name: "ICounterImpl", - interface_name: "contracts::challenge0::ICounter", - }, - { - type: "interface", - name: "contracts::challenge0::ICounter", - items: [ - { - type: "function", - name: "token_id_counter", - inputs: [], - outputs: [ - { - type: "core::integer::u256", - }, - ], - state_mutability: "view", - }, - ], - }, - { - type: "impl", - name: "WrappedIERC721MetadataImpl", - interface_name: - "openzeppelin::token::erc721::interface::IERC721Metadata", - }, - { - type: "interface", - name: "openzeppelin::token::erc721::interface::IERC721Metadata", - items: [ - { - type: "function", - name: "name", - inputs: [], - outputs: [ - { - type: "core::byte_array::ByteArray", - }, - ], - state_mutability: "view", - }, + type: "enum", + name: "core::bool", + variants: [ { - type: "function", - name: "symbol", - inputs: [], - outputs: [ - { - type: "core::byte_array::ByteArray", - }, - ], - state_mutability: "view", + name: "False", + type: "()", }, { - type: "function", - name: "token_uri", - inputs: [ - { - name: "token_id", - type: "core::integer::u256", - }, - ], - outputs: [ - { - type: "core::byte_array::ByteArray", - }, - ], - state_mutability: "view", + name: "True", + type: "()", }, ], }, - { - type: "impl", - name: "IERC721EnumerableImpl", - interface_name: "contracts::challenge0::IERC721Enumerable", - }, { type: "interface", - name: "contracts::challenge0::IERC721Enumerable", + name: "contracts::exampleExternalContract::IExampleExternalContract", items: [ { type: "function", - name: "token_of_owner_by_index", + name: "complete", inputs: [ { - name: "owner", - type: "core::starknet::contract_address::ContractAddress", - }, - { - name: "index", - type: "core::integer::u256", - }, - ], - outputs: [ - { + name: "amount", type: "core::integer::u256", }, ], - state_mutability: "view", + outputs: [], + state_mutability: "external", }, { type: "function", - name: "total_supply", + name: "completed", inputs: [], outputs: [ { - type: "core::integer::u256", + type: "core::bool", }, ], - state_mutability: "view", + state_mutability: "external", }, ], }, + { + type: "event", + name: "contracts::exampleExternalContract::ExampleExternalContract::Event", + kind: "enum", + variants: [], + }, + ], + }, + Challenge1: { + address: + "0x04b5b4cf59547813725495e80fe97c80c9b980d2859752242690fac011cf674f", + abi: [ { type: "impl", - name: "ERC721Impl", - interface_name: "openzeppelin::token::erc721::interface::IERC721", + name: "Challenge1Impl", + interface_name: "contracts::challenge1::IChallenge1", }, { type: "struct", - name: "core::array::Span::", + name: "core::integer::u256", members: [ { - name: "snapshot", - type: "@core::array::Array::", + name: "low", + type: "core::integer::u128", + }, + { + name: "high", + type: "core::integer::u128", }, ], }, @@ -217,145 +119,87 @@ const deployedContracts = { }, { type: "interface", - name: "openzeppelin::token::erc721::interface::IERC721", + name: "contracts::challenge1::IChallenge1", 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", + name: "execute", + inputs: [], + outputs: [], + state_mutability: "external", }, { type: "function", - name: "safe_transfer_from", + name: "stake", inputs: [ { - name: "from", - type: "core::starknet::contract_address::ContractAddress", - }, - { - name: "to", - type: "core::starknet::contract_address::ContractAddress", - }, - { - name: "token_id", + name: "amount", 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", - }, - ], + name: "withdraw", + inputs: [], outputs: [], state_mutability: "external", }, { type: "function", - name: "approve", + name: "balances", inputs: [ { - name: "to", + name: "account", type: "core::starknet::contract_address::ContractAddress", }, + ], + outputs: [ { - name: "token_id", type: "core::integer::u256", }, ], - outputs: [], - state_mutability: "external", + state_mutability: "view", }, { type: "function", - name: "set_approval_for_all", - inputs: [ - { - name: "operator", - type: "core::starknet::contract_address::ContractAddress", - }, + name: "completed", + inputs: [], + outputs: [ { - name: "approved", type: "core::bool", }, ], - outputs: [], - state_mutability: "external", + state_mutability: "view", }, { type: "function", - name: "get_approved", - inputs: [ - { - name: "token_id", - type: "core::integer::u256", - }, - ], + name: "deadline", + inputs: [], outputs: [ { - type: "core::starknet::contract_address::ContractAddress", + type: "core::integer::u64", }, ], state_mutability: "view", }, { type: "function", - name: "is_approved_for_all", - inputs: [ - { - name: "owner", - type: "core::starknet::contract_address::ContractAddress", - }, + name: "example_external_contract", + inputs: [], + outputs: [ { - name: "operator", type: "core::starknet::contract_address::ContractAddress", }, ], + state_mutability: "view", + }, + { + type: "function", + name: "open_for_withdraw", + inputs: [], outputs: [ { type: "core::bool", @@ -363,888 +207,39 @@ const deployedContracts = { ], state_mutability: "view", }, - ], - }, - { - type: "impl", - name: "OwnableImpl", - interface_name: "openzeppelin::access::ownable::interface::IOwnable", - }, - { - type: "interface", - name: "openzeppelin::access::ownable::interface::IOwnable", - items: [ { type: "function", - name: "owner", + name: "threshold", inputs: [], outputs: [ { - type: "core::starknet::contract_address::ContractAddress", + type: "core::integer::u256", }, ], state_mutability: "view", }, { type: "function", - name: "transfer_ownership", - inputs: [ + name: "total_balance", + inputs: [], + outputs: [ { - name: "new_owner", - type: "core::starknet::contract_address::ContractAddress", + type: "core::integer::u256", }, ], - outputs: [], - state_mutability: "external", + state_mutability: "view", }, { type: "function", - name: "renounce_ownership", - inputs: [], - outputs: [], - state_mutability: "external", - }, - ], - }, - { - type: "constructor", - name: "constructor", - inputs: [ - { - 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: "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: "contracts::challenge0::Challenge0::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", - }, - { - name: "OwnableEvent", - type: "openzeppelin::access::ownable::ownable::OwnableComponent::Event", - kind: "flat", - }, - ], - }, - ], - }, - ExampleExternalContract: { - address: - "0x07e1a420df6e2c270c2f9985226ccb9596a5be5d735e596003d6c9c22b047e57", - abi: [ - { - type: "impl", - name: "ExampleExternalContractImpl", - interface_name: - "contracts::exampleExternalContract::IExampleExternalContract", - }, - { - type: "struct", - name: "core::integer::u256", - members: [ - { - name: "low", - type: "core::integer::u128", - }, - { - name: "high", - type: "core::integer::u128", - }, - ], - }, - { - type: "enum", - name: "core::bool", - variants: [ - { - name: "False", - type: "()", - }, - { - name: "True", - type: "()", - }, - ], - }, - { - type: "interface", - name: "contracts::exampleExternalContract::IExampleExternalContract", - items: [ - { - type: "function", - name: "complete", - inputs: [ - { - name: "amount", - type: "core::integer::u256", - }, - ], - outputs: [], - state_mutability: "external", - }, - { - type: "function", - name: "completed", - inputs: [], - outputs: [ - { - type: "core::bool", - }, - ], - state_mutability: "external", - }, - ], - }, - { - type: "event", - name: "contracts::exampleExternalContract::ExampleExternalContract::Event", - kind: "enum", - variants: [], - }, - ], - }, - Challenge1: { - address: - "0x05ac695e70e0ed53345b361b4f9dd12df6e4a9ed2338be27f9922591b37603c2", - abi: [ - { - type: "impl", - name: "Challenge1Impl", - interface_name: "contracts::challenge1::IChallenge1", - }, - { - type: "struct", - name: "core::integer::u256", - members: [ - { - name: "low", - type: "core::integer::u128", - }, - { - name: "high", - type: "core::integer::u128", - }, - ], - }, - { - type: "enum", - name: "core::bool", - variants: [ - { - name: "False", - type: "()", - }, - { - name: "True", - type: "()", - }, - ], - }, - { - type: "interface", - name: "contracts::challenge1::IChallenge1", - items: [ - { - type: "function", - name: "execute", - inputs: [], - outputs: [], - state_mutability: "external", - }, - { - type: "function", - name: "stake", - inputs: [ - { - name: "amount", - type: "core::integer::u256", - }, - ], - outputs: [], - state_mutability: "external", - }, - { - type: "function", - name: "withdraw", - inputs: [], - outputs: [], - state_mutability: "external", - }, - { - type: "function", - name: "balances", - inputs: [ - { - name: "account", - type: "core::starknet::contract_address::ContractAddress", - }, - ], - outputs: [ - { - type: "core::integer::u256", - }, - ], - state_mutability: "view", - }, - { - type: "function", - name: "completed", - inputs: [], - outputs: [ - { - type: "core::bool", - }, - ], - state_mutability: "view", - }, - { - type: "function", - name: "deadline", - inputs: [], - outputs: [ - { - type: "core::integer::u64", - }, - ], - state_mutability: "view", - }, - { - type: "function", - name: "example_external_contract", - inputs: [], - outputs: [ - { - type: "core::starknet::contract_address::ContractAddress", - }, - ], - state_mutability: "view", - }, - { - type: "function", - name: "open_for_withdraw", - inputs: [], - outputs: [ - { - type: "core::bool", - }, - ], - state_mutability: "view", - }, - { - type: "function", - name: "threshold", - inputs: [], - outputs: [ - { - type: "core::integer::u256", - }, - ], - state_mutability: "view", - }, - { - type: "function", - name: "total_balance", - inputs: [], - outputs: [ - { - type: "core::integer::u256", - }, - ], - state_mutability: "view", - }, - { - type: "function", - name: "time_left", - inputs: [], - outputs: [ - { - type: "core::integer::u64", - }, - ], - state_mutability: "view", - }, - ], - }, - { - type: "constructor", - name: "constructor", - inputs: [ - { - name: "external_contract_address", - type: "core::starknet::contract_address::ContractAddress", - }, - { - name: "eth_contract_address", - type: "core::starknet::contract_address::ContractAddress", - }, - ], - }, - { - type: "event", - name: "contracts::challenge1::Challenge1::Event", - kind: "enum", - variants: [], - }, - ], - }, - }, - sepolia: { - Challenge0: { - address: - "0x01163b9c05d4c6eb824dd4b5423e7edbd91e39aab8a847f34a7217ce5a757c38", - abi: [ - { - type: "impl", - name: "Challenge0Impl", - interface_name: "contracts::challenge0::IChallenge0", - }, - { - 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: "struct", - name: "core::integer::u256", - members: [ - { - name: "low", - type: "core::integer::u128", - }, - { - name: "high", - type: "core::integer::u128", - }, - ], - }, - { - type: "interface", - name: "contracts::challenge0::IChallenge0", - items: [ - { - type: "function", - name: "mint_item", - inputs: [ - { - name: "recipient", - type: "core::starknet::contract_address::ContractAddress", - }, - { - name: "uri", - type: "core::byte_array::ByteArray", - }, - ], - outputs: [ - { - type: "core::integer::u256", - }, - ], - state_mutability: "external", - }, - ], - }, - { - type: "impl", - name: "ICounterImpl", - interface_name: "contracts::challenge0::ICounter", - }, - { - type: "interface", - name: "contracts::challenge0::ICounter", - items: [ - { - type: "function", - name: "token_id_counter", - inputs: [], - outputs: [ - { - type: "core::integer::u256", - }, - ], - state_mutability: "view", - }, - ], - }, - { - type: "impl", - name: "WrappedIERC721MetadataImpl", - interface_name: - "openzeppelin::token::erc721::interface::IERC721Metadata", - }, - { - type: "interface", - name: "openzeppelin::token::erc721::interface::IERC721Metadata", - 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: "token_uri", - inputs: [ - { - name: "token_id", - type: "core::integer::u256", - }, - ], - outputs: [ - { - type: "core::byte_array::ByteArray", - }, - ], - state_mutability: "view", - }, - ], - }, - { - type: "impl", - name: "IERC721EnumerableImpl", - interface_name: "contracts::challenge0::IERC721Enumerable", - }, - { - type: "interface", - name: "contracts::challenge0::IERC721Enumerable", - items: [ - { - type: "function", - name: "token_of_owner_by_index", - inputs: [ - { - name: "owner", - type: "core::starknet::contract_address::ContractAddress", - }, - { - name: "index", - type: "core::integer::u256", - }, - ], - outputs: [ - { - type: "core::integer::u256", - }, - ], - state_mutability: "view", - }, - { - type: "function", - name: "total_supply", - inputs: [], - outputs: [ - { - type: "core::integer::u256", - }, - ], - state_mutability: "view", - }, - ], - }, - { - type: "impl", - name: "ERC721Impl", - interface_name: "openzeppelin::token::erc721::interface::IERC721", - }, - { - 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: "interface", - name: "openzeppelin::token::erc721::interface::IERC721", - 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: "impl", - name: "OwnableImpl", - interface_name: "openzeppelin::access::ownable::interface::IOwnable", - }, - { - type: "interface", - name: "openzeppelin::access::ownable::interface::IOwnable", - items: [ - { - type: "function", - name: "owner", + name: "time_left", inputs: [], outputs: [ { - type: "core::starknet::contract_address::ContractAddress", + type: "core::integer::u64", }, ], 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", - }, ], }, { @@ -1252,178 +247,21 @@ const deployedContracts = { name: "constructor", inputs: [ { - 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", + name: "external_contract_address", type: "core::starknet::contract_address::ContractAddress", - kind: "key", }, { - name: "operator", + name: "eth_contract_address", 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", + name: "contracts::challenge1::Challenge1::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: "contracts::challenge0::Challenge0::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", - }, - { - name: "OwnableEvent", - type: "openzeppelin::access::ownable::ownable::OwnableComponent::Event", - kind: "flat", - }, - ], - }, ], }, }, diff --git a/packages/nextjs/scaffold.config.ts b/packages/nextjs/scaffold.config.ts index 3daf09e4e..6a9ba8243 100644 --- a/packages/nextjs/scaffold.config.ts +++ b/packages/nextjs/scaffold.config.ts @@ -9,7 +9,7 @@ export type ScaffoldConfig = { }; const scaffoldConfig = { - targetNetworks: [chains.devnet], + targetNetworks: [chains.sepolia], // Only show the Burner Wallet when running on devnet onlyLocalBurnerWallet: false, rpcProviderUrl: process.env.NEXT_PUBLIC_PROVIDER_URL || "",