--- a/pallets/common/src/lib.rs +++ b/pallets/common/src/lib.rs @@ -153,7 +153,7 @@ pub fn set_sponsor(&mut self, sponsor: T::AccountId) { self.collection.sponsorship = SponsorshipState::Unconfirmed(sponsor); } - + pub fn confirm_sponsorship(&mut self, sender: &T::AccountId) -> bool { if self.collection.sponsorship.pending_sponsor() != Some(sender) { return false; --- a/pallets/evm-collection/src/eth.rs +++ b/pallets/evm-collection/src/eth.rs @@ -18,6 +18,7 @@ use evm_coder::{abi::AbiWriter, execution::*, generate_stubgen, solidity_interface, types::*, ToLog}; use ethereum as _; use pallet_common::CollectionById; +use pallet_common::CollectionHandle; use pallet_evm_coder_substrate::{SubstrateRecorder, WithRecorder}; use pallet_evm::{ ExitRevert, OnCreate, OnMethodCall, PrecompileResult, PrecompileFailure, --- a/pallets/evm-collection/src/lib.rs +++ b/pallets/evm-collection/src/lib.rs @@ -18,22 +18,22 @@ extern crate alloc; -use codec::{Decode, Encode, MaxEncodedLen}; pub use pallet::*; pub use eth::*; -use scale_info::TypeInfo; pub mod eth; #[frame_support::pallet] pub mod pallet { pub use super::*; - use evm_coder::execution::Result; use frame_support::pallet_prelude::*; use sp_core::H160; #[pallet::config] pub trait Config: - frame_system::Config + pallet_evm_coder_substrate::Config + pallet_evm::account::Config + pallet_nonfungible::Config + frame_system::Config + + pallet_evm_coder_substrate::Config + + pallet_evm::account::Config + + pallet_nonfungible::Config { type ContractAddress: Get; } @@ -47,7 +47,6 @@ #[pallet::pallet] // #[pallet::generate_store(pub(super) trait Store)] pub struct Pallet(_); - impl Pallet {} } --- a/pallets/evm-contract-helpers/src/lib.rs +++ b/pallets/evm-contract-helpers/src/lib.rs @@ -31,7 +31,10 @@ #[pallet::config] pub trait Config: - frame_system::Config + pallet_evm_coder_substrate::Config + pallet_evm::account::Config + pallet_nonfungible::Config + frame_system::Config + + pallet_evm_coder_substrate::Config + + pallet_evm::account::Config + + pallet_nonfungible::Config { type ContractAddress: Get; type DefaultSponsoringRateLimit: Get; --- a/primitives/data-structs/src/lib.rs +++ b/primitives/data-structs/src/lib.rs @@ -368,30 +368,30 @@ #[derive(Encode, Decode, Debug, Default, Clone, PartialEq, TypeInfo, MaxEncodedLen)] #[cfg_attr(feature = "serde1", derive(Serialize, Deserialize))] pub struct CollectionLimits { - #[serde(alias="accountTokenOwnershipLimit")] + #[serde(alias = "accountTokenOwnershipLimit")] pub account_token_ownership_limit: Option, - #[serde(alias="sponsoredDataSize")] + #[serde(alias = "sponsoredDataSize")] pub sponsored_data_size: Option, /// FIXME should we delete this or repurpose it? /// None - setVariableMetadata is not sponsored /// Some(v) - setVariableMetadata is sponsored /// if there is v block between txs - #[serde(alias="sponsoredDataRateLimit")] + #[serde(alias = "sponsoredDataRateLimit")] pub sponsored_data_rate_limit: Option, - #[serde(alias="tokenLimit")] + #[serde(alias = "tokenLimit")] pub token_limit: Option, - + // Timeouts for item types in passed blocks - #[serde(alias="sponsorTransferTimeout")] + #[serde(alias = "sponsorTransferTimeout")] pub sponsor_transfer_timeout: Option, - #[serde(alias="sponsorApproveTimeout")] + #[serde(alias = "sponsorApproveTimeout")] pub sponsor_approve_timeout: Option, - #[serde(alias="ownerCanTransfer")] + #[serde(alias = "ownerCanTransfer")] pub owner_can_transfer: Option, - #[serde(alias="ownerCanDestroy")] + #[serde(alias = "ownerCanDestroy")] pub owner_can_destroy: Option, - #[serde(alias="transfersEnabled")] + #[serde(alias = "transfersEnabled")] pub transfers_enabled: Option, } --- a/runtime/opal/src/lib.rs +++ b/runtime/opal/src/lib.rs @@ -975,7 +975,7 @@ pub const HelpersContractAddress: H160 = H160([ 0x84, 0x28, 0x99, 0xec, 0xf3, 0x80, 0x55, 0x3e, 0x8a, 0x4d, 0xe7, 0x5b, 0xf5, 0x34, 0xcd, 0xf6, 0xfb, 0xf6, 0x40, 0x49, ]); - + // 0x6c4e9fe1ae37a41e93cee429e8e1881abdcbb54f pub const EvmCollectionAddress: H160 = H160([ 0x6c, 0x4e, 0x9f, 0xe1, 0xae, 0x37, 0xa4, 0x1e, 0x93, 0xce, 0xe4, 0x29, 0xe8, 0xe1, 0x88, 0x1a, 0xbd, 0xcb, 0xb5, 0x4f, --- a/tests/src/eth/createCollection.test.ts +++ b/tests/src/eth/createCollection.test.ts @@ -101,7 +101,7 @@ expect(collection.constOnChainSchema.toHuman()).to.be.eq(constShema); }); - itWeb3.only('Set limits', async ({api, web3}) => { + itWeb3('Set limits', async ({api, web3}) => { const owner = await createEthAccountWithBalance(api, web3); const helper = collectionHelper(web3, owner); const result = await helper.methods.create721Collection('Const collection', '4', '4').send();