upgrade dep

main
cyhhao 2 years ago
parent 7b61a0fe08
commit 003b1794dd

155
package-lock.json generated

@ -1,31 +1,31 @@
{ {
"name": "dgithub", "name": "git3-contract",
"version": "1.0.0", "version": "1.0.0",
"lockfileVersion": 2, "lockfileVersion": 2,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "dgithub", "name": "git3-contract",
"version": "1.0.0", "version": "1.0.0",
"license": "ISC", "license": "ISC",
"dependencies": { "dependencies": {
"@nomicfoundation/hardhat-chai-matchers": "^1.0.5", "@nomicfoundation/hardhat-chai-matchers": "^1.0.5",
"@nomiclabs/hardhat-ethers": "^2.2.1", "@nomiclabs/hardhat-ethers": "^2.2.2",
"@nomiclabs/hardhat-etherscan": "^3.1.3", "@nomiclabs/hardhat-etherscan": "^3.1.5",
"@openzeppelin/contracts": "^4.8.0", "@openzeppelin/contracts": "^4.8.1",
"chai": "^4.3.7", "chai": "^4.3.7",
"typechain": "^8.1.1" "typechain": "^8.1.1"
}, },
"devDependencies": { "devDependencies": {
"@nomicfoundation/hardhat-toolbox": "^2.0.0", "@nomicfoundation/hardhat-toolbox": "^2.0.1",
"@typechain/ethers-v5": "^10.2.0", "@typechain/ethers-v5": "^10.2.0",
"@typechain/hardhat": "^6.1.5", "@typechain/hardhat": "^6.1.5",
"dotenv": "^16.0.3", "dotenv": "^16.0.3",
"hardhat": "^2.12.4", "hardhat": "^2.12.6",
"hardhat-gas-reporter": "^1.0.9", "hardhat-gas-reporter": "^1.0.9",
"prettier": "2.8.1", "prettier": "2.8.3",
"prettier-check": "^2.0.0", "prettier-check": "^2.0.0",
"prettier-plugin-solidity": "^1.0.0-beta.18", "prettier-plugin-solidity": "^1.1.1",
"solidity-coverage": "^0.8.2", "solidity-coverage": "^0.8.2",
"ts-node": "^10.9.1", "ts-node": "^10.9.1",
"typescript": "^4.9.4" "typescript": "^4.9.4"
@ -1288,9 +1288,9 @@
} }
}, },
"node_modules/@nomicfoundation/hardhat-toolbox": { "node_modules/@nomicfoundation/hardhat-toolbox": {
"version": "2.0.0", "version": "2.0.1",
"resolved": "https://registry.npmjs.org/@nomicfoundation/hardhat-toolbox/-/hardhat-toolbox-2.0.0.tgz", "resolved": "https://registry.npmjs.org/@nomicfoundation/hardhat-toolbox/-/hardhat-toolbox-2.0.1.tgz",
"integrity": "sha512-BoOPbzLQ1GArnBZd4Jz4IU8FY3RY4nUwpXlfymXwxlXNimngkPRJj7ivVNurD7igohEjf90v/Axn2M5WwAdCJQ==", "integrity": "sha512-/pr8m9xlqiNlq6fXv4hEPNwdNwUhysoB2qbDCKqERfPpq34EydUQTC3Vis4aIea8RLwSrU8sDXFdv4TQxYstKw==",
"dev": true, "dev": true,
"peerDependencies": { "peerDependencies": {
"@ethersproject/abi": "^5.4.7", "@ethersproject/abi": "^5.4.7",
@ -1302,7 +1302,7 @@
"@typechain/ethers-v5": "^10.1.0", "@typechain/ethers-v5": "^10.1.0",
"@typechain/hardhat": "^6.1.2", "@typechain/hardhat": "^6.1.2",
"@types/chai": "^4.2.0", "@types/chai": "^4.2.0",
"@types/mocha": "^9.1.0", "@types/mocha": ">=9.1.0",
"@types/node": ">=12.0.0", "@types/node": ">=12.0.0",
"chai": "^4.2.0", "chai": "^4.2.0",
"ethers": "^5.4.7", "ethers": "^5.4.7",
@ -1365,18 +1365,18 @@
} }
}, },
"node_modules/@nomiclabs/hardhat-ethers": { "node_modules/@nomiclabs/hardhat-ethers": {
"version": "2.2.1", "version": "2.2.2",
"resolved": "https://registry.npmjs.org/@nomiclabs/hardhat-ethers/-/hardhat-ethers-2.2.1.tgz", "resolved": "https://registry.npmjs.org/@nomiclabs/hardhat-ethers/-/hardhat-ethers-2.2.2.tgz",
"integrity": "sha512-RHWYwnxryWR8hzRmU4Jm/q4gzvXpetUOJ4OPlwH2YARcDB+j79+yAYCwO0lN1SUOb4++oOTJEe6AWLEc42LIvg==", "integrity": "sha512-NLDlDFL2us07C0jB/9wzvR0kuLivChJWCXTKcj3yqjZqMoYp7g7wwS157F70VHx/+9gHIBGzak5pKDwG8gEefA==",
"peerDependencies": { "peerDependencies": {
"ethers": "^5.0.0", "ethers": "^5.0.0",
"hardhat": "^2.0.0" "hardhat": "^2.0.0"
} }
}, },
"node_modules/@nomiclabs/hardhat-etherscan": { "node_modules/@nomiclabs/hardhat-etherscan": {
"version": "3.1.3", "version": "3.1.5",
"resolved": "https://registry.npmjs.org/@nomiclabs/hardhat-etherscan/-/hardhat-etherscan-3.1.3.tgz", "resolved": "https://registry.npmjs.org/@nomiclabs/hardhat-etherscan/-/hardhat-etherscan-3.1.5.tgz",
"integrity": "sha512-UeNO97j0lwOHqX7mrH6SfQQBdXq1Ng6eFr7uJKuQOrq2UVTWGD70lE5QO4fAFVPz9ao+xlNpMyIqSR7+OaDR+Q==", "integrity": "sha512-PxPX28AGBAlxgXLU27NB3oiMsklxbNhM75SDC4v1QPCyPeAxGm4xV0WpYbR10W7sxY2WF3Ek7u7GhjbQWa2Fcg==",
"dependencies": { "dependencies": {
"@ethersproject/abi": "^5.1.2", "@ethersproject/abi": "^5.1.2",
"@ethersproject/address": "^5.0.2", "@ethersproject/address": "^5.0.2",
@ -1387,16 +1387,16 @@
"lodash": "^4.17.11", "lodash": "^4.17.11",
"semver": "^6.3.0", "semver": "^6.3.0",
"table": "^6.8.0", "table": "^6.8.0",
"undici": "^5.4.0" "undici": "^5.14.0"
}, },
"peerDependencies": { "peerDependencies": {
"hardhat": "^2.0.4" "hardhat": "^2.0.4"
} }
}, },
"node_modules/@openzeppelin/contracts": { "node_modules/@openzeppelin/contracts": {
"version": "4.8.0", "version": "4.8.1",
"resolved": "https://registry.npmjs.org/@openzeppelin/contracts/-/contracts-4.8.0.tgz", "resolved": "https://registry.npmjs.org/@openzeppelin/contracts/-/contracts-4.8.1.tgz",
"integrity": "sha512-AGuwhRRL+NaKx73WKRNzeCxOCOCxpaqF+kp8TJ89QzAipSwZy/NoflkWaL9bywXFRhIzXt8j38sfF7KBKCPWLw==" "integrity": "sha512-xQ6eUZl+RDyb/FiZe1h+U7qr/f4p/SrTSQcTPH2bjur3C5DbuW/zFgCU/b1P/xcIaEqJep+9ju4xDRi3rmChdQ=="
}, },
"node_modules/@scure/base": { "node_modules/@scure/base": {
"version": "1.1.1", "version": "1.1.1",
@ -4309,9 +4309,9 @@
} }
}, },
"node_modules/hardhat": { "node_modules/hardhat": {
"version": "2.12.4", "version": "2.12.6",
"resolved": "https://registry.npmjs.org/hardhat/-/hardhat-2.12.4.tgz", "resolved": "https://registry.npmjs.org/hardhat/-/hardhat-2.12.6.tgz",
"integrity": "sha512-rc9S2U/4M+77LxW1Kg7oqMMmjl81tzn5rNFARhbXKUA1am/nhfMJEujOjuKvt+ZGMiZ11PYSe8gyIpB/aRNDgw==", "integrity": "sha512-0Ent1O5DsPgvaVb5sxEgsQ3bJRt/Ex92tsoO+xjoNH2Qc4bFmhI5/CHVlFikulalxOPjNmw5XQ2vJFuVQFESAA==",
"dependencies": { "dependencies": {
"@ethersproject/abi": "^5.1.2", "@ethersproject/abi": "^5.1.2",
"@metamask/eth-sig-util": "^4.0.0", "@metamask/eth-sig-util": "^4.0.0",
@ -4360,7 +4360,7 @@
"source-map-support": "^0.5.13", "source-map-support": "^0.5.13",
"stacktrace-parser": "^0.1.10", "stacktrace-parser": "^0.1.10",
"tsort": "0.0.1", "tsort": "0.0.1",
"undici": "^5.4.0", "undici": "^5.14.0",
"uuid": "^8.3.2", "uuid": "^8.3.2",
"ws": "^7.4.6" "ws": "^7.4.6"
}, },
@ -5963,9 +5963,9 @@
} }
}, },
"node_modules/prettier": { "node_modules/prettier": {
"version": "2.8.1", "version": "2.8.3",
"resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.1.tgz", "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.3.tgz",
"integrity": "sha512-lqGoSJBQNJidqCHE80vqZJHWHRFoNYsSpP9AjFhlhi9ODCJA541svILes/+/1GM3VaL/abZi7cpFzOpdR9UPKg==", "integrity": "sha512-tJ/oJ4amDihPoufT5sM0Z1SKEuKay8LfVAMlbbhnnkvt6BUserZylqo2PN+p9KeljLr0OHa2rXHU1T8reeoTrw==",
"bin": { "bin": {
"prettier": "bin-prettier.js" "prettier": "bin-prettier.js"
}, },
@ -5996,42 +5996,20 @@
} }
}, },
"node_modules/prettier-plugin-solidity": { "node_modules/prettier-plugin-solidity": {
"version": "1.0.0", "version": "1.1.1",
"resolved": "https://registry.npmjs.org/prettier-plugin-solidity/-/prettier-plugin-solidity-1.0.0.tgz", "resolved": "https://registry.npmjs.org/prettier-plugin-solidity/-/prettier-plugin-solidity-1.1.1.tgz",
"integrity": "sha512-gRJCeZ7imbWtNYN2SudjJoPmka5r6jcd2cSTV6FC3pVCtY6LFZbeQQjpKufUEp88hXBAAnkOTOh7TA5xwj9M3A==", "integrity": "sha512-uD24KO26tAHF+zMN2nt1OUzfknzza5AgxjogQQrMLZc7j8xiQrDoNWNeOlfFC0YLTwo12CLD10b9niLyP6AqXg==",
"dev": true, "dev": true,
"license": "MIT",
"dependencies": { "dependencies": {
"@solidity-parser/parser": "^0.14.5", "@solidity-parser/parser": "^0.14.5",
"emoji-regex": "^10.2.1",
"escape-string-regexp": "^4.0.0",
"semver": "^7.3.8", "semver": "^7.3.8",
"solidity-comments-extractor": "^0.0.7", "solidity-comments-extractor": "^0.0.7"
"string-width": "^4.2.3"
}, },
"engines": { "engines": {
"node": ">=12" "node": ">=12"
}, },
"peerDependencies": { "peerDependencies": {
"prettier": "^2.3.0" "prettier": ">=2.3.0 || >=3.0.0-alpha.0"
}
},
"node_modules/prettier-plugin-solidity/node_modules/emoji-regex": {
"version": "10.2.1",
"resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-10.2.1.tgz",
"integrity": "sha512-97g6QgOk8zlDRdgq1WxwgTMgEWGVAQvB5Fdpgc1MkNy56la5SKP9GsMXKDOdqwn90/41a8yPwIGk1Y6WVbeMQA==",
"dev": true
},
"node_modules/prettier-plugin-solidity/node_modules/escape-string-regexp": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz",
"integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==",
"dev": true,
"engines": {
"node": ">=10"
},
"funding": {
"url": "https://github.com/sponsors/sindresorhus"
} }
}, },
"node_modules/prettier-plugin-solidity/node_modules/lru-cache": { "node_modules/prettier-plugin-solidity/node_modules/lru-cache": {
@ -9363,9 +9341,9 @@
} }
}, },
"@nomicfoundation/hardhat-toolbox": { "@nomicfoundation/hardhat-toolbox": {
"version": "2.0.0", "version": "2.0.1",
"resolved": "https://registry.npmjs.org/@nomicfoundation/hardhat-toolbox/-/hardhat-toolbox-2.0.0.tgz", "resolved": "https://registry.npmjs.org/@nomicfoundation/hardhat-toolbox/-/hardhat-toolbox-2.0.1.tgz",
"integrity": "sha512-BoOPbzLQ1GArnBZd4Jz4IU8FY3RY4nUwpXlfymXwxlXNimngkPRJj7ivVNurD7igohEjf90v/Axn2M5WwAdCJQ==", "integrity": "sha512-/pr8m9xlqiNlq6fXv4hEPNwdNwUhysoB2qbDCKqERfPpq34EydUQTC3Vis4aIea8RLwSrU8sDXFdv4TQxYstKw==",
"dev": true, "dev": true,
"requires": {} "requires": {}
}, },
@ -9399,15 +9377,15 @@
"optional": true "optional": true
}, },
"@nomiclabs/hardhat-ethers": { "@nomiclabs/hardhat-ethers": {
"version": "2.2.1", "version": "2.2.2",
"resolved": "https://registry.npmjs.org/@nomiclabs/hardhat-ethers/-/hardhat-ethers-2.2.1.tgz", "resolved": "https://registry.npmjs.org/@nomiclabs/hardhat-ethers/-/hardhat-ethers-2.2.2.tgz",
"integrity": "sha512-RHWYwnxryWR8hzRmU4Jm/q4gzvXpetUOJ4OPlwH2YARcDB+j79+yAYCwO0lN1SUOb4++oOTJEe6AWLEc42LIvg==", "integrity": "sha512-NLDlDFL2us07C0jB/9wzvR0kuLivChJWCXTKcj3yqjZqMoYp7g7wwS157F70VHx/+9gHIBGzak5pKDwG8gEefA==",
"requires": {} "requires": {}
}, },
"@nomiclabs/hardhat-etherscan": { "@nomiclabs/hardhat-etherscan": {
"version": "3.1.3", "version": "3.1.5",
"resolved": "https://registry.npmjs.org/@nomiclabs/hardhat-etherscan/-/hardhat-etherscan-3.1.3.tgz", "resolved": "https://registry.npmjs.org/@nomiclabs/hardhat-etherscan/-/hardhat-etherscan-3.1.5.tgz",
"integrity": "sha512-UeNO97j0lwOHqX7mrH6SfQQBdXq1Ng6eFr7uJKuQOrq2UVTWGD70lE5QO4fAFVPz9ao+xlNpMyIqSR7+OaDR+Q==", "integrity": "sha512-PxPX28AGBAlxgXLU27NB3oiMsklxbNhM75SDC4v1QPCyPeAxGm4xV0WpYbR10W7sxY2WF3Ek7u7GhjbQWa2Fcg==",
"requires": { "requires": {
"@ethersproject/abi": "^5.1.2", "@ethersproject/abi": "^5.1.2",
"@ethersproject/address": "^5.0.2", "@ethersproject/address": "^5.0.2",
@ -9418,13 +9396,13 @@
"lodash": "^4.17.11", "lodash": "^4.17.11",
"semver": "^6.3.0", "semver": "^6.3.0",
"table": "^6.8.0", "table": "^6.8.0",
"undici": "^5.4.0" "undici": "^5.14.0"
} }
}, },
"@openzeppelin/contracts": { "@openzeppelin/contracts": {
"version": "4.8.0", "version": "4.8.1",
"resolved": "https://registry.npmjs.org/@openzeppelin/contracts/-/contracts-4.8.0.tgz", "resolved": "https://registry.npmjs.org/@openzeppelin/contracts/-/contracts-4.8.1.tgz",
"integrity": "sha512-AGuwhRRL+NaKx73WKRNzeCxOCOCxpaqF+kp8TJ89QzAipSwZy/NoflkWaL9bywXFRhIzXt8j38sfF7KBKCPWLw==" "integrity": "sha512-xQ6eUZl+RDyb/FiZe1h+U7qr/f4p/SrTSQcTPH2bjur3C5DbuW/zFgCU/b1P/xcIaEqJep+9ju4xDRi3rmChdQ=="
}, },
"@scure/base": { "@scure/base": {
"version": "1.1.1", "version": "1.1.1",
@ -11711,9 +11689,9 @@
} }
}, },
"hardhat": { "hardhat": {
"version": "2.12.4", "version": "2.12.6",
"resolved": "https://registry.npmjs.org/hardhat/-/hardhat-2.12.4.tgz", "resolved": "https://registry.npmjs.org/hardhat/-/hardhat-2.12.6.tgz",
"integrity": "sha512-rc9S2U/4M+77LxW1Kg7oqMMmjl81tzn5rNFARhbXKUA1am/nhfMJEujOjuKvt+ZGMiZ11PYSe8gyIpB/aRNDgw==", "integrity": "sha512-0Ent1O5DsPgvaVb5sxEgsQ3bJRt/Ex92tsoO+xjoNH2Qc4bFmhI5/CHVlFikulalxOPjNmw5XQ2vJFuVQFESAA==",
"requires": { "requires": {
"@ethersproject/abi": "^5.1.2", "@ethersproject/abi": "^5.1.2",
"@metamask/eth-sig-util": "^4.0.0", "@metamask/eth-sig-util": "^4.0.0",
@ -11762,7 +11740,7 @@
"source-map-support": "^0.5.13", "source-map-support": "^0.5.13",
"stacktrace-parser": "^0.1.10", "stacktrace-parser": "^0.1.10",
"tsort": "0.0.1", "tsort": "0.0.1",
"undici": "^5.4.0", "undici": "^5.14.0",
"uuid": "^8.3.2", "uuid": "^8.3.2",
"ws": "^7.4.6" "ws": "^7.4.6"
} }
@ -12918,9 +12896,9 @@
"dev": true "dev": true
}, },
"prettier": { "prettier": {
"version": "2.8.1", "version": "2.8.3",
"resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.1.tgz", "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.3.tgz",
"integrity": "sha512-lqGoSJBQNJidqCHE80vqZJHWHRFoNYsSpP9AjFhlhi9ODCJA541svILes/+/1GM3VaL/abZi7cpFzOpdR9UPKg==" "integrity": "sha512-tJ/oJ4amDihPoufT5sM0Z1SKEuKay8LfVAMlbbhnnkvt6BUserZylqo2PN+p9KeljLr0OHa2rXHU1T8reeoTrw=="
}, },
"prettier-check": { "prettier-check": {
"version": "2.0.0", "version": "2.0.0",
@ -12932,31 +12910,16 @@
} }
}, },
"prettier-plugin-solidity": { "prettier-plugin-solidity": {
"version": "1.0.0", "version": "1.1.1",
"resolved": "https://registry.npmjs.org/prettier-plugin-solidity/-/prettier-plugin-solidity-1.0.0.tgz", "resolved": "https://registry.npmjs.org/prettier-plugin-solidity/-/prettier-plugin-solidity-1.1.1.tgz",
"integrity": "sha512-gRJCeZ7imbWtNYN2SudjJoPmka5r6jcd2cSTV6FC3pVCtY6LFZbeQQjpKufUEp88hXBAAnkOTOh7TA5xwj9M3A==", "integrity": "sha512-uD24KO26tAHF+zMN2nt1OUzfknzza5AgxjogQQrMLZc7j8xiQrDoNWNeOlfFC0YLTwo12CLD10b9niLyP6AqXg==",
"dev": true, "dev": true,
"requires": { "requires": {
"@solidity-parser/parser": "^0.14.5", "@solidity-parser/parser": "^0.14.5",
"emoji-regex": "^10.2.1",
"escape-string-regexp": "^4.0.0",
"semver": "^7.3.8", "semver": "^7.3.8",
"solidity-comments-extractor": "^0.0.7", "solidity-comments-extractor": "^0.0.7"
"string-width": "^4.2.3"
}, },
"dependencies": { "dependencies": {
"emoji-regex": {
"version": "10.2.1",
"resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-10.2.1.tgz",
"integrity": "sha512-97g6QgOk8zlDRdgq1WxwgTMgEWGVAQvB5Fdpgc1MkNy56la5SKP9GsMXKDOdqwn90/41a8yPwIGk1Y6WVbeMQA==",
"dev": true
},
"escape-string-regexp": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz",
"integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==",
"dev": true
},
"lru-cache": { "lru-cache": {
"version": "6.0.0", "version": "6.0.0",
"resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz",

@ -1,5 +1,5 @@
{ {
"name": "dgithub", "name": "git3-contract",
"version": "1.0.0", "version": "1.0.0",
"description": "Dencentralized Github", "description": "Dencentralized Github",
"main": "index.js", "main": "index.js",
@ -8,34 +8,34 @@
}, },
"repository": { "repository": {
"type": "git", "type": "git",
"url": "git+https://github.com/cyl19970726/dGithub.git" "url": "git+https://github.com/git3protocol/git3-contract.git"
}, },
"author": "", "author": "",
"license": "ISC", "license": "ISC",
"bugs": { "bugs": {
"url": "https://github.com/cyl19970726/dGithub/issues" "url": "https://github.com/git3protocol/git3-contract/issues"
}, },
"homepage": "https://github.com/cyl19970726/dGithub#readme", "homepage": "https://github.com/git3protocol/git3-contract#readme",
"devDependencies": { "devDependencies": {
"@nomicfoundation/hardhat-toolbox": "^2.0.0", "@nomicfoundation/hardhat-toolbox": "^2.0.1",
"@typechain/ethers-v5": "^10.2.0", "@typechain/ethers-v5": "^10.2.0",
"@typechain/hardhat": "^6.1.5", "@typechain/hardhat": "^6.1.5",
"dotenv": "^16.0.3", "dotenv": "^16.0.3",
"hardhat": "^2.12.4", "hardhat": "^2.12.6",
"hardhat-gas-reporter": "^1.0.9", "hardhat-gas-reporter": "^1.0.9",
"prettier": "2.8.1", "prettier": "2.8.3",
"prettier-check": "^2.0.0", "prettier-check": "^2.0.0",
"prettier-plugin-solidity": "^1.0.0-beta.18", "prettier-plugin-solidity": "^1.1.1",
"solidity-coverage": "^0.8.2", "solidity-coverage": "^0.8.2",
"ts-node": "^10.9.1", "ts-node": "^10.9.1",
"typescript": "^4.9.4" "typescript": "^4.9.4"
}, },
"dependencies": { "dependencies": {
"@nomicfoundation/hardhat-chai-matchers": "^1.0.5", "@nomicfoundation/hardhat-chai-matchers": "^1.0.5",
"@nomiclabs/hardhat-ethers": "^2.2.1", "@nomiclabs/hardhat-ethers": "^2.2.2",
"@nomiclabs/hardhat-etherscan": "^3.1.3", "@nomiclabs/hardhat-etherscan": "^3.1.5",
"@openzeppelin/contracts": "^4.8.0", "@openzeppelin/contracts": "^4.8.1",
"chai": "^4.3.7", "chai": "^4.3.7",
"typechain": "^8.1.1" "typechain": "^8.1.1"
} }
} }

@ -8,29 +8,32 @@ async function main() {
const Git3 = await hre.ethers.getContractAt( const Git3 = await hre.ethers.getContractAt(
"Git3Hub", "Git3Hub",
"0xcE386Fe1d237e42dd01c130DA19d32B2c3794C06" "0x608860940b8f3D3247E1B301Cf2fA5690e6504DD"
); );
let file = fs.readFileSync("scripts/git3.png"); let file = fs.readFileSync("scripts/git3.png");
let rept let rept
let buffer = Array.from(file).slice(0, 24 * 1024 * 5); let buffer = Array.from(file).slice(0, 24 * 1024 - 300);
let fileSize = buffer.length; let fileSize = buffer.length;
console.log("buffer", buffer.length); console.log("buffer", buffer.length);
let cost = 0; let cost = 0;
if (fileSize > 24 * 1024 - 326) { // if (fileSize > 24 * 1024 - 326) {
cost = Math.floor((fileSize + 326) / 1024 / 24); // cost = Math.floor((fileSize + 326) / 1024 / 24);
} // }
let repoName = Buffer.from("helloworld") let repoName = Buffer.from("test123")
// rept = await Git3.createRepo(repoName) // rept = await"test123" Git3.createRepo(repoName)
let key = ethers.utils.toUtf8Bytes("aaa"); let key = ethers.utils.toUtf8Bytes("aaa");
// rept = await Git3.upload(repoName, key, buffer, { // rept = await Git3.upload(repoName, key, buffer, {
// value: ethers.utils.parseEther(cost.toString()), // value: ethers.utils.parseEther(cost.toString()),
// gasLimit: 6000000
// }); // });
rept = await Git3.transferOwnership(repoName, "0x1eD9c2F6814eA5225Bb78f2F2CA802Ded120077A")
console.log(await Git3.download(repoName, key)); console.log(await Git3.download(repoName, key));
rept = await Git3.remove(repoName, key) // rept = await Git3.remove(repoName, key)
console.log("rept", "https://explorer.galileo.web3q.io/tx/" + rept.hash); console.log("rept", "https://explorer.galileo.web3q.io/tx/" + rept.hash);
} }

Loading…
Cancel
Save