This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from "react"; | |
import Moralis from "moralis"; | |
const defaultQueryOptions = { | |
live: false, | |
skip: false, | |
filter: () => {}, | |
onCreate: (object, vs) => [object].concat(vs ?? []), | |
onUpdate: (object, vs) => vs.map((v) => (v.id === object.id ? object : v)), | |
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// SPDX-License-Identifier: MIT | |
pragma solidity ^0.8.0; | |
import "./IERC1155.sol"; | |
import "./IERC1155Receiver.sol"; | |
import "./extensions/IERC1155MetadataURI.sol"; | |
import "../../utils/Address.sol"; | |
import "../../utils/Context.sol"; | |
import "../../utils/introspection/ERC165.sol"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type Fn = (...args: any) => any | |
type Awaited<T> = T extends PromiseLike<infer U> ? U : T | |
export function someDecorator<V extends Fn>(method: V) { | |
// Do some initialization logic here | |
return async function (...args: Parameters<V>): Promise<Awaited<ReturnType<V>>> { | |
// Do some args manipulation or validation | |
const value = await method(...args) |
OlderNewer