Skip to content

Commit

Permalink
Merge pull request #39 from oasisprotocol/csillag/support-nfts
Browse files Browse the repository at this point in the history
Add support for NFTs
  • Loading branch information
csillag authored Sep 26, 2024
2 parents b9aae55 + acf3f3f commit b30df21
Show file tree
Hide file tree
Showing 12 changed files with 835 additions and 394 deletions.
39 changes: 26 additions & 13 deletions contracts/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,10 @@ export type AclOptionsXchain = {
blockHash: string;
address: string;
slot: number;
}
};
};

export type AclOptions =
{
export type AclOptions = {
address: string;
options: AclOptionsToken | AclOptionsAllowAll | AclOptionsAllowList | AclOptionsXchain;
};
Expand All @@ -38,25 +37,39 @@ export type Poll = {
};

export type StorageProof = {
key: string,
value: string,
proof: string[],
key: string;
value: string;
proof: string[];
};

export type GetProofResponse = {
balance: string,
codeHash: string,
nonce: string,
storageHash: string,
accountProof: string[],
storageProof: StorageProof[],
balance: string;
codeHash: string;
nonce: string;
storageHash: string;
accountProof: string[];
storageProof: StorageProof[];
};

export type TokenType = 'ERC-20';
export type NftType = 'ERC-721' | 'ERC-1155';
export type ContractType = TokenType | NftType;
export const isToken = (type: ContractType): boolean => type === 'ERC-20';

export type TokenInfo = {
chainId: bigint;
addr: string;
name: string;
symbol: string;
decimals: bigint;
totalSupply: bigint;
}
type: TokenType;
};

export type NFTInfo = {
chainId: bigint;
addr: string;
name?: string;
symbol?: string;
type: NftType;
};
Loading

0 comments on commit b30df21

Please sign in to comment.