From b358f3bbf6c67936cf32710c89952c9c67a2fc5b Mon Sep 17 00:00:00 2001 From: jeremyzhang1 Date: Sun, 9 Jan 2022 21:49:11 -0600 Subject: [PATCH] put contracts on harmony testnet --- package-lock.json | 1840 ++++++++++++++++++++++++++++++ package.json | 1 + src/contractCode/Betting.json | 770 ++++++------- src/contractCode/Migrations.json | 10 +- truffle-config.js | 166 +-- 5 files changed, 2300 insertions(+), 487 deletions(-) diff --git a/package-lock.json b/package-lock.json index 0a34a79..32e40f1 100644 --- a/package-lock.json +++ b/package-lock.json @@ -5,11 +5,13 @@ "requires": true, "packages": { "": { + "name": "peer-sports-betting", "version": "0.1.0", "dependencies": { "@testing-library/jest-dom": "^5.16.1", "@testing-library/react": "^12.1.2", "@testing-library/user-event": "^13.5.0", + "@truffle/hdwallet-provider": "^2.0.0", "axios": "^0.21.4", "chokidar": "^2.1.8", "react": "^17.0.2", @@ -2314,6 +2316,11 @@ "node": ">=10" } }, + "node_modules/@metamask/safe-event-emitter": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@metamask/safe-event-emitter/-/safe-event-emitter-2.0.0.tgz", + "integrity": "sha512-/kSXhY692qiV1MXu6EeOZvg5nECLclxNXcKCxJ3cXQgYuRymRHpdx/t7JXfsK+JLjwA1e1c1/SBrlQYpusC29Q==" + }, "node_modules/@nodelib/fs.scandir": { "version": "2.1.5", "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", @@ -2739,6 +2746,40 @@ "node": ">= 6" } }, + "node_modules/@truffle/hdwallet-provider": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@truffle/hdwallet-provider/-/hdwallet-provider-2.0.0.tgz", + "integrity": "sha512-jquMJCMeHYhvPyZiIhLSWGzGkGK7Xswbw9kcti3USPIMP/AhVNVPe8E0fPurBLUb/Wvl6VW/6Z514JsmzC/IQA==", + "dependencies": { + "@ethereumjs/common": "^2.4.0", + "@ethereumjs/tx": "^3.3.0", + "eth-sig-util": "^3.0.1", + "ethereum-cryptography": "^0.1.3", + "ethereum-protocol": "^1.0.1", + "ethereumjs-util": "^6.1.0", + "ethereumjs-wallet": "^1.0.1", + "web3-provider-engine": "16.0.3" + } + }, + "node_modules/@truffle/hdwallet-provider/node_modules/bn.js": { + "version": "4.12.0", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", + "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==" + }, + "node_modules/@truffle/hdwallet-provider/node_modules/ethereumjs-util": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-6.2.1.tgz", + "integrity": "sha512-W2Ktez4L01Vexijrm5EB6w7dg4n/TgpoYU4avuT5T3Vmnw/eCRtiBrJfQYS/DCSvDIOLn2k57GcHdeBcgVxAqw==", + "dependencies": { + "@types/bn.js": "^4.11.3", + "bn.js": "^4.11.0", + "create-hash": "^1.1.2", + "elliptic": "^6.5.2", + "ethereum-cryptography": "^0.1.3", + "ethjs-util": "0.1.6", + "rlp": "^2.2.3" + } + }, "node_modules/@types/aria-query": { "version": "4.2.2", "resolved": "https://registry.npmjs.org/@types/aria-query/-/aria-query-4.2.2.tgz", @@ -3291,6 +3332,14 @@ "resolved": "https://registry.npmjs.org/abab/-/abab-2.0.5.tgz", "integrity": "sha512-9IK9EadsbHo6jLWIpxpR6pL0sazTXV6+SQv25ZB+F7Bj9mJNaOc4nCRabwd5M/JwmUa8idz6Eci6eKfJryPs6Q==" }, + "node_modules/abstract-leveldown": { + "version": "2.6.3", + "resolved": "https://registry.npmjs.org/abstract-leveldown/-/abstract-leveldown-2.6.3.tgz", + "integrity": "sha512-2++wDf/DYqkPR3o5tbfdhF96EfMApo1GpPfzOsR/ZYXdkSmELlvOOEAl9iKkRsktMPHdGjO4rtkBpf2I7TiTeA==", + "dependencies": { + "xtend": "~4.0.0" + } + }, "node_modules/accepts": { "version": "1.3.7", "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.7.tgz", @@ -3356,6 +3405,11 @@ "node": ">=8.9" } }, + "node_modules/aes-js": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/aes-js/-/aes-js-3.1.2.tgz", + "integrity": "sha512-e5pEa2kBnBOgR4Y/p20pskXI74UEz7de8ZGVo58asOtvSVG5YAbJeELPZxOmt+Bnz3rX753YKhfIn4X4l1PPRQ==" + }, "node_modules/agent-base": { "version": "6.0.2", "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz", @@ -3695,11 +3749,32 @@ "resolved": "https://registry.npmjs.org/async-each/-/async-each-1.0.3.tgz", "integrity": "sha512-z/WhQ5FPySLdvREByI2vZiTWwCnF0moMJ1hK9YQwDTHKh6I7/uSckMetoRGb5UBZPC1z0jlw+n/XCgjeH7y1AQ==" }, + "node_modules/async-eventemitter": { + "version": "0.2.4", + "resolved": "https://registry.npmjs.org/async-eventemitter/-/async-eventemitter-0.2.4.tgz", + "integrity": "sha512-pd20BwL7Yt1zwDFy+8MX8F1+WCT8aQeKj0kQnTrH9WaeRETlRamVhD0JtRPmrV4GfOJ2F9CvdQkZeZhnh2TuHw==", + "dependencies": { + "async": "^2.4.0" + } + }, "node_modules/async-limiter": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/async-limiter/-/async-limiter-1.0.1.tgz", "integrity": "sha512-csOlWGAcRFJaI6m+F2WKdnMKr4HhdhFVBk0H/QbJFMCr+uO2kwohwXQPxw/9OCxp05r5ghVBFSyioixx3gfkNQ==" }, + "node_modules/async-mutex": { + "version": "0.2.6", + "resolved": "https://registry.npmjs.org/async-mutex/-/async-mutex-0.2.6.tgz", + "integrity": "sha512-Hs4R+4SPgamu6rSGW8C7cV9gaWUKEHykfzCCvIRuaVv636Ju10ZdeUbvb4TBEW0INuq2DHZqXbK4Nd3yG4RaRw==", + "dependencies": { + "tslib": "^2.0.0" + } + }, + "node_modules/async-mutex/node_modules/tslib": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.1.tgz", + "integrity": "sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw==" + }, "node_modules/asynckit": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", @@ -4138,6 +4213,17 @@ "babylon": "bin/babylon.js" } }, + "node_modules/backoff": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/backoff/-/backoff-2.5.0.tgz", + "integrity": "sha1-9hbtqdPktmuMp/ynn2lXIsX44m8=", + "dependencies": { + "precond": "0.2" + }, + "engines": { + "node": ">= 0.6" + } + }, "node_modules/balanced-match": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", @@ -4512,6 +4598,17 @@ "node-int64": "^0.4.0" } }, + "node_modules/btoa": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/btoa/-/btoa-1.2.1.tgz", + "integrity": "sha512-SB4/MIGlsiVkMcHmT+pSmIPoNDoHg+7cMzmt3Uxt628MTz2487DKSqK/fuhFBrkuqrYv5UCEnACpF4dTFNKc/g==", + "bin": { + "btoa": "bin/btoa.js" + }, + "engines": { + "node": ">= 0.4.0" + } + }, "node_modules/buffer": { "version": "4.9.2", "resolved": "https://registry.npmjs.org/buffer/-/buffer-4.9.2.tgz", @@ -4811,6 +4908,14 @@ "resolved": "https://registry.npmjs.org/check-types/-/check-types-11.1.2.tgz", "integrity": "sha512-tzWzvgePgLORb9/3a0YenggReLKAIb2owL03H2Xdoe5pKcUyWRSEQ8xfCar8t2SIAuEDwtmx2da1YB52YuHQMQ==" }, + "node_modules/checkpoint-store": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/checkpoint-store/-/checkpoint-store-1.1.0.tgz", + "integrity": "sha1-BOTLUWuRQziTWB5tRgGnjpVS6gY=", + "dependencies": { + "functional-red-black-tree": "^1.0.1" + } + }, "node_modules/chokidar": { "version": "2.1.8", "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-2.1.8.tgz", @@ -5132,6 +5237,14 @@ "wrap-ansi": "^6.2.0" } }, + "node_modules/clone": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/clone/-/clone-2.1.2.tgz", + "integrity": "sha1-G39Ln1kfHo+DZwQBYANFoCiHQ18=", + "engines": { + "node": ">=0.8" + } + }, "node_modules/clone-response": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/clone-response/-/clone-response-1.0.2.tgz", @@ -5617,6 +5730,20 @@ "sha.js": "^2.4.8" } }, + "node_modules/cross-fetch": { + "version": "2.2.5", + "resolved": "https://registry.npmjs.org/cross-fetch/-/cross-fetch-2.2.5.tgz", + "integrity": "sha512-xqYAhQb4NhCJSRym03dwxpP1bYXpK3y7UN83Bo2WFi3x1Zmzn0SL/6xGoPr+gpt4WmNrgCCX3HPysvOwFOW36w==", + "dependencies": { + "node-fetch": "2.6.1", + "whatwg-fetch": "2.0.4" + } + }, + "node_modules/cross-fetch/node_modules/whatwg-fetch": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/whatwg-fetch/-/whatwg-fetch-2.0.4.tgz", + "integrity": "sha512-dcQ1GWpOD/eEQ97k66aiEVpNnapVj90/+R+SXTPYGHpYBBypfKJEQjLrvMZ7YXbKm21gXd4NcuxUTjiv1YtLng==" + }, "node_modules/cross-spawn": { "version": "6.0.5", "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", @@ -6163,6 +6290,14 @@ "resolved": "https://registry.npmjs.org/defer-to-connect/-/defer-to-connect-1.1.3.tgz", "integrity": "sha512-0ISdNousHvZT2EiFlZeZAHBUvSxmKswVCEf8hW7KWgG4a8MVEu/3Vb6uWYozkjylyCxe0JBIiRB1jV45S70WVQ==" }, + "node_modules/deferred-leveldown": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/deferred-leveldown/-/deferred-leveldown-1.2.2.tgz", + "integrity": "sha512-uukrWD2bguRtXilKt6cAWKyoXrTSMo5m7crUdLfWQmu8kIm88w3QZoUL+6nhpfKVmhHANER6Re3sKoNoZ3IKMA==", + "dependencies": { + "abstract-leveldown": "~2.6.0" + } + }, "node_modules/define-properties": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz", @@ -7650,6 +7785,27 @@ "node": ">= 0.6" } }, + "node_modules/eth-block-tracker": { + "version": "4.4.3", + "resolved": "https://registry.npmjs.org/eth-block-tracker/-/eth-block-tracker-4.4.3.tgz", + "integrity": "sha512-A8tG4Z4iNg4mw5tP1Vung9N9IjgMNqpiMoJ/FouSFwNCGHv2X0mmOYwtQOJzki6XN7r7Tyo01S29p7b224I4jw==", + "dependencies": { + "@babel/plugin-transform-runtime": "^7.5.5", + "@babel/runtime": "^7.5.5", + "eth-query": "^2.1.0", + "json-rpc-random-id": "^1.0.1", + "pify": "^3.0.0", + "safe-event-emitter": "^1.0.1" + } + }, + "node_modules/eth-block-tracker/node_modules/pify": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", + "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", + "engines": { + "node": ">=4" + } + }, "node_modules/eth-ens-namehash": { "version": "2.0.8", "resolved": "https://registry.npmjs.org/eth-ens-namehash/-/eth-ens-namehash-2.0.8.tgz", @@ -7664,6 +7820,114 @@ "resolved": "https://registry.npmjs.org/js-sha3/-/js-sha3-0.5.7.tgz", "integrity": "sha1-DU/9gALVMzqrr0oj7tL2N0yfKOc=" }, + "node_modules/eth-json-rpc-filters": { + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/eth-json-rpc-filters/-/eth-json-rpc-filters-4.2.2.tgz", + "integrity": "sha512-DGtqpLU7bBg63wPMWg1sCpkKCf57dJ+hj/k3zF26anXMzkmtSBDExL8IhUu7LUd34f0Zsce3PYNO2vV2GaTzaw==", + "dependencies": { + "@metamask/safe-event-emitter": "^2.0.0", + "async-mutex": "^0.2.6", + "eth-json-rpc-middleware": "^6.0.0", + "eth-query": "^2.1.2", + "json-rpc-engine": "^6.1.0", + "pify": "^5.0.0" + } + }, + "node_modules/eth-json-rpc-filters/node_modules/pify": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-5.0.0.tgz", + "integrity": "sha512-eW/gHNMlxdSP6dmG6uJip6FXN0EQBwm2clYYd8Wul42Cwu/DK8HEftzsapcNdYe2MfLiIwZqsDk2RDEsTE79hA==", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/eth-json-rpc-infura": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/eth-json-rpc-infura/-/eth-json-rpc-infura-5.1.0.tgz", + "integrity": "sha512-THzLye3PHUSGn1EXMhg6WTLW9uim7LQZKeKaeYsS9+wOBcamRiCQVGHa6D2/4P0oS0vSaxsBnU/J6qvn0MPdow==", + "dependencies": { + "eth-json-rpc-middleware": "^6.0.0", + "eth-rpc-errors": "^3.0.0", + "json-rpc-engine": "^5.3.0", + "node-fetch": "^2.6.0" + } + }, + "node_modules/eth-json-rpc-infura/node_modules/json-rpc-engine": { + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/json-rpc-engine/-/json-rpc-engine-5.4.0.tgz", + "integrity": "sha512-rAffKbPoNDjuRnXkecTjnsE3xLLrb00rEkdgalINhaYVYIxDwWtvYBr9UFbhTvPB1B2qUOLoFd/cV6f4Q7mh7g==", + "dependencies": { + "eth-rpc-errors": "^3.0.0", + "safe-event-emitter": "^1.0.1" + } + }, + "node_modules/eth-json-rpc-middleware": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/eth-json-rpc-middleware/-/eth-json-rpc-middleware-6.0.0.tgz", + "integrity": "sha512-qqBfLU2Uq1Ou15Wox1s+NX05S9OcAEL4JZ04VZox2NS0U+RtCMjSxzXhLFWekdShUPZ+P8ax3zCO2xcPrp6XJQ==", + "dependencies": { + "btoa": "^1.2.1", + "clone": "^2.1.1", + "eth-query": "^2.1.2", + "eth-rpc-errors": "^3.0.0", + "eth-sig-util": "^1.4.2", + "ethereumjs-util": "^5.1.2", + "json-rpc-engine": "^5.3.0", + "json-stable-stringify": "^1.0.1", + "node-fetch": "^2.6.1", + "pify": "^3.0.0", + "safe-event-emitter": "^1.0.1" + } + }, + "node_modules/eth-json-rpc-middleware/node_modules/bn.js": { + "version": "4.12.0", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", + "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==" + }, + "node_modules/eth-json-rpc-middleware/node_modules/eth-sig-util": { + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/eth-sig-util/-/eth-sig-util-1.4.2.tgz", + "integrity": "sha1-jZWCAsftuq6Dlwf7pvCf8ydgYhA=", + "deprecated": "Deprecated in favor of '@metamask/eth-sig-util'", + "dependencies": { + "ethereumjs-abi": "git+https://github.com/ethereumjs/ethereumjs-abi.git", + "ethereumjs-util": "^5.1.1" + } + }, + "node_modules/eth-json-rpc-middleware/node_modules/ethereumjs-util": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-5.2.1.tgz", + "integrity": "sha512-v3kT+7zdyCm1HIqWlLNrHGqHGLpGYIhjeHxQjnDXjLT2FyGJDsd3LWMYUo7pAFRrk86CR3nUJfhC81CCoJNNGQ==", + "dependencies": { + "bn.js": "^4.11.0", + "create-hash": "^1.1.2", + "elliptic": "^6.5.2", + "ethereum-cryptography": "^0.1.3", + "ethjs-util": "^0.1.3", + "rlp": "^2.0.0", + "safe-buffer": "^5.1.1" + } + }, + "node_modules/eth-json-rpc-middleware/node_modules/json-rpc-engine": { + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/json-rpc-engine/-/json-rpc-engine-5.4.0.tgz", + "integrity": "sha512-rAffKbPoNDjuRnXkecTjnsE3xLLrb00rEkdgalINhaYVYIxDwWtvYBr9UFbhTvPB1B2qUOLoFd/cV6f4Q7mh7g==", + "dependencies": { + "eth-rpc-errors": "^3.0.0", + "safe-event-emitter": "^1.0.1" + } + }, + "node_modules/eth-json-rpc-middleware/node_modules/pify": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", + "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", + "engines": { + "node": ">=4" + } + }, "node_modules/eth-lib": { "version": "0.1.29", "resolved": "https://registry.npmjs.org/eth-lib/-/eth-lib-0.1.29.tgz", @@ -7692,6 +7956,59 @@ "ultron": "~1.1.0" } }, + "node_modules/eth-query": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/eth-query/-/eth-query-2.1.2.tgz", + "integrity": "sha1-1nQdkAAQa1FRDHLbktY2VFam2l4=", + "dependencies": { + "json-rpc-random-id": "^1.0.0", + "xtend": "^4.0.1" + } + }, + "node_modules/eth-rpc-errors": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/eth-rpc-errors/-/eth-rpc-errors-3.0.0.tgz", + "integrity": "sha512-iPPNHPrLwUlR9xCSYm7HHQjWBasor3+KZfRvwEWxMz3ca0yqnlBeJrnyphkGIXZ4J7AMAaOLmwy4AWhnxOiLxg==", + "dependencies": { + "fast-safe-stringify": "^2.0.6" + } + }, + "node_modules/eth-sig-util": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/eth-sig-util/-/eth-sig-util-3.0.1.tgz", + "integrity": "sha512-0Us50HiGGvZgjtWTyAI/+qTzYPMLy5Q451D0Xy68bxq1QMWdoOddDwGvsqcFT27uohKgalM9z/yxplyt+mY2iQ==", + "deprecated": "Deprecated in favor of '@metamask/eth-sig-util'", + "dependencies": { + "ethereumjs-abi": "^0.6.8", + "ethereumjs-util": "^5.1.1", + "tweetnacl": "^1.0.3", + "tweetnacl-util": "^0.15.0" + } + }, + "node_modules/eth-sig-util/node_modules/bn.js": { + "version": "4.12.0", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", + "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==" + }, + "node_modules/eth-sig-util/node_modules/ethereumjs-util": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-5.2.1.tgz", + "integrity": "sha512-v3kT+7zdyCm1HIqWlLNrHGqHGLpGYIhjeHxQjnDXjLT2FyGJDsd3LWMYUo7pAFRrk86CR3nUJfhC81CCoJNNGQ==", + "dependencies": { + "bn.js": "^4.11.0", + "create-hash": "^1.1.2", + "elliptic": "^6.5.2", + "ethereum-cryptography": "^0.1.3", + "ethjs-util": "^0.1.3", + "rlp": "^2.0.0", + "safe-buffer": "^5.1.1" + } + }, + "node_modules/eth-sig-util/node_modules/tweetnacl": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-1.0.3.tgz", + "integrity": "sha512-6rt+RN7aOi1nGMyC4Xa5DdYiukl2UWCbcJft7YhxReBGQD7OAM8Pbxw6YMo4r2diNEA8FEmu32YOn9rhaiE5yw==" + }, "node_modules/ethereum-bloom-filters": { "version": "1.0.10", "resolved": "https://registry.npmjs.org/ethereum-bloom-filters/-/ethereum-bloom-filters-1.0.10.tgz", @@ -7700,6 +8017,11 @@ "js-sha3": "^0.8.0" } }, + "node_modules/ethereum-common": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/ethereum-common/-/ethereum-common-0.2.0.tgz", + "integrity": "sha512-XOnAR/3rntJgbCdGhqdaLIxDLWKLmsZOGhHdBKadEr6gEnJLH52k93Ou+TUdFaPN3hJc3isBZBal3U/XZ15abA==" + }, "node_modules/ethereum-cryptography": { "version": "0.1.3", "resolved": "https://registry.npmjs.org/ethereum-cryptography/-/ethereum-cryptography-0.1.3.tgz", @@ -7722,6 +8044,140 @@ "setimmediate": "^1.0.5" } }, + "node_modules/ethereum-protocol": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/ethereum-protocol/-/ethereum-protocol-1.0.1.tgz", + "integrity": "sha512-3KLX1mHuEsBW0dKG+c6EOJS1NBNqdCICvZW9sInmZTt5aY0oxmHVggYRE0lJu1tcnMD1K+AKHdLi6U43Awm1Vg==" + }, + "node_modules/ethereumjs-abi": { + "version": "0.6.8", + "resolved": "git+ssh://git@github.com/ethereumjs/ethereumjs-abi.git#ee3994657fa7a427238e6ba92a84d0b529bbcde0", + "license": "MIT", + "dependencies": { + "bn.js": "^4.11.8", + "ethereumjs-util": "^6.0.0" + } + }, + "node_modules/ethereumjs-abi/node_modules/bn.js": { + "version": "4.12.0", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", + "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==" + }, + "node_modules/ethereumjs-abi/node_modules/ethereumjs-util": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-6.2.1.tgz", + "integrity": "sha512-W2Ktez4L01Vexijrm5EB6w7dg4n/TgpoYU4avuT5T3Vmnw/eCRtiBrJfQYS/DCSvDIOLn2k57GcHdeBcgVxAqw==", + "dependencies": { + "@types/bn.js": "^4.11.3", + "bn.js": "^4.11.0", + "create-hash": "^1.1.2", + "elliptic": "^6.5.2", + "ethereum-cryptography": "^0.1.3", + "ethjs-util": "0.1.6", + "rlp": "^2.2.3" + } + }, + "node_modules/ethereumjs-account": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/ethereumjs-account/-/ethereumjs-account-2.0.5.tgz", + "integrity": "sha512-bgDojnXGjhMwo6eXQC0bY6UK2liSFUSMwwylOmQvZbSl/D7NXQ3+vrGO46ZeOgjGfxXmgIeVNDIiHw7fNZM4VA==", + "dependencies": { + "ethereumjs-util": "^5.0.0", + "rlp": "^2.0.0", + "safe-buffer": "^5.1.1" + } + }, + "node_modules/ethereumjs-account/node_modules/bn.js": { + "version": "4.12.0", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", + "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==" + }, + "node_modules/ethereumjs-account/node_modules/ethereumjs-util": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-5.2.1.tgz", + "integrity": "sha512-v3kT+7zdyCm1HIqWlLNrHGqHGLpGYIhjeHxQjnDXjLT2FyGJDsd3LWMYUo7pAFRrk86CR3nUJfhC81CCoJNNGQ==", + "dependencies": { + "bn.js": "^4.11.0", + "create-hash": "^1.1.2", + "elliptic": "^6.5.2", + "ethereum-cryptography": "^0.1.3", + "ethjs-util": "^0.1.3", + "rlp": "^2.0.0", + "safe-buffer": "^5.1.1" + } + }, + "node_modules/ethereumjs-block": { + "version": "1.7.1", + "resolved": "https://registry.npmjs.org/ethereumjs-block/-/ethereumjs-block-1.7.1.tgz", + "integrity": "sha512-B+sSdtqm78fmKkBq78/QLKJbu/4Ts4P2KFISdgcuZUPDm9x+N7qgBPIIFUGbaakQh8bzuquiRVbdmvPKqbILRg==", + "deprecated": "New package name format for new versions: @ethereumjs/block. Please update.", + "dependencies": { + "async": "^2.0.1", + "ethereum-common": "0.2.0", + "ethereumjs-tx": "^1.2.2", + "ethereumjs-util": "^5.0.0", + "merkle-patricia-tree": "^2.1.2" + } + }, + "node_modules/ethereumjs-block/node_modules/bn.js": { + "version": "4.12.0", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", + "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==" + }, + "node_modules/ethereumjs-block/node_modules/ethereumjs-util": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-5.2.1.tgz", + "integrity": "sha512-v3kT+7zdyCm1HIqWlLNrHGqHGLpGYIhjeHxQjnDXjLT2FyGJDsd3LWMYUo7pAFRrk86CR3nUJfhC81CCoJNNGQ==", + "dependencies": { + "bn.js": "^4.11.0", + "create-hash": "^1.1.2", + "elliptic": "^6.5.2", + "ethereum-cryptography": "^0.1.3", + "ethjs-util": "^0.1.3", + "rlp": "^2.0.0", + "safe-buffer": "^5.1.1" + } + }, + "node_modules/ethereumjs-common": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/ethereumjs-common/-/ethereumjs-common-1.5.2.tgz", + "integrity": "sha512-hTfZjwGX52GS2jcVO6E2sx4YuFnf0Fhp5ylo4pEPhEffNln7vS59Hr5sLnp3/QCazFLluuBZ+FZ6J5HTp0EqCA==", + "deprecated": "New package name format for new versions: @ethereumjs/common. Please update." + }, + "node_modules/ethereumjs-tx": { + "version": "1.3.7", + "resolved": "https://registry.npmjs.org/ethereumjs-tx/-/ethereumjs-tx-1.3.7.tgz", + "integrity": "sha512-wvLMxzt1RPhAQ9Yi3/HKZTn0FZYpnsmQdbKYfUUpi4j1SEIcbkd9tndVjcPrufY3V7j2IebOpC00Zp2P/Ay2kA==", + "deprecated": "New package name format for new versions: @ethereumjs/tx. Please update.", + "dependencies": { + "ethereum-common": "^0.0.18", + "ethereumjs-util": "^5.0.0" + } + }, + "node_modules/ethereumjs-tx/node_modules/bn.js": { + "version": "4.12.0", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", + "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==" + }, + "node_modules/ethereumjs-tx/node_modules/ethereum-common": { + "version": "0.0.18", + "resolved": "https://registry.npmjs.org/ethereum-common/-/ethereum-common-0.0.18.tgz", + "integrity": "sha1-L9w1dvIykDNYl26znaeDIT/5Uj8=" + }, + "node_modules/ethereumjs-tx/node_modules/ethereumjs-util": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-5.2.1.tgz", + "integrity": "sha512-v3kT+7zdyCm1HIqWlLNrHGqHGLpGYIhjeHxQjnDXjLT2FyGJDsd3LWMYUo7pAFRrk86CR3nUJfhC81CCoJNNGQ==", + "dependencies": { + "bn.js": "^4.11.0", + "create-hash": "^1.1.2", + "elliptic": "^6.5.2", + "ethereum-cryptography": "^0.1.3", + "ethjs-util": "^0.1.3", + "rlp": "^2.0.0", + "safe-buffer": "^5.1.1" + } + }, "node_modules/ethereumjs-util": { "version": "7.1.3", "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-7.1.3.tgz", @@ -7745,6 +8201,96 @@ "@types/node": "*" } }, + "node_modules/ethereumjs-vm": { + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/ethereumjs-vm/-/ethereumjs-vm-2.6.0.tgz", + "integrity": "sha512-r/XIUik/ynGbxS3y+mvGnbOKnuLo40V5Mj1J25+HEO63aWYREIqvWeRO/hnROlMBE5WoniQmPmhiaN0ctiHaXw==", + "deprecated": "New package name format for new versions: @ethereumjs/vm. Please update.", + "dependencies": { + "async": "^2.1.2", + "async-eventemitter": "^0.2.2", + "ethereumjs-account": "^2.0.3", + "ethereumjs-block": "~2.2.0", + "ethereumjs-common": "^1.1.0", + "ethereumjs-util": "^6.0.0", + "fake-merkle-patricia-tree": "^1.0.1", + "functional-red-black-tree": "^1.0.1", + "merkle-patricia-tree": "^2.3.2", + "rustbn.js": "~0.2.0", + "safe-buffer": "^5.1.1" + } + }, + "node_modules/ethereumjs-vm/node_modules/bn.js": { + "version": "4.12.0", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", + "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==" + }, + "node_modules/ethereumjs-vm/node_modules/ethereumjs-block": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/ethereumjs-block/-/ethereumjs-block-2.2.2.tgz", + "integrity": "sha512-2p49ifhek3h2zeg/+da6XpdFR3GlqY3BIEiqxGF8j9aSRIgkb7M1Ky+yULBKJOu8PAZxfhsYA+HxUk2aCQp3vg==", + "deprecated": "New package name format for new versions: @ethereumjs/block. Please update.", + "dependencies": { + "async": "^2.0.1", + "ethereumjs-common": "^1.5.0", + "ethereumjs-tx": "^2.1.1", + "ethereumjs-util": "^5.0.0", + "merkle-patricia-tree": "^2.1.2" + } + }, + "node_modules/ethereumjs-vm/node_modules/ethereumjs-block/node_modules/ethereumjs-util": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-5.2.1.tgz", + "integrity": "sha512-v3kT+7zdyCm1HIqWlLNrHGqHGLpGYIhjeHxQjnDXjLT2FyGJDsd3LWMYUo7pAFRrk86CR3nUJfhC81CCoJNNGQ==", + "dependencies": { + "bn.js": "^4.11.0", + "create-hash": "^1.1.2", + "elliptic": "^6.5.2", + "ethereum-cryptography": "^0.1.3", + "ethjs-util": "^0.1.3", + "rlp": "^2.0.0", + "safe-buffer": "^5.1.1" + } + }, + "node_modules/ethereumjs-vm/node_modules/ethereumjs-tx": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ethereumjs-tx/-/ethereumjs-tx-2.1.2.tgz", + "integrity": "sha512-zZEK1onCeiORb0wyCXUvg94Ve5It/K6GD1K+26KfFKodiBiS6d9lfCXlUKGBBdQ+bv7Day+JK0tj1K+BeNFRAw==", + "deprecated": "New package name format for new versions: @ethereumjs/tx. Please update.", + "dependencies": { + "ethereumjs-common": "^1.5.0", + "ethereumjs-util": "^6.0.0" + } + }, + "node_modules/ethereumjs-vm/node_modules/ethereumjs-util": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-6.2.1.tgz", + "integrity": "sha512-W2Ktez4L01Vexijrm5EB6w7dg4n/TgpoYU4avuT5T3Vmnw/eCRtiBrJfQYS/DCSvDIOLn2k57GcHdeBcgVxAqw==", + "dependencies": { + "@types/bn.js": "^4.11.3", + "bn.js": "^4.11.0", + "create-hash": "^1.1.2", + "elliptic": "^6.5.2", + "ethereum-cryptography": "^0.1.3", + "ethjs-util": "0.1.6", + "rlp": "^2.2.3" + } + }, + "node_modules/ethereumjs-wallet": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/ethereumjs-wallet/-/ethereumjs-wallet-1.0.2.tgz", + "integrity": "sha512-CCWV4RESJgRdHIvFciVQFnCHfqyhXWchTPlkfp28Qc53ufs+doi5I/cV2+xeK9+qEo25XCWfP9MiL+WEPAZfdA==", + "dependencies": { + "aes-js": "^3.1.2", + "bs58check": "^2.1.2", + "ethereum-cryptography": "^0.1.3", + "ethereumjs-util": "^7.1.2", + "randombytes": "^2.1.0", + "scrypt-js": "^3.0.1", + "utf8": "^3.0.0", + "uuid": "^8.3.2" + } + }, "node_modules/ethjs-unit": { "version": "0.1.6", "resolved": "https://registry.npmjs.org/ethjs-unit/-/ethjs-unit-0.1.6.tgz", @@ -7763,6 +8309,19 @@ "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.6.tgz", "integrity": "sha1-UzRK2xRhehP26N0s4okF0cC6MhU=" }, + "node_modules/ethjs-util": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/ethjs-util/-/ethjs-util-0.1.6.tgz", + "integrity": "sha512-CUnVOQq7gSpDHZVVrQW8ExxUETWrnrvXYvYz55wOU8Uj4VCgw56XC2B/fVqQN+f7gmrnRHSLVnFAwsCuNwji8w==", + "dependencies": { + "is-hex-prefixed": "1.0.0", + "strip-hex-prefix": "1.0.0" + }, + "engines": { + "node": ">=6.5.0", + "npm": ">=3" + } + }, "node_modules/eventemitter3": { "version": "4.0.7", "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-4.0.7.tgz", @@ -8097,6 +8656,14 @@ "node >=0.6.0" ] }, + "node_modules/fake-merkle-patricia-tree": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/fake-merkle-patricia-tree/-/fake-merkle-patricia-tree-1.0.1.tgz", + "integrity": "sha1-S4w6z7Ugr635hgsfFM2M40As3dM=", + "dependencies": { + "checkpoint-store": "^1.1.0" + } + }, "node_modules/fast-deep-equal": { "version": "3.1.3", "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", @@ -8127,6 +8694,11 @@ "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=" }, + "node_modules/fast-safe-stringify": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/fast-safe-stringify/-/fast-safe-stringify-2.1.1.tgz", + "integrity": "sha512-W+KJc2dmILlPplD/H4K9l9LcAHAfPtP6BY84uVLXQ6Evcz9Lcg33Y2z1IVblT6xdY54PXYVHEv+0Wpq8Io6zkA==" + }, "node_modules/fastq": { "version": "1.13.0", "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.13.0.tgz", @@ -9521,6 +10093,11 @@ "node": ">= 4" } }, + "node_modules/immediate": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/immediate/-/immediate-3.3.0.tgz", + "integrity": "sha512-HR7EVodfFUdQCTIeySw+WDRFJlPcLOJbXfwwZ7Oom6tjsvZ3bOkCDJHehQC3nxJrv7+f9XecwazynjU8e4Vw3Q==" + }, "node_modules/immer": { "version": "8.0.1", "resolved": "https://registry.npmjs.org/immer/-/immer-8.0.1.tgz", @@ -9897,6 +10474,14 @@ "node": ">=0.10.0" } }, + "node_modules/is-fn": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-fn/-/is-fn-1.0.0.tgz", + "integrity": "sha1-lUPV3nvPWwiiLsiiC65uKG1RDYw=", + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/is-fullwidth-code-point": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", @@ -11528,6 +12113,31 @@ "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==" }, + "node_modules/json-rpc-engine": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/json-rpc-engine/-/json-rpc-engine-6.1.0.tgz", + "integrity": "sha512-NEdLrtrq1jUZyfjkr9OCz9EzCNhnRyWtt1PAnvnhwy6e8XETS0Dtc+ZNCO2gvuAoKsIn2+vCSowXTYE4CkgnAQ==", + "dependencies": { + "@metamask/safe-event-emitter": "^2.0.0", + "eth-rpc-errors": "^4.0.2" + }, + "engines": { + "node": ">=10.0.0" + } + }, + "node_modules/json-rpc-engine/node_modules/eth-rpc-errors": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/eth-rpc-errors/-/eth-rpc-errors-4.0.3.tgz", + "integrity": "sha512-Z3ymjopaoft7JDoxZcEb3pwdGh7yiYMhOwm2doUt6ASXlMavpNlK6Cre0+IMl2VSGyEU9rkiperQhp5iRxn5Pg==", + "dependencies": { + "fast-safe-stringify": "^2.0.6" + } + }, + "node_modules/json-rpc-random-id": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json-rpc-random-id/-/json-rpc-random-id-1.0.1.tgz", + "integrity": "sha1-uknZat7RRE27jaPSA3SKy7zeyMg=" + }, "node_modules/json-schema": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.4.0.tgz", @@ -11538,6 +12148,14 @@ "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==" }, + "node_modules/json-stable-stringify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json-stable-stringify/-/json-stable-stringify-1.0.1.tgz", + "integrity": "sha1-mnWdOcXy/1A/1TAGRu1EX4jE+a8=", + "dependencies": { + "jsonify": "~0.0.0" + } + }, "node_modules/json-stable-stringify-without-jsonify": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", @@ -11576,6 +12194,14 @@ "universalify": "^2.0.0" } }, + "node_modules/jsonify": { + "version": "0.0.0", + "resolved": "https://registry.npmjs.org/jsonify/-/jsonify-0.0.0.tgz", + "integrity": "sha1-LHS27kHZPKUbe1qu6PUDYx0lKnM=", + "engines": { + "node": "*" + } + }, "node_modules/jsprim": { "version": "1.4.2", "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.2.tgz", @@ -11688,6 +12314,119 @@ "webpack-sources": "^1.1.0" } }, + "node_modules/level-codec": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/level-codec/-/level-codec-7.0.1.tgz", + "integrity": "sha512-Ua/R9B9r3RasXdRmOtd+t9TCOEIIlts+TN/7XTT2unhDaL6sJn83S3rUyljbr6lVtw49N3/yA0HHjpV6Kzb2aQ==" + }, + "node_modules/level-errors": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/level-errors/-/level-errors-1.0.5.tgz", + "integrity": "sha512-/cLUpQduF6bNrWuAC4pwtUKA5t669pCsCi2XbmojG2tFeOr9j6ShtdDCtFFQO1DRt+EVZhx9gPzP9G2bUaG4ig==", + "dependencies": { + "errno": "~0.1.1" + } + }, + "node_modules/level-iterator-stream": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/level-iterator-stream/-/level-iterator-stream-1.3.1.tgz", + "integrity": "sha1-5Dt4sagUPm+pek9IXrjqUwNS8u0=", + "dependencies": { + "inherits": "^2.0.1", + "level-errors": "^1.0.3", + "readable-stream": "^1.0.33", + "xtend": "^4.0.0" + } + }, + "node_modules/level-iterator-stream/node_modules/isarray": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=" + }, + "node_modules/level-iterator-stream/node_modules/readable-stream": { + "version": "1.1.14", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz", + "integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=", + "dependencies": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.1", + "isarray": "0.0.1", + "string_decoder": "~0.10.x" + } + }, + "node_modules/level-iterator-stream/node_modules/string_decoder": { + "version": "0.10.31", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", + "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=" + }, + "node_modules/level-ws": { + "version": "0.0.0", + "resolved": "https://registry.npmjs.org/level-ws/-/level-ws-0.0.0.tgz", + "integrity": "sha1-Ny5RIXeSSgBCSwtDrvK7QkltIos=", + "dependencies": { + "readable-stream": "~1.0.15", + "xtend": "~2.1.1" + } + }, + "node_modules/level-ws/node_modules/isarray": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=" + }, + "node_modules/level-ws/node_modules/object-keys": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-0.4.0.tgz", + "integrity": "sha1-KKaq50KN0sOpLz2V8hM13SBOAzY=" + }, + "node_modules/level-ws/node_modules/readable-stream": { + "version": "1.0.34", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz", + "integrity": "sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw=", + "dependencies": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.1", + "isarray": "0.0.1", + "string_decoder": "~0.10.x" + } + }, + "node_modules/level-ws/node_modules/string_decoder": { + "version": "0.10.31", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", + "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=" + }, + "node_modules/level-ws/node_modules/xtend": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/xtend/-/xtend-2.1.2.tgz", + "integrity": "sha1-bv7MKk2tjmlixJAbM3znuoe10os=", + "dependencies": { + "object-keys": "~0.4.0" + }, + "engines": { + "node": ">=0.4" + } + }, + "node_modules/levelup": { + "version": "1.3.9", + "resolved": "https://registry.npmjs.org/levelup/-/levelup-1.3.9.tgz", + "integrity": "sha512-VVGHfKIlmw8w1XqpGOAGwq6sZm2WwWLmlDcULkKWQXEA5EopA8OBNJ2Ck2v6bdk8HeEZSbCSEgzXadyQFm76sQ==", + "dependencies": { + "deferred-leveldown": "~1.2.1", + "level-codec": "~7.0.0", + "level-errors": "~1.0.3", + "level-iterator-stream": "~1.3.0", + "prr": "~1.0.1", + "semver": "~5.4.1", + "xtend": "~4.0.0" + } + }, + "node_modules/levelup/node_modules/semver": { + "version": "5.4.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.4.1.tgz", + "integrity": "sha512-WfG/X9+oATh81XtllIo/I8gOiY9EXRdv1cQdyykeXK17YcUW3EXUAi2To4pcH6nZtJPr7ZOpM5OMyWJZm+8Rsg==", + "bin": { + "semver": "bin/semver" + } + }, "node_modules/leven": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/leven/-/leven-3.1.0.tgz", @@ -11848,6 +12587,11 @@ "node": ">=10" } }, + "node_modules/ltgt": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/ltgt/-/ltgt-2.2.1.tgz", + "integrity": "sha1-81ypHEk/e3PaDgdJUwTxezH4fuU=" + }, "node_modules/lz-string": { "version": "1.4.4", "resolved": "https://registry.npmjs.org/lz-string/-/lz-string-1.4.4.tgz", @@ -11934,6 +12678,27 @@ "node": ">= 0.6" } }, + "node_modules/memdown": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/memdown/-/memdown-1.4.1.tgz", + "integrity": "sha1-tOThkhdGZP+65BNhqlAPMRnv4hU=", + "dependencies": { + "abstract-leveldown": "~2.7.1", + "functional-red-black-tree": "^1.0.1", + "immediate": "^3.2.3", + "inherits": "~2.0.1", + "ltgt": "~2.2.0", + "safe-buffer": "~5.1.1" + } + }, + "node_modules/memdown/node_modules/abstract-leveldown": { + "version": "2.7.2", + "resolved": "https://registry.npmjs.org/abstract-leveldown/-/abstract-leveldown-2.7.2.tgz", + "integrity": "sha512-+OVvxH2rHVEhWLdbudP6p0+dNMXu8JA1CbhP19T8paTYAcX7oJ4OVjT+ZUVpv7mITxXHqDMej+GdqXBmXkw09w==", + "dependencies": { + "xtend": "~4.0.0" + } + }, "node_modules/memory-fs": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/memory-fs/-/memory-fs-0.4.1.tgz", @@ -11961,6 +12726,45 @@ "node": ">= 8" } }, + "node_modules/merkle-patricia-tree": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/merkle-patricia-tree/-/merkle-patricia-tree-2.3.2.tgz", + "integrity": "sha512-81PW5m8oz/pz3GvsAwbauj7Y00rqm81Tzad77tHBwU7pIAtN+TJnMSOJhxBKflSVYhptMMb9RskhqHqrSm1V+g==", + "dependencies": { + "async": "^1.4.2", + "ethereumjs-util": "^5.0.0", + "level-ws": "0.0.0", + "levelup": "^1.2.1", + "memdown": "^1.0.0", + "readable-stream": "^2.0.0", + "rlp": "^2.0.0", + "semaphore": ">=1.0.1" + } + }, + "node_modules/merkle-patricia-tree/node_modules/async": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/async/-/async-1.5.2.tgz", + "integrity": "sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo=" + }, + "node_modules/merkle-patricia-tree/node_modules/bn.js": { + "version": "4.12.0", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", + "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==" + }, + "node_modules/merkle-patricia-tree/node_modules/ethereumjs-util": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-5.2.1.tgz", + "integrity": "sha512-v3kT+7zdyCm1HIqWlLNrHGqHGLpGYIhjeHxQjnDXjLT2FyGJDsd3LWMYUo7pAFRrk86CR3nUJfhC81CCoJNNGQ==", + "dependencies": { + "bn.js": "^4.11.0", + "create-hash": "^1.1.2", + "elliptic": "^6.5.2", + "ethereum-cryptography": "^0.1.3", + "ethjs-util": "^0.1.3", + "rlp": "^2.0.0", + "safe-buffer": "^5.1.1" + } + }, "node_modules/methods": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", @@ -12466,6 +13270,14 @@ "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-2.0.2.tgz", "integrity": "sha512-Ntyt4AIXyaLIuMHF6IOoTakB3K+RWxwtsHNRxllEoA6vPwP9o4866g6YWDLUdnucilZhmkxiHwHr11gAENw+QA==" }, + "node_modules/node-fetch": { + "version": "2.6.1", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.1.tgz", + "integrity": "sha512-V4aYg89jEoVRxRb2fJdAg8FHvI7cEyYdVAh94HH0UIK8oJxUfkjlDQN9RbMx+bEjP7+ggMiFRprSti032Oipxw==", + "engines": { + "node": "4.x || >=6.0.0" + } + }, "node_modules/node-forge": { "version": "0.10.0", "resolved": "https://registry.npmjs.org/node-forge/-/node-forge-0.10.0.tgz", @@ -14578,6 +15390,14 @@ "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-0.2.1.tgz", "integrity": "sha512-cMlDqaLEqfSaW8Z7N5Jw+lyIW869EzT73/F5lhtY9cLGoVxSXznfgfXMO0Z5K0o0Q2TkTXq+0KFsdnSe3jDViA==" }, + "node_modules/precond": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/precond/-/precond-0.2.3.tgz", + "integrity": "sha1-qpWRvKokkj8eD0hJ0kD0fvwQdaw=", + "engines": { + "node": ">= 0.6" + } + }, "node_modules/prelude-ls": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", @@ -14677,6 +15497,18 @@ "resolved": "https://registry.npmjs.org/promise-inflight/-/promise-inflight-1.0.1.tgz", "integrity": "sha1-mEcocL8igTL8vdhoEputEsPAKeM=" }, + "node_modules/promise-to-callback": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/promise-to-callback/-/promise-to-callback-1.0.0.tgz", + "integrity": "sha1-XSp0kBC/tn2WNZj805YHRqaP7vc=", + "dependencies": { + "is-fn": "^1.0.0", + "set-immediate-shim": "^1.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/prompts": { "version": "2.4.0", "resolved": "https://registry.npmjs.org/prompts/-/prompts-2.4.0.tgz", @@ -16187,11 +17019,25 @@ "aproba": "^1.1.1" } }, + "node_modules/rustbn.js": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/rustbn.js/-/rustbn.js-0.2.0.tgz", + "integrity": "sha512-4VlvkRUuCJvr2J6Y0ImW7NvTCriMi7ErOAqWk1y69vAdoNIzCF3yPmgeNzx+RQTLEDFq5sHfscn1MwHxP9hNfA==" + }, "node_modules/safe-buffer": { "version": "5.1.2", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" }, + "node_modules/safe-event-emitter": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/safe-event-emitter/-/safe-event-emitter-1.0.1.tgz", + "integrity": "sha512-e1wFe99A91XYYxoQbcq2ZJUWurxEyP8vfz7A7vuUe1s95q8r5ebraVaA1BukYJcpM6V16ugWoD9vngi8Ccu5fg==", + "deprecated": "Renamed to @metamask/safe-event-emitter", + "dependencies": { + "events": "^3.0.0" + } + }, "node_modules/safe-regex": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/safe-regex/-/safe-regex-1.1.0.tgz", @@ -16463,6 +17309,14 @@ "node-forge": "^0.10.0" } }, + "node_modules/semaphore": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/semaphore/-/semaphore-1.1.0.tgz", + "integrity": "sha512-O4OZEaNtkMd/K0i6js9SL+gqy0ZCBMgUvlSqHKi4IBdjhe7wB8pwztUk1BbZ1fmrvpwFrPbHzqd2w5pTcJH6LA==", + "engines": { + "node": ">=0.8.0" + } + }, "node_modules/semver": { "version": "7.3.2", "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.2.tgz", @@ -16611,6 +17465,14 @@ "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=" }, + "node_modules/set-immediate-shim": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/set-immediate-shim/-/set-immediate-shim-1.0.1.tgz", + "integrity": "sha1-SysbJ+uAip+NzEgaWOXlb1mfP2E=", + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/set-value": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/set-value/-/set-value-2.0.1.tgz", @@ -18201,6 +19063,11 @@ "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=" }, + "node_modules/tweetnacl-util": { + "version": "0.15.1", + "resolved": "https://registry.npmjs.org/tweetnacl-util/-/tweetnacl-util-0.15.1.tgz", + "integrity": "sha512-RKJBIj8lySrShN4w6i/BonWp2Z/uxwC3h4y7xsRrpP59ZboCd0GpEVsOnMDYLMmKBpYhb5TgHzZXy7wTfYFBRw==" + }, "node_modules/type": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/type/-/type-1.2.0.tgz", @@ -19116,6 +19983,75 @@ "node": ">=8.0.0" } }, + "node_modules/web3-provider-engine": { + "version": "16.0.3", + "resolved": "https://registry.npmjs.org/web3-provider-engine/-/web3-provider-engine-16.0.3.tgz", + "integrity": "sha512-Q3bKhGqLfMTdLvkd4TtkGYJHcoVQ82D1l8jTIwwuJp/sAp7VHnRYb9YJ14SW/69VMWoOhSpPLZV2tWb9V0WJoA==", + "dependencies": { + "@ethereumjs/tx": "^3.3.0", + "async": "^2.5.0", + "backoff": "^2.5.0", + "clone": "^2.0.0", + "cross-fetch": "^2.1.0", + "eth-block-tracker": "^4.4.2", + "eth-json-rpc-filters": "^4.2.1", + "eth-json-rpc-infura": "^5.1.0", + "eth-json-rpc-middleware": "^6.0.0", + "eth-rpc-errors": "^3.0.0", + "eth-sig-util": "^1.4.2", + "ethereumjs-block": "^1.2.2", + "ethereumjs-util": "^5.1.5", + "ethereumjs-vm": "^2.3.4", + "json-stable-stringify": "^1.0.1", + "promise-to-callback": "^1.0.0", + "readable-stream": "^2.2.9", + "request": "^2.85.0", + "semaphore": "^1.0.3", + "ws": "^5.1.1", + "xhr": "^2.2.0", + "xtend": "^4.0.1" + }, + "engines": { + "node": ">=12.0.0" + } + }, + "node_modules/web3-provider-engine/node_modules/bn.js": { + "version": "4.12.0", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", + "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==" + }, + "node_modules/web3-provider-engine/node_modules/eth-sig-util": { + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/eth-sig-util/-/eth-sig-util-1.4.2.tgz", + "integrity": "sha1-jZWCAsftuq6Dlwf7pvCf8ydgYhA=", + "deprecated": "Deprecated in favor of '@metamask/eth-sig-util'", + "dependencies": { + "ethereumjs-abi": "git+https://github.com/ethereumjs/ethereumjs-abi.git", + "ethereumjs-util": "^5.1.1" + } + }, + "node_modules/web3-provider-engine/node_modules/ethereumjs-util": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-5.2.1.tgz", + "integrity": "sha512-v3kT+7zdyCm1HIqWlLNrHGqHGLpGYIhjeHxQjnDXjLT2FyGJDsd3LWMYUo7pAFRrk86CR3nUJfhC81CCoJNNGQ==", + "dependencies": { + "bn.js": "^4.11.0", + "create-hash": "^1.1.2", + "elliptic": "^6.5.2", + "ethereum-cryptography": "^0.1.3", + "ethjs-util": "^0.1.3", + "rlp": "^2.0.0", + "safe-buffer": "^5.1.1" + } + }, + "node_modules/web3-provider-engine/node_modules/ws": { + "version": "5.2.3", + "resolved": "https://registry.npmjs.org/ws/-/ws-5.2.3.tgz", + "integrity": "sha512-jZArVERrMsKUatIdnLzqvcfydI85dvd/Fp1u/VOpfdDWQ4c9qWXe+VIeAbQ5FrDwciAkr+lzofXLz3Kuf26AOA==", + "dependencies": { + "async-limiter": "~1.0.0" + } + }, "node_modules/web3-providers-http": { "version": "1.6.1", "resolved": "https://registry.npmjs.org/web3-providers-http/-/web3-providers-http-1.6.1.tgz", @@ -22405,6 +23341,11 @@ } } }, + "@metamask/safe-event-emitter": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@metamask/safe-event-emitter/-/safe-event-emitter-2.0.0.tgz", + "integrity": "sha512-/kSXhY692qiV1MXu6EeOZvg5nECLclxNXcKCxJ3cXQgYuRymRHpdx/t7JXfsK+JLjwA1e1c1/SBrlQYpusC29Q==" + }, "@nodelib/fs.scandir": { "version": "2.1.5", "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", @@ -22732,6 +23673,42 @@ "resolved": "https://registry.npmjs.org/@tootallnate/once/-/once-1.1.2.tgz", "integrity": "sha512-RbzJvlNzmRq5c3O09UipeuXno4tA1FE6ikOjxZK0tuxVv3412l64l5t1W5pj4+rJq9vpkm/kwiR07aZXnsKPxw==" }, + "@truffle/hdwallet-provider": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@truffle/hdwallet-provider/-/hdwallet-provider-2.0.0.tgz", + "integrity": "sha512-jquMJCMeHYhvPyZiIhLSWGzGkGK7Xswbw9kcti3USPIMP/AhVNVPe8E0fPurBLUb/Wvl6VW/6Z514JsmzC/IQA==", + "requires": { + "@ethereumjs/common": "^2.4.0", + "@ethereumjs/tx": "^3.3.0", + "eth-sig-util": "^3.0.1", + "ethereum-cryptography": "^0.1.3", + "ethereum-protocol": "^1.0.1", + "ethereumjs-util": "^6.1.0", + "ethereumjs-wallet": "^1.0.1", + "web3-provider-engine": "16.0.3" + }, + "dependencies": { + "bn.js": { + "version": "4.12.0", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", + "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==" + }, + "ethereumjs-util": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-6.2.1.tgz", + "integrity": "sha512-W2Ktez4L01Vexijrm5EB6w7dg4n/TgpoYU4avuT5T3Vmnw/eCRtiBrJfQYS/DCSvDIOLn2k57GcHdeBcgVxAqw==", + "requires": { + "@types/bn.js": "^4.11.3", + "bn.js": "^4.11.0", + "create-hash": "^1.1.2", + "elliptic": "^6.5.2", + "ethereum-cryptography": "^0.1.3", + "ethjs-util": "0.1.6", + "rlp": "^2.2.3" + } + } + } + }, "@types/aria-query": { "version": "4.2.2", "resolved": "https://registry.npmjs.org/@types/aria-query/-/aria-query-4.2.2.tgz", @@ -23254,6 +24231,14 @@ "resolved": "https://registry.npmjs.org/abab/-/abab-2.0.5.tgz", "integrity": "sha512-9IK9EadsbHo6jLWIpxpR6pL0sazTXV6+SQv25ZB+F7Bj9mJNaOc4nCRabwd5M/JwmUa8idz6Eci6eKfJryPs6Q==" }, + "abstract-leveldown": { + "version": "2.6.3", + "resolved": "https://registry.npmjs.org/abstract-leveldown/-/abstract-leveldown-2.6.3.tgz", + "integrity": "sha512-2++wDf/DYqkPR3o5tbfdhF96EfMApo1GpPfzOsR/ZYXdkSmELlvOOEAl9iKkRsktMPHdGjO4rtkBpf2I7TiTeA==", + "requires": { + "xtend": "~4.0.0" + } + }, "accepts": { "version": "1.3.7", "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.7.tgz", @@ -23301,6 +24286,11 @@ "regex-parser": "^2.2.11" } }, + "aes-js": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/aes-js/-/aes-js-3.1.2.tgz", + "integrity": "sha512-e5pEa2kBnBOgR4Y/p20pskXI74UEz7de8ZGVo58asOtvSVG5YAbJeELPZxOmt+Bnz3rX753YKhfIn4X4l1PPRQ==" + }, "agent-base": { "version": "6.0.2", "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz", @@ -23574,11 +24564,34 @@ "resolved": "https://registry.npmjs.org/async-each/-/async-each-1.0.3.tgz", "integrity": "sha512-z/WhQ5FPySLdvREByI2vZiTWwCnF0moMJ1hK9YQwDTHKh6I7/uSckMetoRGb5UBZPC1z0jlw+n/XCgjeH7y1AQ==" }, + "async-eventemitter": { + "version": "0.2.4", + "resolved": "https://registry.npmjs.org/async-eventemitter/-/async-eventemitter-0.2.4.tgz", + "integrity": "sha512-pd20BwL7Yt1zwDFy+8MX8F1+WCT8aQeKj0kQnTrH9WaeRETlRamVhD0JtRPmrV4GfOJ2F9CvdQkZeZhnh2TuHw==", + "requires": { + "async": "^2.4.0" + } + }, "async-limiter": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/async-limiter/-/async-limiter-1.0.1.tgz", "integrity": "sha512-csOlWGAcRFJaI6m+F2WKdnMKr4HhdhFVBk0H/QbJFMCr+uO2kwohwXQPxw/9OCxp05r5ghVBFSyioixx3gfkNQ==" }, + "async-mutex": { + "version": "0.2.6", + "resolved": "https://registry.npmjs.org/async-mutex/-/async-mutex-0.2.6.tgz", + "integrity": "sha512-Hs4R+4SPgamu6rSGW8C7cV9gaWUKEHykfzCCvIRuaVv636Ju10ZdeUbvb4TBEW0INuq2DHZqXbK4Nd3yG4RaRw==", + "requires": { + "tslib": "^2.0.0" + }, + "dependencies": { + "tslib": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.1.tgz", + "integrity": "sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw==" + } + } + }, "asynckit": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", @@ -23956,6 +24969,14 @@ "resolved": "https://registry.npmjs.org/babylon/-/babylon-6.18.0.tgz", "integrity": "sha512-q/UEjfGJ2Cm3oKV71DJz9d25TPnq5rhBVL2Q4fA5wcC3jcrdn7+SssEybFIxwAvvP+YCsCYNKughoF33GxgycQ==" }, + "backoff": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/backoff/-/backoff-2.5.0.tgz", + "integrity": "sha1-9hbtqdPktmuMp/ynn2lXIsX44m8=", + "requires": { + "precond": "0.2" + } + }, "balanced-match": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", @@ -24291,6 +25312,11 @@ "node-int64": "^0.4.0" } }, + "btoa": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/btoa/-/btoa-1.2.1.tgz", + "integrity": "sha512-SB4/MIGlsiVkMcHmT+pSmIPoNDoHg+7cMzmt3Uxt628MTz2487DKSqK/fuhFBrkuqrYv5UCEnACpF4dTFNKc/g==" + }, "buffer": { "version": "4.9.2", "resolved": "https://registry.npmjs.org/buffer/-/buffer-4.9.2.tgz", @@ -24537,6 +25563,14 @@ "resolved": "https://registry.npmjs.org/check-types/-/check-types-11.1.2.tgz", "integrity": "sha512-tzWzvgePgLORb9/3a0YenggReLKAIb2owL03H2Xdoe5pKcUyWRSEQ8xfCar8t2SIAuEDwtmx2da1YB52YuHQMQ==" }, + "checkpoint-store": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/checkpoint-store/-/checkpoint-store-1.1.0.tgz", + "integrity": "sha1-BOTLUWuRQziTWB5tRgGnjpVS6gY=", + "requires": { + "functional-red-black-tree": "^1.0.1" + } + }, "chokidar": { "version": "2.1.8", "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-2.1.8.tgz", @@ -24811,6 +25845,11 @@ "wrap-ansi": "^6.2.0" } }, + "clone": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/clone/-/clone-2.1.2.tgz", + "integrity": "sha1-G39Ln1kfHo+DZwQBYANFoCiHQ18=" + }, "clone-response": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/clone-response/-/clone-response-1.0.2.tgz", @@ -25232,6 +26271,22 @@ "sha.js": "^2.4.8" } }, + "cross-fetch": { + "version": "2.2.5", + "resolved": "https://registry.npmjs.org/cross-fetch/-/cross-fetch-2.2.5.tgz", + "integrity": "sha512-xqYAhQb4NhCJSRym03dwxpP1bYXpK3y7UN83Bo2WFi3x1Zmzn0SL/6xGoPr+gpt4WmNrgCCX3HPysvOwFOW36w==", + "requires": { + "node-fetch": "2.6.1", + "whatwg-fetch": "2.0.4" + }, + "dependencies": { + "whatwg-fetch": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/whatwg-fetch/-/whatwg-fetch-2.0.4.tgz", + "integrity": "sha512-dcQ1GWpOD/eEQ97k66aiEVpNnapVj90/+R+SXTPYGHpYBBypfKJEQjLrvMZ7YXbKm21gXd4NcuxUTjiv1YtLng==" + } + } + }, "cross-spawn": { "version": "6.0.5", "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", @@ -25665,6 +26720,14 @@ "resolved": "https://registry.npmjs.org/defer-to-connect/-/defer-to-connect-1.1.3.tgz", "integrity": "sha512-0ISdNousHvZT2EiFlZeZAHBUvSxmKswVCEf8hW7KWgG4a8MVEu/3Vb6uWYozkjylyCxe0JBIiRB1jV45S70WVQ==" }, + "deferred-leveldown": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/deferred-leveldown/-/deferred-leveldown-1.2.2.tgz", + "integrity": "sha512-uukrWD2bguRtXilKt6cAWKyoXrTSMo5m7crUdLfWQmu8kIm88w3QZoUL+6nhpfKVmhHANER6Re3sKoNoZ3IKMA==", + "requires": { + "abstract-leveldown": "~2.6.0" + } + }, "define-properties": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz", @@ -26882,6 +27945,26 @@ "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", "integrity": "sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc=" }, + "eth-block-tracker": { + "version": "4.4.3", + "resolved": "https://registry.npmjs.org/eth-block-tracker/-/eth-block-tracker-4.4.3.tgz", + "integrity": "sha512-A8tG4Z4iNg4mw5tP1Vung9N9IjgMNqpiMoJ/FouSFwNCGHv2X0mmOYwtQOJzki6XN7r7Tyo01S29p7b224I4jw==", + "requires": { + "@babel/plugin-transform-runtime": "^7.5.5", + "@babel/runtime": "^7.5.5", + "eth-query": "^2.1.0", + "json-rpc-random-id": "^1.0.1", + "pify": "^3.0.0", + "safe-event-emitter": "^1.0.1" + }, + "dependencies": { + "pify": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", + "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=" + } + } + }, "eth-ens-namehash": { "version": "2.0.8", "resolved": "https://registry.npmjs.org/eth-ens-namehash/-/eth-ens-namehash-2.0.8.tgz", @@ -26898,6 +27981,110 @@ } } }, + "eth-json-rpc-filters": { + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/eth-json-rpc-filters/-/eth-json-rpc-filters-4.2.2.tgz", + "integrity": "sha512-DGtqpLU7bBg63wPMWg1sCpkKCf57dJ+hj/k3zF26anXMzkmtSBDExL8IhUu7LUd34f0Zsce3PYNO2vV2GaTzaw==", + "requires": { + "@metamask/safe-event-emitter": "^2.0.0", + "async-mutex": "^0.2.6", + "eth-json-rpc-middleware": "^6.0.0", + "eth-query": "^2.1.2", + "json-rpc-engine": "^6.1.0", + "pify": "^5.0.0" + }, + "dependencies": { + "pify": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-5.0.0.tgz", + "integrity": "sha512-eW/gHNMlxdSP6dmG6uJip6FXN0EQBwm2clYYd8Wul42Cwu/DK8HEftzsapcNdYe2MfLiIwZqsDk2RDEsTE79hA==" + } + } + }, + "eth-json-rpc-infura": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/eth-json-rpc-infura/-/eth-json-rpc-infura-5.1.0.tgz", + "integrity": "sha512-THzLye3PHUSGn1EXMhg6WTLW9uim7LQZKeKaeYsS9+wOBcamRiCQVGHa6D2/4P0oS0vSaxsBnU/J6qvn0MPdow==", + "requires": { + "eth-json-rpc-middleware": "^6.0.0", + "eth-rpc-errors": "^3.0.0", + "json-rpc-engine": "^5.3.0", + "node-fetch": "^2.6.0" + }, + "dependencies": { + "json-rpc-engine": { + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/json-rpc-engine/-/json-rpc-engine-5.4.0.tgz", + "integrity": "sha512-rAffKbPoNDjuRnXkecTjnsE3xLLrb00rEkdgalINhaYVYIxDwWtvYBr9UFbhTvPB1B2qUOLoFd/cV6f4Q7mh7g==", + "requires": { + "eth-rpc-errors": "^3.0.0", + "safe-event-emitter": "^1.0.1" + } + } + } + }, + "eth-json-rpc-middleware": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/eth-json-rpc-middleware/-/eth-json-rpc-middleware-6.0.0.tgz", + "integrity": "sha512-qqBfLU2Uq1Ou15Wox1s+NX05S9OcAEL4JZ04VZox2NS0U+RtCMjSxzXhLFWekdShUPZ+P8ax3zCO2xcPrp6XJQ==", + "requires": { + "btoa": "^1.2.1", + "clone": "^2.1.1", + "eth-query": "^2.1.2", + "eth-rpc-errors": "^3.0.0", + "eth-sig-util": "^1.4.2", + "ethereumjs-util": "^5.1.2", + "json-rpc-engine": "^5.3.0", + "json-stable-stringify": "^1.0.1", + "node-fetch": "^2.6.1", + "pify": "^3.0.0", + "safe-event-emitter": "^1.0.1" + }, + "dependencies": { + "bn.js": { + "version": "4.12.0", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", + "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==" + }, + "eth-sig-util": { + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/eth-sig-util/-/eth-sig-util-1.4.2.tgz", + "integrity": "sha1-jZWCAsftuq6Dlwf7pvCf8ydgYhA=", + "requires": { + "ethereumjs-abi": "git+https://github.com/ethereumjs/ethereumjs-abi.git", + "ethereumjs-util": "^5.1.1" + } + }, + "ethereumjs-util": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-5.2.1.tgz", + "integrity": "sha512-v3kT+7zdyCm1HIqWlLNrHGqHGLpGYIhjeHxQjnDXjLT2FyGJDsd3LWMYUo7pAFRrk86CR3nUJfhC81CCoJNNGQ==", + "requires": { + "bn.js": "^4.11.0", + "create-hash": "^1.1.2", + "elliptic": "^6.5.2", + "ethereum-cryptography": "^0.1.3", + "ethjs-util": "^0.1.3", + "rlp": "^2.0.0", + "safe-buffer": "^5.1.1" + } + }, + "json-rpc-engine": { + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/json-rpc-engine/-/json-rpc-engine-5.4.0.tgz", + "integrity": "sha512-rAffKbPoNDjuRnXkecTjnsE3xLLrb00rEkdgalINhaYVYIxDwWtvYBr9UFbhTvPB1B2qUOLoFd/cV6f4Q7mh7g==", + "requires": { + "eth-rpc-errors": "^3.0.0", + "safe-event-emitter": "^1.0.1" + } + }, + "pify": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", + "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=" + } + } + }, "eth-lib": { "version": "0.1.29", "resolved": "https://registry.npmjs.org/eth-lib/-/eth-lib-0.1.29.tgz", @@ -26928,6 +28115,60 @@ } } }, + "eth-query": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/eth-query/-/eth-query-2.1.2.tgz", + "integrity": "sha1-1nQdkAAQa1FRDHLbktY2VFam2l4=", + "requires": { + "json-rpc-random-id": "^1.0.0", + "xtend": "^4.0.1" + } + }, + "eth-rpc-errors": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/eth-rpc-errors/-/eth-rpc-errors-3.0.0.tgz", + "integrity": "sha512-iPPNHPrLwUlR9xCSYm7HHQjWBasor3+KZfRvwEWxMz3ca0yqnlBeJrnyphkGIXZ4J7AMAaOLmwy4AWhnxOiLxg==", + "requires": { + "fast-safe-stringify": "^2.0.6" + } + }, + "eth-sig-util": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/eth-sig-util/-/eth-sig-util-3.0.1.tgz", + "integrity": "sha512-0Us50HiGGvZgjtWTyAI/+qTzYPMLy5Q451D0Xy68bxq1QMWdoOddDwGvsqcFT27uohKgalM9z/yxplyt+mY2iQ==", + "requires": { + "ethereumjs-abi": "^0.6.8", + "ethereumjs-util": "^5.1.1", + "tweetnacl": "^1.0.3", + "tweetnacl-util": "^0.15.0" + }, + "dependencies": { + "bn.js": { + "version": "4.12.0", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", + "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==" + }, + "ethereumjs-util": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-5.2.1.tgz", + "integrity": "sha512-v3kT+7zdyCm1HIqWlLNrHGqHGLpGYIhjeHxQjnDXjLT2FyGJDsd3LWMYUo7pAFRrk86CR3nUJfhC81CCoJNNGQ==", + "requires": { + "bn.js": "^4.11.0", + "create-hash": "^1.1.2", + "elliptic": "^6.5.2", + "ethereum-cryptography": "^0.1.3", + "ethjs-util": "^0.1.3", + "rlp": "^2.0.0", + "safe-buffer": "^5.1.1" + } + }, + "tweetnacl": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-1.0.3.tgz", + "integrity": "sha512-6rt+RN7aOi1nGMyC4Xa5DdYiukl2UWCbcJft7YhxReBGQD7OAM8Pbxw6YMo4r2diNEA8FEmu32YOn9rhaiE5yw==" + } + } + }, "ethereum-bloom-filters": { "version": "1.0.10", "resolved": "https://registry.npmjs.org/ethereum-bloom-filters/-/ethereum-bloom-filters-1.0.10.tgz", @@ -26936,6 +28177,11 @@ "js-sha3": "^0.8.0" } }, + "ethereum-common": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/ethereum-common/-/ethereum-common-0.2.0.tgz", + "integrity": "sha512-XOnAR/3rntJgbCdGhqdaLIxDLWKLmsZOGhHdBKadEr6gEnJLH52k93Ou+TUdFaPN3hJc3isBZBal3U/XZ15abA==" + }, "ethereum-cryptography": { "version": "0.1.3", "resolved": "https://registry.npmjs.org/ethereum-cryptography/-/ethereum-cryptography-0.1.3.tgz", @@ -26958,6 +28204,144 @@ "setimmediate": "^1.0.5" } }, + "ethereum-protocol": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/ethereum-protocol/-/ethereum-protocol-1.0.1.tgz", + "integrity": "sha512-3KLX1mHuEsBW0dKG+c6EOJS1NBNqdCICvZW9sInmZTt5aY0oxmHVggYRE0lJu1tcnMD1K+AKHdLi6U43Awm1Vg==" + }, + "ethereumjs-abi": { + "version": "git+ssh://git@github.com/ethereumjs/ethereumjs-abi.git#ee3994657fa7a427238e6ba92a84d0b529bbcde0", + "from": "ethereumjs-abi@^0.6.8", + "requires": { + "bn.js": "^4.11.8", + "ethereumjs-util": "^6.0.0" + }, + "dependencies": { + "bn.js": { + "version": "4.12.0", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", + "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==" + }, + "ethereumjs-util": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-6.2.1.tgz", + "integrity": "sha512-W2Ktez4L01Vexijrm5EB6w7dg4n/TgpoYU4avuT5T3Vmnw/eCRtiBrJfQYS/DCSvDIOLn2k57GcHdeBcgVxAqw==", + "requires": { + "@types/bn.js": "^4.11.3", + "bn.js": "^4.11.0", + "create-hash": "^1.1.2", + "elliptic": "^6.5.2", + "ethereum-cryptography": "^0.1.3", + "ethjs-util": "0.1.6", + "rlp": "^2.2.3" + } + } + } + }, + "ethereumjs-account": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/ethereumjs-account/-/ethereumjs-account-2.0.5.tgz", + "integrity": "sha512-bgDojnXGjhMwo6eXQC0bY6UK2liSFUSMwwylOmQvZbSl/D7NXQ3+vrGO46ZeOgjGfxXmgIeVNDIiHw7fNZM4VA==", + "requires": { + "ethereumjs-util": "^5.0.0", + "rlp": "^2.0.0", + "safe-buffer": "^5.1.1" + }, + "dependencies": { + "bn.js": { + "version": "4.12.0", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", + "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==" + }, + "ethereumjs-util": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-5.2.1.tgz", + "integrity": "sha512-v3kT+7zdyCm1HIqWlLNrHGqHGLpGYIhjeHxQjnDXjLT2FyGJDsd3LWMYUo7pAFRrk86CR3nUJfhC81CCoJNNGQ==", + "requires": { + "bn.js": "^4.11.0", + "create-hash": "^1.1.2", + "elliptic": "^6.5.2", + "ethereum-cryptography": "^0.1.3", + "ethjs-util": "^0.1.3", + "rlp": "^2.0.0", + "safe-buffer": "^5.1.1" + } + } + } + }, + "ethereumjs-block": { + "version": "1.7.1", + "resolved": "https://registry.npmjs.org/ethereumjs-block/-/ethereumjs-block-1.7.1.tgz", + "integrity": "sha512-B+sSdtqm78fmKkBq78/QLKJbu/4Ts4P2KFISdgcuZUPDm9x+N7qgBPIIFUGbaakQh8bzuquiRVbdmvPKqbILRg==", + "requires": { + "async": "^2.0.1", + "ethereum-common": "0.2.0", + "ethereumjs-tx": "^1.2.2", + "ethereumjs-util": "^5.0.0", + "merkle-patricia-tree": "^2.1.2" + }, + "dependencies": { + "bn.js": { + "version": "4.12.0", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", + "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==" + }, + "ethereumjs-util": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-5.2.1.tgz", + "integrity": "sha512-v3kT+7zdyCm1HIqWlLNrHGqHGLpGYIhjeHxQjnDXjLT2FyGJDsd3LWMYUo7pAFRrk86CR3nUJfhC81CCoJNNGQ==", + "requires": { + "bn.js": "^4.11.0", + "create-hash": "^1.1.2", + "elliptic": "^6.5.2", + "ethereum-cryptography": "^0.1.3", + "ethjs-util": "^0.1.3", + "rlp": "^2.0.0", + "safe-buffer": "^5.1.1" + } + } + } + }, + "ethereumjs-common": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/ethereumjs-common/-/ethereumjs-common-1.5.2.tgz", + "integrity": "sha512-hTfZjwGX52GS2jcVO6E2sx4YuFnf0Fhp5ylo4pEPhEffNln7vS59Hr5sLnp3/QCazFLluuBZ+FZ6J5HTp0EqCA==" + }, + "ethereumjs-tx": { + "version": "1.3.7", + "resolved": "https://registry.npmjs.org/ethereumjs-tx/-/ethereumjs-tx-1.3.7.tgz", + "integrity": "sha512-wvLMxzt1RPhAQ9Yi3/HKZTn0FZYpnsmQdbKYfUUpi4j1SEIcbkd9tndVjcPrufY3V7j2IebOpC00Zp2P/Ay2kA==", + "requires": { + "ethereum-common": "^0.0.18", + "ethereumjs-util": "^5.0.0" + }, + "dependencies": { + "bn.js": { + "version": "4.12.0", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", + "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==" + }, + "ethereum-common": { + "version": "0.0.18", + "resolved": "https://registry.npmjs.org/ethereum-common/-/ethereum-common-0.0.18.tgz", + "integrity": "sha1-L9w1dvIykDNYl26znaeDIT/5Uj8=" + }, + "ethereumjs-util": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-5.2.1.tgz", + "integrity": "sha512-v3kT+7zdyCm1HIqWlLNrHGqHGLpGYIhjeHxQjnDXjLT2FyGJDsd3LWMYUo7pAFRrk86CR3nUJfhC81CCoJNNGQ==", + "requires": { + "bn.js": "^4.11.0", + "create-hash": "^1.1.2", + "elliptic": "^6.5.2", + "ethereum-cryptography": "^0.1.3", + "ethjs-util": "^0.1.3", + "rlp": "^2.0.0", + "safe-buffer": "^5.1.1" + } + } + } + }, "ethereumjs-util": { "version": "7.1.3", "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-7.1.3.tgz", @@ -26980,6 +28364,97 @@ } } }, + "ethereumjs-vm": { + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/ethereumjs-vm/-/ethereumjs-vm-2.6.0.tgz", + "integrity": "sha512-r/XIUik/ynGbxS3y+mvGnbOKnuLo40V5Mj1J25+HEO63aWYREIqvWeRO/hnROlMBE5WoniQmPmhiaN0ctiHaXw==", + "requires": { + "async": "^2.1.2", + "async-eventemitter": "^0.2.2", + "ethereumjs-account": "^2.0.3", + "ethereumjs-block": "~2.2.0", + "ethereumjs-common": "^1.1.0", + "ethereumjs-util": "^6.0.0", + "fake-merkle-patricia-tree": "^1.0.1", + "functional-red-black-tree": "^1.0.1", + "merkle-patricia-tree": "^2.3.2", + "rustbn.js": "~0.2.0", + "safe-buffer": "^5.1.1" + }, + "dependencies": { + "bn.js": { + "version": "4.12.0", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", + "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==" + }, + "ethereumjs-block": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/ethereumjs-block/-/ethereumjs-block-2.2.2.tgz", + "integrity": "sha512-2p49ifhek3h2zeg/+da6XpdFR3GlqY3BIEiqxGF8j9aSRIgkb7M1Ky+yULBKJOu8PAZxfhsYA+HxUk2aCQp3vg==", + "requires": { + "async": "^2.0.1", + "ethereumjs-common": "^1.5.0", + "ethereumjs-tx": "^2.1.1", + "ethereumjs-util": "^5.0.0", + "merkle-patricia-tree": "^2.1.2" + }, + "dependencies": { + "ethereumjs-util": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-5.2.1.tgz", + "integrity": "sha512-v3kT+7zdyCm1HIqWlLNrHGqHGLpGYIhjeHxQjnDXjLT2FyGJDsd3LWMYUo7pAFRrk86CR3nUJfhC81CCoJNNGQ==", + "requires": { + "bn.js": "^4.11.0", + "create-hash": "^1.1.2", + "elliptic": "^6.5.2", + "ethereum-cryptography": "^0.1.3", + "ethjs-util": "^0.1.3", + "rlp": "^2.0.0", + "safe-buffer": "^5.1.1" + } + } + } + }, + "ethereumjs-tx": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ethereumjs-tx/-/ethereumjs-tx-2.1.2.tgz", + "integrity": "sha512-zZEK1onCeiORb0wyCXUvg94Ve5It/K6GD1K+26KfFKodiBiS6d9lfCXlUKGBBdQ+bv7Day+JK0tj1K+BeNFRAw==", + "requires": { + "ethereumjs-common": "^1.5.0", + "ethereumjs-util": "^6.0.0" + } + }, + "ethereumjs-util": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-6.2.1.tgz", + "integrity": "sha512-W2Ktez4L01Vexijrm5EB6w7dg4n/TgpoYU4avuT5T3Vmnw/eCRtiBrJfQYS/DCSvDIOLn2k57GcHdeBcgVxAqw==", + "requires": { + "@types/bn.js": "^4.11.3", + "bn.js": "^4.11.0", + "create-hash": "^1.1.2", + "elliptic": "^6.5.2", + "ethereum-cryptography": "^0.1.3", + "ethjs-util": "0.1.6", + "rlp": "^2.2.3" + } + } + } + }, + "ethereumjs-wallet": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/ethereumjs-wallet/-/ethereumjs-wallet-1.0.2.tgz", + "integrity": "sha512-CCWV4RESJgRdHIvFciVQFnCHfqyhXWchTPlkfp28Qc53ufs+doi5I/cV2+xeK9+qEo25XCWfP9MiL+WEPAZfdA==", + "requires": { + "aes-js": "^3.1.2", + "bs58check": "^2.1.2", + "ethereum-cryptography": "^0.1.3", + "ethereumjs-util": "^7.1.2", + "randombytes": "^2.1.0", + "scrypt-js": "^3.0.1", + "utf8": "^3.0.0", + "uuid": "^8.3.2" + } + }, "ethjs-unit": { "version": "0.1.6", "resolved": "https://registry.npmjs.org/ethjs-unit/-/ethjs-unit-0.1.6.tgz", @@ -26996,6 +28471,15 @@ } } }, + "ethjs-util": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/ethjs-util/-/ethjs-util-0.1.6.tgz", + "integrity": "sha512-CUnVOQq7gSpDHZVVrQW8ExxUETWrnrvXYvYz55wOU8Uj4VCgw56XC2B/fVqQN+f7gmrnRHSLVnFAwsCuNwji8w==", + "requires": { + "is-hex-prefixed": "1.0.0", + "strip-hex-prefix": "1.0.0" + } + }, "eventemitter3": { "version": "4.0.7", "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-4.0.7.tgz", @@ -27282,6 +28766,14 @@ "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=" }, + "fake-merkle-patricia-tree": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/fake-merkle-patricia-tree/-/fake-merkle-patricia-tree-1.0.1.tgz", + "integrity": "sha1-S4w6z7Ugr635hgsfFM2M40As3dM=", + "requires": { + "checkpoint-store": "^1.1.0" + } + }, "fast-deep-equal": { "version": "3.1.3", "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", @@ -27309,6 +28801,11 @@ "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=" }, + "fast-safe-stringify": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/fast-safe-stringify/-/fast-safe-stringify-2.1.1.tgz", + "integrity": "sha512-W+KJc2dmILlPplD/H4K9l9LcAHAfPtP6BY84uVLXQ6Evcz9Lcg33Y2z1IVblT6xdY54PXYVHEv+0Wpq8Io6zkA==" + }, "fastq": { "version": "1.13.0", "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.13.0.tgz", @@ -28454,6 +29951,11 @@ "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.0.tgz", "integrity": "sha512-CmxgYGiEPCLhfLnpPp1MoRmifwEIOgjcHXxOBjv7mY96c+eWScsOP9c112ZyLdWHi0FxHjI+4uVhKYp/gcdRmQ==" }, + "immediate": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/immediate/-/immediate-3.3.0.tgz", + "integrity": "sha512-HR7EVodfFUdQCTIeySw+WDRFJlPcLOJbXfwwZ7Oom6tjsvZ3bOkCDJHehQC3nxJrv7+f9XecwazynjU8e4Vw3Q==" + }, "immer": { "version": "8.0.1", "resolved": "https://registry.npmjs.org/immer/-/immer-8.0.1.tgz", @@ -28747,6 +30249,11 @@ "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=" }, + "is-fn": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-fn/-/is-fn-1.0.0.tgz", + "integrity": "sha1-lUPV3nvPWwiiLsiiC65uKG1RDYw=" + }, "is-fullwidth-code-point": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", @@ -30048,6 +31555,30 @@ "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==" }, + "json-rpc-engine": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/json-rpc-engine/-/json-rpc-engine-6.1.0.tgz", + "integrity": "sha512-NEdLrtrq1jUZyfjkr9OCz9EzCNhnRyWtt1PAnvnhwy6e8XETS0Dtc+ZNCO2gvuAoKsIn2+vCSowXTYE4CkgnAQ==", + "requires": { + "@metamask/safe-event-emitter": "^2.0.0", + "eth-rpc-errors": "^4.0.2" + }, + "dependencies": { + "eth-rpc-errors": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/eth-rpc-errors/-/eth-rpc-errors-4.0.3.tgz", + "integrity": "sha512-Z3ymjopaoft7JDoxZcEb3pwdGh7yiYMhOwm2doUt6ASXlMavpNlK6Cre0+IMl2VSGyEU9rkiperQhp5iRxn5Pg==", + "requires": { + "fast-safe-stringify": "^2.0.6" + } + } + } + }, + "json-rpc-random-id": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json-rpc-random-id/-/json-rpc-random-id-1.0.1.tgz", + "integrity": "sha1-uknZat7RRE27jaPSA3SKy7zeyMg=" + }, "json-schema": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.4.0.tgz", @@ -30058,6 +31589,14 @@ "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==" }, + "json-stable-stringify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json-stable-stringify/-/json-stable-stringify-1.0.1.tgz", + "integrity": "sha1-mnWdOcXy/1A/1TAGRu1EX4jE+a8=", + "requires": { + "jsonify": "~0.0.0" + } + }, "json-stable-stringify-without-jsonify": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", @@ -30090,6 +31629,11 @@ "universalify": "^2.0.0" } }, + "jsonify": { + "version": "0.0.0", + "resolved": "https://registry.npmjs.org/jsonify/-/jsonify-0.0.0.tgz", + "integrity": "sha1-LHS27kHZPKUbe1qu6PUDYx0lKnM=" + }, "jsprim": { "version": "1.4.2", "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.2.tgz", @@ -30182,6 +31726,119 @@ "webpack-sources": "^1.1.0" } }, + "level-codec": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/level-codec/-/level-codec-7.0.1.tgz", + "integrity": "sha512-Ua/R9B9r3RasXdRmOtd+t9TCOEIIlts+TN/7XTT2unhDaL6sJn83S3rUyljbr6lVtw49N3/yA0HHjpV6Kzb2aQ==" + }, + "level-errors": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/level-errors/-/level-errors-1.0.5.tgz", + "integrity": "sha512-/cLUpQduF6bNrWuAC4pwtUKA5t669pCsCi2XbmojG2tFeOr9j6ShtdDCtFFQO1DRt+EVZhx9gPzP9G2bUaG4ig==", + "requires": { + "errno": "~0.1.1" + } + }, + "level-iterator-stream": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/level-iterator-stream/-/level-iterator-stream-1.3.1.tgz", + "integrity": "sha1-5Dt4sagUPm+pek9IXrjqUwNS8u0=", + "requires": { + "inherits": "^2.0.1", + "level-errors": "^1.0.3", + "readable-stream": "^1.0.33", + "xtend": "^4.0.0" + }, + "dependencies": { + "isarray": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=" + }, + "readable-stream": { + "version": "1.1.14", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz", + "integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=", + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.1", + "isarray": "0.0.1", + "string_decoder": "~0.10.x" + } + }, + "string_decoder": { + "version": "0.10.31", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", + "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=" + } + } + }, + "level-ws": { + "version": "0.0.0", + "resolved": "https://registry.npmjs.org/level-ws/-/level-ws-0.0.0.tgz", + "integrity": "sha1-Ny5RIXeSSgBCSwtDrvK7QkltIos=", + "requires": { + "readable-stream": "~1.0.15", + "xtend": "~2.1.1" + }, + "dependencies": { + "isarray": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=" + }, + "object-keys": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-0.4.0.tgz", + "integrity": "sha1-KKaq50KN0sOpLz2V8hM13SBOAzY=" + }, + "readable-stream": { + "version": "1.0.34", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz", + "integrity": "sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw=", + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.1", + "isarray": "0.0.1", + "string_decoder": "~0.10.x" + } + }, + "string_decoder": { + "version": "0.10.31", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", + "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=" + }, + "xtend": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/xtend/-/xtend-2.1.2.tgz", + "integrity": "sha1-bv7MKk2tjmlixJAbM3znuoe10os=", + "requires": { + "object-keys": "~0.4.0" + } + } + } + }, + "levelup": { + "version": "1.3.9", + "resolved": "https://registry.npmjs.org/levelup/-/levelup-1.3.9.tgz", + "integrity": "sha512-VVGHfKIlmw8w1XqpGOAGwq6sZm2WwWLmlDcULkKWQXEA5EopA8OBNJ2Ck2v6bdk8HeEZSbCSEgzXadyQFm76sQ==", + "requires": { + "deferred-leveldown": "~1.2.1", + "level-codec": "~7.0.0", + "level-errors": "~1.0.3", + "level-iterator-stream": "~1.3.0", + "prr": "~1.0.1", + "semver": "~5.4.1", + "xtend": "~4.0.0" + }, + "dependencies": { + "semver": { + "version": "5.4.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.4.1.tgz", + "integrity": "sha512-WfG/X9+oATh81XtllIo/I8gOiY9EXRdv1cQdyykeXK17YcUW3EXUAi2To4pcH6nZtJPr7ZOpM5OMyWJZm+8Rsg==" + } + } + }, "leven": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/leven/-/leven-3.1.0.tgz", @@ -30317,6 +31974,11 @@ "yallist": "^4.0.0" } }, + "ltgt": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/ltgt/-/ltgt-2.2.1.tgz", + "integrity": "sha1-81ypHEk/e3PaDgdJUwTxezH4fuU=" + }, "lz-string": { "version": "1.4.4", "resolved": "https://registry.npmjs.org/lz-string/-/lz-string-1.4.4.tgz", @@ -30387,6 +32049,29 @@ "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", "integrity": "sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g=" }, + "memdown": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/memdown/-/memdown-1.4.1.tgz", + "integrity": "sha1-tOThkhdGZP+65BNhqlAPMRnv4hU=", + "requires": { + "abstract-leveldown": "~2.7.1", + "functional-red-black-tree": "^1.0.1", + "immediate": "^3.2.3", + "inherits": "~2.0.1", + "ltgt": "~2.2.0", + "safe-buffer": "~5.1.1" + }, + "dependencies": { + "abstract-leveldown": { + "version": "2.7.2", + "resolved": "https://registry.npmjs.org/abstract-leveldown/-/abstract-leveldown-2.7.2.tgz", + "integrity": "sha512-+OVvxH2rHVEhWLdbudP6p0+dNMXu8JA1CbhP19T8paTYAcX7oJ4OVjT+ZUVpv7mITxXHqDMej+GdqXBmXkw09w==", + "requires": { + "xtend": "~4.0.0" + } + } + } + }, "memory-fs": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/memory-fs/-/memory-fs-0.4.1.tgz", @@ -30411,6 +32096,47 @@ "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==" }, + "merkle-patricia-tree": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/merkle-patricia-tree/-/merkle-patricia-tree-2.3.2.tgz", + "integrity": "sha512-81PW5m8oz/pz3GvsAwbauj7Y00rqm81Tzad77tHBwU7pIAtN+TJnMSOJhxBKflSVYhptMMb9RskhqHqrSm1V+g==", + "requires": { + "async": "^1.4.2", + "ethereumjs-util": "^5.0.0", + "level-ws": "0.0.0", + "levelup": "^1.2.1", + "memdown": "^1.0.0", + "readable-stream": "^2.0.0", + "rlp": "^2.0.0", + "semaphore": ">=1.0.1" + }, + "dependencies": { + "async": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/async/-/async-1.5.2.tgz", + "integrity": "sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo=" + }, + "bn.js": { + "version": "4.12.0", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", + "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==" + }, + "ethereumjs-util": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-5.2.1.tgz", + "integrity": "sha512-v3kT+7zdyCm1HIqWlLNrHGqHGLpGYIhjeHxQjnDXjLT2FyGJDsd3LWMYUo7pAFRrk86CR3nUJfhC81CCoJNNGQ==", + "requires": { + "bn.js": "^4.11.0", + "create-hash": "^1.1.2", + "elliptic": "^6.5.2", + "ethereum-cryptography": "^0.1.3", + "ethjs-util": "^0.1.3", + "rlp": "^2.0.0", + "safe-buffer": "^5.1.1" + } + } + } + }, "methods": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", @@ -30837,6 +32563,11 @@ "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-2.0.2.tgz", "integrity": "sha512-Ntyt4AIXyaLIuMHF6IOoTakB3K+RWxwtsHNRxllEoA6vPwP9o4866g6YWDLUdnucilZhmkxiHwHr11gAENw+QA==" }, + "node-fetch": { + "version": "2.6.1", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.1.tgz", + "integrity": "sha512-V4aYg89jEoVRxRb2fJdAg8FHvI7cEyYdVAh94HH0UIK8oJxUfkjlDQN9RbMx+bEjP7+ggMiFRprSti032Oipxw==" + }, "node-forge": { "version": "0.10.0", "resolved": "https://registry.npmjs.org/node-forge/-/node-forge-0.10.0.tgz", @@ -32579,6 +34310,11 @@ "uniq": "^1.0.1" } }, + "precond": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/precond/-/precond-0.2.3.tgz", + "integrity": "sha1-qpWRvKokkj8eD0hJ0kD0fvwQdaw=" + }, "prelude-ls": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", @@ -32653,6 +34389,15 @@ "resolved": "https://registry.npmjs.org/promise-inflight/-/promise-inflight-1.0.1.tgz", "integrity": "sha1-mEcocL8igTL8vdhoEputEsPAKeM=" }, + "promise-to-callback": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/promise-to-callback/-/promise-to-callback-1.0.0.tgz", + "integrity": "sha1-XSp0kBC/tn2WNZj805YHRqaP7vc=", + "requires": { + "is-fn": "^1.0.0", + "set-immediate-shim": "^1.0.1" + } + }, "prompts": { "version": "2.4.0", "resolved": "https://registry.npmjs.org/prompts/-/prompts-2.4.0.tgz", @@ -33922,11 +35667,24 @@ "aproba": "^1.1.1" } }, + "rustbn.js": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/rustbn.js/-/rustbn.js-0.2.0.tgz", + "integrity": "sha512-4VlvkRUuCJvr2J6Y0ImW7NvTCriMi7ErOAqWk1y69vAdoNIzCF3yPmgeNzx+RQTLEDFq5sHfscn1MwHxP9hNfA==" + }, "safe-buffer": { "version": "5.1.2", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" }, + "safe-event-emitter": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/safe-event-emitter/-/safe-event-emitter-1.0.1.tgz", + "integrity": "sha512-e1wFe99A91XYYxoQbcq2ZJUWurxEyP8vfz7A7vuUe1s95q8r5ebraVaA1BukYJcpM6V16ugWoD9vngi8Ccu5fg==", + "requires": { + "events": "^3.0.0" + } + }, "safe-regex": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/safe-regex/-/safe-regex-1.1.0.tgz", @@ -34159,6 +35917,11 @@ "node-forge": "^0.10.0" } }, + "semaphore": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/semaphore/-/semaphore-1.1.0.tgz", + "integrity": "sha512-O4OZEaNtkMd/K0i6js9SL+gqy0ZCBMgUvlSqHKi4IBdjhe7wB8pwztUk1BbZ1fmrvpwFrPbHzqd2w5pTcJH6LA==" + }, "semver": { "version": "7.3.2", "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.2.tgz", @@ -34292,6 +36055,11 @@ "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=" }, + "set-immediate-shim": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/set-immediate-shim/-/set-immediate-shim-1.0.1.tgz", + "integrity": "sha1-SysbJ+uAip+NzEgaWOXlb1mfP2E=" + }, "set-value": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/set-value/-/set-value-2.0.1.tgz", @@ -35627,6 +37395,11 @@ "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=" }, + "tweetnacl-util": { + "version": "0.15.1", + "resolved": "https://registry.npmjs.org/tweetnacl-util/-/tweetnacl-util-0.15.1.tgz", + "integrity": "sha512-RKJBIj8lySrShN4w6i/BonWp2Z/uxwC3h4y7xsRrpP59ZboCd0GpEVsOnMDYLMmKBpYhb5TgHzZXy7wTfYFBRw==" + }, "type": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/type/-/type-1.2.0.tgz", @@ -36409,6 +38182,73 @@ "web3-utils": "1.6.1" } }, + "web3-provider-engine": { + "version": "16.0.3", + "resolved": "https://registry.npmjs.org/web3-provider-engine/-/web3-provider-engine-16.0.3.tgz", + "integrity": "sha512-Q3bKhGqLfMTdLvkd4TtkGYJHcoVQ82D1l8jTIwwuJp/sAp7VHnRYb9YJ14SW/69VMWoOhSpPLZV2tWb9V0WJoA==", + "requires": { + "@ethereumjs/tx": "^3.3.0", + "async": "^2.5.0", + "backoff": "^2.5.0", + "clone": "^2.0.0", + "cross-fetch": "^2.1.0", + "eth-block-tracker": "^4.4.2", + "eth-json-rpc-filters": "^4.2.1", + "eth-json-rpc-infura": "^5.1.0", + "eth-json-rpc-middleware": "^6.0.0", + "eth-rpc-errors": "^3.0.0", + "eth-sig-util": "^1.4.2", + "ethereumjs-block": "^1.2.2", + "ethereumjs-util": "^5.1.5", + "ethereumjs-vm": "^2.3.4", + "json-stable-stringify": "^1.0.1", + "promise-to-callback": "^1.0.0", + "readable-stream": "^2.2.9", + "request": "^2.85.0", + "semaphore": "^1.0.3", + "ws": "^5.1.1", + "xhr": "^2.2.0", + "xtend": "^4.0.1" + }, + "dependencies": { + "bn.js": { + "version": "4.12.0", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", + "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==" + }, + "eth-sig-util": { + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/eth-sig-util/-/eth-sig-util-1.4.2.tgz", + "integrity": "sha1-jZWCAsftuq6Dlwf7pvCf8ydgYhA=", + "requires": { + "ethereumjs-abi": "git+https://github.com/ethereumjs/ethereumjs-abi.git", + "ethereumjs-util": "^5.1.1" + } + }, + "ethereumjs-util": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-5.2.1.tgz", + "integrity": "sha512-v3kT+7zdyCm1HIqWlLNrHGqHGLpGYIhjeHxQjnDXjLT2FyGJDsd3LWMYUo7pAFRrk86CR3nUJfhC81CCoJNNGQ==", + "requires": { + "bn.js": "^4.11.0", + "create-hash": "^1.1.2", + "elliptic": "^6.5.2", + "ethereum-cryptography": "^0.1.3", + "ethjs-util": "^0.1.3", + "rlp": "^2.0.0", + "safe-buffer": "^5.1.1" + } + }, + "ws": { + "version": "5.2.3", + "resolved": "https://registry.npmjs.org/ws/-/ws-5.2.3.tgz", + "integrity": "sha512-jZArVERrMsKUatIdnLzqvcfydI85dvd/Fp1u/VOpfdDWQ4c9qWXe+VIeAbQ5FrDwciAkr+lzofXLz3Kuf26AOA==", + "requires": { + "async-limiter": "~1.0.0" + } + } + } + }, "web3-providers-http": { "version": "1.6.1", "resolved": "https://registry.npmjs.org/web3-providers-http/-/web3-providers-http-1.6.1.tgz", diff --git a/package.json b/package.json index 364da1c..6b59177 100644 --- a/package.json +++ b/package.json @@ -6,6 +6,7 @@ "@testing-library/jest-dom": "^5.16.1", "@testing-library/react": "^12.1.2", "@testing-library/user-event": "^13.5.0", + "@truffle/hdwallet-provider": "^2.0.0", "axios": "^0.21.4", "chokidar": "^2.1.8", "react": "^17.0.2", diff --git a/src/contractCode/Betting.json b/src/contractCode/Betting.json index bb4ffdc..5f9b1d4 100644 --- a/src/contractCode/Betting.json +++ b/src/contractCode/Betting.json @@ -188,13 +188,13 @@ "type": "function" } ], - "metadata": "{\"compiler\":{\"version\":\"0.5.0+commit.1d4f565a\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"constant\":true,\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"games\",\"outputs\":[{\"name\":\"totalBetsHome\",\"type\":\"uint256\"},{\"name\":\"totalBetsAway\",\"type\":\"uint256\"},{\"name\":\"takenPlace\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_teamSelected\",\"type\":\"uint8\"},{\"name\":\"_gameID\",\"type\":\"uint256\"}],\"name\":\"bet\",\"outputs\":[],\"payable\":true,\"stateMutability\":\"payable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_gameID\",\"type\":\"uint256\"}],\"name\":\"AmountHome\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_gameID\",\"type\":\"uint256\"}],\"name\":\"AmountAway\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_player\",\"type\":\"address\"},{\"name\":\"_gameID\",\"type\":\"uint256\"}],\"name\":\"checkPlayerExists\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_new_game_ids\",\"type\":\"uint256[]\"}],\"name\":\"populateGames\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"minimumBet\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_teamWinner\",\"type\":\"uint16\"},{\"name\":\"_gameID\",\"type\":\"uint256\"}],\"name\":\"distributePrizes\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"}],\"devdoc\":{\"methods\":{}},\"userdoc\":{\"methods\":{}}},\"settings\":{\"compilationTarget\":{\"project:/contracts/Betting.sol\":\"Betting\"},\"evmVersion\":\"byzantium\",\"libraries\":{},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"project:/contracts/Betting.sol\":{\"keccak256\":\"0x39dd054269d7c902cdc038ce345e24ae39bcf668f4e28662a0c0abfdece839ee\",\"urls\":[\"bzzr://012cfd712fd5f1d649d94b2c71a601bcb8cfebd0e35b3d70ba6f056759f7e4a5\"]}},\"version\":1}", - "bytecode": "0x6080604052606060405190810160405280602381526020017f5065657220746f2050656572204261736b657462616c6c2042657474696e672081526020017f4170700000000000000000000000000000000000000000000000000000000000815250600090805190602001906100769291906100d7565b5034801561008357600080fd5b50655af3107a400060028190555033600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555061017c565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061011857805160ff1916838001178555610146565b82800160010185558215610146579182015b8281111561014557825182559160200191906001019061012a565b5b5090506101539190610157565b5090565b61017991905b8082111561017557600081600090555060010161015d565b5090565b90565b610ec78061018b6000396000f3fe6080604052600436106100a4576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806306fdde03146100a9578063117a5b90146101395780637c6953841461019a5780638363b00c146101d55780638da5cb5b14610224578063a0caa0931461027b578063a1d5ada7146102ca578063adb416f11461033d578063c38a8afd14610402578063e44ae4d41461042d575b600080fd5b3480156100b557600080fd5b506100be610476565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156100fe5780820151818401526020810190506100e3565b50505050905090810190601f16801561012b5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561014557600080fd5b506101726004803603602081101561015c57600080fd5b8101908080359060200190929190505050610514565b6040518084815260200183815260200182151515158152602001935050505060405180910390f35b6101d3600480360360408110156101b057600080fd5b81019080803560ff1690602001909291908035906020019092919050505061054b565b005b3480156101e157600080fd5b5061020e600480360360208110156101f857600080fd5b8101908080359060200190929190505050610703565b6040518082815260200191505060405180910390f35b34801561023057600080fd5b50610239610723565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561028757600080fd5b506102b46004803603602081101561029e57600080fd5b8101908080359060200190929190505050610749565b6040518082815260200191505060405180910390f35b3480156102d657600080fd5b50610323600480360360408110156102ed57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610769565b604051808215151515815260200191505060405180910390f35b34801561034957600080fd5b506104006004803603602081101561036057600080fd5b810190808035906020019064010000000081111561037d57600080fd5b82018360208201111561038f57600080fd5b803590602001918460208302840111640100000000831117156103b157600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050509192919290505050610836565b005b34801561040e57600080fd5b5061041761092b565b6040518082815260200191505060405180910390f35b34801561043957600080fd5b506104746004803603604081101561045057600080fd5b81019080803561ffff16906020019092919080359060200190929190505050610931565b005b60008054600181600116156101000203166002900480601f01602080910402602001604051908101604052809291908181526020018280546001816001161561010002031660029004801561050c5780601f106104e15761010080835404028352916020019161050c565b820191906000526020600020905b8154815290600101906020018083116104ef57829003601f168201915b505050505081565b60036020528060005260406000206000915090508060000154908060010154908060020160009054906101000a900460ff16905083565b6105553382610769565b15151561056157600080fd5b600254341015151561057257600080fd5b346003600083815260200190815260200160002060040160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600001819055508160ff166003600083815260200190815260200160002060040160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060010181905550600360008281526020019081526020016000206003013390806001815401808255809150509060018203906000526020600020016000909192909190916101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505060018260ff1614156106da573460036000838152602001908152602001600020600001600082825401925050819055506106ff565b3460036000838152602001908152602001600020600101600082825401925050819055505b5050565b600060036000838152602001908152602001600020600001549050919050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600060036000838152602001908152602001600020600101549050919050565b600080600090505b600360008481526020019081526020016000206003018054905081101561082a578373ffffffffffffffffffffffffffffffffffffffff1660036000858152602001908152602001600020600301828154811015156107cc57fe5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16141561081d576001915050610830565b8080600101915050610771565b50600090505b92915050565b60008090505b815181101561092757608060405190810160405280600081526020016000815260200160001515815260200160006040519080825280602002602001820160405280156108985781602001602082028038833980820191505090505b508152506003600084848151811015156108ae57fe5b906020019060200201518152602001908152602001600020600082015181600001556020820151816001015560408201518160020160006101000a81548160ff0219169083151502179055506060820151816003019080519060200190610916929190610da9565b50905050808060010191505061083c565b5050565b60025481565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156109f6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260188152602001807f63616c6c6572206d75737420626520746865206f776e6572000000000000000081525060200191505060405180910390fd5b6109fe610e33565b60008090506000809050600080905060008060036000888152602001908152602001600020600001549050600060036000898152602001908152602001600020600101549050600082148015610a545750600081145b1515610d6f576000821415610a6c5760029850610a7b565b6000811415610a7a57600198505b5b60008090505b600360008a815260200190815260200160002060030180549050811015610bb4576000600360008b815260200190815260200160002060030182815481101515610ac757fe5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508a61ffff16600360008c815260200190815260200160002060040160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600101541415610ba6578089896103e881101515610b6657fe5b602002019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505087806001019850505b508080600101915050610a81565b5060018961ffff161415610bf9576003600089815260200190815260200160002060010154945060036000898152602001908152602001600020600001549350610c2c565b60036000898152602001908152602001600020600001549450600360008981526020019081526020016000206001015493505b60008090505b86811015610d6d57600073ffffffffffffffffffffffffffffffffffffffff1688826103e881101515610c6157fe5b602002015173ffffffffffffffffffffffffffffffffffffffff16141515610d605787816103e881101515610c9257fe5b602002015193506000600360008b815260200190815260200160002060040160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000154905088826103e881101515610d0357fe5b602002015173ffffffffffffffffffffffffffffffffffffffff166108fc8789811515610d2c57fe5b0460010183029081150290604051600060405180830381858888f19350505050158015610d5d573d6000803e3d6000fd5b50505b8080600101915050610c32565b505b6001600360008a815260200190815260200160002060020160006101000a81548160ff021916908315150217905550505050505050505050565b828054828255906000526020600020908101928215610e22579160200282015b82811115610e215782518260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555091602001919060010190610dc9565b5b509050610e2f9190610e58565b5090565b617d00604051908101604052806103e890602082028038833980820191505090505090565b610e9891905b80821115610e9457600081816101000a81549073ffffffffffffffffffffffffffffffffffffffff021916905550600101610e5e565b5090565b9056fea165627a7a72305820da5c09dde917ce6e110f8d675d8d16cf177405197395b6d58087e2aaa9ab25520029", - "deployedBytecode": "0x6080604052600436106100a4576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806306fdde03146100a9578063117a5b90146101395780637c6953841461019a5780638363b00c146101d55780638da5cb5b14610224578063a0caa0931461027b578063a1d5ada7146102ca578063adb416f11461033d578063c38a8afd14610402578063e44ae4d41461042d575b600080fd5b3480156100b557600080fd5b506100be610476565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156100fe5780820151818401526020810190506100e3565b50505050905090810190601f16801561012b5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561014557600080fd5b506101726004803603602081101561015c57600080fd5b8101908080359060200190929190505050610514565b6040518084815260200183815260200182151515158152602001935050505060405180910390f35b6101d3600480360360408110156101b057600080fd5b81019080803560ff1690602001909291908035906020019092919050505061054b565b005b3480156101e157600080fd5b5061020e600480360360208110156101f857600080fd5b8101908080359060200190929190505050610703565b6040518082815260200191505060405180910390f35b34801561023057600080fd5b50610239610723565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561028757600080fd5b506102b46004803603602081101561029e57600080fd5b8101908080359060200190929190505050610749565b6040518082815260200191505060405180910390f35b3480156102d657600080fd5b50610323600480360360408110156102ed57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610769565b604051808215151515815260200191505060405180910390f35b34801561034957600080fd5b506104006004803603602081101561036057600080fd5b810190808035906020019064010000000081111561037d57600080fd5b82018360208201111561038f57600080fd5b803590602001918460208302840111640100000000831117156103b157600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050509192919290505050610836565b005b34801561040e57600080fd5b5061041761092b565b6040518082815260200191505060405180910390f35b34801561043957600080fd5b506104746004803603604081101561045057600080fd5b81019080803561ffff16906020019092919080359060200190929190505050610931565b005b60008054600181600116156101000203166002900480601f01602080910402602001604051908101604052809291908181526020018280546001816001161561010002031660029004801561050c5780601f106104e15761010080835404028352916020019161050c565b820191906000526020600020905b8154815290600101906020018083116104ef57829003601f168201915b505050505081565b60036020528060005260406000206000915090508060000154908060010154908060020160009054906101000a900460ff16905083565b6105553382610769565b15151561056157600080fd5b600254341015151561057257600080fd5b346003600083815260200190815260200160002060040160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600001819055508160ff166003600083815260200190815260200160002060040160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060010181905550600360008281526020019081526020016000206003013390806001815401808255809150509060018203906000526020600020016000909192909190916101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505060018260ff1614156106da573460036000838152602001908152602001600020600001600082825401925050819055506106ff565b3460036000838152602001908152602001600020600101600082825401925050819055505b5050565b600060036000838152602001908152602001600020600001549050919050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600060036000838152602001908152602001600020600101549050919050565b600080600090505b600360008481526020019081526020016000206003018054905081101561082a578373ffffffffffffffffffffffffffffffffffffffff1660036000858152602001908152602001600020600301828154811015156107cc57fe5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16141561081d576001915050610830565b8080600101915050610771565b50600090505b92915050565b60008090505b815181101561092757608060405190810160405280600081526020016000815260200160001515815260200160006040519080825280602002602001820160405280156108985781602001602082028038833980820191505090505b508152506003600084848151811015156108ae57fe5b906020019060200201518152602001908152602001600020600082015181600001556020820151816001015560408201518160020160006101000a81548160ff0219169083151502179055506060820151816003019080519060200190610916929190610da9565b50905050808060010191505061083c565b5050565b60025481565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156109f6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260188152602001807f63616c6c6572206d75737420626520746865206f776e6572000000000000000081525060200191505060405180910390fd5b6109fe610e33565b60008090506000809050600080905060008060036000888152602001908152602001600020600001549050600060036000898152602001908152602001600020600101549050600082148015610a545750600081145b1515610d6f576000821415610a6c5760029850610a7b565b6000811415610a7a57600198505b5b60008090505b600360008a815260200190815260200160002060030180549050811015610bb4576000600360008b815260200190815260200160002060030182815481101515610ac757fe5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508a61ffff16600360008c815260200190815260200160002060040160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600101541415610ba6578089896103e881101515610b6657fe5b602002019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505087806001019850505b508080600101915050610a81565b5060018961ffff161415610bf9576003600089815260200190815260200160002060010154945060036000898152602001908152602001600020600001549350610c2c565b60036000898152602001908152602001600020600001549450600360008981526020019081526020016000206001015493505b60008090505b86811015610d6d57600073ffffffffffffffffffffffffffffffffffffffff1688826103e881101515610c6157fe5b602002015173ffffffffffffffffffffffffffffffffffffffff16141515610d605787816103e881101515610c9257fe5b602002015193506000600360008b815260200190815260200160002060040160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000154905088826103e881101515610d0357fe5b602002015173ffffffffffffffffffffffffffffffffffffffff166108fc8789811515610d2c57fe5b0460010183029081150290604051600060405180830381858888f19350505050158015610d5d573d6000803e3d6000fd5b50505b8080600101915050610c32565b505b6001600360008a815260200190815260200160002060020160006101000a81548160ff021916908315150217905550505050505050505050565b828054828255906000526020600020908101928215610e22579160200282015b82811115610e215782518260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555091602001919060010190610dc9565b5b509050610e2f9190610e58565b5090565b617d00604051908101604052806103e890602082028038833980820191505090505090565b610e9891905b80821115610e9457600081816101000a81549073ffffffffffffffffffffffffffffffffffffffff021916905550600101610e5e565b5090565b9056fea165627a7a72305820da5c09dde917ce6e110f8d675d8d16cf177405197395b6d58087e2aaa9ab25520029", - "sourceMap": "60:6494:0:-;;;84:58;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;1019:151;8:9:-1;5:2;;;30:1;27;20:12;5:2;1019:151:0;1129:4;1116:10;:17;;;;1152:10;1144:5;;:18;;;;;;;;;;;;;;;;;;60:6494;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;:::-;;;;;;;", - "deployedSourceMap": "60:6494:0:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;84:58;;8:9:-1;5:2;;;30:1;27;20:12;5:2;84:58:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;99:1;94:3;90:11;84:18;80:1;75:3;71:11;64:39;52:2;49:1;45:10;40:15;;8:100;;;12:14;84:58:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;973:37;;8:9:-1;5:2;;;30:1;27;20:12;5:2;973:37:0;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;973:37:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1996:810;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;1996:810:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6301:121;;8:9:-1;5:2;;;30:1;27;20:12;5:2;6301:121:0;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;6301:121:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;149:20;;8:9:-1;5:2;;;30:1;27;20:12;5:2;149:20:0;;;;;;;;;;;;;;;;;;;;;;;;;;;6430:121;;8:9:-1;5:2;;;30:1;27;20:12;5:2;6430:121:0;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;6430:121:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1653:335;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1653:335:0;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;1653:335:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1178:467;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1178:467:0;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;1178:467:0;;;;;;;;;;21:11:-1;8;5:28;2:2;;;46:1;43;36:12;2:2;1178:467:0;;35:9:-1;28:4;12:14;8:25;5:40;2:2;;;58:1;55;48:12;2:2;1178:467:0;;;;;;101:9:-1;95:2;81:12;77:21;67:8;63:36;60:51;39:11;25:12;22:29;11:108;8:2;;;132:1;129;122:12;8:2;1178:467:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;30:3:-1;22:6;14;1:33;99:1;93:3;85:6;81:16;74:27;137:4;133:9;126:4;121:3;117:14;113:30;106:37;;169:3;161:6;157:16;147:26;;1178:467:0;;;;;;;;;;;;;;;;;;176:25;;8:9:-1;5:2;;;30:1;27;20:12;5:2;176:25:0;;;;;;;;;;;;;;;;;;;;;;;2814:3479;;8:9:-1;5:2;;;30:1;27;20:12;5:2;2814:3479:0;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;2814:3479:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;84:58;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;973:37::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;1996:810::-;2199:38;2217:10;2229:7;2199:17;:38::i;:::-;2198:39;2190:48;;;;;;;;2272:10;;2259:9;:23;;2251:32;;;;;;;;2346:9;2296:5;:14;2302:7;2296:14;;;;;;;;;;;:25;;:37;2322:10;2296:37;;;;;;;;;;;;;;;:47;;:59;;;;2419:13;2366:66;;:5;:14;2372:7;2366:14;;;;;;;;;;;:25;;:37;2392:10;2366:37;;;;;;;;;;;;;;;:50;;:66;;;;2445:5;:14;2451:7;2445:14;;;;;;;;;;;:22;;2473:10;2445:39;;39:1:-1;33:3;27:10;23:18;57:10;52:3;45:23;79:10;72:17;;0:93;2445:39:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2654:1;2637:13;:18;;;2633:166;;;2704:9;2672:5;:14;2678:7;2672:14;;;;;;;;;;;:28;;;:41;;;;;;;;;;;2633:166;;;2778:9;2746:5;:14;2752:7;2746:14;;;;;;;;;;;:28;;;:41;;;;;;;;;;;2633:166;1996:810;;:::o;6301:121::-;6359:7;6386:5;:14;6392:7;6386:14;;;;;;;;;;;:28;;;6379:35;;6301:121;;;:::o;149:20::-;;;;;;;;;;;;;:::o;6430:121::-;6488:7;6515:5;:14;6521:7;6515:14;;;;;;;;;;;:28;;;6508:35;;6430:121;;;:::o;1653:335::-;1762:4;1789:9;1801:1;1789:13;;1784:174;1808:5;:14;1814:7;1808:14;;;;;;;;;;;:22;;:29;;;;1804:1;:33;1784:174;;;1892:7;1863:36;;:5;:14;1869:7;1863:14;;;;;;;;;;;:22;;1886:1;1863:25;;;;;;;;;;;;;;;;;;;;;;;;;;;:36;;;1859:88;;;1927:4;1920:11;;;;;1859:88;1839:3;;;;;;;1784:174;;;;1975:5;1968:12;;1653:335;;;;;:::o;1178:467::-;1256:9;1268:1;1256:13;;1251:387;1275:13;:20;1271:1;:24;1251:387;;;1447:179;;;;;;;;;1486:1;1447:179;;;;1521:1;1447:179;;;;1553:5;1447:179;;;;;;1608:1;1586:24;;;;;;;;;;;;;;;;;;;;;;29:2:-1;21:6;17:15;117:4;105:10;97:6;88:34;148:4;140:6;136:17;126:27;;0:157;1586:24:0;;;;1447:179;;;1421:5;:23;1427:13;1441:1;1427:16;;;;;;;;;;;;;;;;;;1421:23;;;;;;;;;;;:205;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;1297:3;;;;;;;1251:387;;;;1178:467;:::o;176:25::-;;;;:::o;2814:3479::-;3000:5;;;;;;;;;;;2986:19;;:10;:19;;;2978:56;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3177:36;;:::i;:::-;3226:13;3242:1;3226:17;;3301:16;3320:1;3301:20;;3379:17;3399:1;3379:21;;3459:11;3481:18;3502:5;:14;3508:7;3502:14;;;;;;;;;;;:28;;;3481:49;;3541:18;3562:5;:14;3568:7;3562:14;;;;;;;;;;;:28;;;3541:49;;3806:1;3792:10;:15;:34;;;;;3825:1;3811:10;:15;3792:34;3790:37;3786:2069;;;3864:1;3850:10;:15;3846:159;;;3899:1;3885:15;;3846:159;;;3953:1;3939:10;:15;3935:70;;;3988:1;3974:15;;3935:70;3846:159;4146:9;4158:1;4146:13;;4141:519;4165:5;:14;4171:7;4165:14;;;;;;;;;;;:22;;:29;;;;4161:1;:33;4141:519;;;4220:29;4252:5;:14;4258:7;4252:14;;;;;;;;;;;:22;;4275:1;4252:25;;;;;;;;;;;;;;;;;;;;;;;;;;;4220:57;;4511:11;4433:89;;:5;:14;4439:7;4433:14;;;;;;;;;;;:25;;:40;4459:13;4433:40;;;;;;;;;;;;;;;:53;;;:89;4407:238;;;4582:13;4565:7;4573:5;4565:14;;;;;;;;;;;;:30;;;;;;;;;;;4618:7;;;;;;;4407:238;4141:519;4196:3;;;;;;;4141:519;;;;4769:1;4754:11;:16;;;4750:294;;;4802:5;:14;4808:7;4802:14;;;;;;;;;;;:28;;;4791:39;;4861:5;:14;4867:7;4861:14;;;;;;;;;;;:28;;;4849:40;;4750:294;;;4941:5;:14;4947:7;4941:14;;;;;;;;;;;:28;;;4930:39;;5000:5;:14;5006:7;5000:14;;;;;;;;;;;:28;;;4988:40;;4750:294;5168:9;5180:1;5168:13;;5163:681;5187:5;5183:1;:9;5163:681;;;5342:1;5320:24;;:7;5328:1;5320:10;;;;;;;;;;;;;:24;;;;5316:513;;;5375:7;5383:1;5375:10;;;;;;;;;;;;;5369:16;;5408:18;5429:5;:14;5435:7;5429:14;;;;;;;;;;;:51;;:56;5481:3;5429:56;;;;;;;;;;;;;;;:92;;;5408:113;;5701:7;5709:1;5701:10;;;;;;;;;;;;;:19;;:108;5776:9;5765:8;:20;;;;;;;;5761:1;:24;5747:10;:39;5701:108;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;5701:108:0;5316:513;;5194:3;;;;;;;5163:681;;;;3786:2069;5939:4;5911:5;:14;5917:7;5911:14;;;;;;;;;;;:25;;;:32;;;;;;;;;;;;;;;;;;2814:3479;;;;;;;;;:::o;60:6494::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;:::o;:::-;;;;;;;;;;;;29:2:-1;21:6;17:15;117:4;105:10;97:6;88:34;148:4;140:6;136:17;126:27;;0:157;60:6494:0;;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o", - "source": "// SPDX-License-Identifier: MIT\r\npragma solidity =0.5.0;\r\n\r\ncontract Betting {\r\n string public name = \"Peer to Peer Basketball Betting App\";\r\n address public owner;\r\n uint256 public minimumBet;\r\n\r\n struct Player {\r\n // Amount bet by a player\r\n uint256 amountBet;\r\n // Team selected by the player (1 for home, 2 for away)\r\n uint256 teamSelected;\r\n }\r\n\r\n struct Game {\r\n // Total amount of bets placed on the home team\r\n uint256 totalBetsHome;\r\n // Total amount of bets placed on the away team\r\n uint256 totalBetsAway;\r\n // Has the game taken place yet?\r\n bool takenPlace;\r\n // List of payable addresses for the players\r\n address payable[] players;\r\n // Maps addresses to player information so that given an address, we can check how much money that player bet on a certain team\r\n mapping(address => Player) playerInfo;\r\n }\r\n\r\n // Mapping of games\r\n mapping(uint256 => Game) public games;\r\n\r\n constructor() public {\r\n // minimumBet is 1e14 wei corresponding to 0.0001 ether\r\n minimumBet = 1e14;\r\n owner = msg.sender;\r\n }\r\n\r\n function populateGames(uint256[] memory _new_game_ids) public {\r\n for (uint256 i = 0; i < _new_game_ids.length; i++) {\r\n // Leave playerInfo and players attributes empty by not including them in Game constructor\r\n games[_new_game_ids[i]] = Game({\r\n totalBetsHome: 0,\r\n totalBetsAway: 0,\r\n takenPlace: false,\r\n players: new address payable[](0)\r\n });\r\n }\r\n }\r\n\r\n function checkPlayerExists(address _player, uint256 _gameID)\r\n public\r\n view\r\n returns (bool)\r\n {\r\n for (uint256 i = 0; i < games[_gameID].players.length; i++) {\r\n if (games[_gameID].players[i] == _player) {\r\n return true;\r\n }\r\n }\r\n return false;\r\n }\r\n\r\n function bet(uint8 _teamSelected, uint256 _gameID) public payable {\r\n // Check that the player (person calling this contract) does not exist (meaning that person hasn't bet yet)\r\n require(!checkPlayerExists(msg.sender, _gameID));\r\n\r\n require(msg.value >= minimumBet);\r\n\r\n games[_gameID].playerInfo[msg.sender].amountBet = msg.value;\r\n games[_gameID].playerInfo[msg.sender].teamSelected = _teamSelected;\r\n\r\n games[_gameID].players.push(msg.sender); // VERSIONING: need payable(msg.sender) for newer versions of solidity\r\n\r\n // Bet on the home team, otherwise bet on the away team\r\n if (_teamSelected == 1) {\r\n games[_gameID].totalBetsHome += msg.value;\r\n } else {\r\n games[_gameID].totalBetsAway += msg.value;\r\n }\r\n }\r\n\r\n function distributePrizes(uint16 _teamWinner, uint256 _gameID) public {\r\n // Enforce only the deployer/owner of the contract can call this function\r\n require(msg.sender == owner, \"caller must be the owner\");\r\n\r\n // Create a temporary in memory array with fixed size of 1000 to store the winners, so there can be at most 1000 winners\r\n address payable[1000] memory winners;\r\n\r\n uint256 count = 0; // This is the count for the number of winners\r\n uint256 LoserBet = 0; // This will be the sum of all the losing bets\r\n uint256 WinnerBet = 0; // This will be the sum of all the winning bets\r\n address add;\r\n uint256 HomeAmount = games[_gameID].totalBetsHome;\r\n uint256 AwayAmount = games[_gameID].totalBetsAway;\r\n\r\n /*check if there actually are any bets on this game, if there are no bets, just skip all of this and set game as \"taken place\"\r\n without needing to take any action */\r\n if (!(HomeAmount == 0 && AwayAmount == 0)) {\r\n\r\n if (HomeAmount == 0){\r\n _teamWinner = 2;\r\n }\r\n else if (AwayAmount == 0){\r\n _teamWinner = 1;\r\n }\r\n \r\n // We loop through the player array to find the players that correctly bet on the winning team\r\n for (uint256 i = 0; i < games[_gameID].players.length; i++) {\r\n address payable playerAddress = games[_gameID].players[i];\r\n\r\n // If the player bet on the winning team, we add that player's address to the winners array\r\n if (\r\n games[_gameID].playerInfo[playerAddress].teamSelected ==\r\n _teamWinner\r\n ) {\r\n winners[count] = playerAddress;\r\n count++;\r\n }\r\n }\r\n\r\n // Define which bet sum is the winner and which is the loser\r\n if (_teamWinner == 1) {\r\n LoserBet = games[_gameID].totalBetsAway;\r\n WinnerBet = games[_gameID].totalBetsHome;\r\n } else {\r\n LoserBet = games[_gameID].totalBetsHome;\r\n WinnerBet = games[_gameID].totalBetsAway;\r\n }\r\n\r\n // Loop through the array of winners and distribute eth (in units of wei) to each of them\r\n for (uint256 j = 0; j < count; j++) {\r\n // Check that we actually have a proper, valid address in this slot of the array\r\n if (winners[j] != address(0)) {\r\n add = winners[j];\r\n uint256 bet_amount = games[_gameID]\r\n .playerInfo[add]\r\n .amountBet;\r\n // Distribute wei to the user based on the formula (pro rata distribution to the winners based on how much money they individually bet)\r\n winners[j].transfer(\r\n bet_amount * (1 + LoserBet / WinnerBet)\r\n );\r\n }\r\n }\r\n }\r\n\r\n // Update game to have taken place\r\n games[_gameID].takenPlace = true;\r\n\r\n // delete playerInfo[playerAddress]; // Delete all the players\r\n // players.length = 0; // Delete all the players array\r\n // LoserBet = 0; // Reinitialize the bets\r\n // WinnerBet = 0; // Reset these values\r\n // totalBetsOne = 0; // Reset these values\r\n // totalBetsTwo = 0; // Reset these values\r\n }\r\n\r\n function AmountHome(uint256 _gameID) public view returns (uint256) {\r\n return games[_gameID].totalBetsHome;\r\n }\r\n\r\n function AmountAway(uint256 _gameID) public view returns (uint256) {\r\n return games[_gameID].totalBetsAway;\r\n }\r\n}\r\n", - "sourcePath": "/mnt/c/Users/Jeremy Zhang/Documents/peer-sports-betting/contracts/Betting.sol", + "metadata": "{\"compiler\":{\"version\":\"0.5.0+commit.1d4f565a\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"constant\":true,\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"games\",\"outputs\":[{\"name\":\"totalBetsHome\",\"type\":\"uint256\"},{\"name\":\"totalBetsAway\",\"type\":\"uint256\"},{\"name\":\"takenPlace\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_teamSelected\",\"type\":\"uint8\"},{\"name\":\"_gameID\",\"type\":\"uint256\"}],\"name\":\"bet\",\"outputs\":[],\"payable\":true,\"stateMutability\":\"payable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_gameID\",\"type\":\"uint256\"}],\"name\":\"AmountHome\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_gameID\",\"type\":\"uint256\"}],\"name\":\"AmountAway\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_player\",\"type\":\"address\"},{\"name\":\"_gameID\",\"type\":\"uint256\"}],\"name\":\"checkPlayerExists\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_new_game_ids\",\"type\":\"uint256[]\"}],\"name\":\"populateGames\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"minimumBet\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_teamWinner\",\"type\":\"uint16\"},{\"name\":\"_gameID\",\"type\":\"uint256\"}],\"name\":\"distributePrizes\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"}],\"devdoc\":{\"methods\":{}},\"userdoc\":{\"methods\":{}}},\"settings\":{\"compilationTarget\":{\"project:/contracts/Betting.sol\":\"Betting\"},\"evmVersion\":\"byzantium\",\"libraries\":{},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"project:/contracts/Betting.sol\":{\"keccak256\":\"0xb234bda0cfe3d8c47e83ff732e2831be8e72bbf83a0f2aac4ad4d5c729e3ab4c\",\"urls\":[\"bzzr://57759620f0cb1af54d1f3c3645c3653758460931b3ec50ad9e7027dd970d2897\"]}},\"version\":1}", + "bytecode": "0x6080604052606060405190810160405280602381526020017f5065657220746f2050656572204261736b657462616c6c2042657474696e672081526020017f4170700000000000000000000000000000000000000000000000000000000000815250600090805190602001906100769291906100d7565b5034801561008357600080fd5b50655af3107a400060028190555033600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555061017c565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061011857805160ff1916838001178555610146565b82800160010185558215610146579182015b8281111561014557825182559160200191906001019061012a565b5b5090506101539190610157565b5090565b61017991905b8082111561017557600081600090555060010161015d565b5090565b90565b610ec78061018b6000396000f3fe6080604052600436106100a4576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806306fdde03146100a9578063117a5b90146101395780637c6953841461019a5780638363b00c146101d55780638da5cb5b14610224578063a0caa0931461027b578063a1d5ada7146102ca578063adb416f11461033d578063c38a8afd14610402578063e44ae4d41461042d575b600080fd5b3480156100b557600080fd5b506100be610476565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156100fe5780820151818401526020810190506100e3565b50505050905090810190601f16801561012b5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561014557600080fd5b506101726004803603602081101561015c57600080fd5b8101908080359060200190929190505050610514565b6040518084815260200183815260200182151515158152602001935050505060405180910390f35b6101d3600480360360408110156101b057600080fd5b81019080803560ff1690602001909291908035906020019092919050505061054b565b005b3480156101e157600080fd5b5061020e600480360360208110156101f857600080fd5b8101908080359060200190929190505050610703565b6040518082815260200191505060405180910390f35b34801561023057600080fd5b50610239610723565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561028757600080fd5b506102b46004803603602081101561029e57600080fd5b8101908080359060200190929190505050610749565b6040518082815260200191505060405180910390f35b3480156102d657600080fd5b50610323600480360360408110156102ed57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610769565b604051808215151515815260200191505060405180910390f35b34801561034957600080fd5b506104006004803603602081101561036057600080fd5b810190808035906020019064010000000081111561037d57600080fd5b82018360208201111561038f57600080fd5b803590602001918460208302840111640100000000831117156103b157600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050509192919290505050610836565b005b34801561040e57600080fd5b5061041761092b565b6040518082815260200191505060405180910390f35b34801561043957600080fd5b506104746004803603604081101561045057600080fd5b81019080803561ffff16906020019092919080359060200190929190505050610931565b005b60008054600181600116156101000203166002900480601f01602080910402602001604051908101604052809291908181526020018280546001816001161561010002031660029004801561050c5780601f106104e15761010080835404028352916020019161050c565b820191906000526020600020905b8154815290600101906020018083116104ef57829003601f168201915b505050505081565b60036020528060005260406000206000915090508060000154908060010154908060020160009054906101000a900460ff16905083565b6105553382610769565b15151561056157600080fd5b600254341015151561057257600080fd5b346003600083815260200190815260200160002060040160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600001819055508160ff166003600083815260200190815260200160002060040160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060010181905550600360008281526020019081526020016000206003013390806001815401808255809150509060018203906000526020600020016000909192909190916101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505060018260ff1614156106da573460036000838152602001908152602001600020600001600082825401925050819055506106ff565b3460036000838152602001908152602001600020600101600082825401925050819055505b5050565b600060036000838152602001908152602001600020600001549050919050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600060036000838152602001908152602001600020600101549050919050565b600080600090505b600360008481526020019081526020016000206003018054905081101561082a578373ffffffffffffffffffffffffffffffffffffffff1660036000858152602001908152602001600020600301828154811015156107cc57fe5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16141561081d576001915050610830565b8080600101915050610771565b50600090505b92915050565b60008090505b815181101561092757608060405190810160405280600081526020016000815260200160001515815260200160006040519080825280602002602001820160405280156108985781602001602082028038833980820191505090505b508152506003600084848151811015156108ae57fe5b906020019060200201518152602001908152602001600020600082015181600001556020820151816001015560408201518160020160006101000a81548160ff0219169083151502179055506060820151816003019080519060200190610916929190610da9565b50905050808060010191505061083c565b5050565b60025481565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156109f6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260188152602001807f63616c6c6572206d75737420626520746865206f776e6572000000000000000081525060200191505060405180910390fd5b6109fe610e33565b60008090506000809050600080905060008060036000888152602001908152602001600020600001549050600060036000898152602001908152602001600020600101549050600082148015610a545750600081145b1515610d6f576000821415610a6c5760029850610a7b565b6000811415610a7a57600198505b5b60008090505b600360008a815260200190815260200160002060030180549050811015610bb4576000600360008b815260200190815260200160002060030182815481101515610ac757fe5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508a61ffff16600360008c815260200190815260200160002060040160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600101541415610ba6578089896103e881101515610b6657fe5b602002019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505087806001019850505b508080600101915050610a81565b5060018961ffff161415610bf9576003600089815260200190815260200160002060010154945060036000898152602001908152602001600020600001549350610c2c565b60036000898152602001908152602001600020600001549450600360008981526020019081526020016000206001015493505b60008090505b86811015610d6d57600073ffffffffffffffffffffffffffffffffffffffff1688826103e881101515610c6157fe5b602002015173ffffffffffffffffffffffffffffffffffffffff16141515610d605787816103e881101515610c9257fe5b602002015193506000600360008b815260200190815260200160002060040160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000154905088826103e881101515610d0357fe5b602002015173ffffffffffffffffffffffffffffffffffffffff166108fc8789811515610d2c57fe5b0460010183029081150290604051600060405180830381858888f19350505050158015610d5d573d6000803e3d6000fd5b50505b8080600101915050610c32565b505b6001600360008a815260200190815260200160002060020160006101000a81548160ff021916908315150217905550505050505050505050565b828054828255906000526020600020908101928215610e22579160200282015b82811115610e215782518260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555091602001919060010190610dc9565b5b509050610e2f9190610e58565b5090565b617d00604051908101604052806103e890602082028038833980820191505090505090565b610e9891905b80821115610e9457600081816101000a81549073ffffffffffffffffffffffffffffffffffffffff021916905550600101610e5e565b5090565b9056fea165627a7a723058209963f673b9f828343bff9080a9b8faaa4ed5d98a2860398fe92f86d07603279f0029", + "deployedBytecode": "0x6080604052600436106100a4576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806306fdde03146100a9578063117a5b90146101395780637c6953841461019a5780638363b00c146101d55780638da5cb5b14610224578063a0caa0931461027b578063a1d5ada7146102ca578063adb416f11461033d578063c38a8afd14610402578063e44ae4d41461042d575b600080fd5b3480156100b557600080fd5b506100be610476565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156100fe5780820151818401526020810190506100e3565b50505050905090810190601f16801561012b5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561014557600080fd5b506101726004803603602081101561015c57600080fd5b8101908080359060200190929190505050610514565b6040518084815260200183815260200182151515158152602001935050505060405180910390f35b6101d3600480360360408110156101b057600080fd5b81019080803560ff1690602001909291908035906020019092919050505061054b565b005b3480156101e157600080fd5b5061020e600480360360208110156101f857600080fd5b8101908080359060200190929190505050610703565b6040518082815260200191505060405180910390f35b34801561023057600080fd5b50610239610723565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561028757600080fd5b506102b46004803603602081101561029e57600080fd5b8101908080359060200190929190505050610749565b6040518082815260200191505060405180910390f35b3480156102d657600080fd5b50610323600480360360408110156102ed57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610769565b604051808215151515815260200191505060405180910390f35b34801561034957600080fd5b506104006004803603602081101561036057600080fd5b810190808035906020019064010000000081111561037d57600080fd5b82018360208201111561038f57600080fd5b803590602001918460208302840111640100000000831117156103b157600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050509192919290505050610836565b005b34801561040e57600080fd5b5061041761092b565b6040518082815260200191505060405180910390f35b34801561043957600080fd5b506104746004803603604081101561045057600080fd5b81019080803561ffff16906020019092919080359060200190929190505050610931565b005b60008054600181600116156101000203166002900480601f01602080910402602001604051908101604052809291908181526020018280546001816001161561010002031660029004801561050c5780601f106104e15761010080835404028352916020019161050c565b820191906000526020600020905b8154815290600101906020018083116104ef57829003601f168201915b505050505081565b60036020528060005260406000206000915090508060000154908060010154908060020160009054906101000a900460ff16905083565b6105553382610769565b15151561056157600080fd5b600254341015151561057257600080fd5b346003600083815260200190815260200160002060040160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600001819055508160ff166003600083815260200190815260200160002060040160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060010181905550600360008281526020019081526020016000206003013390806001815401808255809150509060018203906000526020600020016000909192909190916101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505060018260ff1614156106da573460036000838152602001908152602001600020600001600082825401925050819055506106ff565b3460036000838152602001908152602001600020600101600082825401925050819055505b5050565b600060036000838152602001908152602001600020600001549050919050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600060036000838152602001908152602001600020600101549050919050565b600080600090505b600360008481526020019081526020016000206003018054905081101561082a578373ffffffffffffffffffffffffffffffffffffffff1660036000858152602001908152602001600020600301828154811015156107cc57fe5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16141561081d576001915050610830565b8080600101915050610771565b50600090505b92915050565b60008090505b815181101561092757608060405190810160405280600081526020016000815260200160001515815260200160006040519080825280602002602001820160405280156108985781602001602082028038833980820191505090505b508152506003600084848151811015156108ae57fe5b906020019060200201518152602001908152602001600020600082015181600001556020820151816001015560408201518160020160006101000a81548160ff0219169083151502179055506060820151816003019080519060200190610916929190610da9565b50905050808060010191505061083c565b5050565b60025481565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156109f6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260188152602001807f63616c6c6572206d75737420626520746865206f776e6572000000000000000081525060200191505060405180910390fd5b6109fe610e33565b60008090506000809050600080905060008060036000888152602001908152602001600020600001549050600060036000898152602001908152602001600020600101549050600082148015610a545750600081145b1515610d6f576000821415610a6c5760029850610a7b565b6000811415610a7a57600198505b5b60008090505b600360008a815260200190815260200160002060030180549050811015610bb4576000600360008b815260200190815260200160002060030182815481101515610ac757fe5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508a61ffff16600360008c815260200190815260200160002060040160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600101541415610ba6578089896103e881101515610b6657fe5b602002019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505087806001019850505b508080600101915050610a81565b5060018961ffff161415610bf9576003600089815260200190815260200160002060010154945060036000898152602001908152602001600020600001549350610c2c565b60036000898152602001908152602001600020600001549450600360008981526020019081526020016000206001015493505b60008090505b86811015610d6d57600073ffffffffffffffffffffffffffffffffffffffff1688826103e881101515610c6157fe5b602002015173ffffffffffffffffffffffffffffffffffffffff16141515610d605787816103e881101515610c9257fe5b602002015193506000600360008b815260200190815260200160002060040160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000154905088826103e881101515610d0357fe5b602002015173ffffffffffffffffffffffffffffffffffffffff166108fc8789811515610d2c57fe5b0460010183029081150290604051600060405180830381858888f19350505050158015610d5d573d6000803e3d6000fd5b50505b8080600101915050610c32565b505b6001600360008a815260200190815260200160002060020160006101000a81548160ff021916908315150217905550505050505050505050565b828054828255906000526020600020908101928215610e22579160200282015b82811115610e215782518260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555091602001919060010190610dc9565b5b509050610e2f9190610e58565b5090565b617d00604051908101604052806103e890602082028038833980820191505090505090565b610e9891905b80821115610e9457600081816101000a81549073ffffffffffffffffffffffffffffffffffffffff021916905550600101610e5e565b5090565b9056fea165627a7a723058209963f673b9f828343bff9080a9b8faaa4ed5d98a2860398fe92f86d07603279f0029", + "sourceMap": "60:6469:0:-;;;84:58;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;1019:151;8:9:-1;5:2;;;30:1;27;20:12;5:2;1019:151:0;1129:4;1116:10;:17;;;;1152:10;1144:5;;:18;;;;;;;;;;;;;;;;;;60:6469;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;:::-;;;;;;;", + "deployedSourceMap": "60:6469:0:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;84:58;;8:9:-1;5:2;;;30:1;27;20:12;5:2;84:58:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;99:1;94:3;90:11;84:18;80:1;75:3;71:11;64:39;52:2;49:1;45:10;40:15;;8:100;;;12:14;84:58:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;973:37;;8:9:-1;5:2;;;30:1;27;20:12;5:2;973:37:0;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;973:37:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1996:810;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;1996:810:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6276:121;;8:9:-1;5:2;;;30:1;27;20:12;5:2;6276:121:0;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;6276:121:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;149:20;;8:9:-1;5:2;;;30:1;27;20:12;5:2;149:20:0;;;;;;;;;;;;;;;;;;;;;;;;;;;6405:121;;8:9:-1;5:2;;;30:1;27;20:12;5:2;6405:121:0;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;6405:121:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1653:335;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1653:335:0;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;1653:335:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1178:467;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1178:467:0;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;1178:467:0;;;;;;;;;;21:11:-1;8;5:28;2:2;;;46:1;43;36:12;2:2;1178:467:0;;35:9:-1;28:4;12:14;8:25;5:40;2:2;;;58:1;55;48:12;2:2;1178:467:0;;;;;;101:9:-1;95:2;81:12;77:21;67:8;63:36;60:51;39:11;25:12;22:29;11:108;8:2;;;132:1;129;122:12;8:2;1178:467:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;30:3:-1;22:6;14;1:33;99:1;93:3;85:6;81:16;74:27;137:4;133:9;126:4;121:3;117:14;113:30;106:37;;169:3;161:6;157:16;147:26;;1178:467:0;;;;;;;;;;;;;;;;;;176:25;;8:9:-1;5:2;;;30:1;27;20:12;5:2;176:25:0;;;;;;;;;;;;;;;;;;;;;;;2814:3454;;8:9:-1;5:2;;;30:1;27;20:12;5:2;2814:3454:0;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;2814:3454:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;84:58;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;973:37::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;1996:810::-;2199:38;2217:10;2229:7;2199:17;:38::i;:::-;2198:39;2190:48;;;;;;;;2272:10;;2259:9;:23;;2251:32;;;;;;;;2346:9;2296:5;:14;2302:7;2296:14;;;;;;;;;;;:25;;:37;2322:10;2296:37;;;;;;;;;;;;;;;:47;;:59;;;;2419:13;2366:66;;:5;:14;2372:7;2366:14;;;;;;;;;;;:25;;:37;2392:10;2366:37;;;;;;;;;;;;;;;:50;;:66;;;;2445:5;:14;2451:7;2445:14;;;;;;;;;;;:22;;2473:10;2445:39;;39:1:-1;33:3;27:10;23:18;57:10;52:3;45:23;79:10;72:17;;0:93;2445:39:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2654:1;2637:13;:18;;;2633:166;;;2704:9;2672:5;:14;2678:7;2672:14;;;;;;;;;;;:28;;;:41;;;;;;;;;;;2633:166;;;2778:9;2746:5;:14;2752:7;2746:14;;;;;;;;;;;:28;;;:41;;;;;;;;;;;2633:166;1996:810;;:::o;6276:121::-;6334:7;6361:5;:14;6367:7;6361:14;;;;;;;;;;;:28;;;6354:35;;6276:121;;;:::o;149:20::-;;;;;;;;;;;;;:::o;6405:121::-;6463:7;6490:5;:14;6496:7;6490:14;;;;;;;;;;;:28;;;6483:35;;6405:121;;;:::o;1653:335::-;1762:4;1789:9;1801:1;1789:13;;1784:174;1808:5;:14;1814:7;1808:14;;;;;;;;;;;:22;;:29;;;;1804:1;:33;1784:174;;;1892:7;1863:36;;:5;:14;1869:7;1863:14;;;;;;;;;;;:22;;1886:1;1863:25;;;;;;;;;;;;;;;;;;;;;;;;;;;:36;;;1859:88;;;1927:4;1920:11;;;;;1859:88;1839:3;;;;;;;1784:174;;;;1975:5;1968:12;;1653:335;;;;;:::o;1178:467::-;1256:9;1268:1;1256:13;;1251:387;1275:13;:20;1271:1;:24;1251:387;;;1447:179;;;;;;;;;1486:1;1447:179;;;;1521:1;1447:179;;;;1553:5;1447:179;;;;;;1608:1;1586:24;;;;;;;;;;;;;;;;;;;;;;29:2:-1;21:6;17:15;117:4;105:10;97:6;88:34;148:4;140:6;136:17;126:27;;0:157;1586:24:0;;;;1447:179;;;1421:5;:23;1427:13;1441:1;1427:16;;;;;;;;;;;;;;;;;;1421:23;;;;;;;;;;;:205;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;1297:3;;;;;;;1251:387;;;;1178:467;:::o;176:25::-;;;;:::o;2814:3454::-;3000:5;;;;;;;;;;;2986:19;;:10;:19;;;2978:56;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3177:36;;:::i;:::-;3226:13;3242:1;3226:17;;3301:16;3320:1;3301:20;;3379:17;3399:1;3379:21;;3459:11;3481:18;3502:5;:14;3508:7;3502:14;;;;;;;;;;;:28;;;3481:49;;3541:18;3562:5;:14;3568:7;3562:14;;;;;;;;;;;:28;;;3541:49;;3806:1;3792:10;:15;:34;;;;;3825:1;3811:10;:15;3792:34;3790:37;3786:2044;;;3862:1;3848:10;:15;3844:148;;;3898:1;3884:15;;3844:148;;;3939:1;3925:10;:15;3921:71;;;3975:1;3961:15;;3921:71;3844:148;4121:9;4133:1;4121:13;;4116:519;4140:5;:14;4146:7;4140:14;;;;;;;;;;;:22;;:29;;;;4136:1;:33;4116:519;;;4195:29;4227:5;:14;4233:7;4227:14;;;;;;;;;;;:22;;4250:1;4227:25;;;;;;;;;;;;;;;;;;;;;;;;;;;4195:57;;4486:11;4408:89;;:5;:14;4414:7;4408:14;;;;;;;;;;;:25;;:40;4434:13;4408:40;;;;;;;;;;;;;;;:53;;;:89;4382:238;;;4557:13;4540:7;4548:5;4540:14;;;;;;;;;;;;:30;;;;;;;;;;;4593:7;;;;;;;4382:238;4116:519;4171:3;;;;;;;4116:519;;;;4744:1;4729:11;:16;;;4725:294;;;4777:5;:14;4783:7;4777:14;;;;;;;;;;;:28;;;4766:39;;4836:5;:14;4842:7;4836:14;;;;;;;;;;;:28;;;4824:40;;4725:294;;;4916:5;:14;4922:7;4916:14;;;;;;;;;;;:28;;;4905:39;;4975:5;:14;4981:7;4975:14;;;;;;;;;;;:28;;;4963:40;;4725:294;5143:9;5155:1;5143:13;;5138:681;5162:5;5158:1;:9;5138:681;;;5317:1;5295:24;;:7;5303:1;5295:10;;;;;;;;;;;;;:24;;;;5291:513;;;5350:7;5358:1;5350:10;;;;;;;;;;;;;5344:16;;5383:18;5404:5;:14;5410:7;5404:14;;;;;;;;;;;:51;;:56;5456:3;5404:56;;;;;;;;;;;;;;;:92;;;5383:113;;5676:7;5684:1;5676:10;;;;;;;;;;;;;:19;;:108;5751:9;5740:8;:20;;;;;;;;5736:1;:24;5722:10;:39;5676:108;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;5676:108:0;5291:513;;5169:3;;;;;;;5138:681;;;;3786:2044;5914:4;5886:5;:14;5892:7;5886:14;;;;;;;;;;;:25;;;:32;;;;;;;;;;;;;;;;;;2814:3454;;;;;;;;;:::o;60:6469::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;:::o;:::-;;;;;;;;;;;;29:2:-1;21:6;17:15;117:4;105:10;97:6;88:34;148:4;140:6;136:17;126:27;;0:157;60:6469:0;;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o", + "source": "// SPDX-License-Identifier: MIT\r\npragma solidity =0.5.0;\r\n\r\ncontract Betting {\r\n string public name = \"Peer to Peer Basketball Betting App\";\r\n address public owner;\r\n uint256 public minimumBet;\r\n\r\n struct Player {\r\n // Amount bet by a player\r\n uint256 amountBet;\r\n // Team selected by the player (1 for home, 2 for away)\r\n uint256 teamSelected;\r\n }\r\n\r\n struct Game {\r\n // Total amount of bets placed on the home team\r\n uint256 totalBetsHome;\r\n // Total amount of bets placed on the away team\r\n uint256 totalBetsAway;\r\n // Has the game taken place yet?\r\n bool takenPlace;\r\n // List of payable addresses for the players\r\n address payable[] players;\r\n // Maps addresses to player information so that given an address, we can check how much money that player bet on a certain team\r\n mapping(address => Player) playerInfo;\r\n }\r\n\r\n // Mapping of games\r\n mapping(uint256 => Game) public games;\r\n\r\n constructor() public {\r\n // minimumBet is 1e14 wei corresponding to 0.0001 ether\r\n minimumBet = 1e14;\r\n owner = msg.sender;\r\n }\r\n\r\n function populateGames(uint256[] memory _new_game_ids) public {\r\n for (uint256 i = 0; i < _new_game_ids.length; i++) {\r\n // Leave playerInfo and players attributes empty by not including them in Game constructor\r\n games[_new_game_ids[i]] = Game({\r\n totalBetsHome: 0,\r\n totalBetsAway: 0,\r\n takenPlace: false,\r\n players: new address payable[](0)\r\n });\r\n }\r\n }\r\n\r\n function checkPlayerExists(address _player, uint256 _gameID)\r\n public\r\n view\r\n returns (bool)\r\n {\r\n for (uint256 i = 0; i < games[_gameID].players.length; i++) {\r\n if (games[_gameID].players[i] == _player) {\r\n return true;\r\n }\r\n }\r\n return false;\r\n }\r\n\r\n function bet(uint8 _teamSelected, uint256 _gameID) public payable {\r\n // Check that the player (person calling this contract) does not exist (meaning that person hasn't bet yet)\r\n require(!checkPlayerExists(msg.sender, _gameID));\r\n\r\n require(msg.value >= minimumBet);\r\n\r\n games[_gameID].playerInfo[msg.sender].amountBet = msg.value;\r\n games[_gameID].playerInfo[msg.sender].teamSelected = _teamSelected;\r\n\r\n games[_gameID].players.push(msg.sender); // VERSIONING: need payable(msg.sender) for newer versions of solidity\r\n\r\n // Bet on the home team, otherwise bet on the away team\r\n if (_teamSelected == 1) {\r\n games[_gameID].totalBetsHome += msg.value;\r\n } else {\r\n games[_gameID].totalBetsAway += msg.value;\r\n }\r\n }\r\n\r\n function distributePrizes(uint16 _teamWinner, uint256 _gameID) public {\r\n // Enforce only the deployer/owner of the contract can call this function\r\n require(msg.sender == owner, \"caller must be the owner\");\r\n\r\n // Create a temporary in memory array with fixed size of 1000 to store the winners, so there can be at most 1000 winners\r\n address payable[1000] memory winners;\r\n\r\n uint256 count = 0; // This is the count for the number of winners\r\n uint256 LoserBet = 0; // This will be the sum of all the losing bets\r\n uint256 WinnerBet = 0; // This will be the sum of all the winning bets\r\n address add;\r\n uint256 HomeAmount = games[_gameID].totalBetsHome;\r\n uint256 AwayAmount = games[_gameID].totalBetsAway;\r\n\r\n /*check if there actually are any bets on this game, if there are no bets, just skip all of this and set game as \"taken place\"\r\n without needing to take any action */\r\n if (!(HomeAmount == 0 && AwayAmount == 0)) {\r\n if (HomeAmount == 0) {\r\n _teamWinner = 2;\r\n } else if (AwayAmount == 0) {\r\n _teamWinner = 1;\r\n }\r\n\r\n // We loop through the player array to find the players that correctly bet on the winning team\r\n for (uint256 i = 0; i < games[_gameID].players.length; i++) {\r\n address payable playerAddress = games[_gameID].players[i];\r\n\r\n // If the player bet on the winning team, we add that player's address to the winners array\r\n if (\r\n games[_gameID].playerInfo[playerAddress].teamSelected ==\r\n _teamWinner\r\n ) {\r\n winners[count] = playerAddress;\r\n count++;\r\n }\r\n }\r\n\r\n // Define which bet sum is the winner and which is the loser\r\n if (_teamWinner == 1) {\r\n LoserBet = games[_gameID].totalBetsAway;\r\n WinnerBet = games[_gameID].totalBetsHome;\r\n } else {\r\n LoserBet = games[_gameID].totalBetsHome;\r\n WinnerBet = games[_gameID].totalBetsAway;\r\n }\r\n\r\n // Loop through the array of winners and distribute eth (in units of wei) to each of them\r\n for (uint256 j = 0; j < count; j++) {\r\n // Check that we actually have a proper, valid address in this slot of the array\r\n if (winners[j] != address(0)) {\r\n add = winners[j];\r\n uint256 bet_amount = games[_gameID]\r\n .playerInfo[add]\r\n .amountBet;\r\n // Distribute wei to the user based on the formula (pro rata distribution to the winners based on how much money they individually bet)\r\n winners[j].transfer(\r\n bet_amount * (1 + LoserBet / WinnerBet)\r\n );\r\n }\r\n }\r\n }\r\n\r\n // Update game to have taken place\r\n games[_gameID].takenPlace = true;\r\n\r\n // delete playerInfo[playerAddress]; // Delete all the players\r\n // players.length = 0; // Delete all the players array\r\n // LoserBet = 0; // Reinitialize the bets\r\n // WinnerBet = 0; // Reset these values\r\n // totalBetsOne = 0; // Reset these values\r\n // totalBetsTwo = 0; // Reset these values\r\n }\r\n\r\n function AmountHome(uint256 _gameID) public view returns (uint256) {\r\n return games[_gameID].totalBetsHome;\r\n }\r\n\r\n function AmountAway(uint256 _gameID) public view returns (uint256) {\r\n return games[_gameID].totalBetsAway;\r\n }\r\n}\r\n", + "sourcePath": "C:\\Users\\Jeremy Zhang\\Documents\\peer-sports-betting\\contracts\\Betting.sol", "ast": { "absolutePath": "project:/contracts/Betting.sol", "exportedSymbols": { @@ -2789,7 +2789,7 @@ "body": { "id": 414, "nodeType": "Block", - "src": "2884:3409:0", + "src": "2884:3384:0", "statements": [ { "expression": { @@ -3523,11 +3523,11 @@ "falseBody": null, "id": 406, "nodeType": "IfStatement", - "src": "3786:2069:0", + "src": "3786:2044:0", "trueBody": { "id": 405, "nodeType": "Block", - "src": "3829:2026:0", + "src": "3829:2001:0", "statements": [ { "condition": { @@ -3548,7 +3548,7 @@ "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 235, - "src": "3850:10:0", + "src": "3848:10:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -3566,7 +3566,7 @@ "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "3864:1:0", + "src": "3862:1:0", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", @@ -3574,7 +3574,7 @@ }, "value": "0" }, - "src": "3850:15:0", + "src": "3848:15:0", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -3599,7 +3599,7 @@ "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 242, - "src": "3939:10:0", + "src": "3925:10:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -3617,7 +3617,7 @@ "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "3953:1:0", + "src": "3939:1:0", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", @@ -3625,7 +3625,7 @@ }, "value": "0" }, - "src": "3939:15:0", + "src": "3925:15:0", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -3634,11 +3634,11 @@ "falseBody": null, "id": 273, "nodeType": "IfStatement", - "src": "3935:70:0", + "src": "3921:71:0", "trueBody": { "id": 272, "nodeType": "Block", - "src": "3955:50:0", + "src": "3942:50:0", "statements": [ { "expression": { @@ -3655,7 +3655,7 @@ "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 201, - "src": "3974:11:0", + "src": "3961:11:0", "typeDescriptions": { "typeIdentifier": "t_uint16", "typeString": "uint16" @@ -3673,7 +3673,7 @@ "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "3988:1:0", + "src": "3975:1:0", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_1_by_1", @@ -3681,7 +3681,7 @@ }, "value": "1" }, - "src": "3974:15:0", + "src": "3961:15:0", "typeDescriptions": { "typeIdentifier": "t_uint16", "typeString": "uint16" @@ -3689,18 +3689,18 @@ }, "id": 271, "nodeType": "ExpressionStatement", - "src": "3974:15:0" + "src": "3961:15:0" } ] } }, "id": 274, "nodeType": "IfStatement", - "src": "3846:159:0", + "src": "3844:148:0", "trueBody": { "id": 264, "nodeType": "Block", - "src": "3866:50:0", + "src": "3865:50:0", "statements": [ { "expression": { @@ -3717,7 +3717,7 @@ "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 201, - "src": "3885:11:0", + "src": "3884:11:0", "typeDescriptions": { "typeIdentifier": "t_uint16", "typeString": "uint16" @@ -3735,7 +3735,7 @@ "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "3899:1:0", + "src": "3898:1:0", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_2_by_1", @@ -3743,7 +3743,7 @@ }, "value": "2" }, - "src": "3885:15:0", + "src": "3884:15:0", "typeDescriptions": { "typeIdentifier": "t_uint16", "typeString": "uint16" @@ -3751,7 +3751,7 @@ }, "id": 263, "nodeType": "ExpressionStatement", - "src": "3885:15:0" + "src": "3884:15:0" } ] } @@ -3760,7 +3760,7 @@ "body": { "id": 318, "nodeType": "Block", - "src": "4201:459:0", + "src": "4176:459:0", "statements": [ { "assignments": [ @@ -3773,7 +3773,7 @@ "name": "playerAddress", "nodeType": "VariableDeclaration", "scope": 318, - "src": "4220:29:0", + "src": "4195:29:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -3784,7 +3784,7 @@ "id": 289, "name": "address", "nodeType": "ElementaryTypeName", - "src": "4220:15:0", + "src": "4195:15:0", "stateMutability": "payable", "typeDescriptions": { "typeIdentifier": "t_address_payable", @@ -3809,7 +3809,7 @@ "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 31, - "src": "4252:5:0", + "src": "4227:5:0", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_Game_$27_storage_$", "typeString": "mapping(uint256 => struct Betting.Game storage ref)" @@ -3823,7 +3823,7 @@ "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 203, - "src": "4258:7:0", + "src": "4233:7:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -3834,7 +3834,7 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "4252:14:0", + "src": "4227:14:0", "typeDescriptions": { "typeIdentifier": "t_struct$_Game_$27_storage", "typeString": "struct Betting.Game storage ref" @@ -3848,7 +3848,7 @@ "memberName": "players", "nodeType": "MemberAccess", "referencedDeclaration": 22, - "src": "4252:22:0", + "src": "4227:22:0", "typeDescriptions": { "typeIdentifier": "t_array$_t_address_payable_$dyn_storage", "typeString": "address payable[] storage ref" @@ -3862,7 +3862,7 @@ "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 276, - "src": "4275:1:0", + "src": "4250:1:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -3873,14 +3873,14 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "4252:25:0", + "src": "4227:25:0", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" } }, "nodeType": "VariableDeclarationStatement", - "src": "4220:57:0" + "src": "4195:57:0" }, { "condition": { @@ -3909,7 +3909,7 @@ "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 31, - "src": "4433:5:0", + "src": "4408:5:0", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_Game_$27_storage_$", "typeString": "mapping(uint256 => struct Betting.Game storage ref)" @@ -3923,7 +3923,7 @@ "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 203, - "src": "4439:7:0", + "src": "4414:7:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -3934,7 +3934,7 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "4433:14:0", + "src": "4408:14:0", "typeDescriptions": { "typeIdentifier": "t_struct$_Game_$27_storage", "typeString": "struct Betting.Game storage ref" @@ -3948,7 +3948,7 @@ "memberName": "playerInfo", "nodeType": "MemberAccess", "referencedDeclaration": 26, - "src": "4433:25:0", + "src": "4408:25:0", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Player_$13_storage_$", "typeString": "mapping(address => struct Betting.Player storage ref)" @@ -3962,7 +3962,7 @@ "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 290, - "src": "4459:13:0", + "src": "4434:13:0", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" @@ -3973,7 +3973,7 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "4433:40:0", + "src": "4408:40:0", "typeDescriptions": { "typeIdentifier": "t_struct$_Player_$13_storage", "typeString": "struct Betting.Player storage ref" @@ -3987,7 +3987,7 @@ "memberName": "teamSelected", "nodeType": "MemberAccess", "referencedDeclaration": 12, - "src": "4433:53:0", + "src": "4408:53:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -4002,13 +4002,13 @@ "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 201, - "src": "4511:11:0", + "src": "4486:11:0", "typeDescriptions": { "typeIdentifier": "t_uint16", "typeString": "uint16" } }, - "src": "4433:89:0", + "src": "4408:89:0", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -4017,11 +4017,11 @@ "falseBody": null, "id": 317, "nodeType": "IfStatement", - "src": "4407:238:0", + "src": "4382:238:0", "trueBody": { "id": 316, "nodeType": "Block", - "src": "4542:103:0", + "src": "4517:103:0", "statements": [ { "expression": { @@ -4040,7 +4040,7 @@ "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 217, - "src": "4565:7:0", + "src": "4540:7:0", "typeDescriptions": { "typeIdentifier": "t_array$_t_address_payable_$1000_memory_ptr", "typeString": "address payable[1000] memory" @@ -4054,7 +4054,7 @@ "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 220, - "src": "4573:5:0", + "src": "4548:5:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -4065,7 +4065,7 @@ "isPure": false, "lValueRequested": true, "nodeType": "IndexAccess", - "src": "4565:14:0", + "src": "4540:14:0", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" @@ -4080,13 +4080,13 @@ "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 290, - "src": "4582:13:0", + "src": "4557:13:0", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" } }, - "src": "4565:30:0", + "src": "4540:30:0", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" @@ -4094,7 +4094,7 @@ }, "id": 312, "nodeType": "ExpressionStatement", - "src": "4565:30:0" + "src": "4540:30:0" }, { "expression": { @@ -4107,7 +4107,7 @@ "nodeType": "UnaryOperation", "operator": "++", "prefix": false, - "src": "4618:7:0", + "src": "4593:7:0", "subExpression": { "argumentTypes": null, "id": 313, @@ -4115,7 +4115,7 @@ "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 220, - "src": "4618:5:0", + "src": "4593:5:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -4128,7 +4128,7 @@ }, "id": 315, "nodeType": "ExpressionStatement", - "src": "4618:7:0" + "src": "4593:7:0" } ] } @@ -4153,7 +4153,7 @@ "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 276, - "src": "4161:1:0", + "src": "4136:1:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -4174,7 +4174,7 @@ "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 31, - "src": "4165:5:0", + "src": "4140:5:0", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_Game_$27_storage_$", "typeString": "mapping(uint256 => struct Betting.Game storage ref)" @@ -4188,7 +4188,7 @@ "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 203, - "src": "4171:7:0", + "src": "4146:7:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -4199,7 +4199,7 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "4165:14:0", + "src": "4140:14:0", "typeDescriptions": { "typeIdentifier": "t_struct$_Game_$27_storage", "typeString": "struct Betting.Game storage ref" @@ -4213,7 +4213,7 @@ "memberName": "players", "nodeType": "MemberAccess", "referencedDeclaration": 22, - "src": "4165:22:0", + "src": "4140:22:0", "typeDescriptions": { "typeIdentifier": "t_array$_t_address_payable_$dyn_storage", "typeString": "address payable[] storage ref" @@ -4227,13 +4227,13 @@ "memberName": "length", "nodeType": "MemberAccess", "referencedDeclaration": null, - "src": "4165:29:0", + "src": "4140:29:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "4161:33:0", + "src": "4136:33:0", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -4251,7 +4251,7 @@ "name": "i", "nodeType": "VariableDeclaration", "scope": 319, - "src": "4146:9:0", + "src": "4121:9:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -4262,7 +4262,7 @@ "id": 275, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "4146:7:0", + "src": "4121:7:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -4283,7 +4283,7 @@ "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "4158:1:0", + "src": "4133:1:0", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", @@ -4292,7 +4292,7 @@ "value": "0" }, "nodeType": "VariableDeclarationStatement", - "src": "4146:13:0" + "src": "4121:13:0" }, "loopExpression": { "expression": { @@ -4305,7 +4305,7 @@ "nodeType": "UnaryOperation", "operator": "++", "prefix": false, - "src": "4196:3:0", + "src": "4171:3:0", "subExpression": { "argumentTypes": null, "id": 286, @@ -4313,7 +4313,7 @@ "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 276, - "src": "4196:1:0", + "src": "4171:1:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -4326,10 +4326,10 @@ }, "id": 288, "nodeType": "ExpressionStatement", - "src": "4196:3:0" + "src": "4171:3:0" }, "nodeType": "ForStatement", - "src": "4141:519:0" + "src": "4116:519:0" }, { "condition": { @@ -4350,7 +4350,7 @@ "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 201, - "src": "4754:11:0", + "src": "4729:11:0", "typeDescriptions": { "typeIdentifier": "t_uint16", "typeString": "uint16" @@ -4368,7 +4368,7 @@ "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "4769:1:0", + "src": "4744:1:0", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_1_by_1", @@ -4376,7 +4376,7 @@ }, "value": "1" }, - "src": "4754:16:0", + "src": "4729:16:0", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -4385,7 +4385,7 @@ "falseBody": { "id": 352, "nodeType": "Block", - "src": "4911:133:0", + "src": "4886:133:0", "statements": [ { "expression": { @@ -4402,7 +4402,7 @@ "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 224, - "src": "4930:8:0", + "src": "4905:8:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -4421,7 +4421,7 @@ "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 31, - "src": "4941:5:0", + "src": "4916:5:0", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_Game_$27_storage_$", "typeString": "mapping(uint256 => struct Betting.Game storage ref)" @@ -4435,7 +4435,7 @@ "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 203, - "src": "4947:7:0", + "src": "4922:7:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -4446,7 +4446,7 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "4941:14:0", + "src": "4916:14:0", "typeDescriptions": { "typeIdentifier": "t_struct$_Game_$27_storage", "typeString": "struct Betting.Game storage ref" @@ -4460,13 +4460,13 @@ "memberName": "totalBetsHome", "nodeType": "MemberAccess", "referencedDeclaration": 15, - "src": "4941:28:0", + "src": "4916:28:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "4930:39:0", + "src": "4905:39:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -4474,7 +4474,7 @@ }, "id": 344, "nodeType": "ExpressionStatement", - "src": "4930:39:0" + "src": "4905:39:0" }, { "expression": { @@ -4491,7 +4491,7 @@ "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 228, - "src": "4988:9:0", + "src": "4963:9:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -4510,7 +4510,7 @@ "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 31, - "src": "5000:5:0", + "src": "4975:5:0", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_Game_$27_storage_$", "typeString": "mapping(uint256 => struct Betting.Game storage ref)" @@ -4524,7 +4524,7 @@ "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 203, - "src": "5006:7:0", + "src": "4981:7:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -4535,7 +4535,7 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "5000:14:0", + "src": "4975:14:0", "typeDescriptions": { "typeIdentifier": "t_struct$_Game_$27_storage", "typeString": "struct Betting.Game storage ref" @@ -4549,13 +4549,13 @@ "memberName": "totalBetsAway", "nodeType": "MemberAccess", "referencedDeclaration": 17, - "src": "5000:28:0", + "src": "4975:28:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "4988:40:0", + "src": "4963:40:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -4563,17 +4563,17 @@ }, "id": 351, "nodeType": "ExpressionStatement", - "src": "4988:40:0" + "src": "4963:40:0" } ] }, "id": 353, "nodeType": "IfStatement", - "src": "4750:294:0", + "src": "4725:294:0", "trueBody": { "id": 337, "nodeType": "Block", - "src": "4772:133:0", + "src": "4747:133:0", "statements": [ { "expression": { @@ -4590,7 +4590,7 @@ "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 224, - "src": "4791:8:0", + "src": "4766:8:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -4609,7 +4609,7 @@ "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 31, - "src": "4802:5:0", + "src": "4777:5:0", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_Game_$27_storage_$", "typeString": "mapping(uint256 => struct Betting.Game storage ref)" @@ -4623,7 +4623,7 @@ "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 203, - "src": "4808:7:0", + "src": "4783:7:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -4634,7 +4634,7 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "4802:14:0", + "src": "4777:14:0", "typeDescriptions": { "typeIdentifier": "t_struct$_Game_$27_storage", "typeString": "struct Betting.Game storage ref" @@ -4648,13 +4648,13 @@ "memberName": "totalBetsAway", "nodeType": "MemberAccess", "referencedDeclaration": 17, - "src": "4802:28:0", + "src": "4777:28:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "4791:39:0", + "src": "4766:39:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -4662,7 +4662,7 @@ }, "id": 329, "nodeType": "ExpressionStatement", - "src": "4791:39:0" + "src": "4766:39:0" }, { "expression": { @@ -4679,7 +4679,7 @@ "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 228, - "src": "4849:9:0", + "src": "4824:9:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -4698,7 +4698,7 @@ "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 31, - "src": "4861:5:0", + "src": "4836:5:0", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_Game_$27_storage_$", "typeString": "mapping(uint256 => struct Betting.Game storage ref)" @@ -4712,7 +4712,7 @@ "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 203, - "src": "4867:7:0", + "src": "4842:7:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -4723,7 +4723,7 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "4861:14:0", + "src": "4836:14:0", "typeDescriptions": { "typeIdentifier": "t_struct$_Game_$27_storage", "typeString": "struct Betting.Game storage ref" @@ -4737,13 +4737,13 @@ "memberName": "totalBetsHome", "nodeType": "MemberAccess", "referencedDeclaration": 15, - "src": "4861:28:0", + "src": "4836:28:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "4849:40:0", + "src": "4824:40:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -4751,7 +4751,7 @@ }, "id": 336, "nodeType": "ExpressionStatement", - "src": "4849:40:0" + "src": "4824:40:0" } ] } @@ -4760,7 +4760,7 @@ "body": { "id": 403, "nodeType": "Block", - "src": "5199:645:0", + "src": "5174:645:0", "statements": [ { "condition": { @@ -4783,7 +4783,7 @@ "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 217, - "src": "5320:7:0", + "src": "5295:7:0", "typeDescriptions": { "typeIdentifier": "t_array$_t_address_payable_$1000_memory_ptr", "typeString": "address payable[1000] memory" @@ -4797,7 +4797,7 @@ "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 355, - "src": "5328:1:0", + "src": "5303:1:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -4808,7 +4808,7 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "5320:10:0", + "src": "5295:10:0", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" @@ -4829,7 +4829,7 @@ "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "5342:1:0", + "src": "5317:1:0", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", @@ -4851,7 +4851,7 @@ "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", - "src": "5334:7:0", + "src": "5309:7:0", "typeDescriptions": { "typeIdentifier": "t_type$_t_address_$", "typeString": "type(address)" @@ -4866,13 +4866,13 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "5334:10:0", + "src": "5309:10:0", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" } }, - "src": "5320:24:0", + "src": "5295:24:0", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -4881,11 +4881,11 @@ "falseBody": null, "id": 402, "nodeType": "IfStatement", - "src": "5316:513:0", + "src": "5291:513:0", "trueBody": { "id": 401, "nodeType": "Block", - "src": "5346:483:0", + "src": "5321:483:0", "statements": [ { "expression": { @@ -4902,7 +4902,7 @@ "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 232, - "src": "5369:3:0", + "src": "5344:3:0", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -4919,7 +4919,7 @@ "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 217, - "src": "5375:7:0", + "src": "5350:7:0", "typeDescriptions": { "typeIdentifier": "t_array$_t_address_payable_$1000_memory_ptr", "typeString": "address payable[1000] memory" @@ -4933,7 +4933,7 @@ "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 355, - "src": "5383:1:0", + "src": "5358:1:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -4944,13 +4944,13 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "5375:10:0", + "src": "5350:10:0", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" } }, - "src": "5369:16:0", + "src": "5344:16:0", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -4958,7 +4958,7 @@ }, "id": 376, "nodeType": "ExpressionStatement", - "src": "5369:16:0" + "src": "5344:16:0" }, { "assignments": [ @@ -4971,7 +4971,7 @@ "name": "bet_amount", "nodeType": "VariableDeclaration", "scope": 401, - "src": "5408:18:0", + "src": "5383:18:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -4982,7 +4982,7 @@ "id": 377, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "5408:7:0", + "src": "5383:7:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -5008,7 +5008,7 @@ "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 31, - "src": "5429:5:0", + "src": "5404:5:0", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_Game_$27_storage_$", "typeString": "mapping(uint256 => struct Betting.Game storage ref)" @@ -5022,7 +5022,7 @@ "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 203, - "src": "5435:7:0", + "src": "5410:7:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -5033,7 +5033,7 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "5429:14:0", + "src": "5404:14:0", "typeDescriptions": { "typeIdentifier": "t_struct$_Game_$27_storage", "typeString": "struct Betting.Game storage ref" @@ -5047,7 +5047,7 @@ "memberName": "playerInfo", "nodeType": "MemberAccess", "referencedDeclaration": 26, - "src": "5429:51:0", + "src": "5404:51:0", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Player_$13_storage_$", "typeString": "mapping(address => struct Betting.Player storage ref)" @@ -5061,7 +5061,7 @@ "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 232, - "src": "5481:3:0", + "src": "5456:3:0", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" @@ -5072,7 +5072,7 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "5429:56:0", + "src": "5404:56:0", "typeDescriptions": { "typeIdentifier": "t_struct$_Player_$13_storage", "typeString": "struct Betting.Player storage ref" @@ -5086,14 +5086,14 @@ "memberName": "amountBet", "nodeType": "MemberAccess", "referencedDeclaration": 10, - "src": "5429:92:0", + "src": "5404:92:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "VariableDeclarationStatement", - "src": "5408:113:0" + "src": "5383:113:0" }, { "expression": { @@ -5117,7 +5117,7 @@ "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 378, - "src": "5747:10:0", + "src": "5722:10:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -5149,7 +5149,7 @@ "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "5761:1:0", + "src": "5736:1:0", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_1_by_1", @@ -5177,7 +5177,7 @@ "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 224, - "src": "5765:8:0", + "src": "5740:8:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -5192,19 +5192,19 @@ "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 228, - "src": "5776:9:0", + "src": "5751:9:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "5765:20:0", + "src": "5740:20:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "5761:24:0", + "src": "5736:24:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -5218,13 +5218,13 @@ "isPure": false, "lValueRequested": false, "nodeType": "TupleExpression", - "src": "5760:26:0", + "src": "5735:26:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "5747:39:0", + "src": "5722:39:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -5247,7 +5247,7 @@ "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 217, - "src": "5701:7:0", + "src": "5676:7:0", "typeDescriptions": { "typeIdentifier": "t_array$_t_address_payable_$1000_memory_ptr", "typeString": "address payable[1000] memory" @@ -5261,7 +5261,7 @@ "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 355, - "src": "5709:1:0", + "src": "5684:1:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -5272,7 +5272,7 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "5701:10:0", + "src": "5676:10:0", "typeDescriptions": { "typeIdentifier": "t_address_payable", "typeString": "address payable" @@ -5286,7 +5286,7 @@ "memberName": "transfer", "nodeType": "MemberAccess", "referencedDeclaration": null, - "src": "5701:19:0", + "src": "5676:19:0", "typeDescriptions": { "typeIdentifier": "t_function_transfer_nonpayable$_t_uint256_$returns$__$", "typeString": "function (uint256)" @@ -5300,7 +5300,7 @@ "lValueRequested": false, "names": [], "nodeType": "FunctionCall", - "src": "5701:108:0", + "src": "5676:108:0", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" @@ -5308,7 +5308,7 @@ }, "id": 400, "nodeType": "ExpressionStatement", - "src": "5701:108:0" + "src": "5676:108:0" } ] } @@ -5333,7 +5333,7 @@ "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 355, - "src": "5183:1:0", + "src": "5158:1:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -5348,13 +5348,13 @@ "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 220, - "src": "5187:5:0", + "src": "5162:5:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, - "src": "5183:9:0", + "src": "5158:9:0", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -5372,7 +5372,7 @@ "name": "j", "nodeType": "VariableDeclaration", "scope": 404, - "src": "5168:9:0", + "src": "5143:9:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -5383,7 +5383,7 @@ "id": 354, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "5168:7:0", + "src": "5143:7:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -5404,7 +5404,7 @@ "kind": "number", "lValueRequested": false, "nodeType": "Literal", - "src": "5180:1:0", + "src": "5155:1:0", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", @@ -5413,7 +5413,7 @@ "value": "0" }, "nodeType": "VariableDeclarationStatement", - "src": "5168:13:0" + "src": "5143:13:0" }, "loopExpression": { "expression": { @@ -5426,7 +5426,7 @@ "nodeType": "UnaryOperation", "operator": "++", "prefix": false, - "src": "5194:3:0", + "src": "5169:3:0", "subExpression": { "argumentTypes": null, "id": 361, @@ -5434,7 +5434,7 @@ "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 355, - "src": "5194:1:0", + "src": "5169:1:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -5447,10 +5447,10 @@ }, "id": 363, "nodeType": "ExpressionStatement", - "src": "5194:3:0" + "src": "5169:3:0" }, "nodeType": "ForStatement", - "src": "5163:681:0" + "src": "5138:681:0" } ] } @@ -5474,7 +5474,7 @@ "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 31, - "src": "5911:5:0", + "src": "5886:5:0", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_Game_$27_storage_$", "typeString": "mapping(uint256 => struct Betting.Game storage ref)" @@ -5488,7 +5488,7 @@ "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 203, - "src": "5917:7:0", + "src": "5892:7:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -5499,7 +5499,7 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "5911:14:0", + "src": "5886:14:0", "typeDescriptions": { "typeIdentifier": "t_struct$_Game_$27_storage", "typeString": "struct Betting.Game storage ref" @@ -5513,7 +5513,7 @@ "memberName": "takenPlace", "nodeType": "MemberAccess", "referencedDeclaration": 19, - "src": "5911:25:0", + "src": "5886:25:0", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -5531,7 +5531,7 @@ "kind": "bool", "lValueRequested": false, "nodeType": "Literal", - "src": "5939:4:0", + "src": "5914:4:0", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_bool", @@ -5539,7 +5539,7 @@ }, "value": "true" }, - "src": "5911:32:0", + "src": "5886:32:0", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" @@ -5547,7 +5547,7 @@ }, "id": 413, "nodeType": "ExpressionStatement", - "src": "5911:32:0" + "src": "5886:32:0" } ] }, @@ -5624,7 +5624,7 @@ "src": "2884:0:0" }, "scope": 442, - "src": "2814:3479:0", + "src": "2814:3454:0", "stateMutability": "nonpayable", "superFunction": null, "visibility": "public" @@ -5633,7 +5633,7 @@ "body": { "id": 427, "nodeType": "Block", - "src": "6368:54:0", + "src": "6343:54:0", "statements": [ { "expression": { @@ -5647,7 +5647,7 @@ "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 31, - "src": "6386:5:0", + "src": "6361:5:0", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_Game_$27_storage_$", "typeString": "mapping(uint256 => struct Betting.Game storage ref)" @@ -5661,7 +5661,7 @@ "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 417, - "src": "6392:7:0", + "src": "6367:7:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -5672,7 +5672,7 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "6386:14:0", + "src": "6361:14:0", "typeDescriptions": { "typeIdentifier": "t_struct$_Game_$27_storage", "typeString": "struct Betting.Game storage ref" @@ -5686,7 +5686,7 @@ "memberName": "totalBetsHome", "nodeType": "MemberAccess", "referencedDeclaration": 15, - "src": "6386:28:0", + "src": "6361:28:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -5695,7 +5695,7 @@ "functionReturnParameters": 421, "id": 426, "nodeType": "Return", - "src": "6379:35:0" + "src": "6354:35:0" } ] }, @@ -5716,7 +5716,7 @@ "name": "_gameID", "nodeType": "VariableDeclaration", "scope": 428, - "src": "6321:15:0", + "src": "6296:15:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -5727,7 +5727,7 @@ "id": 416, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "6321:7:0", + "src": "6296:7:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -5737,7 +5737,7 @@ "visibility": "internal" } ], - "src": "6320:17:0" + "src": "6295:17:0" }, "returnParameters": { "id": 421, @@ -5749,7 +5749,7 @@ "name": "", "nodeType": "VariableDeclaration", "scope": 428, - "src": "6359:7:0", + "src": "6334:7:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -5760,7 +5760,7 @@ "id": 419, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "6359:7:0", + "src": "6334:7:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -5770,10 +5770,10 @@ "visibility": "internal" } ], - "src": "6358:9:0" + "src": "6333:9:0" }, "scope": 442, - "src": "6301:121:0", + "src": "6276:121:0", "stateMutability": "view", "superFunction": null, "visibility": "public" @@ -5782,7 +5782,7 @@ "body": { "id": 440, "nodeType": "Block", - "src": "6497:54:0", + "src": "6472:54:0", "statements": [ { "expression": { @@ -5796,7 +5796,7 @@ "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 31, - "src": "6515:5:0", + "src": "6490:5:0", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_uint256_$_t_struct$_Game_$27_storage_$", "typeString": "mapping(uint256 => struct Betting.Game storage ref)" @@ -5810,7 +5810,7 @@ "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 430, - "src": "6521:7:0", + "src": "6496:7:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -5821,7 +5821,7 @@ "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", - "src": "6515:14:0", + "src": "6490:14:0", "typeDescriptions": { "typeIdentifier": "t_struct$_Game_$27_storage", "typeString": "struct Betting.Game storage ref" @@ -5835,7 +5835,7 @@ "memberName": "totalBetsAway", "nodeType": "MemberAccess", "referencedDeclaration": 17, - "src": "6515:28:0", + "src": "6490:28:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -5844,7 +5844,7 @@ "functionReturnParameters": 434, "id": 439, "nodeType": "Return", - "src": "6508:35:0" + "src": "6483:35:0" } ] }, @@ -5865,7 +5865,7 @@ "name": "_gameID", "nodeType": "VariableDeclaration", "scope": 441, - "src": "6450:15:0", + "src": "6425:15:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -5876,7 +5876,7 @@ "id": 429, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "6450:7:0", + "src": "6425:7:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -5886,7 +5886,7 @@ "visibility": "internal" } ], - "src": "6449:17:0" + "src": "6424:17:0" }, "returnParameters": { "id": 434, @@ -5898,7 +5898,7 @@ "name": "", "nodeType": "VariableDeclaration", "scope": 441, - "src": "6488:7:0", + "src": "6463:7:0", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { @@ -5909,7 +5909,7 @@ "id": 432, "name": "uint256", "nodeType": "ElementaryTypeName", - "src": "6488:7:0", + "src": "6463:7:0", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" @@ -5919,20 +5919,20 @@ "visibility": "internal" } ], - "src": "6487:9:0" + "src": "6462:9:0" }, "scope": 442, - "src": "6430:121:0", + "src": "6405:121:0", "stateMutability": "view", "superFunction": null, "visibility": "public" } ], "scope": 443, - "src": "60:6494:0" + "src": "60:6469:0" } ], - "src": "33:6523:0" + "src": "33:6498:0" }, "legacyAST": { "attributes": { @@ -9598,7 +9598,7 @@ }, "id": 257, "name": "Identifier", - "src": "3850:10:0" + "src": "3848:10:0" }, { "attributes": { @@ -9615,12 +9615,12 @@ }, "id": 258, "name": "Literal", - "src": "3864:1:0" + "src": "3862:1:0" } ], "id": 259, "name": "BinaryOperation", - "src": "3850:15:0" + "src": "3848:15:0" }, { "children": [ @@ -9649,7 +9649,7 @@ }, "id": 260, "name": "Identifier", - "src": "3885:11:0" + "src": "3884:11:0" }, { "attributes": { @@ -9666,22 +9666,22 @@ }, "id": 261, "name": "Literal", - "src": "3899:1:0" + "src": "3898:1:0" } ], "id": 262, "name": "Assignment", - "src": "3885:15:0" + "src": "3884:15:0" } ], "id": 263, "name": "ExpressionStatement", - "src": "3885:15:0" + "src": "3884:15:0" } ], "id": 264, "name": "Block", - "src": "3866:50:0" + "src": "3865:50:0" }, { "attributes": { @@ -9715,7 +9715,7 @@ }, "id": 265, "name": "Identifier", - "src": "3939:10:0" + "src": "3925:10:0" }, { "attributes": { @@ -9732,12 +9732,12 @@ }, "id": 266, "name": "Literal", - "src": "3953:1:0" + "src": "3939:1:0" } ], "id": 267, "name": "BinaryOperation", - "src": "3939:15:0" + "src": "3925:15:0" }, { "children": [ @@ -9766,7 +9766,7 @@ }, "id": 268, "name": "Identifier", - "src": "3974:11:0" + "src": "3961:11:0" }, { "attributes": { @@ -9783,32 +9783,32 @@ }, "id": 269, "name": "Literal", - "src": "3988:1:0" + "src": "3975:1:0" } ], "id": 270, "name": "Assignment", - "src": "3974:15:0" + "src": "3961:15:0" } ], "id": 271, "name": "ExpressionStatement", - "src": "3974:15:0" + "src": "3961:15:0" } ], "id": 272, "name": "Block", - "src": "3955:50:0" + "src": "3942:50:0" } ], "id": 273, "name": "IfStatement", - "src": "3935:70:0" + "src": "3921:71:0" } ], "id": 274, "name": "IfStatement", - "src": "3846:159:0" + "src": "3844:148:0" }, { "children": [ @@ -9838,12 +9838,12 @@ }, "id": 275, "name": "ElementaryTypeName", - "src": "4146:7:0" + "src": "4121:7:0" } ], "id": 276, "name": "VariableDeclaration", - "src": "4146:9:0" + "src": "4121:9:0" }, { "attributes": { @@ -9860,12 +9860,12 @@ }, "id": 277, "name": "Literal", - "src": "4158:1:0" + "src": "4133:1:0" } ], "id": 278, "name": "VariableDeclarationStatement", - "src": "4146:13:0" + "src": "4121:13:0" }, { "attributes": { @@ -9894,7 +9894,7 @@ }, "id": 279, "name": "Identifier", - "src": "4161:1:0" + "src": "4136:1:0" }, { "attributes": { @@ -9942,7 +9942,7 @@ }, "id": 280, "name": "Identifier", - "src": "4165:5:0" + "src": "4140:5:0" }, { "attributes": { @@ -9956,27 +9956,27 @@ }, "id": 281, "name": "Identifier", - "src": "4171:7:0" + "src": "4146:7:0" } ], "id": 282, "name": "IndexAccess", - "src": "4165:14:0" + "src": "4140:14:0" } ], "id": 283, "name": "MemberAccess", - "src": "4165:22:0" + "src": "4140:22:0" } ], "id": 284, "name": "MemberAccess", - "src": "4165:29:0" + "src": "4140:29:0" } ], "id": 285, "name": "BinaryOperation", - "src": "4161:33:0" + "src": "4136:33:0" }, { "children": [ @@ -10004,17 +10004,17 @@ }, "id": 286, "name": "Identifier", - "src": "4196:1:0" + "src": "4171:1:0" } ], "id": 287, "name": "UnaryOperation", - "src": "4196:3:0" + "src": "4171:3:0" } ], "id": 288, "name": "ExpressionStatement", - "src": "4196:3:0" + "src": "4171:3:0" }, { "children": [ @@ -10045,12 +10045,12 @@ }, "id": 289, "name": "ElementaryTypeName", - "src": "4220:15:0" + "src": "4195:15:0" } ], "id": 290, "name": "VariableDeclaration", - "src": "4220:29:0" + "src": "4195:29:0" }, { "attributes": { @@ -10096,7 +10096,7 @@ }, "id": 291, "name": "Identifier", - "src": "4252:5:0" + "src": "4227:5:0" }, { "attributes": { @@ -10110,17 +10110,17 @@ }, "id": 292, "name": "Identifier", - "src": "4258:7:0" + "src": "4233:7:0" } ], "id": 293, "name": "IndexAccess", - "src": "4252:14:0" + "src": "4227:14:0" } ], "id": 294, "name": "MemberAccess", - "src": "4252:22:0" + "src": "4227:22:0" }, { "attributes": { @@ -10134,17 +10134,17 @@ }, "id": 295, "name": "Identifier", - "src": "4275:1:0" + "src": "4250:1:0" } ], "id": 296, "name": "IndexAccess", - "src": "4252:25:0" + "src": "4227:25:0" } ], "id": 297, "name": "VariableDeclarationStatement", - "src": "4220:57:0" + "src": "4195:57:0" }, { "attributes": { @@ -10222,7 +10222,7 @@ }, "id": 298, "name": "Identifier", - "src": "4433:5:0" + "src": "4408:5:0" }, { "attributes": { @@ -10236,17 +10236,17 @@ }, "id": 299, "name": "Identifier", - "src": "4439:7:0" + "src": "4414:7:0" } ], "id": 300, "name": "IndexAccess", - "src": "4433:14:0" + "src": "4408:14:0" } ], "id": 301, "name": "MemberAccess", - "src": "4433:25:0" + "src": "4408:25:0" }, { "attributes": { @@ -10260,17 +10260,17 @@ }, "id": 302, "name": "Identifier", - "src": "4459:13:0" + "src": "4434:13:0" } ], "id": 303, "name": "IndexAccess", - "src": "4433:40:0" + "src": "4408:40:0" } ], "id": 304, "name": "MemberAccess", - "src": "4433:53:0" + "src": "4408:53:0" }, { "attributes": { @@ -10284,12 +10284,12 @@ }, "id": 305, "name": "Identifier", - "src": "4511:11:0" + "src": "4486:11:0" } ], "id": 306, "name": "BinaryOperation", - "src": "4433:89:0" + "src": "4408:89:0" }, { "children": [ @@ -10328,7 +10328,7 @@ }, "id": 307, "name": "Identifier", - "src": "4565:7:0" + "src": "4540:7:0" }, { "attributes": { @@ -10342,12 +10342,12 @@ }, "id": 308, "name": "Identifier", - "src": "4573:5:0" + "src": "4548:5:0" } ], "id": 309, "name": "IndexAccess", - "src": "4565:14:0" + "src": "4540:14:0" }, { "attributes": { @@ -10361,17 +10361,17 @@ }, "id": 310, "name": "Identifier", - "src": "4582:13:0" + "src": "4557:13:0" } ], "id": 311, "name": "Assignment", - "src": "4565:30:0" + "src": "4540:30:0" } ], "id": 312, "name": "ExpressionStatement", - "src": "4565:30:0" + "src": "4540:30:0" }, { "children": [ @@ -10399,37 +10399,37 @@ }, "id": 313, "name": "Identifier", - "src": "4618:5:0" + "src": "4593:5:0" } ], "id": 314, "name": "UnaryOperation", - "src": "4618:7:0" + "src": "4593:7:0" } ], "id": 315, "name": "ExpressionStatement", - "src": "4618:7:0" + "src": "4593:7:0" } ], "id": 316, "name": "Block", - "src": "4542:103:0" + "src": "4517:103:0" } ], "id": 317, "name": "IfStatement", - "src": "4407:238:0" + "src": "4382:238:0" } ], "id": 318, "name": "Block", - "src": "4201:459:0" + "src": "4176:459:0" } ], "id": 319, "name": "ForStatement", - "src": "4141:519:0" + "src": "4116:519:0" }, { "children": [ @@ -10460,7 +10460,7 @@ }, "id": 320, "name": "Identifier", - "src": "4754:11:0" + "src": "4729:11:0" }, { "attributes": { @@ -10477,12 +10477,12 @@ }, "id": 321, "name": "Literal", - "src": "4769:1:0" + "src": "4744:1:0" } ], "id": 322, "name": "BinaryOperation", - "src": "4754:16:0" + "src": "4729:16:0" }, { "children": [ @@ -10511,7 +10511,7 @@ }, "id": 323, "name": "Identifier", - "src": "4791:8:0" + "src": "4766:8:0" }, { "attributes": { @@ -10547,7 +10547,7 @@ }, "id": 324, "name": "Identifier", - "src": "4802:5:0" + "src": "4777:5:0" }, { "attributes": { @@ -10561,27 +10561,27 @@ }, "id": 325, "name": "Identifier", - "src": "4808:7:0" + "src": "4783:7:0" } ], "id": 326, "name": "IndexAccess", - "src": "4802:14:0" + "src": "4777:14:0" } ], "id": 327, "name": "MemberAccess", - "src": "4802:28:0" + "src": "4777:28:0" } ], "id": 328, "name": "Assignment", - "src": "4791:39:0" + "src": "4766:39:0" } ], "id": 329, "name": "ExpressionStatement", - "src": "4791:39:0" + "src": "4766:39:0" }, { "children": [ @@ -10608,7 +10608,7 @@ }, "id": 330, "name": "Identifier", - "src": "4849:9:0" + "src": "4824:9:0" }, { "attributes": { @@ -10644,7 +10644,7 @@ }, "id": 331, "name": "Identifier", - "src": "4861:5:0" + "src": "4836:5:0" }, { "attributes": { @@ -10658,32 +10658,32 @@ }, "id": 332, "name": "Identifier", - "src": "4867:7:0" + "src": "4842:7:0" } ], "id": 333, "name": "IndexAccess", - "src": "4861:14:0" + "src": "4836:14:0" } ], "id": 334, "name": "MemberAccess", - "src": "4861:28:0" + "src": "4836:28:0" } ], "id": 335, "name": "Assignment", - "src": "4849:40:0" + "src": "4824:40:0" } ], "id": 336, "name": "ExpressionStatement", - "src": "4849:40:0" + "src": "4824:40:0" } ], "id": 337, "name": "Block", - "src": "4772:133:0" + "src": "4747:133:0" }, { "children": [ @@ -10712,7 +10712,7 @@ }, "id": 338, "name": "Identifier", - "src": "4930:8:0" + "src": "4905:8:0" }, { "attributes": { @@ -10748,7 +10748,7 @@ }, "id": 339, "name": "Identifier", - "src": "4941:5:0" + "src": "4916:5:0" }, { "attributes": { @@ -10762,27 +10762,27 @@ }, "id": 340, "name": "Identifier", - "src": "4947:7:0" + "src": "4922:7:0" } ], "id": 341, "name": "IndexAccess", - "src": "4941:14:0" + "src": "4916:14:0" } ], "id": 342, "name": "MemberAccess", - "src": "4941:28:0" + "src": "4916:28:0" } ], "id": 343, "name": "Assignment", - "src": "4930:39:0" + "src": "4905:39:0" } ], "id": 344, "name": "ExpressionStatement", - "src": "4930:39:0" + "src": "4905:39:0" }, { "children": [ @@ -10809,7 +10809,7 @@ }, "id": 345, "name": "Identifier", - "src": "4988:9:0" + "src": "4963:9:0" }, { "attributes": { @@ -10845,7 +10845,7 @@ }, "id": 346, "name": "Identifier", - "src": "5000:5:0" + "src": "4975:5:0" }, { "attributes": { @@ -10859,37 +10859,37 @@ }, "id": 347, "name": "Identifier", - "src": "5006:7:0" + "src": "4981:7:0" } ], "id": 348, "name": "IndexAccess", - "src": "5000:14:0" + "src": "4975:14:0" } ], "id": 349, "name": "MemberAccess", - "src": "5000:28:0" + "src": "4975:28:0" } ], "id": 350, "name": "Assignment", - "src": "4988:40:0" + "src": "4963:40:0" } ], "id": 351, "name": "ExpressionStatement", - "src": "4988:40:0" + "src": "4963:40:0" } ], "id": 352, "name": "Block", - "src": "4911:133:0" + "src": "4886:133:0" } ], "id": 353, "name": "IfStatement", - "src": "4750:294:0" + "src": "4725:294:0" }, { "children": [ @@ -10919,12 +10919,12 @@ }, "id": 354, "name": "ElementaryTypeName", - "src": "5168:7:0" + "src": "5143:7:0" } ], "id": 355, "name": "VariableDeclaration", - "src": "5168:9:0" + "src": "5143:9:0" }, { "attributes": { @@ -10941,12 +10941,12 @@ }, "id": 356, "name": "Literal", - "src": "5180:1:0" + "src": "5155:1:0" } ], "id": 357, "name": "VariableDeclarationStatement", - "src": "5168:13:0" + "src": "5143:13:0" }, { "attributes": { @@ -10975,7 +10975,7 @@ }, "id": 358, "name": "Identifier", - "src": "5183:1:0" + "src": "5158:1:0" }, { "attributes": { @@ -10989,12 +10989,12 @@ }, "id": 359, "name": "Identifier", - "src": "5187:5:0" + "src": "5162:5:0" } ], "id": 360, "name": "BinaryOperation", - "src": "5183:9:0" + "src": "5158:9:0" }, { "children": [ @@ -11022,17 +11022,17 @@ }, "id": 361, "name": "Identifier", - "src": "5194:1:0" + "src": "5169:1:0" } ], "id": 362, "name": "UnaryOperation", - "src": "5194:3:0" + "src": "5169:3:0" } ], "id": 363, "name": "ExpressionStatement", - "src": "5194:3:0" + "src": "5169:3:0" }, { "children": [ @@ -11078,7 +11078,7 @@ }, "id": 364, "name": "Identifier", - "src": "5320:7:0" + "src": "5295:7:0" }, { "attributes": { @@ -11092,12 +11092,12 @@ }, "id": 365, "name": "Identifier", - "src": "5328:1:0" + "src": "5303:1:0" } ], "id": 366, "name": "IndexAccess", - "src": "5320:10:0" + "src": "5295:10:0" }, { "attributes": { @@ -11131,7 +11131,7 @@ }, "id": 367, "name": "ElementaryTypeNameExpression", - "src": "5334:7:0" + "src": "5309:7:0" }, { "attributes": { @@ -11148,17 +11148,17 @@ }, "id": 368, "name": "Literal", - "src": "5342:1:0" + "src": "5317:1:0" } ], "id": 369, "name": "FunctionCall", - "src": "5334:10:0" + "src": "5309:10:0" } ], "id": 370, "name": "BinaryOperation", - "src": "5320:24:0" + "src": "5295:24:0" }, { "children": [ @@ -11187,7 +11187,7 @@ }, "id": 371, "name": "Identifier", - "src": "5369:3:0" + "src": "5344:3:0" }, { "attributes": { @@ -11211,7 +11211,7 @@ }, "id": 372, "name": "Identifier", - "src": "5375:7:0" + "src": "5350:7:0" }, { "attributes": { @@ -11225,22 +11225,22 @@ }, "id": 373, "name": "Identifier", - "src": "5383:1:0" + "src": "5358:1:0" } ], "id": 374, "name": "IndexAccess", - "src": "5375:10:0" + "src": "5350:10:0" } ], "id": 375, "name": "Assignment", - "src": "5369:16:0" + "src": "5344:16:0" } ], "id": 376, "name": "ExpressionStatement", - "src": "5369:16:0" + "src": "5344:16:0" }, { "attributes": { @@ -11268,12 +11268,12 @@ }, "id": 377, "name": "ElementaryTypeName", - "src": "5408:7:0" + "src": "5383:7:0" } ], "id": 378, "name": "VariableDeclaration", - "src": "5408:18:0" + "src": "5383:18:0" }, { "attributes": { @@ -11331,7 +11331,7 @@ }, "id": 379, "name": "Identifier", - "src": "5429:5:0" + "src": "5404:5:0" }, { "attributes": { @@ -11345,17 +11345,17 @@ }, "id": 380, "name": "Identifier", - "src": "5435:7:0" + "src": "5410:7:0" } ], "id": 381, "name": "IndexAccess", - "src": "5429:14:0" + "src": "5404:14:0" } ], "id": 382, "name": "MemberAccess", - "src": "5429:51:0" + "src": "5404:51:0" }, { "attributes": { @@ -11369,22 +11369,22 @@ }, "id": 383, "name": "Identifier", - "src": "5481:3:0" + "src": "5456:3:0" } ], "id": 384, "name": "IndexAccess", - "src": "5429:56:0" + "src": "5404:56:0" } ], "id": 385, "name": "MemberAccess", - "src": "5429:92:0" + "src": "5404:92:0" } ], "id": 386, "name": "VariableDeclarationStatement", - "src": "5408:113:0" + "src": "5383:113:0" }, { "children": [ @@ -11442,7 +11442,7 @@ }, "id": 387, "name": "Identifier", - "src": "5701:7:0" + "src": "5676:7:0" }, { "attributes": { @@ -11456,17 +11456,17 @@ }, "id": 388, "name": "Identifier", - "src": "5709:1:0" + "src": "5684:1:0" } ], "id": 389, "name": "IndexAccess", - "src": "5701:10:0" + "src": "5676:10:0" } ], "id": 390, "name": "MemberAccess", - "src": "5701:19:0" + "src": "5676:19:0" }, { "attributes": { @@ -11495,7 +11495,7 @@ }, "id": 391, "name": "Identifier", - "src": "5747:10:0" + "src": "5722:10:0" }, { "attributes": { @@ -11538,7 +11538,7 @@ }, "id": 392, "name": "Literal", - "src": "5761:1:0" + "src": "5736:1:0" }, { "attributes": { @@ -11567,7 +11567,7 @@ }, "id": 393, "name": "Identifier", - "src": "5765:8:0" + "src": "5740:8:0" }, { "attributes": { @@ -11581,67 +11581,67 @@ }, "id": 394, "name": "Identifier", - "src": "5776:9:0" + "src": "5751:9:0" } ], "id": 395, "name": "BinaryOperation", - "src": "5765:20:0" + "src": "5740:20:0" } ], "id": 396, "name": "BinaryOperation", - "src": "5761:24:0" + "src": "5736:24:0" } ], "id": 397, "name": "TupleExpression", - "src": "5760:26:0" + "src": "5735:26:0" } ], "id": 398, "name": "BinaryOperation", - "src": "5747:39:0" + "src": "5722:39:0" } ], "id": 399, "name": "FunctionCall", - "src": "5701:108:0" + "src": "5676:108:0" } ], "id": 400, "name": "ExpressionStatement", - "src": "5701:108:0" + "src": "5676:108:0" } ], "id": 401, "name": "Block", - "src": "5346:483:0" + "src": "5321:483:0" } ], "id": 402, "name": "IfStatement", - "src": "5316:513:0" + "src": "5291:513:0" } ], "id": 403, "name": "Block", - "src": "5199:645:0" + "src": "5174:645:0" } ], "id": 404, "name": "ForStatement", - "src": "5163:681:0" + "src": "5138:681:0" } ], "id": 405, "name": "Block", - "src": "3829:2026:0" + "src": "3829:2001:0" } ], "id": 406, "name": "IfStatement", - "src": "3786:2069:0" + "src": "3786:2044:0" }, { "children": [ @@ -11690,7 +11690,7 @@ }, "id": 407, "name": "Identifier", - "src": "5911:5:0" + "src": "5886:5:0" }, { "attributes": { @@ -11704,17 +11704,17 @@ }, "id": 408, "name": "Identifier", - "src": "5917:7:0" + "src": "5892:7:0" } ], "id": 409, "name": "IndexAccess", - "src": "5911:14:0" + "src": "5886:14:0" } ], "id": 410, "name": "MemberAccess", - "src": "5911:25:0" + "src": "5886:25:0" }, { "attributes": { @@ -11731,27 +11731,27 @@ }, "id": 411, "name": "Literal", - "src": "5939:4:0" + "src": "5914:4:0" } ], "id": 412, "name": "Assignment", - "src": "5911:32:0" + "src": "5886:32:0" } ], "id": 413, "name": "ExpressionStatement", - "src": "5911:32:0" + "src": "5886:32:0" } ], "id": 414, "name": "Block", - "src": "2884:3409:0" + "src": "2884:3384:0" } ], "id": 415, "name": "FunctionDefinition", - "src": "2814:3479:0" + "src": "2814:3454:0" }, { "attributes": { @@ -11790,17 +11790,17 @@ }, "id": 416, "name": "ElementaryTypeName", - "src": "6321:7:0" + "src": "6296:7:0" } ], "id": 417, "name": "VariableDeclaration", - "src": "6321:15:0" + "src": "6296:15:0" } ], "id": 418, "name": "ParameterList", - "src": "6320:17:0" + "src": "6295:17:0" }, { "children": [ @@ -11823,17 +11823,17 @@ }, "id": 419, "name": "ElementaryTypeName", - "src": "6359:7:0" + "src": "6334:7:0" } ], "id": 420, "name": "VariableDeclaration", - "src": "6359:7:0" + "src": "6334:7:0" } ], "id": 421, "name": "ParameterList", - "src": "6358:9:0" + "src": "6333:9:0" }, { "children": [ @@ -11876,7 +11876,7 @@ }, "id": 422, "name": "Identifier", - "src": "6386:5:0" + "src": "6361:5:0" }, { "attributes": { @@ -11890,32 +11890,32 @@ }, "id": 423, "name": "Identifier", - "src": "6392:7:0" + "src": "6367:7:0" } ], "id": 424, "name": "IndexAccess", - "src": "6386:14:0" + "src": "6361:14:0" } ], "id": 425, "name": "MemberAccess", - "src": "6386:28:0" + "src": "6361:28:0" } ], "id": 426, "name": "Return", - "src": "6379:35:0" + "src": "6354:35:0" } ], "id": 427, "name": "Block", - "src": "6368:54:0" + "src": "6343:54:0" } ], "id": 428, "name": "FunctionDefinition", - "src": "6301:121:0" + "src": "6276:121:0" }, { "attributes": { @@ -11954,17 +11954,17 @@ }, "id": 429, "name": "ElementaryTypeName", - "src": "6450:7:0" + "src": "6425:7:0" } ], "id": 430, "name": "VariableDeclaration", - "src": "6450:15:0" + "src": "6425:15:0" } ], "id": 431, "name": "ParameterList", - "src": "6449:17:0" + "src": "6424:17:0" }, { "children": [ @@ -11987,17 +11987,17 @@ }, "id": 432, "name": "ElementaryTypeName", - "src": "6488:7:0" + "src": "6463:7:0" } ], "id": 433, "name": "VariableDeclaration", - "src": "6488:7:0" + "src": "6463:7:0" } ], "id": 434, "name": "ParameterList", - "src": "6487:9:0" + "src": "6462:9:0" }, { "children": [ @@ -12040,7 +12040,7 @@ }, "id": 435, "name": "Identifier", - "src": "6515:5:0" + "src": "6490:5:0" }, { "attributes": { @@ -12054,42 +12054,42 @@ }, "id": 436, "name": "Identifier", - "src": "6521:7:0" + "src": "6496:7:0" } ], "id": 437, "name": "IndexAccess", - "src": "6515:14:0" + "src": "6490:14:0" } ], "id": 438, "name": "MemberAccess", - "src": "6515:28:0" + "src": "6490:28:0" } ], "id": 439, "name": "Return", - "src": "6508:35:0" + "src": "6483:35:0" } ], "id": 440, "name": "Block", - "src": "6497:54:0" + "src": "6472:54:0" } ], "id": 441, "name": "FunctionDefinition", - "src": "6430:121:0" + "src": "6405:121:0" } ], "id": 442, "name": "ContractDefinition", - "src": "60:6494:0" + "src": "60:6469:0" } ], "id": 443, "name": "SourceUnit", - "src": "33:6523:0" + "src": "33:6498:0" }, "compiler": { "name": "solc", @@ -12101,10 +12101,16 @@ "links": {}, "address": "0xF9C3D6755932DE43637f7F31209b90cd00d4a2F9", "transactionHash": "0x12e7c3417cdab01fe77e53e3bd2b7dc8bbdbb9dbcf9a6e70904e22de3ff19fef" + }, + "1666700000": { + "events": {}, + "links": {}, + "address": "0x8d3F00CAbC107D969b09aaC7373fCEd190f42510", + "transactionHash": "0x74e17788f41fc506d7141a2346aa778352e576d9cbb579ebfa92fda9b50a92d4" } }, "schemaVersion": "3.4.4", - "updatedAt": "2022-01-09T19:36:42.713Z", + "updatedAt": "2022-01-10T03:35:13.278Z", "networkType": "ethereum", "devdoc": { "methods": {} diff --git a/src/contractCode/Migrations.json b/src/contractCode/Migrations.json index a454562..3af6382 100644 --- a/src/contractCode/Migrations.json +++ b/src/contractCode/Migrations.json @@ -50,7 +50,7 @@ "sourceMap": "69:367:1:-;;;117:10;94:33;;;;;;;;;;;;;;;;;;;;69:367;8:9:-1;5:2;;;30:1;27;20:12;5:2;69:367:1;;;;;;;", "deployedSourceMap": "69:367:1:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;132:36;;8:9:-1;5:2;;;30:1;27;20:12;5:2;132:36:1;;;;;;;;;;;;;;;;;;;;;;;94:33;;8:9:-1;5:2;;;30:1;27;20:12;5:2;94:33:1;;;;;;;;;;;;;;;;;;;;;;;;;;;328:105;;8:9:-1;5:2;;;30:1;27;20:12;5:2;328:105:1;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;328:105:1;;;;;;;;;;;;;;;;;;;;132:36;;;;:::o;94:33::-;;;;;;;;;;;;;:::o;328:105::-;234:5;;;;;;;;;;;220:19;;:10;:19;;;204:104;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;418:9;391:24;:36;;;;328:105;:::o", "source": "// SPDX-License-Identifier: MIT\r\npragma solidity >=0.4.22 <0.9.0;\r\n\r\ncontract Migrations {\r\n address public owner = msg.sender;\r\n uint public last_completed_migration;\r\n\r\n modifier restricted() {\r\n require(\r\n msg.sender == owner,\r\n \"This function is restricted to the contract's owner\"\r\n );\r\n _;\r\n }\r\n\r\n function setCompleted(uint completed) public restricted {\r\n last_completed_migration = completed;\r\n }\r\n}\r\n", - "sourcePath": "/mnt/c/Users/Jeremy Zhang/Documents/peer-sports-betting/contracts/Migrations.sol", + "sourcePath": "C:\\Users\\Jeremy Zhang\\Documents\\peer-sports-betting\\contracts\\Migrations.sol", "ast": { "absolutePath": "project:/contracts/Migrations.sol", "exportedSymbols": { @@ -914,10 +914,16 @@ "links": {}, "address": "0xB4D4beE95b4fca27eAafEC687f1A219369e5534b", "transactionHash": "0xf9b9ac80006b9b920fbe5909687bd8a16ee17088d922614d6d2abfa861a4d78e" + }, + "1666700000": { + "events": {}, + "links": {}, + "address": "0x2aB32a7073672369Ba6d998456Da7Fa6fF34f25b", + "transactionHash": "0x583696e741a220910960f8a928dbe8a50c7776e59918d23686ad8a5630f8e71a" } }, "schemaVersion": "3.4.4", - "updatedAt": "2022-01-09T19:36:42.726Z", + "updatedAt": "2022-01-10T03:35:13.283Z", "networkType": "ethereum", "devdoc": { "methods": {} diff --git a/truffle-config.js b/truffle-config.js index 83bbd33..f605f8d 100644 --- a/truffle-config.js +++ b/truffle-config.js @@ -18,115 +18,75 @@ * */ -// const HDWalletProvider = require('@truffle/hdwallet-provider'); -// +const HDWalletProvider = require('@truffle/hdwallet-provider'); +require('dotenv').config() + // const fs = require('fs'); // const mnemonic = fs.readFileSync(".secret").toString().trim(); module.exports = { - // The default output directory for compiled contracts is ./build/contracts relative to the project root. This can be changed with the contracts_build_directory key. - // Changed default output directory for compiled contracts to be in src so we don't need to copy and paste - contracts_build_directory: './src/contractCode', - - /** - * Networks define how you connect to your ethereum client and let you set the - * defaults web3 uses to send transactions. If you don't specify one truffle - * will spin up a development blockchain for you on port 9545 when you - * run `develop` or `test`. You can ask a truffle command to use a specific - * network from the command line, e.g - * - * $ truffle test --network - */ + // The default output directory for compiled contracts is ./build/contracts relative to the project root. This can be changed with the contracts_build_directory key. + // Changed default output directory for compiled contracts to be in src so we don't need to copy and paste + contracts_build_directory: './src/contractCode', - networks: { - // Useful for testing. The `development` name is special - truffle uses it by default - // if it's defined here and no other network is specified at the command line. - // You should run a client (like ganache-cli, geth or parity) in a separate terminal - // tab if you use this network and you must also set the `host`, `port` and `network_id` - // options below to some value. - // - // Albert: use this network for non-wsl development with `truffle migrate --reset` - development: { - host: '127.0.0.1', // Localhost (default: none) - port: 7545, // Standard Ethereum port (default: none) - network_id: '*', // Any network (default: none) - }, - // Albert: use this network for wsl development with `truffle migrate --network wsl --reset` - wsl: { - host: '172.17.80.1', // Localhost (default: none) - port: 7545, // Standard Ethereum port (default: none) - network_id: '*', // Any network (default: none) - }, - jeremy: { - host: '172.20.112.1', // Localhost (default: none) - port: 7545, // Standard Ethereum port (default: none) - network_id: '*', // Any network (default: none) - } - // Another network with more advanced options... - // advanced: { - // port: 8777, // Custom port - // network_id: 1342, // Custom network - // gas: 8500000, // Gas sent with each transaction (default: ~6700000) - // gasPrice: 20000000000, // 20 gwei (in wei) (default: 100 gwei) - // from:
, // Account to send txs from (default: accounts[0]) - // websocket: true // Enable EventEmitter interface for web3 (default: false) - // }, - // Useful for deploying to a public network. - // NB: It's important to wrap the provider as a function. - // ropsten: { - // provider: () => new HDWalletProvider(mnemonic, `https://ropsten.infura.io/v3/YOUR-PROJECT-ID`), - // network_id: 3, // Ropsten's id - // gas: 5500000, // Ropsten has a lower block limit than mainnet - // confirmations: 2, // # of confs to wait between deployments. (default: 0) - // timeoutBlocks: 200, // # of blocks before a deployment times out (minimum/default: 50) - // skipDryRun: true // Skip dry run before migrations? (default: false for public nets ) - // }, - // Useful for private networks - // private: { - // provider: () => new HDWalletProvider(mnemonic, `https://network.io`), - // network_id: 2111, // This network is yours, in the cloud. - // production: true // Treats this network as if it was a public net. (default: false) - // } - }, + /** + * Networks define how you connect to your ethereum client and let you set the + * defaults web3 uses to send transactions. If you don't specify one truffle + * will spin up a development blockchain for you on port 9545 when you + * run `develop` or `test`. You can ask a truffle command to use a specific + * network from the command line, e.g + * + * $ truffle test --network + */ - // Set default mocha options here, use special reporters etc. - mocha: { - // timeout: 100000 - }, + networks: { + // Useful for testing. The `development` name is special - truffle uses it by default + // if it's defined here and no other network is specified at the command line. + // You should run a client (like ganache-cli, geth or parity) in a separate terminal + // tab if you use this network and you must also set the `host`, `port` and `network_id` + // options below to some value. + // + // Albert: use this network for non-wsl development with `truffle migrate --reset` + development: { + host: '127.0.0.1', // Localhost (default: none) + port: 7545, // Standard Ethereum port (default: none) + network_id: '*', // Any network (default: none) + }, + // Albert: use this network for wsl development with `truffle migrate --network wsl --reset` + wsl: { + host: '172.17.80.1', // Localhost (default: none) + port: 7545, // Standard Ethereum port (default: none) + network_id: '*', // Any network (default: none) + }, + harmony_testnet: { + provider: () => { + return new HDWalletProvider({ + mnemonic: process.env.MNEMONIC, + providerOrUrl: 'https://api.s0.b.hmny.io', // https://api.s0.t.hmny.io for mainnet + derivationPath: `m/44'/1023'/0'/0/` + }); + }, + network_id: 1666700000, // 1666600000 for mainnet + }, + }, - // Configure your compilers - compilers: { - solc: { - version: '0.5.0', // Fetch exact version from solc-bin (default: truffle's version) - // docker: true, // Use "0.5.1" you've installed locally with docker (default: false) - // settings: { // See the solidity docs for advice about optimization and evmVersion - // optimizer: { - // enabled: false, - // runs: 200 - // }, - // evmVersion: "byzantium" - // } - }, - }, + // Set default mocha options here, use special reporters etc. + mocha: { + // timeout: 100000 + }, - // Truffle DB is currently disabled by default; to enable it, change enabled: - // false to enabled: true. The default storage location can also be - // overridden by specifying the adapter settings, as shown in the commented code below. - // - // NOTE: It is not possible to migrate your contracts to truffle DB and you should - // make a backup of your artifacts to a safe location before enabling this feature. - // - // After you backed up your artifacts you can utilize db by running migrate as follows: - // $ truffle migrate --reset --compile-all - // - // db: { - // enabled: false, - // host: "127.0.0.1", - // adapter: { - // name: "sqlite", - // settings: { - // directory: ".db" - // } - // } - // } + // Configure your compilers + compilers: { + solc: { + version: '0.5.0', // Fetch exact version from solc-bin (default: truffle's version) + // docker: true, // Use "0.5.1" you've installed locally with docker (default: false) + // settings: { // See the solidity docs for advice about optimization and evmVersion + // optimizer: { + // enabled: false, + // runs: 200 + // }, + // evmVersion: "byzantium" + // } + }, + }, };