Skip to content

Commit

Permalink
Marketplace Extensions (#85)
Browse files Browse the repository at this point in the history
  • Loading branch information
0xFirekeeper authored Oct 9, 2024
1 parent 179904c commit 9af3fa0
Show file tree
Hide file tree
Showing 8 changed files with 1,776 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Thirdweb.Console/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@

#endregion

// #region AA ZkSync
#region AA ZkSync

// var zkSmartWallet = await SmartWallet.Create(personalWallet: privateKeyWallet, chainId: 4654, gasless: true);

Expand All @@ -89,7 +89,7 @@

// Console.WriteLine($"Transaction hash: {hash}");

// #endregion
#endregion

#region Ecosystem Wallet

Expand Down
27 changes: 27 additions & 0 deletions Thirdweb.Tests/Thirdweb.Extensions/Thirdweb.Extensions.Tests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,33 @@ public async Task NullChecks()

// ERC721_TokenByIndex
_ = await Assert.ThrowsAsync<ArgumentNullException>(() => ThirdwebExtensions.ERC721_TokenByIndex(null, 0));

// SupportsInterface
_ = await Assert.ThrowsAsync<ArgumentNullException>(() => ThirdwebExtensions.SupportsInterface(null, "0x01ffc9a7"));
}

[Fact(Timeout = 120000)]
public async Task SupportsInterface_ERC721()
{
var contract = await this.GetDrop721Contract();
var supportsInterface = await contract.SupportsInterface(Constants.IERC721_INTERFACE_ID);
Assert.True(supportsInterface);
}

[Fact(Timeout = 120000)]
public async Task SupportsInterface_ERC1155()
{
var contract = await this.GetDrop1155Contract();
var supportsInterface = await contract.SupportsInterface(Constants.IERC1155_INTERFACE_ID);
Assert.True(supportsInterface);
}

[Fact(Timeout = 120000)]
public async Task SupportsInterface_False()
{
var contract = await this.GetTokenERC20Contract();
var supportsInterface = await contract.SupportsInterface(Constants.IERC721_INTERFACE_ID);
Assert.False(supportsInterface);
}

[Fact(Timeout = 120000)]
Expand Down
Loading

0 comments on commit 9af3fa0

Please sign in to comment.