diff --git a/erc20/.gitignore b/erc20/.gitignore new file mode 100644 index 00000000..c522c4a3 --- /dev/null +++ b/erc20/.gitignore @@ -0,0 +1,19 @@ +# Node Modules +node_modules/ + +# Hardhat generated folders +artifacts/ +cache/ +typechain-types/ +typechain/ +coverage/ +coverage.json + +# Environment Variables (NEVER PUSH YOUR PRIVATE KEYS!) +.env + +# Custom Ignored Files for this Push +contracts/DeployedMarketplace.md +scripts/testMarketplace.ts +contracts/ERC20.sol +contracts/ERC721.sol \ No newline at end of file diff --git a/erc20/README.md b/erc20/README.md new file mode 100644 index 00000000..107f05e9 --- /dev/null +++ b/erc20/README.md @@ -0,0 +1,71 @@ + + + + + + + + + + diff --git a/erc20/contracts/Counter.sol b/erc20/contracts/Counter.sol new file mode 100644 index 00000000..c4997b49 --- /dev/null +++ b/erc20/contracts/Counter.sol @@ -0,0 +1,19 @@ +// SPDX-License-Identifier: UNLICENSED +pragma solidity ^0.8.28; + +contract Counter { + uint public x; + + event Increment(uint by); + + function inc() public { + x++; + emit Increment(1); + } + + function incBy(uint by) public { + require(by > 0, "incBy: increment should be positive"); + x += by; + emit Increment(by); + } +} diff --git a/erc20/contracts/Counter.t.sol b/erc20/contracts/Counter.t.sol new file mode 100644 index 00000000..ac71d5b8 --- /dev/null +++ b/erc20/contracts/Counter.t.sol @@ -0,0 +1,32 @@ +// SPDX-License-Identifier: UNLICENSED +pragma solidity ^0.8.28; + +import {Counter} from "./Counter.sol"; +import {Test} from "forge-std/Test.sol"; + +// Solidity tests are compatible with foundry, so they +// use the same syntax and offer the same functionality. + +contract CounterTest is Test { + Counter counter; + + function setUp() public { + counter = new Counter(); + } + + function test_InitialValue() public view { + require(counter.x() == 0, "Initial value should be 0"); + } + + function testFuzz_Inc(uint8 x) public { + for (uint8 i = 0; i < x; i++) { + counter.inc(); + } + require(counter.x() == x, "Value after calling inc x times should be x"); + } + + function test_IncByZero() public { + vm.expectRevert(); + counter.incBy(0); + } +} diff --git a/erc20/contracts/NFTmarketplace.sol b/erc20/contracts/NFTmarketplace.sol new file mode 100644 index 00000000..078cef46 --- /dev/null +++ b/erc20/contracts/NFTmarketplace.sol @@ -0,0 +1,123 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.28; + +// ERC721 Interface +interface IERC721 { + function ownerOf(uint256 tokenId) external view returns (address); + function getApproved(uint256 tokenId) external view returns (address); + function isApprovedForAll(address owner, address operator) external view returns (bool); + function transferFrom(address from, address to, uint256 tokenId) external; +} + +contract NFTmarketplace { + // Reentrancy guard + uint256 private constant _NOT_ENTERED = 1; + uint256 private constant _ENTERED = 2; + uint256 private _status; + + modifier nonReentrant() { + require(_status != _ENTERED, "ReentrancyGuard: reentrant call"); + _status = _ENTERED; + _; + _status = _NOT_ENTERED; + } + + // Marketplace state & setting + address public owner; + address payable public treasury; + uint256 public feePercentage; // e.g., 25 for 2.5% + + struct Listing { + address seller; + uint256 price; + } + + // Maps + mapping(address => mapping(uint256 => Listing)) public listings; // NFT contract => tokenId => Listing + + event ItemListed(address indexed seller, address indexed nftAddress, uint256 indexed tokenId, uint256 price); + event ListingCancelled(address indexed seller, address indexed nftAddress, uint256 indexed tokenId); + event ItemBought(address indexed buyer, address indexed nftAddress, uint256 indexed tokenId, uint256 price); + + constructor(address payable _treasury) { + owner = msg.sender; + treasury = _treasury; + feePercentage = 25; + _status = _NOT_ENTERED; + } + + modifier onlyOwner() { + require(msg.sender == owner, "Only owner can call this"); + _; + } + + // Marketplace fee + function setFeePercentage(uint256 _newFee) external onlyOwner { + feePercentage = _newFee; + } + + // Listing NFTs + function listNFT(address nftAddress, uint256 tokenId, uint256 price) external { + require(price > 0, "Price must be > 0"); + + IERC721 nft = IERC721(nftAddress); + require(nft.ownerOf(tokenId) == msg.sender, "Not the owner"); + + require( + nft.getApproved(tokenId) == address(this) || nft.isApprovedForAll(msg.sender, address (this)), + "Marketplace not approved" + ); + + // Escrow the NFT + nft.transferFrom(msg.sender, address(this), tokenId); + + // Save the listing + listings[nftAddress][tokenId] = Listing(msg.sender, price); + + emit ItemListed(msg.sender, nftAddress, tokenId, price); + } + + // Cancel Listing + function cancelListing(address nftAddress, uint256 tokenId) external nonReentrant { + Listing memory listing = listings[nftAddress][tokenId]; + + require(listing.price > 0, "Not Listed"); + require(listing.seller == msg.sender, "Not the selleer"); + + // Remove Listing + delete listings[nftAddress][tokenId]; + + // Return NFT back to Seller + IERC721(nftAddress).transferFrom(address(this), msg.sender, tokenId); + + emit ListingCancelled(msg.sender, nftAddress, tokenId); + } + + // Buy NFT + function buyNFT(address nftAddress, uint256 tokenId) external payable nonReentrant { + Listing memory listing = listings[nftAddress][tokenId]; + + require(listing.price > 0, "Not Listed"); + require(msg.value >= listing.price, "Insufficient payment"); + + // Calculate fee and seller cut + uint256 fee = (msg.value * feePercentage) / 1000; + uint256 sellerProceeds = msg.value - fee; + + // Remove listing to prevent reentrancy + delete listings[nftAddress][tokenId]; + + // Transfer NFT to buyer + IERC721(nftAddress).transferFrom(address(this), msg.sender, tokenId); + + // Transfer funds to treasury + (bool feeSuccess, ) = treasury.call{value: fee}(""); + require(feeSuccess, "Treasury transfer failed"); + + // Transfer remaining funds to seller + (bool sellerSuccesss, ) = payable(listing.seller).call{value: sellerProceeds}(""); + require(sellerSuccesss, "Seller transfer failed"); + + emit ItemBought(msg.sender, nftAddress, tokenId, listing.price); + } +} \ No newline at end of file diff --git a/erc20/hardhat.config.ts b/erc20/hardhat.config.ts new file mode 100644 index 00000000..0225d71b --- /dev/null +++ b/erc20/hardhat.config.ts @@ -0,0 +1,40 @@ +import hardhatToolboxMochaEthersPlugin from "@nomicfoundation/hardhat-toolbox-mocha-ethers"; +import { configVariable, defineConfig } from "hardhat/config"; + +export default defineConfig({ + plugins: [hardhatToolboxMochaEthersPlugin], + solidity: { + profiles: { + default: { + version: "0.8.28", + }, + production: { + version: "0.8.28", + settings: { + optimizer: { + enabled: true, + runs: 200, + }, + }, + }, + }, + }, + networks: { + hardhatMainnet: { + type: "edr-simulated", + chainType: "l1", + }, + hardhatOp: { + type: "edr-simulated", + chainType: "op", + }, + sepolia: { + type: "http", + chainType: "l1", + url: configVariable("SEPOLIA_RPC_URL"), + accounts: [configVariable("SEPOLIA_PRIVATE_KEY")], + }, + }, + + // 7e318ba7f9c52530342d2ae81ccb02da9156d4c49121d541ac8de41d0d6ce619 +}); diff --git a/erc20/ignition/deployments/chain-11155111/build-info/solc-0_8_28-46340a8327d1ad8f41ff4718c2249f1e0ea18999.json b/erc20/ignition/deployments/chain-11155111/build-info/solc-0_8_28-46340a8327d1ad8f41ff4718c2249f1e0ea18999.json new file mode 100644 index 00000000..71d1edf9 --- /dev/null +++ b/erc20/ignition/deployments/chain-11155111/build-info/solc-0_8_28-46340a8327d1ad8f41ff4718c2249f1e0ea18999.json @@ -0,0 +1,39 @@ +{ + "_format": "hh3-sol-build-info-1", + "id": "solc-0_8_28-46340a8327d1ad8f41ff4718c2249f1e0ea18999", + "solcVersion": "0.8.28", + "solcLongVersion": "0.8.28+commit.7893614a", + "userSourceNameMap": { + "contracts/NFTmarketplace.sol": "project/contracts/NFTmarketplace.sol" + }, + "input": { + "language": "Solidity", + "settings": { + "evmVersion": "cancun", + "optimizer": { + "enabled": true, + "runs": 200 + }, + "outputSelection": { + "*": { + "": [ + "ast" + ], + "*": [ + "abi", + "evm.bytecode", + "evm.deployedBytecode", + "evm.methodIdentifiers", + "metadata" + ] + } + }, + "remappings": [] + }, + "sources": { + "project/contracts/NFTmarketplace.sol": { + "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.28;\n\n// ERC721 Interface\ninterface IERC721 {\n function ownerOf(uint256 tokenId) external view returns (address);\n function getApproved(uint256 tokenId) external view returns (address);\n function isApprovedForAll(address owner, address operator) external view returns (bool);\n function transferFrom(address from, address to, uint256 tokenId) external;\n}\n\ncontract NFTmarketplace {\n // Reentrancy guard\n uint256 private constant _NOT_ENTERED = 1;\n uint256 private constant _ENTERED = 2;\n uint256 private _status;\n\n modifier nonReentrant() {\n require(_status != _ENTERED, \"ReentrancyGuard: reentrant call\");\n _status = _ENTERED;\n _;\n _status = _NOT_ENTERED;\n }\n\n // Marketplace state & setting\n address public owner;\n address payable public treasury;\n uint256 public feePercentage; // e.g., 25 for 2.5%\n\n struct Listing {\n address seller;\n uint256 price;\n }\n\n // Maps\n mapping(address => mapping(uint256 => Listing)) public listings; // NFT contract => tokenId => Listing\n\n event ItemListed(address indexed seller, address indexed nftAddress, uint256 indexed tokenId, uint256 price);\n event ListingCancelled(address indexed seller, address indexed nftAddress, uint256 indexed tokenId);\n event ItemBought(address indexed buyer, address indexed nftAddress, uint256 indexed tokenId, uint256 price);\n\n constructor(address payable _treasury) {\n owner = msg.sender;\n treasury = _treasury;\n feePercentage = 25;\n _status = _NOT_ENTERED;\n }\n\n modifier onlyOwner() {\n require(msg.sender == owner, \"Only owner can call this\");\n _;\n }\n\n // Marketplace fee\n function setFeePercentage(uint256 _newFee) external onlyOwner {\n feePercentage = _newFee;\n }\n\n // Listing NFTs\n function listNFT(address nftAddress, uint256 tokenId, uint256 price) external {\n require(price > 0, \"Price must be > 0\");\n\n IERC721 nft = IERC721(nftAddress);\n require(nft.ownerOf(tokenId) == msg.sender, \"Not the owner\");\n\n require(\n nft.getApproved(tokenId) == address(this) || nft.isApprovedForAll(msg.sender, address (this)),\n \"Marketplace not approved\"\n );\n\n // Escrow the NFT\n nft.transferFrom(msg.sender, address(this), tokenId);\n\n // Save the listing\n listings[nftAddress][tokenId] = Listing(msg.sender, price);\n\n emit ItemListed(msg.sender, nftAddress, tokenId, price);\n }\n\n // Cancel Listing\n function cancelListing(address nftAddress, uint256 tokenId) external nonReentrant {\n Listing memory listing = listings[nftAddress][tokenId];\n\n require(listing.price > 0, \"Not Listed\");\n require(listing.seller == msg.sender, \"Not the selleer\");\n\n // Remove Listing\n delete listings[nftAddress][tokenId];\n\n // Return NFT back to Seller\n IERC721(nftAddress).transferFrom(address(this), msg.sender, tokenId);\n\n emit ListingCancelled(msg.sender, nftAddress, tokenId);\n }\n\n // Buy NFT\n function buyNFT(address nftAddress, uint256 tokenId) external payable nonReentrant {\n Listing memory listing = listings[nftAddress][tokenId];\n\n require(listing.price > 0, \"Not Listed\");\n require(msg.value >= listing.price, \"Insufficient payment\");\n\n // Calculate fee and seller cut \n uint256 fee = (msg.value * feePercentage) / 1000;\n uint256 sellerProceeds = msg.value - fee;\n\n // Remove listing to prevent reentrancy\n delete listings[nftAddress][tokenId];\n\n // Transfer NFT to buyer\n IERC721(nftAddress).transferFrom(address(this), msg.sender, tokenId);\n\n // Transfer funds to treasury\n (bool feeSuccess, ) = treasury.call{value: fee}(\"\");\n require(feeSuccess, \"Treasury transfer failed\");\n\n // Transfer remaining funds to seller\n (bool sellerSuccesss, ) = payable(listing.seller).call{value: sellerProceeds}(\"\");\n require(sellerSuccesss, \"Seller transfer failed\");\n\n emit ItemBought(msg.sender, nftAddress, tokenId, listing.price);\n }\n}" + } + } + } +} \ No newline at end of file diff --git a/erc20/ignition/deployments/chain-11155111/deployed_addresses.json b/erc20/ignition/deployments/chain-11155111/deployed_addresses.json new file mode 100644 index 00000000..a5dff7b8 --- /dev/null +++ b/erc20/ignition/deployments/chain-11155111/deployed_addresses.json @@ -0,0 +1,3 @@ +{ + "NFTMarketplaceModule#NFTmarketplace": "0x5974F3d3f8518ef4DF49F22A5464a54997d262DB" +} \ No newline at end of file diff --git a/erc20/ignition/deployments/chain-11155111/journal.jsonl b/erc20/ignition/deployments/chain-11155111/journal.jsonl new file mode 100644 index 00000000..4f6c1430 --- /dev/null +++ b/erc20/ignition/deployments/chain-11155111/journal.jsonl @@ -0,0 +1,8 @@ + +{"chainId":11155111,"type":"DEPLOYMENT_INITIALIZE"} +{"artifactId":"NFTMarketplaceModule#NFTmarketplace","constructorArgs":["0x32e431575062f115be156a19C13bA4aa29d44065"],"contractName":"NFTmarketplace","dependencies":[],"from":"0x32e431575062f115be156a19c13ba4aa29d44065","futureId":"NFTMarketplaceModule#NFTmarketplace","futureType":"NAMED_ARTIFACT_CONTRACT_DEPLOYMENT","libraries":{},"strategy":"basic","strategyConfig":{},"type":"DEPLOYMENT_EXECUTION_STATE_INITIALIZE","value":{"_kind":"bigint","value":"0"}} +{"futureId":"NFTMarketplaceModule#NFTmarketplace","networkInteraction":{"data":"0x6080604052348015600e575f5ffd5b50604051610ca1380380610ca1833981016040819052602b916064565b60018054336001600160a01b0319918216178255600280549091166001600160a01b03939093169290921790915560196003555f55608f565b5f602082840312156073575f5ffd5b81516001600160a01b03811681146088575f5ffd5b9392505050565b610c058061009c5f395ff3fe608060405260043610610078575f3560e01c8063a82ba76f1161004c578063a82ba76f14610162578063ad05f1b414610177578063ae06c1b714610196578063b2ddee06146101b5575f5ffd5b806207df301461007c57806361d027b3146100e95780638da5cb5b14610120578063a001ecdd1461013f575b5f5ffd5b348015610087575f5ffd5b506100c5610096366004610ab8565b600460209081525f9283526040808420909152908252902080546001909101546001600160a01b039091169082565b604080516001600160a01b0390931683526020830191909152015b60405180910390f35b3480156100f4575f5ffd5b50600254610108906001600160a01b031681565b6040516001600160a01b0390911681526020016100e0565b34801561012b575f5ffd5b50600154610108906001600160a01b031681565b34801561014a575f5ffd5b5061015460035481565b6040519081526020016100e0565b610175610170366004610ab8565b6101d4565b005b348015610182575f5ffd5b50610175610191366004610ae2565b610546565b3480156101a1575f5ffd5b506101756101b0366004610b14565b61085b565b3480156101c0575f5ffd5b506101756101cf366004610ab8565b6108ba565b60025f540361022a5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064015b60405180910390fd5b60025f9081556001600160a01b0380841682526004602090815260408084208585528252928390208351808501909452805490921683526001909101549082018190526102a65760405162461bcd60e51b815260206004820152600a602482015269139bdd08131a5cdd195960b21b6044820152606401610221565b80602001513410156102f15760405162461bcd60e51b8152602060048201526014602482015273125b9cdd59999a58da595b9d081c185e5b595b9d60621b6044820152606401610221565b5f6103e8600354346103039190610b3f565b61030d9190610b5c565b90505f61031a8234610b7b565b6001600160a01b0386165f8181526004602081815260408084208a855290915280832080546001600160a01b03191681556001019290925590516323b872dd60e01b8152309181019190915233602482015260448101879052919250906323b872dd906064015f604051808303815f87803b158015610397575f5ffd5b505af11580156103a9573d5f5f3e3d5ffd5b50506002546040515f93506001600160a01b03909116915084908381818185875af1925050503d805f81146103f9576040519150601f19603f3d011682016040523d82523d5f602084013e6103fe565b606091505b505090508061044f5760405162461bcd60e51b815260206004820152601860248201527f5472656173757279207472616e73666572206661696c656400000000000000006044820152606401610221565b83516040515f916001600160a01b03169084908381818185875af1925050503d805f8114610498576040519150601f19603f3d011682016040523d82523d5f602084013e61049d565b606091505b50509050806104e75760405162461bcd60e51b815260206004820152601660248201527514d95b1b195c881d1c985b9cd9995c8819985a5b195960521b6044820152606401610221565b85876001600160a01b0316336001600160a01b03167f263223b1dd81e51054a4e6f791d45a4a1ddb4aadcd93a2dfd892615c3fdac187886020015160405161053191815260200190565b60405180910390a4505060015f555050505050565b5f81116105895760405162461bcd60e51b815260206004820152601160248201527005072696365206d757374206265203e203607c1b6044820152606401610221565b6040516331a9108f60e11b815260048101839052839033906001600160a01b03831690636352211e90602401602060405180830381865afa1580156105d0573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906105f49190610b8e565b6001600160a01b03161461063a5760405162461bcd60e51b815260206004820152600d60248201526c2737ba103a34329037bbb732b960991b6044820152606401610221565b60405163020604bf60e21b81526004810184905230906001600160a01b0383169063081812fc90602401602060405180830381865afa15801561067f573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906106a39190610b8e565b6001600160a01b0316148061071f575060405163e985e9c560e01b81523360048201523060248201526001600160a01b0382169063e985e9c590604401602060405180830381865afa1580156106fb573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061071f9190610bb0565b61076b5760405162461bcd60e51b815260206004820152601860248201527f4d61726b6574706c616365206e6f7420617070726f76656400000000000000006044820152606401610221565b6040516323b872dd60e01b8152336004820152306024820152604481018490526001600160a01b038216906323b872dd906064015f604051808303815f87803b1580156107b6575f5ffd5b505af11580156107c8573d5f5f3e3d5ffd5b50506040805180820182523380825260208083018881526001600160a01b038b81165f818152600485528781208d82528552879020955186546001600160a01b031916921691909117855590516001909401939093559251878152889550919350917fd547e933094f12a9159076970143ebe73234e64480317844b0dcb36117116de4910160405180910390a450505050565b6001546001600160a01b031633146108b55760405162461bcd60e51b815260206004820152601860248201527f4f6e6c79206f776e65722063616e2063616c6c207468697300000000000000006044820152606401610221565b600355565b60025f540361090b5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610221565b60025f9081556001600160a01b0380841682526004602090815260408084208585528252928390208351808501909452805490921683526001909101549082018190526109875760405162461bcd60e51b815260206004820152600a602482015269139bdd08131a5cdd195960b21b6044820152606401610221565b80516001600160a01b031633146109d25760405162461bcd60e51b815260206004820152600f60248201526e2737ba103a34329039b2b63632b2b960891b6044820152606401610221565b6001600160a01b0383165f81815260046020818152604080842087855290915280832080546001600160a01b03191681556001019290925590516323b872dd60e01b81523091810191909152336024820152604481018490526323b872dd906064015f604051808303815f87803b158015610a4b575f5ffd5b505af1158015610a5d573d5f5f3e3d5ffd5b50506040518492506001600160a01b038616915033907fe1bfe61cb157e0896411ccf9a5c40e4c346f7bb6e1d2a44de4a724f0cb5c6fb0905f90a4505060015f5550565b6001600160a01b0381168114610ab5575f5ffd5b50565b5f5f60408385031215610ac9575f5ffd5b8235610ad481610aa1565b946020939093013593505050565b5f5f5f60608486031215610af4575f5ffd5b8335610aff81610aa1565b95602085013595506040909401359392505050565b5f60208284031215610b24575f5ffd5b5035919050565b634e487b7160e01b5f52601160045260245ffd5b8082028115828204841417610b5657610b56610b2b565b92915050565b5f82610b7657634e487b7160e01b5f52601260045260245ffd5b500490565b81810381811115610b5657610b56610b2b565b5f60208284031215610b9e575f5ffd5b8151610ba981610aa1565b9392505050565b5f60208284031215610bc0575f5ffd5b81518015158114610ba9575f5ffdfea264697066735822122059d1e3d09a9869ebc9e8498e7c86c11a66434b97439d1ea892b2e02357df1d9364736f6c634300081c003300000000000000000000000032e431575062f115be156a19c13ba4aa29d44065","id":1,"type":"ONCHAIN_INTERACTION","value":{"_kind":"bigint","value":"0"}},"type":"NETWORK_INTERACTION_REQUEST"} +{"futureId":"NFTMarketplaceModule#NFTmarketplace","networkInteractionId":1,"nonce":37,"type":"TRANSACTION_PREPARE_SEND"} +{"futureId":"NFTMarketplaceModule#NFTmarketplace","networkInteractionId":1,"nonce":37,"transaction":{"fees":{"maxFeePerGas":{"_kind":"bigint","value":"1000026"},"maxPriorityFeePerGas":{"_kind":"bigint","value":"1000000"}},"hash":"0xf55adcddc6f29fb06f46117ad208b76ee6940878ecfba87a5f85026d66ecbb43"},"type":"TRANSACTION_SEND"} +{"futureId":"NFTMarketplaceModule#NFTmarketplace","hash":"0xf55adcddc6f29fb06f46117ad208b76ee6940878ecfba87a5f85026d66ecbb43","networkInteractionId":1,"receipt":{"blockHash":"0x32f4dfffede6b47583a46bb6a0b4b6821f414601f9d1c090308c4c06ee86d264","blockNumber":10318951,"contractAddress":"0x5974F3d3f8518ef4DF49F22A5464a54997d262DB","logs":[],"status":"SUCCESS"},"type":"TRANSACTION_CONFIRM"} +{"futureId":"NFTMarketplaceModule#NFTmarketplace","result":{"address":"0x5974F3d3f8518ef4DF49F22A5464a54997d262DB","type":"SUCCESS"},"type":"DEPLOYMENT_EXECUTION_STATE_COMPLETE"} \ No newline at end of file diff --git a/erc20/ignition/modules/Counter.ts b/erc20/ignition/modules/Counter.ts new file mode 100644 index 00000000..042e61c8 --- /dev/null +++ b/erc20/ignition/modules/Counter.ts @@ -0,0 +1,9 @@ +import { buildModule } from "@nomicfoundation/hardhat-ignition/modules"; + +export default buildModule("CounterModule", (m) => { + const counter = m.contract("Counter"); + + m.call(counter, "incBy", [5n]); + + return { counter }; +}); diff --git a/erc20/ignition/modules/ERC20.ts b/erc20/ignition/modules/ERC20.ts new file mode 100644 index 00000000..38213172 --- /dev/null +++ b/erc20/ignition/modules/ERC20.ts @@ -0,0 +1,6 @@ +import { buildModule } from "@nomicfoundation/hardhat-ignition/modules"; + +export default buildModule('ERC20Module', (m) => { + const erc20 = m.contract('ERC20', ['LONER', 'LNR', 6, 2000000000]) + return {erc20} +}) \ No newline at end of file diff --git a/erc20/ignition/modules/ERC721.ts b/erc20/ignition/modules/ERC721.ts new file mode 100644 index 00000000..6e457488 --- /dev/null +++ b/erc20/ignition/modules/ERC721.ts @@ -0,0 +1,11 @@ +import { buildModule } from "@nomicfoundation/hardhat-ignition/modules"; + +export default buildModule("ERC721Module", (m) => { + const erc721 = m.contract("ERC721", [ + "DEFI-WOMAN", + "WIDNFT", + "ipfs://bafkreih4myeqd4jpuxj2lv7aqdyayvfvj2wa25yus52jnq7nnge5vacmti/" + ]); + + return { erc721 }; +}); \ No newline at end of file diff --git a/erc20/ignition/modules/NFTmarketplace.ts b/erc20/ignition/modules/NFTmarketplace.ts new file mode 100644 index 00000000..e1e0fcba --- /dev/null +++ b/erc20/ignition/modules/NFTmarketplace.ts @@ -0,0 +1,11 @@ +import { buildModule } from "@nomicfoundation/hardhat-ignition/modules"; + +export default buildModule("NFTMarketplaceModule", (m) => { + // This is your wallet address. It will act as the "treasury" to collect the 2.5% fees. + const treasuryAddress = "0x32e431575062f115be156a19C13bA4aa29d44065"; + + // Deploy the contract and pass the treasury address to the constructor + const marketplace = m.contract("NFTmarketplace", [treasuryAddress]); + + return { marketplace }; +}); \ No newline at end of file diff --git a/erc20/package.json b/erc20/package.json new file mode 100644 index 00000000..cefb1a42 --- /dev/null +++ b/erc20/package.json @@ -0,0 +1,20 @@ +{ + "name": "erc20", + "version": "1.0.0", + "type": "module", + "devDependencies": { + "@nomicfoundation/hardhat-ethers": "^4.0.4", + "@nomicfoundation/hardhat-ignition": "^3.0.7", + "@nomicfoundation/hardhat-toolbox-mocha-ethers": "^3.0.2", + "@types/chai": "^4.3.20", + "@types/chai-as-promised": "^8.0.2", + "@types/mocha": "^10.0.10", + "@types/node": "^22.19.11", + "chai": "^5.3.3", + "ethers": "^6.16.0", + "forge-std": "github:foundry-rs/forge-std#v1.9.4", + "hardhat": "^3.1.8", + "mocha": "^11.7.5", + "typescript": "~5.8.0" + } +} diff --git a/erc20/scripts/mint.ts b/erc20/scripts/mint.ts new file mode 100644 index 00000000..7b7d07a9 --- /dev/null +++ b/erc20/scripts/mint.ts @@ -0,0 +1,36 @@ +import { ethers } from "ethers"; + +async function main() { + // 1. Connect directly to the Sepolia RPC + const provider = new ethers.JsonRpcProvider("https://ethereum-sepolia-rpc.publicnode.com"); + + // 2. Connect your wallet using the private key from your config comments + const privateKey = "7e318ba7f9c52530342d2ae81ccb02da9156d4c49121d541ac8de41d0d6ce619"; + const wallet = new ethers.Wallet(privateKey, provider); + + console.log(`Wallet connected: ${wallet.address}`); + + // 3. Connect to your deployed contract + const contractAddress = "0xe4f44FCB12bfe1996163106177c44FA64560A9Ff"; + + // We only need the ABI for the mint function to interact with it + const abi = [ + "function mint(address to, uint256 tokenId) external" + ]; + const erc721 = new ethers.Contract(contractAddress, abi, wallet); + + // 4. Execute the mint transaction! + console.log("Sending mint transaction for Token #1..."); + const tx = await erc721.mint(wallet.address, 1); + + console.log(`Transaction sent! Hash: ${tx.hash}`); + console.log("Waiting for block confirmation..."); + + await tx.wait(); + console.log("✅ Minted Token 1 successfully!"); +} + +main().catch((error) => { + console.error(error); + process.exitCode = 1; +}); \ No newline at end of file diff --git a/erc20/scripts/send-op-tx.ts b/erc20/scripts/send-op-tx.ts new file mode 100644 index 00000000..c10a2360 --- /dev/null +++ b/erc20/scripts/send-op-tx.ts @@ -0,0 +1,22 @@ +import { network } from "hardhat"; + +const { ethers } = await network.connect({ + network: "hardhatOp", + chainType: "op", +}); + +console.log("Sending transaction using the OP chain type"); + +const [sender] = await ethers.getSigners(); + +console.log("Sending 1 wei from", sender.address, "to itself"); + +console.log("Sending L2 transaction"); +const tx = await sender.sendTransaction({ + to: sender.address, + value: 1n, +}); + +await tx.wait(); + +console.log("Transaction sent successfully"); diff --git a/erc20/test/Counter.ts b/erc20/test/Counter.ts new file mode 100644 index 00000000..f8c38986 --- /dev/null +++ b/erc20/test/Counter.ts @@ -0,0 +1,36 @@ +import { expect } from "chai"; +import { network } from "hardhat"; + +const { ethers } = await network.connect(); + +describe("Counter", function () { + it("Should emit the Increment event when calling the inc() function", async function () { + const counter = await ethers.deployContract("Counter"); + + await expect(counter.inc()).to.emit(counter, "Increment").withArgs(1n); + }); + + it("The sum of the Increment events should match the current value", async function () { + const counter = await ethers.deployContract("Counter"); + const deploymentBlockNumber = await ethers.provider.getBlockNumber(); + + // run a series of increments + for (let i = 1; i <= 10; i++) { + await counter.incBy(i); + } + + const events = await counter.queryFilter( + counter.filters.Increment(), + deploymentBlockNumber, + "latest", + ); + + // check that the aggregated events match the current value + let total = 0n; + for (const event of events) { + total += event.args.by; + } + + expect(await counter.x()).to.equal(total); + }); +}); diff --git a/erc20/tsconfig.json b/erc20/tsconfig.json new file mode 100644 index 00000000..9b1380cc --- /dev/null +++ b/erc20/tsconfig.json @@ -0,0 +1,13 @@ +/* Based on https://github.com/tsconfig/bases/blob/501da2bcd640cf95c95805783e1012b992338f28/bases/node22.json */ +{ + "compilerOptions": { + "lib": ["es2023"], + "module": "node16", + "target": "es2022", + "strict": true, + "esModuleInterop": true, + "skipLibCheck": true, + "moduleResolution": "node16", + "outDir": "dist" + } +} diff --git a/erc20/types/ethers-contracts/Counter.ts b/erc20/types/ethers-contracts/Counter.ts new file mode 100644 index 00000000..b34567ad --- /dev/null +++ b/erc20/types/ethers-contracts/Counter.ts @@ -0,0 +1,119 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { BaseContract, BigNumberish, BytesLike, FunctionFragment, Result, Interface, EventFragment, ContractRunner, ContractMethod, Listener } from "ethers" +import type { TypedContractEvent, TypedDeferredTopicFilter, TypedEventLog, TypedLogDescription, TypedListener, TypedContractMethod } from "./common.js" + + + export interface CounterInterface extends Interface { + getFunction(nameOrSignature: "inc" | "incBy" | "x"): FunctionFragment; + + getEvent(nameOrSignatureOrTopic: "Increment"): EventFragment; + + encodeFunctionData(functionFragment: 'inc', values?: undefined): string; +encodeFunctionData(functionFragment: 'incBy', values: [BigNumberish]): string; +encodeFunctionData(functionFragment: 'x', values?: undefined): string; + + decodeFunctionResult(functionFragment: 'inc', data: BytesLike): Result; +decodeFunctionResult(functionFragment: 'incBy', data: BytesLike): Result; +decodeFunctionResult(functionFragment: 'x', data: BytesLike): Result; + } + + + export namespace IncrementEvent { + export type InputTuple = [by: BigNumberish]; + export type OutputTuple = [by: bigint]; + export interface OutputObject {by: bigint }; + export type Event = TypedContractEvent + export type Filter = TypedDeferredTopicFilter + export type Log = TypedEventLog + export type LogDescription = TypedLogDescription + } + + + + export interface Counter extends BaseContract { + + connect(runner?: ContractRunner | null): Counter; + waitForDeployment(): Promise; + + interface: CounterInterface; + + + queryFilter( + event: TCEvent, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined, + ): Promise>> + queryFilter( + filter: TypedDeferredTopicFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + + on(event: TCEvent, listener: TypedListener): Promise + on(filter: TypedDeferredTopicFilter, listener: TypedListener): Promise + + once(event: TCEvent, listener: TypedListener): Promise + once(filter: TypedDeferredTopicFilter, listener: TypedListener): Promise + + listeners( + event: TCEvent + ): Promise>>; + listeners(eventName?: string): Promise> + removeAllListeners(event?: TCEvent): Promise + + + + + inc: TypedContractMethod< + [], + [void], + 'nonpayable' + > + + + + incBy: TypedContractMethod< + [by: BigNumberish, ], + [void], + 'nonpayable' + > + + + + x: TypedContractMethod< + [], + [bigint], + 'view' + > + + + + getFunction(key: string | FunctionFragment): T; + + getFunction(nameOrSignature: 'inc'): TypedContractMethod< + [], + [void], + 'nonpayable' + >; +getFunction(nameOrSignature: 'incBy'): TypedContractMethod< + [by: BigNumberish, ], + [void], + 'nonpayable' + >; +getFunction(nameOrSignature: 'x'): TypedContractMethod< + [], + [bigint], + 'view' + >; + + getEvent(key: 'Increment'): TypedContractEvent; + + filters: { + + 'Increment(uint256)': TypedContractEvent; + Increment: TypedContractEvent; + + }; + } \ No newline at end of file diff --git a/erc20/types/ethers-contracts/ERC20.ts b/erc20/types/ethers-contracts/ERC20.ts new file mode 100644 index 00000000..2dc87880 --- /dev/null +++ b/erc20/types/ethers-contracts/ERC20.ts @@ -0,0 +1,241 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { BaseContract, BigNumberish, BytesLike, FunctionFragment, Result, Interface, EventFragment, AddressLike, ContractRunner, ContractMethod, Listener } from "ethers" +import type { TypedContractEvent, TypedDeferredTopicFilter, TypedEventLog, TypedLogDescription, TypedListener, TypedContractMethod } from "./common.js" + + + export interface ERC20Interface extends Interface { + getFunction(nameOrSignature: "allowance" | "approve" | "balanceOf" | "decimals" | "mint" | "name" | "symbol" | "totalSupply" | "transfer" | "transferFrom"): FunctionFragment; + + getEvent(nameOrSignatureOrTopic: "Approval" | "Transfer"): EventFragment; + + encodeFunctionData(functionFragment: 'allowance', values: [AddressLike, AddressLike]): string; +encodeFunctionData(functionFragment: 'approve', values: [AddressLike, BigNumberish]): string; +encodeFunctionData(functionFragment: 'balanceOf', values: [AddressLike]): string; +encodeFunctionData(functionFragment: 'decimals', values?: undefined): string; +encodeFunctionData(functionFragment: 'mint', values: [BigNumberish]): string; +encodeFunctionData(functionFragment: 'name', values?: undefined): string; +encodeFunctionData(functionFragment: 'symbol', values?: undefined): string; +encodeFunctionData(functionFragment: 'totalSupply', values?: undefined): string; +encodeFunctionData(functionFragment: 'transfer', values: [AddressLike, BigNumberish]): string; +encodeFunctionData(functionFragment: 'transferFrom', values: [AddressLike, AddressLike, BigNumberish]): string; + + decodeFunctionResult(functionFragment: 'allowance', data: BytesLike): Result; +decodeFunctionResult(functionFragment: 'approve', data: BytesLike): Result; +decodeFunctionResult(functionFragment: 'balanceOf', data: BytesLike): Result; +decodeFunctionResult(functionFragment: 'decimals', data: BytesLike): Result; +decodeFunctionResult(functionFragment: 'mint', data: BytesLike): Result; +decodeFunctionResult(functionFragment: 'name', data: BytesLike): Result; +decodeFunctionResult(functionFragment: 'symbol', data: BytesLike): Result; +decodeFunctionResult(functionFragment: 'totalSupply', data: BytesLike): Result; +decodeFunctionResult(functionFragment: 'transfer', data: BytesLike): Result; +decodeFunctionResult(functionFragment: 'transferFrom', data: BytesLike): Result; + } + + + export namespace ApprovalEvent { + export type InputTuple = [owner: AddressLike, spender: AddressLike, value: BigNumberish]; + export type OutputTuple = [owner: string, spender: string, value: bigint]; + export interface OutputObject {owner: string, spender: string, value: bigint }; + export type Event = TypedContractEvent + export type Filter = TypedDeferredTopicFilter + export type Log = TypedEventLog + export type LogDescription = TypedLogDescription + } + + + + export namespace TransferEvent { + export type InputTuple = [from: AddressLike, to: AddressLike, value: BigNumberish]; + export type OutputTuple = [from: string, to: string, value: bigint]; + export interface OutputObject {from: string, to: string, value: bigint }; + export type Event = TypedContractEvent + export type Filter = TypedDeferredTopicFilter + export type Log = TypedEventLog + export type LogDescription = TypedLogDescription + } + + + + export interface ERC20 extends BaseContract { + + connect(runner?: ContractRunner | null): ERC20; + waitForDeployment(): Promise; + + interface: ERC20Interface; + + + queryFilter( + event: TCEvent, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined, + ): Promise>> + queryFilter( + filter: TypedDeferredTopicFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + + on(event: TCEvent, listener: TypedListener): Promise + on(filter: TypedDeferredTopicFilter, listener: TypedListener): Promise + + once(event: TCEvent, listener: TypedListener): Promise + once(filter: TypedDeferredTopicFilter, listener: TypedListener): Promise + + listeners( + event: TCEvent + ): Promise>>; + listeners(eventName?: string): Promise> + removeAllListeners(event?: TCEvent): Promise + + + + + allowance: TypedContractMethod< + [owner: AddressLike, spender: AddressLike, ], + [bigint], + 'view' + > + + + + approve: TypedContractMethod< + [spender: AddressLike, amount: BigNumberish, ], + [boolean], + 'nonpayable' + > + + + + balanceOf: TypedContractMethod< + [account: AddressLike, ], + [bigint], + 'view' + > + + + + decimals: TypedContractMethod< + [], + [bigint], + 'view' + > + + + + mint: TypedContractMethod< + [amount: BigNumberish, ], + [boolean], + 'nonpayable' + > + + + + name: TypedContractMethod< + [], + [string], + 'view' + > + + + + symbol: TypedContractMethod< + [], + [string], + 'view' + > + + + + totalSupply: TypedContractMethod< + [], + [bigint], + 'view' + > + + + + transfer: TypedContractMethod< + [to: AddressLike, amount: BigNumberish, ], + [boolean], + 'nonpayable' + > + + + + transferFrom: TypedContractMethod< + [from: AddressLike, to: AddressLike, amount: BigNumberish, ], + [boolean], + 'nonpayable' + > + + + + getFunction(key: string | FunctionFragment): T; + + getFunction(nameOrSignature: 'allowance'): TypedContractMethod< + [owner: AddressLike, spender: AddressLike, ], + [bigint], + 'view' + >; +getFunction(nameOrSignature: 'approve'): TypedContractMethod< + [spender: AddressLike, amount: BigNumberish, ], + [boolean], + 'nonpayable' + >; +getFunction(nameOrSignature: 'balanceOf'): TypedContractMethod< + [account: AddressLike, ], + [bigint], + 'view' + >; +getFunction(nameOrSignature: 'decimals'): TypedContractMethod< + [], + [bigint], + 'view' + >; +getFunction(nameOrSignature: 'mint'): TypedContractMethod< + [amount: BigNumberish, ], + [boolean], + 'nonpayable' + >; +getFunction(nameOrSignature: 'name'): TypedContractMethod< + [], + [string], + 'view' + >; +getFunction(nameOrSignature: 'symbol'): TypedContractMethod< + [], + [string], + 'view' + >; +getFunction(nameOrSignature: 'totalSupply'): TypedContractMethod< + [], + [bigint], + 'view' + >; +getFunction(nameOrSignature: 'transfer'): TypedContractMethod< + [to: AddressLike, amount: BigNumberish, ], + [boolean], + 'nonpayable' + >; +getFunction(nameOrSignature: 'transferFrom'): TypedContractMethod< + [from: AddressLike, to: AddressLike, amount: BigNumberish, ], + [boolean], + 'nonpayable' + >; + + getEvent(key: 'Approval'): TypedContractEvent; +getEvent(key: 'Transfer'): TypedContractEvent; + + filters: { + + 'Approval(address,address,uint256)': TypedContractEvent; + Approval: TypedContractEvent; + + + 'Transfer(address,address,uint256)': TypedContractEvent; + Transfer: TypedContractEvent; + + }; + } \ No newline at end of file diff --git a/erc20/types/ethers-contracts/ERC721.sol/ERC721.ts b/erc20/types/ethers-contracts/ERC721.sol/ERC721.ts new file mode 100644 index 00000000..ad1a242f --- /dev/null +++ b/erc20/types/ethers-contracts/ERC721.sol/ERC721.ts @@ -0,0 +1,318 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { BaseContract, BigNumberish, BytesLike, FunctionFragment, Result, Interface, EventFragment, AddressLike, ContractRunner, ContractMethod, Listener } from "ethers" +import type { TypedContractEvent, TypedDeferredTopicFilter, TypedEventLog, TypedLogDescription, TypedListener, TypedContractMethod } from "../common.js" + + + export interface ERC721Interface extends Interface { + getFunction(nameOrSignature: "approve" | "balanceOf" | "burn" | "getApproved" | "isApprovedForAll" | "mint" | "name" | "ownerOf" | "setApprovalForAll" | "setBaseURI" | "supportsInterface" | "symbol" | "tokenURI" | "transferFrom"): FunctionFragment; + + getEvent(nameOrSignatureOrTopic: "Approval" | "ApprovalForAll" | "Transfer"): EventFragment; + + encodeFunctionData(functionFragment: 'approve', values: [AddressLike, BigNumberish]): string; +encodeFunctionData(functionFragment: 'balanceOf', values: [AddressLike]): string; +encodeFunctionData(functionFragment: 'burn', values: [BigNumberish]): string; +encodeFunctionData(functionFragment: 'getApproved', values: [BigNumberish]): string; +encodeFunctionData(functionFragment: 'isApprovedForAll', values: [AddressLike, AddressLike]): string; +encodeFunctionData(functionFragment: 'mint', values: [AddressLike, BigNumberish]): string; +encodeFunctionData(functionFragment: 'name', values?: undefined): string; +encodeFunctionData(functionFragment: 'ownerOf', values: [BigNumberish]): string; +encodeFunctionData(functionFragment: 'setApprovalForAll', values: [AddressLike, boolean]): string; +encodeFunctionData(functionFragment: 'setBaseURI', values: [string]): string; +encodeFunctionData(functionFragment: 'supportsInterface', values: [BytesLike]): string; +encodeFunctionData(functionFragment: 'symbol', values?: undefined): string; +encodeFunctionData(functionFragment: 'tokenURI', values: [BigNumberish]): string; +encodeFunctionData(functionFragment: 'transferFrom', values: [AddressLike, AddressLike, BigNumberish]): string; + + decodeFunctionResult(functionFragment: 'approve', data: BytesLike): Result; +decodeFunctionResult(functionFragment: 'balanceOf', data: BytesLike): Result; +decodeFunctionResult(functionFragment: 'burn', data: BytesLike): Result; +decodeFunctionResult(functionFragment: 'getApproved', data: BytesLike): Result; +decodeFunctionResult(functionFragment: 'isApprovedForAll', data: BytesLike): Result; +decodeFunctionResult(functionFragment: 'mint', data: BytesLike): Result; +decodeFunctionResult(functionFragment: 'name', data: BytesLike): Result; +decodeFunctionResult(functionFragment: 'ownerOf', data: BytesLike): Result; +decodeFunctionResult(functionFragment: 'setApprovalForAll', data: BytesLike): Result; +decodeFunctionResult(functionFragment: 'setBaseURI', data: BytesLike): Result; +decodeFunctionResult(functionFragment: 'supportsInterface', data: BytesLike): Result; +decodeFunctionResult(functionFragment: 'symbol', data: BytesLike): Result; +decodeFunctionResult(functionFragment: 'tokenURI', data: BytesLike): Result; +decodeFunctionResult(functionFragment: 'transferFrom', data: BytesLike): Result; + } + + + export namespace ApprovalEvent { + export type InputTuple = [owner: AddressLike, approved: AddressLike, tokenId: BigNumberish]; + export type OutputTuple = [owner: string, approved: string, tokenId: bigint]; + export interface OutputObject {owner: string, approved: string, tokenId: bigint }; + export type Event = TypedContractEvent + export type Filter = TypedDeferredTopicFilter + export type Log = TypedEventLog + export type LogDescription = TypedLogDescription + } + + + + export namespace ApprovalForAllEvent { + export type InputTuple = [owner: AddressLike, operator: AddressLike, approved: boolean]; + export type OutputTuple = [owner: string, operator: string, approved: boolean]; + export interface OutputObject {owner: string, operator: string, approved: boolean }; + export type Event = TypedContractEvent + export type Filter = TypedDeferredTopicFilter + export type Log = TypedEventLog + export type LogDescription = TypedLogDescription + } + + + + export namespace TransferEvent { + export type InputTuple = [from: AddressLike, to: AddressLike, tokenId: BigNumberish]; + export type OutputTuple = [from: string, to: string, tokenId: bigint]; + export interface OutputObject {from: string, to: string, tokenId: bigint }; + export type Event = TypedContractEvent + export type Filter = TypedDeferredTopicFilter + export type Log = TypedEventLog + export type LogDescription = TypedLogDescription + } + + + + export interface ERC721 extends BaseContract { + + connect(runner?: ContractRunner | null): ERC721; + waitForDeployment(): Promise; + + interface: ERC721Interface; + + + queryFilter( + event: TCEvent, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined, + ): Promise>> + queryFilter( + filter: TypedDeferredTopicFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + + on(event: TCEvent, listener: TypedListener): Promise + on(filter: TypedDeferredTopicFilter, listener: TypedListener): Promise + + once(event: TCEvent, listener: TypedListener): Promise + once(filter: TypedDeferredTopicFilter, listener: TypedListener): Promise + + listeners( + event: TCEvent + ): Promise>>; + listeners(eventName?: string): Promise> + removeAllListeners(event?: TCEvent): Promise + + + + + approve: TypedContractMethod< + [to: AddressLike, tokenId: BigNumberish, ], + [void], + 'nonpayable' + > + + + + balanceOf: TypedContractMethod< + [owner: AddressLike, ], + [bigint], + 'view' + > + + + + burn: TypedContractMethod< + [tokenId: BigNumberish, ], + [void], + 'nonpayable' + > + + + + getApproved: TypedContractMethod< + [tokenId: BigNumberish, ], + [string], + 'view' + > + + + + isApprovedForAll: TypedContractMethod< + [owner: AddressLike, operator: AddressLike, ], + [boolean], + 'view' + > + + + + mint: TypedContractMethod< + [to: AddressLike, tokenId: BigNumberish, ], + [void], + 'nonpayable' + > + + + + name: TypedContractMethod< + [], + [string], + 'view' + > + + + + ownerOf: TypedContractMethod< + [tokenId: BigNumberish, ], + [string], + 'view' + > + + + + setApprovalForAll: TypedContractMethod< + [operator: AddressLike, approved: boolean, ], + [void], + 'nonpayable' + > + + + + setBaseURI: TypedContractMethod< + [newBaseURI: string, ], + [void], + 'nonpayable' + > + + + + supportsInterface: TypedContractMethod< + [interfaceId: BytesLike, ], + [boolean], + 'view' + > + + + + symbol: TypedContractMethod< + [], + [string], + 'view' + > + + + + tokenURI: TypedContractMethod< + [tokenId: BigNumberish, ], + [string], + 'view' + > + + + + transferFrom: TypedContractMethod< + [from: AddressLike, to: AddressLike, tokenId: BigNumberish, ], + [void], + 'nonpayable' + > + + + + getFunction(key: string | FunctionFragment): T; + + getFunction(nameOrSignature: 'approve'): TypedContractMethod< + [to: AddressLike, tokenId: BigNumberish, ], + [void], + 'nonpayable' + >; +getFunction(nameOrSignature: 'balanceOf'): TypedContractMethod< + [owner: AddressLike, ], + [bigint], + 'view' + >; +getFunction(nameOrSignature: 'burn'): TypedContractMethod< + [tokenId: BigNumberish, ], + [void], + 'nonpayable' + >; +getFunction(nameOrSignature: 'getApproved'): TypedContractMethod< + [tokenId: BigNumberish, ], + [string], + 'view' + >; +getFunction(nameOrSignature: 'isApprovedForAll'): TypedContractMethod< + [owner: AddressLike, operator: AddressLike, ], + [boolean], + 'view' + >; +getFunction(nameOrSignature: 'mint'): TypedContractMethod< + [to: AddressLike, tokenId: BigNumberish, ], + [void], + 'nonpayable' + >; +getFunction(nameOrSignature: 'name'): TypedContractMethod< + [], + [string], + 'view' + >; +getFunction(nameOrSignature: 'ownerOf'): TypedContractMethod< + [tokenId: BigNumberish, ], + [string], + 'view' + >; +getFunction(nameOrSignature: 'setApprovalForAll'): TypedContractMethod< + [operator: AddressLike, approved: boolean, ], + [void], + 'nonpayable' + >; +getFunction(nameOrSignature: 'setBaseURI'): TypedContractMethod< + [newBaseURI: string, ], + [void], + 'nonpayable' + >; +getFunction(nameOrSignature: 'supportsInterface'): TypedContractMethod< + [interfaceId: BytesLike, ], + [boolean], + 'view' + >; +getFunction(nameOrSignature: 'symbol'): TypedContractMethod< + [], + [string], + 'view' + >; +getFunction(nameOrSignature: 'tokenURI'): TypedContractMethod< + [tokenId: BigNumberish, ], + [string], + 'view' + >; +getFunction(nameOrSignature: 'transferFrom'): TypedContractMethod< + [from: AddressLike, to: AddressLike, tokenId: BigNumberish, ], + [void], + 'nonpayable' + >; + + getEvent(key: 'Approval'): TypedContractEvent; +getEvent(key: 'ApprovalForAll'): TypedContractEvent; +getEvent(key: 'Transfer'): TypedContractEvent; + + filters: { + + 'Approval(address,address,uint256)': TypedContractEvent; + Approval: TypedContractEvent; + + + 'ApprovalForAll(address,address,bool)': TypedContractEvent; + ApprovalForAll: TypedContractEvent; + + + 'Transfer(address,address,uint256)': TypedContractEvent; + Transfer: TypedContractEvent; + + }; + } \ No newline at end of file diff --git a/erc20/types/ethers-contracts/ERC721.sol/IER721Metadata.ts b/erc20/types/ethers-contracts/ERC721.sol/IER721Metadata.ts new file mode 100644 index 00000000..ba14d2b2 --- /dev/null +++ b/erc20/types/ethers-contracts/ERC721.sol/IER721Metadata.ts @@ -0,0 +1,303 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { BaseContract, BigNumberish, BytesLike, FunctionFragment, Result, Interface, EventFragment, AddressLike, ContractRunner, ContractMethod, Listener } from "ethers" +import type { TypedContractEvent, TypedDeferredTopicFilter, TypedEventLog, TypedLogDescription, TypedListener, TypedContractMethod } from "../common.js" + + + export interface IER721MetadataInterface extends Interface { + getFunction(nameOrSignature: "approve" | "balanceOf" | "getAproved" | "isApprovedForAll" | "name" | "ownerOf" | "safeTransferFrom(address,address,uint256)" | "safeTransferFrom(address,address,uint256,bytes)" | "setApprovalForAll" | "supportsInterface" | "symbol" | "tokenURI" | "transferFrom"): FunctionFragment; + + getEvent(nameOrSignatureOrTopic: "Approval" | "ApprovalForAll" | "Transfer"): EventFragment; + + encodeFunctionData(functionFragment: 'approve', values: [AddressLike, BigNumberish]): string; +encodeFunctionData(functionFragment: 'balanceOf', values: [AddressLike]): string; +encodeFunctionData(functionFragment: 'getAproved', values: [BigNumberish]): string; +encodeFunctionData(functionFragment: 'isApprovedForAll', values: [AddressLike, AddressLike]): string; +encodeFunctionData(functionFragment: 'name', values?: undefined): string; +encodeFunctionData(functionFragment: 'ownerOf', values: [BigNumberish]): string; +encodeFunctionData(functionFragment: 'safeTransferFrom(address,address,uint256)', values: [AddressLike, AddressLike, BigNumberish]): string; +encodeFunctionData(functionFragment: 'safeTransferFrom(address,address,uint256,bytes)', values: [AddressLike, AddressLike, BigNumberish, BytesLike]): string; +encodeFunctionData(functionFragment: 'setApprovalForAll', values: [AddressLike, boolean]): string; +encodeFunctionData(functionFragment: 'supportsInterface', values: [BytesLike]): string; +encodeFunctionData(functionFragment: 'symbol', values?: undefined): string; +encodeFunctionData(functionFragment: 'tokenURI', values: [BigNumberish]): string; +encodeFunctionData(functionFragment: 'transferFrom', values: [AddressLike, AddressLike, BigNumberish]): string; + + decodeFunctionResult(functionFragment: 'approve', data: BytesLike): Result; +decodeFunctionResult(functionFragment: 'balanceOf', data: BytesLike): Result; +decodeFunctionResult(functionFragment: 'getAproved', data: BytesLike): Result; +decodeFunctionResult(functionFragment: 'isApprovedForAll', data: BytesLike): Result; +decodeFunctionResult(functionFragment: 'name', data: BytesLike): Result; +decodeFunctionResult(functionFragment: 'ownerOf', data: BytesLike): Result; +decodeFunctionResult(functionFragment: 'safeTransferFrom(address,address,uint256)', data: BytesLike): Result; +decodeFunctionResult(functionFragment: 'safeTransferFrom(address,address,uint256,bytes)', data: BytesLike): Result; +decodeFunctionResult(functionFragment: 'setApprovalForAll', data: BytesLike): Result; +decodeFunctionResult(functionFragment: 'supportsInterface', data: BytesLike): Result; +decodeFunctionResult(functionFragment: 'symbol', data: BytesLike): Result; +decodeFunctionResult(functionFragment: 'tokenURI', data: BytesLike): Result; +decodeFunctionResult(functionFragment: 'transferFrom', data: BytesLike): Result; + } + + + export namespace ApprovalEvent { + export type InputTuple = [owner: AddressLike, approved: AddressLike, tokenId: BigNumberish]; + export type OutputTuple = [owner: string, approved: string, tokenId: bigint]; + export interface OutputObject {owner: string, approved: string, tokenId: bigint }; + export type Event = TypedContractEvent + export type Filter = TypedDeferredTopicFilter + export type Log = TypedEventLog + export type LogDescription = TypedLogDescription + } + + + + export namespace ApprovalForAllEvent { + export type InputTuple = [owner: AddressLike, operator: AddressLike, approved: boolean]; + export type OutputTuple = [owner: string, operator: string, approved: boolean]; + export interface OutputObject {owner: string, operator: string, approved: boolean }; + export type Event = TypedContractEvent + export type Filter = TypedDeferredTopicFilter + export type Log = TypedEventLog + export type LogDescription = TypedLogDescription + } + + + + export namespace TransferEvent { + export type InputTuple = [from: AddressLike, to: AddressLike, tokenID: BigNumberish]; + export type OutputTuple = [from: string, to: string, tokenID: bigint]; + export interface OutputObject {from: string, to: string, tokenID: bigint }; + export type Event = TypedContractEvent + export type Filter = TypedDeferredTopicFilter + export type Log = TypedEventLog + export type LogDescription = TypedLogDescription + } + + + + export interface IER721Metadata extends BaseContract { + + connect(runner?: ContractRunner | null): IER721Metadata; + waitForDeployment(): Promise; + + interface: IER721MetadataInterface; + + + queryFilter( + event: TCEvent, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined, + ): Promise>> + queryFilter( + filter: TypedDeferredTopicFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + + on(event: TCEvent, listener: TypedListener): Promise + on(filter: TypedDeferredTopicFilter, listener: TypedListener): Promise + + once(event: TCEvent, listener: TypedListener): Promise + once(filter: TypedDeferredTopicFilter, listener: TypedListener): Promise + + listeners( + event: TCEvent + ): Promise>>; + listeners(eventName?: string): Promise> + removeAllListeners(event?: TCEvent): Promise + + + + + approve: TypedContractMethod< + [to: AddressLike, tokenId: BigNumberish, ], + [void], + 'nonpayable' + > + + + + balanceOf: TypedContractMethod< + [owner: AddressLike, ], + [bigint], + 'view' + > + + + + getAproved: TypedContractMethod< + [tokenId: BigNumberish, ], + [string], + 'view' + > + + + + isApprovedForAll: TypedContractMethod< + [owner: AddressLike, operator: AddressLike, ], + [boolean], + 'view' + > + + + + name: TypedContractMethod< + [], + [string], + 'view' + > + + + + ownerOf: TypedContractMethod< + [tokenId: BigNumberish, ], + [string], + 'view' + > + + + + "safeTransferFrom(address,address,uint256)": TypedContractMethod< + [from: AddressLike, to: AddressLike, tokenId: BigNumberish, ], + [void], + 'nonpayable' + > + + + + "safeTransferFrom(address,address,uint256,bytes)": TypedContractMethod< + [from: AddressLike, to: AddressLike, tokenId: BigNumberish, data: BytesLike, ], + [void], + 'nonpayable' + > + + + + setApprovalForAll: TypedContractMethod< + [operator: AddressLike, approved: boolean, ], + [void], + 'nonpayable' + > + + + + supportsInterface: TypedContractMethod< + [interfaceID: BytesLike, ], + [boolean], + 'view' + > + + + + symbol: TypedContractMethod< + [], + [string], + 'view' + > + + + + tokenURI: TypedContractMethod< + [tokenId: BigNumberish, ], + [string], + 'view' + > + + + + transferFrom: TypedContractMethod< + [from: AddressLike, to: AddressLike, tokenId: BigNumberish, ], + [void], + 'nonpayable' + > + + + + getFunction(key: string | FunctionFragment): T; + + getFunction(nameOrSignature: 'approve'): TypedContractMethod< + [to: AddressLike, tokenId: BigNumberish, ], + [void], + 'nonpayable' + >; +getFunction(nameOrSignature: 'balanceOf'): TypedContractMethod< + [owner: AddressLike, ], + [bigint], + 'view' + >; +getFunction(nameOrSignature: 'getAproved'): TypedContractMethod< + [tokenId: BigNumberish, ], + [string], + 'view' + >; +getFunction(nameOrSignature: 'isApprovedForAll'): TypedContractMethod< + [owner: AddressLike, operator: AddressLike, ], + [boolean], + 'view' + >; +getFunction(nameOrSignature: 'name'): TypedContractMethod< + [], + [string], + 'view' + >; +getFunction(nameOrSignature: 'ownerOf'): TypedContractMethod< + [tokenId: BigNumberish, ], + [string], + 'view' + >; +getFunction(nameOrSignature: 'safeTransferFrom(address,address,uint256)'): TypedContractMethod< + [from: AddressLike, to: AddressLike, tokenId: BigNumberish, ], + [void], + 'nonpayable' + >; +getFunction(nameOrSignature: 'safeTransferFrom(address,address,uint256,bytes)'): TypedContractMethod< + [from: AddressLike, to: AddressLike, tokenId: BigNumberish, data: BytesLike, ], + [void], + 'nonpayable' + >; +getFunction(nameOrSignature: 'setApprovalForAll'): TypedContractMethod< + [operator: AddressLike, approved: boolean, ], + [void], + 'nonpayable' + >; +getFunction(nameOrSignature: 'supportsInterface'): TypedContractMethod< + [interfaceID: BytesLike, ], + [boolean], + 'view' + >; +getFunction(nameOrSignature: 'symbol'): TypedContractMethod< + [], + [string], + 'view' + >; +getFunction(nameOrSignature: 'tokenURI'): TypedContractMethod< + [tokenId: BigNumberish, ], + [string], + 'view' + >; +getFunction(nameOrSignature: 'transferFrom'): TypedContractMethod< + [from: AddressLike, to: AddressLike, tokenId: BigNumberish, ], + [void], + 'nonpayable' + >; + + getEvent(key: 'Approval'): TypedContractEvent; +getEvent(key: 'ApprovalForAll'): TypedContractEvent; +getEvent(key: 'Transfer'): TypedContractEvent; + + filters: { + + 'Approval(address,address,uint256)': TypedContractEvent; + Approval: TypedContractEvent; + + + 'ApprovalForAll(address,address,bool)': TypedContractEvent; + ApprovalForAll: TypedContractEvent; + + + 'Transfer(address,address,uint256)': TypedContractEvent; + Transfer: TypedContractEvent; + + }; + } \ No newline at end of file diff --git a/erc20/types/ethers-contracts/ERC721.sol/IERC165.ts b/erc20/types/ethers-contracts/ERC721.sol/IERC165.ts new file mode 100644 index 00000000..fde6e81f --- /dev/null +++ b/erc20/types/ethers-contracts/ERC721.sol/IERC165.ts @@ -0,0 +1,75 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { BaseContract, BytesLike, FunctionFragment, Result, Interface, ContractRunner, ContractMethod, Listener } from "ethers" +import type { TypedContractEvent, TypedDeferredTopicFilter, TypedEventLog, TypedListener, TypedContractMethod } from "../common.js" + + + export interface IERC165Interface extends Interface { + getFunction(nameOrSignature: "supportsInterface"): FunctionFragment; + + + + encodeFunctionData(functionFragment: 'supportsInterface', values: [BytesLike]): string; + + decodeFunctionResult(functionFragment: 'supportsInterface', data: BytesLike): Result; + } + + + + export interface IERC165 extends BaseContract { + + connect(runner?: ContractRunner | null): IERC165; + waitForDeployment(): Promise; + + interface: IERC165Interface; + + + queryFilter( + event: TCEvent, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined, + ): Promise>> + queryFilter( + filter: TypedDeferredTopicFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + + on(event: TCEvent, listener: TypedListener): Promise + on(filter: TypedDeferredTopicFilter, listener: TypedListener): Promise + + once(event: TCEvent, listener: TypedListener): Promise + once(filter: TypedDeferredTopicFilter, listener: TypedListener): Promise + + listeners( + event: TCEvent + ): Promise>>; + listeners(eventName?: string): Promise> + removeAllListeners(event?: TCEvent): Promise + + + + + supportsInterface: TypedContractMethod< + [interfaceId: BytesLike, ], + [boolean], + 'view' + > + + + + getFunction(key: string | FunctionFragment): T; + + getFunction(nameOrSignature: 'supportsInterface'): TypedContractMethod< + [interfaceId: BytesLike, ], + [boolean], + 'view' + >; + + + + filters: { + + }; + } \ No newline at end of file diff --git a/erc20/types/ethers-contracts/ERC721.sol/IERC721.ts b/erc20/types/ethers-contracts/ERC721.sol/IERC721.ts new file mode 100644 index 00000000..afd82d6e --- /dev/null +++ b/erc20/types/ethers-contracts/ERC721.sol/IERC721.ts @@ -0,0 +1,228 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { BaseContract, BigNumberish, BytesLike, FunctionFragment, Result, Interface, EventFragment, AddressLike, ContractRunner, ContractMethod, Listener } from "ethers" +import type { TypedContractEvent, TypedDeferredTopicFilter, TypedEventLog, TypedLogDescription, TypedListener, TypedContractMethod } from "../common.js" + + + export interface IERC721Interface extends Interface { + getFunction(nameOrSignature: "approve" | "balanceOf" | "getApproved" | "isApprovedForAll" | "ownerOf" | "setApprovalForAll" | "supportsInterface" | "transferFrom"): FunctionFragment; + + getEvent(nameOrSignatureOrTopic: "Approval" | "ApprovalForAll" | "Transfer"): EventFragment; + + encodeFunctionData(functionFragment: 'approve', values: [AddressLike, BigNumberish]): string; +encodeFunctionData(functionFragment: 'balanceOf', values: [AddressLike]): string; +encodeFunctionData(functionFragment: 'getApproved', values: [BigNumberish]): string; +encodeFunctionData(functionFragment: 'isApprovedForAll', values: [AddressLike, AddressLike]): string; +encodeFunctionData(functionFragment: 'ownerOf', values: [BigNumberish]): string; +encodeFunctionData(functionFragment: 'setApprovalForAll', values: [AddressLike, boolean]): string; +encodeFunctionData(functionFragment: 'supportsInterface', values: [BytesLike]): string; +encodeFunctionData(functionFragment: 'transferFrom', values: [AddressLike, AddressLike, BigNumberish]): string; + + decodeFunctionResult(functionFragment: 'approve', data: BytesLike): Result; +decodeFunctionResult(functionFragment: 'balanceOf', data: BytesLike): Result; +decodeFunctionResult(functionFragment: 'getApproved', data: BytesLike): Result; +decodeFunctionResult(functionFragment: 'isApprovedForAll', data: BytesLike): Result; +decodeFunctionResult(functionFragment: 'ownerOf', data: BytesLike): Result; +decodeFunctionResult(functionFragment: 'setApprovalForAll', data: BytesLike): Result; +decodeFunctionResult(functionFragment: 'supportsInterface', data: BytesLike): Result; +decodeFunctionResult(functionFragment: 'transferFrom', data: BytesLike): Result; + } + + + export namespace ApprovalEvent { + export type InputTuple = [owner: AddressLike, approved: AddressLike, tokenId: BigNumberish]; + export type OutputTuple = [owner: string, approved: string, tokenId: bigint]; + export interface OutputObject {owner: string, approved: string, tokenId: bigint }; + export type Event = TypedContractEvent + export type Filter = TypedDeferredTopicFilter + export type Log = TypedEventLog + export type LogDescription = TypedLogDescription + } + + + + export namespace ApprovalForAllEvent { + export type InputTuple = [owner: AddressLike, operator: AddressLike, approved: boolean]; + export type OutputTuple = [owner: string, operator: string, approved: boolean]; + export interface OutputObject {owner: string, operator: string, approved: boolean }; + export type Event = TypedContractEvent + export type Filter = TypedDeferredTopicFilter + export type Log = TypedEventLog + export type LogDescription = TypedLogDescription + } + + + + export namespace TransferEvent { + export type InputTuple = [from: AddressLike, to: AddressLike, tokenId: BigNumberish]; + export type OutputTuple = [from: string, to: string, tokenId: bigint]; + export interface OutputObject {from: string, to: string, tokenId: bigint }; + export type Event = TypedContractEvent + export type Filter = TypedDeferredTopicFilter + export type Log = TypedEventLog + export type LogDescription = TypedLogDescription + } + + + + export interface IERC721 extends BaseContract { + + connect(runner?: ContractRunner | null): IERC721; + waitForDeployment(): Promise; + + interface: IERC721Interface; + + + queryFilter( + event: TCEvent, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined, + ): Promise>> + queryFilter( + filter: TypedDeferredTopicFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + + on(event: TCEvent, listener: TypedListener): Promise + on(filter: TypedDeferredTopicFilter, listener: TypedListener): Promise + + once(event: TCEvent, listener: TypedListener): Promise + once(filter: TypedDeferredTopicFilter, listener: TypedListener): Promise + + listeners( + event: TCEvent + ): Promise>>; + listeners(eventName?: string): Promise> + removeAllListeners(event?: TCEvent): Promise + + + + + approve: TypedContractMethod< + [to: AddressLike, tokenId: BigNumberish, ], + [void], + 'nonpayable' + > + + + + balanceOf: TypedContractMethod< + [owner: AddressLike, ], + [bigint], + 'view' + > + + + + getApproved: TypedContractMethod< + [tokenId: BigNumberish, ], + [string], + 'view' + > + + + + isApprovedForAll: TypedContractMethod< + [owner: AddressLike, operator: AddressLike, ], + [boolean], + 'view' + > + + + + ownerOf: TypedContractMethod< + [tokenId: BigNumberish, ], + [string], + 'view' + > + + + + setApprovalForAll: TypedContractMethod< + [operator: AddressLike, approved: boolean, ], + [void], + 'nonpayable' + > + + + + supportsInterface: TypedContractMethod< + [interfaceId: BytesLike, ], + [boolean], + 'view' + > + + + + transferFrom: TypedContractMethod< + [from: AddressLike, to: AddressLike, tokenId: BigNumberish, ], + [void], + 'nonpayable' + > + + + + getFunction(key: string | FunctionFragment): T; + + getFunction(nameOrSignature: 'approve'): TypedContractMethod< + [to: AddressLike, tokenId: BigNumberish, ], + [void], + 'nonpayable' + >; +getFunction(nameOrSignature: 'balanceOf'): TypedContractMethod< + [owner: AddressLike, ], + [bigint], + 'view' + >; +getFunction(nameOrSignature: 'getApproved'): TypedContractMethod< + [tokenId: BigNumberish, ], + [string], + 'view' + >; +getFunction(nameOrSignature: 'isApprovedForAll'): TypedContractMethod< + [owner: AddressLike, operator: AddressLike, ], + [boolean], + 'view' + >; +getFunction(nameOrSignature: 'ownerOf'): TypedContractMethod< + [tokenId: BigNumberish, ], + [string], + 'view' + >; +getFunction(nameOrSignature: 'setApprovalForAll'): TypedContractMethod< + [operator: AddressLike, approved: boolean, ], + [void], + 'nonpayable' + >; +getFunction(nameOrSignature: 'supportsInterface'): TypedContractMethod< + [interfaceId: BytesLike, ], + [boolean], + 'view' + >; +getFunction(nameOrSignature: 'transferFrom'): TypedContractMethod< + [from: AddressLike, to: AddressLike, tokenId: BigNumberish, ], + [void], + 'nonpayable' + >; + + getEvent(key: 'Approval'): TypedContractEvent; +getEvent(key: 'ApprovalForAll'): TypedContractEvent; +getEvent(key: 'Transfer'): TypedContractEvent; + + filters: { + + 'Approval(address,address,uint256)': TypedContractEvent; + Approval: TypedContractEvent; + + + 'ApprovalForAll(address,address,bool)': TypedContractEvent; + ApprovalForAll: TypedContractEvent; + + + 'Transfer(address,address,uint256)': TypedContractEvent; + Transfer: TypedContractEvent; + + }; + } \ No newline at end of file diff --git a/erc20/types/ethers-contracts/ERC721.sol/IERC721Metadata.ts b/erc20/types/ethers-contracts/ERC721.sol/IERC721Metadata.ts new file mode 100644 index 00000000..6fd51494 --- /dev/null +++ b/erc20/types/ethers-contracts/ERC721.sol/IERC721Metadata.ts @@ -0,0 +1,273 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { BaseContract, BigNumberish, BytesLike, FunctionFragment, Result, Interface, EventFragment, AddressLike, ContractRunner, ContractMethod, Listener } from "ethers" +import type { TypedContractEvent, TypedDeferredTopicFilter, TypedEventLog, TypedLogDescription, TypedListener, TypedContractMethod } from "../common.js" + + + export interface IERC721MetadataInterface extends Interface { + getFunction(nameOrSignature: "approve" | "balanceOf" | "getApproved" | "isApprovedForAll" | "name" | "ownerOf" | "setApprovalForAll" | "supportsInterface" | "symbol" | "tokenURI" | "transferFrom"): FunctionFragment; + + getEvent(nameOrSignatureOrTopic: "Approval" | "ApprovalForAll" | "Transfer"): EventFragment; + + encodeFunctionData(functionFragment: 'approve', values: [AddressLike, BigNumberish]): string; +encodeFunctionData(functionFragment: 'balanceOf', values: [AddressLike]): string; +encodeFunctionData(functionFragment: 'getApproved', values: [BigNumberish]): string; +encodeFunctionData(functionFragment: 'isApprovedForAll', values: [AddressLike, AddressLike]): string; +encodeFunctionData(functionFragment: 'name', values?: undefined): string; +encodeFunctionData(functionFragment: 'ownerOf', values: [BigNumberish]): string; +encodeFunctionData(functionFragment: 'setApprovalForAll', values: [AddressLike, boolean]): string; +encodeFunctionData(functionFragment: 'supportsInterface', values: [BytesLike]): string; +encodeFunctionData(functionFragment: 'symbol', values?: undefined): string; +encodeFunctionData(functionFragment: 'tokenURI', values: [BigNumberish]): string; +encodeFunctionData(functionFragment: 'transferFrom', values: [AddressLike, AddressLike, BigNumberish]): string; + + decodeFunctionResult(functionFragment: 'approve', data: BytesLike): Result; +decodeFunctionResult(functionFragment: 'balanceOf', data: BytesLike): Result; +decodeFunctionResult(functionFragment: 'getApproved', data: BytesLike): Result; +decodeFunctionResult(functionFragment: 'isApprovedForAll', data: BytesLike): Result; +decodeFunctionResult(functionFragment: 'name', data: BytesLike): Result; +decodeFunctionResult(functionFragment: 'ownerOf', data: BytesLike): Result; +decodeFunctionResult(functionFragment: 'setApprovalForAll', data: BytesLike): Result; +decodeFunctionResult(functionFragment: 'supportsInterface', data: BytesLike): Result; +decodeFunctionResult(functionFragment: 'symbol', data: BytesLike): Result; +decodeFunctionResult(functionFragment: 'tokenURI', data: BytesLike): Result; +decodeFunctionResult(functionFragment: 'transferFrom', data: BytesLike): Result; + } + + + export namespace ApprovalEvent { + export type InputTuple = [owner: AddressLike, approved: AddressLike, tokenId: BigNumberish]; + export type OutputTuple = [owner: string, approved: string, tokenId: bigint]; + export interface OutputObject {owner: string, approved: string, tokenId: bigint }; + export type Event = TypedContractEvent + export type Filter = TypedDeferredTopicFilter + export type Log = TypedEventLog + export type LogDescription = TypedLogDescription + } + + + + export namespace ApprovalForAllEvent { + export type InputTuple = [owner: AddressLike, operator: AddressLike, approved: boolean]; + export type OutputTuple = [owner: string, operator: string, approved: boolean]; + export interface OutputObject {owner: string, operator: string, approved: boolean }; + export type Event = TypedContractEvent + export type Filter = TypedDeferredTopicFilter + export type Log = TypedEventLog + export type LogDescription = TypedLogDescription + } + + + + export namespace TransferEvent { + export type InputTuple = [from: AddressLike, to: AddressLike, tokenId: BigNumberish]; + export type OutputTuple = [from: string, to: string, tokenId: bigint]; + export interface OutputObject {from: string, to: string, tokenId: bigint }; + export type Event = TypedContractEvent + export type Filter = TypedDeferredTopicFilter + export type Log = TypedEventLog + export type LogDescription = TypedLogDescription + } + + + + export interface IERC721Metadata extends BaseContract { + + connect(runner?: ContractRunner | null): IERC721Metadata; + waitForDeployment(): Promise; + + interface: IERC721MetadataInterface; + + + queryFilter( + event: TCEvent, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined, + ): Promise>> + queryFilter( + filter: TypedDeferredTopicFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + + on(event: TCEvent, listener: TypedListener): Promise + on(filter: TypedDeferredTopicFilter, listener: TypedListener): Promise + + once(event: TCEvent, listener: TypedListener): Promise + once(filter: TypedDeferredTopicFilter, listener: TypedListener): Promise + + listeners( + event: TCEvent + ): Promise>>; + listeners(eventName?: string): Promise> + removeAllListeners(event?: TCEvent): Promise + + + + + approve: TypedContractMethod< + [to: AddressLike, tokenId: BigNumberish, ], + [void], + 'nonpayable' + > + + + + balanceOf: TypedContractMethod< + [owner: AddressLike, ], + [bigint], + 'view' + > + + + + getApproved: TypedContractMethod< + [tokenId: BigNumberish, ], + [string], + 'view' + > + + + + isApprovedForAll: TypedContractMethod< + [owner: AddressLike, operator: AddressLike, ], + [boolean], + 'view' + > + + + + name: TypedContractMethod< + [], + [string], + 'view' + > + + + + ownerOf: TypedContractMethod< + [tokenId: BigNumberish, ], + [string], + 'view' + > + + + + setApprovalForAll: TypedContractMethod< + [operator: AddressLike, approved: boolean, ], + [void], + 'nonpayable' + > + + + + supportsInterface: TypedContractMethod< + [interfaceId: BytesLike, ], + [boolean], + 'view' + > + + + + symbol: TypedContractMethod< + [], + [string], + 'view' + > + + + + tokenURI: TypedContractMethod< + [tokenId: BigNumberish, ], + [string], + 'view' + > + + + + transferFrom: TypedContractMethod< + [from: AddressLike, to: AddressLike, tokenId: BigNumberish, ], + [void], + 'nonpayable' + > + + + + getFunction(key: string | FunctionFragment): T; + + getFunction(nameOrSignature: 'approve'): TypedContractMethod< + [to: AddressLike, tokenId: BigNumberish, ], + [void], + 'nonpayable' + >; +getFunction(nameOrSignature: 'balanceOf'): TypedContractMethod< + [owner: AddressLike, ], + [bigint], + 'view' + >; +getFunction(nameOrSignature: 'getApproved'): TypedContractMethod< + [tokenId: BigNumberish, ], + [string], + 'view' + >; +getFunction(nameOrSignature: 'isApprovedForAll'): TypedContractMethod< + [owner: AddressLike, operator: AddressLike, ], + [boolean], + 'view' + >; +getFunction(nameOrSignature: 'name'): TypedContractMethod< + [], + [string], + 'view' + >; +getFunction(nameOrSignature: 'ownerOf'): TypedContractMethod< + [tokenId: BigNumberish, ], + [string], + 'view' + >; +getFunction(nameOrSignature: 'setApprovalForAll'): TypedContractMethod< + [operator: AddressLike, approved: boolean, ], + [void], + 'nonpayable' + >; +getFunction(nameOrSignature: 'supportsInterface'): TypedContractMethod< + [interfaceId: BytesLike, ], + [boolean], + 'view' + >; +getFunction(nameOrSignature: 'symbol'): TypedContractMethod< + [], + [string], + 'view' + >; +getFunction(nameOrSignature: 'tokenURI'): TypedContractMethod< + [tokenId: BigNumberish, ], + [string], + 'view' + >; +getFunction(nameOrSignature: 'transferFrom'): TypedContractMethod< + [from: AddressLike, to: AddressLike, tokenId: BigNumberish, ], + [void], + 'nonpayable' + >; + + getEvent(key: 'Approval'): TypedContractEvent; +getEvent(key: 'ApprovalForAll'): TypedContractEvent; +getEvent(key: 'Transfer'): TypedContractEvent; + + filters: { + + 'Approval(address,address,uint256)': TypedContractEvent; + Approval: TypedContractEvent; + + + 'ApprovalForAll(address,address,bool)': TypedContractEvent; + ApprovalForAll: TypedContractEvent; + + + 'Transfer(address,address,uint256)': TypedContractEvent; + Transfer: TypedContractEvent; + + }; + } \ No newline at end of file diff --git a/erc20/types/ethers-contracts/ERC721.sol/IERC721Receiver.ts b/erc20/types/ethers-contracts/ERC721.sol/IERC721Receiver.ts new file mode 100644 index 00000000..7286b310 --- /dev/null +++ b/erc20/types/ethers-contracts/ERC721.sol/IERC721Receiver.ts @@ -0,0 +1,75 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { BaseContract, BigNumberish, BytesLike, FunctionFragment, Result, Interface, AddressLike, ContractRunner, ContractMethod, Listener } from "ethers" +import type { TypedContractEvent, TypedDeferredTopicFilter, TypedEventLog, TypedListener, TypedContractMethod } from "../common.js" + + + export interface IERC721ReceiverInterface extends Interface { + getFunction(nameOrSignature: "onERC721Received"): FunctionFragment; + + + + encodeFunctionData(functionFragment: 'onERC721Received', values: [AddressLike, AddressLike, BigNumberish, BytesLike]): string; + + decodeFunctionResult(functionFragment: 'onERC721Received', data: BytesLike): Result; + } + + + + export interface IERC721Receiver extends BaseContract { + + connect(runner?: ContractRunner | null): IERC721Receiver; + waitForDeployment(): Promise; + + interface: IERC721ReceiverInterface; + + + queryFilter( + event: TCEvent, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined, + ): Promise>> + queryFilter( + filter: TypedDeferredTopicFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + + on(event: TCEvent, listener: TypedListener): Promise + on(filter: TypedDeferredTopicFilter, listener: TypedListener): Promise + + once(event: TCEvent, listener: TypedListener): Promise + once(filter: TypedDeferredTopicFilter, listener: TypedListener): Promise + + listeners( + event: TCEvent + ): Promise>>; + listeners(eventName?: string): Promise> + removeAllListeners(event?: TCEvent): Promise + + + + + onERC721Received: TypedContractMethod< + [operator: AddressLike, from: AddressLike, tokenId: BigNumberish, data: BytesLike, ], + [string], + 'nonpayable' + > + + + + getFunction(key: string | FunctionFragment): T; + + getFunction(nameOrSignature: 'onERC721Received'): TypedContractMethod< + [operator: AddressLike, from: AddressLike, tokenId: BigNumberish, data: BytesLike, ], + [string], + 'nonpayable' + >; + + + + filters: { + + }; + } \ No newline at end of file diff --git a/erc20/types/ethers-contracts/ERC721.sol/index.ts b/erc20/types/ethers-contracts/ERC721.sol/index.ts new file mode 100644 index 00000000..a317201c --- /dev/null +++ b/erc20/types/ethers-contracts/ERC721.sol/index.ts @@ -0,0 +1,8 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +export type { ERC721 } from './ERC721.js'; +export type { IERC165 } from './IERC165.js'; +export type { IERC721 } from './IERC721.js'; +export type { IERC721Metadata } from './IERC721Metadata.js'; +export type { IERC721Receiver } from './IERC721Receiver.js'; \ No newline at end of file diff --git a/erc20/types/ethers-contracts/NFTmarketplace.sol/IERC721.ts b/erc20/types/ethers-contracts/NFTmarketplace.sol/IERC721.ts new file mode 100644 index 00000000..a1a074bb --- /dev/null +++ b/erc20/types/ethers-contracts/NFTmarketplace.sol/IERC721.ts @@ -0,0 +1,120 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { BaseContract, BigNumberish, BytesLike, FunctionFragment, Result, Interface, AddressLike, ContractRunner, ContractMethod, Listener } from "ethers" +import type { TypedContractEvent, TypedDeferredTopicFilter, TypedEventLog, TypedListener, TypedContractMethod } from "../common.js" + + + export interface IERC721Interface extends Interface { + getFunction(nameOrSignature: "getApproved" | "isApprovedForAll" | "ownerOf" | "transferFrom"): FunctionFragment; + + + + encodeFunctionData(functionFragment: 'getApproved', values: [BigNumberish]): string; +encodeFunctionData(functionFragment: 'isApprovedForAll', values: [AddressLike, AddressLike]): string; +encodeFunctionData(functionFragment: 'ownerOf', values: [BigNumberish]): string; +encodeFunctionData(functionFragment: 'transferFrom', values: [AddressLike, AddressLike, BigNumberish]): string; + + decodeFunctionResult(functionFragment: 'getApproved', data: BytesLike): Result; +decodeFunctionResult(functionFragment: 'isApprovedForAll', data: BytesLike): Result; +decodeFunctionResult(functionFragment: 'ownerOf', data: BytesLike): Result; +decodeFunctionResult(functionFragment: 'transferFrom', data: BytesLike): Result; + } + + + + export interface IERC721 extends BaseContract { + + connect(runner?: ContractRunner | null): IERC721; + waitForDeployment(): Promise; + + interface: IERC721Interface; + + + queryFilter( + event: TCEvent, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined, + ): Promise>> + queryFilter( + filter: TypedDeferredTopicFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + + on(event: TCEvent, listener: TypedListener): Promise + on(filter: TypedDeferredTopicFilter, listener: TypedListener): Promise + + once(event: TCEvent, listener: TypedListener): Promise + once(filter: TypedDeferredTopicFilter, listener: TypedListener): Promise + + listeners( + event: TCEvent + ): Promise>>; + listeners(eventName?: string): Promise> + removeAllListeners(event?: TCEvent): Promise + + + + + getApproved: TypedContractMethod< + [tokenId: BigNumberish, ], + [string], + 'view' + > + + + + isApprovedForAll: TypedContractMethod< + [owner: AddressLike, operator: AddressLike, ], + [boolean], + 'view' + > + + + + ownerOf: TypedContractMethod< + [tokenId: BigNumberish, ], + [string], + 'view' + > + + + + transferFrom: TypedContractMethod< + [from: AddressLike, to: AddressLike, tokenId: BigNumberish, ], + [void], + 'nonpayable' + > + + + + getFunction(key: string | FunctionFragment): T; + + getFunction(nameOrSignature: 'getApproved'): TypedContractMethod< + [tokenId: BigNumberish, ], + [string], + 'view' + >; +getFunction(nameOrSignature: 'isApprovedForAll'): TypedContractMethod< + [owner: AddressLike, operator: AddressLike, ], + [boolean], + 'view' + >; +getFunction(nameOrSignature: 'ownerOf'): TypedContractMethod< + [tokenId: BigNumberish, ], + [string], + 'view' + >; +getFunction(nameOrSignature: 'transferFrom'): TypedContractMethod< + [from: AddressLike, to: AddressLike, tokenId: BigNumberish, ], + [void], + 'nonpayable' + >; + + + + filters: { + + }; + } \ No newline at end of file diff --git a/erc20/types/ethers-contracts/NFTmarketplace.sol/NFTmarketplace.ts b/erc20/types/ethers-contracts/NFTmarketplace.sol/NFTmarketplace.ts new file mode 100644 index 00000000..e20659f8 --- /dev/null +++ b/erc20/types/ethers-contracts/NFTmarketplace.sol/NFTmarketplace.ts @@ -0,0 +1,228 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { BaseContract, BigNumberish, BytesLike, FunctionFragment, Result, Interface, EventFragment, AddressLike, ContractRunner, ContractMethod, Listener } from "ethers" +import type { TypedContractEvent, TypedDeferredTopicFilter, TypedEventLog, TypedLogDescription, TypedListener, TypedContractMethod } from "../common.js" + + + export interface NFTmarketplaceInterface extends Interface { + getFunction(nameOrSignature: "buyNFT" | "cancelListing" | "feePercentage" | "listNFT" | "listings" | "owner" | "setFeePercentage" | "treasury"): FunctionFragment; + + getEvent(nameOrSignatureOrTopic: "ItemBought" | "ItemListed" | "ListingCancelled"): EventFragment; + + encodeFunctionData(functionFragment: 'buyNFT', values: [AddressLike, BigNumberish]): string; +encodeFunctionData(functionFragment: 'cancelListing', values: [AddressLike, BigNumberish]): string; +encodeFunctionData(functionFragment: 'feePercentage', values?: undefined): string; +encodeFunctionData(functionFragment: 'listNFT', values: [AddressLike, BigNumberish, BigNumberish]): string; +encodeFunctionData(functionFragment: 'listings', values: [AddressLike, BigNumberish]): string; +encodeFunctionData(functionFragment: 'owner', values?: undefined): string; +encodeFunctionData(functionFragment: 'setFeePercentage', values: [BigNumberish]): string; +encodeFunctionData(functionFragment: 'treasury', values?: undefined): string; + + decodeFunctionResult(functionFragment: 'buyNFT', data: BytesLike): Result; +decodeFunctionResult(functionFragment: 'cancelListing', data: BytesLike): Result; +decodeFunctionResult(functionFragment: 'feePercentage', data: BytesLike): Result; +decodeFunctionResult(functionFragment: 'listNFT', data: BytesLike): Result; +decodeFunctionResult(functionFragment: 'listings', data: BytesLike): Result; +decodeFunctionResult(functionFragment: 'owner', data: BytesLike): Result; +decodeFunctionResult(functionFragment: 'setFeePercentage', data: BytesLike): Result; +decodeFunctionResult(functionFragment: 'treasury', data: BytesLike): Result; + } + + + export namespace ItemBoughtEvent { + export type InputTuple = [buyer: AddressLike, nftAddress: AddressLike, tokenId: BigNumberish, price: BigNumberish]; + export type OutputTuple = [buyer: string, nftAddress: string, tokenId: bigint, price: bigint]; + export interface OutputObject {buyer: string, nftAddress: string, tokenId: bigint, price: bigint }; + export type Event = TypedContractEvent + export type Filter = TypedDeferredTopicFilter + export type Log = TypedEventLog + export type LogDescription = TypedLogDescription + } + + + + export namespace ItemListedEvent { + export type InputTuple = [seller: AddressLike, nftAddress: AddressLike, tokenId: BigNumberish, price: BigNumberish]; + export type OutputTuple = [seller: string, nftAddress: string, tokenId: bigint, price: bigint]; + export interface OutputObject {seller: string, nftAddress: string, tokenId: bigint, price: bigint }; + export type Event = TypedContractEvent + export type Filter = TypedDeferredTopicFilter + export type Log = TypedEventLog + export type LogDescription = TypedLogDescription + } + + + + export namespace ListingCancelledEvent { + export type InputTuple = [seller: AddressLike, nftAddress: AddressLike, tokenId: BigNumberish]; + export type OutputTuple = [seller: string, nftAddress: string, tokenId: bigint]; + export interface OutputObject {seller: string, nftAddress: string, tokenId: bigint }; + export type Event = TypedContractEvent + export type Filter = TypedDeferredTopicFilter + export type Log = TypedEventLog + export type LogDescription = TypedLogDescription + } + + + + export interface NFTmarketplace extends BaseContract { + + connect(runner?: ContractRunner | null): NFTmarketplace; + waitForDeployment(): Promise; + + interface: NFTmarketplaceInterface; + + + queryFilter( + event: TCEvent, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined, + ): Promise>> + queryFilter( + filter: TypedDeferredTopicFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + + on(event: TCEvent, listener: TypedListener): Promise + on(filter: TypedDeferredTopicFilter, listener: TypedListener): Promise + + once(event: TCEvent, listener: TypedListener): Promise + once(filter: TypedDeferredTopicFilter, listener: TypedListener): Promise + + listeners( + event: TCEvent + ): Promise>>; + listeners(eventName?: string): Promise> + removeAllListeners(event?: TCEvent): Promise + + + + + buyNFT: TypedContractMethod< + [nftAddress: AddressLike, tokenId: BigNumberish, ], + [void], + 'payable' + > + + + + cancelListing: TypedContractMethod< + [nftAddress: AddressLike, tokenId: BigNumberish, ], + [void], + 'nonpayable' + > + + + + feePercentage: TypedContractMethod< + [], + [bigint], + 'view' + > + + + + listNFT: TypedContractMethod< + [nftAddress: AddressLike, tokenId: BigNumberish, price: BigNumberish, ], + [void], + 'nonpayable' + > + + + + listings: TypedContractMethod< + [arg0: AddressLike, arg1: BigNumberish, ], + [[string, bigint] & {seller: string, price: bigint }], + 'view' + > + + + + owner: TypedContractMethod< + [], + [string], + 'view' + > + + + + setFeePercentage: TypedContractMethod< + [_newFee: BigNumberish, ], + [void], + 'nonpayable' + > + + + + treasury: TypedContractMethod< + [], + [string], + 'view' + > + + + + getFunction(key: string | FunctionFragment): T; + + getFunction(nameOrSignature: 'buyNFT'): TypedContractMethod< + [nftAddress: AddressLike, tokenId: BigNumberish, ], + [void], + 'payable' + >; +getFunction(nameOrSignature: 'cancelListing'): TypedContractMethod< + [nftAddress: AddressLike, tokenId: BigNumberish, ], + [void], + 'nonpayable' + >; +getFunction(nameOrSignature: 'feePercentage'): TypedContractMethod< + [], + [bigint], + 'view' + >; +getFunction(nameOrSignature: 'listNFT'): TypedContractMethod< + [nftAddress: AddressLike, tokenId: BigNumberish, price: BigNumberish, ], + [void], + 'nonpayable' + >; +getFunction(nameOrSignature: 'listings'): TypedContractMethod< + [arg0: AddressLike, arg1: BigNumberish, ], + [[string, bigint] & {seller: string, price: bigint }], + 'view' + >; +getFunction(nameOrSignature: 'owner'): TypedContractMethod< + [], + [string], + 'view' + >; +getFunction(nameOrSignature: 'setFeePercentage'): TypedContractMethod< + [_newFee: BigNumberish, ], + [void], + 'nonpayable' + >; +getFunction(nameOrSignature: 'treasury'): TypedContractMethod< + [], + [string], + 'view' + >; + + getEvent(key: 'ItemBought'): TypedContractEvent; +getEvent(key: 'ItemListed'): TypedContractEvent; +getEvent(key: 'ListingCancelled'): TypedContractEvent; + + filters: { + + 'ItemBought(address,address,uint256,uint256)': TypedContractEvent; + ItemBought: TypedContractEvent; + + + 'ItemListed(address,address,uint256,uint256)': TypedContractEvent; + ItemListed: TypedContractEvent; + + + 'ListingCancelled(address,address,uint256)': TypedContractEvent; + ListingCancelled: TypedContractEvent; + + }; + } \ No newline at end of file diff --git a/erc20/types/ethers-contracts/NFTmarketplace.sol/index.ts b/erc20/types/ethers-contracts/NFTmarketplace.sol/index.ts new file mode 100644 index 00000000..45021d0c --- /dev/null +++ b/erc20/types/ethers-contracts/NFTmarketplace.sol/index.ts @@ -0,0 +1,5 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +export type { IERC721 } from './IERC721.js'; +export type { NFTmarketplace } from './NFTmarketplace.js'; \ No newline at end of file diff --git a/erc20/types/ethers-contracts/common.ts b/erc20/types/ethers-contracts/common.ts new file mode 100644 index 00000000..1b4cfcbe --- /dev/null +++ b/erc20/types/ethers-contracts/common.ts @@ -0,0 +1,92 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { + FunctionFragment, + Typed, + EventFragment, + ContractTransaction, + ContractTransactionResponse, + DeferredTopicFilter, + EventLog, + TransactionRequest, + LogDescription, +} from 'ethers' + +export interface TypedDeferredTopicFilter<_TCEvent extends TypedContractEvent> extends DeferredTopicFilter {} + +export interface TypedContractEvent< + InputTuple extends Array = any, + OutputTuple extends Array = any, + OutputObject = any, +> { + (...args: Partial): TypedDeferredTopicFilter> + name: string + fragment: EventFragment + getFragment(...args: Partial): EventFragment +} + +type __TypechainAOutputTuple = T extends TypedContractEvent ? W : never +type __TypechainOutputObject = T extends TypedContractEvent ? V : never + +export interface TypedEventLog extends Omit { + args: __TypechainAOutputTuple & __TypechainOutputObject +} + +export interface TypedLogDescription extends Omit { + args: __TypechainAOutputTuple & __TypechainOutputObject +} + +export type TypedListener = ( + ...listenerArg: [...__TypechainAOutputTuple, TypedEventLog, ...undefined[]] +) => void + +export type MinEthersFactory = { + deploy(...a: ARGS[]): Promise +} + +export type GetContractTypeFromFactory = F extends MinEthersFactory ? C : never +export type GetARGsTypeFromFactory = F extends MinEthersFactory ? Parameters : never + +export type StateMutability = 'nonpayable' | 'payable' | 'view' + +export type BaseOverrides = Omit +export type NonPayableOverrides = Omit +export type PayableOverrides = Omit +export type ViewOverrides = Omit +export type Overrides = S extends 'nonpayable' + ? NonPayableOverrides + : S extends 'payable' + ? PayableOverrides + : ViewOverrides + +export type PostfixOverrides, S extends StateMutability> = A | [...A, Overrides] +export type ContractMethodArgs, S extends StateMutability> = PostfixOverrides< + { [I in keyof A]-?: A[I] | Typed }, + S +> + +export type DefaultReturnType = R extends Array ? R[0] : R + +// export interface ContractMethod = Array, R = any, D extends R | ContractTransactionResponse = R | ContractTransactionResponse> { +export interface TypedContractMethod< + A extends Array = Array, + R = any, + S extends StateMutability = 'payable', +> { + (...args: ContractMethodArgs): S extends 'view' + ? Promise> + : Promise + + name: string + + fragment: FunctionFragment + + getFragment(...args: ContractMethodArgs): FunctionFragment + + populateTransaction(...args: ContractMethodArgs): Promise + staticCall(...args: ContractMethodArgs): Promise> + send(...args: ContractMethodArgs): Promise + estimateGas(...args: ContractMethodArgs): Promise + staticCallResult(...args: ContractMethodArgs): Promise +} diff --git a/erc20/types/ethers-contracts/factories/Counter__factory.ts b/erc20/types/ethers-contracts/factories/Counter__factory.ts new file mode 100644 index 00000000..3889832c --- /dev/null +++ b/erc20/types/ethers-contracts/factories/Counter__factory.ts @@ -0,0 +1,107 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { Addressable } from "ethers"; +import { Contract, ContractFactory, ContractTransactionResponse, Interface } from "ethers" +import type { Signer, ContractDeployTransaction, ContractRunner } from "ethers" +import type { NonPayableOverrides } from "../common.js" + import type { Counter, CounterInterface } from "../Counter.js"; + + const _abi = [ + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "by", + "type": "uint256" + } + ], + "name": "Increment", + "type": "event" + }, + { + "inputs": [], + "name": "inc", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "by", + "type": "uint256" + } + ], + "name": "incBy", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "x", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + } +] as const; + + const _bytecode = "0x6080604052348015600e575f5ffd5b506103cf8061001c5f395ff3fe608060405234801561000f575f5ffd5b506004361061003f575f3560e01c80630c55699c14610043578063371303c01461006157806370119d061461006b575b5f5ffd5b61004b610087565b6040516100589190610187565b60405180910390f35b61006961008c565b005b610085600480360381019061008091906101ce565b6100dc565b005b5f5481565b5f5f81548092919061009d90610226565b91905055507f51af157c2eee40f68107a47a49c32fbbeb0a3c9e5cd37aa56e88e6be92368a8160016040516100d291906102af565b60405180910390a1565b5f811161011e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161011590610348565b60405180910390fd5b805f5f82825461012e9190610366565b925050819055507f51af157c2eee40f68107a47a49c32fbbeb0a3c9e5cd37aa56e88e6be92368a81816040516101649190610187565b60405180910390a150565b5f819050919050565b6101818161016f565b82525050565b5f60208201905061019a5f830184610178565b92915050565b5f5ffd5b6101ad8161016f565b81146101b7575f5ffd5b50565b5f813590506101c8816101a4565b92915050565b5f602082840312156101e3576101e26101a0565b5b5f6101f0848285016101ba565b91505092915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f6102308261016f565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203610262576102616101f9565b5b600182019050919050565b5f819050919050565b5f819050919050565b5f61029961029461028f8461026d565b610276565b61016f565b9050919050565b6102a98161027f565b82525050565b5f6020820190506102c25f8301846102a0565b92915050565b5f82825260208201905092915050565b7f696e6342793a20696e6372656d656e742073686f756c6420626520706f7369745f8201527f6976650000000000000000000000000000000000000000000000000000000000602082015250565b5f6103326023836102c8565b915061033d826102d8565b604082019050919050565b5f6020820190508181035f83015261035f81610326565b9050919050565b5f6103708261016f565b915061037b8361016f565b9250828201905080821115610393576103926101f9565b5b9291505056fea264697066735822122005f33be9c4b07ea65923ad2f7924ca32e78dfdd67025551f12b98afd31ea524564736f6c634300081c0033"; + + + type CounterConstructorParams = [signer?: Signer] | ConstructorParameters; + + const isSuperArgs = (xs: CounterConstructorParams): xs is ConstructorParameters => + xs.length > 1 + + + export class Counter__factory extends ContractFactory { + + constructor(...args: CounterConstructorParams) { + if (isSuperArgs(args)) { + super(...args); + } else { + super(_abi, _bytecode, args[0]); + } + + } + + override getDeployTransaction(overrides?: NonPayableOverrides & { from?: string }): Promise { + return super.getDeployTransaction(overrides || {}); + }; + override deploy(overrides?: NonPayableOverrides & { from?: string }) { + return super.deploy(overrides || {}) as Promise; + } + override connect(runner: ContractRunner | null): Counter__factory { + return super.connect(runner) as Counter__factory; + } + + + static readonly bytecode = _bytecode; + static readonly abi = _abi; + static createInterface(): CounterInterface { + return new Interface(_abi) as CounterInterface; + } + + override attach(address: string | Addressable): Counter { + return super.attach(address) as Counter; + } + static connect(address: string, runner?: ContractRunner | null): Counter { + return new Contract(address, _abi, runner) as unknown as Counter; + } + } + + + \ No newline at end of file diff --git a/erc20/types/ethers-contracts/factories/ERC20__factory.ts b/erc20/types/ethers-contracts/factories/ERC20__factory.ts new file mode 100644 index 00000000..ca3637b4 --- /dev/null +++ b/erc20/types/ethers-contracts/factories/ERC20__factory.ts @@ -0,0 +1,328 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { Addressable } from "ethers"; +import { Contract, ContractFactory, ContractTransactionResponse, Interface } from "ethers" +import type { Signer, BigNumberish, ContractDeployTransaction, ContractRunner } from "ethers" +import type { NonPayableOverrides } from "../common.js" + import type { ERC20, ERC20Interface } from "../ERC20.js"; + + const _abi = [ + { + "inputs": [ + { + "internalType": "string", + "name": "_name", + "type": "string" + }, + { + "internalType": "string", + "name": "_symbol", + "type": "string" + }, + { + "internalType": "uint256", + "name": "_decimals", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "initialSupply", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "decimals", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "mint", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "symbol", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + } +] as const; + + const _bytecode = "0x608060405234801561000f575f5ffd5b5060405161182c38038061182c83398181016040528101906100319190610332565b835f908161003f91906105d5565b50826001908161004f91906105d5565b5081600281905550610067338261007060201b60201c565b505050506107a4565b5f73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16036100de576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016100d5906106fe565b60405180910390fd5b8060035f8282546100ef9190610749565b925050819055508060045f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8282546101429190610749565b925050819055508173ffffffffffffffffffffffffffffffffffffffff165f73ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040516101a6919061078b565b60405180910390a35050565b5f604051905090565b5f5ffd5b5f5ffd5b5f5ffd5b5f5ffd5b5f601f19601f8301169050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b610211826101cb565b810181811067ffffffffffffffff821117156102305761022f6101db565b5b80604052505050565b5f6102426101b2565b905061024e8282610208565b919050565b5f67ffffffffffffffff82111561026d5761026c6101db565b5b610276826101cb565b9050602081019050919050565b8281835e5f83830152505050565b5f6102a361029e84610253565b610239565b9050828152602081018484840111156102bf576102be6101c7565b5b6102ca848285610283565b509392505050565b5f82601f8301126102e6576102e56101c3565b5b81516102f6848260208601610291565b91505092915050565b5f819050919050565b610311816102ff565b811461031b575f5ffd5b50565b5f8151905061032c81610308565b92915050565b5f5f5f5f6080858703121561034a576103496101bb565b5b5f85015167ffffffffffffffff811115610367576103666101bf565b5b610373878288016102d2565b945050602085015167ffffffffffffffff811115610394576103936101bf565b5b6103a0878288016102d2565b93505060406103b18782880161031e565b92505060606103c28782880161031e565b91505092959194509250565b5f81519050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b5f600282049050600182168061041c57607f821691505b60208210810361042f5761042e6103d8565b5b50919050565b5f819050815f5260205f209050919050565b5f6020601f8301049050919050565b5f82821b905092915050565b5f600883026104917fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82610456565b61049b8683610456565b95508019841693508086168417925050509392505050565b5f819050919050565b5f6104d66104d16104cc846102ff565b6104b3565b6102ff565b9050919050565b5f819050919050565b6104ef836104bc565b6105036104fb826104dd565b848454610462565b825550505050565b5f5f905090565b61051a61050b565b6105258184846104e6565b505050565b5b818110156105485761053d5f82610512565b60018101905061052b565b5050565b601f82111561058d5761055e81610435565b61056784610447565b81016020851015610576578190505b61058a61058285610447565b83018261052a565b50505b505050565b5f82821c905092915050565b5f6105ad5f1984600802610592565b1980831691505092915050565b5f6105c5838361059e565b9150826002028217905092915050565b6105de826103ce565b67ffffffffffffffff8111156105f7576105f66101db565b5b6106018254610405565b61060c82828561054c565b5f60209050601f83116001811461063d575f841561062b578287015190505b61063585826105ba565b86555061069c565b601f19841661064b86610435565b5f5b828110156106725784890151825560018201915060208501945060208101905061064d565b8683101561068f578489015161068b601f89168261059e565b8355505b6001600288020188555050505b505050505050565b5f82825260208201905092915050565b7f43616e6e6f74206d696e7420746f207a65726f206164647265737300000000005f82015250565b5f6106e8601b836106a4565b91506106f3826106b4565b602082019050919050565b5f6020820190508181035f830152610715816106dc565b9050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f610753826102ff565b915061075e836102ff565b92508282019050808211156107765761077561071c565b5b92915050565b610785816102ff565b82525050565b5f60208201905061079e5f83018461077c565b92915050565b61107b806107b15f395ff3fe608060405234801561000f575f5ffd5b506004361061009c575f3560e01c806370a082311161006457806370a082311461015a57806395d89b411461018a578063a0712d68146101a8578063a9059cbb146101d8578063dd62ed3e146102085761009c565b806306fdde03146100a0578063095ea7b3146100be57806318160ddd146100ee57806323b872dd1461010c578063313ce5671461013c575b5f5ffd5b6100a8610238565b6040516100b59190610b1f565b60405180910390f35b6100d860048036038101906100d39190610bd0565b6102c3565b6040516100e59190610c28565b60405180910390f35b6100f661041e565b6040516101039190610c50565b60405180910390f35b61012660048036038101906101219190610c69565b610427565b6040516101339190610c28565b60405180910390f35b610144610663565b6040516101519190610c50565b60405180910390f35b610174600480360381019061016f9190610cb9565b610669565b6040516101819190610c50565b60405180910390f35b6101926106af565b60405161019f9190610b1f565b60405180910390f35b6101c260048036038101906101bd9190610ce4565b61073b565b6040516101cf9190610c28565b60405180910390f35b6101f260048036038101906101ed9190610bd0565b61074f565b6040516101ff9190610c28565b60405180910390f35b610222600480360381019061021d9190610d0f565b610765565b60405161022f9190610c50565b60405180910390f35b5f805461024490610d7a565b80601f016020809104026020016040519081016040528092919081815260200182805461027090610d7a565b80156102bb5780601f10610292576101008083540402835291602001916102bb565b820191905f5260205f20905b81548152906001019060200180831161029e57829003601f168201915b505050505081565b5f5f73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1603610332576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161032990610df4565b60405180910390fd5b8160055f3373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258460405161040c9190610c50565b60405180910390a36001905092915050565b5f600354905090565b5f5f60055f8673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f3373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20549050828110156104e7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016104de90610e5c565b60405180910390fd5b82816104f39190610ea7565b60055f8773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f3373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20819055503373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560055f8973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f3373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20546040516106449190610c50565b60405180910390a36106578585856107e7565b60019150509392505050565b60025481565b5f60045f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20549050919050565b600180546106bc90610d7a565b80601f01602080910402602001604051908101604052809291908181526020018280546106e890610d7a565b80156107335780601f1061070a57610100808354040283529160200191610733565b820191905f5260205f20905b81548152906001019060200180831161071657829003601f168201915b505050505081565b5f610746338361096d565b60019050919050565b5f61075b3384846107e7565b6001905092915050565b5f60055f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2054905092915050565b5f73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603610855576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161084c90610f24565b60405180910390fd5b5f60045f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20549050818110156108d9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108d090610f8c565b60405180910390fd5b81810360045f8673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20819055508160045f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f828254019250508190555050505050565b5f73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16036109db576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109d290610ff4565b60405180910390fd5b8060035f8282546109ec9190611012565b925050819055508060045f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f828254610a3f9190611012565b925050819055508173ffffffffffffffffffffffffffffffffffffffff165f73ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef83604051610aa39190610c50565b60405180910390a35050565b5f81519050919050565b5f82825260208201905092915050565b8281835e5f83830152505050565b5f601f19601f8301169050919050565b5f610af182610aaf565b610afb8185610ab9565b9350610b0b818560208601610ac9565b610b1481610ad7565b840191505092915050565b5f6020820190508181035f830152610b378184610ae7565b905092915050565b5f5ffd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f610b6c82610b43565b9050919050565b610b7c81610b62565b8114610b86575f5ffd5b50565b5f81359050610b9781610b73565b92915050565b5f819050919050565b610baf81610b9d565b8114610bb9575f5ffd5b50565b5f81359050610bca81610ba6565b92915050565b5f5f60408385031215610be657610be5610b3f565b5b5f610bf385828601610b89565b9250506020610c0485828601610bbc565b9150509250929050565b5f8115159050919050565b610c2281610c0e565b82525050565b5f602082019050610c3b5f830184610c19565b92915050565b610c4a81610b9d565b82525050565b5f602082019050610c635f830184610c41565b92915050565b5f5f5f60608486031215610c8057610c7f610b3f565b5b5f610c8d86828701610b89565b9350506020610c9e86828701610b89565b9250506040610caf86828701610bbc565b9150509250925092565b5f60208284031215610cce57610ccd610b3f565b5b5f610cdb84828501610b89565b91505092915050565b5f60208284031215610cf957610cf8610b3f565b5b5f610d0684828501610bbc565b91505092915050565b5f5f60408385031215610d2557610d24610b3f565b5b5f610d3285828601610b89565b9250506020610d4385828601610b89565b9150509250929050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b5f6002820490506001821680610d9157607f821691505b602082108103610da457610da3610d4d565b5b50919050565b7f43616e6e6f7420617070726f766520746f207a65726f206164647265737300005f82015250565b5f610dde601e83610ab9565b9150610de982610daa565b602082019050919050565b5f6020820190508181035f830152610e0b81610dd2565b9050919050565b7f496e73756666696369656e7420616c6c6f77616e6365000000000000000000005f82015250565b5f610e46601683610ab9565b9150610e5182610e12565b602082019050919050565b5f6020820190508181035f830152610e7381610e3a565b9050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f610eb182610b9d565b9150610ebc83610b9d565b9250828203905081811115610ed457610ed3610e7a565b5b92915050565b7f5472616e7366657220746f207a65726f206164647265737300000000000000005f82015250565b5f610f0e601883610ab9565b9150610f1982610eda565b602082019050919050565b5f6020820190508181035f830152610f3b81610f02565b9050919050565b7f496e73756666696369656e742066756e647300000000000000000000000000005f82015250565b5f610f76601283610ab9565b9150610f8182610f42565b602082019050919050565b5f6020820190508181035f830152610fa381610f6a565b9050919050565b7f43616e6e6f74206d696e7420746f207a65726f206164647265737300000000005f82015250565b5f610fde601b83610ab9565b9150610fe982610faa565b602082019050919050565b5f6020820190508181035f83015261100b81610fd2565b9050919050565b5f61101c82610b9d565b915061102783610b9d565b925082820190508082111561103f5761103e610e7a565b5b9291505056fea264697066735822122040c5b0e5db1c6f6e9b2d371235138ecc8b5b68d4062dfad8b691662a9bf5bbc864736f6c634300081c0033"; + + + type ERC20ConstructorParams = [signer?: Signer] | ConstructorParameters; + + const isSuperArgs = (xs: ERC20ConstructorParams): xs is ConstructorParameters => + xs.length > 1 + + + export class ERC20__factory extends ContractFactory { + + constructor(...args: ERC20ConstructorParams) { + if (isSuperArgs(args)) { + super(...args); + } else { + super(_abi, _bytecode, args[0]); + } + + } + + override getDeployTransaction(_name: string, _symbol: string, _decimals: BigNumberish, initialSupply: BigNumberish, overrides?: NonPayableOverrides & { from?: string }): Promise { + return super.getDeployTransaction(_name, _symbol, _decimals, initialSupply, overrides || {}); + }; + override deploy(_name: string, _symbol: string, _decimals: BigNumberish, initialSupply: BigNumberish, overrides?: NonPayableOverrides & { from?: string }) { + return super.deploy(_name, _symbol, _decimals, initialSupply, overrides || {}) as Promise; + } + override connect(runner: ContractRunner | null): ERC20__factory { + return super.connect(runner) as ERC20__factory; + } + + + static readonly bytecode = _bytecode; + static readonly abi = _abi; + static createInterface(): ERC20Interface { + return new Interface(_abi) as ERC20Interface; + } + + override attach(address: string | Addressable): ERC20 { + return super.attach(address) as ERC20; + } + static connect(address: string, runner?: ContractRunner | null): ERC20 { + return new Contract(address, _abi, runner) as unknown as ERC20; + } + } + + + \ No newline at end of file diff --git a/erc20/types/ethers-contracts/factories/ERC721.sol/ERC721__factory.ts b/erc20/types/ethers-contracts/factories/ERC721.sol/ERC721__factory.ts new file mode 100644 index 00000000..e3da4f29 --- /dev/null +++ b/erc20/types/ethers-contracts/factories/ERC721.sol/ERC721__factory.ts @@ -0,0 +1,405 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { Addressable } from "ethers"; +import { Contract, ContractFactory, ContractTransactionResponse, Interface } from "ethers" +import type { Signer, ContractDeployTransaction, ContractRunner } from "ethers" +import type { NonPayableOverrides } from "../../common.js" + import type { ERC721, ERC721Interface } from "../../ERC721.sol/ERC721.js"; + + const _abi = [ + { + "inputs": [ + { + "internalType": "string", + "name": "name_", + "type": "string" + }, + { + "internalType": "string", + "name": "symbol_", + "type": "string" + }, + { + "internalType": "string", + "name": "baseURI_", + "type": "string" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "approved", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "indexed": false, + "internalType": "bool", + "name": "approved", + "type": "bool" + } + ], + "name": "ApprovalForAll", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "burn", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "getApproved", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "operator", + "type": "address" + } + ], + "name": "isApprovedForAll", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "mint", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "ownerOf", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "internalType": "bool", + "name": "approved", + "type": "bool" + } + ], + "name": "setApprovalForAll", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "newBaseURI", + "type": "string" + } + ], + "name": "setBaseURI", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [], + "name": "symbol", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "tokenURI", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } +] as const; + + const _bytecode = "0x608060405234801561000f575f5ffd5b5060405161254e38038061254e833981810160405281019061003191906101b5565b825f908161003f9190610469565b50816001908161004f9190610469565b50806002908161005f9190610469565b50505050610538565b5f604051905090565b5f5ffd5b5f5ffd5b5f5ffd5b5f5ffd5b5f601f19601f8301169050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b6100c782610081565b810181811067ffffffffffffffff821117156100e6576100e5610091565b5b80604052505050565b5f6100f8610068565b905061010482826100be565b919050565b5f67ffffffffffffffff82111561012357610122610091565b5b61012c82610081565b9050602081019050919050565b8281835e5f83830152505050565b5f61015961015484610109565b6100ef565b9050828152602081018484840111156101755761017461007d565b5b610180848285610139565b509392505050565b5f82601f83011261019c5761019b610079565b5b81516101ac848260208601610147565b91505092915050565b5f5f5f606084860312156101cc576101cb610071565b5b5f84015167ffffffffffffffff8111156101e9576101e8610075565b5b6101f586828701610188565b935050602084015167ffffffffffffffff81111561021657610215610075565b5b61022286828701610188565b925050604084015167ffffffffffffffff81111561024357610242610075565b5b61024f86828701610188565b9150509250925092565b5f81519050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b5f60028204905060018216806102a757607f821691505b6020821081036102ba576102b9610263565b5b50919050565b5f819050815f5260205f209050919050565b5f6020601f8301049050919050565b5f82821b905092915050565b5f6008830261031c7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff826102e1565b61032686836102e1565b95508019841693508086168417925050509392505050565b5f819050919050565b5f819050919050565b5f61036a6103656103608461033e565b610347565b61033e565b9050919050565b5f819050919050565b61038383610350565b61039761038f82610371565b8484546102ed565b825550505050565b5f5f905090565b6103ae61039f565b6103b981848461037a565b505050565b5b818110156103dc576103d15f826103a6565b6001810190506103bf565b5050565b601f821115610421576103f2816102c0565b6103fb846102d2565b8101602085101561040a578190505b61041e610416856102d2565b8301826103be565b50505b505050565b5f82821c905092915050565b5f6104415f1984600802610426565b1980831691505092915050565b5f6104598383610432565b9150826002028217905092915050565b61047282610259565b67ffffffffffffffff81111561048b5761048a610091565b5b6104958254610290565b6104a08282856103e0565b5f60209050601f8311600181146104d1575f84156104bf578287015190505b6104c9858261044e565b865550610530565b601f1984166104df866102c0565b5f5b82811015610506578489015182556001820191506020850194506020810190506104e1565b86831015610523578489015161051f601f891682610432565b8355505b6001600288020188555050505b505050505050565b612009806105455f395ff3fe608060405234801561000f575f5ffd5b50600436106100e8575f3560e01c806355f804b31161008a57806395d89b411161006457806395d89b4114610256578063a22cb46514610274578063c87b56dd14610290578063e985e9c5146102c0576100e8565b806355f804b3146101da5780636352211e146101f657806370a0823114610226576100e8565b8063095ea7b3116100c6578063095ea7b31461016a57806323b872dd1461018657806340c10f19146101a257806342966c68146101be576100e8565b806301ffc9a7146100ec57806306fdde031461011c578063081812fc1461013a575b5f5ffd5b610106600480360381019061010191906112f5565b6102f0565b604051610113919061133a565b60405180910390f35b610124610381565b60405161013191906113c3565b60405180910390f35b610154600480360381019061014f9190611416565b610410565b6040516101619190611480565b60405180910390f35b610184600480360381019061017f91906114c3565b610491565b005b6101a0600480360381019061019b9190611501565b610628565b005b6101bc60048036038101906101b791906114c3565b61078d565b005b6101d860048036038101906101d39190611416565b61079b565b005b6101f460048036038101906101ef91906115b2565b610964565b005b610210600480360381019061020b9190611416565b61097a565b60405161021d9190611480565b60405180910390f35b610240600480360381019061023b91906115fd565b610a26565b60405161024d9190611637565b60405180910390f35b61025e610ada565b60405161026b91906113c3565b60405180910390f35b61028e6004803603810190610289919061167a565b610b6a565b005b6102aa60048036038101906102a59190611416565b610cd0565b6040516102b791906113c3565b60405180910390f35b6102da60048036038101906102d591906116b8565b610d70565b6040516102e7919061133a565b60405180910390f35b5f6301ffc9a760e01b827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916148061034a57506380ac58cd60e01b827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b8061037a5750635b5e139f60e01b827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b9050919050565b60605f805461038f90611723565b80601f01602080910402602001604051908101604052809291908181526020018280546103bb90611723565b80156104065780601f106103dd57610100808354040283529160200191610406565b820191905f5260205f20905b8154815290600101906020018083116103e957829003601f168201915b5050505050905090565b5f61041a82610dfe565b610459576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016104509061179d565b60405180910390fd5b60055f8381526020019081526020015f205f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b5f61049b8261097a565b90508073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff160361050b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161050290611805565b60405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610579576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105709061186d565b60405180910390fd5b8260055f8481526020019081526020015f205f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550818373ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a4505050565b6106323382610e66565b610671576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610668906118d5565b60405180910390fd5b8273ffffffffffffffffffffffffffffffffffffffff1660035f8381526020019081526020015f205f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461070f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107069061193d565b60405180910390fd5b5f73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff160361077d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610774906119a5565b60405180910390fd5b610788838383610efa565b505050565b61079782826110df565b5050565b5f6107a58261097a565b90506107b13383610e66565b6107f0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107e79061186d565b60405180910390fd5b60055f8381526020019081526020015f205f6101000a81549073ffffffffffffffffffffffffffffffffffffffff0219169055815f73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a4600160045f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8282546108cb91906119f0565b9250508190555060035f8381526020019081526020015f205f6101000a81549073ffffffffffffffffffffffffffffffffffffffff0219169055815f73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a45050565b818160029182610975929190611bfa565b505050565b5f5f60035f8481526020019081526020015f205f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690505f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603610a1d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a1490611d11565b60405180910390fd5b80915050919050565b5f5f73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603610a95576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a8c90611d79565b60405180910390fd5b60045f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20549050919050565b606060018054610ae990611723565b80601f0160208091040260200160405190810160405280929190818152602001828054610b1590611723565b8015610b605780601f10610b3757610100808354040283529160200191610b60565b820191905f5260205f20905b815481529060010190602001808311610b4357829003601f168201915b5050505050905090565b3373ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603610bd8576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610bcf90611de1565b60405180910390fd5b8060065f3373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f6101000a81548160ff0219169083151502179055508173ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c3183604051610cc4919061133a565b60405180910390a35050565b6060610cdb82610dfe565b610d1a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d1190611d11565b60405180910390fd5b5f60028054610d2890611723565b905003610d455760405180602001604052805f8152509050610d6b565b600282604051602001610d59929190611ea9565b60405160208183030381529060405290505b919050565b5f60065f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f9054906101000a900460ff16905092915050565b5f5f73ffffffffffffffffffffffffffffffffffffffff1660035f8481526020019081526020015f205f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614159050919050565b5f5f610e718361097a565b90508073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161480610ee057508373ffffffffffffffffffffffffffffffffffffffff16610ec884610410565b73ffffffffffffffffffffffffffffffffffffffff16145b80610ef15750610ef08185610d70565b5b91505092915050565b60055f8281526020019081526020015f205f6101000a81549073ffffffffffffffffffffffffffffffffffffffff0219169055805f73ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a4600160045f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f828254610fd591906119f0565b92505081905550600160045f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8282546110299190611ed0565b925050819055508160035f8381526020019081526020015f205f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550808273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4505050565b5f73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff160361114d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161114490611f4d565b60405180910390fd5b61115681610dfe565b15611196576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161118d90611fb5565b60405180910390fd5b600160045f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8282546111e39190611ed0565b925050819055508160035f8381526020019081526020015f205f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550808273ffffffffffffffffffffffffffffffffffffffff165f73ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a45050565b5f5ffd5b5f5ffd5b5f7fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b6112d4816112a0565b81146112de575f5ffd5b50565b5f813590506112ef816112cb565b92915050565b5f6020828403121561130a57611309611298565b5b5f611317848285016112e1565b91505092915050565b5f8115159050919050565b61133481611320565b82525050565b5f60208201905061134d5f83018461132b565b92915050565b5f81519050919050565b5f82825260208201905092915050565b8281835e5f83830152505050565b5f601f19601f8301169050919050565b5f61139582611353565b61139f818561135d565b93506113af81856020860161136d565b6113b88161137b565b840191505092915050565b5f6020820190508181035f8301526113db818461138b565b905092915050565b5f819050919050565b6113f5816113e3565b81146113ff575f5ffd5b50565b5f81359050611410816113ec565b92915050565b5f6020828403121561142b5761142a611298565b5b5f61143884828501611402565b91505092915050565b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f61146a82611441565b9050919050565b61147a81611460565b82525050565b5f6020820190506114935f830184611471565b92915050565b6114a281611460565b81146114ac575f5ffd5b50565b5f813590506114bd81611499565b92915050565b5f5f604083850312156114d9576114d8611298565b5b5f6114e6858286016114af565b92505060206114f785828601611402565b9150509250929050565b5f5f5f6060848603121561151857611517611298565b5b5f611525868287016114af565b9350506020611536868287016114af565b925050604061154786828701611402565b9150509250925092565b5f5ffd5b5f5ffd5b5f5ffd5b5f5f83601f84011261157257611571611551565b5b8235905067ffffffffffffffff81111561158f5761158e611555565b5b6020830191508360018202830111156115ab576115aa611559565b5b9250929050565b5f5f602083850312156115c8576115c7611298565b5b5f83013567ffffffffffffffff8111156115e5576115e461129c565b5b6115f18582860161155d565b92509250509250929050565b5f6020828403121561161257611611611298565b5b5f61161f848285016114af565b91505092915050565b611631816113e3565b82525050565b5f60208201905061164a5f830184611628565b92915050565b61165981611320565b8114611663575f5ffd5b50565b5f8135905061167481611650565b92915050565b5f5f604083850312156116905761168f611298565b5b5f61169d858286016114af565b92505060206116ae85828601611666565b9150509250929050565b5f5f604083850312156116ce576116cd611298565b5b5f6116db858286016114af565b92505060206116ec858286016114af565b9150509250929050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b5f600282049050600182168061173a57607f821691505b60208210810361174d5761174c6116f6565b5b50919050565b7f746f6b656e20646f6573206e6f742065786973740000000000000000000000005f82015250565b5f61178760148361135d565b915061179282611753565b602082019050919050565b5f6020820190508181035f8301526117b48161177b565b9050919050565b7f63616e6e6f7420617070726f766520746f2063757272656e74206f776e6572005f82015250565b5f6117ef601f8361135d565b91506117fa826117bb565b602082019050919050565b5f6020820190508181035f83015261181c816117e3565b9050919050565b7f756e617574686f726973656400000000000000000000000000000000000000005f82015250565b5f611857600c8361135d565b915061186282611823565b602082019050919050565b5f6020820190508181035f8301526118848161184b565b9050919050565b7f756e6175686f72697365640000000000000000000000000000000000000000005f82015250565b5f6118bf600b8361135d565b91506118ca8261188b565b602082019050919050565b5f6020820190508181035f8301526118ec816118b3565b9050919050565b7f77726f6e672066726f6d000000000000000000000000000000000000000000005f82015250565b5f611927600a8361135d565b9150611932826118f3565b602082019050919050565b5f6020820190508181035f8301526119548161191b565b9050919050565b7f7472616e7366657220746f207a65726f206164647265737300000000000000005f82015250565b5f61198f60188361135d565b915061199a8261195b565b602082019050919050565b5f6020820190508181035f8301526119bc81611983565b9050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f6119fa826113e3565b9150611a05836113e3565b9250828203905081811115611a1d57611a1c6119c3565b5b92915050565b5f82905092915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b5f819050815f5260205f209050919050565b5f6020601f8301049050919050565b5f82821b905092915050565b5f60088302611ab67fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82611a7b565b611ac08683611a7b565b95508019841693508086168417925050509392505050565b5f819050919050565b5f611afb611af6611af1846113e3565b611ad8565b6113e3565b9050919050565b5f819050919050565b611b1483611ae1565b611b28611b2082611b02565b848454611a87565b825550505050565b5f5f905090565b611b3f611b30565b611b4a818484611b0b565b505050565b5b81811015611b6d57611b625f82611b37565b600181019050611b50565b5050565b601f821115611bb257611b8381611a5a565b611b8c84611a6c565b81016020851015611b9b578190505b611baf611ba785611a6c565b830182611b4f565b50505b505050565b5f82821c905092915050565b5f611bd25f1984600802611bb7565b1980831691505092915050565b5f611bea8383611bc3565b9150826002028217905092915050565b611c048383611a23565b67ffffffffffffffff811115611c1d57611c1c611a2d565b5b611c278254611723565b611c32828285611b71565b5f601f831160018114611c5f575f8415611c4d578287013590505b611c578582611bdf565b865550611cbe565b601f198416611c6d86611a5a565b5f5b82811015611c9457848901358255600182019150602085019450602081019050611c6f565b86831015611cb15784890135611cad601f891682611bc3565b8355505b6001600288020188555050505b50505050505050565b7f696e76616c696420746f6b656e000000000000000000000000000000000000005f82015250565b5f611cfb600d8361135d565b9150611d0682611cc7565b602082019050919050565b5f6020820190508181035f830152611d2881611cef565b9050919050565b7f7a65726f206164647265737300000000000000000000000000000000000000005f82015250565b5f611d63600c8361135d565b9150611d6e82611d2f565b602082019050919050565b5f6020820190508181035f830152611d9081611d57565b9050919050565b7f63616e6e6f7420617070726f766520746f2073656c66000000000000000000005f82015250565b5f611dcb60168361135d565b9150611dd682611d97565b602082019050919050565b5f6020820190508181035f830152611df881611dbf565b9050919050565b5f81905092915050565b5f8154611e1581611723565b611e1f8186611dff565b9450600182165f8114611e395760018114611e4e57611e80565b60ff1983168652811515820286019350611e80565b611e5785611a5a565b5f5b83811015611e7857815481890152600182019150602081019050611e59565b838801955050505b50505092915050565b5f819050919050565b611ea3611e9e826113e3565b611e89565b82525050565b5f611eb48285611e09565b9150611ec08284611e92565b6020820191508190509392505050565b5f611eda826113e3565b9150611ee5836113e3565b9250828201905080821115611efd57611efc6119c3565b5b92915050565b7f6d696e7420746f207a65726f20616464726573730000000000000000000000005f82015250565b5f611f3760148361135d565b9150611f4282611f03565b602082019050919050565b5f6020820190508181035f830152611f6481611f2b565b9050919050565b7f746f6b656e20616c7265616479206d696e7465640000000000000000000000005f82015250565b5f611f9f60148361135d565b9150611faa82611f6b565b602082019050919050565b5f6020820190508181035f830152611fcc81611f93565b905091905056fea2646970667358221220bc24a226658fd12779f189ac9bb263d2e67c95a879f9573ed5df85e1f047af3164736f6c634300081c0033"; + + + type ERC721ConstructorParams = [signer?: Signer] | ConstructorParameters; + + const isSuperArgs = (xs: ERC721ConstructorParams): xs is ConstructorParameters => + xs.length > 1 + + + export class ERC721__factory extends ContractFactory { + + constructor(...args: ERC721ConstructorParams) { + if (isSuperArgs(args)) { + super(...args); + } else { + super(_abi, _bytecode, args[0]); + } + + } + + override getDeployTransaction(name_: string, symbol_: string, baseURI_: string, overrides?: NonPayableOverrides & { from?: string }): Promise { + return super.getDeployTransaction(name_, symbol_, baseURI_, overrides || {}); + }; + override deploy(name_: string, symbol_: string, baseURI_: string, overrides?: NonPayableOverrides & { from?: string }) { + return super.deploy(name_, symbol_, baseURI_, overrides || {}) as Promise; + } + override connect(runner: ContractRunner | null): ERC721__factory { + return super.connect(runner) as ERC721__factory; + } + + + static readonly bytecode = _bytecode; + static readonly abi = _abi; + static createInterface(): ERC721Interface { + return new Interface(_abi) as ERC721Interface; + } + + override attach(address: string | Addressable): ERC721 { + return super.attach(address) as ERC721; + } + static connect(address: string, runner?: ContractRunner | null): ERC721 { + return new Contract(address, _abi, runner) as unknown as ERC721; + } + } + + + \ No newline at end of file diff --git a/erc20/types/ethers-contracts/factories/ERC721.sol/IER721Metadata__factory.ts b/erc20/types/ethers-contracts/factories/ERC721.sol/IER721Metadata__factory.ts new file mode 100644 index 00000000..dab0c858 --- /dev/null +++ b/erc20/types/ethers-contracts/factories/ERC721.sol/IER721Metadata__factory.ts @@ -0,0 +1,350 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + + import { Contract, Interface, type ContractRunner } from "ethers"; + import type { IER721Metadata, IER721MetadataInterface } from "../../ERC721.sol/IER721Metadata.js"; + + const _abi = [ + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "approved", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "indexed": false, + "internalType": "bool", + "name": "approved", + "type": "bool" + } + ], + "name": "ApprovalForAll", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "tokenID", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "getAproved", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "operator", + "type": "address" + } + ], + "name": "isApprovedForAll", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "ownerOf", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "safeTransferFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "safeTransferFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "internalType": "bool", + "name": "approved", + "type": "bool" + } + ], + "name": "setApprovalForAll", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceID", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "symbol", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "tokenURI", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } +] as const; + + export class IER721Metadata__factory { + static readonly abi = _abi; + static createInterface(): IER721MetadataInterface { + return new Interface(_abi) as IER721MetadataInterface; + } + static connect(address: string, runner?: ContractRunner | null): IER721Metadata { + return new Contract(address, _abi, runner) as unknown as IER721Metadata; + } + } + \ No newline at end of file diff --git a/erc20/types/ethers-contracts/factories/ERC721.sol/IERC165__factory.ts b/erc20/types/ethers-contracts/factories/ERC721.sol/IERC165__factory.ts new file mode 100644 index 00000000..bbb74317 --- /dev/null +++ b/erc20/types/ethers-contracts/factories/ERC721.sol/IERC165__factory.ts @@ -0,0 +1,39 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + + import { Contract, Interface, type ContractRunner } from "ethers"; + import type { IERC165, IERC165Interface } from "../../ERC721.sol/IERC165.js"; + + const _abi = [ + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + } +] as const; + + export class IERC165__factory { + static readonly abi = _abi; + static createInterface(): IERC165Interface { + return new Interface(_abi) as IERC165Interface; + } + static connect(address: string, runner?: ContractRunner | null): IERC165 { + return new Contract(address, _abi, runner) as unknown as IERC165; + } + } + \ No newline at end of file diff --git a/erc20/types/ethers-contracts/factories/ERC721.sol/IERC721Metadata__factory.ts b/erc20/types/ethers-contracts/factories/ERC721.sol/IERC721Metadata__factory.ts new file mode 100644 index 00000000..a855e18d --- /dev/null +++ b/erc20/types/ethers-contracts/factories/ERC721.sol/IERC721Metadata__factory.ts @@ -0,0 +1,299 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + + import { Contract, Interface, type ContractRunner } from "ethers"; + import type { IERC721Metadata, IERC721MetadataInterface } from "../../ERC721.sol/IERC721Metadata.js"; + + const _abi = [ + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "approved", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "indexed": false, + "internalType": "bool", + "name": "approved", + "type": "bool" + } + ], + "name": "ApprovalForAll", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "getApproved", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "operator", + "type": "address" + } + ], + "name": "isApprovedForAll", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "ownerOf", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "internalType": "bool", + "name": "approved", + "type": "bool" + } + ], + "name": "setApprovalForAll", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "symbol", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "tokenURI", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } +] as const; + + export class IERC721Metadata__factory { + static readonly abi = _abi; + static createInterface(): IERC721MetadataInterface { + return new Interface(_abi) as IERC721MetadataInterface; + } + static connect(address: string, runner?: ContractRunner | null): IERC721Metadata { + return new Contract(address, _abi, runner) as unknown as IERC721Metadata; + } + } + \ No newline at end of file diff --git a/erc20/types/ethers-contracts/factories/ERC721.sol/IERC721Receiver__factory.ts b/erc20/types/ethers-contracts/factories/ERC721.sol/IERC721Receiver__factory.ts new file mode 100644 index 00000000..148b9147 --- /dev/null +++ b/erc20/types/ethers-contracts/factories/ERC721.sol/IERC721Receiver__factory.ts @@ -0,0 +1,54 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + + import { Contract, Interface, type ContractRunner } from "ethers"; + import type { IERC721Receiver, IERC721ReceiverInterface } from "../../ERC721.sol/IERC721Receiver.js"; + + const _abi = [ + { + "inputs": [ + { + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "onERC721Received", + "outputs": [ + { + "internalType": "bytes4", + "name": "", + "type": "bytes4" + } + ], + "stateMutability": "nonpayable", + "type": "function" + } +] as const; + + export class IERC721Receiver__factory { + static readonly abi = _abi; + static createInterface(): IERC721ReceiverInterface { + return new Interface(_abi) as IERC721ReceiverInterface; + } + static connect(address: string, runner?: ContractRunner | null): IERC721Receiver { + return new Contract(address, _abi, runner) as unknown as IERC721Receiver; + } + } + \ No newline at end of file diff --git a/erc20/types/ethers-contracts/factories/ERC721.sol/IERC721__factory.ts b/erc20/types/ethers-contracts/factories/ERC721.sol/IERC721__factory.ts new file mode 100644 index 00000000..550c6215 --- /dev/null +++ b/erc20/types/ethers-contracts/factories/ERC721.sol/IERC721__factory.ts @@ -0,0 +1,254 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + + import { Contract, Interface, type ContractRunner } from "ethers"; + import type { IERC721, IERC721Interface } from "../../ERC721.sol/IERC721.js"; + + const _abi = [ + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "approved", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "indexed": false, + "internalType": "bool", + "name": "approved", + "type": "bool" + } + ], + "name": "ApprovalForAll", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "getApproved", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "operator", + "type": "address" + } + ], + "name": "isApprovedForAll", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "ownerOf", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "internalType": "bool", + "name": "approved", + "type": "bool" + } + ], + "name": "setApprovalForAll", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } +] as const; + + export class IERC721__factory { + static readonly abi = _abi; + static createInterface(): IERC721Interface { + return new Interface(_abi) as IERC721Interface; + } + static connect(address: string, runner?: ContractRunner | null): IERC721 { + return new Contract(address, _abi, runner) as unknown as IERC721; + } + } + \ No newline at end of file diff --git a/erc20/types/ethers-contracts/factories/ERC721.sol/index.ts b/erc20/types/ethers-contracts/factories/ERC721.sol/index.ts new file mode 100644 index 00000000..9c210a63 --- /dev/null +++ b/erc20/types/ethers-contracts/factories/ERC721.sol/index.ts @@ -0,0 +1,8 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +export { ERC721__factory } from './ERC721__factory.js'; +export { IERC165__factory } from './IERC165__factory.js'; +export { IERC721__factory } from './IERC721__factory.js'; +export { IERC721Metadata__factory } from './IERC721Metadata__factory.js'; +export { IERC721Receiver__factory } from './IERC721Receiver__factory.js'; \ No newline at end of file diff --git a/erc20/types/ethers-contracts/factories/NFTmarketplace.sol/IERC721__factory.ts b/erc20/types/ethers-contracts/factories/NFTmarketplace.sol/IERC721__factory.ts new file mode 100644 index 00000000..d1f811a3 --- /dev/null +++ b/erc20/types/ethers-contracts/factories/NFTmarketplace.sol/IERC721__factory.ts @@ -0,0 +1,105 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + + import { Contract, Interface, type ContractRunner } from "ethers"; + import type { IERC721, IERC721Interface } from "../../NFTmarketplace.sol/IERC721.js"; + + const _abi = [ + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "getApproved", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "operator", + "type": "address" + } + ], + "name": "isApprovedForAll", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "ownerOf", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } +] as const; + + export class IERC721__factory { + static readonly abi = _abi; + static createInterface(): IERC721Interface { + return new Interface(_abi) as IERC721Interface; + } + static connect(address: string, runner?: ContractRunner | null): IERC721 { + return new Contract(address, _abi, runner) as unknown as IERC721; + } + } + \ No newline at end of file diff --git a/erc20/types/ethers-contracts/factories/NFTmarketplace.sol/NFTmarketplace__factory.ts b/erc20/types/ethers-contracts/factories/NFTmarketplace.sol/NFTmarketplace__factory.ts new file mode 100644 index 00000000..b5d40eff --- /dev/null +++ b/erc20/types/ethers-contracts/factories/NFTmarketplace.sol/NFTmarketplace__factory.ts @@ -0,0 +1,299 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { Addressable } from "ethers"; +import { Contract, ContractFactory, ContractTransactionResponse, Interface } from "ethers" +import type { Signer, AddressLike, ContractDeployTransaction, ContractRunner } from "ethers" +import type { NonPayableOverrides } from "../../common.js" + import type { NFTmarketplace, NFTmarketplaceInterface } from "../../NFTmarketplace.sol/NFTmarketplace.js"; + + const _abi = [ + { + "inputs": [ + { + "internalType": "address payable", + "name": "_treasury", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "buyer", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "nftAddress", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "price", + "type": "uint256" + } + ], + "name": "ItemBought", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "seller", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "nftAddress", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "price", + "type": "uint256" + } + ], + "name": "ItemListed", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "seller", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "nftAddress", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "ListingCancelled", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "nftAddress", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "buyNFT", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "nftAddress", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "cancelListing", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "feePercentage", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "nftAddress", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "price", + "type": "uint256" + } + ], + "name": "listNFT", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "listings", + "outputs": [ + { + "internalType": "address", + "name": "seller", + "type": "address" + }, + { + "internalType": "uint256", + "name": "price", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_newFee", + "type": "uint256" + } + ], + "name": "setFeePercentage", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "treasury", + "outputs": [ + { + "internalType": "address payable", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + } +] as const; + + const _bytecode = "0x608060405234801561000f575f5ffd5b506040516118aa3803806118aa83398181016040528101906100319190610124565b3360015f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508060025f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550601960038190555060015f819055505061014f565b5f5ffd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f6100f3826100ca565b9050919050565b610103816100e9565b811461010d575f5ffd5b50565b5f8151905061011e816100fa565b92915050565b5f60208284031215610139576101386100c6565b5b5f61014684828501610110565b91505092915050565b61174e8061015c5f395ff3fe608060405260043610610079575f3560e01c8063a82ba76f1161004d578063a82ba76f14610138578063ad05f1b414610154578063ae06c1b71461017c578063b2ddee06146101a457610079565b806207df301461007d57806361d027b3146100ba5780638da5cb5b146100e4578063a001ecdd1461010e575b5f5ffd5b348015610088575f5ffd5b506100a3600480360381019061009e9190610f55565b6101cc565b6040516100b1929190610fb1565b60405180910390f35b3480156100c5575f5ffd5b506100ce610216565b6040516100db9190610ff8565b60405180910390f35b3480156100ef575f5ffd5b506100f861023b565b6040516101059190611011565b60405180910390f35b348015610119575f5ffd5b50610122610260565b60405161012f919061102a565b60405180910390f35b610152600480360381019061014d9190610f55565b610266565b005b34801561015f575f5ffd5b5061017a60048036038101906101759190611043565b6106f6565b005b348015610187575f5ffd5b506101a2600480360381019061019d9190611093565b610b25565b005b3480156101af575f5ffd5b506101ca60048036038101906101c59190610f55565b610bbe565b005b6004602052815f5260405f20602052805f5260405f205f9150915050805f015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16908060010154905082565b60025f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60035481565b60025f54036102aa576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102a190611118565b60405180910390fd5b60025f819055505f60045f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8381526020019081526020015f206040518060400160405290815f82015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200160018201548152505090505f8160200151116103af576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103a690611180565b60405180910390fd5b80602001513410156103f6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103ed906111e8565b60405180910390fd5b5f6103e8600354346104089190611233565b61041291906112a1565b90505f813461042191906112d1565b905060045f8673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8581526020019081526020015f205f5f82015f6101000a81549073ffffffffffffffffffffffffffffffffffffffff0219169055600182015f905550508473ffffffffffffffffffffffffffffffffffffffff166323b872dd3033876040518463ffffffff1660e01b81526004016104db93929190611304565b5f604051808303815f87803b1580156104f2575f5ffd5b505af1158015610504573d5f5f3e3d5ffd5b505050505f60025f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168360405161054e90611366565b5f6040518083038185875af1925050503d805f8114610588576040519150601f19603f3d011682016040523d82523d5f602084013e61058d565b606091505b50509050806105d1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105c8906113c4565b60405180910390fd5b5f845f015173ffffffffffffffffffffffffffffffffffffffff16836040516105f990611366565b5f6040518083038185875af1925050503d805f8114610633576040519150601f19603f3d011682016040523d82523d5f602084013e610638565b606091505b505090508061067c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106739061142c565b60405180910390fd5b858773ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f263223b1dd81e51054a4e6f791d45a4a1ddb4aadcd93a2dfd892615c3fdac18788602001516040516106de919061102a565b60405180910390a4505050505060015f819055505050565b5f8111610738576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161072f90611494565b60405180910390fd5b5f8390503373ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16636352211e856040518263ffffffff1660e01b815260040161078c919061102a565b602060405180830381865afa1580156107a7573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906107cb91906114c6565b73ffffffffffffffffffffffffffffffffffffffff1614610821576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108189061153b565b60405180910390fd5b3073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1663081812fc856040518263ffffffff1660e01b8152600401610871919061102a565b602060405180830381865afa15801561088c573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906108b091906114c6565b73ffffffffffffffffffffffffffffffffffffffff16148061094857508073ffffffffffffffffffffffffffffffffffffffff1663e985e9c533306040518363ffffffff1660e01b8152600401610908929190611559565b602060405180830381865afa158015610923573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061094791906115b5565b5b610987576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161097e9061162a565b60405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff166323b872dd3330866040518463ffffffff1660e01b81526004016109c493929190611304565b5f604051808303815f87803b1580156109db575f5ffd5b505af11580156109ed573d5f5f3e3d5ffd5b5050505060405180604001604052803373ffffffffffffffffffffffffffffffffffffffff1681526020018381525060045f8673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8581526020019081526020015f205f820151815f015f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060208201518160010155905050828473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fd547e933094f12a9159076970143ebe73234e64480317844b0dcb36117116de485604051610b17919061102a565b60405180910390a450505050565b60015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610bb4576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610bab90611692565b60405180910390fd5b8060038190555050565b60025f5403610c02576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610bf990611118565b60405180910390fd5b60025f819055505f60045f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8381526020019081526020015f206040518060400160405290815f82015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200160018201548152505090505f816020015111610d07576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610cfe90611180565b60405180910390fd5b3373ffffffffffffffffffffffffffffffffffffffff16815f015173ffffffffffffffffffffffffffffffffffffffff1614610d78576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d6f906116fa565b60405180910390fd5b60045f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8381526020019081526020015f205f5f82015f6101000a81549073ffffffffffffffffffffffffffffffffffffffff0219169055600182015f905550508273ffffffffffffffffffffffffffffffffffffffff166323b872dd3033856040518463ffffffff1660e01b8152600401610e3093929190611304565b5f604051808303815f87803b158015610e47575f5ffd5b505af1158015610e59573d5f5f3e3d5ffd5b50505050818373ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fe1bfe61cb157e0896411ccf9a5c40e4c346f7bb6e1d2a44de4a724f0cb5c6fb060405160405180910390a45060015f819055505050565b5f5ffd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f610ef182610ec8565b9050919050565b610f0181610ee7565b8114610f0b575f5ffd5b50565b5f81359050610f1c81610ef8565b92915050565b5f819050919050565b610f3481610f22565b8114610f3e575f5ffd5b50565b5f81359050610f4f81610f2b565b92915050565b5f5f60408385031215610f6b57610f6a610ec4565b5b5f610f7885828601610f0e565b9250506020610f8985828601610f41565b9150509250929050565b610f9c81610ee7565b82525050565b610fab81610f22565b82525050565b5f604082019050610fc45f830185610f93565b610fd16020830184610fa2565b9392505050565b5f610fe282610ec8565b9050919050565b610ff281610fd8565b82525050565b5f60208201905061100b5f830184610fe9565b92915050565b5f6020820190506110245f830184610f93565b92915050565b5f60208201905061103d5f830184610fa2565b92915050565b5f5f5f6060848603121561105a57611059610ec4565b5b5f61106786828701610f0e565b935050602061107886828701610f41565b925050604061108986828701610f41565b9150509250925092565b5f602082840312156110a8576110a7610ec4565b5b5f6110b584828501610f41565b91505092915050565b5f82825260208201905092915050565b7f5265656e7472616e637947756172643a207265656e7472616e742063616c6c005f82015250565b5f611102601f836110be565b915061110d826110ce565b602082019050919050565b5f6020820190508181035f83015261112f816110f6565b9050919050565b7f4e6f74204c6973746564000000000000000000000000000000000000000000005f82015250565b5f61116a600a836110be565b915061117582611136565b602082019050919050565b5f6020820190508181035f8301526111978161115e565b9050919050565b7f496e73756666696369656e74207061796d656e740000000000000000000000005f82015250565b5f6111d26014836110be565b91506111dd8261119e565b602082019050919050565b5f6020820190508181035f8301526111ff816111c6565b9050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f61123d82610f22565b915061124883610f22565b925082820261125681610f22565b9150828204841483151761126d5761126c611206565b5b5092915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601260045260245ffd5b5f6112ab82610f22565b91506112b683610f22565b9250826112c6576112c5611274565b5b828204905092915050565b5f6112db82610f22565b91506112e683610f22565b92508282039050818111156112fe576112fd611206565b5b92915050565b5f6060820190506113175f830186610f93565b6113246020830185610f93565b6113316040830184610fa2565b949350505050565b5f81905092915050565b50565b5f6113515f83611339565b915061135c82611343565b5f82019050919050565b5f61137082611346565b9150819050919050565b7f5472656173757279207472616e73666572206661696c656400000000000000005f82015250565b5f6113ae6018836110be565b91506113b98261137a565b602082019050919050565b5f6020820190508181035f8301526113db816113a2565b9050919050565b7f53656c6c6572207472616e73666572206661696c6564000000000000000000005f82015250565b5f6114166016836110be565b9150611421826113e2565b602082019050919050565b5f6020820190508181035f8301526114438161140a565b9050919050565b7f5072696365206d757374206265203e20300000000000000000000000000000005f82015250565b5f61147e6011836110be565b91506114898261144a565b602082019050919050565b5f6020820190508181035f8301526114ab81611472565b9050919050565b5f815190506114c081610ef8565b92915050565b5f602082840312156114db576114da610ec4565b5b5f6114e8848285016114b2565b91505092915050565b7f4e6f7420746865206f776e6572000000000000000000000000000000000000005f82015250565b5f611525600d836110be565b9150611530826114f1565b602082019050919050565b5f6020820190508181035f83015261155281611519565b9050919050565b5f60408201905061156c5f830185610f93565b6115796020830184610f93565b9392505050565b5f8115159050919050565b61159481611580565b811461159e575f5ffd5b50565b5f815190506115af8161158b565b92915050565b5f602082840312156115ca576115c9610ec4565b5b5f6115d7848285016115a1565b91505092915050565b7f4d61726b6574706c616365206e6f7420617070726f76656400000000000000005f82015250565b5f6116146018836110be565b915061161f826115e0565b602082019050919050565b5f6020820190508181035f83015261164181611608565b9050919050565b7f4f6e6c79206f776e65722063616e2063616c6c207468697300000000000000005f82015250565b5f61167c6018836110be565b915061168782611648565b602082019050919050565b5f6020820190508181035f8301526116a981611670565b9050919050565b7f4e6f74207468652073656c6c65657200000000000000000000000000000000005f82015250565b5f6116e4600f836110be565b91506116ef826116b0565b602082019050919050565b5f6020820190508181035f830152611711816116d8565b905091905056fea2646970667358221220bb3dd23105af54b1747502a86e650b06f226a8c33ec2054d5176e2dd1c99f2bb64736f6c634300081c0033"; + + + type NFTmarketplaceConstructorParams = [signer?: Signer] | ConstructorParameters; + + const isSuperArgs = (xs: NFTmarketplaceConstructorParams): xs is ConstructorParameters => + xs.length > 1 + + + export class NFTmarketplace__factory extends ContractFactory { + + constructor(...args: NFTmarketplaceConstructorParams) { + if (isSuperArgs(args)) { + super(...args); + } else { + super(_abi, _bytecode, args[0]); + } + + } + + override getDeployTransaction(_treasury: AddressLike, overrides?: NonPayableOverrides & { from?: string }): Promise { + return super.getDeployTransaction(_treasury, overrides || {}); + }; + override deploy(_treasury: AddressLike, overrides?: NonPayableOverrides & { from?: string }) { + return super.deploy(_treasury, overrides || {}) as Promise; + } + override connect(runner: ContractRunner | null): NFTmarketplace__factory { + return super.connect(runner) as NFTmarketplace__factory; + } + + + static readonly bytecode = _bytecode; + static readonly abi = _abi; + static createInterface(): NFTmarketplaceInterface { + return new Interface(_abi) as NFTmarketplaceInterface; + } + + override attach(address: string | Addressable): NFTmarketplace { + return super.attach(address) as NFTmarketplace; + } + static connect(address: string, runner?: ContractRunner | null): NFTmarketplace { + return new Contract(address, _abi, runner) as unknown as NFTmarketplace; + } + } + + + \ No newline at end of file diff --git a/erc20/types/ethers-contracts/factories/NFTmarketplace.sol/index.ts b/erc20/types/ethers-contracts/factories/NFTmarketplace.sol/index.ts new file mode 100644 index 00000000..b26f978d --- /dev/null +++ b/erc20/types/ethers-contracts/factories/NFTmarketplace.sol/index.ts @@ -0,0 +1,5 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +export { IERC721__factory } from './IERC721__factory.js'; +export { NFTmarketplace__factory } from './NFTmarketplace__factory.js'; \ No newline at end of file diff --git a/erc20/types/ethers-contracts/factories/index.ts b/erc20/types/ethers-contracts/factories/index.ts new file mode 100644 index 00000000..08a67c4d --- /dev/null +++ b/erc20/types/ethers-contracts/factories/index.ts @@ -0,0 +1,7 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +export * as erc721Sol from './ERC721.sol/index.js'; +export * as nfTmarketplaceSol from './NFTmarketplace.sol/index.js'; +export { Counter__factory } from './Counter__factory.js'; +export { ERC20__factory } from './ERC20__factory.js'; \ No newline at end of file diff --git a/erc20/types/ethers-contracts/hardhat.d.ts b/erc20/types/ethers-contracts/hardhat.d.ts new file mode 100644 index 00000000..d3101fa3 --- /dev/null +++ b/erc20/types/ethers-contracts/hardhat.d.ts @@ -0,0 +1,79 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + + +import { ethers } from 'ethers' +import { DeployContractOptions, FactoryOptions, HardhatEthersHelpers as HardhatEthersHelpersBase} from "@nomicfoundation/hardhat-ethers/types"; + +import * as Contracts from "./index.js"; + +declare module "@nomicfoundation/hardhat-ethers/types" { + interface HardhatEthersHelpers extends HardhatEthersHelpersBase { + getContractFactory(name: 'Counter', signerOrOptions?: ethers.Signer | FactoryOptions): Promise +getContractFactory(name: 'ERC20', signerOrOptions?: ethers.Signer | FactoryOptions): Promise +getContractFactory(name: 'ERC721', signerOrOptions?: ethers.Signer | FactoryOptions): Promise +getContractFactory(name: 'IERC165', signerOrOptions?: ethers.Signer | FactoryOptions): Promise +getContractFactory(name: 'IERC721', signerOrOptions?: ethers.Signer | FactoryOptions): Promise +getContractFactory(name: 'IERC721Metadata', signerOrOptions?: ethers.Signer | FactoryOptions): Promise +getContractFactory(name: 'IERC721Receiver', signerOrOptions?: ethers.Signer | FactoryOptions): Promise +getContractFactory(name: 'IERC721', signerOrOptions?: ethers.Signer | FactoryOptions): Promise +getContractFactory(name: 'NFTmarketplace', signerOrOptions?: ethers.Signer | FactoryOptions): Promise + + getContractAt(name: 'Counter', address: string | ethers.Addressable, signer?: ethers.Signer): Promise +getContractAt(name: 'ERC20', address: string | ethers.Addressable, signer?: ethers.Signer): Promise +getContractAt(name: 'ERC721', address: string | ethers.Addressable, signer?: ethers.Signer): Promise +getContractAt(name: 'IERC165', address: string | ethers.Addressable, signer?: ethers.Signer): Promise +getContractAt(name: 'IERC721', address: string | ethers.Addressable, signer?: ethers.Signer): Promise +getContractAt(name: 'IERC721Metadata', address: string | ethers.Addressable, signer?: ethers.Signer): Promise +getContractAt(name: 'IERC721Receiver', address: string | ethers.Addressable, signer?: ethers.Signer): Promise +getContractAt(name: 'IERC721', address: string | ethers.Addressable, signer?: ethers.Signer): Promise +getContractAt(name: 'NFTmarketplace', address: string | ethers.Addressable, signer?: ethers.Signer): Promise + + deployContract(name: 'Counter', signerOrOptions?: ethers.Signer | DeployContractOptions): Promise +deployContract(name: 'ERC20', signerOrOptions?: ethers.Signer | DeployContractOptions): Promise +deployContract(name: 'ERC721', signerOrOptions?: ethers.Signer | DeployContractOptions): Promise +deployContract(name: 'IERC165', signerOrOptions?: ethers.Signer | DeployContractOptions): Promise +deployContract(name: 'IERC721', signerOrOptions?: ethers.Signer | DeployContractOptions): Promise +deployContract(name: 'IERC721Metadata', signerOrOptions?: ethers.Signer | DeployContractOptions): Promise +deployContract(name: 'IERC721Receiver', signerOrOptions?: ethers.Signer | DeployContractOptions): Promise +deployContract(name: 'IERC721', signerOrOptions?: ethers.Signer | DeployContractOptions): Promise +deployContract(name: 'NFTmarketplace', signerOrOptions?: ethers.Signer | DeployContractOptions): Promise + + deployContract(name: 'Counter', args: any[], signerOrOptions?: ethers.Signer | DeployContractOptions): Promise +deployContract(name: 'ERC20', args: any[], signerOrOptions?: ethers.Signer | DeployContractOptions): Promise +deployContract(name: 'ERC721', args: any[], signerOrOptions?: ethers.Signer | DeployContractOptions): Promise +deployContract(name: 'IERC165', args: any[], signerOrOptions?: ethers.Signer | DeployContractOptions): Promise +deployContract(name: 'IERC721', args: any[], signerOrOptions?: ethers.Signer | DeployContractOptions): Promise +deployContract(name: 'IERC721Metadata', args: any[], signerOrOptions?: ethers.Signer | DeployContractOptions): Promise +deployContract(name: 'IERC721Receiver', args: any[], signerOrOptions?: ethers.Signer | DeployContractOptions): Promise +deployContract(name: 'IERC721', args: any[], signerOrOptions?: ethers.Signer | DeployContractOptions): Promise +deployContract(name: 'NFTmarketplace', args: any[], signerOrOptions?: ethers.Signer | DeployContractOptions): Promise + + // default types + getContractFactory( + name: string, + signerOrOptions?: ethers.Signer | FactoryOptions + ): Promise; + getContractFactory( + abi: any[], + bytecode: ethers.BytesLike, + signer?: ethers.Signer + ): Promise; + getContractAt( + nameOrAbi: string | any[], + address: string | ethers.Addressable, + signer?: ethers.Signer + ): Promise; + deployContract( + name: string, + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + deployContract( + name: string, + args: any[], + signerOrOptions?: ethers.Signer | DeployContractOptions + ): Promise; + } +} + \ No newline at end of file diff --git a/erc20/types/ethers-contracts/index.ts b/erc20/types/ethers-contracts/index.ts new file mode 100644 index 00000000..13ee0a6a --- /dev/null +++ b/erc20/types/ethers-contracts/index.ts @@ -0,0 +1,24 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type * as erc721Sol from './ERC721.sol/index.js'; +export type { erc721Sol }; +import type * as nfTmarketplaceSol from './NFTmarketplace.sol/index.js'; +export type { nfTmarketplaceSol }; +export type { Counter } from './Counter.js'; +export type { ERC20 } from './ERC20.js'; +export * as factories from './factories/index.js'; +export { Counter__factory } from './factories/Counter__factory.js'; +export { ERC20__factory } from './factories/ERC20__factory.js'; +export type { ERC721 } from './ERC721.sol/ERC721.js'; +export { ERC721__factory } from './factories/ERC721.sol/ERC721__factory.js'; +export type { IERC165 } from './ERC721.sol/IERC165.js'; +export { IERC165__factory } from './factories/ERC721.sol/IERC165__factory.js'; +export type { IERC721 } from './ERC721.sol/IERC721.js'; +export { IERC721__factory } from './factories/ERC721.sol/IERC721__factory.js'; +export type { IERC721Metadata } from './ERC721.sol/IERC721Metadata.js'; +export { IERC721Metadata__factory } from './factories/ERC721.sol/IERC721Metadata__factory.js'; +export type { IERC721Receiver } from './ERC721.sol/IERC721Receiver.js'; +export { IERC721Receiver__factory } from './factories/ERC721.sol/IERC721Receiver__factory.js'; +export type { NFTmarketplace } from './NFTmarketplace.sol/NFTmarketplace.js'; +export { NFTmarketplace__factory } from './factories/NFTmarketplace.sol/NFTmarketplace__factory.js'; \ No newline at end of file