difftreelog
fix After rebase
in: master
8 files changed
crates/evm-coder/src/abi.rsdiffbeforeafterboth--- a/crates/evm-coder/src/abi.rs
+++ b/crates/evm-coder/src/abi.rs
@@ -28,10 +28,13 @@
types::{string, self},
};
use crate::execution::Result;
-use crate::solidity::SolidityTypeName;
const ABI_ALIGNMENT: usize = 32;
+trait TypeHelper<T> {
+ fn is_dynamic() -> bool;
+}
+
/// View into RLP data, which provides method to read typed items from it
#[derive(Clone)]
pub struct AbiReader<'i> {
@@ -330,11 +333,18 @@
pub trait AbiRead<T> {
/// Read item from current position, advanding decoder
fn abi_read(&mut self) -> Result<T>;
+
+ /// Size for type aligned to [`ABI_ALIGNMENT`].
fn size() -> usize;
}
macro_rules! impl_abi_readable {
- ($ty:ty, $method:ident) => {
+ ($ty:ty, $method:ident, $dynamic:literal) => {
+ impl TypeHelper<$ty> for $ty {
+ fn is_dynamic() -> bool {
+ $dynamic
+ }
+ }
impl AbiRead<$ty> for AbiReader<'_> {
fn abi_read(&mut self) -> Result<$ty> {
self.$method()
@@ -347,16 +357,16 @@
};
}
-impl_abi_readable!(u8, uint8);
-impl_abi_readable!(u32, uint32);
-impl_abi_readable!(u64, uint64);
-impl_abi_readable!(u128, uint128);
-impl_abi_readable!(U256, uint256);
-impl_abi_readable!([u8; 4], bytes4);
-impl_abi_readable!(H160, address);
-impl_abi_readable!(Vec<u8>, bytes);
-impl_abi_readable!(bool, bool);
-impl_abi_readable!(string, string);
+impl_abi_readable!(u8, uint8, false);
+impl_abi_readable!(u32, uint32, false);
+impl_abi_readable!(u64, uint64, false);
+impl_abi_readable!(u128, uint128, false);
+impl_abi_readable!(U256, uint256, false);
+impl_abi_readable!([u8; 4], bytes4, false);
+impl_abi_readable!(H160, address, false);
+impl_abi_readable!(Vec<u8>, bytes, true);
+impl_abi_readable!(bool, bool, true);
+impl_abi_readable!(string, string, true);
mod sealed {
/// Not all types can be placed in vec, i.e `Vec<u8>` is restricted, `bytes` should be used instead
@@ -389,16 +399,24 @@
macro_rules! impl_tuples {
($($ident:ident)+) => {
+ impl<$($ident: TypeHelper<$ident>,)+> TypeHelper<($($ident,)+)> for ($($ident,)+) {
+ fn is_dynamic() -> bool {
+ false
+ $(
+ || <$ident>::is_dynamic()
+ )*
+ }
+ }
impl<$($ident),+> sealed::CanBePlacedInVec for ($($ident,)+) {}
impl<$($ident),+> AbiRead<($($ident,)+)> for AbiReader<'_>
where
$(
Self: AbiRead<$ident>,
)+
- ($($ident,)+): SolidityTypeName,
+ ($($ident,)+): TypeHelper<($($ident,)+)>,
{
fn abi_read(&mut self) -> Result<($($ident,)+)> {
- let size = if <($($ident,)+)>::is_simple() { Some(<Self as AbiRead<($($ident,)+)>>::size()) } else { None };
+ let size = if !<($($ident,)+)>::is_dynamic() { Some(<Self as AbiRead<($($ident,)+)>>::size()) } else { None };
let mut subresult = self.subresult(size)?;
Ok((
$(<Self as AbiRead<$ident>>::abi_read(&mut subresult)?,)+
crates/evm-coder/src/solidity.rsdiffbeforeafterboth--- a/crates/evm-coder/src/solidity.rs
+++ b/crates/evm-coder/src/solidity.rs
@@ -192,10 +192,7 @@
write!(writer, "{}", tc.collect_tuple::<Self>())
}
fn is_simple() -> bool {
- true
- $(
- && <$ident>::is_simple()
- )*
+ false
}
#[allow(unused_assignments)]
fn solidity_default(writer: &mut impl fmt::Write, tc: &TypeCollector) -> fmt::Result {
pallets/fungible/src/erc.rsdiffbeforeafterboth--- a/pallets/fungible/src/erc.rs
+++ b/pallets/fungible/src/erc.rs
@@ -129,7 +129,7 @@
}
}
-#[solidity_interface(name = "ERC20Mintable")]
+#[solidity_interface(name = ERC20Mintable)]
impl<T: Config> FungibleHandle<T> {
/// Mint tokens for `to` account.
/// @param to account that will receive minted tokens
@@ -148,7 +148,7 @@
}
}
-#[solidity_interface(name = "ERC20UniqueExtensions")]
+#[solidity_interface(name = ERC20UniqueExtensions)]
impl<T: Config> FungibleHandle<T> {
/// Burn tokens from account
/// @dev Function that burns an `amount` of the tokens of a given account,
pallets/fungible/src/stubs/UniqueFungible.rawdiffbeforeafterbothbinary blob — no preview
pallets/fungible/src/stubs/UniqueFungible.soldiffbeforeafterboth--- a/pallets/fungible/src/stubs/UniqueFungible.sol
+++ b/pallets/fungible/src/stubs/UniqueFungible.sol
@@ -3,13 +3,7 @@
pragma solidity >=0.8.0 <0.9.0;
-// Anonymous struct
-struct Tuple0 {
- address field_0;
- uint256 field_1;
-}
-
-// Common stubs holder
+/// @dev common stubs holder
contract Dummy {
uint8 dummy;
string stub_error = "this contract is implemented in native";
@@ -27,49 +21,8 @@
}
}
-// Inline
-contract ERC20Events {
- event Transfer(address indexed from, address indexed to, uint256 value);
- event Approval(
- address indexed owner,
- address indexed spender,
- uint256 value
- );
-}
-
-// Selector: 40c10f19
-contract ERC20Mintable is Dummy, ERC165 {
- // Selector: mint(address,uint256) 40c10f19
- function mint(address to, uint256 amount) public returns (bool) {
- require(false, stub_error);
- to;
- amount;
- dummy = 0;
- return false;
- }
-}
-
-// Selector: 63034ac5
-contract ERC20UniqueExtensions is Dummy, ERC165 {
- // Selector: burnFrom(address,uint256) 79cc6790
- function burnFrom(address from, uint256 amount) public returns (bool) {
- require(false, stub_error);
- from;
- amount;
- dummy = 0;
- return false;
- }
-
- // Selector: mintBulk((address,uint256)[]) 1acf2d55
- function mintBulk(Tuple0[] memory amounts) public returns (bool) {
- require(false, stub_error);
- amounts;
- dummy = 0;
- return false;
- }
-}
-
-// Selector: 6cf113cd
+/// @title A contract that allows you to work with collections.
+/// @dev the ERC-165 identifier for this interface is 0xe54be640
contract Collection is Dummy, ERC165 {
/// Set collection property.
///
@@ -397,19 +350,51 @@
}
}
+/// @dev the ERC-165 identifier for this interface is 0x63034ac5
+contract ERC20UniqueExtensions is Dummy, ERC165 {
+ /// Burn tokens from account
+ /// @dev Function that burns an `amount` of the tokens of a given account,
+ /// deducting from the sender's allowance for said account.
+ /// @param from The account whose tokens will be burnt.
+ /// @param amount The amount that will be burnt.
+ /// @dev EVM selector for this function is: 0x79cc6790,
+ /// or in textual repr: burnFrom(address,uint256)
+ function burnFrom(address from, uint256 amount) public returns (bool) {
+ require(false, stub_error);
+ from;
+ amount;
+ dummy = 0;
+ return false;
+ }
+
+ /// Mint tokens for multiple accounts.
+ /// @param amounts array of pairs of account address and amount
+ /// @dev EVM selector for this function is: 0x1acf2d55,
+ /// or in textual repr: mintBulk((address,uint256)[])
+ function mintBulk(Tuple6[] memory amounts) public returns (bool) {
+ require(false, stub_error);
+ amounts;
+ dummy = 0;
+ return false;
+ }
+}
+
/// @dev anonymous struct
struct Tuple6 {
address field_0;
uint256 field_1;
}
-/// @dev the ERC-165 identifier for this interface is 0x79cc6790
-contract ERC20UniqueExtensions is Dummy, ERC165 {
- /// @dev EVM selector for this function is: 0x79cc6790,
- /// or in textual repr: burnFrom(address,uint256)
- function burnFrom(address from, uint256 amount) public returns (bool) {
+/// @dev the ERC-165 identifier for this interface is 0x40c10f19
+contract ERC20Mintable is Dummy, ERC165 {
+ /// Mint tokens for `to` account.
+ /// @param to account that will receive minted tokens
+ /// @param amount amount of tokens to mint
+ /// @dev EVM selector for this function is: 0x40c10f19,
+ /// or in textual repr: mint(address,uint256)
+ function mint(address to, uint256 amount) public returns (bool) {
require(false, stub_error);
- from;
+ to;
amount;
dummy = 0;
return false;
tests/src/eth/api/UniqueFungible.soldiffbeforeafterboth--- a/tests/src/eth/api/UniqueFungible.sol
+++ b/tests/src/eth/api/UniqueFungible.sol
@@ -3,13 +3,7 @@
pragma solidity >=0.8.0 <0.9.0;
-// Anonymous struct
-struct Tuple0 {
- address field_0;
- uint256 field_1;
-}
-
-// Common stubs holder
+/// @dev common stubs holder
interface Dummy {
}
@@ -18,32 +12,8 @@
function supportsInterface(bytes4 interfaceID) external view returns (bool);
}
-// Inline
-interface ERC20Events {
- event Transfer(address indexed from, address indexed to, uint256 value);
- event Approval(
- address indexed owner,
- address indexed spender,
- uint256 value
- );
-}
-
-// Selector: 40c10f19
-interface ERC20Mintable is Dummy, ERC165 {
- // Selector: mint(address,uint256) 40c10f19
- function mint(address to, uint256 amount) external returns (bool);
-}
-
-// Selector: 63034ac5
-interface ERC20UniqueExtensions is Dummy, ERC165 {
- // Selector: burnFrom(address,uint256) 79cc6790
- function burnFrom(address from, uint256 amount) external returns (bool);
-
- // Selector: mintBulk((address,uint256)[]) 1acf2d55
- function mintBulk(Tuple0[] memory amounts) external returns (bool);
-}
-
-// Selector: 6cf113cd
+/// @title A contract that allows you to work with collections.
+/// @dev the ERC-165 identifier for this interface is 0xe54be640
interface Collection is Dummy, ERC165 {
/// Set collection property.
///
@@ -237,13 +207,56 @@
/// @dev EVM selector for this function is: 0xd34b55b8,
/// or in textual repr: uniqueCollectionType()
function uniqueCollectionType() external returns (string memory);
+
+ /// Changes collection owner to another account
+ ///
+ /// @dev Owner can be changed only by current owner
+ /// @param newOwner new owner account
+ /// @dev EVM selector for this function is: 0x13af4035,
+ /// or in textual repr: setOwner(address)
+ function setOwner(address newOwner) external;
+
+ /// Changes collection owner to another substrate account
+ ///
+ /// @dev Owner can be changed only by current owner
+ /// @param newOwner new owner substrate account
+ /// @dev EVM selector for this function is: 0xb212138f,
+ /// or in textual repr: setOwnerSubstrate(uint256)
+ function setOwnerSubstrate(uint256 newOwner) external;
}
-/// @dev the ERC-165 identifier for this interface is 0x79cc6790
+/// @dev the ERC-165 identifier for this interface is 0x63034ac5
interface ERC20UniqueExtensions is Dummy, ERC165 {
+ /// Burn tokens from account
+ /// @dev Function that burns an `amount` of the tokens of a given account,
+ /// deducting from the sender's allowance for said account.
+ /// @param from The account whose tokens will be burnt.
+ /// @param amount The amount that will be burnt.
/// @dev EVM selector for this function is: 0x79cc6790,
/// or in textual repr: burnFrom(address,uint256)
function burnFrom(address from, uint256 amount) external returns (bool);
+
+ /// Mint tokens for multiple accounts.
+ /// @param amounts array of pairs of account address and amount
+ /// @dev EVM selector for this function is: 0x1acf2d55,
+ /// or in textual repr: mintBulk((address,uint256)[])
+ function mintBulk(Tuple6[] memory amounts) external returns (bool);
+}
+
+/// @dev anonymous struct
+struct Tuple6 {
+ address field_0;
+ uint256 field_1;
+}
+
+/// @dev the ERC-165 identifier for this interface is 0x40c10f19
+interface ERC20Mintable is Dummy, ERC165 {
+ /// Mint tokens for `to` account.
+ /// @param to account that will receive minted tokens
+ /// @param amount amount of tokens to mint
+ /// @dev EVM selector for this function is: 0x40c10f19,
+ /// or in textual repr: mint(address,uint256)
+ function mint(address to, uint256 amount) external returns (bool);
}
/// @dev inlined interface
tests/src/eth/base.test.tsdiffbeforeafterboth--- a/tests/src/eth/base.test.ts
+++ b/tests/src/eth/base.test.ts
@@ -94,7 +94,7 @@
});
itWeb3('ERC721 support', async ({web3}) => {
- expect(await contract(web3).methods.supportsInterface('0x58800161').call()).to.be.true;
+ expect(await contract(web3).methods.supportsInterface('0x780e9d63').call()).to.be.true;
});
itWeb3('ERC721Metadata support', async ({web3}) => {
tests/src/eth/fungibleAbi.jsondiffbeforeafterboth1[2 {3 "anonymous": false,4 "inputs": [5 {6 "indexed": true,7 "internalType": "address",8 "name": "owner",9 "type": "address"10 },11 {12 "indexed": true,13 "internalType": "address",14 "name": "spender",15 "type": "address"16 },17 {18 "indexed": false,19 "internalType": "uint256",20 "name": "value",21 "type": "uint256"22 }23 ],24 "name": "Approval",25 "type": "event"26 },27 {28 "anonymous": false,29 "inputs": [30 {31 "indexed": true,32 "internalType": "address",33 "name": "from",34 "type": "address"35 },36 {37 "indexed": true,38 "internalType": "address",39 "name": "to",40 "type": "address"41 },42 {43 "indexed": false,44 "internalType": "uint256",45 "name": "value",46 "type": "uint256"47 }48 ],49 "name": "Transfer",50 "type": "event"51 },52 {53 "inputs": [54 { "internalType": "address", "name": "newAdmin", "type": "address" }55 ],56 "name": "addCollectionAdmin",57 "outputs": [],58 "stateMutability": "nonpayable",59 "type": "function"60 },61 {62 "inputs": [63 { "internalType": "uint256", "name": "newAdmin", "type": "uint256" }64 ],65 "name": "addCollectionAdminSubstrate",66 "outputs": [],67 "stateMutability": "nonpayable",68 "type": "function"69 },70 {71 "inputs": [72 { "internalType": "address", "name": "user", "type": "address" }73 ],74 "name": "addToCollectionAllowList",75 "outputs": [],76 "stateMutability": "nonpayable",77 "type": "function"78 },79 {80 "inputs": [81 { "internalType": "address", "name": "owner", "type": "address" },82 { "internalType": "address", "name": "spender", "type": "address" }83 ],84 "name": "allowance",85 "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],86 "stateMutability": "view",87 "type": "function"88 },89 {90 "inputs": [91 { "internalType": "address", "name": "spender", "type": "address" },92 { "internalType": "uint256", "name": "amount", "type": "uint256" }93 ],94 "name": "approve",95 "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],96 "stateMutability": "nonpayable",97 "type": "function"98 },99 {100 "inputs": [101 { "internalType": "address", "name": "owner", "type": "address" }102 ],103 "name": "balanceOf",104 "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],105 "stateMutability": "view",106 "type": "function"107 },108 {109 "inputs": [110 { "internalType": "address", "name": "from", "type": "address" },111 { "internalType": "uint256", "name": "amount", "type": "uint256" }112 ],113 "name": "burnFrom",114 "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],115 "stateMutability": "nonpayable",116 "type": "function"117 },118 {119 "inputs": [{ "internalType": "string", "name": "key", "type": "string" }],120 "name": "collectionProperty",121 "outputs": [{ "internalType": "bytes", "name": "", "type": "bytes" }],122 "stateMutability": "view",123 "type": "function"124 },125 {126 "inputs": [],127 "name": "confirmCollectionSponsorship",128 "outputs": [],129 "stateMutability": "nonpayable",130 "type": "function"131 },132 {133 "inputs": [],134 "name": "contractAddress",135 "outputs": [{ "internalType": "address", "name": "", "type": "address" }],136 "stateMutability": "view",137 "type": "function"138 },139 {140 "inputs": [],141 "name": "decimals",142 "outputs": [{ "internalType": "uint8", "name": "", "type": "uint8" }],143 "stateMutability": "view",144 "type": "function"145 },146 {147 "inputs": [{ "internalType": "string", "name": "key", "type": "string" }],148 "name": "deleteCollectionProperty",149 "outputs": [],150 "stateMutability": "nonpayable",151 "type": "function"152 },153 {154 "inputs": [155 { "internalType": "address", "name": "to", "type": "address" },156 { "internalType": "uint256", "name": "amount", "type": "uint256" }157 ],158 "name": "mint",159 "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],160 "stateMutability": "nonpayable",161 "type": "function"162 },163 {164 "inputs": [165 {166 "components": [167 { "internalType": "address", "name": "field_0", "type": "address" },168 { "internalType": "uint256", "name": "field_1", "type": "uint256" }169 ],170 "internalType": "struct Tuple0[]",171 "name": "amounts",172 "type": "tuple[]"173 }174 ],175 "name": "mintBulk",176 "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],177 "stateMutability": "nonpayable",178 "type": "function"179 },180 {181 "inputs": [],182 "name": "getCollectionSponsor",183 "outputs": [184 {185 "components": [186 { "internalType": "address", "name": "field_0", "type": "address" },187 { "internalType": "uint256", "name": "field_1", "type": "uint256" }188 ],189 "internalType": "struct Tuple6",190 "name": "",191 "type": "tuple"192 }193 ],194 "stateMutability": "view",195 "type": "function"196 },197 {198 "inputs": [],199 "name": "hasCollectionPendingSponsor",200 "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],201 "stateMutability": "view",202 "type": "function"203 },204 {205 "inputs": [206 { "internalType": "address", "name": "user", "type": "address" }207 ],208 "name": "isOwnerOrAdmin",209 "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],210 "stateMutability": "view",211 "type": "function"212 },213 {214 "inputs": [215 { "internalType": "uint256", "name": "user", "type": "uint256" }216 ],217 "name": "isOwnerOrAdminSubstrate",218 "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],219 "stateMutability": "view",220 "type": "function"221 },222 {223 "inputs": [],224 "name": "name",225 "outputs": [{ "internalType": "string", "name": "", "type": "string" }],226 "stateMutability": "view",227 "type": "function"228 },229 {230 "inputs": [231 { "internalType": "address", "name": "admin", "type": "address" }232 ],233 "name": "removeCollectionAdmin",234 "outputs": [],235 "stateMutability": "nonpayable",236 "type": "function"237 },238 {239 "inputs": [240 { "internalType": "uint256", "name": "admin", "type": "uint256" }241 ],242 "name": "removeCollectionAdminSubstrate",243 "outputs": [],244 "stateMutability": "nonpayable",245 "type": "function"246 },247 {248 "inputs": [],249 "name": "removeCollectionSponsor",250 "outputs": [],251 "stateMutability": "nonpayable",252 "type": "function"253 },254 {255 "inputs": [256 { "internalType": "address", "name": "user", "type": "address" }257 ],258 "name": "removeFromCollectionAllowList",259 "outputs": [],260 "stateMutability": "nonpayable",261 "type": "function"262 },263 {264 "inputs": [{ "internalType": "uint8", "name": "mode", "type": "uint8" }],265 "name": "setCollectionAccess",266 "outputs": [],267 "stateMutability": "nonpayable",268 "type": "function"269 },270 {271 "inputs": [272 { "internalType": "string", "name": "limit", "type": "string" },273 { "internalType": "uint32", "name": "value", "type": "uint32" }274 ],275 "name": "setCollectionLimit",276 "outputs": [],277 "stateMutability": "nonpayable",278 "type": "function"279 },280 {281 "inputs": [282 { "internalType": "string", "name": "limit", "type": "string" },283 { "internalType": "bool", "name": "value", "type": "bool" }284 ],285 "name": "setCollectionLimit",286 "outputs": [],287 "stateMutability": "nonpayable",288 "type": "function"289 },290 {291 "inputs": [{ "internalType": "bool", "name": "mode", "type": "bool" }],292 "name": "setCollectionMintMode",293 "outputs": [],294 "stateMutability": "nonpayable",295 "type": "function"296 },297 {298 "inputs": [{ "internalType": "bool", "name": "enable", "type": "bool" }],299 "name": "setCollectionNesting",300 "outputs": [],301 "stateMutability": "nonpayable",302 "type": "function"303 },304 {305 "inputs": [306 { "internalType": "bool", "name": "enable", "type": "bool" },307 {308 "internalType": "address[]",309 "name": "collections",310 "type": "address[]"311 }312 ],313 "name": "setCollectionNesting",314 "outputs": [],315 "stateMutability": "nonpayable",316 "type": "function"317 },318 {319 "inputs": [320 { "internalType": "string", "name": "key", "type": "string" },321 { "internalType": "bytes", "name": "value", "type": "bytes" }322 ],323 "name": "setCollectionProperty",324 "outputs": [],325 "stateMutability": "nonpayable",326 "type": "function"327 },328 {329 "inputs": [330 { "internalType": "address", "name": "sponsor", "type": "address" }331 ],332 "name": "setCollectionSponsor",333 "outputs": [],334 "stateMutability": "nonpayable",335 "type": "function"336 },337 {338 "inputs": [339 { "internalType": "uint256", "name": "sponsor", "type": "uint256" }340 ],341 "name": "setCollectionSponsorSubstrate",342 "outputs": [],343 "stateMutability": "nonpayable",344 "type": "function"345 },346 {347 "inputs": [348 { "internalType": "address", "name": "newOwner", "type": "address" }349 ],350 "name": "setOwner",351 "outputs": [],352 "stateMutability": "nonpayable",353 "type": "function"354 },355 {356 "inputs": [357 { "internalType": "uint256", "name": "newOwner", "type": "uint256" }358 ],359 "name": "setOwnerSubstrate",360 "outputs": [],361 "stateMutability": "nonpayable",362 "type": "function"363 },364 {365 "inputs": [366 { "internalType": "bytes4", "name": "interfaceID", "type": "bytes4" }367 ],368 "name": "supportsInterface",369 "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],370 "stateMutability": "view",371 "type": "function"372 },373 {374 "inputs": [],375 "name": "symbol",376 "outputs": [{ "internalType": "string", "name": "", "type": "string" }],377 "stateMutability": "view",378 "type": "function"379 },380 {381 "inputs": [],382 "name": "totalSupply",383 "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],384 "stateMutability": "view",385 "type": "function"386 },387 {388 "inputs": [389 { "internalType": "address", "name": "to", "type": "address" },390 { "internalType": "uint256", "name": "amount", "type": "uint256" }391 ],392 "name": "transfer",393 "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],394 "stateMutability": "nonpayable",395 "type": "function"396 },397 {398 "inputs": [399 { "internalType": "address", "name": "from", "type": "address" },400 { "internalType": "address", "name": "to", "type": "address" },401 { "internalType": "uint256", "name": "amount", "type": "uint256" }402 ],403 "name": "transferFrom",404 "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],405 "stateMutability": "nonpayable",406 "type": "function"407 },408 {409 "inputs": [],410 "name": "uniqueCollectionType",411 "outputs": [{ "internalType": "string", "name": "", "type": "string" }],412 "stateMutability": "nonpayable",413 "type": "function"414 }415]1[2 {3 "anonymous": false,4 "inputs": [5 {6 "indexed": true,7 "internalType": "address",8 "name": "owner",9 "type": "address"10 },11 {12 "indexed": true,13 "internalType": "address",14 "name": "spender",15 "type": "address"16 },17 {18 "indexed": false,19 "internalType": "uint256",20 "name": "value",21 "type": "uint256"22 }23 ],24 "name": "Approval",25 "type": "event"26 },27 {28 "anonymous": false,29 "inputs": [30 {31 "indexed": true,32 "internalType": "address",33 "name": "from",34 "type": "address"35 },36 {37 "indexed": true,38 "internalType": "address",39 "name": "to",40 "type": "address"41 },42 {43 "indexed": false,44 "internalType": "uint256",45 "name": "value",46 "type": "uint256"47 }48 ],49 "name": "Transfer",50 "type": "event"51 },52 {53 "inputs": [54 { "internalType": "address", "name": "newAdmin", "type": "address" }55 ],56 "name": "addCollectionAdmin",57 "outputs": [],58 "stateMutability": "nonpayable",59 "type": "function"60 },61 {62 "inputs": [63 { "internalType": "uint256", "name": "newAdmin", "type": "uint256" }64 ],65 "name": "addCollectionAdminSubstrate",66 "outputs": [],67 "stateMutability": "nonpayable",68 "type": "function"69 },70 {71 "inputs": [72 { "internalType": "address", "name": "user", "type": "address" }73 ],74 "name": "addToCollectionAllowList",75 "outputs": [],76 "stateMutability": "nonpayable",77 "type": "function"78 },79 {80 "inputs": [81 { "internalType": "address", "name": "owner", "type": "address" },82 { "internalType": "address", "name": "spender", "type": "address" }83 ],84 "name": "allowance",85 "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],86 "stateMutability": "view",87 "type": "function"88 },89 {90 "inputs": [91 { "internalType": "address", "name": "spender", "type": "address" },92 { "internalType": "uint256", "name": "amount", "type": "uint256" }93 ],94 "name": "approve",95 "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],96 "stateMutability": "nonpayable",97 "type": "function"98 },99 {100 "inputs": [101 { "internalType": "address", "name": "owner", "type": "address" }102 ],103 "name": "balanceOf",104 "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],105 "stateMutability": "view",106 "type": "function"107 },108 {109 "inputs": [110 { "internalType": "address", "name": "from", "type": "address" },111 { "internalType": "uint256", "name": "amount", "type": "uint256" }112 ],113 "name": "burnFrom",114 "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],115 "stateMutability": "nonpayable",116 "type": "function"117 },118 {119 "inputs": [{ "internalType": "string", "name": "key", "type": "string" }],120 "name": "collectionProperty",121 "outputs": [{ "internalType": "bytes", "name": "", "type": "bytes" }],122 "stateMutability": "view",123 "type": "function"124 },125 {126 "inputs": [],127 "name": "confirmCollectionSponsorship",128 "outputs": [],129 "stateMutability": "nonpayable",130 "type": "function"131 },132 {133 "inputs": [],134 "name": "contractAddress",135 "outputs": [{ "internalType": "address", "name": "", "type": "address" }],136 "stateMutability": "view",137 "type": "function"138 },139 {140 "inputs": [],141 "name": "decimals",142 "outputs": [{ "internalType": "uint8", "name": "", "type": "uint8" }],143 "stateMutability": "view",144 "type": "function"145 },146 {147 "inputs": [{ "internalType": "string", "name": "key", "type": "string" }],148 "name": "deleteCollectionProperty",149 "outputs": [],150 "stateMutability": "nonpayable",151 "type": "function"152 },153 {154 "inputs": [],155 "name": "getCollectionSponsor",156 "outputs": [157 {158 "components": [159 { "internalType": "address", "name": "field_0", "type": "address" },160 { "internalType": "uint256", "name": "field_1", "type": "uint256" }161 ],162 "internalType": "struct Tuple6",163 "name": "",164 "type": "tuple"165 }166 ],167 "stateMutability": "view",168 "type": "function"169 },170 {171 "inputs": [],172 "name": "hasCollectionPendingSponsor",173 "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],174 "stateMutability": "view",175 "type": "function"176 },177 {178 "inputs": [179 { "internalType": "address", "name": "user", "type": "address" }180 ],181 "name": "isOwnerOrAdmin",182 "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],183 "stateMutability": "view",184 "type": "function"185 },186 {187 "inputs": [188 { "internalType": "uint256", "name": "user", "type": "uint256" }189 ],190 "name": "isOwnerOrAdminSubstrate",191 "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],192 "stateMutability": "view",193 "type": "function"194 },195 {196 "inputs": [197 { "internalType": "address", "name": "to", "type": "address" },198 { "internalType": "uint256", "name": "amount", "type": "uint256" }199 ],200 "name": "mint",201 "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],202 "stateMutability": "nonpayable",203 "type": "function"204 },205 {206 "inputs": [207 {208 "components": [209 { "internalType": "address", "name": "field_0", "type": "address" },210 { "internalType": "uint256", "name": "field_1", "type": "uint256" }211 ],212 "internalType": "struct Tuple6[]",213 "name": "amounts",214 "type": "tuple[]"215 }216 ],217 "name": "mintBulk",218 "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],219 "stateMutability": "nonpayable",220 "type": "function"221 },222 {223 "inputs": [],224 "name": "name",225 "outputs": [{ "internalType": "string", "name": "", "type": "string" }],226 "stateMutability": "view",227 "type": "function"228 },229 {230 "inputs": [231 { "internalType": "address", "name": "admin", "type": "address" }232 ],233 "name": "removeCollectionAdmin",234 "outputs": [],235 "stateMutability": "nonpayable",236 "type": "function"237 },238 {239 "inputs": [240 { "internalType": "uint256", "name": "admin", "type": "uint256" }241 ],242 "name": "removeCollectionAdminSubstrate",243 "outputs": [],244 "stateMutability": "nonpayable",245 "type": "function"246 },247 {248 "inputs": [],249 "name": "removeCollectionSponsor",250 "outputs": [],251 "stateMutability": "nonpayable",252 "type": "function"253 },254 {255 "inputs": [256 { "internalType": "address", "name": "user", "type": "address" }257 ],258 "name": "removeFromCollectionAllowList",259 "outputs": [],260 "stateMutability": "nonpayable",261 "type": "function"262 },263 {264 "inputs": [{ "internalType": "uint8", "name": "mode", "type": "uint8" }],265 "name": "setCollectionAccess",266 "outputs": [],267 "stateMutability": "nonpayable",268 "type": "function"269 },270 {271 "inputs": [272 { "internalType": "string", "name": "limit", "type": "string" },273 { "internalType": "uint32", "name": "value", "type": "uint32" }274 ],275 "name": "setCollectionLimit",276 "outputs": [],277 "stateMutability": "nonpayable",278 "type": "function"279 },280 {281 "inputs": [282 { "internalType": "string", "name": "limit", "type": "string" },283 { "internalType": "bool", "name": "value", "type": "bool" }284 ],285 "name": "setCollectionLimit",286 "outputs": [],287 "stateMutability": "nonpayable",288 "type": "function"289 },290 {291 "inputs": [{ "internalType": "bool", "name": "mode", "type": "bool" }],292 "name": "setCollectionMintMode",293 "outputs": [],294 "stateMutability": "nonpayable",295 "type": "function"296 },297 {298 "inputs": [{ "internalType": "bool", "name": "enable", "type": "bool" }],299 "name": "setCollectionNesting",300 "outputs": [],301 "stateMutability": "nonpayable",302 "type": "function"303 },304 {305 "inputs": [306 { "internalType": "bool", "name": "enable", "type": "bool" },307 {308 "internalType": "address[]",309 "name": "collections",310 "type": "address[]"311 }312 ],313 "name": "setCollectionNesting",314 "outputs": [],315 "stateMutability": "nonpayable",316 "type": "function"317 },318 {319 "inputs": [320 { "internalType": "string", "name": "key", "type": "string" },321 { "internalType": "bytes", "name": "value", "type": "bytes" }322 ],323 "name": "setCollectionProperty",324 "outputs": [],325 "stateMutability": "nonpayable",326 "type": "function"327 },328 {329 "inputs": [330 { "internalType": "address", "name": "sponsor", "type": "address" }331 ],332 "name": "setCollectionSponsor",333 "outputs": [],334 "stateMutability": "nonpayable",335 "type": "function"336 },337 {338 "inputs": [339 { "internalType": "uint256", "name": "sponsor", "type": "uint256" }340 ],341 "name": "setCollectionSponsorSubstrate",342 "outputs": [],343 "stateMutability": "nonpayable",344 "type": "function"345 },346 {347 "inputs": [348 { "internalType": "address", "name": "newOwner", "type": "address" }349 ],350 "name": "setOwner",351 "outputs": [],352 "stateMutability": "nonpayable",353 "type": "function"354 },355 {356 "inputs": [357 { "internalType": "uint256", "name": "newOwner", "type": "uint256" }358 ],359 "name": "setOwnerSubstrate",360 "outputs": [],361 "stateMutability": "nonpayable",362 "type": "function"363 },364 {365 "inputs": [366 { "internalType": "bytes4", "name": "interfaceID", "type": "bytes4" }367 ],368 "name": "supportsInterface",369 "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],370 "stateMutability": "view",371 "type": "function"372 },373 {374 "inputs": [],375 "name": "symbol",376 "outputs": [{ "internalType": "string", "name": "", "type": "string" }],377 "stateMutability": "view",378 "type": "function"379 },380 {381 "inputs": [],382 "name": "totalSupply",383 "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],384 "stateMutability": "view",385 "type": "function"386 },387 {388 "inputs": [389 { "internalType": "address", "name": "to", "type": "address" },390 { "internalType": "uint256", "name": "amount", "type": "uint256" }391 ],392 "name": "transfer",393 "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],394 "stateMutability": "nonpayable",395 "type": "function"396 },397 {398 "inputs": [399 { "internalType": "address", "name": "from", "type": "address" },400 { "internalType": "address", "name": "to", "type": "address" },401 { "internalType": "uint256", "name": "amount", "type": "uint256" }402 ],403 "name": "transferFrom",404 "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],405 "stateMutability": "nonpayable",406 "type": "function"407 },408 {409 "inputs": [],410 "name": "uniqueCollectionType",411 "outputs": [{ "internalType": "string", "name": "", "type": "string" }],412 "stateMutability": "nonpayable",413 "type": "function"414 }415]