From 8dbb70328a4e7ed7b4cd077b30c0ca9521d36b1e Mon Sep 17 00:00:00 2001 From: Juraj Piar Date: Fri, 31 Dec 2021 13:01:28 +0000 Subject: [PATCH] fix: makes types and abi available to publish --- .gitignore | 2 - ERC677Data.json | 1 + package-lock.json | 6 +- package.json | 6 +- types/ethers-contracts/ERC677Data.d.ts | 249 ++++++++++++ types/ethers-contracts/ERC677DataFactory.ts | 421 ++++++++++++++++++++ types/ethers-contracts/index.d.ts | 28 ++ types/truffle-contracts/index.d.ts | 183 +++++++++ types/truffle-contracts/merge.d.ts | 14 + types/web3-v1-contracts/ERC677Data.d.ts | 92 +++++ types/web3-v1-contracts/types.d.ts | 65 +++ types/web3-v2-contracts/ERC677Data.d.ts | 86 ++++ types/web3-v2-contracts/types.d.ts | 32 ++ 13 files changed, 1177 insertions(+), 8 deletions(-) create mode 100644 ERC677Data.json create mode 100644 types/ethers-contracts/ERC677Data.d.ts create mode 100644 types/ethers-contracts/ERC677DataFactory.ts create mode 100644 types/ethers-contracts/index.d.ts create mode 100644 types/truffle-contracts/index.d.ts create mode 100644 types/truffle-contracts/merge.d.ts create mode 100644 types/web3-v1-contracts/ERC677Data.d.ts create mode 100644 types/web3-v1-contracts/types.d.ts create mode 100644 types/web3-v2-contracts/ERC677Data.d.ts create mode 100644 types/web3-v2-contracts/types.d.ts diff --git a/.gitignore b/.gitignore index a712860..7a6a7f3 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,4 @@ node_modules/ build/ -ERC677Data.json -types/ coverage coverage.json diff --git a/ERC677Data.json b/ERC677Data.json new file mode 100644 index 0000000..9dfe1b3 --- /dev/null +++ b/ERC677Data.json @@ -0,0 +1 @@ +{"abi":[{"inputs":[{"internalType":"address","name":"initialAccount","type":"address"},{"internalType":"uint256","name":"initialBalance","type":"uint256"},{"internalType":"string","name":"tokenName","type":"string"},{"internalType":"string","name":"tokenSymbol","type":"string"}],"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"},{"indexed":false,"internalType":"bytes","name":"data","type":"bytes"}],"name":"Transfer","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":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"subtractedValue","type":"uint256"}],"name":"decreaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"addedValue","type":"uint256"}],"name":"increaseAllowance","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":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"transferAndCall","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"}],"bytecode":"0x60806040523480156200001157600080fd5b5060405162001f0238038062001f02833981810160405281019062000037919062000343565b8181816003908051906020019062000051929190620001f3565b5080600490805190602001906200006a929190620001f3565b5050506200007f84846200008960201b60201c565b5050505062000700565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415620000fc576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401620000f39062000419565b60405180910390fd5b6200011060008383620001ee60201b60201c565b8060026000828254620001249190620004c8565b92505081905550806000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546200017b9190620004c8565b925050819055508173ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef83604051620001e291906200043b565b60405180910390a35050565b505050565b828054620002019062000599565b90600052602060002090601f01602090048101928262000225576000855562000271565b82601f106200024057805160ff191683800117855562000271565b8280016001018555821562000271579182015b828111156200027057825182559160200191906001019062000253565b5b50905062000280919062000284565b5090565b5b808211156200029f57600081600090555060010162000285565b5090565b6000620002ba620002b48462000481565b62000458565b905082815260208101848484011115620002d357600080fd5b620002e084828562000563565b509392505050565b600081519050620002f981620006cc565b92915050565b600082601f8301126200031157600080fd5b815162000323848260208601620002a3565b91505092915050565b6000815190506200033d81620006e6565b92915050565b600080600080608085870312156200035a57600080fd5b60006200036a87828801620002e8565b94505060206200037d878288016200032c565b935050604085015167ffffffffffffffff8111156200039b57600080fd5b620003a987828801620002ff565b925050606085015167ffffffffffffffff811115620003c757600080fd5b620003d587828801620002ff565b91505092959194509250565b6000620003f0601f83620004b7565b9150620003fd82620006a3565b602082019050919050565b620004138162000559565b82525050565b600060208201905081810360008301526200043481620003e1565b9050919050565b600060208201905062000452600083018462000408565b92915050565b60006200046462000477565b9050620004728282620005cf565b919050565b6000604051905090565b600067ffffffffffffffff8211156200049f576200049e62000663565b5b620004aa8262000692565b9050602081019050919050565b600082825260208201905092915050565b6000620004d58262000559565b9150620004e28362000559565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff038211156200051a576200051962000605565b5b828201905092915050565b6000620005328262000539565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b60005b838110156200058357808201518184015260208101905062000566565b8381111562000593576000848401525b50505050565b60006002820490506001821680620005b257607f821691505b60208210811415620005c957620005c862000634565b5b50919050565b620005da8262000692565b810181811067ffffffffffffffff82111715620005fc57620005fb62000663565b5b80604052505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6000601f19601f8301169050919050565b7f45524332303a206d696e7420746f20746865207a65726f206164647265737300600082015250565b620006d78162000525565b8114620006e357600080fd5b50565b620006f18162000559565b8114620006fd57600080fd5b50565b6117f280620007106000396000f3fe608060405234801561001057600080fd5b50600436106100b45760003560e01c80634000aea0116100715780634000aea0146101a357806370a08231146101d357806395d89b4114610203578063a457c2d714610221578063a9059cbb14610251578063dd62ed3e14610281576100b4565b806306fdde03146100b9578063095ea7b3146100d757806318160ddd1461010757806323b872dd14610125578063313ce567146101555780633950935114610173575b600080fd5b6100c16102b1565b6040516100ce9190611136565b60405180910390f35b6100f160048036038101906100ec9190610e6e565b610343565b6040516100fe919061111b565b60405180910390f35b61010f610361565b60405161011c9190611238565b60405180910390f35b61013f600480360381019061013a9190610e1f565b61036b565b60405161014c919061111b565b60405180910390f35b61015d61046c565b60405161016a9190611283565b60405180910390f35b61018d60048036038101906101889190610e6e565b610475565b60405161019a919061111b565b60405180910390f35b6101bd60048036038101906101b89190610eaa565b610521565b6040516101ca919061111b565b60405180910390f35b6101ed60048036038101906101e89190610dba565b610649565b6040516101fa9190611238565b60405180910390f35b61020b610691565b6040516102189190611136565b60405180910390f35b61023b60048036038101906102369190610e6e565b610723565b604051610248919061111b565b60405180910390f35b61026b60048036038101906102669190610e6e565b610817565b604051610278919061111b565b60405180910390f35b61029b60048036038101906102969190610de3565b610835565b6040516102a89190611238565b60405180910390f35b6060600380546102c09061144d565b80601f01602080910402602001604051908101604052809291908181526020018280546102ec9061144d565b80156103395780601f1061030e57610100808354040283529160200191610339565b820191906000526020600020905b81548152906001019060200180831161031c57829003601f168201915b5050505050905090565b60006103576103506108bc565b84846108c4565b6001905092915050565b6000600254905090565b6000610378848484610a8f565b6000600160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006103c36108bc565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905082811015610443576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161043a906111b8565b60405180910390fd5b6104608561044f6108bc565b858461045b9190611382565b6108c4565b60019150509392505050565b60006012905090565b60006105176104826108bc565b8484600160006104906108bc565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610512919061132c565b6108c4565b6001905092915050565b60008061052e8585610817565b90508061053f576000915050610642565b8473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fe19260aff97b920c7df27010903aeb9c8d2be5d310a2c67824cf3f15396e4c16868660405161059e929190611253565b60405180910390a360008590508073ffffffffffffffffffffffffffffffffffffffff1663c0ee0b8a3387876040518463ffffffff1660e01b81526004016105e8939291906110dd565b602060405180830381600087803b15801561060257600080fd5b505af1158015610616573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061063a9190610f11565b506001925050505b9392505050565b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b6060600480546106a09061144d565b80601f01602080910402602001604051908101604052809291908181526020018280546106cc9061144d565b80156107195780601f106106ee57610100808354040283529160200191610719565b820191906000526020600020905b8154815290600101906020018083116106fc57829003601f168201915b5050505050905090565b600080600160006107326108bc565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050828110156107ef576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107e690611218565b60405180910390fd5b61080c6107fa6108bc565b8585846108079190611382565b6108c4565b600191505092915050565b600061082b6108246108bc565b8484610a8f565b6001905092915050565b6000600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610934576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161092b906111f8565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156109a4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161099b90611178565b60405180910390fd5b80600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92583604051610a829190611238565b60405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610aff576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610af6906111d8565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610b6f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b6690611158565b60405180910390fd5b610b7a838383610d0e565b60008060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905081811015610c00576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610bf790611198565b60405180910390fd5b8181610c0c9190611382565b6000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550816000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254610c9c919061132c565b925050819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef84604051610d009190611238565b60405180910390a350505050565b505050565b6000610d26610d21846112c3565b61129e565b905082815260208101848484011115610d3e57600080fd5b610d4984828561140b565b509392505050565b600081359050610d6081611777565b92915050565b600081519050610d758161178e565b92915050565b600082601f830112610d8c57600080fd5b8135610d9c848260208601610d13565b91505092915050565b600081359050610db4816117a5565b92915050565b600060208284031215610dcc57600080fd5b6000610dda84828501610d51565b91505092915050565b60008060408385031215610df657600080fd5b6000610e0485828601610d51565b9250506020610e1585828601610d51565b9150509250929050565b600080600060608486031215610e3457600080fd5b6000610e4286828701610d51565b9350506020610e5386828701610d51565b9250506040610e6486828701610da5565b9150509250925092565b60008060408385031215610e8157600080fd5b6000610e8f85828601610d51565b9250506020610ea085828601610da5565b9150509250929050565b600080600060608486031215610ebf57600080fd5b6000610ecd86828701610d51565b9350506020610ede86828701610da5565b925050604084013567ffffffffffffffff811115610efb57600080fd5b610f0786828701610d7b565b9150509250925092565b600060208284031215610f2357600080fd5b6000610f3184828501610d66565b91505092915050565b610f43816113b6565b82525050565b610f52816113c8565b82525050565b6000610f63826112f4565b610f6d818561130a565b9350610f7d81856020860161141a565b610f868161153d565b840191505092915050565b6000610f9c826112ff565b610fa6818561131b565b9350610fb681856020860161141a565b610fbf8161153d565b840191505092915050565b6000610fd760238361131b565b9150610fe28261154e565b604082019050919050565b6000610ffa60228361131b565b91506110058261159d565b604082019050919050565b600061101d60268361131b565b9150611028826115ec565b604082019050919050565b600061104060288361131b565b915061104b8261163b565b604082019050919050565b600061106360258361131b565b915061106e8261168a565b604082019050919050565b600061108660248361131b565b9150611091826116d9565b604082019050919050565b60006110a960258361131b565b91506110b482611728565b604082019050919050565b6110c8816113f4565b82525050565b6110d7816113fe565b82525050565b60006060820190506110f26000830186610f3a565b6110ff60208301856110bf565b81810360408301526111118184610f58565b9050949350505050565b60006020820190506111306000830184610f49565b92915050565b600060208201905081810360008301526111508184610f91565b905092915050565b6000602082019050818103600083015261117181610fca565b9050919050565b6000602082019050818103600083015261119181610fed565b9050919050565b600060208201905081810360008301526111b181611010565b9050919050565b600060208201905081810360008301526111d181611033565b9050919050565b600060208201905081810360008301526111f181611056565b9050919050565b6000602082019050818103600083015261121181611079565b9050919050565b600060208201905081810360008301526112318161109c565b9050919050565b600060208201905061124d60008301846110bf565b92915050565b600060408201905061126860008301856110bf565b818103602083015261127a8184610f58565b90509392505050565b600060208201905061129860008301846110ce565b92915050565b60006112a86112b9565b90506112b4828261147f565b919050565b6000604051905090565b600067ffffffffffffffff8211156112de576112dd61150e565b5b6112e78261153d565b9050602081019050919050565b600081519050919050565b600081519050919050565b600082825260208201905092915050565b600082825260208201905092915050565b6000611337826113f4565b9150611342836113f4565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff03821115611377576113766114b0565b5b828201905092915050565b600061138d826113f4565b9150611398836113f4565b9250828210156113ab576113aa6114b0565b5b828203905092915050565b60006113c1826113d4565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b82818337600083830152505050565b60005b8381101561143857808201518184015260208101905061141d565b83811115611447576000848401525b50505050565b6000600282049050600182168061146557607f821691505b60208210811415611479576114786114df565b5b50919050565b6114888261153d565b810181811067ffffffffffffffff821117156114a7576114a661150e565b5b80604052505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6000601f19601f8301169050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a207472616e7366657220616d6f756e742065786365656473206260008201527f616c616e63650000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a207472616e7366657220616d6f756e742065786365656473206160008201527f6c6c6f77616e6365000000000000000000000000000000000000000000000000602082015250565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f7760008201527f207a65726f000000000000000000000000000000000000000000000000000000602082015250565b611780816113b6565b811461178b57600080fd5b50565b611797816113c8565b81146117a257600080fd5b50565b6117ae816113f4565b81146117b957600080fd5b5056fea2646970667358221220d700057c7ecb59c53ec48d5a77fd48bc25503d636c8b21a10bd71f6e033b9f8964736f6c63430008030033","address":{"rskMainnet":"0x2acc95758f8b5f583470ba265eb685a8f45fc9d5","rskTestnet":"0x19f64674D8a5b4e652319F5e239EFd3bc969a1FE"}} \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index 4f9ca8c..7a52db2 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@rsksmart/erc677", - "version": "2.0.0", + "version": "2.0.1", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@rsksmart/erc677", - "version": "2.0.0", + "version": "2.0.1", "license": "MIT", "dependencies": { "@openzeppelin/contracts": "^4.0.0" @@ -42892,4 +42892,4 @@ } } } -} +} \ No newline at end of file diff --git a/package.json b/package.json index 90c4e3b..0c03aca 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@rsksmart/erc677", - "version": "2.0.0", + "version": "2.0.1", "description": "ERC-677 Token Implementation", "files": [ "/contracts", @@ -13,7 +13,7 @@ "coverage": "npx truffle run coverage", "lint": "npx prettier --list-different 'contracts/**/*.sol' 'test/**/*.test.js'", "lint:fix": "npx prettier --write 'contracts/**/*.sol' 'test/**/*.test.js'", - "prepublish": "npx truffle compile && node ./datagen.js && npm run types-generation", + "prepublish": "npx truffle compile", "types-generation": "typechain --target=web3-v1 '*Data.json' && typechain --target=web3-v2 '*Data.json' && typechain --target=truffle '*Data.json' && typechain --target=ethers '*Data.json'" }, "repository": { @@ -45,4 +45,4 @@ "typechain-target-web3-v1": "^1.0.4", "typechain-target-web3-v2": "^1.0.0" } -} +} \ No newline at end of file diff --git a/types/ethers-contracts/ERC677Data.d.ts b/types/ethers-contracts/ERC677Data.d.ts new file mode 100644 index 0000000..6f235ae --- /dev/null +++ b/types/ethers-contracts/ERC677Data.d.ts @@ -0,0 +1,249 @@ +/* Generated by ts-generator ver. 0.0.8 */ +/* tslint:disable */ + +import { Contract, ContractTransaction, EventFilter, Signer } from "ethers"; +import { Listener, Provider } from "ethers/providers"; +import { Arrayish, BigNumber, BigNumberish, Interface } from "ethers/utils"; +import { + TransactionOverrides, + TypedEventDescription, + TypedFunctionDescription +} from "."; + +interface ERC677DataInterface extends Interface { + functions: { + allowance: TypedFunctionDescription<{ + encode([owner, spender]: [string, string]): string; + }>; + + approve: TypedFunctionDescription<{ + encode([spender, amount]: [string, BigNumberish]): string; + }>; + + balanceOf: TypedFunctionDescription<{ + encode([account]: [string]): string; + }>; + + decimals: TypedFunctionDescription<{ encode([]: []): string }>; + + decreaseAllowance: TypedFunctionDescription<{ + encode([spender, subtractedValue]: [string, BigNumberish]): string; + }>; + + increaseAllowance: TypedFunctionDescription<{ + encode([spender, addedValue]: [string, BigNumberish]): string; + }>; + + name: TypedFunctionDescription<{ encode([]: []): string }>; + + symbol: TypedFunctionDescription<{ encode([]: []): string }>; + + totalSupply: TypedFunctionDescription<{ encode([]: []): string }>; + + transfer: TypedFunctionDescription<{ + encode([recipient, amount]: [string, BigNumberish]): string; + }>; + + transferFrom: TypedFunctionDescription<{ + encode([sender, recipient, amount]: [ + string, + string, + BigNumberish + ]): string; + }>; + + transferAndCall: TypedFunctionDescription<{ + encode([to, value, data]: [string, BigNumberish, Arrayish]): string; + }>; + }; + + events: { + Approval: TypedEventDescription<{ + encodeTopics([owner, spender, value]: [ + string | null, + string | null, + null + ]): string[]; + }>; + + Transfer: TypedEventDescription<{ + encodeTopics([from, to, value, data]: [ + string | null, + string | null, + null, + null + ]): string[]; + }>; + }; +} + +export class ERC677Data extends Contract { + connect(signerOrProvider: Signer | Provider | string): ERC677Data; + attach(addressOrName: string): ERC677Data; + deployed(): Promise; + + on(event: EventFilter | string, listener: Listener): ERC677Data; + once(event: EventFilter | string, listener: Listener): ERC677Data; + addListener(eventName: EventFilter | string, listener: Listener): ERC677Data; + removeAllListeners(eventName: EventFilter | string): ERC677Data; + removeListener(eventName: any, listener: Listener): ERC677Data; + + interface: ERC677DataInterface; + + functions: { + allowance(owner: string, spender: string): Promise; + + approve( + spender: string, + amount: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + balanceOf(account: string): Promise; + + decimals(): Promise; + + decreaseAllowance( + spender: string, + subtractedValue: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + increaseAllowance( + spender: string, + addedValue: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + name(): Promise; + + symbol(): Promise; + + totalSupply(): Promise; + + transfer( + recipient: string, + amount: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + transferFrom( + sender: string, + recipient: string, + amount: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + transferAndCall( + to: string, + value: BigNumberish, + data: Arrayish, + overrides?: TransactionOverrides + ): Promise; + }; + + allowance(owner: string, spender: string): Promise; + + approve( + spender: string, + amount: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + balanceOf(account: string): Promise; + + decimals(): Promise; + + decreaseAllowance( + spender: string, + subtractedValue: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + increaseAllowance( + spender: string, + addedValue: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + name(): Promise; + + symbol(): Promise; + + totalSupply(): Promise; + + transfer( + recipient: string, + amount: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + transferFrom( + sender: string, + recipient: string, + amount: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + transferAndCall( + to: string, + value: BigNumberish, + data: Arrayish, + overrides?: TransactionOverrides + ): Promise; + + filters: { + Approval( + owner: string | null, + spender: string | null, + value: null + ): EventFilter; + + Transfer( + from: string | null, + to: string | null, + value: null, + data: null + ): EventFilter; + }; + + estimate: { + allowance(owner: string, spender: string): Promise; + + approve(spender: string, amount: BigNumberish): Promise; + + balanceOf(account: string): Promise; + + decimals(): Promise; + + decreaseAllowance( + spender: string, + subtractedValue: BigNumberish + ): Promise; + + increaseAllowance( + spender: string, + addedValue: BigNumberish + ): Promise; + + name(): Promise; + + symbol(): Promise; + + totalSupply(): Promise; + + transfer(recipient: string, amount: BigNumberish): Promise; + + transferFrom( + sender: string, + recipient: string, + amount: BigNumberish + ): Promise; + + transferAndCall( + to: string, + value: BigNumberish, + data: Arrayish + ): Promise; + }; +} diff --git a/types/ethers-contracts/ERC677DataFactory.ts b/types/ethers-contracts/ERC677DataFactory.ts new file mode 100644 index 0000000..217d679 --- /dev/null +++ b/types/ethers-contracts/ERC677DataFactory.ts @@ -0,0 +1,421 @@ +/* Generated by ts-generator ver. 0.0.8 */ +/* tslint:disable */ + +import { Contract, ContractFactory, Signer } from "ethers"; +import { Provider } from "ethers/providers"; +import { UnsignedTransaction } from "ethers/utils/transaction"; +import { BigNumberish } from "ethers/utils"; + +import { TransactionOverrides } from "."; +import { ERC677Data } from "./ERC677Data"; + +export class ERC677DataFactory extends ContractFactory { + constructor(signer?: Signer) { + super(_abi, _bytecode, signer); + } + + deploy( + initialAccount: string, + initialBalance: BigNumberish, + tokenName: string, + tokenSymbol: string, + overrides?: TransactionOverrides + ): Promise { + return super.deploy( + initialAccount, + initialBalance, + tokenName, + tokenSymbol, + overrides + ) as Promise; + } + getDeployTransaction( + initialAccount: string, + initialBalance: BigNumberish, + tokenName: string, + tokenSymbol: string, + overrides?: TransactionOverrides + ): UnsignedTransaction { + return super.getDeployTransaction( + initialAccount, + initialBalance, + tokenName, + tokenSymbol, + overrides + ); + } + attach(address: string): ERC677Data { + return super.attach(address) as ERC677Data; + } + connect(signer: Signer): ERC677DataFactory { + return super.connect(signer) as ERC677DataFactory; + } + static connect( + address: string, + signerOrProvider: Signer | Provider + ): ERC677Data { + return new Contract(address, _abi, signerOrProvider) as ERC677Data; + } +} + +const _abi = [ + { + inputs: [ + { + internalType: "address", + name: "initialAccount", + type: "address" + }, + { + internalType: "uint256", + name: "initialBalance", + type: "uint256" + }, + { + internalType: "string", + name: "tokenName", + type: "string" + }, + { + internalType: "string", + name: "tokenSymbol", + type: "string" + } + ], + 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" + }, + { + indexed: false, + internalType: "bytes", + name: "data", + type: "bytes" + } + ], + name: "Transfer", + 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: "uint8", + name: "", + type: "uint8" + } + ], + stateMutability: "view", + type: "function" + }, + { + inputs: [ + { + internalType: "address", + name: "spender", + type: "address" + }, + { + internalType: "uint256", + name: "subtractedValue", + type: "uint256" + } + ], + name: "decreaseAllowance", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool" + } + ], + stateMutability: "nonpayable", + type: "function" + }, + { + inputs: [ + { + internalType: "address", + name: "spender", + type: "address" + }, + { + internalType: "uint256", + name: "addedValue", + type: "uint256" + } + ], + name: "increaseAllowance", + 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: "recipient", + type: "address" + }, + { + internalType: "uint256", + name: "amount", + type: "uint256" + } + ], + name: "transfer", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool" + } + ], + stateMutability: "nonpayable", + type: "function" + }, + { + inputs: [ + { + internalType: "address", + name: "sender", + type: "address" + }, + { + internalType: "address", + name: "recipient", + type: "address" + }, + { + internalType: "uint256", + name: "amount", + type: "uint256" + } + ], + name: "transferFrom", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool" + } + ], + stateMutability: "nonpayable", + type: "function" + }, + { + inputs: [ + { + internalType: "address", + name: "to", + type: "address" + }, + { + internalType: "uint256", + name: "value", + type: "uint256" + }, + { + internalType: "bytes", + name: "data", + type: "bytes" + } + ], + name: "transferAndCall", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool" + } + ], + stateMutability: "nonpayable", + type: "function" + } +]; + +const _bytecode = + "0x60806040523480156200001157600080fd5b5060405162001f0238038062001f02833981810160405281019062000037919062000343565b8181816003908051906020019062000051929190620001f3565b5080600490805190602001906200006a929190620001f3565b5050506200007f84846200008960201b60201c565b5050505062000700565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415620000fc576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401620000f39062000419565b60405180910390fd5b6200011060008383620001ee60201b60201c565b8060026000828254620001249190620004c8565b92505081905550806000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546200017b9190620004c8565b925050819055508173ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef83604051620001e291906200043b565b60405180910390a35050565b505050565b828054620002019062000599565b90600052602060002090601f01602090048101928262000225576000855562000271565b82601f106200024057805160ff191683800117855562000271565b8280016001018555821562000271579182015b828111156200027057825182559160200191906001019062000253565b5b50905062000280919062000284565b5090565b5b808211156200029f57600081600090555060010162000285565b5090565b6000620002ba620002b48462000481565b62000458565b905082815260208101848484011115620002d357600080fd5b620002e084828562000563565b509392505050565b600081519050620002f981620006cc565b92915050565b600082601f8301126200031157600080fd5b815162000323848260208601620002a3565b91505092915050565b6000815190506200033d81620006e6565b92915050565b600080600080608085870312156200035a57600080fd5b60006200036a87828801620002e8565b94505060206200037d878288016200032c565b935050604085015167ffffffffffffffff8111156200039b57600080fd5b620003a987828801620002ff565b925050606085015167ffffffffffffffff811115620003c757600080fd5b620003d587828801620002ff565b91505092959194509250565b6000620003f0601f83620004b7565b9150620003fd82620006a3565b602082019050919050565b620004138162000559565b82525050565b600060208201905081810360008301526200043481620003e1565b9050919050565b600060208201905062000452600083018462000408565b92915050565b60006200046462000477565b9050620004728282620005cf565b919050565b6000604051905090565b600067ffffffffffffffff8211156200049f576200049e62000663565b5b620004aa8262000692565b9050602081019050919050565b600082825260208201905092915050565b6000620004d58262000559565b9150620004e28362000559565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff038211156200051a576200051962000605565b5b828201905092915050565b6000620005328262000539565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b60005b838110156200058357808201518184015260208101905062000566565b8381111562000593576000848401525b50505050565b60006002820490506001821680620005b257607f821691505b60208210811415620005c957620005c862000634565b5b50919050565b620005da8262000692565b810181811067ffffffffffffffff82111715620005fc57620005fb62000663565b5b80604052505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6000601f19601f8301169050919050565b7f45524332303a206d696e7420746f20746865207a65726f206164647265737300600082015250565b620006d78162000525565b8114620006e357600080fd5b50565b620006f18162000559565b8114620006fd57600080fd5b50565b6117f280620007106000396000f3fe608060405234801561001057600080fd5b50600436106100b45760003560e01c80634000aea0116100715780634000aea0146101a357806370a08231146101d357806395d89b4114610203578063a457c2d714610221578063a9059cbb14610251578063dd62ed3e14610281576100b4565b806306fdde03146100b9578063095ea7b3146100d757806318160ddd1461010757806323b872dd14610125578063313ce567146101555780633950935114610173575b600080fd5b6100c16102b1565b6040516100ce9190611136565b60405180910390f35b6100f160048036038101906100ec9190610e6e565b610343565b6040516100fe919061111b565b60405180910390f35b61010f610361565b60405161011c9190611238565b60405180910390f35b61013f600480360381019061013a9190610e1f565b61036b565b60405161014c919061111b565b60405180910390f35b61015d61046c565b60405161016a9190611283565b60405180910390f35b61018d60048036038101906101889190610e6e565b610475565b60405161019a919061111b565b60405180910390f35b6101bd60048036038101906101b89190610eaa565b610521565b6040516101ca919061111b565b60405180910390f35b6101ed60048036038101906101e89190610dba565b610649565b6040516101fa9190611238565b60405180910390f35b61020b610691565b6040516102189190611136565b60405180910390f35b61023b60048036038101906102369190610e6e565b610723565b604051610248919061111b565b60405180910390f35b61026b60048036038101906102669190610e6e565b610817565b604051610278919061111b565b60405180910390f35b61029b60048036038101906102969190610de3565b610835565b6040516102a89190611238565b60405180910390f35b6060600380546102c09061144d565b80601f01602080910402602001604051908101604052809291908181526020018280546102ec9061144d565b80156103395780601f1061030e57610100808354040283529160200191610339565b820191906000526020600020905b81548152906001019060200180831161031c57829003601f168201915b5050505050905090565b60006103576103506108bc565b84846108c4565b6001905092915050565b6000600254905090565b6000610378848484610a8f565b6000600160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006103c36108bc565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905082811015610443576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161043a906111b8565b60405180910390fd5b6104608561044f6108bc565b858461045b9190611382565b6108c4565b60019150509392505050565b60006012905090565b60006105176104826108bc565b8484600160006104906108bc565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610512919061132c565b6108c4565b6001905092915050565b60008061052e8585610817565b90508061053f576000915050610642565b8473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fe19260aff97b920c7df27010903aeb9c8d2be5d310a2c67824cf3f15396e4c16868660405161059e929190611253565b60405180910390a360008590508073ffffffffffffffffffffffffffffffffffffffff1663c0ee0b8a3387876040518463ffffffff1660e01b81526004016105e8939291906110dd565b602060405180830381600087803b15801561060257600080fd5b505af1158015610616573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061063a9190610f11565b506001925050505b9392505050565b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b6060600480546106a09061144d565b80601f01602080910402602001604051908101604052809291908181526020018280546106cc9061144d565b80156107195780601f106106ee57610100808354040283529160200191610719565b820191906000526020600020905b8154815290600101906020018083116106fc57829003601f168201915b5050505050905090565b600080600160006107326108bc565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050828110156107ef576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107e690611218565b60405180910390fd5b61080c6107fa6108bc565b8585846108079190611382565b6108c4565b600191505092915050565b600061082b6108246108bc565b8484610a8f565b6001905092915050565b6000600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610934576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161092b906111f8565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156109a4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161099b90611178565b60405180910390fd5b80600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92583604051610a829190611238565b60405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610aff576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610af6906111d8565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610b6f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b6690611158565b60405180910390fd5b610b7a838383610d0e565b60008060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905081811015610c00576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610bf790611198565b60405180910390fd5b8181610c0c9190611382565b6000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550816000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254610c9c919061132c565b925050819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef84604051610d009190611238565b60405180910390a350505050565b505050565b6000610d26610d21846112c3565b61129e565b905082815260208101848484011115610d3e57600080fd5b610d4984828561140b565b509392505050565b600081359050610d6081611777565b92915050565b600081519050610d758161178e565b92915050565b600082601f830112610d8c57600080fd5b8135610d9c848260208601610d13565b91505092915050565b600081359050610db4816117a5565b92915050565b600060208284031215610dcc57600080fd5b6000610dda84828501610d51565b91505092915050565b60008060408385031215610df657600080fd5b6000610e0485828601610d51565b9250506020610e1585828601610d51565b9150509250929050565b600080600060608486031215610e3457600080fd5b6000610e4286828701610d51565b9350506020610e5386828701610d51565b9250506040610e6486828701610da5565b9150509250925092565b60008060408385031215610e8157600080fd5b6000610e8f85828601610d51565b9250506020610ea085828601610da5565b9150509250929050565b600080600060608486031215610ebf57600080fd5b6000610ecd86828701610d51565b9350506020610ede86828701610da5565b925050604084013567ffffffffffffffff811115610efb57600080fd5b610f0786828701610d7b565b9150509250925092565b600060208284031215610f2357600080fd5b6000610f3184828501610d66565b91505092915050565b610f43816113b6565b82525050565b610f52816113c8565b82525050565b6000610f63826112f4565b610f6d818561130a565b9350610f7d81856020860161141a565b610f868161153d565b840191505092915050565b6000610f9c826112ff565b610fa6818561131b565b9350610fb681856020860161141a565b610fbf8161153d565b840191505092915050565b6000610fd760238361131b565b9150610fe28261154e565b604082019050919050565b6000610ffa60228361131b565b91506110058261159d565b604082019050919050565b600061101d60268361131b565b9150611028826115ec565b604082019050919050565b600061104060288361131b565b915061104b8261163b565b604082019050919050565b600061106360258361131b565b915061106e8261168a565b604082019050919050565b600061108660248361131b565b9150611091826116d9565b604082019050919050565b60006110a960258361131b565b91506110b482611728565b604082019050919050565b6110c8816113f4565b82525050565b6110d7816113fe565b82525050565b60006060820190506110f26000830186610f3a565b6110ff60208301856110bf565b81810360408301526111118184610f58565b9050949350505050565b60006020820190506111306000830184610f49565b92915050565b600060208201905081810360008301526111508184610f91565b905092915050565b6000602082019050818103600083015261117181610fca565b9050919050565b6000602082019050818103600083015261119181610fed565b9050919050565b600060208201905081810360008301526111b181611010565b9050919050565b600060208201905081810360008301526111d181611033565b9050919050565b600060208201905081810360008301526111f181611056565b9050919050565b6000602082019050818103600083015261121181611079565b9050919050565b600060208201905081810360008301526112318161109c565b9050919050565b600060208201905061124d60008301846110bf565b92915050565b600060408201905061126860008301856110bf565b818103602083015261127a8184610f58565b90509392505050565b600060208201905061129860008301846110ce565b92915050565b60006112a86112b9565b90506112b4828261147f565b919050565b6000604051905090565b600067ffffffffffffffff8211156112de576112dd61150e565b5b6112e78261153d565b9050602081019050919050565b600081519050919050565b600081519050919050565b600082825260208201905092915050565b600082825260208201905092915050565b6000611337826113f4565b9150611342836113f4565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff03821115611377576113766114b0565b5b828201905092915050565b600061138d826113f4565b9150611398836113f4565b9250828210156113ab576113aa6114b0565b5b828203905092915050565b60006113c1826113d4565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b82818337600083830152505050565b60005b8381101561143857808201518184015260208101905061141d565b83811115611447576000848401525b50505050565b6000600282049050600182168061146557607f821691505b60208210811415611479576114786114df565b5b50919050565b6114888261153d565b810181811067ffffffffffffffff821117156114a7576114a661150e565b5b80604052505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6000601f19601f8301169050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a207472616e7366657220616d6f756e742065786365656473206260008201527f616c616e63650000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a207472616e7366657220616d6f756e742065786365656473206160008201527f6c6c6f77616e6365000000000000000000000000000000000000000000000000602082015250565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f7760008201527f207a65726f000000000000000000000000000000000000000000000000000000602082015250565b611780816113b6565b811461178b57600080fd5b50565b611797816113c8565b81146117a257600080fd5b50565b6117ae816113f4565b81146117b957600080fd5b5056fea2646970667358221220d700057c7ecb59c53ec48d5a77fd48bc25503d636c8b21a10bd71f6e033b9f8964736f6c63430008030033"; diff --git a/types/ethers-contracts/index.d.ts b/types/ethers-contracts/index.d.ts new file mode 100644 index 0000000..2280f18 --- /dev/null +++ b/types/ethers-contracts/index.d.ts @@ -0,0 +1,28 @@ +/* Generated by ts-generator ver. 0.0.8 */ +/* tslint:disable */ + +import { + BigNumberish, + EventDescription, + FunctionDescription +} from "ethers/utils"; + +export class TransactionOverrides { + nonce?: BigNumberish | Promise; + gasLimit?: BigNumberish | Promise; + gasPrice?: BigNumberish | Promise; + value?: BigNumberish | Promise; + chainId?: number | Promise; +} + +export interface TypedEventDescription< + T extends Pick +> extends EventDescription { + encodeTopics: T["encodeTopics"]; +} + +export interface TypedFunctionDescription< + T extends Pick +> extends FunctionDescription { + encode: T["encode"]; +} diff --git a/types/truffle-contracts/index.d.ts b/types/truffle-contracts/index.d.ts new file mode 100644 index 0000000..4f4b294 --- /dev/null +++ b/types/truffle-contracts/index.d.ts @@ -0,0 +1,183 @@ +/* Generated by ts-generator ver. 0.0.8 */ +/* tslint:disable */ + +/// +import { BigNumber } from "bignumber.js"; + +export interface ERC677DataContract + extends Truffle.Contract { + "new"( + initialAccount: string | BigNumber, + initialBalance: number | BigNumber | string, + tokenName: string, + tokenSymbol: string, + meta?: Truffle.TransactionDetails + ): Promise; +} + +export interface ERC677DataInstance extends Truffle.ContractInstance { + allowance( + owner: string | BigNumber, + spender: string | BigNumber, + txDetails?: Truffle.TransactionDetails + ): Promise; + + approve: { + ( + spender: string | BigNumber, + amount: number | BigNumber | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + call( + spender: string | BigNumber, + amount: number | BigNumber | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + sendTransaction( + spender: string | BigNumber, + amount: number | BigNumber | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + estimateGas( + spender: string | BigNumber, + amount: number | BigNumber | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + }; + + balanceOf( + account: string | BigNumber, + txDetails?: Truffle.TransactionDetails + ): Promise; + + decimals(txDetails?: Truffle.TransactionDetails): Promise; + + decreaseAllowance: { + ( + spender: string | BigNumber, + subtractedValue: number | BigNumber | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + call( + spender: string | BigNumber, + subtractedValue: number | BigNumber | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + sendTransaction( + spender: string | BigNumber, + subtractedValue: number | BigNumber | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + estimateGas( + spender: string | BigNumber, + subtractedValue: number | BigNumber | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + }; + + increaseAllowance: { + ( + spender: string | BigNumber, + addedValue: number | BigNumber | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + call( + spender: string | BigNumber, + addedValue: number | BigNumber | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + sendTransaction( + spender: string | BigNumber, + addedValue: number | BigNumber | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + estimateGas( + spender: string | BigNumber, + addedValue: number | BigNumber | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + }; + + name(txDetails?: Truffle.TransactionDetails): Promise; + + symbol(txDetails?: Truffle.TransactionDetails): Promise; + + totalSupply(txDetails?: Truffle.TransactionDetails): Promise; + + transfer: { + ( + recipient: string | BigNumber, + amount: number | BigNumber | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + call( + recipient: string | BigNumber, + amount: number | BigNumber | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + sendTransaction( + recipient: string | BigNumber, + amount: number | BigNumber | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + estimateGas( + recipient: string | BigNumber, + amount: number | BigNumber | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + }; + + transferFrom: { + ( + sender: string | BigNumber, + recipient: string | BigNumber, + amount: number | BigNumber | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + call( + sender: string | BigNumber, + recipient: string | BigNumber, + amount: number | BigNumber | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + sendTransaction( + sender: string | BigNumber, + recipient: string | BigNumber, + amount: number | BigNumber | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + estimateGas( + sender: string | BigNumber, + recipient: string | BigNumber, + amount: number | BigNumber | string, + txDetails?: Truffle.TransactionDetails + ): Promise; + }; + + transferAndCall: { + ( + to: string | BigNumber, + value: number | BigNumber | string, + data: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + call( + to: string | BigNumber, + value: number | BigNumber | string, + data: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + sendTransaction( + to: string | BigNumber, + value: number | BigNumber | string, + data: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + estimateGas( + to: string | BigNumber, + value: number | BigNumber | string, + data: string, + txDetails?: Truffle.TransactionDetails + ): Promise; + }; +} diff --git a/types/truffle-contracts/merge.d.ts b/types/truffle-contracts/merge.d.ts new file mode 100644 index 0000000..fae3ca1 --- /dev/null +++ b/types/truffle-contracts/merge.d.ts @@ -0,0 +1,14 @@ +/* Generated by ts-generator ver. 0.0.8 */ +/* tslint:disable */ + +/// + +import * as TruffleContracts from "."; + +declare global { + namespace Truffle { + interface Artifacts { + require(name: "ERC677Data"): TruffleContracts.ERC677DataContract; + } + } +} diff --git a/types/web3-v1-contracts/ERC677Data.d.ts b/types/web3-v1-contracts/ERC677Data.d.ts new file mode 100644 index 0000000..af327f2 --- /dev/null +++ b/types/web3-v1-contracts/ERC677Data.d.ts @@ -0,0 +1,92 @@ +/* Generated by ts-generator ver. 0.0.8 */ +/* tslint:disable */ + +import BN from "bn.js"; +import { Contract, ContractOptions } from "web3-eth-contract"; +import { EventLog } from "web3-core"; +import { EventEmitter } from "events"; +import { ContractEvent, Callback, TransactionObject, BlockType } from "./types"; + +interface EventOptions { + filter?: object; + fromBlock?: BlockType; + topics?: string[]; +} + +export class ERC677Data extends Contract { + constructor( + jsonInterface: any[], + address?: string, + options?: ContractOptions + ); + clone(): ERC677Data; + methods: { + allowance(owner: string, spender: string): TransactionObject; + + approve( + spender: string, + amount: number | string + ): TransactionObject; + + balanceOf(account: string): TransactionObject; + + decimals(): TransactionObject; + + decreaseAllowance( + spender: string, + subtractedValue: number | string + ): TransactionObject; + + increaseAllowance( + spender: string, + addedValue: number | string + ): TransactionObject; + + name(): TransactionObject; + + symbol(): TransactionObject; + + totalSupply(): TransactionObject; + + transfer( + recipient: string, + amount: number | string + ): TransactionObject; + + transferFrom( + sender: string, + recipient: string, + amount: number | string + ): TransactionObject; + + transferAndCall( + to: string, + value: number | string, + data: string | number[] + ): TransactionObject; + }; + events: { + Approval: ContractEvent<{ + owner: string; + spender: string; + value: string; + 0: string; + 1: string; + 2: string; + }>; + Transfer: ContractEvent<{ + from: string; + to: string; + value: string; + data: string; + 0: string; + 1: string; + 2: string; + 3: string; + }>; + allEvents: ( + options?: EventOptions, + cb?: Callback + ) => EventEmitter; + }; +} diff --git a/types/web3-v1-contracts/types.d.ts b/types/web3-v1-contracts/types.d.ts new file mode 100644 index 0000000..471231a --- /dev/null +++ b/types/web3-v1-contracts/types.d.ts @@ -0,0 +1,65 @@ +/* Generated by ts-generator ver. 0.0.8 */ +/* tslint:disable */ + +import BN from "bn.js"; +import { EventLog } from "web3-core/types"; +import { EventEmitter } from "events"; +// @ts-ignore +import PromiEvent from "web3/promiEvent"; + +interface EstimateGasOptions { + from?: string; + gas?: number; + value?: number | string | BN; +} + +interface EventOptions { + filter?: object; + fromBlock?: BlockType; + topics?: string[]; +} + +export type Callback = (error: Error, result: T) => void; +export interface TransactionObject { + arguments: any[]; + call(options?: EstimateGasOptions): Promise; + send(options?: EstimateGasOptions): PromiEvent; + estimateGas(options?: EstimateGasOptions): Promise; + encodeABI(): string; +} +export interface ContractEventLog extends EventLog { + returnValues: T; +} +export interface ContractEventEmitter extends EventEmitter { + on(event: "connected", listener: (subscriptionId: string) => void): this; + on( + event: "data" | "changed", + listener: (event: ContractEventLog) => void + ): this; + on(event: "error", listener: (error: Error) => void): this; +} +export type ContractEvent = ( + options?: EventOptions, + cb?: Callback> +) => ContractEventEmitter; + +export interface Tx { + nonce?: string | number; + chainId?: string | number; + from?: string; + to?: string; + data?: string; + value?: string | number; + gas?: string | number; + gasPrice?: string | number; +} + +export interface TransactionObject { + arguments: any[]; + call(tx?: Tx): Promise; + send(tx?: Tx): PromiEvent; + estimateGas(tx?: Tx): Promise; + encodeABI(): string; +} + +export type BlockType = "latest" | "pending" | "genesis" | number; diff --git a/types/web3-v2-contracts/ERC677Data.d.ts b/types/web3-v2-contracts/ERC677Data.d.ts new file mode 100644 index 0000000..5bf244b --- /dev/null +++ b/types/web3-v2-contracts/ERC677Data.d.ts @@ -0,0 +1,86 @@ +/* Generated by ts-generator ver. 0.0.8 */ +/* tslint:disable */ + +import BN from "bn.js"; +import { Contract, ContractOptions, EventOptions } from "web3-eth-contract"; +import { EventLog } from "web3-core"; +import { EventEmitter } from "events"; +import { Callback, ContractEvent, TransactionObject } from "./types"; + +export class ERC677Data extends Contract { + constructor( + jsonInterface: any[], + address?: string, + options?: ContractOptions + ); + clone(): ERC677Data; + methods: { + allowance(owner: string, spender: string): TransactionObject; + + approve( + spender: string, + amount: number | string + ): TransactionObject; + + balanceOf(account: string): TransactionObject; + + decimals(): TransactionObject; + + decreaseAllowance( + spender: string, + subtractedValue: number | string + ): TransactionObject; + + increaseAllowance( + spender: string, + addedValue: number | string + ): TransactionObject; + + name(): TransactionObject; + + symbol(): TransactionObject; + + totalSupply(): TransactionObject; + + transfer( + recipient: string, + amount: number | string + ): TransactionObject; + + transferFrom( + sender: string, + recipient: string, + amount: number | string + ): TransactionObject; + + transferAndCall( + to: string, + value: number | string, + data: string | number[] + ): TransactionObject; + }; + events: { + Approval: ContractEvent<{ + owner: string; + spender: string; + value: BN; + 0: string; + 1: string; + 2: BN; + }>; + Transfer: ContractEvent<{ + from: string; + to: string; + value: BN; + data: string; + 0: string; + 1: string; + 2: BN; + 3: string; + }>; + allEvents: ( + options?: EventOptions, + cb?: Callback + ) => EventEmitter; + }; +} diff --git a/types/web3-v2-contracts/types.d.ts b/types/web3-v2-contracts/types.d.ts new file mode 100644 index 0000000..4671a94 --- /dev/null +++ b/types/web3-v2-contracts/types.d.ts @@ -0,0 +1,32 @@ +/* Generated by ts-generator ver. 0.0.8 */ +/* tslint:disable */ + +import { EventLog, PromiEvent, TransactionConfig } from "web3-core"; +import { EventOptions } from "web3-eth-contract"; +import { EventEmitter } from "events"; + +export type Callback = (error: Error, result: T) => void; +export interface TransactionObject { + arguments: any[]; + call(tx?: TransactionConfig): Promise; + send(tx?: TransactionConfig): PromiEvent; + estimateGas(tx?: TransactionConfig): Promise; + encodeABI(): string; +} + +export interface ContractEventLog extends EventLog { + returnValues: T; +} + +export interface ContractEventEmitter extends EventEmitter { + on( + event: "data" | "changed", + listener: (event: ContractEventLog) => void + ): this; + on(event: "error", listener: (error: Error) => void): this; +} + +export type ContractEvent = ( + options?: EventOptions, + cb?: Callback> +) => ContractEventEmitter;