diff --git a/Makefile b/Makefile deleted file mode 100644 index d65554780..000000000 --- a/Makefile +++ /dev/null @@ -1,139 +0,0 @@ - -# Run a single cvl e.g.: -# make -B spec/certora/CErc20/borrowAndRepayFresh.cvl - -# TODO: -# - mintAndRedeemFresh.cvl in progress and is failing due to issues with tool proving how the exchange rate can change -# hoping for better division modelling - currently fails to prove (a + 1) / b >= a / b -# - CErc20Delegator/*.cvl cannot yet be run with the tool -# - cDAI proofs are WIP, require using the delegate and the new revert message assertions - -.PHONY: certora-clean - -CERTORA_BIN = $(abspath script/certora) -CERTORA_RUN = $(CERTORA_BIN)/run.py -CERTORA_CLI = $(CERTORA_BIN)/cli.jar -CERTORA_EMV = $(CERTORA_BIN)/emv.jar - -export CERTORA = $(CERTORA_BIN) -export CERTORA_DISABLE_POPUP = 1 - -spec/certora/Math/%.cvl: - $(CERTORA_RUN) \ - spec/certora/contracts/MathCertora.sol \ - --verify \ - MathCertora:$@ - -spec/certora/Comp/search.cvl: - $(CERTORA_RUN) \ - spec/certora/contracts/CompCertora.sol \ - --settings -b=4,-graphDrawLimit=0,-assumeUnwindCond,-depth=100 \ - --solc_args "'--evm-version istanbul'" \ - --verify \ - CompCertora:$@ - -spec/certora/Comp/transfer.cvl: - $(CERTORA_RUN) \ - spec/certora/contracts/CompCertora.sol \ - --settings -graphDrawLimit=0,-assumeUnwindCond,-depth=100 \ - --solc_args "'--evm-version istanbul'" \ - --verify \ - CompCertora:$@ - -spec/certora/Governor/%.cvl: - $(CERTORA_RUN) \ - spec/certora/contracts/GovernorAlphaCertora.sol \ - spec/certora/contracts/TimelockCertora.sol \ - spec/certora/contracts/CompCertora.sol \ - --settings -assumeUnwindCond,-enableWildcardInlining=false \ - --solc_args "'--evm-version istanbul'" \ - --link \ - GovernorAlphaCertora:timelock=TimelockCertora \ - GovernorAlphaCertora:comp=CompCertora \ - --verify \ - GovernorAlphaCertora:$@ - -spec/certora/Comptroller/%.cvl: - $(CERTORA_RUN) \ - spec/certora/contracts/ComptrollerCertora.sol \ - spec/certora/contracts/PriceOracleModel.sol \ - --link \ - ComptrollerCertora:oracle=PriceOracleModel \ - --verify \ - ComptrollerCertora:$@ - -spec/certora/cDAI/%.cvl: - $(CERTORA_RUN) \ - spec/certora/contracts/CDaiDelegateCertora.sol \ - spec/certora/contracts/UnderlyingModelNonStandard.sol \ - spec/certora/contracts/mcd/dai.sol:Dai \ - spec/certora/contracts/mcd/pot.sol:Pot \ - spec/certora/contracts/mcd/vat.sol:Vat \ - spec/certora/contracts/mcd/join.sol:DaiJoin \ - tests/Contracts/BoolComptroller.sol \ - --link \ - CDaiDelegateCertora:comptroller=BoolComptroller \ - CDaiDelegateCertora:underlying=Dai \ - CDaiDelegateCertora:potAddress=Pot \ - CDaiDelegateCertora:vatAddress=Vat \ - CDaiDelegateCertora:daiJoinAddress=DaiJoin \ - --verify \ - CDaiDelegateCertora:$@ \ - --settings -cache=certora-run-cdai - -spec/certora/CErc20/%.cvl: - $(CERTORA_RUN) \ - spec/certora/contracts/CErc20ImmutableCertora.sol \ - spec/certora/contracts/CTokenCollateral.sol \ - spec/certora/contracts/ComptrollerCertora.sol \ - spec/certora/contracts/InterestRateModelModel.sol \ - spec/certora/contracts/UnderlyingModelNonStandard.sol \ - --link \ - CErc20ImmutableCertora:otherToken=CTokenCollateral \ - CErc20ImmutableCertora:comptroller=ComptrollerCertora \ - CErc20ImmutableCertora:underlying=UnderlyingModelNonStandard \ - CErc20ImmutableCertora:interestRateModel=InterestRateModelModel \ - CTokenCollateral:comptroller=ComptrollerCertora \ - CTokenCollateral:underlying=UnderlyingModelNonStandard \ - --verify \ - CErc20ImmutableCertora:$@ \ - --settings -cache=certora-run-cerc20-immutable - -spec/certora/CErc20Delegator/%.cvl: - $(CERTORA_RUN) \ - spec/certora/contracts/CErc20DelegatorCertora.sol \ - spec/certora/contracts/CErc20DelegateCertora.sol \ - spec/certora/contracts/CTokenCollateral.sol \ - spec/certora/contracts/ComptrollerCertora.sol \ - spec/certora/contracts/InterestRateModelModel.sol \ - spec/certora/contracts/UnderlyingModelNonStandard.sol \ - --link \ - CErc20DelegatorCertora:implementation=CErc20DelegateCertora \ - CErc20DelegatorCertora:otherToken=CTokenCollateral \ - CErc20DelegatorCertora:comptroller=ComptrollerCertora \ - CErc20DelegatorCertora:underlying=UnderlyingModelNonStandard \ - CErc20DelegatorCertora:interestRateModel=InterestRateModelModel \ - CTokenCollateral:comptroller=ComptrollerCertora \ - CTokenCollateral:underlying=UnderlyingModelNonStandard \ - --verify \ - CErc20DelegatorCertora:$@ \ - --settings -assumeUnwindCond \ - --settings -cache=certora-run-cerc20-delegator - -spec/certora/Maximillion/%.cvl: - $(CERTORA_RUN) \ - spec/certora/contracts/MaximillionCertora.sol \ - spec/certora/contracts/CEtherCertora.sol \ - --link \ - MaximillionCertora:cEther=CEtherCertora \ - --verify \ - MaximillionCertora:$@ - -spec/certora/Timelock/%.cvl: - $(CERTORA_RUN) \ - spec/certora/contracts/TimelockCertora.sol \ - --verify \ - TimelockCertora:$@ - -certora-clean: - rm -rf .certora_build.json .certora_config certora_verify.json emv-* diff --git a/gasCosts.json b/gasCosts.json deleted file mode 100644 index 6c1dc43ca..000000000 --- a/gasCosts.json +++ /dev/null @@ -1,204 +0,0 @@ -{ - "first mint": { - "fee": 124570, - "opcodes": {} - }, - "second mint": { - "fee": 84516, - "opcodes": { - "PUSH1 @ 3": 287, - "MSTORE @ 3": 126, - "PUSH1 @ 12": 1, - "CALLDATASIZE @ 3": 18, - "LT @ 2": 9, - "PUSH2 @ 3": 302, - "JUMPI @ 3": 137, - "PUSH1 @ 10": 12, - "CALLDATALOAD @ 3": 22, - "SHR @ 3": 9, - "DUP1 @ 3": 107, - "PUSH4 @ 3": 48, - "GT @ 3": 40, - "DUP1 @ 10": 12, - "JUMPDEST @ 10": 110, - "DUP1 @ 1": 23, - "EQ @ 3": 24, - "CALLVALUE @ 1": 1, - "DUP1 @ 2": 16, - "ISZERO @ 3": 88, - "POP @ 1": 66, - "PUSH2 @ 2": 7, - "PUSH1 @ 2": 58, - "JUMP @ 3": 145, - "JUMPDEST @ 8": 203, - "PUSH1 @ 1": 128, - "DUP3 @ 3": 105, - "DUP5 @ 3": 53, - "SUB @ 3": 67, - "SLT @ 3": 16, - "CALLDATALOAD @ 2": 2, - "SWAP2 @ 3": 86, - "SWAP1 @ 3": 195, - "POP @ 3": 106, - "JUMP @ 2": 57, - "PUSH2 @ 1": 25, - "DUP4 @ 3": 30, - "MLOAD @ 3": 82, - "ADD @ 3": 102, - "DUP2 @ 3": 118, - "PUSH1 @ 15": 1, - "NOT @ 3": 24, - "SHL @ 3": 40, - "AND @ 3": 53, - "OR @ 3": 2, - "SLOAD @ 3": 27, - "PUSH1 @ 800": 22, - "DUP8 @ 3": 10, - "JUMPDEST @ 3": 4, - "DUP4 @ 1": 5, - "LT @ 3": 9, - "DUP2 @ 10": 2, - "PUSH1 @ 6": 17, - "POP @ 2": 133, - "SWAP2 @ 1": 14, - "SWAP3 @ 3": 26, - "DUP6 @ 3": 33, - "GAS @ 3": 1, - "DELEGATECALL @ 2": 1, - "PUSH1 @ 312831": 1, - "CALLVALUE @ 12": 8, - "SSTORE @ 3": 11, - "PUSH2 @ 5000": 1, - "SWAP1 @ 800": 2, - "ADDRESS @ 9": 1, - "DUP7 @ 3": 17, - "EXTCODESIZE @ 3": 7, - "ISZERO @ 700": 7, - "GAS @ 2": 7, - "STATICCALL @ 2": 5, - "PUSH1 @ 307782": 1, - "SWAP4 @ 1": 17, - "SHA3 @ 3": 15, - "SLOAD @ 42": 9, - "DUP2 @ 800": 5, - "PUSH1 @ 9": 6, - "RETURN @ 3": 9, - "ISZERO @ -307082": 1, - "RETURNDATASIZE @ 3": 10, - "DUP2 @ 2": 7, - "MLOAD @ 2": 7, - "SWAP1 @ 2": 7, - "SWAP5 @ 6": 1, - "SWAP6 @ 3": 3, - "SWAP3 @ 2": 7, - "SWAP4 @ 3": 13, - "PUSH1 @ 307684": 1, - "POP @ 10": 1, - "SWAP1 @ 1": 25, - "PUSH8 @ 800": 1, - "DUP4 @ 800": 2, - "DIV @ 3": 7, - "DUP4 @ 5": 7, - "MUL @ 2": 7, - "SWAP1 @ 5": 13, - "DIV @ 2": 6, - "ADD @ 2": 8, - "JUMPDEST @ 2": 2, - "ISZERO @ -306984": 1, - "PUSH6 @ 2": 1, - "DUP10 @ 3": 3, - "SUB @ 2": 5, - "DUP4 @ 2": 2, - "DUP9 @ 3": 5, - "SWAP4 @ 6": 4, - "PUSH8 @ 3": 5, - "SWAP3 @ 1": 6, - "SWAP5 @ 1": 3, - "POP @ 6": 1, - "DUP5 @ 2": 2, - "DUP11 @ 3": 2, - "DUP5 @ 1": 2, - "SWAP6 @ 1": 4, - "SWAP5 @ 3": 6, - "DUP15 @ 3": 1, - "PUSH1 @ 5000": 2, - "DUP14 @ 3": 1, - "SWAP1 @ 6": 2, - "PUSH32 @ 2": 1, - "LOG1 @ 3": 2, - "PUSH1 @ 1774": 1, - "SWAP14 @ 3": 1, - "CALLER @ 3": 1, - "ADDRESS @ 3": 5, - "CALL @ 2": 2, - "PUSH1 @ 307417": 1, - "JUMPDEST @ 800": 1, - "ISZERO @ -306717": 1, - "EQ @ 800": 1, - "PUSH1 @ 307290": 1, - "ISZERO @ -306590": 1, - "ADDRESS @ 6": 1, - "PUSH1 @ 307200": 1, - "ISZERO @ -306500": 1, - "SWAP2 @ 7": 1, - "PUSH1 @ 307152": 1, - "PUSH22 @ 9": 1, - "CALLER @ 42": 2, - "DUP3 @ 2": 2, - "PUSH2 @ 800": 5, - "SWAP5 @ 42": 1, - "DUP4 @ 5000": 1, - "PUSH20 @ 6": 1, - "SWAP3 @ 6": 1, - "SWAP6 @ 42": 1, - "DUP5 @ 5000": 1, - "PUSH16 @ 6": 1, - "SWAP5 @ 2": 1, - "SWAP4 @ 42": 1, - "SWAP2 @ 5000": 1, - "PUSH32 @ 3": 2, - "LOG3 @ 3": 2, - "POP @ 1756": 2, - "ISZERO @ -306452": 1, - "RETURNDATACOPY @ 3": 2, - "PUSH1 @ 306770": 1, - "ISZERO @ -306070": 1, - "SWAP8 @ 1": 1, - "SWAP7 @ 3": 1, - "SWAP2 @ 42": 1, - "MLOAD @ 5000": 1, - "PUSH1 @ 1518": 1, - "CODECOPY @ 3": 1, - "DUP2 @ 6": 1, - "JUMP @ 800": 1, - "SWAP2 @ -312131": 1, - "RETURNDATASIZE @ 2": 1, - "PUSH2 @ 6": 1, - "SWAP2 @ 2": 2 - } - }, - "second mint, no interest accrued": { - "fee": 61306, - "opcodes": {} - }, - "redeem": { - "fee": 95058, - "opcodes": {} - }, - "unitroller-g6 second mint with comp accrued": { - "fee": 138680, - "opcodes": {} - }, - "unitroller-g6 claim comp": { - "fee": 142459, - "opcodes": {} - }, - "unitroller second mint with comp accrued": { - "fee": 116271, - "opcodes": {} - }, - "unitroller claim comp": { - "fee": 155422, - "opcodes": {} - } -} diff --git a/jest.config.js b/jest.config.js deleted file mode 100644 index 2863ba90d..000000000 --- a/jest.config.js +++ /dev/null @@ -1,185 +0,0 @@ -// For a detailed explanation regarding each configuration property, visit: -// https://jestjs.io/docs/en/configuration.html - -module.exports = { - // All imported modules in your tests should be mocked automatically - // automock: false, - - // Stop running tests after `n` failures - // bail: 0, - - // Respect "browser" field in package.json when resolving modules - // browser: false, - - // The directory where Jest should store its cached dependency information - // cacheDirectory: "/private/var/folders/jz/z56b1n2902584b4zplqztm3m0000gn/T/jest_dx", - - // Automatically clear mock calls and instances between every test - // clearMocks: false, - - // Indicates whether the coverage information should be collected while executing the test - // collectCoverage: false, - - // An array of glob patterns indicating a set of files for which coverage information should be collected - // collectCoverageFrom: null, - - // The directory where Jest should output its coverage files - // coverageDirectory: null, - - // An array of regexp pattern strings used to skip coverage collection - // coveragePathIgnorePatterns: [ - // "/node_modules/" - // ], - - // A list of reporter names that Jest uses when writing coverage reports - // coverageReporters: [ - // "json", - // "text", - // "lcov", - // "clover" - // ], - - // An object that configures minimum threshold enforcement for coverage results - // coverageThreshold: null, - - // A path to a custom dependency extractor - // dependencyExtractor: null, - - // Make calling deprecated APIs throw helpful error messages - // errorOnDeprecated: false, - - // Force coverage collection from ignored files using an array of glob patterns - // forceCoverageMatch: [], - - // A path to a module which exports an async function that is triggered once before all test suites - // globalSetup: null, - - // A path to a module which exports an async function that is triggered once after all test suites - // globalTeardown: null, - - // A set of global variables that need to be available in all test environments - // globals: {}, - - // An array of directory names to be searched recursively up from the requiring module's location - // moduleDirectories: [ - // "node_modules" - // ], - - // An array of file extensions your modules use - // moduleFileExtensions: [ - // "js", - // "json", - // "jsx", - // "ts", - // "tsx", - // "node" - // ], - - // A map from regular expressions to module names that allow to stub out resources with a single module - // moduleNameMapper: {}, - - // An array of regexp pattern strings, matched against all module paths before considered 'visible' to the module loader - // modulePathIgnorePatterns: [], - - // Activates notifications for test results - // notify: false, - - // An enum that specifies notification mode. Requires { notify: true } - // notifyMode: "failure-change", - - // A preset that is used as a base for Jest's configuration - // preset: null, - - // Run tests from one or more projects - // projects: null, - - // Use this configuration option to add custom reporters to Jest - reporters: ["default", "jest-junit"], - - // Automatically reset mock state between every test - // resetMocks: false, - - // Reset the module registry before running each individual test - // resetModules: false, - - // A path to a custom resolver - // resolver: null, - - // Automatically restore mock state between every test - // restoreMocks: false, - - // The root directory that Jest should scan for tests and modules within - // rootDir: null, - - // A list of paths to directories that Jest should use to search for files in - // roots: [ - // "" - // ], - - // Allows you to use a custom runner instead of Jest's default test runner - // runner: "jest-runner", - - // The paths to modules that run some code to configure or set up the testing environment before each test - // setupFiles: [], - - // A list of paths to modules that run some code to configure or set up the testing framework before each test - setupFilesAfterEnv: ["/tests/Matchers.js", "/tests/Jest.js"], - - // A list of paths to snapshot serializer modules Jest should use for snapshot testing - // snapshotSerializers: [], - - // The test environment that will be used for testing - testEnvironment: "node", - - // Options that will be passed to the testEnvironment - // testEnvironmentOptions: {}, - - // Adds a location field to test results - // testLocationInResults: false, - - // The glob patterns Jest uses to detect test files - // testMatch: [ - // "**/__tests__/**/*.[jt]s?(x)", - // "**/?(*.)+(spec|test).[tj]s?(x)" - // ], - - // An array of regexp pattern strings that are matched against all test paths, matched tests are skipped - // testPathIgnorePatterns: [ - // "/node_modules/" - // ], - - // The regexp pattern or array of patterns that Jest uses to detect test files - // testRegex: [], - - // This option allows the use of a custom results processor - // testResultsProcessor: null, - - // This option allows use of a custom test runner - // testRunner: "jasmine2", - - // This option sets the URL for the jsdom environment. It is reflected in properties such as location.href - // testURL: "http://localhost", - - // Setting this value to "fake" allows the use of fake timers for functions such as "setTimeout" - // timers: "real", - - // A map from regular expressions to paths to transformers - // transform: null, - - // An array of regexp pattern strings that are matched against all source file paths, matched files will skip transformation - // transformIgnorePatterns: [ - // "/node_modules/" - // ], - - // An array of regexp pattern strings that are matched against all modules before the module loader will automatically return a mock for them - // unmockedModulePathPatterns: undefined, - - // Indicates whether each individual test should be reported during the run - // verbose: null, - - // An array of regexp patterns that are matched against all source file paths before re-running tests in watch mode - // watchPathIgnorePatterns: [], - - // Whether to use watchman for file crawling - // watchman: true, -}; diff --git a/reporterConfig.json b/reporterConfig.json deleted file mode 100644 index 8facae3fe..000000000 --- a/reporterConfig.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "reporterEnabled": "spec, mocha-junit-reporter" -} diff --git a/scenario/Grammar.pegjs b/scenario/Grammar.pegjs deleted file mode 100644 index 30bb16dbd..000000000 --- a/scenario/Grammar.pegjs +++ /dev/null @@ -1,318 +0,0 @@ -// See: https://pegjs.org/online - -// Scenario Grammar - -{ - if (!Array.prototype.flat) { - Object.defineProperty(Array.prototype, 'flat', { - configurable: true, - value: function flat (x) { - var depth = isNaN(arguments[0]) ? 1 : Number(arguments[0]); - - return depth ? Array.prototype.reduce.call(this, function (acc, cur) { - if (Array.isArray(cur)) { - acc.push.apply(acc, flat.call(cur, depth - 1)); - } else { - acc.push(cur); - } - - return acc; - }, []) : Array.prototype.slice.call(this); - }, - writable: true - }); - } - - function getString(str) { - let val; - if (Array.isArray(str)) { - if (str.length !== 2 || str[0] !== 'String') { - throw new Error(`Expected string, got ${str}`); - } - - val = str[1]; - } else { - val = str; - } - - if (typeof val !== 'string') { - throw new Error(`Expected string, got ${val} (${typeof val})`); - } - - return val; - } - - function expandEvent(macros, step) { - const [eventName, ...eventArgs] = step; - - if (macros[eventName]) { - let expanded = expandMacro(macros[eventName], eventArgs); - - // Recursively expand steps - return expanded.map(event => expandEvent(macros, event)).flat(); - } else { - return [step]; - } - } - - function getArgValues(eventArgs, macroArgs) { - const eventArgNameMap = {}; - const eventArgIndexed = new Array(); - const argValues = {}; - let usedNamedArg = false; - let usedSplat = false; - - eventArgs.forEach((eventArg) => { - if (eventArg.argName) { - const {argName, argValue} = eventArg; - - eventArgNameMap[argName] = argValue; - usedNamedArg = true; - } else { - if (usedNamedArg) { - throw new Error(`Cannot use positional arg after named arg in macro invokation ${JSON.stringify(eventArgs)} looking at ${eventArg.toString()}`); - } - - eventArgIndexed.push(eventArg); - } - }); - - macroArgs.forEach(({arg, def, splat}, argIndex) => { - if (usedSplat) { - throw new Error("Cannot have arg after splat arg"); - } - - let val; - if (eventArgNameMap[arg] !== undefined) { - val = eventArgNameMap[arg]; - } else if (splat) { - val = eventArgIndexed.slice(argIndex); // Clear out any remaining args - usedSplat = true; - } else if (eventArgIndexed[argIndex] !== undefined) { - val = eventArgIndexed[argIndex]; - } else if (def !== undefined) { - val = def; - } else { - throw new Error("Macro cannot find arg value for " + arg); - } - argValues[arg] = val; - }); - - return argValues; - } - - function expandMacro(macro, eventArgs) { - const argValues = getArgValues(eventArgs, macro.args); - - function expandStep(step) { - return step.map((token) => { - if (argValues[token] !== undefined) { - return argValues[token]; - } else { - if (Array.isArray(token)) { - return expandStep(token); - } else { - return token; - } - } - }); - }; - - return macro.steps.map(expandStep); - } - - function addTopLevelEl(state, el) { - const macros = state.macros; - const tests = state.tests; - const pending = state.pending; - - switch (el.type) { - case 'macro': - const macro = {[el.name]: {args: el.args, steps: el.steps}}; - - return { - tests: tests, - macros: ({...macros, ...macro}) - }; - case 'test': - const steps = el.steps; - const expandedSteps = steps.map((step) => { - return expandEvent(macros, step) - }).flat(); - - const test = {[el.test]: expandedSteps}; - - return { - tests: {...tests, ...test}, - macros: macros - } - } - } -} - -tests - = values:( - head:top_level_el - tail:(line_separator t:top_level_el { return t; })* - { return tail.reduce((acc, el) => addTopLevelEl(acc, el), addTopLevelEl({macros: {}, tests: {}}, head)); } - )? - full_ws - { return values !== null ? values.tests : {}; } - -macros - = values:( - head:top_level_el - tail:(line_separator t:top_level_el { return t; })* - { return tail.reduce((acc, el) => addTopLevelEl(acc, el), addTopLevelEl({macros: {}, tests: {}}, head)); } - )? - full_ws - { return values !== null ? values.macros : {}; } - -top_level_el - = test - / macro - / gastest - / pending - / only - / skip - -test - = full_ws? "Test" ws name:string ws line_separator steps:steps? { return {type: 'test', test: getString(name), steps: steps}; } - -gastest - = full_ws? "GasTest" ws name:string ws line_separator steps:steps? { return {type: 'test', test: getString(name), steps: ["Gas"].concat(steps)}; } - -pending - = full_ws? "Pending" ws name:string ws line_separator steps:steps? { return {type: 'test', test: getString(name), steps: ["Pending"].concat(steps)}; } - -only - = full_ws? "Only" ws name:string ws line_separator steps:steps? { return {type: 'test', test: getString(name), steps: ["Only"].concat(steps)}; } - -skip - = full_ws? "Skip" ws name:string ws line_separator steps:steps? { return {type: 'test', test: getString(name), steps: ["Skip"].concat(steps)}; } - -macro - = full_ws? "Macro" ws name:token ws args:args? line_separator steps:steps { return {type: 'macro', name: getString(name), args: args || [], steps: steps}; } - -args - = args:( - head:arg - tail:(ws t:args { return t; })* - { return [head].concat(tail).filter((x) => !!x); } - ) - { return args !== null ? args.flat() : []; } - -arg - = splat:("..."?) arg:token def:(ws? "=" t:token ws? { return t; })? { return { arg, def, splat }; } - -token_set - = tokens:( - head:token - tail:(ws t:token_set { return t; })* - { return [head].concat(tail).filter((x) => !!x); } - ) - { return tokens !== null ? tokens.flat() : []; } - -steps - = steps:( - head:full_expr - tail:(line_separator step:full_expr { return step; })* - { return [head].concat(tail).filter((x) => !!x); } - )? - { return steps !== null ? steps : []; } - -full_expr - = tab_separator step:step { return step; } - / comment { return null; } - / tab_separator ws { return null; } - -step - = val:expr comment? { return val; } - / comment { return null; } - / tab_separator? ws { return null; } - -expr - = ( - head:token - tail:(ws continuation? value:expr { return value })* - { return [head].concat(tail.flat(1)); } - ) - / begin_compound inner:expr end_compound { return [inner]; } - / begin_list inner:list_inner? end_list { return [["List"].concat((inner || []).flat())] }; - -comment - = ws "--" [^\n]* { return null; } - / ws "#" [^\n]* { return null; } - -token = - token1:simple_token ":" token2:simple_token { return {argName: token1, argValue: token2} } - / simple_token - -simple_token = - hex - / number - / ( t:([A-Za-z0-9_]+) { return t.join("") } ) - / string - -hex = hex:("0x" [0-9a-fA-F]+) { return ["Hex", hex.flat().flat().join("")] } -number = - n:(("-" / "+")? [0-9]+ ("." [0-9]+)? ("e" "-"? [0-9]+)?) { return ["Exactly", n.flat().flat().join("")] } - -list_inner - = ( - head:expr - tail:(ws? value:list_inner { return value })* - { return [head].concat(tail.flat()); } - ) - -begin_compound = ws "(" ws -end_compound = ws ")" ws - -begin_list = ws "[" ws -end_list = ws "]" ws - -line_separator = "\r"?"\n" -tab_separator = "\t" - / " " - -continuation = "\\" line_separator tab_separator tab_separator - -ws "whitespace" = [ \t]* -full_ws = comment full_ws - / [ \t\r\n] full_ws? - -string "string" - = quotation_mark chars:char* quotation_mark { return ["String", chars.join("")]; } - -char - = unescaped - / escape - sequence:( - '"' - / "\\" - / "/" - / "b" { return "\b"; } - / "f" { return "\f"; } - / "n" { return "\n"; } - / "r" { return "\r"; } - / "t" { return "\t"; } - / "u" digits:$(HEXDIG HEXDIG HEXDIG HEXDIG) { - return String.fromCharCode(parseInt(digits, 16)); - } - ) - { return sequence; } - -escape - = "\\" - -quotation_mark - = '"' - -unescaped - = [^\0-\x1F\x22\x5C] - -// ----- Core ABNF Rules ----- - -// See RFC 4234, Appendix B (http://tools.ietf.org/html/rfc4234). -DIGIT = [0-9] -HEXDIG = [0-9a-f]i \ No newline at end of file diff --git a/scenario/SCENARIO.md b/scenario/SCENARIO.md deleted file mode 100644 index 3ca472798..000000000 --- a/scenario/SCENARIO.md +++ /dev/null @@ -1,219 +0,0 @@ - -# Types -* `name:` - Helper to describe arguments with names, not actually input this way -* `` - `True` or `False` -* `` - A standard number (e.g. `5` or `6.0` or `10.0e18`) -* `` - The local name for a given cToken when created, e.g. `cZRX` -* `` - One of: `Admin, Bank, Geoff, Torrey, Robert, Coburn, Jared` -* `` - A string, may be quoted but does not have to be if a single-word (e.g. `"Mint"` or `Mint`) -* `
` - TODO -* `` - See assertions below. - -# Events - -## Core Events - -* "History n:=5" - Prints history of actions - * E.g. "History" - * E.g. "History 10" -* `Read ...` - Reads given value and prints result - * E.g. `Read CToken cBAT ExchangeRateStored` - Returns exchange rate of cBAT -* `Assert ` - Validates given assertion, raising an exception if assertion fails - * E.g. `Assert Equal (Erc20 BAT TokenBalance Geoff) (Exactly 5.0)` - Returns exchange rate of cBAT -* `FastForward n: Blocks` - For `CTokenScenario`, moves the block number forward n blocks. Note: in `CTokenScenario` the current block number is mocked (starting at 100000). Thus, this is the only way for the protocol to see a higher block number (for accruing interest). - * E.g. `FastForward 5 Blocks` - Move block number forward 5 blocks. -* `Inspect` - Prints debugging information about the world -* `Debug message:` - Same as inspect but prepends with a string -* `From ` - Runs event as the given user - * E.g. `From Geoff (CToken cZRX Mint 5e18)` -* `Invariant ` - Adds a new invariant to the world which is checked after each transaction - * E.g. `Invariant Static (CToken cZRX TotalSupply)` -* `WipeInvariants` - Removes all invariants. -* `Comptroller ` - Runs given Comptroller event - * E.g. `Comptroller _setReserveFactor 0.5` -* `CToken ` - Runs given CToken event - * E.g. `CToken cZRX Mint 5e18` -* `Erc20 ` - Runs given Erc20 event - * E.g. `Erc20 ZRX Facuet Geoff 5e18` -* `InterestRateModel ...event` - Runs given interest rate model event - * E.g. `InterestRateModel Deployed (Fixed 0.5)` -* `PriceOracle ` - Runs given Price Oracle event - * E.g. `PriceOracle SetPrice cZRX 1.5` - -## Comptroller Events - -* "Comptroller Deploy ...comptrollerParams" - Generates a new Comptroller - * E.g. "Comptroller Deploy Scenario (PriceOracle Address) 0.1 10" -* `Comptroller SetPaused action: paused:` - Pauses or unpaused given cToken function (e.g. Mint) - * E.g. `Comptroller SetPaused Mint True` -* `Comptroller SupportMarket ` - Adds support in the Comptroller for the given cToken - * E.g. `Comptroller SupportMarket cZRX` -* `Comptroller EnterMarkets ...` - User enters the given markets - * E.g. `Comptroller EnterMarkets Geoff cZRX cETH` -* `Comptroller SetMaxAssets ` - Sets (or resets) the max allowed asset count - * E.g. `Comptroller SetMaxAssets 4` -* `CToken SetOracle oracle:` - Sets the oracle - * E.g. `Comptroller SetOracle (Fixed 1.5)` -* `Comptroller SetCollateralFactor ` - Sets the collateral factor for given cToken to number - * E.g. `Comptroller SetCollateralFactor cZRX 0.1` -* `FastForward n: Blocks` - Moves the block number forward `n` blocks. Note: in `CTokenScenario` and `ComptrollerScenario` the current block number is mocked (starting at 100000). This is the only way for the protocol to see a higher block number (for accruing interest). - * E.g. `Comptroller FastForward 5 Blocks` - Move block number forward 5 blocks. - -## cToken Events - -* `CToken Deploy name: underlying: comptroller: interestRateModel: initialExchangeRate: decimals: admin:
` - Generates a new comptroller and sets to world global - * E.g. `CToken Deploy cZRX (Erc20 ZRX Address) (Comptroller Address) (InterestRateModel Address) 1.0 18` -* `CToken AccrueInterest` - Accrues interest for given token - * E.g. `CToken cZRX AccrueInterest` -* `CToken Mint amount:` - Mints the given amount of cToken as specified user - * E.g. `CToken cZRX Mint Geoff 1.0` -* `CToken Redeem amount:` - Redeems the given amount of cToken as specified user - * E.g. `CToken cZRX Redeem Geoff 1.0e18` -* `CToken Borrow amount:` - Borrows the given amount of this cToken as specified user - * E.g. `CToken cZRX Borrow Geoff 1.0e18` -* `CToken ReduceReserves amount:` - Reduces the reserves of the cToken - * E.g. `CToken cZRX ReduceReserves 1.0e18` -* `CToken SetReserveFactor amount:` - Sets the reserve factor for the cToken - * E.g. `CToken cZRX SetReserveFactor 0.1` -* `CToken SetInterestRateModel interestRateModel:` - Sets the interest rate model for the given cToken - * E.g. `CToken cZRX SetInterestRateModel (Fixed 1.5)` -* `CToken SetComptroller comptroller:` - Sets the comptroller for the given cToken - * E.g. `CToken cZRX SetComptroller Comptroller` -* `CToken Mock variable: value:` - Mocks a given value on cToken. Note: value must be a supported mock and this will only work on a CTokenScenario contract. - * E.g. `CToken cZRX Mock totalBorrows 5.0e18` - * E.g. `CToken cZRX Mock totalReserves 0.5e18` - -## Erc-20 Events - -* `Erc20 Deploy name:` - Generates a new ERC-20 token by name - * E.g. `Erc20 Deploy ZRX` -* `Erc20 Approve
` - Adds an allowance between user and address - * E.g. `Erc20 ZRX Approve Geoff cZRX 1.0e18` -* `Erc20 Faucet
` - Adds an arbitrary balance to given user - * E.g. `Erc20 ZRX Facuet Geoff 1.0e18` - -## Price Oracle Events - -* `Deploy` - Generates a new price oracle (note: defaults to (Fixed 1.0)) - * E.g. `PriceOracle Deploy (Fixed 1.0)` - * E.g. `PriceOracle Deploy Simple` - * E.g. `PriceOracle Deploy NotPriceOracle` -* `SetPrice ` - Sets the per-ether price for the given cToken - * E.g. `PriceOracle SetPrice cZRX 1.0` - -## Interest Rate Model Events - -## Deploy - -* `Deploy params:` - Generates a new interest rate model (note: defaults to (Fixed 0.25)) - * E.g. `InterestRateModel Deploy (Fixed 0.5)` - * E.g. `InterestRateModel Deploy Whitepaper` - -# Values - -## Core Values - -* `True` - Returns true -* `False` - Returns false -* `Zero` - Returns 0 -* `Some` - Returns 100e18 -* `Little` - Returns 100e10 -* `Exactly ` - Returns a strict numerical value - * E.g. `Exactly 5.0` -* `Exp ` - Returns the mantissa for a given exp - * E.g. `Exp 5.5` -* `Precisely ` - Matches a number to given number of significant figures - * E.g. `Exactly 5.1000` - Matches to 5 sig figs -* `Anything` - Matches anything -* `Nothing` - Matches nothing -* `Default value: default:` - Returns value if truthy, otherwise default. Note: this does short-circuit -* `LastContract` - Returns the address of last constructed contract -* `User <...>` - Returns User value (see below) -* `Comptroller <...>` - Returns Comptroller value (see below) -* `CToken <...>` - Returns CToken value (see below) -* `Erc20 <...>` - Returns Erc20 value (see below) -* `InterestRateModel <...>` - Returns InterestRateModel value (see below) -* `PriceOracle <...>` - Returns PriceOracle value (see below) - -## User Values - -* `User Address` - Returns address of user - * E.g. `User Geoff Address` - Returns Geoff's address - -## Comptroller Values - -* `Comptroller Liquidity ` - Returns a given user's trued up liquidity - * E.g. `Comptroller Liquidity Geoff` -* `Comptroller MembershipLength ` - Returns a given user's length of membership - * E.g. `Comptroller MembershipLength Geoff` -* `Comptroller CheckMembership ` - Returns one if user is in asset, zero otherwise. - * E.g. `Comptroller CheckMembership Geoff cZRX` -* "Comptroller CheckListed " - Returns true if market is listed, false otherwise. - * E.g. "Comptroller CheckListed cZRX" - -## CToken Values -* `CToken UnderlyingBalance ` - Returns a user's underlying balance (based on given exchange rate) - * E.g. `CToken cZRX UnderlyingBalance Geoff` -* `CToken BorrowBalance ` - Returns a user's borrow balance (including interest) - * E.g. `CToken cZRX BorrowBalance Geoff` -* `CToken TotalBorrowBalance` - Returns the cToken's total borrow balance - * E.g. `CToken cZRX TotalBorrowBalance` -* `CToken Reserves` - Returns the cToken's total reserves - * E.g. `CToken cZRX Reserves` -* `CToken Comptroller` - Returns the cToken's comptroller - * E.g. `CToken cZRX Comptroller` -* `CToken PriceOracle` - Returns the cToken's price oracle - * E.g. `CToken cZRX PriceOracle` -* `CToken ExchangeRateStored` - Returns the cToken's exchange rate (based on balances stored) - * E.g. `CToken cZRX ExchangeRateStored` -* `CToken ExchangeRate` - Returns the cToken's current exchange rate - * E.g. `CToken cZRX ExchangeRate` - -## Erc-20 Values - -* `Erc20 Address` - Returns address of ERC-20 contract - * E.g. `Erc20 ZRX Address` - Returns ZRX's address -* `Erc20 Name` - Returns name of ERC-20 contract - * E.g. `Erc20 ZRX Address` - Returns ZRX's name -* `Erc20 Symbol` - Returns symbol of ERC-20 contract - * E.g. `Erc20 ZRX Symbol` - Returns ZRX's symbol -* `Erc20 Decimals` - Returns number of decimals in ERC-20 contract - * E.g. `Erc20 ZRX Decimals` - Returns ZRX's decimals -* `Erc20 TotalSupply` - Returns the ERC-20 token's total supply - * E.g. `Erc20 ZRX TotalSupply` - * E.g. `Erc20 cZRX TotalSupply` -* `Erc20 TokenBalance
` - Returns the ERC-20 token balance of a given address - * E.g. `Erc20 ZRX TokenBalance Geoff` - Returns a user's ZRX balance - * E.g. `Erc20 cZRX TokenBalance Geoff` - Returns a user's cZRX balance - * E.g. `Erc20 ZRX TokenBalance cZRX` - Returns cZRX's ZRX balance -* `Erc20 Allowance owner:
spender:
` - Returns the ERC-20 allowance from owner to spender - * E.g. `Erc20 ZRX Allowance Geoff Torrey` - Returns the ZRX allowance of Geoff to Torrey - * E.g. `Erc20 cZRX Allowance Geoff Coburn` - Returns the cZRX allowance of Geoff to Coburn - * E.g. `Erc20 ZRX Allowance Geoff cZRX` - Returns the ZRX allowance of Geoff to the cZRX cToken - -## PriceOracle Values - -* `Address` - Gets the address of the global price oracle -* `Price asset:
` - Gets the price of the given asset - -## Interest Rate Model Values - -* `Address` - Gets the address of the global interest rate model - -# Assertions - -* `Equal given: expected:` - Asserts that given matches expected. - * E.g. `Assert Equal (Exactly 0) Zero` - * E.g. `Assert Equal (CToken cZRX TotalSupply) (Exactly 55)` - * E.g. `Assert Equal (CToken cZRX Comptroller) (Comptroller Address)` -* `True given:` - Asserts that given is true. - * E.g. `Assert True (Comptroller CheckMembership Geoff cETH)` -* `False given:` - Asserts that given is false. - * E.g. `Assert False (Comptroller CheckMembership Geoff cETH)` -* `Failure error: info: detail:` - Asserts that last transaction had a graceful failure with given error, info and detail. - * E.g. `Assert Failure UNAUTHORIZED SUPPORT_MARKET_OWNER_CHECK` - * E.g. `Assert Failure MATH_ERROR MINT_CALCULATE_BALANCE 5` -* `Revert` - Asserts that the last transaction reverted. -* `Success` - Asserts that the last transaction completed successfully (that is, did not revert nor emit graceful failure). -* `Log name: ((key: value:) ...)` - Asserts that last transaction emitted log with given name and key-value pairs. - * E.g. `Assert Log Minted (("account" (User Geoff address)) ("amount" (Exactly 55)))` diff --git a/scenario/package.json b/scenario/package.json deleted file mode 100644 index dbd88aa8d..000000000 --- a/scenario/package.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "name": "compound-protocol-alpha", - "version": "0.2.1", - "description": "The Compound Money Market", - "main": "index.js", - "scripts": { - "build": "./script/webpack" - }, - "repository": "git@github.com:compound-finance/money-market.git", - "author": "Compound Finance", - "license": "UNLICENSED", - "devDependencies": { - "request": "^2.88.2", - "solparse": "^2.2.8", - "ts-loader": "^8.0.3", - "ts-pegjs": "^0.2.7", - "typescript": "^4.0.2", - "webpack": "^4.44.1", - "webpack-bundle-analyzer": "^3.8.0", - "webpack-cli": "^3.3.12" - }, - "dependencies": { - "bignumber.js": "9.0.0", - "eth-saddle": "^0.1.25", - "ethers": "^5.0.8", - "immutable": "^4.0.0-rc.12", - "truffle-flattener": "^1.4.4", - "web3": "^1.2.11" - }, - "resolutions": { - "scrypt.js": "https://registry.npmjs.org/@compound-finance/ethereumjs-wallet/-/ethereumjs-wallet-0.6.3.tgz", - "**/ganache-core": "github:compound-finance/ganache-core.git#jflatow/unbreak-fork" - } -} diff --git a/scenario/script/generate_parser b/scenario/script/generate_parser deleted file mode 100755 index 27ad43705..000000000 --- a/scenario/script/generate_parser +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/bash - -set -eo pipefail - -dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" -scenario_dir="$(cd $dir/.. && pwd)" - -"$scenario_dir/node_modules/.bin/pegjs" \ - --plugin "$scenario_dir/node_modules/ts-pegjs" \ - -o "$scenario_dir/src/Parser.ts" \ - --cache \ - --allowed-start-rules tests,step,macros \ - "$scenario_dir/Grammar.pegjs" diff --git a/scenario/script/repl b/scenario/script/repl deleted file mode 100755 index ad0ec5ba1..000000000 --- a/scenario/script/repl +++ /dev/null @@ -1,59 +0,0 @@ -#!/bin/bash - -set -eo pipefail - -dir=`dirname $0` -tsc_root="$dir/.." -proj_root="$dir/../.." -networks_root="$dir/../../networks" -network=${NETWORK:-development} -script=() -verbose="$VERBOSE" -dry_run="$DRY_RUN" -no_tsc="$NO_TSC" - -[ -n "$SCRIPT" ] && script+=("$SCRIPT") - -usage() { echo "$0 usage:" && grep ".)\ #" $0; exit 0; } -while getopts ":hdn:e:s:vt" arg; do - case $arg in - c) # Don't compile - no_compile="true" - ;; - d) # Dry run - dry_run="true" - ;; - h) # Hypothetical - hypothetical="true" - ;; - e) # Add variables for script (key=value,key2=value2) - env_vars="$OPTARG" - ;; - n) # Specify network - network=$OPTARG - ;; - s) # Specify a script to run - [ ! -f "$OPTARG" ] \ - && echo "Cannot find script $OPTARG" \ - && exit 1 - script+=("$OPTARG") - ;; - t) # Don't build TSC - no_tsc="true" - ;; - - v) # Verbose - verbose="true" - ;; - - h | *) # Display help. - usage - exit 0 - ;; - esac -done - -[[ -z $no_tsc ]] && "$dir/tsc" -[[ -z $no_compile ]] && "$proj_root/script/compile" - -proj_root="$proj_root" env_vars="$env_vars" dry_run="$dry_run" script="$(IFS=, ; echo "${script[*]}")" network="$network" verbose="$verbose" node "$tsc_root/.tsbuilt/Repl.js" diff --git a/scenario/script/tsc b/scenario/script/tsc deleted file mode 100755 index cdf02b20e..000000000 --- a/scenario/script/tsc +++ /dev/null @@ -1,43 +0,0 @@ -#!/bin/bash - -set -eo pipefail - -dir=`dirname $0` -scenario_dir="$(cd $dir/.. && pwd)" -parent_dir="$(cd $dir/../.. && pwd)" -cache_file="$scenario_dir/.tscache" -shasumVersion="$(shasum -v)" -inflectionVersion="6.01" - -if [ "$(printf '%s\n' "$inflectionVersion" "$shasumVersion" | sort -V | head -n1)" = "$inflectionVersion" ]; then - checksum="$(echo $scenario_dir/src/{*,**/}*.* | xargs shasum -U | shasum -U | cut -d' ' -f 1)" -else - checksum="$(echo $scenario_dir/src/{*,**/}*.* | xargs shasum -p | shasum -p | cut -d' ' -f 1)" -fi - -if [ ! -d "$scenario_dir/node_modules" ]; then - echo "Getting scenario packages..." - cd "$scenario_dir" && yarn -fi - -trap cleanup EXIT - -cleanup() { - mv "$parent_dir/node_modules_tmp" "$parent_dir/node_modules" -} - -mv "$parent_dir/node_modules" "$parent_dir/node_modules_tmp" - -if [ -z "$rebuild" -a -f "$cache_file" ]; then - cached="$(cat $cache_file)" - - if [ "$cached" == "$checksum" ]; then - echo "Skipping Scenario Rebuild (set rebuild=true to force)" - exit 0 - fi -fi - -echo "Building Scenario Runner..." -cd "$scenario_dir" && node "$scenario_dir/node_modules/.bin/tsc" ${TSC_ARGS-"--skipLibCheck"} - -echo "$checksum" > "$cache_file" diff --git a/scenario/script/webpack b/scenario/script/webpack deleted file mode 100755 index 450947799..000000000 --- a/scenario/script/webpack +++ /dev/null @@ -1,18 +0,0 @@ -#!/bin/bash - -set -eo pipefail - -dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" -scenario_dir="$(cd $dir/.. && pwd)" - -cd "$scenario_dir" && - mkdir -p ./build && - ./node_modules/.bin/webpack \ - --mode production \ - --config ./webpack.config.js \ - --entry ./src/Web.ts \ - --module-bind 'ts=ts-loader' \ - --module-bind 'exports-loader?parse' \ - --resolve-extensions ".ts,.js" \ - --output-library-target window \ - --output ./build/scenario.js diff --git a/scenario/src/Accounts.ts b/scenario/src/Accounts.ts deleted file mode 100644 index 63070f7f6..000000000 --- a/scenario/src/Accounts.ts +++ /dev/null @@ -1,49 +0,0 @@ -import {World} from './World'; -import {Map} from 'immutable'; - -export const accountMap = { - "default": 0, - "root": 0, - "admin": 0, - "first": 0, - - "bank": 1, - "second": 1, - - "geoff": 2, - "third": 2, - "guardian": 2, - - "torrey": 3, - "fourth": 3, - - "robert": 4, - "fifth": 4, - - "coburn": 5, - "sixth": 5, - - "jared": 6, - "seventh": 6 -}; - -export interface Account { - name: string - address: string -} - -export type Accounts = Map - -export function accountAliases(index: number): string[] { - return Object.entries(accountMap).filter(([k,v]) => v === index).map(([k,v]) => k); -} - -export function loadAccounts(accounts: string[]): Accounts { - return Object.entries(accountMap).reduce((acc, [name, index]) => { - if (accounts[index]) { - return acc.set(name, { name: name, address: accounts[index] }); - } else { - return acc; - } - }, >Map({})); -} diff --git a/scenario/src/Action.ts b/scenario/src/Action.ts deleted file mode 100644 index 81eaabc11..000000000 --- a/scenario/src/Action.ts +++ /dev/null @@ -1,15 +0,0 @@ -import {Invokation} from './Invokation'; - -export class Action { - log: string; - invokation: Invokation; - - constructor(log: string, invokation: Invokation) { - this.log = log; - this.invokation = invokation; - } - - toString() { - return `Action: log=${this.log}, result=${this.invokation.toString()}`; - } -} diff --git a/scenario/src/Assert.ts b/scenario/src/Assert.ts deleted file mode 100644 index f34637929..000000000 --- a/scenario/src/Assert.ts +++ /dev/null @@ -1,19 +0,0 @@ -export type Expect = (actual: any) => { - toEqual: (expected: any) => any - fail: (message: string) => any -} - -export const throwExpect: Expect = (x) => { - return { - toEqual: (y) => { - let xEnc = JSON.stringify(x); - let yEnc = JSON.stringify(y); - if (xEnc !== yEnc) { - throw new Error(`expected ${x} to equal ${y}`); - } - }, - fail: (reason) => { - throw new Error(reason) - } - } -}; diff --git a/scenario/src/Builder/CTokenBuilder.ts b/scenario/src/Builder/CTokenBuilder.ts deleted file mode 100644 index f998d3e0b..000000000 --- a/scenario/src/Builder/CTokenBuilder.ts +++ /dev/null @@ -1,408 +0,0 @@ -import { Event } from '../Event'; -import { World } from '../World'; -import { CErc20Delegator, CErc20DelegatorScenario } from '../Contract/CErc20Delegator'; -import { CToken } from '../Contract/CToken'; -import { Invokation, invoke } from '../Invokation'; -import { getAddressV, getExpNumberV, getNumberV, getStringV } from '../CoreValue'; -import { AddressV, NumberV, StringV } from '../Value'; -import { Arg, Fetcher, getFetcherValue } from '../Command'; -import { storeAndSaveContract } from '../Networks'; -import { getContract, getTestContract } from '../Contract'; - -const CErc20Contract = getContract('CErc20Immutable'); -const CErc20Delegator = getContract('CErc20Delegator'); -const CErc20DelegatorScenario = getTestContract('CErc20DelegatorScenario'); -const CEtherContract = getContract('CEther'); -const CErc20ScenarioContract = getTestContract('CErc20Scenario'); -const CEtherScenarioContract = getTestContract('CEtherScenario'); -const CEvilContract = getTestContract('CEvil'); - -export interface TokenData { - invokation: Invokation; - name: string; - symbol: string; - decimals?: number; - underlying?: string; - address?: string; - contract: string; - initial_exchange_rate_mantissa?: string; - admin?: string; -} - -export async function buildCToken( - world: World, - from: string, - params: Event -): Promise<{ world: World; cToken: CToken; tokenData: TokenData }> { - const fetchers = [ - new Fetcher< - { - symbol: StringV; - name: StringV; - decimals: NumberV; - underlying: AddressV; - comptroller: AddressV; - interestRateModel: AddressV; - initialExchangeRate: NumberV; - admin: AddressV; - implementation: AddressV; - becomeImplementationData: StringV; - }, - TokenData - >( - ` - #### CErc20Delegator - - * "CErc20Delegator symbol: name: underlying:
comptroller:
interestRateModel:
initialExchangeRate: decimals: admin:
implementation:
becomeImplementationData:" - The real deal CToken - * E.g. "CToken Deploy CErc20Delegator cDAI \"Compound DAI\" (Erc20 DAI Address) (Comptroller Address) (InterestRateModel Address) 1.0 8 Geoff (CToken CDaiDelegate Address) "0x0123434anyByTes314535q" " - `, - 'CErc20Delegator', - [ - new Arg('symbol', getStringV), - new Arg('name', getStringV), - new Arg('underlying', getAddressV), - new Arg('comptroller', getAddressV), - new Arg('interestRateModel', getAddressV), - new Arg('initialExchangeRate', getExpNumberV), - new Arg('decimals', getNumberV), - new Arg('admin', getAddressV), - new Arg('implementation', getAddressV), - new Arg('becomeImplementationData', getStringV) - ], - async ( - world, - { - symbol, - name, - underlying, - comptroller, - interestRateModel, - initialExchangeRate, - decimals, - admin, - implementation, - becomeImplementationData - } - ) => { - return { - invokation: await CErc20Delegator.deploy(world, from, [ - underlying.val, - comptroller.val, - interestRateModel.val, - initialExchangeRate.val, - name.val, - symbol.val, - decimals.val, - admin.val, - implementation.val, - becomeImplementationData.val - ]), - name: name.val, - symbol: symbol.val, - decimals: decimals.toNumber(), - underlying: underlying.val, - contract: 'CErc20Delegator', - initial_exchange_rate_mantissa: initialExchangeRate.encode().toString(), - admin: admin.val - }; - } - ), - - new Fetcher< - { - symbol: StringV; - name: StringV; - decimals: NumberV; - underlying: AddressV; - comptroller: AddressV; - interestRateModel: AddressV; - initialExchangeRate: NumberV; - admin: AddressV; - implementation: AddressV; - becomeImplementationData: StringV; - }, - TokenData - >( - ` - #### CErc20DelegatorScenario - - * "CErc20DelegatorScenario symbol: name: underlying:
comptroller:
interestRateModel:
initialExchangeRate: decimals: admin:
implementation:
becomeImplementationData:" - A CToken Scenario for local testing - * E.g. "CToken Deploy CErc20DelegatorScenario cDAI \"Compound DAI\" (Erc20 DAI Address) (Comptroller Address) (InterestRateModel Address) 1.0 8 Geoff (CToken CDaiDelegate Address) "0x0123434anyByTes314535q" " - `, - 'CErc20DelegatorScenario', - [ - new Arg('symbol', getStringV), - new Arg('name', getStringV), - new Arg('underlying', getAddressV), - new Arg('comptroller', getAddressV), - new Arg('interestRateModel', getAddressV), - new Arg('initialExchangeRate', getExpNumberV), - new Arg('decimals', getNumberV), - new Arg('admin', getAddressV), - new Arg('implementation', getAddressV), - new Arg('becomeImplementationData', getStringV) - ], - async ( - world, - { - symbol, - name, - underlying, - comptroller, - interestRateModel, - initialExchangeRate, - decimals, - admin, - implementation, - becomeImplementationData - } - ) => { - return { - invokation: await CErc20DelegatorScenario.deploy(world, from, [ - underlying.val, - comptroller.val, - interestRateModel.val, - initialExchangeRate.val, - name.val, - symbol.val, - decimals.val, - admin.val, - implementation.val, - becomeImplementationData.val - ]), - name: name.val, - symbol: symbol.val, - decimals: decimals.toNumber(), - underlying: underlying.val, - contract: 'CErc20DelegatorScenario', - initial_exchange_rate_mantissa: initialExchangeRate.encode().toString(), - admin: admin.val - }; - } - ), - - new Fetcher<{symbol: StringV, name: StringV, decimals: NumberV, underlying: AddressV, comptroller: AddressV, interestRateModel: AddressV, initialExchangeRate: NumberV, admin: AddressV}, TokenData>(` - #### Scenario - - * "Scenario symbol: name: underlying:
comptroller:
interestRateModel:
initialExchangeRate: decimals: admin:
" - A CToken Scenario for local testing - * E.g. "CToken Deploy Scenario cZRX \"Compound ZRX\" (Erc20 ZRX Address) (Comptroller Address) (InterestRateModel Address) 1.0 8" - `, - "Scenario", - [ - new Arg("symbol", getStringV), - new Arg("name", getStringV), - new Arg("underlying", getAddressV), - new Arg("comptroller", getAddressV), - new Arg("interestRateModel", getAddressV), - new Arg("initialExchangeRate", getExpNumberV), - new Arg("decimals", getNumberV), - new Arg("admin", getAddressV) - ], - async (world, {symbol, name, underlying, comptroller, interestRateModel, initialExchangeRate, decimals, admin}) => { - return { - invokation: await CErc20ScenarioContract.deploy(world, from, [underlying.val, comptroller.val, interestRateModel.val, initialExchangeRate.val, name.val, symbol.val, decimals.val, admin.val]), - name: name.val, - symbol: symbol.val, - decimals: decimals.toNumber(), - underlying: underlying.val, - contract: 'CErc20Scenario', - initial_exchange_rate_mantissa: initialExchangeRate.encode().toString(), - admin: admin.val - }; - } - ), - - new Fetcher<{symbol: StringV, name: StringV, decimals: NumberV, admin: AddressV, comptroller: AddressV, interestRateModel: AddressV, initialExchangeRate: NumberV}, TokenData>(` - #### CEtherScenario - - * "CEtherScenario symbol: name: comptroller:
interestRateModel:
initialExchangeRate: decimals: admin:
" - A CToken Scenario for local testing - * E.g. "CToken Deploy CEtherScenario cETH \"Compound Ether\" (Comptroller Address) (InterestRateModel Address) 1.0 8" - `, - "CEtherScenario", - [ - new Arg("symbol", getStringV), - new Arg("name", getStringV), - new Arg("comptroller", getAddressV), - new Arg("interestRateModel", getAddressV), - new Arg("initialExchangeRate", getExpNumberV), - new Arg("decimals", getNumberV), - new Arg("admin", getAddressV) - ], - async (world, {symbol, name, comptroller, interestRateModel, initialExchangeRate, decimals, admin}) => { - return { - invokation: await CEtherScenarioContract.deploy(world, from, [name.val, symbol.val, decimals.val, admin.val, comptroller.val, interestRateModel.val, initialExchangeRate.val]), - name: name.val, - symbol: symbol.val, - decimals: decimals.toNumber(), - underlying: "", - contract: 'CEtherScenario', - initial_exchange_rate_mantissa: initialExchangeRate.encode().toString(), - admin: admin.val - }; - } - ), - - new Fetcher<{symbol: StringV, name: StringV, decimals: NumberV, admin: AddressV, comptroller: AddressV, interestRateModel: AddressV, initialExchangeRate: NumberV}, TokenData>(` - #### CEther - - * "CEther symbol: name: comptroller:
interestRateModel:
initialExchangeRate: decimals: admin:
" - A CToken Scenario for local testing - * E.g. "CToken Deploy CEther cETH \"Compound Ether\" (Comptroller Address) (InterestRateModel Address) 1.0 8" - `, - "CEther", - [ - new Arg("symbol", getStringV), - new Arg("name", getStringV), - new Arg("comptroller", getAddressV), - new Arg("interestRateModel", getAddressV), - new Arg("initialExchangeRate", getExpNumberV), - new Arg("decimals", getNumberV), - new Arg("admin", getAddressV) - ], - async (world, {symbol, name, comptroller, interestRateModel, initialExchangeRate, decimals, admin}) => { - return { - invokation: await CEtherContract.deploy(world, from, [comptroller.val, interestRateModel.val, initialExchangeRate.val, name.val, symbol.val, decimals.val, admin.val]), - name: name.val, - symbol: symbol.val, - decimals: decimals.toNumber(), - underlying: "", - contract: 'CEther', - initial_exchange_rate_mantissa: initialExchangeRate.encode().toString(), - admin: admin.val - }; - } - ), - - new Fetcher<{symbol: StringV, name: StringV, decimals: NumberV, admin: AddressV, underlying: AddressV, comptroller: AddressV, interestRateModel: AddressV, initialExchangeRate: NumberV}, TokenData>(` - #### CErc20 - - * "CErc20 symbol: name: underlying:
comptroller:
interestRateModel:
initialExchangeRate: decimals: admin:
" - A official CToken contract - * E.g. "CToken Deploy CErc20 cZRX \"Compound ZRX\" (Erc20 ZRX Address) (Comptroller Address) (InterestRateModel Address) 1.0 8" - `, - "CErc20", - [ - new Arg("symbol", getStringV), - new Arg("name", getStringV), - new Arg("underlying", getAddressV), - new Arg("comptroller", getAddressV), - new Arg("interestRateModel", getAddressV), - new Arg("initialExchangeRate", getExpNumberV), - new Arg("decimals", getNumberV), - new Arg("admin", getAddressV) - ], - async (world, {symbol, name, underlying, comptroller, interestRateModel, initialExchangeRate, decimals, admin}) => { - - return { - invokation: await CErc20Contract.deploy(world, from, [underlying.val, comptroller.val, interestRateModel.val, initialExchangeRate.val, name.val, symbol.val, decimals.val, admin.val]), - name: name.val, - symbol: symbol.val, - decimals: decimals.toNumber(), - underlying: underlying.val, - contract: 'CErc20', - initial_exchange_rate_mantissa: initialExchangeRate.encode().toString(), - admin: admin.val - }; - } - ), - - new Fetcher<{symbol: StringV, name: StringV, decimals: NumberV, admin: AddressV, underlying: AddressV, comptroller: AddressV, interestRateModel: AddressV, initialExchangeRate: NumberV}, TokenData>(` - #### CEvil - - * "CEvil symbol: name: underlying:
comptroller:
interestRateModel:
initialExchangeRate: decimals: admin:
" - A malicious CToken contract - * E.g. "CToken Deploy CEvil cEVL \"Compound EVL\" (Erc20 ZRX Address) (Comptroller Address) (InterestRateModel Address) 1.0 8" - `, - "CEvil", - [ - new Arg("symbol", getStringV), - new Arg("name", getStringV), - new Arg("underlying", getAddressV), - new Arg("comptroller", getAddressV), - new Arg("interestRateModel", getAddressV), - new Arg("initialExchangeRate", getExpNumberV), - new Arg("decimals", getNumberV), - new Arg("admin", getAddressV) - ], - async (world, {symbol, name, underlying, comptroller, interestRateModel, initialExchangeRate, decimals, admin}) => { - return { - invokation: await CEvilContract.deploy(world, from, [underlying.val, comptroller.val, interestRateModel.val, initialExchangeRate.val, name.val, symbol.val, decimals.val, admin.val]), - name: name.val, - symbol: symbol.val, - decimals: decimals.toNumber(), - underlying: underlying.val, - contract: 'CEvil', - initial_exchange_rate_mantissa: initialExchangeRate.encode().toString(), - admin: admin.val - }; - } - ), - - new Fetcher<{symbol: StringV, name: StringV, decimals: NumberV, admin: AddressV, underlying: AddressV, comptroller: AddressV, interestRateModel: AddressV, initialExchangeRate: NumberV}, TokenData>(` - #### Standard - - * "symbol: name: underlying:
comptroller:
interestRateModel:
initialExchangeRate: decimals: admin:
" - A official CToken contract - * E.g. "CToken Deploy Standard cZRX \"Compound ZRX\" (Erc20 ZRX Address) (Comptroller Address) (InterestRateModel Address) 1.0 8" - `, - "Standard", - [ - new Arg("symbol", getStringV), - new Arg("name", getStringV), - new Arg("underlying", getAddressV), - new Arg("comptroller", getAddressV), - new Arg("interestRateModel", getAddressV), - new Arg("initialExchangeRate", getExpNumberV), - new Arg("decimals", getNumberV), - new Arg("admin", getAddressV) - ], - async (world, {symbol, name, underlying, comptroller, interestRateModel, initialExchangeRate, decimals, admin}) => { - // Note: we're going to use the scenario contract as the standard deployment on local networks - if (world.isLocalNetwork()) { - return { - invokation: await CErc20ScenarioContract.deploy(world, from, [underlying.val, comptroller.val, interestRateModel.val, initialExchangeRate.val, name.val, symbol.val, decimals.val, admin.val]), - name: name.val, - symbol: symbol.val, - decimals: decimals.toNumber(), - underlying: underlying.val, - contract: 'CErc20Scenario', - initial_exchange_rate_mantissa: initialExchangeRate.encode().toString(), - admin: admin.val - }; - } else { - return { - invokation: await CErc20Contract.deploy(world, from, [underlying.val, comptroller.val, interestRateModel.val, initialExchangeRate.val, name.val, symbol.val, decimals.val, admin.val]), - name: name.val, - symbol: symbol.val, - decimals: decimals.toNumber(), - underlying: underlying.val, - contract: 'CErc20Immutable', - initial_exchange_rate_mantissa: initialExchangeRate.encode().toString(), - admin: admin.val - }; - } - }, - {catchall: true} - ) - ]; - - let tokenData = await getFetcherValue("DeployCToken", fetchers, world, params); - let invokation = tokenData.invokation; - delete tokenData.invokation; - - if (invokation.error) { - throw invokation.error; - } - - const cToken = invokation.value!; - tokenData.address = cToken._address; - - world = await storeAndSaveContract( - world, - cToken, - tokenData.symbol, - invokation, - [ - { index: ['cTokens', tokenData.symbol], data: tokenData }, - { index: ['Tokens', tokenData.symbol], data: tokenData } - ] - ); - - return {world, cToken, tokenData}; -} diff --git a/scenario/src/Builder/CTokenDelegateBuilder.ts b/scenario/src/Builder/CTokenDelegateBuilder.ts deleted file mode 100644 index f19477abd..000000000 --- a/scenario/src/Builder/CTokenDelegateBuilder.ts +++ /dev/null @@ -1,156 +0,0 @@ -import { Event } from '../Event'; -import { World } from '../World'; -import { CErc20Delegate, CErc20DelegateScenario } from '../Contract/CErc20Delegate'; -import { CToken } from '../Contract/CToken'; -import { Invokation } from '../Invokation'; -import { getStringV } from '../CoreValue'; -import { AddressV, NumberV, StringV } from '../Value'; -import { Arg, Fetcher, getFetcherValue } from '../Command'; -import { storeAndSaveContract } from '../Networks'; -import { getContract, getTestContract } from '../Contract'; - -const CDaiDelegateContract = getContract('CDaiDelegate'); -const CDaiDelegateScenarioContract = getTestContract('CDaiDelegateScenario'); -const CErc20DelegateContract = getContract('CErc20Delegate'); -const CErc20DelegateScenarioContract = getTestContract('CErc20DelegateScenario'); - - -export interface CTokenDelegateData { - invokation: Invokation; - name: string; - contract: string; - description?: string; -} - -export async function buildCTokenDelegate( - world: World, - from: string, - params: Event -): Promise<{ world: World; cTokenDelegate: CErc20Delegate; delegateData: CTokenDelegateData }> { - const fetchers = [ - new Fetcher<{ name: StringV; }, CTokenDelegateData>( - ` - #### CDaiDelegate - - * "CDaiDelegate name:" - * E.g. "CTokenDelegate Deploy CDaiDelegate cDAIDelegate" - `, - 'CDaiDelegate', - [ - new Arg('name', getStringV) - ], - async ( - world, - { name } - ) => { - return { - invokation: await CDaiDelegateContract.deploy(world, from, []), - name: name.val, - contract: 'CDaiDelegate', - description: 'Standard CDai Delegate' - }; - } - ), - - new Fetcher<{ name: StringV; }, CTokenDelegateData>( - ` - #### CDaiDelegateScenario - - * "CDaiDelegateScenario name:" - A CDaiDelegate Scenario for local testing - * E.g. "CTokenDelegate Deploy CDaiDelegateScenario cDAIDelegate" - `, - 'CDaiDelegateScenario', - [ - new Arg('name', getStringV) - ], - async ( - world, - { name } - ) => { - return { - invokation: await CDaiDelegateScenarioContract.deploy(world, from, []), - name: name.val, - contract: 'CDaiDelegateScenario', - description: 'Scenario CDai Delegate' - }; - } - ), - - new Fetcher<{ name: StringV; }, CTokenDelegateData>( - ` - #### CErc20Delegate - - * "CErc20Delegate name:" - * E.g. "CTokenDelegate Deploy CErc20Delegate cDAIDelegate" - `, - 'CErc20Delegate', - [ - new Arg('name', getStringV) - ], - async ( - world, - { name } - ) => { - return { - invokation: await CErc20DelegateContract.deploy(world, from, []), - name: name.val, - contract: 'CErc20Delegate', - description: 'Standard CErc20 Delegate' - }; - } - ), - - new Fetcher<{ name: StringV; }, CTokenDelegateData>( - ` - #### CErc20DelegateScenario - - * "CErc20DelegateScenario name:" - A CErc20Delegate Scenario for local testing - * E.g. "CTokenDelegate Deploy CErc20DelegateScenario cDAIDelegate" - `, - 'CErc20DelegateScenario', - [ - new Arg('name', getStringV), - ], - async ( - world, - { name } - ) => { - return { - invokation: await CErc20DelegateScenarioContract.deploy(world, from, []), - name: name.val, - contract: 'CErc20DelegateScenario', - description: 'Scenario CErc20 Delegate' - }; - } - ) - ]; - - let delegateData = await getFetcherValue("DeployCToken", fetchers, world, params); - let invokation = delegateData.invokation; - delete delegateData.invokation; - - if (invokation.error) { - throw invokation.error; - } - - const cTokenDelegate = invokation.value!; - - world = await storeAndSaveContract( - world, - cTokenDelegate, - delegateData.name, - invokation, - [ - { - index: ['CTokenDelegate', delegateData.name], - data: { - address: cTokenDelegate._address, - contract: delegateData.contract, - description: delegateData.description - } - } - ] - ); - - return { world, cTokenDelegate, delegateData }; -} diff --git a/scenario/src/Builder/CompBuilder.ts b/scenario/src/Builder/CompBuilder.ts deleted file mode 100644 index 0d23cf5d1..000000000 --- a/scenario/src/Builder/CompBuilder.ts +++ /dev/null @@ -1,110 +0,0 @@ -import { Event } from '../Event'; -import { World, addAction } from '../World'; -import { Comp, CompScenario } from '../Contract/Comp'; -import { Invokation } from '../Invokation'; -import { getAddressV } from '../CoreValue'; -import { StringV, AddressV } from '../Value'; -import { Arg, Fetcher, getFetcherValue } from '../Command'; -import { storeAndSaveContract } from '../Networks'; -import { getContract } from '../Contract'; - -const CompContract = getContract('Comp'); -const CompScenarioContract = getContract('CompScenario'); - -export interface TokenData { - invokation: Invokation; - contract: string; - address?: string; - symbol: string; - name: string; - decimals?: number; -} - -export async function buildComp( - world: World, - from: string, - params: Event -): Promise<{ world: World; comp: Comp; tokenData: TokenData }> { - const fetchers = [ - new Fetcher<{ account: AddressV }, TokenData>( - ` - #### Scenario - - * "Comp Deploy Scenario account:
" - Deploys Scenario Comp Token - * E.g. "Comp Deploy Scenario Geoff" - `, - 'Scenario', - [ - new Arg("account", getAddressV), - ], - async (world, { account }) => { - return { - invokation: await CompScenarioContract.deploy(world, from, [account.val]), - contract: 'CompScenario', - symbol: 'COMP', - name: 'Compound Governance Token', - decimals: 18 - }; - } - ), - - new Fetcher<{ account: AddressV }, TokenData>( - ` - #### Comp - - * "Comp Deploy account:
" - Deploys Comp Token - * E.g. "Comp Deploy Geoff" - `, - 'Comp', - [ - new Arg("account", getAddressV), - ], - async (world, { account }) => { - if (world.isLocalNetwork()) { - return { - invokation: await CompScenarioContract.deploy(world, from, [account.val]), - contract: 'CompScenario', - symbol: 'COMP', - name: 'Compound Governance Token', - decimals: 18 - }; - } else { - return { - invokation: await CompContract.deploy(world, from, [account.val]), - contract: 'Comp', - symbol: 'COMP', - name: 'Compound Governance Token', - decimals: 18 - }; - } - }, - { catchall: true } - ) - ]; - - let tokenData = await getFetcherValue("DeployComp", fetchers, world, params); - let invokation = tokenData.invokation; - delete tokenData.invokation; - - if (invokation.error) { - throw invokation.error; - } - - const comp = invokation.value!; - tokenData.address = comp._address; - - world = await storeAndSaveContract( - world, - comp, - 'Comp', - invokation, - [ - { index: ['Comp'], data: tokenData }, - { index: ['Tokens', tokenData.symbol], data: tokenData } - ] - ); - - tokenData.invokation = invokation; - - return { world, comp, tokenData }; -} diff --git a/scenario/src/Builder/ComptrollerImplBuilder.ts b/scenario/src/Builder/ComptrollerImplBuilder.ts deleted file mode 100644 index f01b4d233..000000000 --- a/scenario/src/Builder/ComptrollerImplBuilder.ts +++ /dev/null @@ -1,367 +0,0 @@ -import { Event } from '../Event'; -import { addAction, World } from '../World'; -import { ComptrollerImpl } from '../Contract/ComptrollerImpl'; -import { Invokation, invoke } from '../Invokation'; -import { getAddressV, getExpNumberV, getNumberV, getStringV } from '../CoreValue'; -import { AddressV, NumberV, StringV } from '../Value'; -import { Arg, Fetcher, getFetcherValue } from '../Command'; -import { storeAndSaveContract } from '../Networks'; -import { getContract, getTestContract } from '../Contract'; - -const ComptrollerG1Contract = getContract('ComptrollerG1'); -const ComptrollerScenarioG1Contract = getTestContract('ComptrollerScenarioG1'); - -const ComptrollerG2Contract = getContract('ComptrollerG2'); -const ComptrollerScenarioG2Contract = getContract('ComptrollerScenarioG2'); - -const ComptrollerG3Contract = getContract('ComptrollerG3'); -const ComptrollerScenarioG3Contract = getContract('ComptrollerScenarioG3'); - -const ComptrollerG4Contract = getContract('ComptrollerG4'); -const ComptrollerScenarioG4Contract = getContract('ComptrollerScenarioG4'); - -const ComptrollerG5Contract = getContract('ComptrollerG5'); -const ComptrollerScenarioG5Contract = getContract('ComptrollerScenarioG5'); - -const ComptrollerG6Contract = getContract('ComptrollerG6'); -const ComptrollerScenarioG6Contract = getContract('ComptrollerScenarioG6'); - -const ComptrollerScenarioContract = getTestContract('ComptrollerScenario'); -const ComptrollerContract = getContract('Comptroller'); - -const ComptrollerBorkedContract = getTestContract('ComptrollerBorked'); - -export interface ComptrollerImplData { - invokation: Invokation; - name: string; - contract: string; - description: string; -} - -export async function buildComptrollerImpl( - world: World, - from: string, - event: Event -): Promise<{ world: World; comptrollerImpl: ComptrollerImpl; comptrollerImplData: ComptrollerImplData }> { - const fetchers = [ - new Fetcher<{ name: StringV }, ComptrollerImplData>( - ` - #### ScenarioG1 - - * "ScenarioG1 name:" - The Comptroller Scenario for local testing (G1) - * E.g. "ComptrollerImpl Deploy ScenarioG1 MyScen" - `, - 'ScenarioG1', - [new Arg('name', getStringV)], - async (world, { name }) => ({ - invokation: await ComptrollerScenarioG1Contract.deploy(world, from, []), - name: name.val, - contract: 'ComptrollerScenarioG1', - description: 'ScenarioG1 Comptroller Impl' - }) - ), - - new Fetcher<{ name: StringV }, ComptrollerImplData>( - ` - #### ScenarioG2 - - * "ScenarioG2 name:" - The Comptroller Scenario for local testing (G2) - * E.g. "ComptrollerImpl Deploy ScenarioG2 MyScen" - `, - 'ScenarioG2', - [new Arg('name', getStringV)], - async (world, { name }) => ({ - invokation: await ComptrollerScenarioG2Contract.deploy(world, from, []), - name: name.val, - contract: 'ComptrollerScenarioG2Contract', - description: 'ScenarioG2 Comptroller Impl' - }) - ), - - new Fetcher<{ name: StringV }, ComptrollerImplData>( - ` - #### ScenarioG3 - - * "ScenarioG3 name:" - The Comptroller Scenario for local testing (G3) - * E.g. "ComptrollerImpl Deploy ScenarioG3 MyScen" - `, - 'ScenarioG3', - [new Arg('name', getStringV)], - async (world, { name }) => ({ - invokation: await ComptrollerScenarioG3Contract.deploy(world, from, []), - name: name.val, - contract: 'ComptrollerScenarioG3Contract', - description: 'ScenarioG3 Comptroller Impl' - }) - ), - - new Fetcher<{ name: StringV }, ComptrollerImplData>( - ` - #### ScenarioG4 - * "ScenarioG4 name:" - The Comptroller Scenario for local testing (G4) - * E.g. "ComptrollerImpl Deploy ScenarioG4 MyScen" - `, - 'ScenarioG4', - [new Arg('name', getStringV)], - async (world, { name }) => ({ - invokation: await ComptrollerScenarioG4Contract.deploy(world, from, []), - name: name.val, - contract: 'ComptrollerScenarioG4Contract', - description: 'ScenarioG4 Comptroller Impl' - }) - ), - - new Fetcher<{ name: StringV }, ComptrollerImplData>( - ` - #### ScenarioG5 - * "ScenarioG5 name:" - The Comptroller Scenario for local testing (G5) - * E.g. "ComptrollerImpl Deploy ScenarioG5 MyScen" - `, - 'ScenarioG5', - [new Arg('name', getStringV)], - async (world, { name }) => ({ - invokation: await ComptrollerScenarioG5Contract.deploy(world, from, []), - name: name.val, - contract: 'ComptrollerScenarioG5Contract', - description: 'ScenarioG5 Comptroller Impl' - }) - ), - - new Fetcher<{ name: StringV }, ComptrollerImplData>( - ` - #### ScenarioG6 - * "ScenarioG6 name:" - The Comptroller Scenario for local testing (G6) - * E.g. "ComptrollerImpl Deploy ScenarioG6 MyScen" - `, - 'ScenarioG6', - [new Arg('name', getStringV)], - async (world, { name }) => ({ - invokation: await ComptrollerScenarioG6Contract.deploy(world, from, []), - name: name.val, - contract: 'ComptrollerScenarioG6Contract', - description: 'ScenarioG6 Comptroller Impl' - }) - ), - - new Fetcher<{ name: StringV }, ComptrollerImplData>( - ` - #### Scenario - - * "Scenario name:" - The Comptroller Scenario for local testing - * E.g. "ComptrollerImpl Deploy Scenario MyScen" - `, - 'Scenario', - [new Arg('name', getStringV)], - async (world, { name }) => ({ - invokation: await ComptrollerScenarioContract.deploy(world, from, []), - name: name.val, - contract: 'ComptrollerScenario', - description: 'Scenario Comptroller Impl' - }) - ), - - new Fetcher<{ name: StringV }, ComptrollerImplData>( - ` - #### StandardG1 - - * "StandardG1 name:" - The standard generation 1 Comptroller contract - * E.g. "Comptroller Deploy StandardG1 MyStandard" - `, - 'StandardG1', - [new Arg('name', getStringV)], - async (world, { name }) => { - return { - invokation: await ComptrollerG1Contract.deploy(world, from, []), - name: name.val, - contract: 'ComptrollerG1', - description: 'StandardG1 Comptroller Impl' - }; - } - ), - - new Fetcher<{ name: StringV }, ComptrollerImplData>( - ` - #### StandardG2 - - * "StandardG2 name:" - The standard generation 2 Comptroller contract - * E.g. "Comptroller Deploy StandardG2 MyStandard" - `, - 'StandardG2', - [new Arg('name', getStringV)], - async (world, { name }) => { - return { - invokation: await ComptrollerG2Contract.deploy(world, from, []), - name: name.val, - contract: 'ComptrollerG2', - description: 'StandardG2 Comptroller Impl' - }; - } - ), - - new Fetcher<{ name: StringV }, ComptrollerImplData>( - ` - #### StandardG3 - - * "StandardG3 name:" - The standard generation 3 Comptroller contract - * E.g. "Comptroller Deploy StandardG3 MyStandard" - `, - 'StandardG3', - [new Arg('name', getStringV)], - async (world, { name }) => { - return { - invokation: await ComptrollerG3Contract.deploy(world, from, []), - name: name.val, - contract: 'ComptrollerG3', - description: 'StandardG3 Comptroller Impl' - }; - } - ), - - new Fetcher<{ name: StringV }, ComptrollerImplData>( - ` - #### StandardG4 - - * "StandardG4 name:" - The standard generation 4 Comptroller contract - * E.g. "Comptroller Deploy StandardG4 MyStandard" - `, - 'StandardG4', - [new Arg('name', getStringV)], - async (world, { name }) => { - return { - invokation: await ComptrollerG4Contract.deploy(world, from, []), - name: name.val, - contract: 'ComptrollerG4', - description: 'StandardG4 Comptroller Impl' - }; - } - ), - - new Fetcher<{ name: StringV }, ComptrollerImplData>( - ` - #### StandardG5 - * "StandardG5 name:" - The standard generation 5 Comptroller contract - * E.g. "Comptroller Deploy StandardG5 MyStandard" - `, - 'StandardG5', - [new Arg('name', getStringV)], - async (world, { name }) => { - return { - invokation: await ComptrollerG5Contract.deploy(world, from, []), - name: name.val, - contract: 'ComptrollerG5', - description: 'StandardG5 Comptroller Impl' - }; - } - ), - - new Fetcher<{ name: StringV }, ComptrollerImplData>( - ` - #### StandardG6 - * "StandardG6 name:" - The standard generation 6 Comptroller contract - * E.g. "Comptroller Deploy StandardG6 MyStandard" - `, - 'StandardG6', - [new Arg('name', getStringV)], - async (world, { name }) => { - return { - invokation: await ComptrollerG6Contract.deploy(world, from, []), - name: name.val, - contract: 'ComptrollerG6', - description: 'StandardG6 Comptroller Impl' - }; - } - ), - - new Fetcher<{ name: StringV }, ComptrollerImplData>( - ` - #### Standard - - * "Standard name:" - The standard Comptroller contract - * E.g. "Comptroller Deploy Standard MyStandard" - `, - 'Standard', - [new Arg('name', getStringV)], - async (world, { name }) => { - return { - invokation: await ComptrollerContract.deploy(world, from, []), - name: name.val, - contract: 'Comptroller', - description: 'Standard Comptroller Impl' - }; - } - ), - - new Fetcher<{ name: StringV }, ComptrollerImplData>( - ` - #### Borked - - * "Borked name:" - A Borked Comptroller for testing - * E.g. "ComptrollerImpl Deploy Borked MyBork" - `, - 'Borked', - [new Arg('name', getStringV)], - async (world, { name }) => ({ - invokation: await ComptrollerBorkedContract.deploy(world, from, []), - name: name.val, - contract: 'ComptrollerBorked', - description: 'Borked Comptroller Impl' - }) - ), - new Fetcher<{ name: StringV }, ComptrollerImplData>( - ` - #### Default - - * "name:" - The standard Comptroller contract - * E.g. "ComptrollerImpl Deploy MyDefault" - `, - 'Default', - [new Arg('name', getStringV)], - async (world, { name }) => { - if (world.isLocalNetwork()) { - // Note: we're going to use the scenario contract as the standard deployment on local networks - return { - invokation: await ComptrollerScenarioContract.deploy(world, from, []), - name: name.val, - contract: 'ComptrollerScenario', - description: 'Scenario Comptroller Impl' - }; - } else { - return { - invokation: await ComptrollerContract.deploy(world, from, []), - name: name.val, - contract: 'Comptroller', - description: 'Standard Comptroller Impl' - }; - } - }, - { catchall: true } - ) - ]; - - let comptrollerImplData = await getFetcherValue( - 'DeployComptrollerImpl', - fetchers, - world, - event - ); - let invokation = comptrollerImplData.invokation; - delete comptrollerImplData.invokation; - - if (invokation.error) { - throw invokation.error; - } - const comptrollerImpl = invokation.value!; - - world = await storeAndSaveContract(world, comptrollerImpl, comptrollerImplData.name, invokation, [ - { - index: ['Comptroller', comptrollerImplData.name], - data: { - address: comptrollerImpl._address, - contract: comptrollerImplData.contract, - description: comptrollerImplData.description - } - } - ]); - - return { world, comptrollerImpl, comptrollerImplData }; -} diff --git a/scenario/src/Builder/Erc20Builder.ts b/scenario/src/Builder/Erc20Builder.ts deleted file mode 100644 index 4ccfad1ae..000000000 --- a/scenario/src/Builder/Erc20Builder.ts +++ /dev/null @@ -1,271 +0,0 @@ - -import {Event} from '../Event'; -import {addAction, World} from '../World'; -import {Erc20} from '../Contract/Erc20'; -import {Invokation, invoke} from '../Invokation'; -import { - getAddressV, - getCoreValue, - getNumberV, - getStringV -} from '../CoreValue'; -import { - AddressV, - NumberV, - StringV, - Value -} from '../Value'; -import {Arg, Fetcher, getFetcherValue} from '../Command'; -import {storeAndSaveContract} from '../Networks'; -import {getContract, getTestContract} from '../Contract'; -import {encodeABI} from '../Utils'; - -const ExistingToken = getContract("EIP20Interface"); -const TetherInterface = getContract("TetherInterface"); - -const FaucetTokenHarness = getContract("FaucetToken"); -const FaucetTokenNonStandardHarness = getContract("FaucetNonStandardToken"); -const FaucetTokenReEntrantHarness = getContract("FaucetTokenReEntrantHarness"); -const EvilTokenHarness = getContract("EvilToken"); -const WBTCTokenHarness = getContract("WBTCToken"); -const FeeTokenHarness = getContract("FeeToken"); - -export interface TokenData { - invokation: Invokation, - description: string, - name: string, - symbol: string, - decimals?: number, - address?: string, - contract: string -} - -export async function buildErc20(world: World, from: string, event: Event): Promise<{ world: World, erc20: Erc20, tokenData: TokenData }> { - const fetchers = [ - new Fetcher<{ symbol: StringV, address: AddressV, name: StringV }, TokenData>(` - #### Existing - - * "Existing symbol: address:
name:" - Wrap an existing Erc20 token - * E.g. "Erc20 Deploy Existing DAI 0x123... - `, - "Existing", - [ - new Arg("symbol", getStringV), - new Arg("address", getAddressV), - new Arg("name", getStringV, { default: undefined }), - ], - async (world, { symbol, name, address }) => { - const existingToken = await ExistingToken.at(world, address.val); - const tokenName = name.val === undefined ? symbol.val : name.val; - const decimals = await existingToken.methods.decimals().call(); - - return { - invokation: new Invokation(existingToken, null, null, null), - description: "Existing", - decimals: Number(decimals), - name: tokenName, - symbol: symbol.val, - contract: 'ExistingToken' - }; - } - ), - - new Fetcher<{symbol: StringV, address: AddressV}, TokenData>(` - #### ExistingTether - - * "Existing symbol: address:
" - Wrap an existing Erc20 token - * E.g. "Erc20 Deploy ExistingTether USDT 0x123... - `, - "ExistingTether", - [ - new Arg("symbol", getStringV), - new Arg("address", getAddressV) - ], - async (world, {symbol, address}) => { - return { - invokation: new Invokation(await TetherInterface.at(world, address.val), null, null, null), - description: "ExistingTether", - name: symbol.val, - symbol: symbol.val, - contract: 'TetherInterface' - }; - } - ), - - new Fetcher<{symbol: StringV, name: StringV, decimals: NumberV}, TokenData>(` - #### NonStandard - - * "NonStandard symbol: name: decimals:" - A non-standard token, like BAT - * E.g. "Erc20 Deploy NonStandard BAT \"Basic Attention Token\" 18" - `, - "NonStandard", - [ - new Arg("symbol", getStringV), - new Arg("name", getStringV), - new Arg("decimals", getNumberV, {default: new NumberV(18)}), - ], - async (world, {symbol, name, decimals}) => { - return { - invokation: await FaucetTokenNonStandardHarness.deploy(world, from, [0, name.val, decimals.val, symbol.val]), - description: "NonStandard", - name: name.val, - symbol: symbol.val, - decimals: decimals.toNumber(), - contract: 'FaucetNonStandardToken' - }; - } - ), - - new Fetcher<{symbol: StringV, name: StringV, fun:StringV, reEntryFunSig: StringV, reEntryFunArgs: StringV[]}, TokenData>(` - #### ReEntrant - - * "ReEntrant symbol: name:string fun: funSig: ...funArgs:" - A token that loves to call back to spook its caller - * E.g. "Erc20 Deploy ReEntrant PHREAK PHREAK "transfer" "mint(uint256)" 0 - A token that will call back to a CToken's mint function - - Note: valid functions: totalSupply, balanceOf, transfer, transferFrom, approve, allowance - `, - "ReEntrant", - [ - new Arg("symbol", getStringV), - new Arg("name", getStringV), - new Arg("fun", getStringV), - new Arg("reEntryFunSig", getStringV), - new Arg("reEntryFunArgs", getStringV, {variadic: true, mapped: true}) - ], - async (world, {symbol, name, fun, reEntryFunSig, reEntryFunArgs}) => { - const fnData = encodeABI(world, reEntryFunSig.val, reEntryFunArgs.map((a) => a.val)); - - return { - invokation: await FaucetTokenReEntrantHarness.deploy(world, from, [0, name.val, 18, symbol.val, fnData, fun.val]), - description: "ReEntrant", - name: name.val, - symbol: symbol.val, - decimals: 18, - contract: 'FaucetTokenReEntrantHarness' - }; - } - ), - - new Fetcher<{symbol: StringV, name: StringV, decimals: NumberV}, TokenData>(` - #### Evil - - * "Evil symbol: name: decimals:" - A less vanilla ERC-20 contract that fails transfers - * E.g. "Erc20 Deploy Evil BAT \"Basic Attention Token\" 18" - `, - "Evil", - [ - new Arg("symbol", getStringV), - new Arg("name", getStringV), - new Arg("decimals", getNumberV, {default: new NumberV(18)}) - ], - async (world, {symbol, name, decimals}) => { - return { - invokation: await EvilTokenHarness.deploy(world, from, [0, name.val, decimals.val, symbol.val]), - description: "Evil", - name: name.val, - symbol: symbol.val, - decimals: decimals.toNumber(), - contract: 'EvilToken' - }; - } - ), - - new Fetcher<{symbol: StringV, name: StringV, decimals: NumberV}, TokenData>(` - #### Standard - - * "Standard symbol: name: decimals:" - A vanilla ERC-20 contract - * E.g. "Erc20 Deploy Standard BAT \"Basic Attention Token\" 18" - `, - "Standard", - [ - new Arg("symbol", getStringV), - new Arg("name", getStringV), - new Arg("decimals", getNumberV, {default: new NumberV(18)}) - ], - async (world, {symbol, name, decimals}) => { - return { - invokation: await FaucetTokenHarness.deploy(world, from, [0, name.val, decimals.val, symbol.val]), - description: "Standard", - name: name.val, - symbol: symbol.val, - decimals: decimals.toNumber(), - contract: 'FaucetToken' - }; - } - ), - - new Fetcher<{symbol: StringV, name: StringV}, TokenData>(` - #### WBTC - - * "WBTC symbol: name:" - The WBTC contract - * E.g. "Erc20 Deploy WBTC WBTC \"Wrapped Bitcoin\"" - `, - "WBTC", - [ - new Arg("symbol", getStringV, {default: new StringV("WBTC")}), - new Arg("name", getStringV, {default: new StringV("Wrapped Bitcoin")}) - ], - async (world, {symbol, name}) => { - let decimals = 8; - - return { - invokation: await WBTCTokenHarness.deploy(world, from, []), - description: "WBTC", - name: name.val, - symbol: symbol.val, - decimals: decimals, - contract: 'WBTCToken' - }; - } - ), - - new Fetcher<{symbol: StringV, name: StringV, decimals: NumberV, basisPointFee: NumberV, owner: AddressV}, TokenData>(` - #### Fee - - * "Fee symbol: name: decimals: basisPointFee: owner:
" - An ERC20 whose owner takes a fee on transfers. Used for mocking USDT. - * E.g. "Erc20 Deploy Fee USDT USDT 100 Root" - `, - "Fee", - [ - new Arg("symbol", getStringV), - new Arg("name", getStringV), - new Arg("decimals", getNumberV), - new Arg("basisPointFee", getNumberV), - new Arg("owner", getAddressV) - ], - async (world, {symbol, name, decimals, basisPointFee, owner}) => { - return { - invokation: await FeeTokenHarness.deploy(world, from, [0, name.val, decimals.val, symbol.val, basisPointFee.val, owner.val]), - description: "Fee", - name: name.val, - symbol: symbol.val, - decimals: decimals.toNumber(), - owner: owner.val, - contract: 'FeeToken' - }; - } - ), - ]; - - let tokenData = await getFetcherValue("DeployErc20", fetchers, world, event); - let invokation = tokenData.invokation; - delete tokenData.invokation; - - if (invokation.error) { - throw invokation.error; - } - const erc20 = invokation.value!; - tokenData.address = erc20._address; - - world = await storeAndSaveContract( - world, - erc20, - tokenData.symbol, - invokation, - [ - { index: ['Tokens', tokenData.symbol], data: tokenData } - ] - ); - - return {world, erc20, tokenData}; -} diff --git a/scenario/src/Builder/InterestRateModelBuilder.ts b/scenario/src/Builder/InterestRateModelBuilder.ts deleted file mode 100644 index a1663fd49..000000000 --- a/scenario/src/Builder/InterestRateModelBuilder.ts +++ /dev/null @@ -1,219 +0,0 @@ -import {Event} from '../Event'; -import {addAction, World} from '../World'; -import {InterestRateModel} from '../Contract/InterestRateModel'; -import {Invokation, invoke} from '../Invokation'; -import { - getAddressV, - getExpNumberV, - getNumberV, - getPercentV, - getStringV, -} from '../CoreValue'; -import { - AddressV, - EventV, - NumberV, - StringV, -} from '../Value'; -import {Arg, Fetcher, getFetcherValue} from '../Command'; -import {storeAndSaveContract} from '../Networks'; -import {getContract, getTestContract} from '../Contract'; - -const FixedInterestRateModel = getTestContract('InterestRateModelHarness'); -const WhitePaperInterestRateModel = getContract('WhitePaperInterestRateModel'); -const JumpRateModel = getContract('JumpRateModel'); -const DAIInterestRateModel = getContract('DAIInterestRateModelV3'); -const JumpRateModelV2 = getContract('JumpRateModelV2'); -const LegacyJumpRateModelV2 = getContract('LegacyJumpRateModelV2'); - -export interface InterestRateModelData { - invokation: Invokation - address?: string - name: string - contract: string - description: string - base?: string - slope?: string - kink?: string - jump?: string -} - -export async function buildInterestRateModel(world: World, from: string, event: Event): Promise<{world: World, interestRateModel: InterestRateModel, interestRateModelData: InterestRateModelData}> { - const fetchers = [ - new Fetcher<{name: StringV, rate: NumberV}, InterestRateModelData>(` - #### Fixed - - * "Fixed name: rate:" - Fixed interest **per-block** rate - * E.g. "InterestRateModel Deploy Fixed MyInterestRateModel 0.5" - `, - "Fixed", - [ - new Arg("name", getStringV), - new Arg("rate", getPercentV), - ], - async (world, {name, rate}) => ({ - invokation: await FixedInterestRateModel.deploy(world, from, [rate.encode()]), - name: name.val, - contract: "InterestRateModelHarness", - description: `Fixed rate ${rate.show()} per block` - }) - ), - - new Fetcher<{name: StringV, baseRate: NumberV, multiplier: NumberV}, InterestRateModelData>(` - #### WhitePaper - - * "WhitePaper name: baseRate: multiplier:" - The WhitePaper interest rate - * E.g. "InterestRateModel Deploy WhitePaper MyInterestRateModel 0.05 0.2" - 5% base rate and 20% utilization multiplier - `, - "WhitePaper", - [ - new Arg("name", getStringV), - new Arg("baseRate", getExpNumberV), - new Arg("multiplier", getExpNumberV) - ], - async (world, {name, baseRate, multiplier}) => ({ - invokation: await WhitePaperInterestRateModel.deploy(world, from, [baseRate.encode(), multiplier.encode()]), - name: name.val, - contract: "WhitePaperInterestRateModel", - description: `WhitePaper baseRate=${baseRate.encode().toString()} multiplier=${multiplier.encode().toString()}`, - base: baseRate.encode().toString(), - slope: multiplier.encode().toString() - }) - ), - - new Fetcher<{name: StringV, baseRate: NumberV, multiplier: NumberV, jump: NumberV, kink: NumberV}, InterestRateModelData>(` - #### JumpRateModel - - * "JumpRateModel name: baseRate: multiplier: jump: kink:" - The Jump interest rate - * E.g. "InterestRateModel Deploy JumpRateModel MyInterestRateModel 0.05 0.2 2 0.90" - 5% base rate and 20% utilization multiplier and 200% multiplier at 90% utilization - `, - "JumpRateModel", - [ - new Arg("name", getStringV), - new Arg("baseRate", getExpNumberV), - new Arg("multiplier", getExpNumberV), - new Arg("jump", getExpNumberV), - new Arg("kink", getExpNumberV) - ], - async (world, {name, baseRate, multiplier, jump, kink}) => ({ - invokation: await JumpRateModel.deploy(world, from, [baseRate.encode(), multiplier.encode(), jump.encode(), kink.val]), - name: name.val, - contract: "JumpRateModel", - description: `JumpRateModel baseRate=${baseRate.encode().toString()} multiplier=${multiplier.encode().toString()} jump=${jump.encode().toString()} kink=${kink.encode().toString()}`, - base: baseRate.encode().toString(), - slope: multiplier.encode().toString(), - jump: jump.encode().toString(), - kink: kink.encode().toString() - }) - ), - - new Fetcher<{name: StringV, baseRate: NumberV, multiplier: NumberV, jump: NumberV, kink: NumberV, owner: AddressV}, InterestRateModelData>(` - #### JumpRateModelV2 - - * "JumpRateModelV2 name: baseRate: multiplier: jump: kink: owner:
" - The v2 Jump interest rate model - * E.g. "InterestRateModel Deploy JumpRateModelV2 MyInterestRateModel 0.05 0.2 2 0.90 (Address Timelock)" - 5% base rate and 20% + 5% interest at kink and 200% multiplier starting at the kink of 90% utilization - `, - "JumpRateModelV2", - [ - new Arg("name", getStringV), - new Arg("baseRate", getExpNumberV), - new Arg("multiplier", getExpNumberV), - new Arg("jump", getExpNumberV), - new Arg("kink", getExpNumberV), - new Arg("owner", getAddressV), - ], - async (world, {name, baseRate, multiplier, jump, kink, owner}) => ({ - invokation: await JumpRateModelV2.deploy(world, from, [baseRate.encode(), multiplier.encode(), jump.encode(), kink.encode(), owner.val]), - name: name.val, - contract: "JumpRateModelV2", - description: `JumpRateModelV2 baseRate=${baseRate.encode().toString()} multiplier=${multiplier.encode().toString()} jump=${jump.encode().toString()} kink=${kink.encode().toString()}`, - base: baseRate.encode().toString(), - slope: multiplier.encode().toString(), - jump: jump.encode().toString(), - kink: kink.encode().toString(), - owner: owner.val, - }) - ), - - new Fetcher<{name: StringV, baseRate: NumberV, multiplier: NumberV, jump: NumberV, kink: NumberV, owner: AddressV}, InterestRateModelData>(` - #### LegacyJumpRateModelV2 - - * "LegacyJumpRateModelV2 name: baseRate: multiplier: jump: kink: owner:
" - The legacy v2 Jump interest rate model - * E.g. "InterestRateModel Deploy LegacyJumpRateModelV2 MyInterestRateModel 0.05 0.2 2 0.90 (Address Timelock)" - 5% base rate and 20% + 5% interest at kink and 200% multiplier starting at the kink of 90% utilization - `, - "LegacyJumpRateModelV2", - [ - new Arg("name", getStringV), - new Arg("baseRate", getExpNumberV), - new Arg("multiplier", getExpNumberV), - new Arg("jump", getExpNumberV), - new Arg("kink", getExpNumberV), - new Arg("owner", getAddressV), - ], - async (world, {name, baseRate, multiplier, jump, kink, owner}) => ({ - invokation: await LegacyJumpRateModelV2.deploy(world, from, [baseRate.encode(), multiplier.encode(), jump.encode(), kink.encode(), owner.val]), - name: name.val, - contract: "LegacyJumpRateModelV2", - description: `LegacyJumpRateModelV2 baseRate=${baseRate.encode().toString()} multiplier=${multiplier.encode().toString()} jump=${jump.encode().toString()} kink=${kink.encode().toString()}`, - base: baseRate.encode().toString(), - slope: multiplier.encode().toString(), - jump: jump.encode().toString(), - kink: kink.encode().toString(), - owner: owner.val, - }) - ), - - new Fetcher<{name: StringV, jump: NumberV, kink: NumberV, pot: AddressV, jug: AddressV, owner: AddressV}, InterestRateModelData>(` - #### DAIInterestRateModel - - * "DAIInterestRateModel name: jump: kink: pot:
jug:
owner:
" - The DAI interest rate model - * E.g. "InterestRateModel Deploy DAIInterestRateModel MyInterestRateModel (Exp 2) (Exp 0.9) PotAddress JugAddress" Timelock - 200% multiplier at 90% utilization - `, - "DAIInterestRateModel", - [ - new Arg("name", getStringV), - new Arg("jump", getExpNumberV), - new Arg("kink", getExpNumberV), - new Arg("pot", getAddressV), - new Arg("jug", getAddressV), - new Arg("owner", getAddressV), - ], - async (world, {name, jump, kink, pot, jug, owner}) => ({ - invokation: await DAIInterestRateModel.deploy(world, from, [jump.encode(), kink.encode(), pot.val, jug.val, owner.val]), - name: name.val, - contract: "DAIInterestRateModel", - description: `DAIInterestRateModel jump=${jump.encode().toString()} kink=${kink.encode().toString()} pot=${pot.val} jug=${jug.val} owner=${owner.val}`, - jump: jump.encode().toString(), - kink: kink.encode().toString(), - pot: pot.val, - jug: jug.val, - owner: owner.val - }) - ) - ]; - - let interestRateModelData = await getFetcherValue("DeployInterestRateModel", fetchers, world, event); - let invokation = interestRateModelData.invokation; - delete interestRateModelData.invokation; - - if (invokation.error) { - throw invokation.error; - } - const interestRateModel = invokation.value!; - interestRateModelData.address = interestRateModel._address; - - world = await storeAndSaveContract( - world, - interestRateModel, - interestRateModelData.name, - invokation, - [ - { - index: ['InterestRateModel', interestRateModelData.name], - data: interestRateModelData - } - ] - ); - - return {world, interestRateModel, interestRateModelData}; -} diff --git a/scenario/src/Builder/PriceOracleBuilder.ts b/scenario/src/Builder/PriceOracleBuilder.ts deleted file mode 100644 index 5888bd623..000000000 --- a/scenario/src/Builder/PriceOracleBuilder.ts +++ /dev/null @@ -1,165 +0,0 @@ -import {Event} from '../Event'; -import {addAction, World} from '../World'; -import {PriceOracle} from '../Contract/PriceOracle'; -import {Invokation, invoke} from '../Invokation'; -import { - getAddressV, - getExpNumberV, - getStringV -} from '../CoreValue'; -import { - AddressV, - EventV, - NothingV, - NumberV, - StringV -} from '../Value'; -import {Arg, Fetcher, getFetcherValue} from '../Command'; -import {storeAndSaveContract} from '../Networks'; -import {getContract, getTestContract} from '../Contract'; - -const FixedPriceOracle = getTestContract('FixedPriceOracle'); -const SimplePriceOracle = getContract('SimplePriceOracle'); -const AnchorPriceOracle = getContract('AnchorPriceOracle'); -const NotPriceOracle = getTestContract('NotPriceOracle'); -const PriceOracleInterface = getTestContract('PriceOracle'); - -export interface PriceOracleData { - invokation?: Invokation, - contract?: PriceOracle, - description: string, - address?: string -} - -export async function buildPriceOracle(world: World, from: string, event: Event): Promise<{world: World, priceOracle: PriceOracle, priceOracleData: PriceOracleData}> { - const fetchers = [ - new Fetcher<{price: NumberV}, PriceOracleData>(` - #### Fixed - - * "Fixed price:" - Fixed price - * E.g. "PriceOracle Deploy (Fixed 20.0)" - `, - "Fixed", - [ - new Arg("price", getExpNumberV), - ], - async (world, {price}) => { - return { - invokation: await FixedPriceOracle.deploy(world, from, [price.val]), - description: "Fixed Price Oracle" - }; - } - ), - new Fetcher<{}, PriceOracleData>(` - #### Simple - - * "Simple" - The a simple price oracle that has a harness price setter - * E.g. "PriceOracle Deploy Simple" - `, - "Simple", - [], - async (world, {}) => { - return { - invokation: await SimplePriceOracle.deploy(world, from, []), - description: "Simple Price Oracle" - }; - } - ), - new Fetcher<{poster: AddressV}, PriceOracleData>(` - #### Anchor - - * "Anchor " - The anchor price oracle that caps price movements to anchors - * E.g. "PriceOracle Deploy Anchor 0x..." - `, - "Anchor", - [ - new Arg("poster", getAddressV) - ], - async (world, {poster}) => { - return { - invokation: await AnchorPriceOracle.deploy(world, from, [poster.val]), - description: "Anchor Price Oracle", - poster: poster.val - }; - } - ), - new Fetcher<{}, PriceOracleData>(` - #### NotPriceOracle - - * "NotPriceOracle" - Not actually a price oracle - * E.g. "PriceOracle Deploy NotPriceOracle" - `, - "NotPriceOracle", - [], - async (world, {}) => { - return { - invokation: await NotPriceOracle.deploy(world, from, []), - description: "Not a Price Oracle" - }; - } - ) - ]; - - let priceOracleData = await getFetcherValue("DeployPriceOracle", fetchers, world, event); - let invokation = priceOracleData.invokation!; - delete priceOracleData.invokation; - - if (invokation.error) { - throw invokation.error; - } - const priceOracle = invokation.value!; - priceOracleData.address = priceOracle._address; - - world = await storeAndSaveContract( - world, - priceOracle, - 'PriceOracle', - invokation, - [ - { index: ['PriceOracle'], data: priceOracleData } - ] - ); - - return {world, priceOracle, priceOracleData}; -} - -export async function setPriceOracle(world: World, event: Event): Promise<{world: World, priceOracle: PriceOracle, priceOracleData: PriceOracleData}> { - const fetchers = [ - new Fetcher<{address: AddressV, description: StringV}, PriceOracleData>(` - #### Standard - - * "Standard" - The standard price oracle - * E.g. "PriceOracle Set Standard \"0x...\" \"Standard Price Oracle\"" - `, - "Standard", - [ - new Arg("address", getAddressV), - new Arg("description", getStringV), - ], - async (world, {address, description}) => { - return { - contract: await PriceOracleInterface.at(world, address.val), - description: description.val - }; - } - ) - ]; - - let priceOracleData = await getFetcherValue("SetPriceOracle", fetchers, world, event); - let priceOracle = priceOracleData.contract!; - delete priceOracleData.contract; - - priceOracleData.address = priceOracle._address; - - world = await storeAndSaveContract( - world, - priceOracle, - 'PriceOracle', - null, - [ - { index: ['PriceOracle'], data: priceOracleData } - ] - ); - - return {world, priceOracle, priceOracleData}; -} diff --git a/scenario/src/Builder/PriceOracleProxyBuilder.ts b/scenario/src/Builder/PriceOracleProxyBuilder.ts deleted file mode 100644 index 5807371ba..000000000 --- a/scenario/src/Builder/PriceOracleProxyBuilder.ts +++ /dev/null @@ -1,77 +0,0 @@ -import {Event} from '../Event'; -import {addAction, World} from '../World'; -import {PriceOracleProxy} from '../Contract/PriceOracleProxy'; -import {Invokation} from '../Invokation'; -import {Arg, Fetcher, getFetcherValue} from '../Command'; -import {storeAndSaveContract} from '../Networks'; -import {getContract} from '../Contract'; -import {getAddressV} from '../CoreValue'; -import {AddressV} from '../Value'; - -const PriceOracleProxyContract = getContract("PriceOracleProxy"); - -export interface PriceOracleProxyData { - invokation?: Invokation, - contract?: PriceOracleProxy, - description: string, - address?: string, - cETH: string, - cUSDC: string, - cDAI: string -} - -export async function buildPriceOracleProxy(world: World, from: string, event: Event): Promise<{world: World, priceOracleProxy: PriceOracleProxy, invokation: Invokation}> { - const fetchers = [ - new Fetcher<{guardian: AddressV, priceOracle: AddressV, cETH: AddressV, cUSDC: AddressV, cSAI: AddressV, cDAI: AddressV, cUSDT: AddressV}, PriceOracleProxyData>(` - #### Price Oracle Proxy - - * "Deploy " - The Price Oracle which proxies to a backing oracle - * E.g. "PriceOracleProxy Deploy Admin (PriceOracle Address) cETH cUSDC cSAI cDAI cUSDT" - `, - "PriceOracleProxy", - [ - new Arg("guardian", getAddressV), - new Arg("priceOracle", getAddressV), - new Arg("cETH", getAddressV), - new Arg("cUSDC", getAddressV), - new Arg("cSAI", getAddressV), - new Arg("cDAI", getAddressV), - new Arg("cUSDT", getAddressV) - ], - async (world, {guardian, priceOracle, cETH, cUSDC, cSAI, cDAI, cUSDT}) => { - return { - invokation: await PriceOracleProxyContract.deploy(world, from, [guardian.val, priceOracle.val, cETH.val, cUSDC.val, cSAI.val, cDAI.val, cUSDT.val]), - description: "Price Oracle Proxy", - cETH: cETH.val, - cUSDC: cUSDC.val, - cSAI: cSAI.val, - cDAI: cDAI.val, - cUSDT: cUSDT.val - }; - }, - {catchall: true} - ) - ]; - - let priceOracleProxyData = await getFetcherValue("DeployPriceOracleProxy", fetchers, world, event); - let invokation = priceOracleProxyData.invokation!; - delete priceOracleProxyData.invokation; - - if (invokation.error) { - throw invokation.error; - } - const priceOracleProxy = invokation.value!; - priceOracleProxyData.address = priceOracleProxy._address; - - world = await storeAndSaveContract( - world, - priceOracleProxy, - 'PriceOracleProxy', - invokation, - [ - { index: ['PriceOracleProxy'], data: priceOracleProxyData } - ] - ); - - return {world, priceOracleProxy, invokation}; -} diff --git a/scenario/src/Builder/UnitrollerBuilder.ts b/scenario/src/Builder/UnitrollerBuilder.ts deleted file mode 100644 index d934dec9f..000000000 --- a/scenario/src/Builder/UnitrollerBuilder.ts +++ /dev/null @@ -1,58 +0,0 @@ -import {Event} from '../Event'; -import {addAction, World} from '../World'; -import {Unitroller} from '../Contract/Unitroller'; -import {Invokation} from '../Invokation'; -import {Arg, Fetcher, getFetcherValue} from '../Command'; -import {storeAndSaveContract} from '../Networks'; -import {getContract} from '../Contract'; - -const UnitrollerContract = getContract("Unitroller"); - -export interface UnitrollerData { - invokation: Invokation, - description: string, - address?: string -} - -export async function buildUnitroller(world: World, from: string, event: Event): Promise<{world: World, unitroller: Unitroller, unitrollerData: UnitrollerData}> { - const fetchers = [ - new Fetcher<{}, UnitrollerData>(` - #### Unitroller - - * "" - The Upgradable Comptroller - * E.g. "Unitroller Deploy" - `, - "Unitroller", - [], - async (world, {}) => { - return { - invokation: await UnitrollerContract.deploy(world, from, []), - description: "Unitroller" - }; - }, - {catchall: true} - ) - ]; - - let unitrollerData = await getFetcherValue("DeployUnitroller", fetchers, world, event); - let invokation = unitrollerData.invokation; - delete unitrollerData.invokation; - - if (invokation.error) { - throw invokation.error; - } - const unitroller = invokation.value!; - unitrollerData.address = unitroller._address; - - world = await storeAndSaveContract( - world, - unitroller, - 'Unitroller', - invokation, - [ - { index: ['Unitroller'], data: unitrollerData } - ] - ); - - return {world, unitroller, unitrollerData}; -} diff --git a/scenario/src/Command.ts b/scenario/src/Command.ts deleted file mode 100644 index 56206c40b..000000000 --- a/scenario/src/Command.ts +++ /dev/null @@ -1,248 +0,0 @@ -import {Event} from './Event'; -import {World} from './World'; -import {mustArray} from './Utils'; -import {NothingV} from './Value'; - -interface ArgOpts { - default?: T | T[] - implicit?: boolean - variadic?: boolean - mapped?: boolean - nullable?: boolean - rescue?: T -} - -export class Arg { - name: string - type: any - getter: (World, Event?) => Promise - defaultValue: T | T[] | undefined - implicit: boolean - variadic: boolean - mapped: boolean - nullable: boolean - rescue: T | undefined - - constructor(name: string, getter: (World, Event?) => Promise, opts = >{}) { - this.name = name; - this.getter = getter; - this.defaultValue = opts.default; - this.implicit = !!opts.implicit; - this.variadic = !!opts.variadic; - this.mapped = !!opts.mapped; - this.nullable = !!opts.nullable; - this.rescue = opts.rescue; - } -} - -interface ExpressionOpts { - namePos?: number - catchall?: boolean - subExpressions?: Expression[] -} - -export abstract class Expression { - doc: string - name: string - args: Arg[] - namePos: number - catchall: boolean - subExpressions: Expression[] - - constructor(doc: string, name: string, args: Arg[], opts: ExpressionOpts={}) { - this.doc = Command.cleanDoc(doc); - this.name = name; - this.args = args; - this.namePos = opts.namePos || 0; - this.catchall = opts.catchall || false; - this.subExpressions = opts.subExpressions || []; - } - - getNameArgs(event: Event): [string | null, Event] { - // Unwrap double-wrapped expressions e.g. [[Exactly, "1.0"]] -> ["Exactly", "1.0"] - if (Array.isArray(event) && event.length === 1 && Array.isArray(event[0])) { - const [eventInner] = event; - - return this.getNameArgs(eventInner); - } - - // Let's allow single-length complex expressions to be passed without parens e.g. "True" -> ["True"] - if (!Array.isArray(event)) { - event = [event]; - } - - if (this.catchall) { - return [this.name, event]; - } else { - let args = event.slice(); - let [name] = args.splice(this.namePos, 1); - - if (Array.isArray(name)) { - return [null, event]; - } - - return [name, args]; - } - } - - matches(event: Event): boolean { - if (this.catchall) { - return true; - } - - const [name, _args] = this.getNameArgs(event); - - return !!name && name.toLowerCase().trim() === this.name.toLowerCase().trim(); - } - - async getArgs(world: World, event: Event): Promise { - const [_name, eventArgs] = this.getNameArgs(event); - - let initialAcc = <{currArgs: Args, currEvents: Event}>{currArgs: {}, currEvents: eventArgs}; - - const {currArgs: args, currEvents: restEvent} = await this.args.reduce(async (acc, arg) => { - let {currArgs, currEvents} = await acc; - let val: any; - let restEventArgs: Event; - - if (arg.nullable && currEvents.length === 0) { // Note this is zero-length string or zero-length array - val = new NothingV(); - restEventArgs = currEvents; - } else if (arg.variadic) { - if (arg.mapped) { - // If mapped, mapped the function over each event arg - val = await Promise.all(currEvents.map((event) => arg.getter(world, event))); - } else { - val = await arg.getter(world, currEvents); - } - restEventArgs = []; - } else if (arg.implicit) { - val = await arg.getter(world); - restEventArgs = currEvents; - } else { - let eventArg; - - [eventArg, ...restEventArgs] = currEvents; - - if (eventArg === undefined) { - if (arg.defaultValue !== undefined) { - val = arg.defaultValue; - } else { - throw new Error(`Missing argument ${arg.name} when processing ${this.name}`); - } - } else { - try { - if (arg.mapped) { - val = await await Promise.all(mustArray(eventArg).map((el) => arg.getter(world, el))); - } else { - val = await arg.getter(world, eventArg); - } - } catch (err) { - if (arg.rescue) { - // Rescue is meant to allow Gate to work for checks that - // fail due to the missing components, e.g.: - // `Gate (CToken Eth Address) (... deploy cToken)` - // could be used to deploy a cToken if it doesn't exist, but - // since there is no CToken, that check would raise (when we'd - // hope it just returns null). So here, we allow our code to rescue - // errors and recover, but we need to be smarter about catching specific - // errors instead of all errors. For now, to assist debugging, we may print - // any error that comes up, even if it was intended. - // world.printer.printError(err); - - val = arg.rescue; - } else { - throw err; - } - } - } - } - - let newArgs = { - ...currArgs, - [arg.name]: val - }; - - return { - currArgs: newArgs, - currEvents: restEventArgs - }; - }, Promise.resolve(initialAcc)); - - if (restEvent.length !== 0) { - throw new Error(`Found extra args: ${restEvent.toString()} when processing ${this.name}`); - } - - return args; - } - - static cleanDoc(doc: string): string { - return doc.replace(/^\s+/mg, '').replace(/"/g, '`'); - } -} - -export class Command extends Expression { - processor: (world: World, from: string, args: Args) => Promise - requireFrom: boolean = true; - - constructor(doc: string, name: string, args: Arg[], processor: (world: World, from: string, args: Args) => Promise, opts: ExpressionOpts={}) { - super(doc, name, args, opts); - - this.processor = processor; - } - - async process(world: World, from: string | null, event: Event): Promise { - let args = await this.getArgs(world, event); - if (this.requireFrom) { - if (!from) { - throw new Error(`From required but not given for ${this.name}. Please set a default alias or open unlocked account`); - } - - return await this.processor(world, from, args); - } else { - return await this.processor(world, null, args); - } - } -} - -export class View extends Command { - constructor(doc: string, name: string, args: Arg[], processor: (world: World, args: Args) => Promise, opts: ExpressionOpts={}) { - super(doc, name, args, (world, from, args) => processor(world, args), opts); - this.requireFrom = false; - } -} - -export class Fetcher extends Expression { - fetcher: (world: World, args: Args) => Promise - - constructor(doc: string, name: string, args: Arg[], fetcher: (world: World, args: Args) => Promise, opts: ExpressionOpts={}) { - super(doc, name, args, opts); - - this.fetcher = fetcher; - } - - async fetch(world: World, event: Event): Promise { - let args = await this.getArgs(world, event); - return await this.fetcher(world, args); - } -} - -export async function processCommandEvent(type: string, commands: Command[], world: World, event: Event, from: string | null): Promise { - let matchingCommand = commands.find((command) => command.matches(event)); - - if (!matchingCommand) { - throw new Error(`Found unknown ${type} event type ${event.toString()}`); - } - - return matchingCommand.process(world, from, event); -} - -export async function getFetcherValue(type: string, fetchers: Fetcher[], world: World, event: Event): Promise { - let matchingFetcher = fetchers.find((fetcher) => fetcher.matches(event)); - - if (!matchingFetcher) { - throw new Error(`Found unknown ${type} value type ${JSON.stringify(event)}`); - } - - return matchingFetcher.fetch(world, event); -} diff --git a/scenario/src/Completer.ts b/scenario/src/Completer.ts deleted file mode 100644 index 35f90782b..000000000 --- a/scenario/src/Completer.ts +++ /dev/null @@ -1,36 +0,0 @@ -import {World} from './World'; -import {Macros} from './Macro'; - -// TODO: Get smarter about storing actions as data -const actions: string[] = [ - "Read", - "Assert", - "FastForward", - "Inspect", - "Debug", - "From", - "Invariant", - "Comptroller", - "cToken", - "Erc20", -]; - -function caseInsensitiveSort(a: string, b: string): number { - let A = a.toUpperCase(); - let B = b.toUpperCase(); - - if (A < B) { - return -1; - } else if (A > B) { - return 1; - } else { - return 0; - } -} - -export function complete(world: World, macros: Macros, line: string) { - let allActions = actions.concat(Object.keys(macros)).sort(caseInsensitiveSort); - const hits = allActions.filter((c) => c.toLowerCase().startsWith(line.toLowerCase())); - - return [hits, line]; -} diff --git a/scenario/src/Contract.ts b/scenario/src/Contract.ts deleted file mode 100644 index 03b4ba14a..000000000 --- a/scenario/src/Contract.ts +++ /dev/null @@ -1,207 +0,0 @@ -import * as path from 'path'; -import * as crypto from 'crypto'; -import { World } from './World'; -import { Invokation } from './Invokation'; -import { readFile } from './File'; -import { AbiItem } from 'web3-utils'; - -export interface Raw { - data: string - topics: string[] -} - -export interface Event { - event: string - signature: string | null - address: string - returnValues: object - logIndex: number - transactionIndex: number - blockHash: string - blockNumber: number - raw: Raw -} - -export interface Contract { - address: string - _address: string - name: string - methods: any - _jsonInterface: AbiItem[] - constructorAbi?: string - getPastEvents: (event: string, options: { filter: object, fromBlock: number, toBlock: number | string }) => Event[] -} - -function randomAddress(): string { - return crypto.randomBytes(20).toString('hex'); -} - -class ContractStub { - name: string; - test: boolean - - constructor(name: string, test: boolean) { - this.name = name; - this.test = test; - } - - async deploy(world: World, from: string, args: any[]): Promise> { - // XXXS Consider opts - // ( world.web3.currentProvider && typeof(world.web3.currentProvider) !== 'string' && world.web3.currentProvider.opts ) || - const opts = { from: from }; - - let invokationOpts = world.getInvokationOpts(opts); - - const networkContractABI = await world.saddle.abi(this.name); - const constructorAbi = networkContractABI.find((x) => x.type === 'constructor'); - let inputs; - - if (constructorAbi) { - inputs = constructorAbi.inputs; - } else { - inputs = []; - } - - try { - let contract; - let receipt; - - if (world.dryRun) { - let addr = randomAddress(); - console.log(`Dry run: Deploying ${this.name} at fake address ${addr}`); - contract = new world.web3.eth.Contract(networkContractABI, addr) - receipt = { - blockNumber: -1, - transactionHash: "0x", - events: {} - }; - } else { - ({ contract, receipt } = await world.saddle.deployFull(this.name, args, invokationOpts, world.web3)); - contract.constructorAbi = world.web3.eth.abi.encodeParameters(inputs, args);; - } - - return new Invokation(contract, receipt, null, null); - } catch (err) { - return new Invokation(null, null, err, null); - } - } - - async at(world: World, address: string): Promise { - const networkContractABI = await world.saddle.abi(this.name); - - // XXXS unknown? - return (new world.web3.eth.Contract(networkContractABI, address)); - } -} - -export function getContract(name: string): ContractStub { - return new ContractStub(name, false); -} - -export function getTestContract(name: string): ContractStub { - return new ContractStub(name, true); -} - -export function setContractName(name: string, contract: Contract): Contract { - contract.name = name; - - return contract; -} - -export async function getPastEvents(world: World, contract: Contract, name: string, event: string, filter: object = {}): Promise { - const block = world.getIn(['contractData', 'Blocks', name]); - if (!block) { - throw new Error(`Cannot get events when missing deploy block for ${name}`); - } - - return await contract.getPastEvents(event, { filter: filter, fromBlock: block, toBlock: 'latest' }); -} - -export async function decodeCall(world: World, contract: Contract, input: string): Promise { - if (input.slice(0, 2) === '0x') { - input = input.slice(2); - } - - let functionSignature = input.slice(0, 8); - let argsEncoded = input.slice(8); - - let funsMapped = contract._jsonInterface.reduce((acc, fun) => { - if (fun.type === 'function') { - let functionAbi = `${fun.name}(${(fun.inputs || []).map((i) => i.type).join(',')})`; - let sig = world.web3.utils.sha3(functionAbi).slice(2, 10); - - return { - ...acc, - [sig]: fun - }; - } else { - return acc; - } - }, {}); - - let abi = funsMapped[functionSignature]; - - if (!abi) { - throw new Error(`Cannot find function matching signature ${functionSignature}`); - } - - let decoded = world.web3.eth.abi.decodeParameters(abi.inputs, argsEncoded); - - const args = abi.inputs.map((input) => { - return `${input.name}=${decoded[input.name]}`; - }); - world.printer.printLine(`\n${contract.name}.${abi.name}(\n\t${args.join("\n\t")}\n)`); - - return world; -} - -// XXXS Handle -async function getNetworkContract(world: World, name: string): Promise<{ abi: any[], bin: string }> { - let basePath = world.basePath || "" - let network = world.network || "" - - let pizath = (name, ext) => path.join(basePath, '.build', `contracts.json`); - let abi, bin; - if (network == 'coverage') { - let json = await readFile(world, pizath(name, 'json'), null, JSON.parse); - abi = json.abi; - bin = json.bytecode.substr(2); - } else { - let { networkContracts } = await getNetworkContracts(world); - let networkContract = networkContracts[name]; - abi = JSON.parse(networkContract.abi); - bin = networkContract.bin; - } - if (!bin) { - throw new Error(`no bin for contract ${name} ${network}`) - } - return { - abi: abi, - bin: bin - } -} - -export async function getNetworkContracts(world: World): Promise<{ networkContracts: object, version: string }> { - let basePath = world.basePath || "" - let network = world.network || "" - - let contractsPath = path.join(basePath, '.build', `contracts.json`) - let fullContracts = await readFile(world, contractsPath, null, JSON.parse); - let version = fullContracts.version; - let networkContracts = Object.entries(fullContracts.contracts).reduce((acc, [k, v]) => { - let [path, contractName] = k.split(':'); - - return { - ...acc, - [contractName]: { - ...v, /// XXXS TODO - path: path - } - }; - }, {}); - - return { - networkContracts, - version - }; -} diff --git a/scenario/src/Contract/AnchoredView.ts b/scenario/src/Contract/AnchoredView.ts deleted file mode 100644 index 84bdf44b9..000000000 --- a/scenario/src/Contract/AnchoredView.ts +++ /dev/null @@ -1,10 +0,0 @@ -import {Contract} from '../Contract'; -import {Callable} from '../Invokation'; - -interface AnchoredViewMethods { - getUnderlyingPrice(asset: string): Callable -} - -export interface AnchoredView extends Contract { - methods: AnchoredViewMethods -} diff --git a/scenario/src/Contract/CErc20Delegate.ts b/scenario/src/Contract/CErc20Delegate.ts deleted file mode 100644 index a805103f9..000000000 --- a/scenario/src/Contract/CErc20Delegate.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { Contract } from '../Contract'; -import { Sendable } from '../Invokation'; -import { CTokenMethods, CTokenScenarioMethods } from './CToken'; - -interface CErc20DelegateMethods extends CTokenMethods { - _becomeImplementation(data: string): Sendable; - _resignImplementation(): Sendable; -} - -interface CErc20DelegateScenarioMethods extends CTokenScenarioMethods { - _becomeImplementation(data: string): Sendable; - _resignImplementation(): Sendable; -} - -export interface CErc20Delegate extends Contract { - methods: CErc20DelegateMethods; - name: string; -} - -export interface CErc20DelegateScenario extends Contract { - methods: CErc20DelegateScenarioMethods; - name: string; -} diff --git a/scenario/src/Contract/CErc20Delegator.ts b/scenario/src/Contract/CErc20Delegator.ts deleted file mode 100644 index 8787c414e..000000000 --- a/scenario/src/Contract/CErc20Delegator.ts +++ /dev/null @@ -1,28 +0,0 @@ -import { Contract } from '../Contract'; -import { Callable, Sendable } from '../Invokation'; -import { CTokenMethods } from './CToken'; -import { encodedNumber } from '../Encoding'; - -interface CErc20DelegatorMethods extends CTokenMethods { - implementation(): Callable; - _setImplementation( - implementation_: string, - allowResign: boolean, - becomImplementationData: string - ): Sendable; -} - -interface CErc20DelegatorScenarioMethods extends CErc20DelegatorMethods { - setTotalBorrows(amount: encodedNumber): Sendable; - setTotalReserves(amount: encodedNumber): Sendable; -} - -export interface CErc20Delegator extends Contract { - methods: CErc20DelegatorMethods; - name: string; -} - -export interface CErc20DelegatorScenario extends Contract { - methods: CErc20DelegatorMethods; - name: string; -} diff --git a/scenario/src/Contract/CToken.ts b/scenario/src/Contract/CToken.ts deleted file mode 100644 index f21086a2c..000000000 --- a/scenario/src/Contract/CToken.ts +++ /dev/null @@ -1,66 +0,0 @@ -import { Contract } from '../Contract'; -import { Callable, Sendable } from '../Invokation'; -import { encodedNumber } from '../Encoding'; - -export interface CTokenMethods { - _resignImplementation(): Sendable; - balanceOfUnderlying(address: string): Callable; - borrowBalanceCurrent(address: string): Callable; - borrowBalanceStored(address: string): Callable; - totalBorrows(): Callable; - totalBorrowsCurrent(): Callable; - totalReserves(): Callable; - reserveFactorMantissa(): Callable; - comptroller(): Callable; - exchangeRateStored(): Sendable; - exchangeRateCurrent(): Callable; - getCash(): Callable; - accrueInterest(): Sendable; - mint(): Sendable; - mint(amount: encodedNumber): Sendable; - redeem(amount: encodedNumber): Sendable; - redeemUnderlying(amount: encodedNumber): Sendable; - borrow(amount: encodedNumber): Sendable; - repayBorrow(): Sendable; - repayBorrow(amount: encodedNumber): Sendable; - repayBorrowBehalf(amount: string): Sendable; - repayBorrowBehalf(address: string, amount: encodedNumber): Sendable; - liquidateBorrow(borrower: string, cTokenCollateral: string): Sendable; - liquidateBorrow(borrower: string, repayAmount: encodedNumber, cTokenCollateral: string): Sendable; - seize(liquidator: string, borrower: string, seizeTokens: encodedNumber): Sendable; - evilSeize( - treasure: string, - liquidator: string, - borrower: string, - seizeTokens: encodedNumber - ): Sendable; - _addReserves(amount: encodedNumber): Sendable; - _reduceReserves(amount: encodedNumber): Sendable; - _setReserveFactor(reserveFactor: encodedNumber): Sendable; - _setInterestRateModel(address: string): Sendable; - _setComptroller(address: string): Sendable; - underlying(): Callable; - interestRateModel(): Callable; - borrowRatePerBlock(): Callable; - donate(): Sendable; - admin(): Callable; - pendingAdmin(): Callable; - _setPendingAdmin(address: string): Sendable; - _acceptAdmin(): Sendable; - sweepToken(token: string): Sendable; -} - -export interface CTokenScenarioMethods extends CTokenMethods { - setTotalBorrows(amount: encodedNumber): Sendable; - setTotalReserves(amount: encodedNumber): Sendable; -} - -export interface CToken extends Contract { - methods: CTokenMethods; - name: string; -} - -export interface CTokenScenario extends Contract { - methods: CTokenScenarioMethods; - name: string; -} diff --git a/scenario/src/Contract/Comp.ts b/scenario/src/Contract/Comp.ts deleted file mode 100644 index 53e1692a3..000000000 --- a/scenario/src/Contract/Comp.ts +++ /dev/null @@ -1,41 +0,0 @@ -import { Contract } from '../Contract'; -import { encodedNumber } from '../Encoding'; -import { Callable, Sendable } from '../Invokation'; - -interface Checkpoint { - fromBlock: number; - votes: number; -} - -export interface CompMethods { - name(): Callable; - symbol(): Callable; - decimals(): Callable; - totalSupply(): Callable; - balanceOf(address: string): Callable; - allowance(owner: string, spender: string): Callable; - approve(address: string, amount: encodedNumber): Sendable; - transfer(address: string, amount: encodedNumber): Sendable; - transferFrom(owner: string, spender: string, amount: encodedNumber): Sendable; - checkpoints(account: string, index: number): Callable; - numCheckpoints(account: string): Callable; - delegate(account: string): Sendable; - getCurrentVotes(account: string): Callable; - getPriorVotes(account: string, blockNumber: encodedNumber): Callable; - setBlockNumber(blockNumber: encodedNumber): Sendable; -} - -export interface CompScenarioMethods extends CompMethods { - transferScenario(destinations: string[], amount: encodedNumber): Sendable; - transferFromScenario(froms: string[], amount: encodedNumber): Sendable; -} - -export interface Comp extends Contract { - methods: CompMethods; - name: string; -} - -export interface CompScenario extends Contract { - methods: CompScenarioMethods; - name: string; -} diff --git a/scenario/src/Contract/Comptroller.ts b/scenario/src/Contract/Comptroller.ts deleted file mode 100644 index 287127287..000000000 --- a/scenario/src/Contract/Comptroller.ts +++ /dev/null @@ -1,81 +0,0 @@ -import {Contract} from '../Contract'; -import {Callable, Sendable} from '../Invokation'; -import {encodedNumber} from '../Encoding'; - -interface ComptrollerMethods { - getAccountLiquidity(string): Callable<{0: number, 1: number, 2: number}> - getHypotheticalAccountLiquidity(account: string, asset: string, redeemTokens: encodedNumber, borrowAmount: encodedNumber): Callable<{0: number, 1: number, 2: number}> - membershipLength(string): Callable - checkMembership(user: string, cToken: string): Callable - getAssetsIn(string): Callable - admin(): Callable - oracle(): Callable - maxAssets(): Callable - liquidationIncentiveMantissa(): Callable - closeFactorMantissa(): Callable - getBlockNumber(): Callable - collateralFactor(string): Callable - markets(string): Callable<{0: boolean, 1: number, 2?: boolean}> - _setMintPaused(bool): Sendable - _setMaxAssets(encodedNumber): Sendable - _setLiquidationIncentive(encodedNumber): Sendable - _supportMarket(string): Sendable - _setPriceOracle(string): Sendable - _setCollateralFactor(string, encodedNumber): Sendable - _setCloseFactor(encodedNumber): Sendable - enterMarkets(markets: string[]): Sendable - exitMarket(market: string): Sendable - fastForward(encodedNumber): Sendable - _setPendingImplementation(string): Sendable - comptrollerImplementation(): Callable - unlist(string): Sendable - admin(): Callable - pendingAdmin(): Callable - _setPendingAdmin(string): Sendable - _acceptAdmin(): Sendable - _setPauseGuardian(string): Sendable - pauseGuardian(): Callable - _setMintPaused(market: string, string): Sendable - _setBorrowPaused(market: string, string): Sendable - _setTransferPaused(string): Sendable - _setSeizePaused(string): Sendable - _mintGuardianPaused(): Callable - _borrowGuardianPaused(): Callable - transferGuardianPaused(): Callable - seizeGuardianPaused(): Callable - mintGuardianPaused(market: string): Callable - borrowGuardianPaused(market: string): Callable - _addCompMarkets(markets: string[]): Sendable - _dropCompMarket(market: string): Sendable - getCompMarkets(): Callable - refreshCompSpeeds(): Sendable - compRate(): Callable - compSupplyState(string): Callable - compBorrowState(string): Callable - compAccrued(string): Callable - compReceivable(string): Callable - compSupplierIndex(market: string, account: string): Callable - compBorrowerIndex(market: string, account: string): Callable - compSpeeds(string): Callable - compSupplySpeeds(string): Callable - compBorrowSpeeds(string): Callable - claimComp(holder: string): Sendable - claimComp(holder: string, cTokens: string[]): Sendable - updateContributorRewards(account: string): Sendable - _grantComp(account: string, encodedNumber): Sendable - _setCompRate(encodedNumber): Sendable - _setCompSpeed(cTokens: string, encodedNumber): Sendable - _setCompSpeeds(cTokens: string[], supplySpeeds: encodedNumber[], borrowSpeeds: encodedNumber[]): Sendable - _setContributorCompSpeed(account: string, encodedNumber): Sendable - _setMarketBorrowCaps(cTokens:string[], borrowCaps:encodedNumber[]): Sendable - _setBorrowCapGuardian(string): Sendable - borrowCapGuardian(): Callable - borrowCaps(string): Callable - isDeprecated(cToken: string): Callable - _setMarketSupplyCaps(cTokens:string[], supplyCaps:encodedNumber[]): Sendable - supplyCaps(string): Callable -} - -export interface Comptroller extends Contract { - methods: ComptrollerMethods -} diff --git a/scenario/src/Contract/ComptrollerImpl.ts b/scenario/src/Contract/ComptrollerImpl.ts deleted file mode 100644 index af4b29224..000000000 --- a/scenario/src/Contract/ComptrollerImpl.ts +++ /dev/null @@ -1,24 +0,0 @@ -import { Contract } from '../Contract'; -import { Callable, Sendable } from '../Invokation'; -import { encodedNumber } from '../Encoding'; - -interface ComptrollerImplMethods { - _become( - comptroller: string, - priceOracle?: string, - maxAssets?: encodedNumber, - closeFactor?: encodedNumber, - reinitializing?: boolean - ): Sendable; - - _become( - comptroller: string, - compRate: encodedNumber, - compMarkets: string[], - otherMarkets: string[] - ): Sendable; -} - -export interface ComptrollerImpl extends Contract { - methods: ComptrollerImplMethods; -} diff --git a/scenario/src/Contract/Counter.ts b/scenario/src/Contract/Counter.ts deleted file mode 100644 index 81f553d14..000000000 --- a/scenario/src/Contract/Counter.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { Contract } from '../Contract'; -import { encodedNumber } from '../Encoding'; -import { Callable, Sendable } from '../Invokation'; - -export interface CounterMethods { - increment(by: encodedNumber): Sendable; -} - -export interface Counter extends Contract { - methods: CounterMethods; - name: string; -} diff --git a/scenario/src/Contract/Erc20.ts b/scenario/src/Contract/Erc20.ts deleted file mode 100644 index 914cd408a..000000000 --- a/scenario/src/Contract/Erc20.ts +++ /dev/null @@ -1,25 +0,0 @@ -import {Contract} from '../Contract'; -import {Callable, Sendable} from '../Invokation'; -import {encodedNumber} from '../Encoding'; - -interface Erc20Methods { - name(): Callable - symbol(): Callable - decimals(): Callable - totalSupply(): Callable - balanceOf(string): Callable - allowance(owner: string, spender: string): Callable - approve(address: string, amount: encodedNumber): Sendable - allocateTo(address: string, amount: encodedNumber): Sendable - transfer(address: string, amount: encodedNumber): Sendable - transferFrom(owner: string, spender: string, amount: encodedNumber): Sendable - setFail(fail: boolean): Sendable - pause(): Sendable - unpause(): Sendable - setParams(newBasisPoints: encodedNumber, maxFee: encodedNumber): Sendable -} - -export interface Erc20 extends Contract { - methods: Erc20Methods - name: string -} diff --git a/scenario/src/Contract/InterestRateModel.ts b/scenario/src/Contract/InterestRateModel.ts deleted file mode 100644 index afb6f2db3..000000000 --- a/scenario/src/Contract/InterestRateModel.ts +++ /dev/null @@ -1,12 +0,0 @@ -import {Contract} from '../Contract'; -import {Callable, Sendable} from '../Invokation'; -import {encodedNumber} from '../Encoding'; - -interface InterestRateModelMethods { - getBorrowRate(cash: encodedNumber, borrows: encodedNumber, reserves: encodedNumber): Callable -} - -export interface InterestRateModel extends Contract { - methods: InterestRateModelMethods - name: string -} diff --git a/scenario/src/Contract/Pot.ts b/scenario/src/Contract/Pot.ts deleted file mode 100644 index 3f0f70106..000000000 --- a/scenario/src/Contract/Pot.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { Contract } from '../Contract'; -import { Callable, Sendable } from '../Invokation'; -import { encodedNumber } from '../Encoding'; - -interface PotMethods { - chi(): Callable; - dsr(): Callable; - rho(): Callable; - pie(address: string): Callable; - drip(): Sendable; - file(what: string, data: encodedNumber): Sendable; - join(amount: encodedNumber): Sendable; - exit(amount: encodedNumber): Sendable; -} - -export interface Pot extends Contract { - methods: PotMethods; - name: string; -} diff --git a/scenario/src/Contract/PriceOracle.ts b/scenario/src/Contract/PriceOracle.ts deleted file mode 100644 index 04d283668..000000000 --- a/scenario/src/Contract/PriceOracle.ts +++ /dev/null @@ -1,30 +0,0 @@ -import {Contract} from '../Contract'; -import {Callable, Sendable} from '../Invokation'; -import {encodedNumber} from '../Encoding'; - -interface PriceOracleMethods { - assetPrices(asset: string): Callable - setUnderlyingPrice(cToken: string, amount: encodedNumber): Sendable - setDirectPrice(address: string, amount: encodedNumber): Sendable - - // Anchor Price Oracle - getPrice(asset: string): Callable - readers(asset: string): Callable - anchorAdmin(): Callable - pendingAnchorAdmin(): Callable - poster(): Callable - maxSwing(): Callable - anchors(asset: string): Callable<{0: number, 1: number}> - pendingAnchors(asset: string): Callable - _setPendingAnchor(asset: string, price: encodedNumber): Sendable - _setPaused(paused: boolean): Sendable - _setPendingAnchorAdmin(string): Sendable - _acceptAnchorAdmin(): Sendable - setPrice(asset: string, price: encodedNumber): Sendable - setPrices(assets: string[], prices: encodedNumber[]): Sendable -} - -export interface PriceOracle extends Contract { - methods: PriceOracleMethods - name: string -} diff --git a/scenario/src/Contract/PriceOracleProxy.ts b/scenario/src/Contract/PriceOracleProxy.ts deleted file mode 100644 index 69bd08a99..000000000 --- a/scenario/src/Contract/PriceOracleProxy.ts +++ /dev/null @@ -1,13 +0,0 @@ -import {Contract} from '../Contract'; -import {Callable, Sendable} from '../Invokation'; -import {encodedNumber} from '../Encoding'; - -interface PriceOracleProxyMethods { - getUnderlyingPrice(asset: string): Callable - v1PriceOracle(): Callable; - setSaiPrice(amount: encodedNumber): Sendable -} - -export interface PriceOracleProxy extends Contract { - methods: PriceOracleProxyMethods -} diff --git a/scenario/src/Contract/Reservoir.ts b/scenario/src/Contract/Reservoir.ts deleted file mode 100644 index 1bfae9013..000000000 --- a/scenario/src/Contract/Reservoir.ts +++ /dev/null @@ -1,17 +0,0 @@ -import { Contract } from '../Contract'; -import { encodedNumber } from '../Encoding'; -import { Callable, Sendable } from '../Invokation'; - -export interface ReservoirMethods { - drip(): Sendable; - dripped(): Callable; - dripStart(): Callable; - dripRate(): Callable; - token(): Callable; - target(): Callable; -} - -export interface Reservoir extends Contract { - methods: ReservoirMethods; - name: string; -} diff --git a/scenario/src/Contract/Timelock.ts b/scenario/src/Contract/Timelock.ts deleted file mode 100644 index 3ea7a284c..000000000 --- a/scenario/src/Contract/Timelock.ts +++ /dev/null @@ -1,43 +0,0 @@ -import { Contract } from '../Contract'; -import { Callable, Sendable } from '../Invokation'; -import { encodedNumber } from '../Encoding'; - -interface TimelockMethods { - admin(): Callable; - pendingAdmin(): Callable; - delay(): Callable; - queuedTransactions(txHash: string): Callable; - setDelay(delay: encodedNumber): Sendable; - acceptAdmin(): Sendable; - setPendingAdmin(admin: string): Sendable; - queueTransaction( - target: string, - value: encodedNumber, - signature: string, - data: string, - eta: encodedNumber - ): Sendable; - cancelTransaction( - target: string, - value: encodedNumber, - signature: string, - data: string, - eta: encodedNumber - ): Sendable; - executeTransaction( - target: string, - value: encodedNumber, - signature: string, - data: string, - eta: encodedNumber - ): Sendable; - - blockTimestamp(): Callable; - harnessFastForward(seconds: encodedNumber): Sendable; - harnessSetBlockTimestamp(seconds: encodedNumber): Sendable; - harnessSetAdmin(admin: string): Sendable; -} - -export interface Timelock extends Contract { - methods: TimelockMethods; -} diff --git a/scenario/src/Contract/Unitroller.ts b/scenario/src/Contract/Unitroller.ts deleted file mode 100644 index 484f11b89..000000000 --- a/scenario/src/Contract/Unitroller.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { Contract } from '../Contract'; -import { Callable, Sendable } from '../Invokation'; - -interface UnitrollerMethods { - admin(): Callable; - pendingAdmin(): Callable; - _acceptAdmin(): Sendable; - _setPendingAdmin(pendingAdmin: string): Sendable; - _setPendingImplementation(pendingImpl: string): Sendable; - comptrollerImplementation(): Callable; - pendingComptrollerImplementation(): Callable; -} - -export interface Unitroller extends Contract { - methods: UnitrollerMethods; -} diff --git a/scenario/src/Contract/Vat.ts b/scenario/src/Contract/Vat.ts deleted file mode 100644 index 0a0a9a76e..000000000 --- a/scenario/src/Contract/Vat.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { Contract } from '../Contract'; -import { Callable, Sendable } from '../Invokation'; -import { encodedNumber } from '../Encoding'; - -interface VatMethods { - dai(address: string): Callable; - hope(address: string): Sendable; - move(src: string, dst: string, amount: encodedNumber): Sendable; -} - -export interface Vat extends Contract { - methods: VatMethods; - name: string; -} diff --git a/scenario/src/Contract/builder.js b/scenario/src/Contract/builder.js deleted file mode 100644 index f6c11270d..000000000 --- a/scenario/src/Contract/builder.js +++ /dev/null @@ -1,63 +0,0 @@ -const fs = require('fs'); -const path = require('path'); - -let [_, _f, buildFile, contract] = process.argv; - -if (!buildFile || !contract) { - throw new Error(`builder.js `); -} -if (!fs.existsSync(buildFile)) { - throw new Error(`build_file: file not found`); -} -let buildRaw = fs.readFileSync(buildFile, 'utf8'); -let build; - -try { - build = JSON.parse(buildRaw); -} catch (e) { - throw new Error(`Error parsing build file: ${e.toString()}`); -} -if (!build.contracts) { - throw new Error(`Invalid build file, missing contracts`); -} -let contractInfo = Object.entries(build.contracts).find(([k,v]) => k.split(':')[1] === contract); -if (!contractInfo) { - throw new Error(`Build file does not contain info for ${contract}`); -} -let contractABI = JSON.parse(contractInfo[1].abi); - -console.log(`export interface ${contract}Methods {`); -contractABI.forEach(abi => { - if (abi.type === 'function') { - function mapped(io) { - let typeMap = { - 'address': 'string', - 'address[]': 'string[]', - 'uint256': 'number', - 'bool': 'boolean' - }; - return typeMap[io.type] || io.type; - }; - let name = abi.name; - let args = abi.inputs.map((input) => { - return `${input.name}: ${mapped(input)}`; - }).join(', '); - let returnType = abi.outputs.map((output) => { - if (output.type == 'tuple' || output.type == 'tuple[]') { - let res = output.components.map((c) => { - return mapped(c); - }).join(','); - if (output.type == 'tuple[]') { - return `[${res}][]`; - } else { - return `[${res}]`; - } - } else { - return mapped(output); - } - }).join(','); - let able = abi.constant ? 'Callable' : 'Sendable'; - console.log(` ${name}(${args}): ${able}<${returnType}>;`); - } -}); -console.log("}"); diff --git a/scenario/src/ContractLookup.ts b/scenario/src/ContractLookup.ts deleted file mode 100644 index 655f799a0..000000000 --- a/scenario/src/ContractLookup.ts +++ /dev/null @@ -1,224 +0,0 @@ -import { Map } from 'immutable'; - -import { Event } from './Event'; -import { World } from './World'; -import { Contract } from './Contract'; -import { mustString } from './Utils'; - -import { CErc20Delegate } from './Contract/CErc20Delegate'; -import { Comp } from './Contract/Comp'; -import { Comptroller } from './Contract/Comptroller'; -import { ComptrollerImpl } from './Contract/ComptrollerImpl'; -import { CToken } from './Contract/CToken'; -import { Erc20 } from './Contract/Erc20'; -import { InterestRateModel } from './Contract/InterestRateModel'; -import { PriceOracle } from './Contract/PriceOracle'; -import { AnchoredView } from './Contract/AnchoredView'; - -type ContractDataEl = string | Map | undefined; - -function getContractData(world: World, indices: string[][]): ContractDataEl { - return indices.reduce((value: ContractDataEl, index) => { - if (value) { - return value; - } else { - return index.reduce((data: ContractDataEl, el) => { - let lowerEl = el.toLowerCase(); - - if (!data) { - return; - } else if (typeof data === 'string') { - return data; - } else { - return (data as Map).find((_v, key) => key.toLowerCase().trim() === lowerEl.trim()); - } - }, world.contractData); - } - }, undefined); -} - -function getContractDataString(world: World, indices: string[][]): string { - const value: ContractDataEl = getContractData(world, indices); - - if (!value || typeof value !== 'string') { - throw new Error( - `Failed to find string value by index (got ${value}): ${JSON.stringify( - indices - )}, index contains: ${JSON.stringify(world.contractData.toJSON())}` - ); - } - - return value; -} - -export function getWorldContract(world: World, indices: string[][]): T { - const address = getContractDataString(world, indices); - - return getWorldContractByAddress(world, address); -} - -export function getWorldContractByAddress(world: World, address: string): T { - const contract = world.contractIndex[address.toLowerCase()]; - - if (!contract) { - throw new Error( - `Failed to find world contract by address: ${address}, index contains: ${JSON.stringify( - Object.keys(world.contractIndex) - )}` - ); - } - - return (contract); -} - -export async function getUnitroller(world: World): Promise { - return getWorldContract(world, [['Contracts', 'Unitroller']]); -} - -export async function getMaximillion(world: World): Promise { - return getWorldContract(world, [['Contracts', 'Maximillion']]); -} - -export async function getComptroller(world: World): Promise { - return getWorldContract(world, [['Contracts', 'Comptroller']]); -} - -export async function getComptrollerImpl(world: World, comptrollerImplArg: Event): Promise { - return getWorldContract(world, [['Comptroller', mustString(comptrollerImplArg), 'address']]); -} - -export function getCTokenAddress(world: World, cTokenArg: string): string { - return getContractDataString(world, [['cTokens', cTokenArg, 'address']]); -} - -export function getCTokenDelegateAddress(world: World, cTokenDelegateArg: string): string { - return getContractDataString(world, [['CTokenDelegate', cTokenDelegateArg, 'address']]); -} - -export function getErc20Address(world: World, erc20Arg: string): string { - return getContractDataString(world, [['Tokens', erc20Arg, 'address']]); -} - -export function getGovernorAddress(world: World, governorArg: string): string { - return getContractDataString(world, [['Contracts', governorArg]]); -} - -export async function getPriceOracleProxy(world: World): Promise { - return getWorldContract(world, [['Contracts', 'PriceOracleProxy']]); -} - -export async function getAnchoredView(world: World): Promise { - return getWorldContract(world, [['Contracts', 'AnchoredView']]); -} - -export async function getPriceOracle(world: World): Promise { - return getWorldContract(world, [['Contracts', 'PriceOracle']]); -} - -export async function getComp( - world: World, - compArg: Event -): Promise { - return getWorldContract(world, [['COMP', 'address']]); -} - -export async function getCompData( - world: World, - compArg: string -): Promise<[Comp, string, Map]> { - let contract = await getComp(world, (compArg)); - let data = getContractData(world, [['Comp', compArg]]); - - return [contract, compArg, >(data)]; -} - -export async function getInterestRateModel( - world: World, - interestRateModelArg: Event -): Promise { - return getWorldContract(world, [['InterestRateModel', mustString(interestRateModelArg), 'address']]); -} - -export async function getInterestRateModelData( - world: World, - interestRateModelArg: string -): Promise<[InterestRateModel, string, Map]> { - let contract = await getInterestRateModel(world, (interestRateModelArg)); - let data = getContractData(world, [['InterestRateModel', interestRateModelArg]]); - - return [contract, interestRateModelArg, >(data)]; -} - -export async function getErc20Data( - world: World, - erc20Arg: string -): Promise<[Erc20, string, Map]> { - let contract = getWorldContract(world, [['Tokens', erc20Arg, 'address']]); - let data = getContractData(world, [['Tokens', erc20Arg]]); - - return [contract, erc20Arg, >(data)]; -} - -export async function getCTokenData( - world: World, - cTokenArg: string -): Promise<[CToken, string, Map]> { - let contract = getWorldContract(world, [['cTokens', cTokenArg, 'address']]); - let data = getContractData(world, [['CTokens', cTokenArg]]); - - return [contract, cTokenArg, >(data)]; -} - -export async function getCTokenDelegateData( - world: World, - cTokenDelegateArg: string -): Promise<[CErc20Delegate, string, Map]> { - let contract = getWorldContract(world, [['CTokenDelegate', cTokenDelegateArg, 'address']]); - let data = getContractData(world, [['CTokenDelegate', cTokenDelegateArg]]); - - return [contract, cTokenDelegateArg, >(data)]; -} - -export async function getComptrollerImplData( - world: World, - comptrollerImplArg: string -): Promise<[ComptrollerImpl, string, Map]> { - let contract = await getComptrollerImpl(world, (comptrollerImplArg)); - let data = getContractData(world, [['Comptroller', comptrollerImplArg]]); - - return [contract, comptrollerImplArg, >(data)]; -} - -export function getAddress(world: World, addressArg: string): string { - if (addressArg.toLowerCase() === 'zero') { - return '0x0000000000000000000000000000000000000000'; - } - - if (addressArg.startsWith('0x')) { - return addressArg; - } - - let alias = Object.entries(world.settings.aliases).find( - ([alias, addr]) => alias.toLowerCase() === addressArg.toLowerCase() - ); - if (alias) { - return alias[1]; - } - - let account = world.accounts.find(account => account.name.toLowerCase() === addressArg.toLowerCase()); - if (account) { - return account.address; - } - - return getContractDataString(world, [ - ['Contracts', addressArg], - ['cTokens', addressArg, 'address'], - ['CTokenDelegate', addressArg, 'address'], - ['Tokens', addressArg, 'address'], - ['Comptroller', addressArg, 'address'] - ]); -} - -export function getContractByName(world: World, name: string): Contract { - return getWorldContract(world, [['Contracts', name]]); -} diff --git a/scenario/src/CoreEvent.ts b/scenario/src/CoreEvent.ts deleted file mode 100644 index 40cee5c4d..000000000 --- a/scenario/src/CoreEvent.ts +++ /dev/null @@ -1,826 +0,0 @@ -import { - addAction, - checkExpectations, - checkInvariants, - clearInvariants, - holdInvariants, - setEvent, - World -} from './World'; -import { Event } from './Event'; -import { getAddressV, getEventV, getNumberV, getStringV } from './CoreValue'; -import { AddressV, EventV, NothingV, NumberV, StringV, Value } from './Value'; -import { Arg, Command, processCommandEvent, View } from './Command'; -import { assertionCommands, processAssertionEvent } from './Event/AssertionEvent'; -import { comptrollerCommands, processComptrollerEvent } from './Event/ComptrollerEvent'; -import { processUnitrollerEvent, unitrollerCommands } from './Event/UnitrollerEvent'; -import { comptrollerImplCommands, processComptrollerImplEvent } from './Event/ComptrollerImplEvent'; -import { cTokenCommands, processCTokenEvent } from './Event/CTokenEvent'; -import { cTokenDelegateCommands, processCTokenDelegateEvent } from './Event/CTokenDelegateEvent'; -import { erc20Commands, processErc20Event } from './Event/Erc20Event'; -import { interestRateModelCommands, processInterestRateModelEvent } from './Event/InterestRateModelEvent'; -import { priceOracleCommands, processPriceOracleEvent } from './Event/PriceOracleEvent'; -import { priceOracleProxyCommands, processPriceOracleProxyEvent } from './Event/PriceOracleProxyEvent'; -import { invariantCommands, processInvariantEvent } from './Event/InvariantEvent'; -import { expectationCommands, processExpectationEvent } from './Event/ExpectationEvent'; -import { compCommands, processCompEvent } from './Event/CompEvent'; -import { processTrxEvent, trxCommands } from './Event/TrxEvent'; -import { getFetchers, getCoreValue } from './CoreValue'; -import { formatEvent } from './Formatter'; -import { fallback } from './Invokation'; -import { getCurrentBlockNumber, getCurrentTimestamp, sendRPC, sleep } from './Utils'; -import { Map } from 'immutable'; -import { encodedNumber } from './Encoding'; -import { printHelp } from './Help'; -import { loadContracts } from './Networks'; -import { fork } from './Hypothetical'; -import { buildContractEvent } from './EventBuilder'; -import { Counter } from './Contract/Counter'; -import { Reservoir } from './Contract/Reservoir'; -import Web3 from 'web3'; - -export class EventProcessingError extends Error { - error: Error; - event: Event; - - constructor(error: Error, event: Event) { - super(error.message); - - this.error = error; - this.event = event; - this.message = `Error: \`${this.error.toString()}\` when processing \`${formatEvent(this.event)}\``; - this.stack = error.stack; - } -} - -export async function processEvents(originalWorld: World, events: Event[]): Promise { - return events.reduce(async (pWorld: Promise, event: Event): Promise => { - let world = await pWorld; - - try { - world = await processCoreEvent(setEvent(world, event), event, world.defaultFrom()); - } catch (err) { - if (world.verbose) { - console.error(err); - } - throw new EventProcessingError(err, event); - } - - // Next, check any unchecked invariants - world = await checkInvariants(world); - - // Check any expectations - world = await checkExpectations(world); - - // Also clear trx related fields - world = world.set('trxInvokationOpts', Map({})); - world = world.set('newInvokation', false); - - if (!world) { - throw new Error(`Encountered null world result when processing event ${event[0]}: ${world}`); - } else if (!(world instanceof World)) { - throw new Error( - `Encountered world result which was not isWorld when processing event ${event[0]}: ${world}` - ); - } - - return world; - }, Promise.resolve(originalWorld)); -} - -async function print(world: World, message: string): Promise { - world.printer.printLine(message); - - return world; -} - -async function inspect(world: World, string: string | null): Promise { - if (string !== null) { - console.log(['Inspect', string, world.toJS()]); - } else { - console.log(['Inspect', world.toJS()]); - } - - return world; -} - -async function sendEther(world: World, from: string, to: string, amount: encodedNumber): Promise { - let invokation = await fallback(world, from, to, amount); - - world = addAction(world, `Send ${amount} from ${from} to ${to}`, invokation); - - return world; -} - -export const commands: (View | ((world: World) => Promise>))[] = [ - new View<{ n: NumberV }>( - ` - #### History - - * "History n:=5" - Prints history of actions - * E.g. "History" - * E.g. "History 10" - `, - 'History', - [new Arg('n', getNumberV, { default: new NumberV(5) })], - async (world, { n }) => { - world.actions.slice(0, Number(n.val)).forEach(action => { - world.printer.printLine(action.toString()); - }); - - return world; - } - ), - new View<{ seconds: NumberV }>( - ` - #### SleepSeconds - - * "SleepSeconds s:" - Sleeps for given amount of time. - * E.g. "SleepSeconds 1" - Sleeps for one second - `, - 'SleepSeconds', - [new Arg('seconds', getNumberV)], - async (world, { seconds }) => { - await sleep(seconds.toNumber() * 1000); - return world; - } - ), - new View<{ timestamp: NumberV }>( - ` - #### SleepUntilTimestamp - - * "SleepUntil timestamp:" - Sleeps until the given timestamp - * E.g. "SleepUntil 1579123423" - Sleeps from now until 1579123423 - `, - 'SleepUntilTimestamp', - [new Arg('timestamp', getNumberV)], - async (world, { timestamp }) => { - const delay = timestamp.toNumber() - getCurrentTimestamp(); - if (delay > 0) { - await sleep(delay * 1000); - } - return world; - } - ), - new View<{ blocks: NumberV }>( - ` - #### SleepBlocks - - * "SleepForBlocks blocks:" - Sleeps for a given number of blocks - * E.g. "SleepBlocks 20" - Sleeps for 20 blocks - `, - 'SleepBlocks', - [new Arg('blocks', getNumberV)], - async (world, { blocks }) => { - const targetBlockNumber = blocks.toNumber() + await getCurrentBlockNumber(world); - while (await getCurrentBlockNumber(world) < targetBlockNumber) { - await sleep(1000); - } - return world; - } - ), - new View<{ blockNumber: NumberV }>( - ` - #### SleepUntilBlock - - * "SleepUntilBlock blockNumber:" - Sleeps until the given blockNumber - * E.g. "SleepUntilBlock 2006868" - Sleeps from now until block 2006868. - `, - 'SleepUntilBlock', - [new Arg('blockNumber', getNumberV)], - async (world, { blockNumber }) => { - const delay = blockNumber.toNumber() - await getCurrentBlockNumber(world); - while (blockNumber.toNumber() > await getCurrentBlockNumber(world)) { - await sleep(1000); - } - return world; - } - ), - new View<{ errMsg: StringV }>( - ` - #### Throw - - * "Throw errMsg:" - Throws given error - * E.g. "Throw \"my error message\"" - `, - 'Throw', - [new Arg('errMsg', getStringV)], - async (world, { errMsg }) => { - throw new Error(errMsg.val); - - return world; - } - ), - async (world: World) => - new View<{ res: Value }>( - ` - #### Read - - * "Read ..." - Reads given value and prints result - * E.g. "Read CToken cBAT ExchangeRateStored" - Returns exchange rate of cBAT - `, - 'Read', - [new Arg('res', getCoreValue, { variadic: true })], - async (world, { res }) => { - world.printer.printValue(res); - - return world; - }, - { subExpressions: (await getFetchers(world)).fetchers } - ), - new View<{ message: StringV }>( - ` - #### Print - - * "Print ..." - Prints given string - * E.g. "Print \"Hello there\"" - `, - 'Print', - [new Arg('message', getStringV)], - async (world, { message }) => print(world, message.val) - ), - new View<{ num: NumberV }>( - ` - #### PrintNumber - - * "Print ..." - Prints given number - * E.g. "Print \"Hello there\"" - `, - 'PrintNumber', - [new Arg('num', getNumberV)], - async (world, { num }) => print(world, num.toString()) - ), - new View<{}>( - ` - #### PrintTransactionLogs - - * "PrintTransactionLogs" - Prints logs from all transacions - `, - 'PrintTransactionLogs', - [], - async (world, { }) => { - return await world.updateSettings(async settings => { - settings.printTxLogs = true; - - return settings; - }); - } - ), - new View<{ url: StringV; unlockedAccounts: AddressV[] }>( - ` - #### Web3Fork - - * "Web3Fork url: unlockedAccounts:[]" - Creates an in-memory ganache - * E.g. "Web3Fork \"https://mainnet.infura.io/v3/e1a5d4d2c06a4e81945fca56d0d5d8ea\" (\"0x8b8592e9570e96166336603a1b4bd1e8db20fa20\")" - `, - 'Web3Fork', - [ - new Arg('url', getStringV), - new Arg('unlockedAccounts', getAddressV, { default: [], mapped: true }) - ], - async (world, { url, unlockedAccounts }) => fork(world, url.val, unlockedAccounts.map(v => v.val)) - ), - - new View<{ networkVal: StringV; }>( - ` - #### UseConfigs - - * "UseConfigs networkVal:" - Updates world to use the configs for specified network - * E.g. "UseConfigs mainnet" - `, - 'UseConfigs', - [new Arg('networkVal', getStringV)], - async (world, { networkVal }) => { - const network = networkVal.val; - if (world.basePath && (network === 'mainnet' || network === 'kovan' || network === 'goerli' || network === 'rinkeby' || network == 'ropsten')) { - let newWorld = world.set('network', network); - let contractInfo; - [newWorld, contractInfo] = await loadContracts(newWorld); - if (contractInfo.length > 0) { - world.printer.printLine(`Contracts:`); - contractInfo.forEach((info) => world.printer.printLine(`\t${info}`)); - } - - return newWorld; - } - - return world; - } - ), - - new View<{ address: AddressV }>( - ` - #### MyAddress - - * "MyAddress address:" - Sets default from address (same as "Alias Me ") - * E.g. "MyAddress \"0x9C1856636d78C051deAd6CAB9c5699e4E25549e9\"" - `, - 'MyAddress', - [new Arg('address', getAddressV)], - async (world, { address }) => { - return await world.updateSettings(async settings => { - settings.aliases['Me'] = address.val; - - return settings; - }); - } - ), - new View<{ name: StringV; address: AddressV }>( - ` - #### Alias - - * "Alias name: address:" - Stores an alias between name and address - * E.g. "Alias Me \"0x9C1856636d78C051deAd6CAB9c5699e4E25549e9\"" - `, - 'Alias', - [new Arg('name', getStringV), new Arg('address', getAddressV)], - async (world, { name, address }) => { - return await world.updateSettings(async settings => { - settings.aliases[name.val] = address.val; - - return settings; - }); - } - ), - - new View<{ name: StringV; address: AddressV }>( - ` - #### Aliases - - * "Aliases - Prints all aliases - `, - 'Aliases', - [], - async (world, { name, address }) => { - world.printer.printLine('Aliases:'); - Object.entries(world.settings.aliases).forEach(([name, address]) => { - world.printer.printLine(`\t${name}: ${address}`); - }); - - return world; - } - ), - - new View<{ seconds: NumberV }>( - ` - #### IncreaseTime - - * "IncreaseTime seconds:" - Increase Ganache evm time by a number of seconds - * E.g. "IncreaseTime 60" - `, - 'IncreaseTime', - [new Arg('seconds', getNumberV)], - async (world, { seconds }) => { - await sendRPC(world, 'evm_increaseTime', [Number(seconds.val)]); - await sendRPC(world, 'evm_mine', []); - return world; - } - ), - - new View<{ timestamp: NumberV }>( - ` - #### SetTime - - * "SetTime timestamp:" - Increase Ganache evm time to specific timestamp - * E.g. "SetTime 1573597400" - `, - 'SetTime', - [new Arg('timestamp', getNumberV)], - async (world, { timestamp }) => { - await sendRPC(world, 'evm_mine', [timestamp.val]); - return world; - } - ), - - new View<{ timestamp: NumberV }>( - ` - #### FreezeTime - - * "FreezeTime timestamp:" - Freeze Ganache evm time to specific timestamp - * E.g. "FreezeTime 1573597400" - `, - 'FreezeTime', - [new Arg('timestamp', getNumberV)], - async (world, { timestamp }) => { - await sendRPC(world, 'evm_freezeTime', [timestamp.val]); - return world; - } - ), - - new View<{}>( - ` - #### MineBlock - - * "MineBlock" - Increase Ganache evm block number - * E.g. "MineBlock" - `, - 'MineBlock', - [], - async (world, { }) => { - await sendRPC(world, 'evm_mine', []); - return world; - } - ), - - new Command<{ blockNumber: NumberV }>( - ` - #### SetBlockNumber - - * "SetBlockNumber 10" - Increase Ganache evm block number - * E.g. "SetBlockNumber 10" - `, - 'SetBlockNumber', - [new Arg('blockNumber', getNumberV)], - async (world, from, { blockNumber }) => { - await sendRPC(world, 'evm_mineBlockNumber', [blockNumber.toNumber() - 1]) - return world; - } - ), - - new Command<{ blockNumber: NumberV, event: EventV }>( - ` - #### Block - - * "Block 10 (...event)" - Set block to block N and run event - * E.g. "Block 10 (Comp Deploy Admin)" - `, - 'Block', - [ - new Arg('blockNumber', getNumberV), - new Arg('event', getEventV) - ], - async (world, from, { blockNumber, event }) => { - await sendRPC(world, 'evm_mineBlockNumber', [blockNumber.toNumber() - 2]) - return await processCoreEvent(world, event.val, from); - } - ), - - new Command<{ blockNumber: NumberV }>( - ` - #### AdvanceBlocks - - * "AdvanceBlocks 10" - Increase Ganache latest + block number - * E.g. "AdvanceBlocks 10" - `, - 'AdvanceBlocks', - [new Arg('blockNumber', getNumberV)], - async (world, from, { blockNumber }) => { - const currentBlockNumber = await getCurrentBlockNumber(world); - await sendRPC(world, 'evm_mineBlockNumber', [Number(blockNumber.val) + currentBlockNumber]); - return world; - } - ), - - new View<{}>( - ` - #### Inspect - - * "Inspect" - Prints debugging information about the world - `, - 'Inspect', - [], - async (world, { }) => inspect(world, null) - ), - - new View<{ message: StringV }>( - ` - #### Debug - - * "Debug message:" - Same as inspect but prepends with a string - `, - 'Debug', - [new Arg('message', getStringV)], - async (world, { message }) => inspect(world, message.val) - ), - - new View<{ num: NumberV }>( - ` - #### DebugNumber - - * "Debug num:" - Same as inspect but prepends with a number - `, - 'DebugNumber', - [new Arg('num', getNumberV)], - async (world, { num }) => inspect(world, num.toString()) - ), - - new View<{ account: AddressV; event: EventV }>( - ` - #### From - - * "From " - Runs event as the given user - * E.g. "From Geoff (CToken cZRX Mint 5e18)" - `, - 'From', - [new Arg('account', getAddressV), new Arg('event', getEventV)], - async (world, { account, event }) => processCoreEvent(world, event.val, account.val) - ), - - new Command<{ event: EventV }>( - ` - #### Trx - - * "Trx ...trxEvent" - Handles event to set details of next transaction - * E.g. "Trx Value 1.0e18 (CToken cEth Mint 1.0e18)" - `, - 'Trx', - [new Arg('event', getEventV, { variadic: true })], - async (world, from, { event }) => processTrxEvent(world, event.val, from), - { subExpressions: trxCommands() } - ), - - new Command<{ event: EventV }>( - ` - #### Invariant - - * "Invariant ...invariant" - Adds a new invariant to the world which is checked after each transaction - * E.g. "Invariant Static (CToken cZRX TotalSupply)" - `, - 'Invariant', - [new Arg('event', getEventV, { variadic: true })], - async (world, from, { event }) => processInvariantEvent(world, event.val, from), - { subExpressions: invariantCommands() } - ), - - new Command<{ event: EventV }>( - ` - #### Expect - - * "Expect ...expectation" - Adds an expectation to hold after the next transaction - * E.g. "Expect Changes (CToken cZRX TotalSupply) +10.0e18" - `, - 'Expect', - [new Arg('event', getEventV, { variadic: true })], - async (world, from, { event }) => processExpectationEvent(world, event.val, from), - { subExpressions: expectationCommands() } - ), - - new View<{ type: StringV }>( - ` - #### HoldInvariants - - * "HoldInvariants type:" - Skips checking invariants on next command. - * E.g. "HoldInvariants" - Skips all invariants - * E.g. "HoldInvariants All" - Skips all invariants - * E.g. "HoldInvariants Success" - Skips "success" invariants - * E.g. "HoldInvariants Remains" - Skips "remains" invariants - * E.g. "HoldInvariants Static" - Skips "static" invariants - `, - 'HoldInvariants', - [new Arg('type', getStringV, { default: new StringV('All') })], - async (world, { type }) => holdInvariants(world, type.val) - ), - - new View<{ type: StringV }>( - ` - #### ClearInvariants - - * "ClearInvariants type:" - Removes all invariants. - * E.g. "ClearInvariants" - Removes all invariants - * E.g. "ClearInvariants All" - Removes all invariants - * E.g. "ClearInvariants Success" - Removes "success" invariants - * E.g. "ClearInvariants Remains" - Removes "remains" invariants - * E.g. "ClearInvariants Static" - Removes "static" invariants - `, - 'ClearInvariants', - [new Arg('type', getStringV, { default: new StringV('All') })], - async (world, { type }) => clearInvariants(world, type.val) - ), - - new Command<{ event: EventV }>( - ` - #### Assert - - * "Assert ...event" - Validates given assertion, raising an exception if assertion fails - * E.g. "Assert Equal (Erc20 BAT TokenBalance Geoff) (Exactly 5.0)" - `, - 'Assert', - [new Arg('event', getEventV, { variadic: true })], - async (world, from, { event }) => processAssertionEvent(world, event.val, from), - { subExpressions: assertionCommands() } - ), - - new Command<{ gate: Value; event: EventV }>( - ` - #### Gate - - * "Gate value event" - Runs event only if value is falsey. Thus, gate can be used to build idempotency. - * E.g. "Gate (Erc20 ZRX Address) (Erc20 Deploy BAT)" - `, - 'Gate', - [new Arg('gate', getCoreValue, { rescue: new NothingV() }), new Arg('event', getEventV)], - async (world, from, { gate, event }) => { - if (gate.truthy()) { - return world; - } else { - return processCoreEvent(world, event.val, from); - } - } - ), - - new Command<{ given: Value; event: EventV }>( - ` - #### Given - - * "Given value event" - Runs event only if value is truthy. Thus, given can be used to build existence checks. - * E.g. "Given ($var) (PriceOracle SetPrice cBAT $var)" - `, - 'Given', - [new Arg('given', getCoreValue, { rescue: new NothingV() }), new Arg('event', getEventV)], - async (world, from, { given, event }) => { - if (given.truthy()) { - return processCoreEvent(world, event.val, from); - } else { - return world; - } - } - ), - - new Command<{ address: AddressV; amount: NumberV }>( - ` - #### Send - - * "Send
" - Sends a given amount of eth to given address - * E.g. "Send cETH 0.5e18" - `, - 'Send', - [new Arg('address', getAddressV), new Arg('amount', getNumberV)], - (world, from, { address, amount }) => sendEther(world, from, address.val, amount.encode()) - ), - - new Command<{ event: EventV }>( - ` - #### Unitroller - - * "Unitroller ...event" - Runs given Unitroller event - * E.g. "Unitroller SetPendingImpl MyComptrollerImpl" - `, - 'Unitroller', - [new Arg('event', getEventV, { variadic: true })], - (world, from, { event }) => processUnitrollerEvent(world, event.val, from), - { subExpressions: unitrollerCommands() } - ), - - new Command<{ event: EventV }>( - ` - #### Comptroller - - * "Comptroller ...event" - Runs given Comptroller event - * E.g. "Comptroller _setReserveFactor 0.5" - `, - 'Comptroller', - [new Arg('event', getEventV, { variadic: true })], - (world, from, { event }) => processComptrollerEvent(world, event.val, from), - { subExpressions: comptrollerCommands() } - ), - - new Command<{ event: EventV }>( - ` - #### ComptrollerImpl - - * "ComptrollerImpl ...event" - Runs given ComptrollerImpl event - * E.g. "ComptrollerImpl MyImpl Become" - `, - 'ComptrollerImpl', - [new Arg('event', getEventV, { variadic: true })], - (world, from, { event }) => processComptrollerImplEvent(world, event.val, from), - { subExpressions: comptrollerImplCommands() } - ), - - new Command<{ event: EventV }>( - ` - #### CToken - - * "CToken ...event" - Runs given CToken event - * E.g. "CToken cZRX Mint 5e18" - `, - 'CToken', - [new Arg('event', getEventV, { variadic: true })], - (world, from, { event }) => processCTokenEvent(world, event.val, from), - { subExpressions: cTokenCommands() } - ), - - new Command<{ event: EventV }>( - ` - #### CTokenDelegate - - * "CTokenDelegate ...event" - Runs given CTokenDelegate event - * E.g. "CTokenDelegate Deploy CDaiDelegate cDaiDelegate" - `, - 'CTokenDelegate', - [new Arg('event', getEventV, { variadic: true })], - (world, from, { event }) => processCTokenDelegateEvent(world, event.val, from), - { subExpressions: cTokenDelegateCommands() } - ), - - new Command<{ event: EventV }>( - ` - #### Erc20 - - * "Erc20 ...event" - Runs given Erc20 event - * E.g. "Erc20 ZRX Facuet Geoff 5e18" - `, - 'Erc20', - [new Arg('event', getEventV, { variadic: true })], - (world, from, { event }) => processErc20Event(world, event.val, from), - { subExpressions: erc20Commands() } - ), - - new Command<{ event: EventV }>( - ` - #### InterestRateModel - - * "InterestRateModel ...event" - Runs given interest rate model event - * E.g. "InterestRateModel Deploy Fixed StdRate 0.5" - `, - 'InterestRateModel', - [new Arg('event', getEventV, { variadic: true })], - (world, from, { event }) => processInterestRateModelEvent(world, event.val, from), - { subExpressions: interestRateModelCommands() } - ), - - new Command<{ event: EventV }>( - ` - #### PriceOracle - - * "PriceOracle ...event" - Runs given Price Oracle event - * E.g. "PriceOracle SetPrice cZRX 1.5" - `, - 'PriceOracle', - [new Arg('event', getEventV, { variadic: true })], - (world, from, { event }) => processPriceOracleEvent(world, event.val, from), - { subExpressions: priceOracleCommands() } - ), - - new Command<{ event: EventV }>( - ` - #### PriceOracleProxy - - * "PriceOracleProxy ...event" - Runs given Price Oracle event - * E.g. "PriceOracleProxy Deploy (Unitroller Address) (PriceOracle Address) (CToken cETH Address)" - `, - 'PriceOracleProxy', - [new Arg('event', getEventV, { variadic: true })], - (world, from, { event }) => { - return processPriceOracleProxyEvent(world, event.val, from); - }, - { subExpressions: priceOracleProxyCommands() } - ), - - new Command<{ event: EventV }>( - ` - #### Comp - - * "Comp ...event" - Runs given comp event - * E.g. "Comp Deploy" - `, - 'Comp', - [new Arg('event', getEventV, { variadic: true })], - (world, from, { event }) => { - return processCompEvent(world, event.val, from); - }, - { subExpressions: compCommands() } - ), - - buildContractEvent("Counter", false), - buildContractEvent("Reservoir", true), - - new View<{ event: EventV }>( - ` - #### Help - - * "Help ...event" - Prints help for given command - * E.g. "Help From" - `, - 'Help', - [new Arg('event', getEventV, { variadic: true })], - async (world, { event }) => { - world.printer.printLine(''); - let { commands } = await getCommands(world); - printHelp(world.printer, event.val, commands); - - return world; - } - ) -]; - -async function getCommands(world: World) { - if (world.commands) { - return { world, commands: world.commands }; - } - - let allCommands = await Promise.all(commands.map((command) => { - if (typeof (command) === 'function') { - return command(world); - } else { - return Promise.resolve(command); - } - })); - - return { world: world.set('commands', allCommands), commands: allCommands }; -} - -export async function processCoreEvent(world: World, event: Event, from: string | null): Promise { - let { world: nextWorld, commands } = await getCommands(world); - return await processCommandEvent('Core', commands, nextWorld, event, from); -} diff --git a/scenario/src/CoreValue.ts b/scenario/src/CoreValue.ts deleted file mode 100644 index e66a5a8f5..000000000 --- a/scenario/src/CoreValue.ts +++ /dev/null @@ -1,977 +0,0 @@ -import { Event } from './Event'; -import { World } from './World'; -import { - AddressV, - AnythingV, - ArrayV, - BoolV, - EventV, - ExpNumberV, - ListV, - MapV, - NothingV, - NumberV, - PercentV, - PreciseV, - StringV, - Value -} from './Value'; -import { Arg, Fetcher, getFetcherValue } from './Command'; -import { getUserValue, userFetchers } from './Value/UserValue'; -import { comptrollerFetchers, getComptrollerValue } from './Value/ComptrollerValue'; -import { comptrollerImplFetchers, getComptrollerImplValue } from './Value/ComptrollerImplValue'; -import { getUnitrollerValue, unitrollerFetchers } from './Value/UnitrollerValue'; -import { cTokenFetchers, getCTokenValue } from './Value/CTokenValue'; -import { cTokenDelegateFetchers, getCTokenDelegateValue } from './Value/CTokenDelegateValue'; -import { erc20Fetchers, getErc20Value } from './Value/Erc20Value'; -import { mcdFetchers, getMCDValue } from './Value/MCDValue'; -import { getInterestRateModelValue, interestRateModelFetchers } from './Value/InterestRateModelValue'; -import { getPriceOracleValue, priceOracleFetchers } from './Value/PriceOracleValue'; -import { getPriceOracleProxyValue, priceOracleProxyFetchers } from './Value/PriceOracleProxyValue'; -import { getAnchoredViewValue, anchoredViewFetchers } from './Value/AnchoredViewValue'; -import { getCompValue, compFetchers } from './Value/CompValue'; -import { getAddress } from './ContractLookup'; -import { getCurrentBlockNumber, getCurrentTimestamp, mustArray, sendRPC } from './Utils'; -import { toEncodableNum } from './Encoding'; -import { BigNumber } from 'bignumber.js'; -import { buildContractFetcher } from './EventBuilder'; - -import { - padLeft, - sha3, - toBN, - toDecimal, - toHex -} from 'web3-utils'; - -const expMantissa = new BigNumber('1000000000000000000'); - -function getSigFigs(value) { - let str = value.toString(); - - str = str.replace(/e\d+/, ''); // Remove e01 - str = str.replace(/\./, ''); // Remove decimal point - - return str.length; -} - -export async function getEventV(world: World, event: Event): Promise { - return new EventV(event); -} - -// TODO: We may want to handle simple values -> complex values at the parser level -// This is currently trying to parse simple values as simple or complex values, -// and this is because items like `Some` could work either way. -export async function mapValue( - world: World, - event: Event, - simple: (string) => T, - complex: (World, Event) => Promise, - type: any -): Promise { - let simpleErr; - let val; - - if (typeof event === 'string') { - try { - return simple(event); - } catch (err) { - // Collect the error, but fallback to a complex expression - simpleErr = err; - } - } - - try { - val = await complex(world, event); - } catch (complexErr) { - // If we had an error before and this was the fallback, now throw that one - if (simpleErr) { - throw simpleErr; - } else { - throw complexErr; - } - } - - if (!(val instanceof type)) { - throw new Error(`Expected "${type.name}" from event "${event.toString()}", was: "${val.toString()}"`); - } - - // We just did a typecheck above... - return (val); -} - -export async function getBoolV(world: World, event: Event): Promise { - return mapValue( - world, - event, - str => { - const lower = str.trim().toLowerCase(); - - if (lower == 'true' || lower == 't' || lower == '1') { - return new BoolV(true); - } else { - return new BoolV(false); - } - }, - getCoreValue, - BoolV - ); -} - -export async function getAddressV(world: World, event: Event): Promise { - return mapValue( - world, - event, - str => new AddressV(getAddress(world, str)), - async (currWorld, val) => { - const coreVal = await getCoreValue(currWorld, val); - - if (coreVal instanceof StringV) { - return new AddressV(coreVal.val); - } else { - return coreVal; - } - }, - AddressV - ); -} - -function strToNumberV(str: string): NumberV { - if (isNaN(Number(str))) { - throw 'not a number'; - } - - return new NumberV(str); -} - -function strToExpNumberV(str: string): NumberV { - const r = new BigNumber(str); - - return new NumberV(r.multipliedBy(expMantissa).toFixed()); -} - -export async function getNumberV(world: World, event: Event): Promise { - return mapValue(world, event, strToNumberV, getCoreValue, NumberV); -} - -export async function getExpNumberV(world: World, event: Event): Promise { - let res = await mapValue(world, event, strToNumberV, getCoreValue, NumberV); - - const r = new BigNumber(res.val); - - return new ExpNumberV(r.multipliedBy(expMantissa).toFixed()); -} - -export async function getPercentV(world: World, event: Event): Promise { - let res = await getExpNumberV(world, event); - - return new PercentV(res.val); -} - -// Note: MapV does not currently parse its contents -export async function getMapV(world: World, event: Event): Promise { - const res: object = {}; - - await Promise.all( - mustArray(event).map(async e => { - if (Array.isArray(e) && e.length === 2 && typeof e[0] === 'string') { - const [key, valueEvent] = e; - let value; - if (typeof valueEvent === 'string') { - value = new StringV(valueEvent); - } else { - value = await getCoreValue(world, valueEvent); - } - - res[key] = value; - } else { - throw new Error(`Expected all string pairs for MapV from ${event.toString()}, got: ${e.toString()}`); - } - }) - ); - - return new MapV(res); -} - -export function getArrayV(fetcher: (World, Event) => Promise): (World, Event) => Promise> { - return async (world: World, event: Event): Promise> => { - const res = await Promise.all( - mustArray(event).filter((x) => x !== 'List').map(e => fetcher(world, e)) - ); - return new ArrayV(res); - } -} - -export async function getStringV(world: World, event: Event): Promise { - return mapValue(world, event, str => new StringV(str), getCoreValue, StringV); -} - -async function getEtherBalance(world: World, address: string): Promise { - let balance = await world.web3.eth.getBalance(address); - - return new NumberV(balance); -} - -const fetchers = [ - new Fetcher<{}, BoolV>( - ` - #### True - - * "True" - Returns true - `, - 'True', - [], - async (world, {}) => new BoolV(true) - ), - - new Fetcher<{}, BoolV>( - ` - #### False - - * "False" - Returns false - `, - 'False', - [], - async (world, {}) => new BoolV(false) - ), - - new Fetcher<{}, NumberV>( - ` - #### Zero - - * "Zero" - Returns 0 - `, - 'Zero', - [], - async (world, {}) => strToNumberV('0') - ), - - new Fetcher<{}, NumberV>( - ` - #### UInt96Max - - * "UInt96Max" - Returns 2^96 - 1 - `, - 'UInt96Max', - [], - async (world, {}) => - new NumberV('79228162514264337593543950335') - ), - - new Fetcher<{}, NumberV>( - ` - #### UInt256Max - - * "UInt256Max" - Returns 2^256 - 1 - `, - 'UInt256Max', - [], - async (world, {}) => - new NumberV('115792089237316195423570985008687907853269984665640564039457584007913129639935') - ), - - new Fetcher<{}, NumberV>( - ` - #### Some - - * "Some" - Returns 100e18 - `, - 'Some', - [], - async (world, {}) => strToNumberV('100e18') - ), - - new Fetcher<{}, NumberV>( - ` - #### Little - - * "Little" - Returns 100e10 - `, - 'Little', - [], - async (world, {}) => strToNumberV('100e10') - ), - - new Fetcher<{ amt: EventV }, NumberV>( - ` - #### Exactly - - * "Exactly " - Returns a strict numerical value - * E.g. "Exactly 5.0" - `, - 'Exactly', - [new Arg('amt', getEventV)], - async (world, { amt }) => getNumberV(world, amt.val) - ), - - new Fetcher<{ hexVal: EventV }, StringV>( - ` - #### Hex - - * "Hex " - Returns a byte string with given hex value - * E.g. "Hex \"0xffff\"" - `, - 'Hex', - [new Arg('hexVal', getEventV)], - async (world, { hexVal }) => getStringV(world, hexVal.val) - ), - - new Fetcher<{ str: EventV }, StringV>( - ` - #### String - - * "String " - Returns a string literal - * E.g. "String MyString" - `, - 'String', - [new Arg('str', getEventV)], - async (world, { str }) => getStringV(world, str.val) - ), - - new Fetcher<{ amt: EventV }, NumberV>( - ` - #### Exp - - * "Exp " - Returns the mantissa for a given exp - * E.g. "Exp 5.5" - `, - 'Exp', - [new Arg('amt', getEventV)], - async (world, { amt }) => getExpNumberV(world, amt.val) - ), - - new Fetcher<{ amt: EventV }, NumberV>( - ` - #### Neg - - * "Neg " - Returns the amount subtracted from zero - * E.g. "Neg amount" - `, - 'Neg', - [new Arg('amt', getEventV)], - async (world, { amt }) => new NumberV(0).sub(await getNumberV(world, amt.val)) - ), - - new Fetcher<{ amt: StringV }, PreciseV>( - ` - #### Precisely - - * "Precisely " - Matches a number to given number of significant figures - * E.g. "Precisely 5.1000" - Matches to 5 sig figs - `, - 'Precisely', - [new Arg('amt', getStringV)], - async (world, { amt }) => new PreciseV(toEncodableNum(amt.val), getSigFigs(amt.val)) - ), - - new Fetcher<{}, AnythingV>( - ` - #### Anything - - * "Anything" - Matches any value for assertions - `, - 'Anything', - [], - async (world, {}) => new AnythingV() - ), - - new Fetcher<{}, NothingV>( - ` - #### Nothing - - * "Nothing" - Matches no values and is nothing. - `, - 'Nothing', - [], - async (world, {}) => new NothingV() - ), - - new Fetcher<{ addr: AddressV }, AddressV>( - ` - #### Address - - * "Address arg:
" - Returns an address - `, - 'Address', - [new Arg('addr', getAddressV)], - async (world, { addr }) => addr - ), - - new Fetcher<{ num: NumberV }, NumberV>( - ` - #### Number - - * "Number arg:" - Returns a number - `, - 'Number', - [new Arg('num', getNumberV)], - async (world, { num }) => num - ), - - new Fetcher< - { addr: AddressV; slot: NumberV; start: NumberV; valType: StringV }, - BoolV | AddressV | ExpNumberV | NothingV - >( - ` - #### StorageAt - - * "StorageAt addr:
slot: start:, valType:" - Returns bytes at storage slot - `, - 'StorageAt', - [ - new Arg('addr', getAddressV), - new Arg('slot', getNumberV), - new Arg('start', getNumberV), - new Arg('valType', getStringV) - ], - async (world, { addr, slot, start, valType }) => { - const startVal = start.toNumber() - const reverse = s => s.split('').reverse().join(''); - const storage = await world.web3.eth.getStorageAt(addr.val, slot.toNumber()); - const stored = reverse(storage.slice(2)); // drop leading 0x and reverse since items are packed from the back of the slot - - // Don't forget to re-reverse - switch (valType.val) { - case 'bool': - return new BoolV(!!reverse(stored.slice(startVal, startVal + 2))); - case 'address': - return new AddressV('0x' + padLeft(reverse(stored.slice(startVal, startVal + 40)), 40)); - case 'number': - return new NumberV(toBN('0x' + reverse(stored)).toString()); - default: - return new NothingV(); - } - } - ), - - new Fetcher< - { addr: AddressV; slot: NumberV; key: AddressV; nestedKey: AddressV; valType: StringV }, - ListV | NothingV - >( - ` - #### StorageAtNestedMapping - - * "StorageAtNestedMapping addr:
slot:, key:
, nestedKey:
, valType:" - Returns bytes at storage slot - `, - 'StorageAtNestedMapping', - [ - new Arg('addr', getAddressV), - new Arg('slot', getNumberV), - new Arg('key', getAddressV), - new Arg('nestedKey', getAddressV), - new Arg('valType', getStringV) - ], - async (world, { addr, slot, key, nestedKey, valType }) => { - const areEqual = (v, x) => toBN(v).eq(toBN(x)); - let paddedSlot = slot.toNumber().toString(16).padStart(64, '0'); - let paddedKey = padLeft(key.val, 64); - let newKey = sha3(paddedKey + paddedSlot); - let val = await world.web3.eth.getStorageAt(addr.val, newKey); - - switch (valType.val) { - case 'marketStruct': - let isListed = areEqual(val, 1); - let collateralFactorKey = '0x' + toBN(newKey).add(toBN(1)).toString(16); - let collateralFactorStr = await world.web3.eth.getStorageAt(addr.val, collateralFactorKey); - let collateralFactor = toBN(collateralFactorStr); - let userMarketBaseKey = padLeft(toBN(newKey).add(toBN(2)).toString(16), 64); - let paddedSlot = padLeft(userMarketBaseKey, 64); - let paddedKey = padLeft(nestedKey.val, 64); - let newKeyTwo = sha3(paddedKey + paddedSlot); - let userInMarket = await world.web3.eth.getStorageAt(addr.val, newKeyTwo); - - let isCompKey = '0x' + toBN(newKey).add(toBN(3)).toString(16); - let isCompStr = await world.web3.eth.getStorageAt(addr.val, isCompKey); - - return new ListV([ - new BoolV(isListed), - new ExpNumberV(collateralFactor.toString(), 1e18), - new BoolV(areEqual(userInMarket, 1)), - new BoolV(areEqual(isCompStr, 1)) - ]); - default: - return new NothingV(); - } - } - ), - - new Fetcher< - { addr: AddressV; slot: NumberV; key: AddressV; valType: StringV }, - AddressV | BoolV | ExpNumberV | ListV | NothingV - >( - ` - #### StorageAtMapping - - * "StorageAtMapping addr:
slot:, key:
, valType:" - Returns bytes at storage slot - `, - 'StorageAtMapping', - [ - new Arg('addr', getAddressV), - new Arg('slot', getNumberV), - new Arg('key', getAddressV), - new Arg('valType', getStringV) - ], - async (world, { addr, slot, key, valType }) => { - let paddedSlot = slot.toNumber().toString(16).padStart(64, '0'); - let paddedKey = padLeft(key.val, 64); - let newKey = sha3(paddedKey + paddedSlot); - let val = await world.web3.eth.getStorageAt(addr.val, newKey); - - switch (valType.val) { - case 'list(address)': - let p = new Array(toDecimal(val)).fill(undefined).map(async (_v, index) => { - let newKeySha = sha3(newKey); - let itemKey = toBN(newKeySha).add(toBN(index)); - let address = await world.web3.eth.getStorageAt(addr.val, padLeft(toHex(itemKey), 40)); - return new AddressV(address); - }); - - let all = await Promise.all(p); - return new ListV(all); - - case 'bool': - return new BoolV(val != '0x' && val != '0x0'); - case 'address': - return new AddressV(val); - case 'number': - return new NumberV(toBN(val).toString()); - default: - return new NothingV(); - } - } - ), - - new Fetcher<{}, NumberV>( - ` - #### BlockNumber - * BlockNumber - `, - 'BlockNumber', - [], - async (world, {}) => { - return new NumberV(await getCurrentBlockNumber(world)); - } - ), - - new Fetcher<{}, NumberV>( - ` - #### GasCounter - * GasCounter - `, - 'GasCounter', - [], - async (world, {}) => new NumberV(world.gasCounter.value) - ), - - new Fetcher<{}, AddressV>( - ` - #### LastContract - - * "LastContract" - The address of last constructed contract - `, - 'LastContract', - [], - async (world, { }) => new AddressV(world.get('lastContract')) - ), - - new Fetcher<{}, NumberV>( - ` - #### LastBlock - - * "LastBlock" - The block of the last transaction - `, - 'LastBlock', - [], - async (world, { }) => { - let invokation = world.get('lastInvokation'); - if (!invokation) { - throw new Error(`Expected last invokation for "lastBlock" but none found.`); - } - - if (!invokation.receipt) { - throw new Error(`Expected last invokation to have receipt for "lastBlock" but none found.`); - } - - return new NumberV(invokation.receipt.blockNumber); - } - ), - - new Fetcher<{}, NumberV>( - ` - #### LastGas - - * "LastGas" - The gas consumed by the last transaction - `, - 'LastGas', - [], - async (world, {}) => { - let invokation = world.get('lastInvokation'); - if (!invokation) { - throw new Error(`Expected last invokation for "lastGas" but none found.`); - } - - if (!invokation.receipt) { - throw new Error(`Expected last invokation to have receipt for "lastGas" but none found.`); - } - - return new NumberV(invokation.receipt.gasUsed); - } - ), - - new Fetcher<{ els: Value[] }, AnythingV>( - ` - #### List - - * "List ..." - Returns a list of given elements - `, - 'List', - [new Arg('els', getCoreValue, { variadic: true, mapped: true })], - async (world, { els }) => new ListV(els) - ), - new Fetcher<{ val: Value; def: EventV }, Value>( - ` - #### Default - - * "Default val: def:" - Returns value if truthy, otherwise default. Note: this **does** short circuit. - `, - 'Default', - [new Arg('val', getCoreValue), new Arg('def', getEventV)], - async (world, { val, def }) => { - if (val.truthy()) { - return val; - } else { - return await getCoreValue(world, def.val); - } - } - ), - new Fetcher<{ minutes: NumberV }, NumberV>( - ` - #### Minutes - - * "Minutes minutes:" - Returns number of minutes in seconds - `, - 'Minutes', - [new Arg('minutes', getNumberV)], - async (world, { minutes }) => { - const minutesBn = new BigNumber(minutes.val); - return new NumberV(minutesBn.times(60).toFixed(0)); - } - ), - new Fetcher<{ hours: NumberV }, NumberV>( - ` - #### Hours - - * "Hours hours:" - Returns number of hours in seconds - `, - 'Hours', - [new Arg('hours', getNumberV)], - async (world, { hours }) => { - const hoursBn = new BigNumber(hours.val); - return new NumberV(hoursBn.times(3600).toFixed(0)); - } - ), - new Fetcher<{ days: NumberV }, NumberV>( - ` - #### Days - - * "Days days:" - Returns number of days in seconds - `, - 'Days', - [new Arg('days', getNumberV)], - async (world, { days }) => { - const daysBn = new BigNumber(days.val); - return new NumberV(daysBn.times(86400).toFixed(0)); - } - ), - new Fetcher<{ weeks: NumberV }, NumberV>( - ` - #### Weeks - - * "Weeks weeks:" - Returns number of weeks in seconds - `, - 'Weeks', - [new Arg('weeks', getNumberV)], - async (world, { weeks }) => { - const weeksBn = new BigNumber(weeks.val); - return new NumberV(weeksBn.times(604800).toFixed(0)); - } - ), - new Fetcher<{ years: NumberV }, NumberV>( - ` - #### Years - - * "Years years:" - Returns number of years in seconds - `, - 'Years', - [new Arg('years', getNumberV)], - async (world, { years }) => { - const yearsBn = new BigNumber(years.val); - return new NumberV(yearsBn.times(31536000).toFixed(0)); - } - ), - new Fetcher<{ seconds: NumberV }, NumberV>( - ` - #### FromNow - - * "FromNow seconds:" - Returns future timestamp of given seconds from now - `, - 'FromNow', - [new Arg('seconds', getNumberV)], - async (world, { seconds }) => { - const secondsBn = new BigNumber(seconds.val); - return new NumberV(secondsBn.plus(getCurrentTimestamp()).toFixed(0)); - } - ), - new Fetcher<{}, NumberV>( - ` - #### Now - - * "Now seconds:" - Returns current timestamp - `, - 'Now', - [], - async (world, {}) => { - return new NumberV(getCurrentTimestamp()); - } - ), - new Fetcher<{}, NumberV>( - ` - #### BlockTimestamp - - * "BlockTimestamp" - Returns the current block's timestamp - * E.g. "BlockTimestamp" - `, - 'BlockTimestamp', - [], - async (world, {}) => { - const {result: blockNumber}: any = await sendRPC(world, 'eth_blockNumber', []); - const {result: block}: any = await sendRPC(world, 'eth_getBlockByNumber', [blockNumber, false]); - return new NumberV(parseInt(block.timestamp, 16)); - } - ), - new Fetcher<{}, StringV>( - ` - #### Network - - * "Network" - Returns the current Network - `, - 'Network', - [], - async world => new StringV(world.network) - ), - new Fetcher<{ res: Value }, Value>( - ` - #### User - - * "User ...userArgs" - Returns user value - `, - 'User', - [new Arg('res', getUserValue, { variadic: true })], - async (world, { res }) => res, - { subExpressions: userFetchers() } - ), - new Fetcher<{ address: AddressV }, Value>( - ` - #### EtherBalance - - * "EtherBalance
" - Returns given address' ether balance. - `, - 'EtherBalance', - [new Arg('address', getAddressV)], - (world, { address }) => getEtherBalance(world, address.val) - ), - new Fetcher<{ given: Value; expected: Value }, BoolV>( - ` - #### Equal - - * "Equal given: expected:" - Returns true if given values are equal - * E.g. "Equal (Exactly 0) Zero" - * E.g. "Equal (CToken cZRX TotalSupply) (Exactly 55)" - * E.g. "Equal (CToken cZRX Comptroller) (Comptroller Address)" - `, - 'Equal', - [new Arg('given', getCoreValue), new Arg('expected', getCoreValue)], - async (world, { given, expected }) => new BoolV(expected.compareTo(world, given)) - ), - new Fetcher< - { - argTypes: StringV[]; - args: StringV[]; - }, - StringV - >( - ` - #### EncodeParameters - - * "EncodeParameters (...argTypes:) (...args:) - * E.g. "EncodeParameters (\"address\" \"address\") (\"0xabc\" \"0x123\") - `, - 'EncodeParameters', - [ - new Arg('argTypes', getStringV, { mapped: true }), - new Arg('args', getStringV, { mapped: true }) - ], - async (world, { argTypes, args }) => { - const realArgs = args.map((a, i) => { - if (argTypes[i].val == 'address') - return getAddress(world, a.val); - return a.val; - }); - return new StringV(world.web3.eth.abi.encodeParameters(argTypes.map(t => t.val), realArgs)); - } - ), - new Fetcher<{ res: Value }, Value>( - ` - #### Unitroller - - * "Unitroller ...unitrollerArgs" - Returns unitroller value - `, - 'Unitroller', - [new Arg('res', getUnitrollerValue, { variadic: true })], - async (world, { res }) => res, - { subExpressions: unitrollerFetchers() } - ), - new Fetcher<{ res: Value }, Value>( - ` - #### Comptroller - - * "Comptroller ...comptrollerArgs" - Returns comptroller value - `, - 'Comptroller', - [new Arg('res', getComptrollerValue, { variadic: true })], - async (world, { res }) => res, - { subExpressions: comptrollerFetchers() } - ), - new Fetcher<{ res: Value }, Value>( - ` - #### ComptrollerImpl - - * "ComptrollerImpl ...comptrollerImplArgs" - Returns comptroller implementation value - `, - 'ComptrollerImpl', - [new Arg('res', getComptrollerImplValue, { variadic: true })], - async (world, { res }) => res, - { subExpressions: comptrollerImplFetchers() } - ), - new Fetcher<{ res: Value }, Value>( - ` - #### CToken - - * "CToken ...cTokenArgs" - Returns cToken value - `, - 'CToken', - [new Arg('res', getCTokenValue, { variadic: true })], - async (world, { res }) => res, - { subExpressions: cTokenFetchers() } - ), - new Fetcher<{ res: Value }, Value>( - ` - #### CTokenDelegate - - * "CTokenDelegate ...cTokenDelegateArgs" - Returns cToken delegate value - `, - 'CTokenDelegate', - [new Arg('res', getCTokenDelegateValue, { variadic: true })], - async (world, { res }) => res, - { subExpressions: cTokenDelegateFetchers() } - ), - new Fetcher<{ res: Value }, Value>( - ` - #### Erc20 - - * "Erc20 ...erc20Args" - Returns Erc20 value - `, - 'Erc20', - [new Arg('res', getErc20Value, { variadic: true })], - async (world, { res }) => res, - { subExpressions: erc20Fetchers() } - ), - new Fetcher<{ res: Value }, Value>( - ` - #### InterestRateModel - - * "InterestRateModel ...interestRateModelArgs" - Returns InterestRateModel value - `, - 'InterestRateModel', - [new Arg('res', getInterestRateModelValue, { variadic: true })], - async (world, { res }) => res, - { subExpressions: interestRateModelFetchers() } - ), - new Fetcher<{ res: Value }, Value>( - ` - #### PriceOracle - - * "PriceOracle ...priceOracleArgs" - Returns PriceOracle value - `, - 'PriceOracle', - [new Arg('res', getPriceOracleValue, { variadic: true })], - async (world, { res }) => res, - { subExpressions: priceOracleFetchers() } - ), - new Fetcher<{ res: Value }, Value>( - ` - #### PriceOracleProxy - - * "PriceOracleProxy ...priceOracleProxyArgs" - Returns PriceOracleProxy value - `, - 'PriceOracleProxy', - [new Arg('res', getPriceOracleProxyValue, { variadic: true })], - async (world, { res }) => res, - { subExpressions: priceOracleProxyFetchers() } - ), - new Fetcher<{ res: Value }, Value>( - ` - #### AnchoredView - - * "AnchoredView ...anchoredViewArgs" - Returns AnchoredView value - `, - 'AnchoredView', - [new Arg('res', getAnchoredViewValue, { variadic: true })], - async (world, { res }) => res, - { subExpressions: anchoredViewFetchers() } - ), - new Fetcher<{ res: Value }, Value>( - ` - #### MCD - - * "MCD ...mcdArgs" - Returns MCD value - `, - 'MCD', - [new Arg('res', getMCDValue, { variadic: true })], - async (world, { res }) => res, - { subExpressions: mcdFetchers() } - ), - new Fetcher<{ res: Value }, Value>( - ` - #### Comp - - * "Comp ...compArgs" - Returns Comp value - `, - 'Comp', - [new Arg('res', getCompValue, { variadic: true })], - async (world, { res }) => res, - { subExpressions: compFetchers() } - ), -]; - -let contractFetchers = [ - { contract: "Counter", implicit: false }, - { contract: "Reservoir", implicit: true } -]; - -export async function getFetchers(world: World) { - if (world.fetchers) { - return { world, fetchers: world.fetchers }; - } - - let allFetchers = fetchers.concat(await Promise.all(contractFetchers.map(({contract, implicit}) => { - return buildContractFetcher(world, contract, implicit); - }))); - - return { world: world.set('fetchers', allFetchers), fetchers: allFetchers }; -} - -export async function getCoreValue(world: World, event: Event): Promise { - let {world: nextWorld, fetchers} = await getFetchers(world); - return await getFetcherValue('Core', fetchers, nextWorld, event); -} diff --git a/scenario/src/Encoding.ts b/scenario/src/Encoding.ts deleted file mode 100644 index 22a2b0a54..000000000 --- a/scenario/src/Encoding.ts +++ /dev/null @@ -1,18 +0,0 @@ -import BigNumber from 'bignumber.js'; - -const smallEnoughNumber = new BigNumber('100000000'); - -export type encodedNumber = number | BigNumber; - -// Returns the mantissa of an Exp with given floating value -export function getExpMantissa(float: number): encodedNumber { - // Workaround from https://github.com/ethereum/web3.js/issues/1920 - const str = Math.floor(float * 1.0e18).toString(); - - return toEncodableNum(str); -} - -export function toEncodableNum(amountArgRaw: string | encodedNumber): encodedNumber { - const bigNumber = new BigNumber(amountArgRaw); - return bigNumber.lt(smallEnoughNumber) ? bigNumber.toNumber() : bigNumber; -} diff --git a/scenario/src/ErrorReporter.ts b/scenario/src/ErrorReporter.ts deleted file mode 100644 index 8fd7367a6..000000000 --- a/scenario/src/ErrorReporter.ts +++ /dev/null @@ -1,121 +0,0 @@ - -import { utils } from 'ethers'; -import {ComptrollerErr, TokenErr} from './ErrorReporterConstants'; - -export interface ErrorReporter { - getError(error: any): string | null - getInfo(info: any): string | null - getDetail(error: any, detail: number): string - getEncodedCustomError(errorName: string, args: unknown[]): string | null -} - -class NoErrorReporterType implements ErrorReporter { - getError(error: any): string | null { - return null; - } - - getInfo(info: any): string | null { - return null; - } - - getDetail(error: any, detail: number): string { - return detail.toString(); - } - - getEncodedCustomError(errorName: string, args: unknown[]): string | null { - return null - } -} - -class CTokenErrorReporterType implements ErrorReporter { - getError(error: any): string | null { - if (error === null) { - return null; - } else { - return TokenErr.ErrorInv[Number(error)]; - } - } - - getInfo(info: any): string | null { - if (info === null) { - return null; - } else { - return TokenErr.FailureInfoInv[Number(info)]; - } - } - - getDetail(error: any, detail: number): string { - // Little hack to let us use proper names for cross-contract errors - if (this.getError(error) === "COMPTROLLER_REJECTION") { - let comptrollerError = ComptrollerErrorReporter.getError(detail); - - if (comptrollerError) { - return comptrollerError; - } - } - - return detail.toString(); - } - - getEncodedCustomError(errorName: string, args: unknown[]): string | null { - try { - return TokenErr.CustomErrors.encodeErrorResult(errorName, args) - } catch (err) { - return null - } - } -} - -class ComptrollerErrorReporterType implements ErrorReporter { - getError(error: any): string | null { - if (error === null) { - return null; - } else { - // TODO: This probably isn't right... - return ComptrollerErr.ErrorInv[Number(error)]; - } - } - - getInfo(info: any): string | null { - if (info === null) { - return null; - } else { - // TODO: This probably isn't right... - return ComptrollerErr.FailureInfoInv[Number(info)]; - } - } - - getDetail(error: any, detail: number): string { - if (this.getError(error) === "REJECTION") { - let comptrollerError = ComptrollerErrorReporter.getError(detail); - - if (comptrollerError) { - return comptrollerError; - } - } - - return detail.toString(); - } - - getEncodedCustomError(errorName: string, args: unknown[]): string | null { - try { - return ComptrollerErr.CustomErrors.encodeErrorResult(errorName, args) - } catch (err) { - return null - } - } -} - -export function formatResult(errorReporter: ErrorReporter, result: any): string { - const errorStr = errorReporter.getError(result); - if (errorStr !== null) { - return `Error=${errorStr}` - } else { - return `Result=${result}`; - } -} - -// Singleton instances -export const NoErrorReporter = new NoErrorReporterType(); -export const CTokenErrorReporter = new CTokenErrorReporterType(); -export const ComptrollerErrorReporter = new ComptrollerErrorReporterType(); diff --git a/scenario/src/ErrorReporterConstants.ts b/scenario/src/ErrorReporterConstants.ts deleted file mode 100644 index fa4e13d7e..000000000 --- a/scenario/src/ErrorReporterConstants.ts +++ /dev/null @@ -1,243 +0,0 @@ -import * as ethers from 'ethers' -interface ErrorReporterEnum { - Error: string[] - FailureInfo: string[] - CustomErrors?: string[] -} - -interface ErrorTypes { - Error: {[name: string]: number} - FailureInfo: {[name: string]: number} - ErrorInv: {[code: number]: string} - FailureInfoInv: {[code: number]: string} - CustomErrors: ethers.utils.Interface -} - -const ComptrollerErrorReporter = { - Error: [ - 'NO_ERROR', - 'UNAUTHORIZED', - 'COMPTROLLER_MISMATCH', - 'INSUFFICIENT_SHORTFALL', - 'INSUFFICIENT_LIQUIDITY', - 'INVALID_CLOSE_FACTOR', - 'INVALID_COLLATERAL_FACTOR', - 'INVALID_LIQUIDATION_INCENTIVE', - 'MARKET_NOT_ENTERED', - 'MARKET_NOT_LISTED', - 'MARKET_ALREADY_LISTED', - 'MATH_ERROR', - 'NONZERO_BORROW_BALANCE', - 'PRICE_ERROR', - 'REJECTION', - 'SNAPSHOT_ERROR', - 'TOO_MANY_ASSETS', - 'TOO_MUCH_REPAY' - ], - - FailureInfo: [ - 'ACCEPT_ADMIN_PENDING_ADMIN_CHECK', - 'ACCEPT_PENDING_IMPLEMENTATION_ADDRESS_CHECK', - 'EXIT_MARKET_BALANCE_OWED', - 'EXIT_MARKET_REJECTION', - 'SET_CLOSE_FACTOR_OWNER_CHECK', - 'SET_CLOSE_FACTOR_VALIDATION', - 'SET_COLLATERAL_FACTOR_OWNER_CHECK', - 'SET_COLLATERAL_FACTOR_NO_EXISTS', - 'SET_COLLATERAL_FACTOR_VALIDATION', - 'SET_COLLATERAL_FACTOR_WITHOUT_PRICE', - 'SET_IMPLEMENTATION_OWNER_CHECK', - 'SET_LIQUIDATION_INCENTIVE_OWNER_CHECK', - 'SET_LIQUIDATION_INCENTIVE_VALIDATION', - 'SET_MAX_ASSETS_OWNER_CHECK', - 'SET_PENDING_ADMIN_OWNER_CHECK', - 'SET_PENDING_IMPLEMENTATION_OWNER_CHECK', - 'SET_PRICE_ORACLE_OWNER_CHECK', - 'SUPPORT_MARKET_EXISTS', - 'SUPPORT_MARKET_OWNER_CHECK', - 'SET_PAUSE_GUARDIAN_OWNER_CHECK', - ] -}; - -const TokenErrorReporter = { - Error: [ - 'NO_ERROR', - 'UNAUTHORIZED', - 'BAD_INPUT', - 'COMPTROLLER_REJECTION', - 'COMPTROLLER_CALCULATION_ERROR', - 'INTEREST_RATE_MODEL_ERROR', - 'INVALID_ACCOUNT_PAIR', - 'INVALID_CLOSE_AMOUNT_REQUESTED', - 'INVALID_COLLATERAL_FACTOR', - 'MATH_ERROR', - 'MARKET_NOT_FRESH', - 'MARKET_NOT_LISTED', - 'TOKEN_INSUFFICIENT_ALLOWANCE', - 'TOKEN_INSUFFICIENT_BALANCE', - 'TOKEN_INSUFFICIENT_CASH', - 'TOKEN_TRANSFER_IN_FAILED', - 'TOKEN_TRANSFER_OUT_FAILED' - ], - - FailureInfo: [ - 'ACCEPT_ADMIN_PENDING_ADMIN_CHECK', - 'ACCRUE_INTEREST_ACCUMULATED_INTEREST_CALCULATION_FAILED', - 'ACCRUE_INTEREST_BORROW_RATE_CALCULATION_FAILED', - 'ACCRUE_INTEREST_NEW_BORROW_INDEX_CALCULATION_FAILED', - 'ACCRUE_INTEREST_NEW_TOTAL_BORROWS_CALCULATION_FAILED', - 'ACCRUE_INTEREST_NEW_TOTAL_RESERVES_CALCULATION_FAILED', - 'ACCRUE_INTEREST_SIMPLE_INTEREST_FACTOR_CALCULATION_FAILED', - 'BORROW_ACCUMULATED_BALANCE_CALCULATION_FAILED', - 'BORROW_ACCRUE_INTEREST_FAILED', - 'BORROW_CASH_NOT_AVAILABLE', - 'BORROW_FRESHNESS_CHECK', - 'BORROW_NEW_TOTAL_BALANCE_CALCULATION_FAILED', - 'BORROW_NEW_ACCOUNT_BORROW_BALANCE_CALCULATION_FAILED', - 'BORROW_MARKET_NOT_LISTED', - 'BORROW_COMPTROLLER_REJECTION', - 'LIQUIDATE_ACCRUE_BORROW_INTEREST_FAILED', - 'LIQUIDATE_ACCRUE_COLLATERAL_INTEREST_FAILED', - 'LIQUIDATE_COLLATERAL_FRESHNESS_CHECK', - 'LIQUIDATE_COMPTROLLER_REJECTION', - 'LIQUIDATE_COMPTROLLER_CALCULATE_AMOUNT_SEIZE_FAILED', - 'LIQUIDATE_CLOSE_AMOUNT_IS_UINT_MAX', - 'LIQUIDATE_CLOSE_AMOUNT_IS_ZERO', - 'LIQUIDATE_FRESHNESS_CHECK', - 'LIQUIDATE_LIQUIDATOR_IS_BORROWER', - 'LIQUIDATE_REPAY_BORROW_FRESH_FAILED', - 'LIQUIDATE_SEIZE_BALANCE_INCREMENT_FAILED', - 'LIQUIDATE_SEIZE_BALANCE_DECREMENT_FAILED', - 'LIQUIDATE_SEIZE_COMPTROLLER_REJECTION', - 'LIQUIDATE_SEIZE_LIQUIDATOR_IS_BORROWER', - 'LIQUIDATE_SEIZE_TOO_MUCH', - 'MINT_ACCRUE_INTEREST_FAILED', - 'MINT_COMPTROLLER_REJECTION', - 'MINT_EXCHANGE_CALCULATION_FAILED', - 'MINT_EXCHANGE_RATE_READ_FAILED', - 'MINT_FRESHNESS_CHECK', - 'MINT_NEW_ACCOUNT_BALANCE_CALCULATION_FAILED', - 'MINT_NEW_TOTAL_SUPPLY_CALCULATION_FAILED', - 'MINT_TRANSFER_IN_FAILED', - 'MINT_TRANSFER_IN_NOT_POSSIBLE', - 'REDEEM_ACCRUE_INTEREST_FAILED', - 'REDEEM_COMPTROLLER_REJECTION', - 'REDEEM_EXCHANGE_TOKENS_CALCULATION_FAILED', - 'REDEEM_EXCHANGE_AMOUNT_CALCULATION_FAILED', - 'REDEEM_EXCHANGE_RATE_READ_FAILED', - 'REDEEM_FRESHNESS_CHECK', - 'REDEEM_NEW_ACCOUNT_BALANCE_CALCULATION_FAILED', - 'REDEEM_NEW_TOTAL_SUPPLY_CALCULATION_FAILED', - 'REDEEM_TRANSFER_OUT_NOT_POSSIBLE', - 'REDUCE_RESERVES_ACCRUE_INTEREST_FAILED', - 'REDUCE_RESERVES_ADMIN_CHECK', - 'REDUCE_RESERVES_CASH_NOT_AVAILABLE', - 'REDUCE_RESERVES_FRESH_CHECK', - 'REDUCE_RESERVES_VALIDATION', - 'REPAY_BEHALF_ACCRUE_INTEREST_FAILED', - 'REPAY_BORROW_ACCRUE_INTEREST_FAILED', - 'REPAY_BORROW_ACCUMULATED_BALANCE_CALCULATION_FAILED', - 'REPAY_BORROW_COMPTROLLER_REJECTION', - 'REPAY_BORROW_FRESHNESS_CHECK', - 'REPAY_BORROW_NEW_ACCOUNT_BORROW_BALANCE_CALCULATION_FAILED', - 'REPAY_BORROW_NEW_TOTAL_BALANCE_CALCULATION_FAILED', - 'REPAY_BORROW_TRANSFER_IN_NOT_POSSIBLE', - 'SET_COLLATERAL_FACTOR_OWNER_CHECK', - 'SET_COLLATERAL_FACTOR_VALIDATION', - 'SET_COMPTROLLER_OWNER_CHECK', - 'SET_INTEREST_RATE_MODEL_ACCRUE_INTEREST_FAILED', - 'SET_INTEREST_RATE_MODEL_FRESH_CHECK', - 'SET_INTEREST_RATE_MODEL_OWNER_CHECK', - 'SET_MAX_ASSETS_OWNER_CHECK', - 'SET_ORACLE_MARKET_NOT_LISTED', - 'SET_PENDING_ADMIN_OWNER_CHECK', - 'SET_RESERVE_FACTOR_ACCRUE_INTEREST_FAILED', - 'SET_RESERVE_FACTOR_ADMIN_CHECK', - 'SET_RESERVE_FACTOR_FRESH_CHECK', - 'SET_RESERVE_FACTOR_BOUNDS_CHECK', - 'TRANSFER_COMPTROLLER_REJECTION', - 'TRANSFER_NOT_ALLOWED', - 'TRANSFER_NOT_ENOUGH', - 'TRANSFER_TOO_MUCH', - 'ADD_RESERVES_ACCRUE_INTEREST_FAILED', - 'ADD_RESERVES_FRESH_CHECK', - 'ADD_RESERVES_TRANSFER_IN_NOT_POSSIBLE' - ], - - CustomErrors: [ - "error TransferComptrollerRejection(uint256 errorCode)", - "error TransferNotAllowed()", - "error TransferNotEnough()", - "error TransferTooMuch()", - - "error MintComptrollerRejection(uint256 errorCode)", - "error MintFreshnessCheck()", - - "error RedeemComptrollerRejection(uint256 errorCode)", - "error RedeemFreshnessCheck()", - "error RedeemTransferOutNotPossible()", - - "error BorrowComptrollerRejection(uint256 errorCode)", - "error BorrowFreshnessCheck()", - "error BorrowCashNotAvailable()", - - "error RepayBorrowComptrollerRejection(uint256 errorCode)", - "error RepayBorrowFreshnessCheck()", - - "error LiquidateComptrollerRejection(uint256 errorCode)", - "error LiquidateFreshnessCheck()", - "error LiquidateCollateralFreshnessCheck()", - "error LiquidateAccrueBorrowInterestFailed(uint256 errorCode)", - "error LiquidateAccrueCollateralInterestFailed(uint256 errorCode)", - "error LiquidateLiquidatorIsBorrower()", - "error LiquidateCloseAmountIsZero()", - "error LiquidateCloseAmountIsUintMax()", - "error LiquidateRepayBorrowFreshFailed(uint256 errorCode)", - - "error LiquidateSeizeComptrollerRejection(uint256 errorCode)", - "error LiquidateSeizeLiquidatorIsBorrower()", - - "error AcceptAdminPendingAdminCheck()", - - "error SetComptrollerOwnerCheck()", - "error SetPendingAdminOwnerCheck()", - - "error SetReserveFactorAdminCheck()", - "error SetReserveFactorFreshCheck()", - "error SetReserveFactorBoundsCheck()", - - "error AddReservesFactorFreshCheck(uint256 actualAddAmount)", - - "error ReduceReservesAdminCheck()", - "error ReduceReservesFreshCheck()", - "error ReduceReservesCashNotAvailable()", - "error ReduceReservesCashValidation()", - - "error SetInterestRateModelOwnerCheck()", - "error SetInterestRateModelFreshCheck();", - ] -}; - -function parseEnum(reporterEnum: ErrorReporterEnum): ErrorTypes { - const Error: {[name: string]: number} = {}; - const ErrorInv: {[code: number]: string} = {}; - const FailureInfo: {[name: string]: number} = {}; - const FailureInfoInv: {[code: number]: string} = {}; - - reporterEnum.Error.forEach((entry, i) => { - Error[entry] = i; - ErrorInv[i] = entry; - }); - - reporterEnum.FailureInfo.forEach((entry, i) => { - FailureInfo[entry] = i; - FailureInfoInv[i] = entry; - }); - - const CustomErrors = new ethers.utils.Interface(reporterEnum.CustomErrors || []) - - return {Error, ErrorInv, FailureInfo, FailureInfoInv, CustomErrors}; -} - -export const ComptrollerErr = parseEnum(ComptrollerErrorReporter); -export const TokenErr = parseEnum(TokenErrorReporter); diff --git a/scenario/src/Event.ts b/scenario/src/Event.ts deleted file mode 100644 index b5eb6e373..000000000 --- a/scenario/src/Event.ts +++ /dev/null @@ -1,7 +0,0 @@ - -type ScalarEvent = string; -interface EventArray extends Array { - [index: number]: ScalarEvent | EventArray; -} - -export type Event = EventArray; diff --git a/scenario/src/Event/AssertionEvent.ts b/scenario/src/Event/AssertionEvent.ts deleted file mode 100644 index c660ec7f3..000000000 --- a/scenario/src/Event/AssertionEvent.ts +++ /dev/null @@ -1,509 +0,0 @@ -import { Event } from '../Event'; -import { fail, World } from '../World'; -import { getCoreValue } from '../CoreValue'; -import { Failure, InvokationRevertCustomError, InvokationRevertFailure } from '../Invokation'; -import { - getEventV, - getMapV, - getNumberV, - getStringV -} from '../CoreValue'; -import { - AddressV, - BoolV, - EventV, - ListV, - MapV, - NumberV, - Order, - StringV, - Value -} from '../Value'; -import { Arg, View, processCommandEvent } from '../Command'; -import { rawValues } from '../Utils'; - -async function assertApprox(world: World, given: NumberV, expected: NumberV, tolerance: NumberV): Promise { - if (Math.abs(Number(expected.sub(given).div(expected).val)) > Number(tolerance.val)) { - return fail(world, `Expected ${given.toString()} to approximately equal ${expected.toString()} within ${tolerance.toString()}`); - } - - return world; -} - -async function assertEqual(world: World, given: Value, expected: Value): Promise { - if (!expected.compareTo(world, given)) { - return fail(world, `Expected ${given.toString()} to equal ${expected.toString()}`); - } - - return world; -} - -async function assertLessThan(world: World, given: Value, expected: Value): Promise { - if (given.compareOrder(world, expected) !== Order.LESS_THAN) { - return fail(world, `Expected ${given.toString()} to be less than ${expected.toString()}`); - } - - return world; -} - -async function assertGreaterThan(world: World, given: Value, expected: Value): Promise { - if (given.compareOrder(world, expected) !== Order.GREATER_THAN) { - return fail(world, `Expected ${given.toString()} to be greater than ${expected.toString()}`); - } - - return world; -} - -async function assertFailure(world: World, failure: Failure): Promise { - if (!world.lastInvokation) { - return fail(world, `Expected ${failure.toString()}, but missing any invokations.`); - } - - if (world.lastInvokation.success()) { - return fail(world, `Expected ${failure.toString()}, but last invokation was successful with result ${JSON.stringify(world.lastInvokation.value)}.`); - } - - if (world.lastInvokation.error) { - return fail(world, `Expected ${failure.toString()}, but last invokation threw error ${world.lastInvokation.error}.`); - } - - if (world.lastInvokation.failures.length === 0) { - throw new Error(`Invokation requires success, failure or error, got: ${world.lastInvokation.toString()}`); - } - - if (world.lastInvokation.failures.find((f) => f.equals(failure)) === undefined) { - return fail(world, `Expected ${failure.toString()}, but got ${world.lastInvokation.failures.toString()}.`); - } - - return world; -} - -// coverage tests don't currently support checking full message given with a revert -function coverageSafeRevertMessage(world: World, message: string): string { - if (world.network === 'coverage') { - return "revert"; - } else { - return message; - } -} - -async function assertRevertFailure(world: World, err: string, message: string): Promise { - if (world.network === 'coverage') { // coverage doesn't have detailed message, thus no revert failures - return await assertRevert(world, message); - } - - if (!world.lastInvokation) { - return fail(world, `Expected revert failure, but missing any invokations.`); - } - - if (world.lastInvokation.success()) { - return fail(world, `Expected revert failure, but last invokation was successful with result ${JSON.stringify(world.lastInvokation.value)}.`); - } - - if (world.lastInvokation.failures.length > 0) { - return fail(world, `Expected revert failure, but got ${world.lastInvokation.failures.toString()}.`); - } - - if (!world.lastInvokation.error) { - throw new Error(`Invokation requires success, failure or error, got: ${world.lastInvokation.toString()}`); - } - - if (!(world.lastInvokation.error instanceof InvokationRevertFailure)) { - throw new Error(`Invokation error mismatch, expected revert failure: "${err}, ${message}", got: "${world.lastInvokation.error.toString()}"`); - } - - const expectedMessage = `VM Exception while processing transaction: ${coverageSafeRevertMessage(world, message)}`; - - if (world.lastInvokation.error.error !== err || world.lastInvokation.error.errMessage !== expectedMessage) { - throw new Error(`Invokation error mismatch, expected revert failure: err=${err}, message="${expectedMessage}", got: "${world.lastInvokation.error.toString()}"`); - } - - return world; -} - -async function assertRevertCustomError(world: World, err: string, args: unknown[]): Promise { - if (world.network === 'coverage') { // coverage doesn't have detailed message, thus no revert failures - return await assertRevert(world, "revert"); - } - - if (!world.lastInvokation) { - return fail(world, `Expected revert failure, but missing any invokations.`); - } - - if (world.lastInvokation.success()) { - return fail(world, `Expected revert failure, but last invokation was successful with result ${JSON.stringify(world.lastInvokation.value)}.`); - } - - if (world.lastInvokation.failures.length > 0) { - return fail(world, `Expected revert failure, but got ${world.lastInvokation.failures.toString()}.`); - } - - if (!world.lastInvokation.error) { - throw new Error(`Invokation requires success, failure or error, got: ${world.lastInvokation.toString()}`); - } - - if (!(world.lastInvokation.error instanceof InvokationRevertCustomError)) { - throw new Error(`Invokation error mismatch, expected revert custom error: "${err}", got: "${world.lastInvokation.error.toString()}"`); - } - - const expectedResult = world.lastInvokation.errorReporter.getEncodedCustomError(err, args); - - if (!expectedResult) { - throw new Error(`Expected revert with custom error, but custom error ${err} not found`) - } - - if (Object.values(world.lastInvokation.error.errorResults).findIndex(v => v.error === 'revert' && v.return === expectedResult) < 0) { - throw new Error(`Invokation error mismatch, expected revert custom error: err=${err}, args="${args.join(',')}", got: "${world.lastInvokation.error.toString()}"`); - } - - return world; -} - -async function assertError(world: World, message: string): Promise { - if (!world.lastInvokation) { - return fail(world, `Expected revert, but missing any invokations.`); - } - - if (world.lastInvokation.success()) { - return fail(world, `Expected revert, but last invokation was successful with result ${JSON.stringify(world.lastInvokation.value)}.`); - } - - if (world.lastInvokation.failures.length > 0) { - return fail(world, `Expected revert, but got ${world.lastInvokation.failures.toString()}.`); - } - - if (!world.lastInvokation.error) { - throw new Error(`Invokation requires success, failure or error, got: ${world.lastInvokation.toString()}`); - } - - if (!world.lastInvokation.error.message.startsWith(message)) { - throw new Error(`Invokation error mismatch, expected: "${message}", got: "${world.lastInvokation.error.message}"`); - } - - return world; -} - -function buildRevertMessage(world: World, message: string): string { - return `VM Exception while processing transaction: ${coverageSafeRevertMessage(world, message)}` -} - -async function assertRevert(world: World, message: string): Promise { - return await assertError(world, buildRevertMessage(world, message)); -} - -async function assertSuccess(world: World): Promise { - if (!world.lastInvokation || world.lastInvokation.success()) { - return world; - } else { - return fail(world, `Expected success, but got ${world.lastInvokation.toString()}.`); - } -} - -async function assertReadError(world: World, event: Event, message: string, isRevert: boolean): Promise { - try { - let value = await getCoreValue(world, event); - - throw new Error(`Expected read revert, instead got value \`${value}\``); - } catch (err) { - let expectedMessage; - if (isRevert) { - expectedMessage = buildRevertMessage(world, message); - } else { - expectedMessage = message; - } - - world.expect(expectedMessage).toEqual(err.message); // XXXS "expected read revert" - } - - return world; -} - -function getLogValue(value: any): Value { - if (typeof value === 'number' || (typeof value === 'string' && value.match(/^[0-9]+$/))) { - return new NumberV(Number(value)); - } else if (typeof value === 'string') { - return new StringV(value); - } else if (typeof value === 'boolean') { - return new BoolV(value); - } else if (Array.isArray(value)) { - return new ListV(value.map(getLogValue)); - } else { - throw new Error('Unknown type of log parameter: ${value}'); - } -} - -async function assertLog(world: World, event: string, keyValues: MapV): Promise { - if (!world.lastInvokation) { - return fail(world, `Expected log message "${event}" from contract execution, but world missing any invokations.`); - } else if (!world.lastInvokation.receipt) { - return fail(world, `Expected log message "${event}" from contract execution, but world invokation transaction.`); - } else { - const log = world.lastInvokation.receipt.events && world.lastInvokation.receipt.events[event]; - - if (!log) { - const events = Object.keys(world.lastInvokation.receipt.events || {}).join(', '); - return fail(world, `Expected log with event \`${event}\`, found logs with events: [${events}]`); - } - - if (Array.isArray(log)) { - const found = log.find(_log => { - return Object.entries(keyValues.val).reduce((previousValue, currentValue) => { - const [key, value] = currentValue; - if (previousValue) { - if (_log.returnValues[key] === undefined) { - return false; - } else { - let logValue = getLogValue(_log.returnValues[key]); - - if (!logValue.compareTo(world, value)) { - return false; - } - - return true; - } - } - return previousValue; - }, true as boolean); - }); - - if (!found) { - const eventExpected = Object.entries(keyValues.val).join(', '); - const eventDetailsFound = log.map(_log => { - return Object.entries(_log.returnValues); - }); - return fail(world, `Expected log with event \`${eventExpected}\`, found logs for this event with: [${eventDetailsFound}]`); - } - - } else { - Object.entries(keyValues.val).forEach(([key, value]) => { - if (log.returnValues[key] === undefined) { - fail(world, `Expected log to have param for \`${key}\``); - } else { - let logValue = getLogValue(log.returnValues[key]); - - if (!logValue.compareTo(world, value)) { - fail(world, `Expected log to have param \`${key}\` to match ${value.toString()}, but got ${logValue.toString()}`); - } - } - }); - } - - return world; - } -} - -export function assertionCommands() { - return [ - new View<{ given: NumberV, expected: NumberV, tolerance: NumberV }>(` - #### Approx - - * "Approx given: expected: tolerance:" - Asserts that given approximately matches expected. - * E.g. "Assert Approx (Exactly 0) Zero " - * E.g. "Assert Approx (CToken cZRX TotalSupply) (Exactly 55) 1e-18" - * E.g. "Assert Approx (CToken cZRX Comptroller) (Comptroller Address) 1" - `, - "Approx", - [ - new Arg("given", getNumberV), - new Arg("expected", getNumberV), - new Arg("tolerance", getNumberV, { default: new NumberV(0.001) }) - ], - (world, { given, expected, tolerance }) => assertApprox(world, given, expected, tolerance) - ), - - new View<{ given: Value, expected: Value }>(` - #### Equal - - * "Equal given: expected:" - Asserts that given matches expected. - * E.g. "Assert Equal (Exactly 0) Zero" - * E.g. "Assert Equal (CToken cZRX TotalSupply) (Exactly 55)" - * E.g. "Assert Equal (CToken cZRX Comptroller) (Comptroller Address)" - `, - "Equal", - [ - new Arg("given", getCoreValue), - new Arg("expected", getCoreValue) - ], - (world, { given, expected }) => assertEqual(world, given, expected) - ), - - new View<{ given: Value, expected: Value }>(` - #### LessThan - - * "given: LessThan expected:" - Asserts that given is less than expected. - * E.g. "Assert (Exactly 0) LessThan (Exactly 1)" - `, - "LessThan", - [ - new Arg("given", getCoreValue), - new Arg("expected", getCoreValue) - ], - (world, { given, expected }) => assertLessThan(world, given, expected), - { namePos: 1 } - ), - - new View<{ given: Value, expected: Value }>(` - #### GreaterThan - - * "given: GreaterThan expected:" - Asserts that given is greater than the expected. - * E.g. "Assert (Exactly 0) GreaterThan (Exactly 1)" - `, - "GreaterThan", - [ - new Arg("given", getCoreValue), - new Arg("expected", getCoreValue) - ], - (world, { given, expected }) => assertGreaterThan(world, given, expected), - { namePos: 1 } - ), - - new View<{ given: Value }>(` - #### True - - * "True given:" - Asserts that given is true. - * E.g. "Assert True (Comptroller CheckMembership Geoff cETH)" - `, - "True", - [ - new Arg("given", getCoreValue) - ], - (world, { given }) => assertEqual(world, given, new BoolV(true)) - ), - - new View<{ given: Value }>(` - #### False - - * "False given:" - Asserts that given is false. - * E.g. "Assert False (Comptroller CheckMembership Geoff cETH)" - `, - "False", - [ - new Arg("given", getCoreValue) - ], - (world, { given }) => assertEqual(world, given, new BoolV(false)) - ), - new View<{ event: EventV, message: StringV }>(` - #### ReadRevert - - * "ReadRevert event: message:" - Asserts that reading the given value reverts with given message. - * E.g. "Assert ReadRevert (Comptroller CheckMembership Geoff cETH) \"revert\"" - `, - "ReadRevert", - [ - new Arg("event", getEventV), - new Arg("message", getStringV) - ], - (world, { event, message }) => assertReadError(world, event.val, message.val, true) - ), - - new View<{ event: EventV, message: StringV }>(` - #### ReadError - - * "ReadError event: message:" - Asserts that reading the given value throws given error - * E.g. "Assert ReadError (Comptroller Bad Address) \"cannot find comptroller\"" - `, - "ReadError", - [ - new Arg("event", getEventV), - new Arg("message", getStringV) - ], - (world, { event, message }) => assertReadError(world, event.val, message.val, false) - ), - - new View<{ error: StringV, info: StringV, detail: StringV }>(` - #### Failure - - * "Failure error: info: detail:" - Asserts that last transaction had a graceful failure with given error, info and detail. - * E.g. "Assert Failure UNAUTHORIZED SUPPORT_MARKET_OWNER_CHECK" - * E.g. "Assert Failure MATH_ERROR MINT_CALCULATE_BALANCE 5" - `, - "Failure", - [ - new Arg("error", getStringV), - new Arg("info", getStringV), - new Arg("detail", getStringV, { default: new StringV("0") }), - ], - (world, { error, info, detail }) => assertFailure(world, new Failure(error.val, info.val, detail.val)) - ), - - new View<{ error: StringV, message: StringV }>(` - #### RevertFailure - - * "RevertFailure error: message:" - Assert last transaction reverted with a message beginning with an error code - * E.g. "Assert RevertFailure UNAUTHORIZED \"set reserves failed\"" - `, - "RevertFailure", - [ - new Arg("error", getStringV), - new Arg("message", getStringV), - ], - (world, { error, message }) => assertRevertFailure(world, error.val, message.val) - ), - - new View<{ error: StringV, args: StringV[] }>(` - #### RevertCustomError - - * "RevertCustomError error: args:<[]Value>" - Assert last transaction reverted with a message beginning with an error code - * E.g. "Assert RevertFailure UNAUTHORIZED \"set reserves failed\"" - `, - "RevertCustomError", - [ - new Arg("error", getStringV), - new Arg("args", getCoreValue, {variadic: true, mapped: true, default: []}), - ], - (world, { error, args }) => assertRevertCustomError(world, error.val, rawValues(args)) - ), - - new View<{ message: StringV }>(` - #### Revert - - * "Revert message:" - Asserts that the last transaction reverted. - `, - "Revert", - [ - new Arg("message", getStringV, { default: new StringV("revert") }), - ], - (world, { message }) => assertRevert(world, message.val) - ), - - new View<{ message: StringV }>(` - #### Error - - * "Error message:" - Asserts that the last transaction had the given error. - `, - "Error", - [ - new Arg("message", getStringV), - ], - (world, { message }) => assertError(world, message.val) - ), - - new View<{ given: Value }>(` - #### Success - - * "Success" - Asserts that the last transaction completed successfully (that is, did not revert nor emit graceful failure). - `, - "Success", - [], - (world, { given }) => assertSuccess(world) - ), - - new View<{ name: StringV, params: MapV }>(` - #### Log - - * "Log name: (key: value:) ..." - Asserts that last transaction emitted log with given name and key-value pairs. - * E.g. "Assert Log Minted ("account" (User Geoff address)) ("amount" (Exactly 55))" - `, - "Log", - [ - new Arg("name", getStringV), - new Arg("params", getMapV, { variadic: true }), - ], - (world, { name, params }) => assertLog(world, name.val, params) - ) - ]; -} - -export async function processAssertionEvent(world: World, event: Event, from: string | null): Promise { - return await processCommandEvent("Assertion", assertionCommands(), world, event, from); -} diff --git a/scenario/src/Event/CTokenDelegateEvent.ts b/scenario/src/Event/CTokenDelegateEvent.ts deleted file mode 100644 index 30f6ec966..000000000 --- a/scenario/src/Event/CTokenDelegateEvent.ts +++ /dev/null @@ -1,86 +0,0 @@ -import { Event } from '../Event'; -import { addAction, describeUser, World } from '../World'; -import { decodeCall, getPastEvents } from '../Contract'; -import { CToken, CTokenScenario } from '../Contract/CToken'; -import { CErc20Delegate } from '../Contract/CErc20Delegate' -import { invoke, Sendable } from '../Invokation'; -import { - getAddressV, - getEventV, - getExpNumberV, - getNumberV, - getStringV, - getBoolV -} from '../CoreValue'; -import { - AddressV, - BoolV, - EventV, - NothingV, - NumberV, - StringV -} from '../Value'; -import { Arg, Command, View, processCommandEvent } from '../Command'; -import { getCTokenDelegateData } from '../ContractLookup'; -import { buildCTokenDelegate } from '../Builder/CTokenDelegateBuilder'; -import { verify } from '../Verify'; - -async function genCTokenDelegate(world: World, from: string, event: Event): Promise { - let { world: nextWorld, cTokenDelegate, delegateData } = await buildCTokenDelegate(world, from, event); - world = nextWorld; - - world = addAction( - world, - `Added cToken ${delegateData.name} (${delegateData.contract}) at address ${cTokenDelegate._address}`, - delegateData.invokation - ); - - return world; -} - -async function verifyCTokenDelegate(world: World, cTokenDelegate: CErc20Delegate, name: string, contract: string, apiKey: string): Promise { - if (world.isLocalNetwork()) { - world.printer.printLine(`Politely declining to verify on local network: ${world.network}.`); - } else { - await verify(world, apiKey, name, contract, cTokenDelegate._address); - } - - return world; -} - -export function cTokenDelegateCommands() { - return [ - new Command<{ cTokenDelegateParams: EventV }>(` - #### Deploy - - * "CTokenDelegate Deploy ...cTokenDelegateParams" - Generates a new CTokenDelegate - * E.g. "CTokenDelegate Deploy CDaiDelegate cDAIDelegate" - `, - "Deploy", - [new Arg("cTokenDelegateParams", getEventV, { variadic: true })], - (world, from, { cTokenDelegateParams }) => genCTokenDelegate(world, from, cTokenDelegateParams.val) - ), - new View<{ cTokenDelegateArg: StringV, apiKey: StringV }>(` - #### Verify - - * "CTokenDelegate Verify apiKey:" - Verifies CTokenDelegate in Etherscan - * E.g. "CTokenDelegate cDaiDelegate Verify "myApiKey" - `, - "Verify", - [ - new Arg("cTokenDelegateArg", getStringV), - new Arg("apiKey", getStringV) - ], - async (world, { cTokenDelegateArg, apiKey }) => { - let [cToken, name, data] = await getCTokenDelegateData(world, cTokenDelegateArg.val); - - return await verifyCTokenDelegate(world, cToken, name, data.get('contract')!, apiKey.val); - }, - { namePos: 1 } - ), - ]; -} - -export async function processCTokenDelegateEvent(world: World, event: Event, from: string | null): Promise { - return await processCommandEvent("CTokenDelegate", cTokenDelegateCommands(), world, event, from); -} diff --git a/scenario/src/Event/CTokenEvent.ts b/scenario/src/Event/CTokenEvent.ts deleted file mode 100644 index bb0df3ba3..000000000 --- a/scenario/src/Event/CTokenEvent.ts +++ /dev/null @@ -1,934 +0,0 @@ -import { Event } from '../Event'; -import { addAction, describeUser, World } from '../World'; -import { decodeCall, getPastEvents } from '../Contract'; -import { CToken, CTokenScenario } from '../Contract/CToken'; -import { CErc20Delegate } from '../Contract/CErc20Delegate' -import { CErc20Delegator } from '../Contract/CErc20Delegator' -import { invoke, Sendable } from '../Invokation'; -import { - getAddressV, - getEventV, - getExpNumberV, - getNumberV, - getStringV, - getBoolV -} from '../CoreValue'; -import { - AddressV, - BoolV, - EventV, - NothingV, - NumberV, - StringV -} from '../Value'; -import { getContract } from '../Contract'; -import { Arg, Command, View, processCommandEvent } from '../Command'; -import { CTokenErrorReporter } from '../ErrorReporter'; -import { getComptroller, getCTokenData } from '../ContractLookup'; -import { getExpMantissa } from '../Encoding'; -import { buildCToken } from '../Builder/CTokenBuilder'; -import { verify } from '../Verify'; -import { getLiquidity } from '../Value/ComptrollerValue'; -import { encodedNumber } from '../Encoding'; -import { getCTokenV, getCErc20DelegatorV } from '../Value/CTokenValue'; - -function showTrxValue(world: World): string { - return new NumberV(world.trxInvokationOpts.get('value')).show(); -} - -async function genCToken(world: World, from: string, event: Event): Promise { - let { world: nextWorld, cToken, tokenData } = await buildCToken(world, from, event); - world = nextWorld; - - world = addAction( - world, - `Added cToken ${tokenData.name} (${tokenData.contract}) at address ${cToken._address}`, - tokenData.invokation - ); - - return world; -} - -async function accrueInterest(world: World, from: string, cToken: CToken): Promise { - let invokation = await invoke(world, cToken.methods.accrueInterest(), from, CTokenErrorReporter); - - world = addAction( - world, - `CToken ${cToken.name}: Interest accrued`, - invokation - ); - - return world; -} - -async function mint(world: World, from: string, cToken: CToken, amount: NumberV | NothingV): Promise { - let invokation; - let showAmount; - - if (amount instanceof NumberV) { - showAmount = amount.show(); - invokation = await invoke(world, cToken.methods.mint(amount.encode()), from, CTokenErrorReporter); - } else { - showAmount = showTrxValue(world); - invokation = await invoke(world, cToken.methods.mint(), from, CTokenErrorReporter); - } - - world = addAction( - world, - `CToken ${cToken.name}: ${describeUser(world, from)} mints ${showAmount}`, - invokation - ); - - return world; -} - -async function redeem(world: World, from: string, cToken: CToken, tokens: NumberV): Promise { - let invokation = await invoke(world, cToken.methods.redeem(tokens.encode()), from, CTokenErrorReporter); - - world = addAction( - world, - `CToken ${cToken.name}: ${describeUser(world, from)} redeems ${tokens.show()} tokens`, - invokation - ); - - return world; -} - -async function redeemUnderlying(world: World, from: string, cToken: CToken, amount: NumberV): Promise { - let invokation = await invoke(world, cToken.methods.redeemUnderlying(amount.encode()), from, CTokenErrorReporter); - - world = addAction( - world, - `CToken ${cToken.name}: ${describeUser(world, from)} redeems ${amount.show()} underlying`, - invokation - ); - - return world; -} - -async function borrow(world: World, from: string, cToken: CToken, amount: NumberV): Promise { - let invokation = await invoke(world, cToken.methods.borrow(amount.encode()), from, CTokenErrorReporter); - - world = addAction( - world, - `CToken ${cToken.name}: ${describeUser(world, from)} borrows ${amount.show()}`, - invokation - ); - - return world; -} - -async function repayBorrow(world: World, from: string, cToken: CToken, amount: NumberV | NothingV): Promise { - let invokation; - let showAmount; - - if (amount instanceof NumberV) { - showAmount = amount.show(); - invokation = await invoke(world, cToken.methods.repayBorrow(amount.encode()), from, CTokenErrorReporter); - } else { - showAmount = showTrxValue(world); - invokation = await invoke(world, cToken.methods.repayBorrow(), from, CTokenErrorReporter); - } - - world = addAction( - world, - `CToken ${cToken.name}: ${describeUser(world, from)} repays ${showAmount} of borrow`, - invokation - ); - - return world; -} - -async function repayBorrowBehalf(world: World, from: string, behalf: string, cToken: CToken, amount: NumberV | NothingV): Promise { - let invokation; - let showAmount; - - if (amount instanceof NumberV) { - showAmount = amount.show(); - invokation = await invoke(world, cToken.methods.repayBorrowBehalf(behalf, amount.encode()), from, CTokenErrorReporter); - } else { - showAmount = showTrxValue(world); - invokation = await invoke(world, cToken.methods.repayBorrowBehalf(behalf), from, CTokenErrorReporter); - } - - world = addAction( - world, - `CToken ${cToken.name}: ${describeUser(world, from)} repays ${showAmount} of borrow on behalf of ${describeUser(world, behalf)}`, - invokation - ); - - return world; -} - -async function liquidateBorrow(world: World, from: string, cToken: CToken, borrower: string, collateral: CToken, repayAmount: NumberV | NothingV): Promise { - let invokation; - let showAmount; - - if (repayAmount instanceof NumberV) { - showAmount = repayAmount.show(); - invokation = await invoke(world, cToken.methods.liquidateBorrow(borrower, repayAmount.encode(), collateral._address), from, CTokenErrorReporter); - } else { - showAmount = showTrxValue(world); - invokation = await invoke(world, cToken.methods.liquidateBorrow(borrower, collateral._address), from, CTokenErrorReporter); - } - - world = addAction( - world, - `CToken ${cToken.name}: ${describeUser(world, from)} liquidates ${showAmount} from of ${describeUser(world, borrower)}, seizing ${collateral.name}.`, - invokation - ); - - return world; -} - -async function seize(world: World, from: string, cToken: CToken, liquidator: string, borrower: string, seizeTokens: NumberV): Promise { - let invokation = await invoke(world, cToken.methods.seize(liquidator, borrower, seizeTokens.encode()), from, CTokenErrorReporter); - - world = addAction( - world, - `CToken ${cToken.name}: ${describeUser(world, from)} initiates seizing ${seizeTokens.show()} to ${describeUser(world, liquidator)} from ${describeUser(world, borrower)}.`, - invokation - ); - - return world; -} - -async function evilSeize(world: World, from: string, cToken: CToken, treasure: CToken, liquidator: string, borrower: string, seizeTokens: NumberV): Promise { - let invokation = await invoke(world, cToken.methods.evilSeize(treasure._address, liquidator, borrower, seizeTokens.encode()), from, CTokenErrorReporter); - - world = addAction( - world, - `CToken ${cToken.name}: ${describeUser(world, from)} initiates illegal seizing ${seizeTokens.show()} to ${describeUser(world, liquidator)} from ${describeUser(world, borrower)}.`, - invokation - ); - - return world; -} - -async function setPendingAdmin(world: World, from: string, cToken: CToken, newPendingAdmin: string): Promise { - let invokation = await invoke(world, cToken.methods._setPendingAdmin(newPendingAdmin), from, CTokenErrorReporter); - - world = addAction( - world, - `CToken ${cToken.name}: ${describeUser(world, from)} sets pending admin to ${newPendingAdmin}`, - invokation - ); - - return world; -} - -async function acceptAdmin(world: World, from: string, cToken: CToken): Promise { - let invokation = await invoke(world, cToken.methods._acceptAdmin(), from, CTokenErrorReporter); - - world = addAction( - world, - `CToken ${cToken.name}: ${describeUser(world, from)} accepts admin`, - invokation - ); - - return world; -} - -async function addReserves(world: World, from: string, cToken: CToken, amount: NumberV): Promise { - let invokation = await invoke(world, cToken.methods._addReserves(amount.encode()), from, CTokenErrorReporter); - - world = addAction( - world, - `CToken ${cToken.name}: ${describeUser(world, from)} adds to reserves by ${amount.show()}`, - invokation - ); - - return world; -} - -async function reduceReserves(world: World, from: string, cToken: CToken, amount: NumberV): Promise { - let invokation = await invoke(world, cToken.methods._reduceReserves(amount.encode()), from, CTokenErrorReporter); - - world = addAction( - world, - `CToken ${cToken.name}: ${describeUser(world, from)} reduces reserves by ${amount.show()}`, - invokation - ); - - return world; -} - -async function setReserveFactor(world: World, from: string, cToken: CToken, reserveFactor: NumberV): Promise { - let invokation = await invoke(world, cToken.methods._setReserveFactor(reserveFactor.encode()), from, CTokenErrorReporter); - - world = addAction( - world, - `CToken ${cToken.name}: ${describeUser(world, from)} sets reserve factor to ${reserveFactor.show()}`, - invokation - ); - - return world; -} - -async function setInterestRateModel(world: World, from: string, cToken: CToken, interestRateModel: string): Promise { - let invokation = await invoke(world, cToken.methods._setInterestRateModel(interestRateModel), from, CTokenErrorReporter); - - world = addAction( - world, - `Set interest rate for ${cToken.name} to ${interestRateModel} as ${describeUser(world, from)}`, - invokation - ); - - return world; -} - -async function setComptroller(world: World, from: string, cToken: CToken, comptroller: string): Promise { - let invokation = await invoke(world, cToken.methods._setComptroller(comptroller), from, CTokenErrorReporter); - - world = addAction( - world, - `Set comptroller for ${cToken.name} to ${comptroller} as ${describeUser(world, from)}`, - invokation - ); - - return world; -} - -async function sweepToken(world: World, from: string, cToken: CToken, token: string): Promise { - let invokation = await invoke(world, cToken.methods.sweepToken(token), from, CTokenErrorReporter); - - world = addAction( - world, - `Swept ERC-20 at ${token} to admin`, - invokation - ); - - return world; -} - -async function becomeImplementation( - world: World, - from: string, - cToken: CToken, - becomeImplementationData: string -): Promise { - - const cErc20Delegate = getContract('CErc20Delegate'); - const cErc20DelegateContract = await cErc20Delegate.at(world, cToken._address); - - let invokation = await invoke( - world, - cErc20DelegateContract.methods._becomeImplementation(becomeImplementationData), - from, - CTokenErrorReporter - ); - - world = addAction( - world, - `CToken ${cToken.name}: ${describeUser( - world, - from - )} initiates _becomeImplementation with data:${becomeImplementationData}.`, - invokation - ); - - return world; -} - -async function resignImplementation( - world: World, - from: string, - cToken: CToken, -): Promise { - - const cErc20Delegate = getContract('CErc20Delegate'); - const cErc20DelegateContract = await cErc20Delegate.at(world, cToken._address); - - let invokation = await invoke( - world, - cErc20DelegateContract.methods._resignImplementation(), - from, - CTokenErrorReporter - ); - - world = addAction( - world, - `CToken ${cToken.name}: ${describeUser( - world, - from - )} initiates _resignImplementation.`, - invokation - ); - - return world; -} - -async function setImplementation( - world: World, - from: string, - cToken: CErc20Delegator, - implementation: string, - allowResign: boolean, - becomeImplementationData: string -): Promise { - let invokation = await invoke( - world, - cToken.methods._setImplementation( - implementation, - allowResign, - becomeImplementationData - ), - from, - CTokenErrorReporter - ); - - world = addAction( - world, - `CToken ${cToken.name}: ${describeUser( - world, - from - )} initiates setImplementation with implementation:${implementation} allowResign:${allowResign} data:${becomeImplementationData}.`, - invokation - ); - - return world; -} - -async function donate(world: World, from: string, cToken: CToken): Promise { - let invokation = await invoke(world, cToken.methods.donate(), from, CTokenErrorReporter); - - world = addAction( - world, - `Donate for ${cToken.name} as ${describeUser(world, from)} with value ${showTrxValue(world)}`, - invokation - ); - - return world; -} - -async function setCTokenMock(world: World, from: string, cToken: CTokenScenario, mock: string, value: NumberV): Promise { - let mockMethod: (number) => Sendable; - - switch (mock.toLowerCase()) { - case "totalborrows": - mockMethod = cToken.methods.setTotalBorrows; - break; - case "totalreserves": - mockMethod = cToken.methods.setTotalReserves; - break; - default: - throw new Error(`Mock "${mock}" not defined for cToken`); - } - - let invokation = await invoke(world, mockMethod(value.encode()), from); - - world = addAction( - world, - `Mocked ${mock}=${value.show()} for ${cToken.name}`, - invokation - ); - - return world; -} - -async function verifyCToken(world: World, cToken: CToken, name: string, contract: string, apiKey: string): Promise { - if (world.isLocalNetwork()) { - world.printer.printLine(`Politely declining to verify on local network: ${world.network}.`); - } else { - await verify(world, apiKey, name, contract, cToken._address); - } - - return world; -} - -async function printMinters(world: World, cToken: CToken): Promise { - let events = await getPastEvents(world, cToken, cToken.name, 'Mint'); - let addresses = events.map((event) => event.returnValues['minter']); - let uniq = [...new Set(addresses)]; - - world.printer.printLine("Minters:") - - uniq.forEach((address) => { - world.printer.printLine(`\t${address}`) - }); - - return world; -} - -async function printBorrowers(world: World, cToken: CToken): Promise { - let events = await getPastEvents(world, cToken, cToken.name, 'Borrow'); - let addresses = events.map((event) => event.returnValues['borrower']); - let uniq = [...new Set(addresses)]; - - world.printer.printLine("Borrowers:") - - uniq.forEach((address) => { - world.printer.printLine(`\t${address}`) - }); - - return world; -} - -async function printLiquidity(world: World, cToken: CToken): Promise { - let mintEvents = await getPastEvents(world, cToken, cToken.name, 'Mint'); - let mintAddresses = mintEvents.map((event) => event.returnValues['minter']); - let borrowEvents = await getPastEvents(world, cToken, cToken.name, 'Borrow'); - let borrowAddresses = borrowEvents.map((event) => event.returnValues['borrower']); - let uniq = [...new Set(mintAddresses.concat(borrowAddresses))]; - let comptroller = await getComptroller(world); - - world.printer.printLine("Liquidity:") - - const liquidityMap = await Promise.all(uniq.map(async (address) => { - let userLiquidity = await getLiquidity(world, comptroller, address); - - return [address, userLiquidity.val]; - })); - - liquidityMap.forEach(([address, liquidity]) => { - world.printer.printLine(`\t${world.settings.lookupAlias(address)}: ${liquidity / 1e18}e18`) - }); - - return world; -} - -export function cTokenCommands() { - return [ - new Command<{ cTokenParams: EventV }>(` - #### Deploy - - * "CToken Deploy ...cTokenParams" - Generates a new CToken - * E.g. "CToken cZRX Deploy" - `, - "Deploy", - [new Arg("cTokenParams", getEventV, { variadic: true })], - (world, from, { cTokenParams }) => genCToken(world, from, cTokenParams.val) - ), - new View<{ cTokenArg: StringV, apiKey: StringV }>(` - #### Verify - - * "CToken Verify apiKey:" - Verifies CToken in Etherscan - * E.g. "CToken cZRX Verify "myApiKey" - `, - "Verify", - [ - new Arg("cTokenArg", getStringV), - new Arg("apiKey", getStringV) - ], - async (world, { cTokenArg, apiKey }) => { - let [cToken, name, data] = await getCTokenData(world, cTokenArg.val); - - return await verifyCToken(world, cToken, name, data.get('contract')!, apiKey.val); - }, - { namePos: 1 } - ), - new Command<{ cToken: CToken }>(` - #### AccrueInterest - - * "CToken AccrueInterest" - Accrues interest for given token - * E.g. "CToken cZRX AccrueInterest" - `, - "AccrueInterest", - [ - new Arg("cToken", getCTokenV) - ], - (world, from, { cToken }) => accrueInterest(world, from, cToken), - { namePos: 1 } - ), - new Command<{ cToken: CToken, amount: NumberV | NothingV }>(` - #### Mint - - * "CToken Mint amount:" - Mints the given amount of cToken as specified user - * E.g. "CToken cZRX Mint 1.0e18" - `, - "Mint", - [ - new Arg("cToken", getCTokenV), - new Arg("amount", getNumberV, { nullable: true }) - ], - (world, from, { cToken, amount }) => mint(world, from, cToken, amount), - { namePos: 1 } - ), - new Command<{ cToken: CToken, tokens: NumberV }>(` - #### Redeem - - * "CToken Redeem tokens:" - Redeems the given amount of cTokens as specified user - * E.g. "CToken cZRX Redeem 1.0e9" - `, - "Redeem", - [ - new Arg("cToken", getCTokenV), - new Arg("tokens", getNumberV) - ], - (world, from, { cToken, tokens }) => redeem(world, from, cToken, tokens), - { namePos: 1 } - ), - new Command<{ cToken: CToken, amount: NumberV }>(` - #### RedeemUnderlying - - * "CToken RedeemUnderlying amount:" - Redeems the given amount of underlying as specified user - * E.g. "CToken cZRX RedeemUnderlying 1.0e18" - `, - "RedeemUnderlying", - [ - new Arg("cToken", getCTokenV), - new Arg("amount", getNumberV) - ], - (world, from, { cToken, amount }) => redeemUnderlying(world, from, cToken, amount), - { namePos: 1 } - ), - new Command<{ cToken: CToken, amount: NumberV }>(` - #### Borrow - - * "CToken Borrow amount:" - Borrows the given amount of this cToken as specified user - * E.g. "CToken cZRX Borrow 1.0e18" - `, - "Borrow", - [ - new Arg("cToken", getCTokenV), - new Arg("amount", getNumberV) - ], - // Note: we override from - (world, from, { cToken, amount }) => borrow(world, from, cToken, amount), - { namePos: 1 } - ), - new Command<{ cToken: CToken, amount: NumberV | NothingV }>(` - #### RepayBorrow - - * "CToken RepayBorrow underlyingAmount:" - Repays borrow in the given underlying amount as specified user - * E.g. "CToken cZRX RepayBorrow 1.0e18" - `, - "RepayBorrow", - [ - new Arg("cToken", getCTokenV), - new Arg("amount", getNumberV, { nullable: true }) - ], - (world, from, { cToken, amount }) => repayBorrow(world, from, cToken, amount), - { namePos: 1 } - ), - new Command<{ cToken: CToken, behalf: AddressV, amount: NumberV | NothingV }>(` - #### RepayBorrowBehalf - - * "CToken RepayBorrowBehalf behalf: underlyingAmount:" - Repays borrow in the given underlying amount on behalf of another user - * E.g. "CToken cZRX RepayBorrowBehalf Geoff 1.0e18" - `, - "RepayBorrowBehalf", - [ - new Arg("cToken", getCTokenV), - new Arg("behalf", getAddressV), - new Arg("amount", getNumberV, { nullable: true }) - ], - (world, from, { cToken, behalf, amount }) => repayBorrowBehalf(world, from, behalf.val, cToken, amount), - { namePos: 1 } - ), - new Command<{ borrower: AddressV, cToken: CToken, collateral: CToken, repayAmount: NumberV | NothingV }>(` - #### Liquidate - - * "CToken Liquidate borrower: cTokenCollateral:
repayAmount:" - Liquidates repayAmount of given token seizing collateral token - * E.g. "CToken cZRX Liquidate Geoff cBAT 1.0e18" - `, - "Liquidate", - [ - new Arg("cToken", getCTokenV), - new Arg("borrower", getAddressV), - new Arg("collateral", getCTokenV), - new Arg("repayAmount", getNumberV, { nullable: true }) - ], - (world, from, { borrower, cToken, collateral, repayAmount }) => liquidateBorrow(world, from, cToken, borrower.val, collateral, repayAmount), - { namePos: 1 } - ), - new Command<{ cToken: CToken, liquidator: AddressV, borrower: AddressV, seizeTokens: NumberV }>(` - #### Seize - - * "CToken Seize liquidator: borrower: seizeTokens:" - Seizes a given number of tokens from a user (to be called from other CToken) - * E.g. "CToken cZRX Seize Geoff Torrey 1.0e18" - `, - "Seize", - [ - new Arg("cToken", getCTokenV), - new Arg("liquidator", getAddressV), - new Arg("borrower", getAddressV), - new Arg("seizeTokens", getNumberV) - ], - (world, from, { cToken, liquidator, borrower, seizeTokens }) => seize(world, from, cToken, liquidator.val, borrower.val, seizeTokens), - { namePos: 1 } - ), - new Command<{ cToken: CToken, treasure: CToken, liquidator: AddressV, borrower: AddressV, seizeTokens: NumberV }>(` - #### EvilSeize - - * "CToken EvilSeize treasure: liquidator: borrower: seizeTokens:" - Improperly seizes a given number of tokens from a user - * E.g. "CToken cEVL EvilSeize cZRX Geoff Torrey 1.0e18" - `, - "EvilSeize", - [ - new Arg("cToken", getCTokenV), - new Arg("treasure", getCTokenV), - new Arg("liquidator", getAddressV), - new Arg("borrower", getAddressV), - new Arg("seizeTokens", getNumberV) - ], - (world, from, { cToken, treasure, liquidator, borrower, seizeTokens }) => evilSeize(world, from, cToken, treasure, liquidator.val, borrower.val, seizeTokens), - { namePos: 1 } - ), - new Command<{ cToken: CToken, amount: NumberV }>(` - #### ReduceReserves - - * "CToken ReduceReserves amount:" - Reduces the reserves of the cToken - * E.g. "CToken cZRX ReduceReserves 1.0e18" - `, - "ReduceReserves", - [ - new Arg("cToken", getCTokenV), - new Arg("amount", getNumberV) - ], - (world, from, { cToken, amount }) => reduceReserves(world, from, cToken, amount), - { namePos: 1 } - ), - new Command<{ cToken: CToken, amount: NumberV }>(` - #### AddReserves - - * "CToken AddReserves amount:" - Adds reserves to the cToken - * E.g. "CToken cZRX AddReserves 1.0e18" - `, - "AddReserves", - [ - new Arg("cToken", getCTokenV), - new Arg("amount", getNumberV) - ], - (world, from, { cToken, amount }) => addReserves(world, from, cToken, amount), - { namePos: 1 } - ), - new Command<{ cToken: CToken, newPendingAdmin: AddressV }>(` - #### SetPendingAdmin - - * "CToken SetPendingAdmin newPendingAdmin:
" - Sets the pending admin for the cToken - * E.g. "CToken cZRX SetPendingAdmin Geoff" - `, - "SetPendingAdmin", - [ - new Arg("cToken", getCTokenV), - new Arg("newPendingAdmin", getAddressV) - ], - (world, from, { cToken, newPendingAdmin }) => setPendingAdmin(world, from, cToken, newPendingAdmin.val), - { namePos: 1 } - ), - new Command<{ cToken: CToken }>(` - #### AcceptAdmin - - * "CToken AcceptAdmin" - Accepts admin for the cToken - * E.g. "From Geoff (CToken cZRX AcceptAdmin)" - `, - "AcceptAdmin", - [ - new Arg("cToken", getCTokenV) - ], - (world, from, { cToken }) => acceptAdmin(world, from, cToken), - { namePos: 1 } - ), - new Command<{ cToken: CToken, reserveFactor: NumberV }>(` - #### SetReserveFactor - - * "CToken SetReserveFactor reserveFactor:" - Sets the reserve factor for the cToken - * E.g. "CToken cZRX SetReserveFactor 0.1" - `, - "SetReserveFactor", - [ - new Arg("cToken", getCTokenV), - new Arg("reserveFactor", getExpNumberV) - ], - (world, from, { cToken, reserveFactor }) => setReserveFactor(world, from, cToken, reserveFactor), - { namePos: 1 } - ), - new Command<{ cToken: CToken, interestRateModel: AddressV }>(` - #### SetInterestRateModel - - * "CToken SetInterestRateModel interestRateModel:" - Sets the interest rate model for the given cToken - * E.g. "CToken cZRX SetInterestRateModel (FixedRate 1.5)" - `, - "SetInterestRateModel", - [ - new Arg("cToken", getCTokenV), - new Arg("interestRateModel", getAddressV) - ], - (world, from, { cToken, interestRateModel }) => setInterestRateModel(world, from, cToken, interestRateModel.val), - { namePos: 1 } - ), - new Command<{ cToken: CToken, token: AddressV }>(` - #### SweepToken - - * "CToken SweepToken erc20Token:" - Sweeps the given erc-20 token from the contract - * E.g. "CToken cZRX SweepToken BAT" - `, - "SweepToken", - [ - new Arg("cToken", getCTokenV), - new Arg("token", getAddressV) - ], - (world, from, { cToken, token }) => sweepToken(world, from, cToken, token.val), - { namePos: 1 } - ), - new Command<{ cToken: CToken, comptroller: AddressV }>(` - #### SetComptroller - - * "CToken SetComptroller comptroller:" - Sets the comptroller for the given cToken - * E.g. "CToken cZRX SetComptroller Comptroller" - `, - "SetComptroller", - [ - new Arg("cToken", getCTokenV), - new Arg("comptroller", getAddressV) - ], - (world, from, { cToken, comptroller }) => setComptroller(world, from, cToken, comptroller.val), - { namePos: 1 } - ), - new Command<{ - cToken: CToken; - becomeImplementationData: StringV; - }>( - ` - #### BecomeImplementation - - * "CToken BecomeImplementation becomeImplementationData:" - * E.g. "CToken cDAI BecomeImplementation "0x01234anyByTeS56789"" - `, - 'BecomeImplementation', - [ - new Arg('cToken', getCTokenV), - new Arg('becomeImplementationData', getStringV) - ], - (world, from, { cToken, becomeImplementationData }) => - becomeImplementation( - world, - from, - cToken, - becomeImplementationData.val - ), - { namePos: 1 } - ), - new Command<{cToken: CToken;}>( - ` - #### ResignImplementation - - * "CToken ResignImplementation" - * E.g. "CToken cDAI ResignImplementation" - `, - 'ResignImplementation', - [new Arg('cToken', getCTokenV)], - (world, from, { cToken }) => - resignImplementation( - world, - from, - cToken - ), - { namePos: 1 } - ), - new Command<{ - cToken: CErc20Delegator; - implementation: AddressV; - allowResign: BoolV; - becomeImplementationData: StringV; - }>( - ` - #### SetImplementation - - * "CToken SetImplementation implementation:
allowResign: becomeImplementationData:" - * E.g. "CToken cDAI SetImplementation (CToken cDAIDelegate Address) True "0x01234anyByTeS56789" - `, - 'SetImplementation', - [ - new Arg('cToken', getCErc20DelegatorV), - new Arg('implementation', getAddressV), - new Arg('allowResign', getBoolV), - new Arg('becomeImplementationData', getStringV) - ], - (world, from, { cToken, implementation, allowResign, becomeImplementationData }) => - setImplementation( - world, - from, - cToken, - implementation.val, - allowResign.val, - becomeImplementationData.val - ), - { namePos: 1 } - ), - new Command<{ cToken: CToken }>(` - #### Donate - - * "CToken Donate" - Calls the donate (payable no-op) function - * E.g. "(Trx Value 5.0e18 (CToken cETH Donate))" - `, - "Donate", - [ - new Arg("cToken", getCTokenV) - ], - (world, from, { cToken }) => donate(world, from, cToken), - { namePos: 1 } - ), - new Command<{ cToken: CToken, variable: StringV, value: NumberV }>(` - #### Mock - - * "CToken Mock variable: value:" - Mocks a given value on cToken. Note: value must be a supported mock and this will only work on a "CTokenScenario" contract. - * E.g. "CToken cZRX Mock totalBorrows 5.0e18" - * E.g. "CToken cZRX Mock totalReserves 0.5e18" - `, - "Mock", - [ - new Arg("cToken", getCTokenV), - new Arg("variable", getStringV), - new Arg("value", getNumberV), - ], - (world, from, { cToken, variable, value }) => setCTokenMock(world, from, cToken, variable.val, value), - { namePos: 1 } - ), - new View<{ cToken: CToken }>(` - #### Minters - - * "CToken Minters" - Print address of all minters - `, - "Minters", - [ - new Arg("cToken", getCTokenV) - ], - (world, { cToken }) => printMinters(world, cToken), - { namePos: 1 } - ), - new View<{ cToken: CToken }>(` - #### Borrowers - - * "CToken Borrowers" - Print address of all borrowers - `, - "Borrowers", - [ - new Arg("cToken", getCTokenV) - ], - (world, { cToken }) => printBorrowers(world, cToken), - { namePos: 1 } - ), - new View<{ cToken: CToken }>(` - #### Liquidity - - * "CToken Liquidity" - Prints liquidity of all minters or borrowers - `, - "Liquidity", - [ - new Arg("cToken", getCTokenV) - ], - (world, { cToken }) => printLiquidity(world, cToken), - { namePos: 1 } - ), - new View<{ cToken: CToken, input: StringV }>(` - #### Decode - - * "Decode input:" - Prints information about a call to a cToken contract - `, - "Decode", - [ - new Arg("cToken", getCTokenV), - new Arg("input", getStringV) - - ], - (world, { cToken, input }) => decodeCall(world, cToken, input.val), - { namePos: 1 } - ) - ]; -} - -export async function processCTokenEvent(world: World, event: Event, from: string | null): Promise { - return await processCommandEvent("CToken", cTokenCommands(), world, event, from); -} diff --git a/scenario/src/Event/CompEvent.ts b/scenario/src/Event/CompEvent.ts deleted file mode 100644 index 1f420131f..000000000 --- a/scenario/src/Event/CompEvent.ts +++ /dev/null @@ -1,270 +0,0 @@ -import { Event } from '../Event'; -import { addAction, World, describeUser } from '../World'; -import { Comp, CompScenario } from '../Contract/Comp'; -import { buildComp } from '../Builder/CompBuilder'; -import { invoke } from '../Invokation'; -import { - getAddressV, - getEventV, - getNumberV, - getStringV, -} from '../CoreValue'; -import { - AddressV, - EventV, - NumberV, - StringV -} from '../Value'; -import { Arg, Command, processCommandEvent, View } from '../Command'; -import { getComp } from '../ContractLookup'; -import { NoErrorReporter } from '../ErrorReporter'; -import { verify } from '../Verify'; -import { encodedNumber } from '../Encoding'; - -async function genComp(world: World, from: string, params: Event): Promise { - let { world: nextWorld, comp, tokenData } = await buildComp(world, from, params); - world = nextWorld; - - world = addAction( - world, - `Deployed Comp (${comp.name}) to address ${comp._address}`, - tokenData.invokation - ); - - return world; -} - -async function verifyComp(world: World, comp: Comp, apiKey: string, modelName: string, contractName: string): Promise { - if (world.isLocalNetwork()) { - world.printer.printLine(`Politely declining to verify on local network: ${world.network}.`); - } else { - await verify(world, apiKey, modelName, contractName, comp._address); - } - - return world; -} - -async function approve(world: World, from: string, comp: Comp, address: string, amount: NumberV): Promise { - let invokation = await invoke(world, comp.methods.approve(address, amount.encode()), from, NoErrorReporter); - - world = addAction( - world, - `Approved Comp token for ${from} of ${amount.show()}`, - invokation - ); - - return world; -} - -async function transfer(world: World, from: string, comp: Comp, address: string, amount: NumberV): Promise { - let invokation = await invoke(world, comp.methods.transfer(address, amount.encode()), from, NoErrorReporter); - - world = addAction( - world, - `Transferred ${amount.show()} Comp tokens from ${from} to ${address}`, - invokation - ); - - return world; -} - -async function transferFrom(world: World, from: string, comp: Comp, owner: string, spender: string, amount: NumberV): Promise { - let invokation = await invoke(world, comp.methods.transferFrom(owner, spender, amount.encode()), from, NoErrorReporter); - - world = addAction( - world, - `"Transferred from" ${amount.show()} Comp tokens from ${owner} to ${spender}`, - invokation - ); - - return world; -} - -async function transferScenario(world: World, from: string, comp: CompScenario, addresses: string[], amount: NumberV): Promise { - let invokation = await invoke(world, comp.methods.transferScenario(addresses, amount.encode()), from, NoErrorReporter); - - world = addAction( - world, - `Transferred ${amount.show()} Comp tokens from ${from} to ${addresses}`, - invokation - ); - - return world; -} - -async function transferFromScenario(world: World, from: string, comp: CompScenario, addresses: string[], amount: NumberV): Promise { - let invokation = await invoke(world, comp.methods.transferFromScenario(addresses, amount.encode()), from, NoErrorReporter); - - world = addAction( - world, - `Transferred ${amount.show()} Comp tokens from ${addresses} to ${from}`, - invokation - ); - - return world; -} - -async function delegate(world: World, from: string, comp: Comp, account: string): Promise { - let invokation = await invoke(world, comp.methods.delegate(account), from, NoErrorReporter); - - world = addAction( - world, - `"Delegated from" ${from} to ${account}`, - invokation - ); - - return world; -} - -async function setBlockNumber( - world: World, - from: string, - comp: Comp, - blockNumber: NumberV -): Promise { - return addAction( - world, - `Set Comp blockNumber to ${blockNumber.show()}`, - await invoke(world, comp.methods.setBlockNumber(blockNumber.encode()), from) - ); -} - -export function compCommands() { - return [ - new Command<{ params: EventV }>(` - #### Deploy - - * "Deploy ...params" - Generates a new Comp token - * E.g. "Comp Deploy" - `, - "Deploy", - [ - new Arg("params", getEventV, { variadic: true }) - ], - (world, from, { params }) => genComp(world, from, params.val) - ), - - new View<{ comp: Comp, apiKey: StringV, contractName: StringV }>(` - #### Verify - - * " Verify apiKey: contractName:=Comp" - Verifies Comp token in Etherscan - * E.g. "Comp Verify "myApiKey" - `, - "Verify", - [ - new Arg("comp", getComp, { implicit: true }), - new Arg("apiKey", getStringV), - new Arg("contractName", getStringV, { default: new StringV("Comp") }) - ], - async (world, { comp, apiKey, contractName }) => { - return await verifyComp(world, comp, apiKey.val, comp.name, contractName.val) - } - ), - - new Command<{ comp: Comp, spender: AddressV, amount: NumberV }>(` - #### Approve - - * "Comp Approve spender:
" - Adds an allowance between user and address - * E.g. "Comp Approve Geoff 1.0e18" - `, - "Approve", - [ - new Arg("comp", getComp, { implicit: true }), - new Arg("spender", getAddressV), - new Arg("amount", getNumberV) - ], - (world, from, { comp, spender, amount }) => { - return approve(world, from, comp, spender.val, amount) - } - ), - - new Command<{ comp: Comp, recipient: AddressV, amount: NumberV }>(` - #### Transfer - - * "Comp Transfer recipient: " - Transfers a number of tokens via "transfer" as given user to recipient (this does not depend on allowance) - * E.g. "Comp Transfer Torrey 1.0e18" - `, - "Transfer", - [ - new Arg("comp", getComp, { implicit: true }), - new Arg("recipient", getAddressV), - new Arg("amount", getNumberV) - ], - (world, from, { comp, recipient, amount }) => transfer(world, from, comp, recipient.val, amount) - ), - - new Command<{ comp: Comp, owner: AddressV, spender: AddressV, amount: NumberV }>(` - #### TransferFrom - - * "Comp TransferFrom owner: spender: " - Transfers a number of tokens via "transfeFrom" to recipient (this depends on allowances) - * E.g. "Comp TransferFrom Geoff Torrey 1.0e18" - `, - "TransferFrom", - [ - new Arg("comp", getComp, { implicit: true }), - new Arg("owner", getAddressV), - new Arg("spender", getAddressV), - new Arg("amount", getNumberV) - ], - (world, from, { comp, owner, spender, amount }) => transferFrom(world, from, comp, owner.val, spender.val, amount) - ), - - new Command<{ comp: CompScenario, recipients: AddressV[], amount: NumberV }>(` - #### TransferScenario - - * "Comp TransferScenario recipients: " - Transfers a number of tokens via "transfer" to the given recipients (this does not depend on allowance) - * E.g. "Comp TransferScenario (Jared Torrey) 10" - `, - "TransferScenario", - [ - new Arg("comp", getComp, { implicit: true }), - new Arg("recipients", getAddressV, { mapped: true }), - new Arg("amount", getNumberV) - ], - (world, from, { comp, recipients, amount }) => transferScenario(world, from, comp, recipients.map(recipient => recipient.val), amount) - ), - - new Command<{ comp: CompScenario, froms: AddressV[], amount: NumberV }>(` - #### TransferFromScenario - - * "Comp TransferFromScenario froms: " - Transfers a number of tokens via "transferFrom" from the given users to msg.sender (this depends on allowance) - * E.g. "Comp TransferFromScenario (Jared Torrey) 10" - `, - "TransferFromScenario", - [ - new Arg("comp", getComp, { implicit: true }), - new Arg("froms", getAddressV, { mapped: true }), - new Arg("amount", getNumberV) - ], - (world, from, { comp, froms, amount }) => transferFromScenario(world, from, comp, froms.map(_from => _from.val), amount) - ), - - new Command<{ comp: Comp, account: AddressV }>(` - #### Delegate - - * "Comp Delegate account:
" - Delegates votes to a given account - * E.g. "Comp Delegate Torrey" - `, - "Delegate", - [ - new Arg("comp", getComp, { implicit: true }), - new Arg("account", getAddressV), - ], - (world, from, { comp, account }) => delegate(world, from, comp, account.val) - ), - new Command<{ comp: Comp, blockNumber: NumberV }>(` - #### SetBlockNumber - - * "SetBlockNumber " - Sets the blockTimestamp of the Comp Harness - * E.g. "Comp SetBlockNumber 500" - `, - 'SetBlockNumber', - [new Arg('comp', getComp, { implicit: true }), new Arg('blockNumber', getNumberV)], - (world, from, { comp, blockNumber }) => setBlockNumber(world, from, comp, blockNumber) - ) - ]; -} - -export async function processCompEvent(world: World, event: Event, from: string | null): Promise { - return await processCommandEvent("Comp", compCommands(), world, event, from); -} diff --git a/scenario/src/Event/ComptrollerEvent.ts b/scenario/src/Event/ComptrollerEvent.ts deleted file mode 100644 index 88b3ee497..000000000 --- a/scenario/src/Event/ComptrollerEvent.ts +++ /dev/null @@ -1,926 +0,0 @@ -import {Event} from '../Event'; -import {addAction, describeUser, World} from '../World'; -import {decodeCall, getPastEvents} from '../Contract'; -import {Comptroller} from '../Contract/Comptroller'; -import {ComptrollerImpl} from '../Contract/ComptrollerImpl'; -import {CToken} from '../Contract/CToken'; -import {invoke} from '../Invokation'; -import { - getAddressV, - getBoolV, - getEventV, - getExpNumberV, - getNumberV, - getPercentV, - getStringV, - getCoreValue -} from '../CoreValue'; -import { - AddressV, - BoolV, - EventV, - NumberV, - StringV -} from '../Value'; -import {Arg, Command, View, processCommandEvent} from '../Command'; -import {buildComptrollerImpl} from '../Builder/ComptrollerImplBuilder'; -import {ComptrollerErrorReporter} from '../ErrorReporter'; -import {getComptroller, getComptrollerImpl} from '../ContractLookup'; -import {getLiquidity} from '../Value/ComptrollerValue'; -import {getCTokenV} from '../Value/CTokenValue'; -import {encodedNumber} from '../Encoding'; -import {encodeABI, rawValues} from "../Utils"; - -async function genComptroller(world: World, from: string, params: Event): Promise { - let {world: nextWorld, comptrollerImpl: comptroller, comptrollerImplData: comptrollerData} = await buildComptrollerImpl(world, from, params); - world = nextWorld; - - world = addAction( - world, - `Added Comptroller (${comptrollerData.description}) at address ${comptroller._address}`, - comptrollerData.invokation - ); - - return world; -}; - -async function setPaused(world: World, from: string, comptroller: Comptroller, actionName: string, isPaused: boolean): Promise { - const pauseMap = { - "Mint": comptroller.methods._setMintPaused - }; - - if (!pauseMap[actionName]) { - throw `Cannot find pause function for action "${actionName}"`; - } - - let invokation = await invoke(world, comptroller[actionName]([isPaused]), from, ComptrollerErrorReporter); - - world = addAction( - world, - `Comptroller: set paused for ${actionName} to ${isPaused}`, - invokation - ); - - return world; -} - -async function setMaxAssets(world: World, from: string, comptroller: Comptroller, numberOfAssets: NumberV): Promise { - let invokation = await invoke(world, comptroller.methods._setMaxAssets(numberOfAssets.encode()), from, ComptrollerErrorReporter); - - world = addAction( - world, - `Set max assets to ${numberOfAssets.show()}`, - invokation - ); - - return world; -} - -async function setLiquidationIncentive(world: World, from: string, comptroller: Comptroller, liquidationIncentive: NumberV): Promise { - let invokation = await invoke(world, comptroller.methods._setLiquidationIncentive(liquidationIncentive.encode()), from, ComptrollerErrorReporter); - - world = addAction( - world, - `Set liquidation incentive to ${liquidationIncentive.show()}`, - invokation - ); - - return world; -} - -async function supportMarket(world: World, from: string, comptroller: Comptroller, cToken: CToken): Promise { - if (world.dryRun) { - // Skip this specifically on dry runs since it's likely to crash due to a number of reasons - world.printer.printLine(`Dry run: Supporting market \`${cToken._address}\``); - return world; - } - - let invokation = await invoke(world, comptroller.methods._supportMarket(cToken._address), from, ComptrollerErrorReporter); - - world = addAction( - world, - `Supported market ${cToken.name}`, - invokation - ); - - return world; -} - -async function unlistMarket(world: World, from: string, comptroller: Comptroller, cToken: CToken): Promise { - let invokation = await invoke(world, comptroller.methods.unlist(cToken._address), from, ComptrollerErrorReporter); - - world = addAction( - world, - `Unlisted market ${cToken.name}`, - invokation - ); - - return world; -} - -async function enterMarkets(world: World, from: string, comptroller: Comptroller, assets: string[]): Promise { - let invokation = await invoke(world, comptroller.methods.enterMarkets(assets), from, ComptrollerErrorReporter); - - world = addAction( - world, - `Called enter assets ${assets} as ${describeUser(world, from)}`, - invokation - ); - - return world; -} - -async function exitMarket(world: World, from: string, comptroller: Comptroller, asset: string): Promise { - let invokation = await invoke(world, comptroller.methods.exitMarket(asset), from, ComptrollerErrorReporter); - - world = addAction( - world, - `Called exit market ${asset} as ${describeUser(world, from)}`, - invokation - ); - - return world; -} - -async function setPriceOracle(world: World, from: string, comptroller: Comptroller, priceOracleAddr: string): Promise { - let invokation = await invoke(world, comptroller.methods._setPriceOracle(priceOracleAddr), from, ComptrollerErrorReporter); - - world = addAction( - world, - `Set price oracle for to ${priceOracleAddr} as ${describeUser(world, from)}`, - invokation - ); - - return world; -} - -async function setCollateralFactor(world: World, from: string, comptroller: Comptroller, cToken: CToken, collateralFactor: NumberV): Promise { - let invokation = await invoke(world, comptroller.methods._setCollateralFactor(cToken._address, collateralFactor.encode()), from, ComptrollerErrorReporter); - - world = addAction( - world, - `Set collateral factor for ${cToken.name} to ${collateralFactor.show()}`, - invokation - ); - - return world; -} - -async function setCloseFactor(world: World, from: string, comptroller: Comptroller, closeFactor: NumberV): Promise { - let invokation = await invoke(world, comptroller.methods._setCloseFactor(closeFactor.encode()), from, ComptrollerErrorReporter); - - world = addAction( - world, - `Set close factor to ${closeFactor.show()}`, - invokation - ); - - return world; -} - -async function fastForward(world: World, from: string, comptroller: Comptroller, blocks: NumberV): Promise { - let invokation = await invoke(world, comptroller.methods.fastForward(blocks.encode()), from, ComptrollerErrorReporter); - - world = addAction( - world, - `Fast forward ${blocks.show()} blocks to #${invokation.value}`, - invokation - ); - - return world; -} - -async function sendAny(world: World, from:string, comptroller: Comptroller, signature: string, callArgs: string[]): Promise { - const fnData = encodeABI(world, signature, callArgs); - await world.web3.eth.sendTransaction({ - to: comptroller._address, - data: fnData, - from: from - }) - return world; -} - -async function addCompMarkets(world: World, from: string, comptroller: Comptroller, cTokens: CToken[]): Promise { - let invokation = await invoke(world, comptroller.methods._addCompMarkets(cTokens.map(c => c._address)), from, ComptrollerErrorReporter); - - world = addAction( - world, - `Added COMP markets ${cTokens.map(c => c.name)}`, - invokation - ); - - return world; -} - -async function dropCompMarket(world: World, from: string, comptroller: Comptroller, cToken: CToken): Promise { - let invokation = await invoke(world, comptroller.methods._dropCompMarket(cToken._address), from, ComptrollerErrorReporter); - - world = addAction( - world, - `Drop COMP market ${cToken.name}`, - invokation - ); - - return world; -} - -async function refreshCompSpeeds(world: World, from: string, comptroller: Comptroller): Promise { - let invokation = await invoke(world, comptroller.methods.refreshCompSpeeds(), from, ComptrollerErrorReporter); - - world = addAction( - world, - `Refreshed COMP speeds`, - invokation - ); - - return world; -} - -async function claimComp(world: World, from: string, comptroller: Comptroller, holder: string): Promise { - let invokation = await invoke(world, comptroller.methods.claimComp(holder), from, ComptrollerErrorReporter); - - world = addAction( - world, - `Comp claimed by ${holder}`, - invokation - ); - - return world; -} - -async function claimCompInMarkets(world: World, from: string, comptroller: Comptroller, holder: string, cTokens: CToken[]): Promise { - let invokation = await invoke(world, comptroller.methods.claimComp(holder, cTokens.map(c => c._address)), from, ComptrollerErrorReporter); - - world = addAction( - world, - `Comp claimed by ${holder} in markets ${cTokens.map(c => c.name)}`, - invokation - ); - - return world; -} - -async function updateContributorRewards(world: World, from: string, comptroller: Comptroller, contributor: string): Promise { - let invokation = await invoke(world, comptroller.methods.updateContributorRewards(contributor), from, ComptrollerErrorReporter); - - world = addAction( - world, - `Contributor rewards updated for ${contributor}`, - invokation - ); - - return world; -} - -async function grantComp(world: World, from: string, comptroller: Comptroller, recipient: string, amount: NumberV): Promise { - let invokation = await invoke(world, comptroller.methods._grantComp(recipient, amount.encode()), from, ComptrollerErrorReporter); - - world = addAction( - world, - `${amount.show()} comp granted to ${recipient}`, - invokation - ); - - return world; -} - -async function setCompRate(world: World, from: string, comptroller: Comptroller, rate: NumberV): Promise { - let invokation = await invoke(world, comptroller.methods._setCompRate(rate.encode()), from, ComptrollerErrorReporter); - - world = addAction( - world, - `Comp rate set to ${rate.show()}`, - invokation - ); - - return world; -} - -async function setCompSpeed(world: World, from: string, comptroller: Comptroller, cToken: CToken, speed: NumberV): Promise { - let invokation = await invoke(world, comptroller.methods._setCompSpeed(cToken._address, speed.encode()), from, ComptrollerErrorReporter); - - world = addAction( - world, - `Comp speed for market ${cToken._address} set to ${speed.show()}`, - invokation - ); - - return world; -} - -async function setCompSpeeds(world: World, from: string, comptroller: Comptroller, cTokens: CToken[], supplySpeeds: NumberV[], borrowSpeeds: NumberV[]): Promise { - let invokation = await invoke(world, comptroller.methods._setCompSpeeds(cTokens.map(c => c._address), supplySpeeds.map(speed => speed.encode()), borrowSpeeds.map(speed => speed.encode())), from, ComptrollerErrorReporter); - - world = addAction( - world, - `Comp speed for markets [${cTokens.map(c => c._address)}] set to supplySpeeds=[${supplySpeeds.map(speed => speed.show())}, borrowSpeeds=[${borrowSpeeds.map(speed => speed.show())}]`, - invokation - ); - - return world; -} - -async function setContributorCompSpeed(world: World, from: string, comptroller: Comptroller, contributor: string, speed: NumberV): Promise { - let invokation = await invoke(world, comptroller.methods._setContributorCompSpeed(contributor, speed.encode()), from, ComptrollerErrorReporter); - - world = addAction( - world, - `Comp speed for contributor ${contributor} set to ${speed.show()}`, - invokation - ); - - return world; -} - -async function printLiquidity(world: World, comptroller: Comptroller): Promise { - let enterEvents = await getPastEvents(world, comptroller, 'StdComptroller', 'MarketEntered'); - let addresses = enterEvents.map((event) => event.returnValues['account']); - let uniq = [...new Set(addresses)]; - - world.printer.printLine("Liquidity:") - - const liquidityMap = await Promise.all(uniq.map(async (address) => { - let userLiquidity = await getLiquidity(world, comptroller, address); - - return [address, userLiquidity.val]; - })); - - liquidityMap.forEach(([address, liquidity]) => { - world.printer.printLine(`\t${world.settings.lookupAlias(address)}: ${liquidity / 1e18}e18`) - }); - - return world; -} - -async function setPendingAdmin(world: World, from: string, comptroller: Comptroller, newPendingAdmin: string): Promise { - let invokation = await invoke(world, comptroller.methods._setPendingAdmin(newPendingAdmin), from, ComptrollerErrorReporter); - - world = addAction( - world, - `Comptroller: ${describeUser(world, from)} sets pending admin to ${newPendingAdmin}`, - invokation - ); - - return world; -} - -async function acceptAdmin(world: World, from: string, comptroller: Comptroller): Promise { - let invokation = await invoke(world, comptroller.methods._acceptAdmin(), from, ComptrollerErrorReporter); - - world = addAction( - world, - `Comptroller: ${describeUser(world, from)} accepts admin`, - invokation - ); - - return world; -} - -async function setPauseGuardian(world: World, from: string, comptroller: Comptroller, newPauseGuardian: string): Promise { - let invokation = await invoke(world, comptroller.methods._setPauseGuardian(newPauseGuardian), from, ComptrollerErrorReporter); - - world = addAction( - world, - `Comptroller: ${describeUser(world, from)} sets pause guardian to ${newPauseGuardian}`, - invokation - ); - - return world; -} - -async function setGuardianPaused(world: World, from: string, comptroller: Comptroller, action: string, state: boolean): Promise { - let fun; - switch(action){ - case "Transfer": - fun = comptroller.methods._setTransferPaused - break; - case "Seize": - fun = comptroller.methods._setSeizePaused - break; - } - let invokation = await invoke(world, fun(state), from, ComptrollerErrorReporter); - - world = addAction( - world, - `Comptroller: ${describeUser(world, from)} sets ${action} paused`, - invokation - ); - - return world; -} - -async function setGuardianMarketPaused(world: World, from: string, comptroller: Comptroller, cToken: CToken, action: string, state: boolean): Promise { - let fun; - switch(action){ - case "Mint": - fun = comptroller.methods._setMintPaused - break; - case "Borrow": - fun = comptroller.methods._setBorrowPaused - break; - } - let invokation = await invoke(world, fun(cToken._address, state), from, ComptrollerErrorReporter); - - world = addAction( - world, - `Comptroller: ${describeUser(world, from)} sets ${action} paused`, - invokation - ); - - return world; -} - -async function setMarketBorrowCaps(world: World, from: string, comptroller: Comptroller, cTokens: CToken[], borrowCaps: NumberV[]): Promise { - let invokation = await invoke(world, comptroller.methods._setMarketBorrowCaps(cTokens.map(c => c._address), borrowCaps.map(c => c.encode())), from, ComptrollerErrorReporter); - - world = addAction( - world, - `Borrow caps on ${cTokens} set to ${borrowCaps}`, - invokation - ); - - return world; -} - -async function setBorrowCapGuardian(world: World, from: string, comptroller: Comptroller, newBorrowCapGuardian: string): Promise { - let invokation = await invoke(world, comptroller.methods._setBorrowCapGuardian(newBorrowCapGuardian), from, ComptrollerErrorReporter); - - world = addAction( - world, - `Comptroller: ${describeUser(world, from)} sets borrow cap guardian to ${newBorrowCapGuardian}`, - invokation - ); - - return world; -} - -async function setMarketSupplyCaps(world: World, from: string, comptroller: Comptroller, vTokens: VToken[], supplyCaps: NumberV[]): Promise { - let invokation = await invoke(world, comptroller.methods._setMarketSupplyCaps(vTokens.map(c => c._address), supplyCaps.map(c => c.encode())), from, ComptrollerErrorReporter); - - world = addAction( - world, - `Supply caps on ${vTokens} set to ${supplyCaps}`, - invokation - ); - - return world; -} - -export function comptrollerCommands() { - return [ - new Command<{comptrollerParams: EventV}>(` - #### Deploy - - * "Comptroller Deploy ...comptrollerParams" - Generates a new Comptroller (not as Impl) - * E.g. "Comptroller Deploy YesNo" - `, - "Deploy", - [new Arg("comptrollerParams", getEventV, {variadic: true})], - (world, from, {comptrollerParams}) => genComptroller(world, from, comptrollerParams.val) - ), - new Command<{comptroller: Comptroller, action: StringV, isPaused: BoolV}>(` - #### SetPaused - - * "Comptroller SetPaused " - Pauses or unpaused given cToken function - * E.g. "Comptroller SetPaused "Mint" True" - `, - "SetPaused", - [ - new Arg("comptroller", getComptroller, {implicit: true}), - new Arg("action", getStringV), - new Arg("isPaused", getBoolV) - ], - (world, from, {comptroller, action, isPaused}) => setPaused(world, from, comptroller, action.val, isPaused.val) - ), - new Command<{comptroller: Comptroller, cToken: CToken}>(` - #### SupportMarket - - * "Comptroller SupportMarket " - Adds support in the Comptroller for the given cToken - * E.g. "Comptroller SupportMarket cZRX" - `, - "SupportMarket", - [ - new Arg("comptroller", getComptroller, {implicit: true}), - new Arg("cToken", getCTokenV) - ], - (world, from, {comptroller, cToken}) => supportMarket(world, from, comptroller, cToken) - ), - new Command<{comptroller: Comptroller, cToken: CToken}>(` - #### UnList - - * "Comptroller UnList " - Mock unlists a given market in tests - * E.g. "Comptroller UnList cZRX" - `, - "UnList", - [ - new Arg("comptroller", getComptroller, {implicit: true}), - new Arg("cToken", getCTokenV) - ], - (world, from, {comptroller, cToken}) => unlistMarket(world, from, comptroller, cToken) - ), - new Command<{comptroller: Comptroller, cTokens: CToken[]}>(` - #### EnterMarkets - - * "Comptroller EnterMarkets ( ...)" - User enters the given markets - * E.g. "Comptroller EnterMarkets (cZRX cETH)" - `, - "EnterMarkets", - [ - new Arg("comptroller", getComptroller, {implicit: true}), - new Arg("cTokens", getCTokenV, {mapped: true}) - ], - (world, from, {comptroller, cTokens}) => enterMarkets(world, from, comptroller, cTokens.map((c) => c._address)) - ), - new Command<{comptroller: Comptroller, cToken: CToken}>(` - #### ExitMarket - - * "Comptroller ExitMarket " - User exits the given markets - * E.g. "Comptroller ExitMarket cZRX" - `, - "ExitMarket", - [ - new Arg("comptroller", getComptroller, {implicit: true}), - new Arg("cToken", getCTokenV) - ], - (world, from, {comptroller, cToken}) => exitMarket(world, from, comptroller, cToken._address) - ), - new Command<{comptroller: Comptroller, maxAssets: NumberV}>(` - #### SetMaxAssets - - * "Comptroller SetMaxAssets " - Sets (or resets) the max allowed asset count - * E.g. "Comptroller SetMaxAssets 4" - `, - "SetMaxAssets", - [ - new Arg("comptroller", getComptroller, {implicit: true}), - new Arg("maxAssets", getNumberV) - ], - (world, from, {comptroller, maxAssets}) => setMaxAssets(world, from, comptroller, maxAssets) - ), - new Command<{comptroller: Comptroller, liquidationIncentive: NumberV}>(` - #### LiquidationIncentive - - * "Comptroller LiquidationIncentive " - Sets the liquidation incentive - * E.g. "Comptroller LiquidationIncentive 1.1" - `, - "LiquidationIncentive", - [ - new Arg("comptroller", getComptroller, {implicit: true}), - new Arg("liquidationIncentive", getExpNumberV) - ], - (world, from, {comptroller, liquidationIncentive}) => setLiquidationIncentive(world, from, comptroller, liquidationIncentive) - ), - new Command<{comptroller: Comptroller, priceOracle: AddressV}>(` - #### SetPriceOracle - - * "Comptroller SetPriceOracle oracle:
" - Sets the price oracle address - * E.g. "Comptroller SetPriceOracle 0x..." - `, - "SetPriceOracle", - [ - new Arg("comptroller", getComptroller, {implicit: true}), - new Arg("priceOracle", getAddressV) - ], - (world, from, {comptroller, priceOracle}) => setPriceOracle(world, from, comptroller, priceOracle.val) - ), - new Command<{comptroller: Comptroller, cToken: CToken, collateralFactor: NumberV}>(` - #### SetCollateralFactor - - * "Comptroller SetCollateralFactor " - Sets the collateral factor for given cToken to number - * E.g. "Comptroller SetCollateralFactor cZRX 0.1" - `, - "SetCollateralFactor", - [ - new Arg("comptroller", getComptroller, {implicit: true}), - new Arg("cToken", getCTokenV), - new Arg("collateralFactor", getExpNumberV) - ], - (world, from, {comptroller, cToken, collateralFactor}) => setCollateralFactor(world, from, comptroller, cToken, collateralFactor) - ), - new Command<{comptroller: Comptroller, closeFactor: NumberV}>(` - #### SetCloseFactor - - * "Comptroller SetCloseFactor " - Sets the close factor to given percentage - * E.g. "Comptroller SetCloseFactor 0.2" - `, - "SetCloseFactor", - [ - new Arg("comptroller", getComptroller, {implicit: true}), - new Arg("closeFactor", getPercentV) - ], - (world, from, {comptroller, closeFactor}) => setCloseFactor(world, from, comptroller, closeFactor) - ), - new Command<{comptroller: Comptroller, newPendingAdmin: AddressV}>(` - #### SetPendingAdmin - - * "Comptroller SetPendingAdmin newPendingAdmin:
" - Sets the pending admin for the Comptroller - * E.g. "Comptroller SetPendingAdmin Geoff" - `, - "SetPendingAdmin", - [ - new Arg("comptroller", getComptroller, {implicit: true}), - new Arg("newPendingAdmin", getAddressV) - ], - (world, from, {comptroller, newPendingAdmin}) => setPendingAdmin(world, from, comptroller, newPendingAdmin.val) - ), - new Command<{comptroller: Comptroller}>(` - #### AcceptAdmin - - * "Comptroller AcceptAdmin" - Accepts admin for the Comptroller - * E.g. "From Geoff (Comptroller AcceptAdmin)" - `, - "AcceptAdmin", - [ - new Arg("comptroller", getComptroller, {implicit: true}), - ], - (world, from, {comptroller}) => acceptAdmin(world, from, comptroller) - ), - new Command<{comptroller: Comptroller, newPauseGuardian: AddressV}>(` - #### SetPauseGuardian - - * "Comptroller SetPauseGuardian newPauseGuardian:
" - Sets the PauseGuardian for the Comptroller - * E.g. "Comptroller SetPauseGuardian Geoff" - `, - "SetPauseGuardian", - [ - new Arg("comptroller", getComptroller, {implicit: true}), - new Arg("newPauseGuardian", getAddressV) - ], - (world, from, {comptroller, newPauseGuardian}) => setPauseGuardian(world, from, comptroller, newPauseGuardian.val) - ), - - new Command<{comptroller: Comptroller, action: StringV, isPaused: BoolV}>(` - #### SetGuardianPaused - - * "Comptroller SetGuardianPaused " - Pauses or unpaused given cToken function - * E.g. "Comptroller SetGuardianPaused "Transfer" True" - `, - "SetGuardianPaused", - [ - new Arg("comptroller", getComptroller, {implicit: true}), - new Arg("action", getStringV), - new Arg("isPaused", getBoolV) - ], - (world, from, {comptroller, action, isPaused}) => setGuardianPaused(world, from, comptroller, action.val, isPaused.val) - ), - - new Command<{comptroller: Comptroller, cToken: CToken, action: StringV, isPaused: BoolV}>(` - #### SetGuardianMarketPaused - - * "Comptroller SetGuardianMarketPaused " - Pauses or unpaused given cToken function - * E.g. "Comptroller SetGuardianMarketPaused cREP "Mint" True" - `, - "SetGuardianMarketPaused", - [ - new Arg("comptroller", getComptroller, {implicit: true}), - new Arg("cToken", getCTokenV), - new Arg("action", getStringV), - new Arg("isPaused", getBoolV) - ], - (world, from, {comptroller, cToken, action, isPaused}) => setGuardianMarketPaused(world, from, comptroller, cToken, action.val, isPaused.val) - ), - - new Command<{comptroller: Comptroller, blocks: NumberV, _keyword: StringV}>(` - #### FastForward - - * "FastForward n: Blocks" - Moves the block number forward "n" blocks. Note: in "CTokenScenario" and "ComptrollerScenario" the current block number is mocked (starting at 100000). This is the only way for the protocol to see a higher block number (for accruing interest). - * E.g. "Comptroller FastForward 5 Blocks" - Move block number forward 5 blocks. - `, - "FastForward", - [ - new Arg("comptroller", getComptroller, {implicit: true}), - new Arg("blocks", getNumberV), - new Arg("_keyword", getStringV) - ], - (world, from, {comptroller, blocks}) => fastForward(world, from, comptroller, blocks) - ), - new View<{comptroller: Comptroller}>(` - #### Liquidity - - * "Comptroller Liquidity" - Prints liquidity of all minters or borrowers - `, - "Liquidity", - [ - new Arg("comptroller", getComptroller, {implicit: true}), - ], - (world, {comptroller}) => printLiquidity(world, comptroller) - ), - new View<{comptroller: Comptroller, input: StringV}>(` - #### Decode - - * "Decode input:" - Prints information about a call to a Comptroller contract - `, - "Decode", - [ - new Arg("comptroller", getComptroller, {implicit: true}), - new Arg("input", getStringV) - - ], - (world, {comptroller, input}) => decodeCall(world, comptroller, input.val) - ), - - new Command<{comptroller: Comptroller, signature: StringV, callArgs: StringV[]}>(` - #### Send - * Comptroller Send functionSignature: callArgs[] - Sends any transaction to comptroller - * E.g: Comptroller Send "setCompAddress(address)" (Address COMP) - `, - "Send", - [ - new Arg("comptroller", getComptroller, {implicit: true}), - new Arg("signature", getStringV), - new Arg("callArgs", getCoreValue, {variadic: true, mapped: true}) - ], - (world, from, {comptroller, signature, callArgs}) => sendAny(world, from, comptroller, signature.val, rawValues(callArgs)) - ), - new Command<{comptroller: Comptroller, cTokens: CToken[]}>(` - #### AddCompMarkets - - * "Comptroller AddCompMarkets (
...)" - Makes a market COMP-enabled - * E.g. "Comptroller AddCompMarkets (cZRX cBAT) - `, - "AddCompMarkets", - [ - new Arg("comptroller", getComptroller, {implicit: true}), - new Arg("cTokens", getCTokenV, {mapped: true}) - ], - (world, from, {comptroller, cTokens}) => addCompMarkets(world, from, comptroller, cTokens) - ), - new Command<{comptroller: Comptroller, cToken: CToken}>(` - #### DropCompMarket - - * "Comptroller DropCompMarket
" - Makes a market COMP - * E.g. "Comptroller DropCompMarket cZRX - `, - "DropCompMarket", - [ - new Arg("comptroller", getComptroller, {implicit: true}), - new Arg("cToken", getCTokenV) - ], - (world, from, {comptroller, cToken}) => dropCompMarket(world, from, comptroller, cToken) - ), - - new Command<{comptroller: Comptroller}>(` - #### RefreshCompSpeeds - - * "Comptroller RefreshCompSpeeds" - Recalculates all the COMP market speeds - * E.g. "Comptroller RefreshCompSpeeds - `, - "RefreshCompSpeeds", - [ - new Arg("comptroller", getComptroller, {implicit: true}) - ], - (world, from, {comptroller}) => refreshCompSpeeds(world, from, comptroller) - ), - new Command<{comptroller: Comptroller, holder: AddressV}>(` - #### ClaimComp - - * "Comptroller ClaimComp " - Claims comp - * E.g. "Comptroller ClaimComp Geoff - `, - "ClaimComp", - [ - new Arg("comptroller", getComptroller, {implicit: true}), - new Arg("holder", getAddressV) - ], - (world, from, {comptroller, holder}) => claimComp(world, from, comptroller, holder.val) - ), - new Command<{comptroller: Comptroller, holder: AddressV, cTokens: CToken[]}>(` - #### ClaimCompInMarkets - - * "Comptroller ClaimComp ( ...)" - Claims comp - * E.g. "Comptroller ClaimCompInMarkets Geoff (cDAI cBAT) - `, - "ClaimCompInMarkets", - [ - new Arg("comptroller", getComptroller, {implicit: true}), - new Arg("holder", getAddressV), - new Arg("cTokens", getCTokenV, {mapped: true}) - ], - (world, from, {comptroller, holder, cTokens}) => claimCompInMarkets(world, from, comptroller, holder.val, cTokens) - ), - new Command<{comptroller: Comptroller, contributor: AddressV}>(` - #### UpdateContributorRewards - - * "Comptroller UpdateContributorRewards " - Updates rewards for a contributor - * E.g. "Comptroller UpdateContributorRewards Geoff - `, - "UpdateContributorRewards", - [ - new Arg("comptroller", getComptroller, {implicit: true}), - new Arg("contributor", getAddressV) - ], - (world, from, {comptroller, contributor}) => updateContributorRewards(world, from, comptroller, contributor.val) - ), - new Command<{comptroller: Comptroller, recipient: AddressV, amount: NumberV}>(` - #### GrantComp - - * "Comptroller GrantComp " - Grants COMP to a recipient - * E.g. "Comptroller GrantComp Geoff 1e18 - `, - "GrantComp", - [ - new Arg("comptroller", getComptroller, {implicit: true}), - new Arg("recipient", getAddressV), - new Arg("amount", getNumberV) - ], - (world, from, {comptroller, recipient, amount}) => grantComp(world, from, comptroller, recipient.val, amount) - ), - new Command<{comptroller: Comptroller, rate: NumberV}>(` - #### SetCompRate - - * "Comptroller SetCompRate " - Sets COMP rate - * E.g. "Comptroller SetCompRate 1e18 - `, - "SetCompRate", - [ - new Arg("comptroller", getComptroller, {implicit: true}), - new Arg("rate", getNumberV) - ], - (world, from, {comptroller, rate}) => setCompRate(world, from, comptroller, rate) - ), - new Command<{comptroller: Comptroller, cToken: CToken, speed: NumberV}>(` - #### SetCompSpeed (deprecated) - * "Comptroller SetCompSpeed " - Sets COMP speed for market - * E.g. "Comptroller SetCompSpeed cToken 1000 - `, - "SetCompSpeed", - [ - new Arg("comptroller", getComptroller, {implicit: true}), - new Arg("cToken", getCTokenV), - new Arg("speed", getNumberV) - ], - (world, from, {comptroller, cToken, speed}) => setCompSpeed(world, from, comptroller, cToken, speed) - ), - new Command<{comptroller: Comptroller, cTokens: CToken[], supplySpeeds: NumberV[], borrowSpeeds: NumberV[]}>(` - #### SetCompSpeeds - * "Comptroller SetCompSpeeds ( ...) ( ...) ( ...)" - Sets COMP speeds for markets - * E.g. "Comptroller SetCompSpeeds (cZRX cBAT) (1000 0) (1000 2000) - `, - "SetCompSpeeds", - [ - new Arg("comptroller", getComptroller, {implicit: true}), - new Arg("cTokens", getCTokenV, {mapped: true}), - new Arg("supplySpeeds", getNumberV, {mapped: true}), - new Arg("borrowSpeeds", getNumberV, {mapped: true}) - ], - (world, from, {comptroller, cTokens, supplySpeeds, borrowSpeeds}) => setCompSpeeds(world, from, comptroller, cTokens, supplySpeeds, borrowSpeeds) - ), - new Command<{comptroller: Comptroller, contributor: AddressV, speed: NumberV}>(` - #### SetContributorCompSpeed - * "Comptroller SetContributorCompSpeed " - Sets COMP speed for contributor - * E.g. "Comptroller SetContributorCompSpeed contributor 1000 - `, - "SetContributorCompSpeed", - [ - new Arg("comptroller", getComptroller, {implicit: true}), - new Arg("contributor", getAddressV), - new Arg("speed", getNumberV) - ], - (world, from, {comptroller, contributor, speed}) => setContributorCompSpeed(world, from, comptroller, contributor.val, speed) - ), - new Command<{comptroller: Comptroller, cTokens: CToken[], borrowCaps: NumberV[]}>(` - #### SetMarketBorrowCaps - - * "Comptroller SetMarketBorrowCaps ( ...) ( ...)" - Sets Market Borrow Caps - * E.g "Comptroller SetMarketBorrowCaps (cZRX cUSDC) (10000.0e18, 1000.0e6) - `, - "SetMarketBorrowCaps", - [ - new Arg("comptroller", getComptroller, {implicit: true}), - new Arg("cTokens", getCTokenV, {mapped: true}), - new Arg("borrowCaps", getNumberV, {mapped: true}) - ], - (world, from, {comptroller,cTokens,borrowCaps}) => setMarketBorrowCaps(world, from, comptroller, cTokens, borrowCaps) - ), - new Command<{comptroller: Comptroller, newBorrowCapGuardian: AddressV}>(` - #### SetBorrowCapGuardian - - * "Comptroller SetBorrowCapGuardian newBorrowCapGuardian:
" - Sets the Borrow Cap Guardian for the Comptroller - * E.g. "Comptroller SetBorrowCapGuardian Geoff" - `, - "SetBorrowCapGuardian", - [ - new Arg("comptroller", getComptroller, {implicit: true}), - new Arg("newBorrowCapGuardian", getAddressV) - ], - (world, from, {comptroller, newBorrowCapGuardian}) => setBorrowCapGuardian(world, from, comptroller, newBorrowCapGuardian.val) - ), - new Command<{ comptroller: Comptroller, cTokens: CToken[], supplyCaps: NumberV[] }>(` - #### SetMarketSupplyCaps - * "Comptroller SetMarketSupplyCaps ( ...) ( ...)" - Sets Market Supply Caps - * E.g "Comptroller SetMarketSupplyCaps (vZRX vUSDC) (10000.0e18, 1000.0e6) - `, - "SetMarketSupplyCaps", - [ - new Arg("comptroller", getComptroller, { implicit: true }), - new Arg("vTokens", getCTokenV, { mapped: true }), - new Arg("supplyCaps", getNumberV, { mapped: true }) - ], - (world, from, { comptroller, cTokens, supplyCaps }) => setMarketSupplyCaps(world, from, comptroller, cTokens, supplyCaps) - ) - ]; -} - -export async function processComptrollerEvent(world: World, event: Event, from: string | null): Promise { - return await processCommandEvent("Comptroller", comptrollerCommands(), world, event, from); -} diff --git a/scenario/src/Event/ComptrollerImplEvent.ts b/scenario/src/Event/ComptrollerImplEvent.ts deleted file mode 100644 index 9ca9c49a5..000000000 --- a/scenario/src/Event/ComptrollerImplEvent.ts +++ /dev/null @@ -1,493 +0,0 @@ -import { Event } from '../Event'; -import { addAction, describeUser, World } from '../World'; -import { ComptrollerImpl } from '../Contract/ComptrollerImpl'; -import { Unitroller } from '../Contract/Unitroller'; -import { invoke } from '../Invokation'; -import { getAddressV, getArrayV, getEventV, getExpNumberV, getNumberV, getStringV, getCoreValue } from '../CoreValue'; -import { ArrayV, AddressV, EventV, NumberV, StringV } from '../Value'; -import { Arg, Command, View, processCommandEvent } from '../Command'; -import { buildComptrollerImpl } from '../Builder/ComptrollerImplBuilder'; -import { ComptrollerErrorReporter } from '../ErrorReporter'; -import { getComptrollerImpl, getComptrollerImplData, getUnitroller } from '../ContractLookup'; -import { verify } from '../Verify'; -import { mergeContractABI } from '../Networks'; -import { encodedNumber } from '../Encoding'; -import { encodeABI } from '../Utils'; - -async function genComptrollerImpl(world: World, from: string, params: Event): Promise { - let { world: nextWorld, comptrollerImpl, comptrollerImplData } = await buildComptrollerImpl( - world, - from, - params - ); - world = nextWorld; - - world = addAction( - world, - `Added Comptroller Implementation (${comptrollerImplData.description}) at address ${comptrollerImpl._address}`, - comptrollerImplData.invokation - ); - - return world; -} - -async function mergeABI( - world: World, - from: string, - comptrollerImpl: ComptrollerImpl, - unitroller: Unitroller -): Promise { - if (!world.dryRun) { - // Skip this specifically on dry runs since it's likely to crash due to a number of reasons - world = await mergeContractABI(world, 'Comptroller', unitroller, unitroller.name, comptrollerImpl.name); - } - - return world; -} - -async function becomeG1( - world: World, - from: string, - comptrollerImpl: ComptrollerImpl, - unitroller: Unitroller, - priceOracleAddr: string, - closeFactor: encodedNumber, - maxAssets: encodedNumber -): Promise { - let invokation = await invoke( - world, - comptrollerImpl.methods._become(unitroller._address, priceOracleAddr, closeFactor, maxAssets, false), - from, - ComptrollerErrorReporter - ); - if (!world.dryRun) { - // Skip this specifically on dry runs since it's likely to crash due to a number of reasons - world = await mergeContractABI(world, 'Comptroller', unitroller, unitroller.name, comptrollerImpl.name); - } - - world = addAction( - world, - `Become ${unitroller._address}'s Comptroller Impl with priceOracle=${priceOracleAddr},closeFactor=${closeFactor},maxAssets=${maxAssets}`, - invokation - ); - - return world; -} - -// Recome calls `become` on the G1 Comptroller, but passes a flag to not modify any of the initialization variables. -async function recome( - world: World, - from: string, - comptrollerImpl: ComptrollerImpl, - unitroller: Unitroller -): Promise { - let invokation = await invoke( - world, - comptrollerImpl.methods._become( - unitroller._address, - '0x0000000000000000000000000000000000000000', - 0, - 0, - true - ), - from, - ComptrollerErrorReporter - ); - - world = await mergeContractABI(world, 'Comptroller', unitroller, unitroller.name, comptrollerImpl.name); - - world = addAction(world, `Recome ${unitroller._address}'s Comptroller Impl`, invokation); - - return world; -} - -async function becomeG2( - world: World, - from: string, - comptrollerImpl: ComptrollerImpl, - unitroller: Unitroller -): Promise { - let invokation = await invoke( - world, - comptrollerImpl.methods._become(unitroller._address), - from, - ComptrollerErrorReporter - ); - - if (!world.dryRun) { - // Skip this specifically on dry runs since it's likely to crash due to a number of reasons - world = await mergeContractABI(world, 'Comptroller', unitroller, unitroller.name, comptrollerImpl.name); - } - - world = addAction(world, `Become ${unitroller._address}'s Comptroller Impl`, invokation); - - return world; -} - -async function becomeG3( - world: World, - from: string, - comptrollerImpl: ComptrollerImpl, - unitroller: Unitroller, - compRate: encodedNumber, - compMarkets: string[], - otherMarkets: string[] -): Promise { - let invokation = await invoke( - world, - comptrollerImpl.methods._become(unitroller._address, compRate, compMarkets, otherMarkets), - from, - ComptrollerErrorReporter - ); - - if (!world.dryRun) { - // Skip this specifically on dry runs since it's likely to crash due to a number of reasons - world = await mergeContractABI(world, 'Comptroller', unitroller, unitroller.name, comptrollerImpl.name); - } - - world = addAction(world, `Become ${unitroller._address}'s Comptroller Impl`, invokation); - - return world; -} - -async function becomeG4( - world: World, - from: string, - comptrollerImpl: ComptrollerImpl, - unitroller: Unitroller -): Promise { - let invokation = await invoke( - world, - comptrollerImpl.methods._become(unitroller._address), - from, - ComptrollerErrorReporter - ); - - if (!world.dryRun) { - // Skip this specifically on dry runs since it's likely to crash due to a number of reasons - world = await mergeContractABI(world, 'Comptroller', unitroller, unitroller.name, comptrollerImpl.name); - } - - world = addAction(world, `Become ${unitroller._address}'s Comptroller Impl`, invokation); - - return world; -} - -async function becomeG5( - world: World, - from: string, - comptrollerImpl: ComptrollerImpl, - unitroller: Unitroller -): Promise { - let invokation = await invoke( - world, - comptrollerImpl.methods._become(unitroller._address), - from, - ComptrollerErrorReporter - ); - - if (!world.dryRun) { - // Skip this specifically on dry runs since it's likely to crash due to a number of reasons - world = await mergeContractABI(world, 'Comptroller', unitroller, unitroller.name, comptrollerImpl.name); - } - - world = addAction(world, `Become ${unitroller._address}'s Comptroller Impl`, invokation); - - return world; -} - -async function becomeG6( - world: World, - from: string, - comptrollerImpl: ComptrollerImpl, - unitroller: Unitroller -): Promise { - let invokation = await invoke( - world, - comptrollerImpl.methods._become(unitroller._address), - from, - ComptrollerErrorReporter - ); - - if (!world.dryRun) { - // Skip this specifically on dry runs since it's likely to crash due to a number of reasons - world = await mergeContractABI(world, 'Comptroller', unitroller, unitroller.name, comptrollerImpl.name); - } - - world = addAction(world, `Become ${unitroller._address}'s Comptroller Impl`, invokation); - - return world; -} - -async function become( - world: World, - from: string, - comptrollerImpl: ComptrollerImpl, - unitroller: Unitroller -): Promise { - let invokation = await invoke( - world, - comptrollerImpl.methods._become(unitroller._address), - from, - ComptrollerErrorReporter - ); - - if (!world.dryRun) { - // Skip this specifically on dry runs since it's likely to crash due to a number of reasons - world = await mergeContractABI(world, 'Comptroller', unitroller, unitroller.name, comptrollerImpl.name); - } - - world = addAction(world, `Become ${unitroller._address}'s Comptroller Impl`, invokation); - - return world; -} - -async function verifyComptrollerImpl( - world: World, - comptrollerImpl: ComptrollerImpl, - name: string, - contract: string, - apiKey: string -): Promise { - if (world.isLocalNetwork()) { - world.printer.printLine(`Politely declining to verify on local network: ${world.network}.`); - } else { - await verify(world, apiKey, name, contract, comptrollerImpl._address); - } - - return world; -} - -export function comptrollerImplCommands() { - return [ - new Command<{ comptrollerImplParams: EventV }>( - ` - #### Deploy - - * "ComptrollerImpl Deploy ...comptrollerImplParams" - Generates a new Comptroller Implementation - * E.g. "ComptrollerImpl Deploy MyScen Scenario" - `, - 'Deploy', - [new Arg('comptrollerImplParams', getEventV, { variadic: true })], - (world, from, { comptrollerImplParams }) => genComptrollerImpl(world, from, comptrollerImplParams.val) - ), - new View<{ comptrollerImplArg: StringV; apiKey: StringV }>( - ` - #### Verify - - * "ComptrollerImpl Verify apiKey:" - Verifies Comptroller Implemetation in Etherscan - * E.g. "ComptrollerImpl Verify "myApiKey" - `, - 'Verify', - [new Arg('comptrollerImplArg', getStringV), new Arg('apiKey', getStringV)], - async (world, { comptrollerImplArg, apiKey }) => { - let [comptrollerImpl, name, data] = await getComptrollerImplData(world, comptrollerImplArg.val); - - return await verifyComptrollerImpl(world, comptrollerImpl, name, data.get('contract')!, apiKey.val); - }, - { namePos: 1 } - ), - new Command<{ - unitroller: Unitroller; - comptrollerImpl: ComptrollerImpl; - priceOracle: AddressV; - closeFactor: NumberV; - maxAssets: NumberV; - }>( - ` - #### BecomeG1 - - * "ComptrollerImpl BecomeG1 priceOracle: closeFactor: maxAssets:" - Become the comptroller, if possible. - * E.g. "ComptrollerImpl MyImpl BecomeG1 - `, - 'BecomeG1', - [ - new Arg('unitroller', getUnitroller, { implicit: true }), - new Arg('comptrollerImpl', getComptrollerImpl), - new Arg('priceOracle', getAddressV), - new Arg('closeFactor', getExpNumberV), - new Arg('maxAssets', getNumberV) - ], - (world, from, { unitroller, comptrollerImpl, priceOracle, closeFactor, maxAssets }) => - becomeG1( - world, - from, - comptrollerImpl, - unitroller, - priceOracle.val, - closeFactor.encode(), - maxAssets.encode() - ), - { namePos: 1 } - ), - - new Command<{ - unitroller: Unitroller; - comptrollerImpl: ComptrollerImpl; - }>( - ` - #### BecomeG2 - - * "ComptrollerImpl BecomeG2" - Become the comptroller, if possible. - * E.g. "ComptrollerImpl MyImpl BecomeG2 - `, - 'BecomeG2', - [ - new Arg('unitroller', getUnitroller, { implicit: true }), - new Arg('comptrollerImpl', getComptrollerImpl) - ], - (world, from, { unitroller, comptrollerImpl }) => becomeG2(world, from, comptrollerImpl, unitroller), - { namePos: 1 } - ), - - new Command<{ - unitroller: Unitroller; - comptrollerImpl: ComptrollerImpl; - compRate: NumberV; - compMarkets: ArrayV; - otherMarkets: ArrayV; - }>( - ` - #### BecomeG3 - - * "ComptrollerImpl BecomeG3 " - Become the comptroller, if possible. - * E.g. "ComptrollerImpl MyImpl BecomeG3 0.1e18 [cDAI, cETH, cUSDC] - `, - 'BecomeG3', - [ - new Arg('unitroller', getUnitroller, { implicit: true }), - new Arg('comptrollerImpl', getComptrollerImpl), - new Arg('compRate', getNumberV, { default: new NumberV(1e18) }), - new Arg('compMarkets', getArrayV(getAddressV), {default: new ArrayV([]) }), - new Arg('otherMarkets', getArrayV(getAddressV), { default: new ArrayV([]) }) - ], - (world, from, { unitroller, comptrollerImpl, compRate, compMarkets, otherMarkets }) => { - return becomeG3(world, from, comptrollerImpl, unitroller, compRate.encode(), compMarkets.val.map(a => a.val), otherMarkets.val.map(a => a.val)) - }, - { namePos: 1 } - ), - - new Command<{ - unitroller: Unitroller; - comptrollerImpl: ComptrollerImpl; - }>( - ` - #### BecomeG4 - * "ComptrollerImpl BecomeG4" - Become the comptroller, if possible. - * E.g. "ComptrollerImpl MyImpl BecomeG4 - `, - 'BecomeG4', - [ - new Arg('unitroller', getUnitroller, { implicit: true }), - new Arg('comptrollerImpl', getComptrollerImpl) - ], - (world, from, { unitroller, comptrollerImpl }) => { - return becomeG4(world, from, comptrollerImpl, unitroller) - }, - { namePos: 1 } - ), - - new Command<{ - unitroller: Unitroller; - comptrollerImpl: ComptrollerImpl; - }>( - ` - #### BecomeG5 - * "ComptrollerImpl BecomeG5" - Become the comptroller, if possible. - * E.g. "ComptrollerImpl MyImpl BecomeG5 - `, - 'BecomeG5', - [ - new Arg('unitroller', getUnitroller, { implicit: true }), - new Arg('comptrollerImpl', getComptrollerImpl) - ], - (world, from, { unitroller, comptrollerImpl }) => { - return becomeG5(world, from, comptrollerImpl, unitroller) - }, - { namePos: 1 } - ), - - new Command<{ - unitroller: Unitroller; - comptrollerImpl: ComptrollerImpl; - }>( - ` - #### BecomeG6 - * "ComptrollerImpl BecomeG6" - Become the comptroller, if possible. - * E.g. "ComptrollerImpl MyImpl BecomeG6 - `, - 'BecomeG6', - [ - new Arg('unitroller', getUnitroller, { implicit: true }), - new Arg('comptrollerImpl', getComptrollerImpl) - ], - (world, from, { unitroller, comptrollerImpl }) => { - return becomeG6(world, from, comptrollerImpl, unitroller) - }, - { namePos: 1 } - ), - - new Command<{ - unitroller: Unitroller; - comptrollerImpl: ComptrollerImpl; - }>( - ` - #### Become - - * "ComptrollerImpl Become " - Become the comptroller, if possible. - * E.g. "ComptrollerImpl MyImpl Become 0.1e18 [cDAI, cETH, cUSDC] - `, - 'Become', - [ - new Arg('unitroller', getUnitroller, { implicit: true }), - new Arg('comptrollerImpl', getComptrollerImpl) - ], - (world, from, { unitroller, comptrollerImpl }) => { - return become(world, from, comptrollerImpl, unitroller) - }, - { namePos: 1 } - ), - - new Command<{ - unitroller: Unitroller; - comptrollerImpl: ComptrollerImpl; - }>( - ` - #### MergeABI - - * "ComptrollerImpl MergeABI" - Merges the ABI, as if it was a become. - * E.g. "ComptrollerImpl MyImpl MergeABI - `, - 'MergeABI', - [ - new Arg('unitroller', getUnitroller, { implicit: true }), - new Arg('comptrollerImpl', getComptrollerImpl) - ], - (world, from, { unitroller, comptrollerImpl }) => mergeABI(world, from, comptrollerImpl, unitroller), - { namePos: 1 } - ), - new Command<{ unitroller: Unitroller; comptrollerImpl: ComptrollerImpl }>( - ` - #### Recome - - * "ComptrollerImpl Recome" - Recome the comptroller - * E.g. "ComptrollerImpl MyImpl Recome - `, - 'Recome', - [ - new Arg('unitroller', getUnitroller, { implicit: true }), - new Arg('comptrollerImpl', getComptrollerImpl) - ], - (world, from, { unitroller, comptrollerImpl }) => recome(world, from, comptrollerImpl, unitroller), - { namePos: 1 } - ) - ]; -} - -export async function processComptrollerImplEvent( - world: World, - event: Event, - from: string | null -): Promise { - return await processCommandEvent('ComptrollerImpl', comptrollerImplCommands(), world, event, from); -} diff --git a/scenario/src/Event/Erc20Event.ts b/scenario/src/Event/Erc20Event.ts deleted file mode 100644 index c3ccb99d5..000000000 --- a/scenario/src/Event/Erc20Event.ts +++ /dev/null @@ -1,282 +0,0 @@ -import {Event} from '../Event'; -import {addAction, World} from '../World'; -import {Erc20} from '../Contract/Erc20'; -import {invoke} from '../Invokation'; -import {buildErc20} from '../Builder/Erc20Builder'; -import { - getAddressV, - getBoolV, - getEventV, - getNumberV, - getStringV -} from '../CoreValue'; -import { - AddressV, - BoolV, - EventV, - NumberV, - StringV} from '../Value'; -import {getErc20V} from '../Value/Erc20Value'; -import {verify} from '../Verify'; -import {Arg, Command, View, processCommandEvent} from '../Command'; -import {CTokenErrorReporter} from '../ErrorReporter'; -import {encodedNumber} from '../Encoding'; -import {getErc20Data} from '../ContractLookup'; - -async function genToken(world: World, from: string, params: Event): Promise { - let {world: newWorld, erc20, tokenData} = await buildErc20(world, from, params); - world = newWorld; - - world = addAction( - world, - `Added ERC-20 token ${tokenData.symbol} (${tokenData.description}) at address ${erc20._address}`, - tokenData.invokation - ); - - return world; -} - -async function verifyErc20(world: World, erc20: Erc20, name: string, contract: string, apiKey: string): Promise { - if (world.isLocalNetwork()) { - world.printer.printLine(`Politely declining to verify on local network: ${world.network}.`); - } else { - await verify(world, apiKey, name, contract, erc20._address); - } - - return world; -} - -async function approve(world: World, from: string, erc20: Erc20, address: string, amount: NumberV): Promise { - let invokation = await invoke(world, erc20.methods.approve(address, amount.encode()), from, CTokenErrorReporter); - - world = addAction( - world, - `Approved ${erc20.name} ERC-20 token for ${from} of ${amount.show()}`, - invokation - ); - - return world; -} - -async function faucet(world: World, from: string, erc20: Erc20, address: string, amount: NumberV): Promise { - let invokation = await invoke(world, erc20.methods.allocateTo(address, amount.encode()), from, CTokenErrorReporter); - - world = addAction( - world, - `Fauceted ${amount.show()} ERC-20 tokens to ${address}`, - invokation - ); - - return world; -} - -async function transfer(world: World, from: string, erc20: Erc20, address: string, amount: NumberV): Promise { - let invokation = await invoke(world, erc20.methods.transfer(address, amount.encode()), from, CTokenErrorReporter); - - world = addAction( - world, - `Transferred ${amount.show()} ERC-20 tokens from ${from} to ${address}`, - invokation - ); - - return world; -} - -async function transferFrom(world: World, from: string, erc20: Erc20, owner: string, spender: string, amount: NumberV): Promise { - let invokation = await invoke(world, erc20.methods.transferFrom(owner, spender, amount.encode()), from, CTokenErrorReporter); - - world = addAction( - world, - `"Transferred from" ${amount.show()} ERC-20 tokens from ${owner} to ${spender}`, - invokation - ); - - return world; -} - -async function setFail(world: World, from: string, erc20: Erc20, fail: boolean): Promise { - let invokation = await invoke(world, erc20.methods.setFail(fail), from, CTokenErrorReporter); - - world = addAction( - world, - `Set fail for ${erc20.name} to ${fail}`, - invokation - ); - - return world; -} - -async function setPaused(world: World, from: string, erc20: Erc20, pause: boolean): Promise { - let method = pause ? erc20.methods.pause() : erc20.methods.unpause(); - let invokation = await invoke(world, method, from); - - world = addAction( - world, - `Set ${erc20.name} ${pause ? 'paused' : 'unpaused'}`, - invokation - ); - - return world; -} - -async function setFee(world: World, from: string, erc20: Erc20, basisPointFee: NumberV, maxFee: NumberV): Promise { - let invokation = await invoke(world, erc20.methods.setParams(basisPointFee.encode(), maxFee.encode()), from); - - world = addAction( - world, - `Set fee on ${erc20.name} to ${basisPointFee} with a max of ${maxFee}`, - invokation - ); - - return world; -} - -export function erc20Commands() { - return [ - new Command<{erc20Params: EventV}>(` - #### Deploy - - * "Erc20 Deploy ...erc20Params" - Generates a new ERC-20 token by name - * E.g. "Erc20 Deploy ZRX ..." - `, - "Deploy", - [new Arg("erc20Params", getEventV, {variadic: true})], - (world, from, {erc20Params}) => genToken(world, from, erc20Params.val) - ), - - new View<{erc20Arg: StringV, apiKey: StringV}>(` - #### Verify - - * "Erc20 Verify apiKey:" - Verifies Erc20 in Etherscan - * E.g. "Erc20 ZRX Verify "myApiKey" - `, - "Verify", - [ - new Arg("erc20Arg", getStringV), - new Arg("apiKey", getStringV) - ], - async (world, {erc20Arg, apiKey}) => { - let [erc20, name, data] = await getErc20Data(world, erc20Arg.val); - - return await verifyErc20(world, erc20, name, data.get('contract')!, apiKey.val); - }, - {namePos: 1} - ), - - new Command<{erc20: Erc20, spender: AddressV, amount: NumberV}>(` - #### Approve - - * "Erc20 Approve spender:
" - Adds an allowance between user and address - * E.g. "Erc20 ZRX Approve cZRX 1.0e18" - `, - "Approve", - [ - new Arg("erc20", getErc20V), - new Arg("spender", getAddressV), - new Arg("amount", getNumberV) - ], - (world, from, {erc20, spender, amount}) => { - return approve(world, from, erc20, spender.val, amount) - }, - {namePos: 1} - ), - - new Command<{erc20: Erc20, recipient: AddressV, amount: NumberV}>(` - #### Faucet - - * "Erc20 Faucet recipient: " - Adds an arbitrary balance to given user - * E.g. "Erc20 ZRX Faucet Geoff 1.0e18" - `, - "Faucet", - [ - new Arg("erc20", getErc20V), - new Arg("recipient", getAddressV), - new Arg("amount", getNumberV) - ], - (world, from, {erc20, recipient, amount}) => { - return faucet(world, from, erc20, recipient.val, amount) - }, - {namePos: 1} - ), - new Command<{erc20: Erc20, recipient: AddressV, amount: NumberV}>(` - #### Transfer - - * "Erc20 Transfer recipient: " - Transfers a number of tokens via "transfer" as given user to recipient (this does not depend on allowance) - * E.g. "Erc20 ZRX Transfer Torrey 1.0e18" - `, - "Transfer", - [ - new Arg("erc20", getErc20V), - new Arg("recipient", getAddressV), - new Arg("amount", getNumberV) - ], - (world, from, {erc20, recipient, amount}) => transfer(world, from, erc20, recipient.val, amount), - {namePos: 1} - ), - new Command<{erc20: Erc20, owner: AddressV, spender: AddressV, amount: NumberV}>(` - #### TransferFrom - - * "Erc20 TransferFrom owner: spender: " - Transfers a number of tokens via "transfeFrom" to recipient (this depends on allowances) - * E.g. "Erc20 ZRX TransferFrom Geoff Torrey 1.0e18" - `, - "TransferFrom", - [ - new Arg("erc20", getErc20V), - new Arg("owner", getAddressV), - new Arg("spender", getAddressV), - new Arg("amount", getNumberV) - ], - (world, from, {erc20, owner, spender, amount}) => transferFrom(world, from, erc20, owner.val, spender.val, amount), - {namePos: 1} - ), - new Command<{erc20: Erc20, fail: BoolV}>(` - #### SetFail - - * "Erc20 SetFail fail:" - Sets failure on or off for an EvilToken - * E.g. "Erc20 EVL SetFail False" - `, - "SetFail", - [ - new Arg("erc20", getErc20V), - new Arg("fail", getBoolV) - ], - (world, from, {erc20, fail}) => setFail(world, from, erc20, fail.val), - {namePos: 1} - ), - new Command<{erc20: Erc20, paused: BoolV}>(` - #### Pause - - * "Erc20 Pause paused:" - Sets paused on or off for WBTC - * E.g. "Erc20 WBTC Pause" - * E.g. "Erc20 WBTC Pause False" - `, - "Pause", - [ - new Arg("erc20", getErc20V), - new Arg("paused", getBoolV, {default: new BoolV(true)}) - ], - (world, from, {erc20, paused}) => setPaused(world, from, erc20, paused.val), - {namePos: 1} - ), - new Command<{erc20: Erc20, basisPointFee: NumberV, maxFee: NumberV}>(` - #### SetFee - - * "Erc20 SetFee basisPointFee: maxFee:" - Sets the current fee and max fee on Tether. Current - * Current fee (basisPointFee) has a max of 20 basis points, while maxFee is capped at 50 Tether (a max absolute fee of 50 * 10 ^ decimals) - * E.g. "Erc20 USDT SetFee 10 10" - `, - "SetFee", - [ - new Arg("erc20", getErc20V), - new Arg("basisPointFee", getNumberV), - new Arg("maxFee", getNumberV) - ], - (world, from, {erc20, basisPointFee, maxFee}) => setFee(world, from, erc20, basisPointFee, maxFee), - {namePos: 1} - ) - ]; -} - -export async function processErc20Event(world: World, event: Event, from: string | null): Promise { - return await processCommandEvent("Erc20", erc20Commands(), world, event, from); -} diff --git a/scenario/src/Event/ExpectationEvent.ts b/scenario/src/Event/ExpectationEvent.ts deleted file mode 100644 index 82429d348..000000000 --- a/scenario/src/Event/ExpectationEvent.ts +++ /dev/null @@ -1,70 +0,0 @@ -import {Event} from '../Event'; -import {addExpectation, World} from '../World'; -import { - EventV, - NumberV, - Value -} from '../Value'; -import { - getCoreValue, - getEventV, - getNumberV -} from '../CoreValue'; -import {Invariant} from '../Invariant'; -import {ChangesExpectation} from '../Expectation/ChangesExpectation'; -import {RemainsExpectation} from '../Expectation/RemainsExpectation'; -import {formatEvent} from '../Formatter'; -import {Arg, View, processCommandEvent} from '../Command'; - -async function changesExpectation(world: World, condition: Event, delta: NumberV, tolerance: NumberV): Promise { - const value = await getCoreValue(world, condition); - const expectation = new ChangesExpectation(condition, value, delta, tolerance); - - return addExpectation(world, expectation); -} - -async function remainsExpectation(world: World, condition: Event, value: Value): Promise { - const expectation = new RemainsExpectation(condition, value); - - // Immediately check value matches - await expectation.checker(world, true); - - return addExpectation(world, expectation); -} - -export function expectationCommands() { - return [ - new View<{condition: EventV, delta: NumberV, tolerance: NumberV}>(` - #### Changes - - * "Changes amount: tolerance:" - Expects that given value changes by amount - * E.g ."Expect Changes (CToken cZRX UnderlyingBalance Geoff) +10e18" - `, - "Changes", - [ - new Arg("condition", getEventV), - new Arg("delta", getNumberV), - new Arg("tolerance", getNumberV, {default: new NumberV(0)}) - ], - (world, {condition, delta, tolerance}) => changesExpectation(world, condition.val, delta, tolerance) - ), - - new View<{condition: EventV, value: Value}>(` - #### Remains - - * "Expect Remains " - Ensures that the given condition starts at and remains a given value - * E.g ."Expect Remains (CToken cZRX UnderlyingBalance Geoff) (Exactly 0)" - `, - "Remains", - [ - new Arg("condition", getEventV), - new Arg("value", getCoreValue) - ], - (world, {condition, value}) => remainsExpectation(world, condition.val, value) - ) - ]; -} - -export async function processExpectationEvent(world: World, event: Event, from: string | null): Promise { - return await processCommandEvent("Expectation", expectationCommands(), world, event, from); -} diff --git a/scenario/src/Event/InterestRateModelEvent.ts b/scenario/src/Event/InterestRateModelEvent.ts deleted file mode 100644 index 7276c06f5..000000000 --- a/scenario/src/Event/InterestRateModelEvent.ts +++ /dev/null @@ -1,84 +0,0 @@ -import {Event} from '../Event'; -import {addAction, World} from '../World'; -import {InterestRateModel} from '../Contract/InterestRateModel'; -import {buildInterestRateModel} from '../Builder/InterestRateModelBuilder'; -import {invoke} from '../Invokation'; -import { - getAddressV, - getEventV, - getNumberV, - getStringV, -} from '../CoreValue'; -import { - AddressV, - EventV, - NumberV, - StringV -} from '../Value'; -import {Arg, Command, processCommandEvent, View} from '../Command'; -import {getInterestRateModelData} from '../ContractLookup'; -import {verify} from '../Verify'; - -async function genInterestRateModel(world: World, from: string, params: Event): Promise { - let {world: nextWorld, interestRateModel, interestRateModelData} = await buildInterestRateModel(world, from, params); - world = nextWorld; - - world = addAction( - world, - `Deployed interest rate model (${interestRateModelData.description}) to address ${interestRateModel._address}`, - interestRateModelData.invokation - ); - - return world; -} - -async function verifyInterestRateModel(world: World, interestRateModel: InterestRateModel, apiKey: string, modelName: string, contractName: string): Promise { - if (world.isLocalNetwork()) { - world.printer.printLine(`Politely declining to verify on local network: ${world.network}.`); - } else { - await verify(world, apiKey, modelName, contractName, interestRateModel._address); - } - - return world; -} - -export function interestRateModelCommands() { - return [ - new Command<{params: EventV}>(` - #### Deploy - - * "Deploy ...params" - Generates a new interest rate model - * E.g. "InterestRateModel Deploy Fixed MyInterestRateModel 0.5" - * E.g. "InterestRateModel Deploy Whitepaper MyInterestRateModel 0.05 0.45" - * E.g. "InterestRateModel Deploy Standard MyInterestRateModel" - `, - "Deploy", - [ - new Arg("params", getEventV, {variadic: true}) - ], - (world, from, {params}) => genInterestRateModel(world, from, params.val) - ), - new View<{interestRateModelArg: StringV, apiKey: StringV}>(` - #### Verify - - * " Verify apiKey:" - Verifies InterestRateModel in Etherscan - * E.g. "InterestRateModel MyInterestRateModel Verify "myApiKey" - `, - "Verify", - [ - new Arg("interestRateModelArg", getStringV), - new Arg("apiKey", getStringV) - ], - async (world, {interestRateModelArg, apiKey}) => { - let [interestRateModel, name, data] = await getInterestRateModelData(world, interestRateModelArg.val); - - return await verifyInterestRateModel(world, interestRateModel, apiKey.val, name, data.get('contract')!) - }, - {namePos: 1} - ) - ]; -} - -export async function processInterestRateModelEvent(world: World, event: Event, from: string | null): Promise { - return await processCommandEvent("InterestRateModel", interestRateModelCommands(), world, event, from); -} diff --git a/scenario/src/Event/InvariantEvent.ts b/scenario/src/Event/InvariantEvent.ts deleted file mode 100644 index 9a94b9c8c..000000000 --- a/scenario/src/Event/InvariantEvent.ts +++ /dev/null @@ -1,83 +0,0 @@ -import {Event} from '../Event'; -import {addInvariant, World} from '../World'; -import { - EventV, - Value -} from '../Value'; -import { - getCoreValue, - getEventV, -} from '../CoreValue'; -import {Invariant} from '../Invariant'; -import {StaticInvariant} from '../Invariant/StaticInvariant'; -import {RemainsInvariant} from '../Invariant/RemainsInvariant'; -import {SuccessInvariant} from '../Invariant/SuccessInvariant'; -import {formatEvent} from '../Formatter'; -import {Arg, View, processCommandEvent} from '../Command'; - - -async function staticInvariant(world: World, condition): Promise { - const currentValue = await getCoreValue(world, condition); - const invariant = new StaticInvariant(condition, currentValue); - - return addInvariant(world, invariant); -} - -async function remainsInvariant(world: World, condition: Event, value: Value): Promise { - const invariant = new RemainsInvariant(condition, value); - - // Immediately check value matches - await invariant.checker(world, true); - - return addInvariant(world, invariant); -} - -async function successInvariant(world: World): Promise { - const invariant = new SuccessInvariant(); - - return addInvariant(world, invariant); -} - -export function invariantCommands() { - return [ - new View<{condition: EventV}>(` - #### Static - - * "Static " - Ensures that the given condition retains a consistent value - * E.g ."Invariant Static (CToken cZRX UnderlyingBalance Geoff)" - `, - "Static", - [ - new Arg("condition", getEventV) - ], - (world, {condition}) => staticInvariant(world, condition.val) - ), - new View<{condition: EventV, value: Value}>(` - #### Remains - - * "Invariant Remains " - Ensures that the given condition starts at and remains a given value - * E.g ."Invariant Remains (CToken cZRX UnderlyingBalance Geoff) (Exactly 0)" - `, - "Remains", - [ - new Arg("condition", getEventV), - new Arg("value", getCoreValue) - ], - (world, {condition, value}) => remainsInvariant(world, condition.val, value) - ), - new View<{}>(` - #### Success - - * "Invariant Success" - Ensures that each transaction completes successfully - * E.g ."Invariant Success" - `, - "Success", - [], - (world, {}) => successInvariant(world) - ) - ]; -} - -export async function processInvariantEvent(world: World, event: Event, from: string | null): Promise { - return await processCommandEvent("Invariant", invariantCommands(), world, event, from); -} diff --git a/scenario/src/Event/PriceOracleEvent.ts b/scenario/src/Event/PriceOracleEvent.ts deleted file mode 100644 index fadbd9dca..000000000 --- a/scenario/src/Event/PriceOracleEvent.ts +++ /dev/null @@ -1,146 +0,0 @@ -import {Event} from '../Event'; -import {addAction, World} from '../World'; -import {PriceOracle} from '../Contract/PriceOracle'; -import {buildPriceOracle, setPriceOracle} from '../Builder/PriceOracleBuilder'; -import {invoke} from '../Invokation'; -import { - getAddressV, - getEventV, - getExpNumberV, - getStringV -} from '../CoreValue'; -import { - AddressV, - EventV, - NumberV, - StringV -} from '../Value'; -import {Arg, Command, processCommandEvent, View} from '../Command'; -import {getPriceOracle} from '../ContractLookup'; -import {verify} from '../Verify'; -import {encodedNumber} from '../Encoding'; - -async function genPriceOracle(world: World, from: string, params: Event): Promise { - let {world: nextWorld, priceOracle, priceOracleData} = await buildPriceOracle(world, from, params); - world = nextWorld; - - world = addAction( - world, - `Deployed PriceOracle (${priceOracleData.description}) to address ${priceOracle._address}`, - priceOracleData.invokation! - ); - - return world; -} - -async function setPriceOracleFn(world: World, params: Event): Promise { - let {world: nextWorld, priceOracle, priceOracleData} = await setPriceOracle(world, params); - - return nextWorld; -} - -async function setPrice(world: World, from: string, priceOracle: PriceOracle, cToken: string, amount: NumberV): Promise { - return addAction( - world, - `Set price oracle price for ${cToken} to ${amount.show()}`, - await invoke(world, priceOracle.methods.setUnderlyingPrice(cToken, amount.encode()), from) - ); -} - -async function setDirectPrice(world: World, from: string, priceOracle: PriceOracle, address: string, amount: NumberV): Promise { - return addAction( - world, - `Set price oracle price for ${address} to ${amount.show()}`, - await invoke(world, priceOracle.methods.setDirectPrice(address, amount.encode()), from) - ); -} - -async function verifyPriceOracle(world: World, priceOracle: PriceOracle, apiKey: string, contractName: string): Promise { - if (world.isLocalNetwork()) { - world.printer.printLine(`Politely declining to verify on local network: ${world.network}.`); - } else { - await verify(world, apiKey, "PriceOracle", contractName, priceOracle._address); - } - - return world; -} - -export function priceOracleCommands() { - return [ - new Command<{params: EventV}>(` - #### Deploy - - * "Deploy ...params" - Generates a new price oracle - * E.g. "PriceOracle Deploy Fixed 1.0" - * E.g. "PriceOracle Deploy Simple" - * E.g. "PriceOracle Deploy NotPriceOracle" - `, - "Deploy", - [ - new Arg("params", getEventV, {variadic: true}) - ], - (world, from, {params}) => genPriceOracle(world, from, params.val) - ), - new Command<{params: EventV}>(` - #### Set - - * "Set ...params" - Sets the price oracle to given deployed contract - * E.g. "PriceOracle Set Standard \"0x...\" \"My Already Deployed Oracle\"" - `, - "Set", - [ - new Arg("params", getEventV, {variadic: true}) - ], - (world, from, {params}) => setPriceOracleFn(world, params.val) - ), - - new Command<{priceOracle: PriceOracle, cToken: AddressV, amount: NumberV}>(` - #### SetPrice - - * "SetPrice " - Sets the per-ether price for the given cToken - * E.g. "PriceOracle SetPrice cZRX 1.0" - `, - "SetPrice", - [ - new Arg("priceOracle", getPriceOracle, {implicit: true}), - new Arg("cToken", getAddressV), - new Arg("amount", getExpNumberV) - ], - (world, from, {priceOracle, cToken, amount}) => setPrice(world, from, priceOracle, cToken.val, amount) - ), - - new Command<{priceOracle: PriceOracle, address: AddressV, amount: NumberV}>(` - #### SetDirectPrice - - * "SetDirectPrice
" - Sets the per-ether price for the given cToken - * E.g. "PriceOracle SetDirectPrice (Address Zero) 1.0" - `, - "SetDirectPrice", - [ - new Arg("priceOracle", getPriceOracle, {implicit: true}), - new Arg("address", getAddressV), - new Arg("amount", getExpNumberV) - ], - (world, from, {priceOracle, address, amount}) => setDirectPrice(world, from, priceOracle, address.val, amount) - ), - - new View<{priceOracle: PriceOracle, apiKey: StringV, contractName: StringV}>(` - #### Verify - - * "Verify apiKey: contractName:=PriceOracle" - Verifies PriceOracle in Etherscan - * E.g. "PriceOracle Verify "myApiKey" - `, - "Verify", - [ - new Arg("priceOracle", getPriceOracle, {implicit: true}), - new Arg("apiKey", getStringV), - new Arg("contractName", getStringV, {default: new StringV("PriceOracle")}) - ], - (world, {priceOracle, apiKey, contractName}) => verifyPriceOracle(world, priceOracle, apiKey.val, contractName.val) - ) - ]; -} - -export async function processPriceOracleEvent(world: World, event: Event, from: string | null): Promise { - return await processCommandEvent("PriceOracle", priceOracleCommands(), world, event, from); -} diff --git a/scenario/src/Event/PriceOracleProxyEvent.ts b/scenario/src/Event/PriceOracleProxyEvent.ts deleted file mode 100644 index a75af5b8b..000000000 --- a/scenario/src/Event/PriceOracleProxyEvent.ts +++ /dev/null @@ -1,104 +0,0 @@ -import {Event} from '../Event'; -import {addAction, World} from '../World'; -import {PriceOracleProxy} from '../Contract/PriceOracleProxy'; -import {buildPriceOracleProxy} from '../Builder/PriceOracleProxyBuilder'; -import {invoke} from '../Invokation'; -import { - getAddressV, - getEventV, - getExpNumberV, - getStringV -} from '../CoreValue'; -import { - AddressV, - EventV, - NumberV, - StringV -} from '../Value'; -import {Arg, Command, processCommandEvent, View} from '../Command'; -import {getPriceOracleProxy} from '../ContractLookup'; -import {verify} from '../Verify'; -import {encodedNumber} from '../Encoding'; - -async function genPriceOracleProxy(world: World, from: string, params: Event): Promise { - let priceOracleProxy; - let invokation; - - ({world, priceOracleProxy, invokation} = await buildPriceOracleProxy(world, from, params)); - - world = addAction( - world, - `Deployed PriceOracleProxy to address ${priceOracleProxy._address}`, - invokation - ); - - return world; -} - -async function verifyPriceOracleProxy(world: World, priceOracleProxy: PriceOracleProxy, apiKey: string, contractName: string): Promise { - if (world.isLocalNetwork()) { - world.printer.printLine(`Politely declining to verify on local network: ${world.network}.`); - } else { - await verify(world, apiKey, "PriceOracleProxy", contractName, priceOracleProxy._address); - } - - return world; -} - -async function setSaiPrice(world: World, from: string, priceOracleProxy: PriceOracleProxy, amount: NumberV): Promise { - return addAction( - world, - `Set price oracle SAI price to ${amount.show()}`, - await invoke(world, priceOracleProxy.methods.setSaiPrice(amount.encode()), from) - ); -} - -export function priceOracleProxyCommands() { - return [ - new Command<{params: EventV}>(` - #### Deploy - - * "Deploy ...params" - Generates a new price oracle proxy - * E.g. "PriceOracleProxy Deploy (Unitroller Address) (PriceOracle Address) (cEther Address)" - `, - "Deploy", - [ - new Arg("params", getEventV, {variadic: true}) - ], - (world, from, {params}) => genPriceOracleProxy(world, from, params.val) - ), - - new View<{priceOracleProxy: PriceOracleProxy, apiKey: StringV, contractName: StringV}>(` - #### Verify - - * "Verify apiKey: contractName:=PriceOracleProxy" - Verifies PriceOracleProxy in Etherscan - * E.g. "PriceOracleProxy Verify "myApiKey" - `, - "Verify", - [ - new Arg("priceOracleProxy", getPriceOracleProxy, {implicit: true}), - new Arg("apiKey", getStringV), - new Arg("contractName", getStringV, {default: new StringV("PriceOracleProxy")}) - ], - (world, {priceOracleProxy, apiKey, contractName}) => verifyPriceOracleProxy(world, priceOracleProxy, apiKey.val, contractName.val) - ), - - new Command<{priceOracleProxy: PriceOracleProxy, amount: NumberV}>(` - #### SetSaiPrice - - * "SetSaiPrice " - Sets the per-ether price for SAI - * E.g. "PriceOracleProxy SetSaiPrice 1.0" - `, - "SetSaiPrice", - [ - new Arg("priceOracleProxy", getPriceOracleProxy, {implicit: true}), - new Arg("amount", getExpNumberV) - ], - (world, from, {priceOracleProxy, amount}) => setSaiPrice(world, from, priceOracleProxy, amount) - ) - ]; -} - -export async function processPriceOracleProxyEvent(world: World, event: Event, from: string | null): Promise { - return await processCommandEvent("PriceOracleProxy", priceOracleProxyCommands(), world, event, from); -} diff --git a/scenario/src/Event/TrxEvent.ts b/scenario/src/Event/TrxEvent.ts deleted file mode 100644 index ae8285298..000000000 --- a/scenario/src/Event/TrxEvent.ts +++ /dev/null @@ -1,56 +0,0 @@ -import {World} from '../World'; -import {Event} from '../Event'; -import {processCoreEvent} from '../CoreEvent'; -import { - EventV, - NumberV -} from '../Value'; -import { - getEventV, - getNumberV -} from '../CoreValue'; -import {Arg, Command, processCommandEvent} from '../Command'; -import {encodedNumber} from '../Encoding'; - -async function setTrxValue(world: World, value: encodedNumber): Promise { - return world.update('trxInvokationOpts', (t) => t.set('value', value.toString())); -} - -async function setTrxGasPrice(world: World, gasPrice: encodedNumber): Promise { - return world.update('trxInvokationOpts', (t) => t.set('gasPrice', gasPrice.toString()));; -} - -export function trxCommands() { - return [ - new Command<{amount: NumberV, event: EventV}>(` - #### Value - - * "Value " - Runs event with a set amount for any transactions - * E.g. "Value 1.0e18 (CToken cEth Mint 1.0e18)" - `, - "Value", - [ - new Arg("amount", getNumberV), - new Arg("event", getEventV) - ], - async (world, from, {amount, event}) => processCoreEvent(await setTrxValue(world, amount.encode()), event.val, from) - ), - new Command<{gasPrice: NumberV, event: EventV}>(` - #### GasPrice - - * "GasPrice " - Runs event with a given gas price - * E.g. "GasPrice 0 (CToken cEth Mint 1.0e18)" - `, - "GasPrice", - [ - new Arg("gasPrice", getNumberV), - new Arg("event", getEventV) - ], - async (world, from, {gasPrice, event}) => processCoreEvent(await setTrxGasPrice(world, gasPrice.encode()), event.val, from) - ) - ]; -} - -export async function processTrxEvent(world: World, event: Event, from: string | null): Promise { - return await processCommandEvent("Trx", trxCommands(), world, event, from); -} diff --git a/scenario/src/Event/UnitrollerEvent.ts b/scenario/src/Event/UnitrollerEvent.ts deleted file mode 100644 index 6adc46133..000000000 --- a/scenario/src/Event/UnitrollerEvent.ts +++ /dev/null @@ -1,152 +0,0 @@ -import { Event } from '../Event'; -import { addAction, describeUser, World } from '../World'; -import { Unitroller } from '../Contract/Unitroller'; -import { ComptrollerImpl } from '../Contract/ComptrollerImpl'; -import { invoke } from '../Invokation'; -import { getEventV, getStringV, getAddressV } from '../CoreValue'; -import { EventV, StringV, AddressV } from '../Value'; -import { Arg, Command, View, processCommandEvent } from '../Command'; -import { ComptrollerErrorReporter } from '../ErrorReporter'; -import { buildUnitroller } from '../Builder/UnitrollerBuilder'; -import { getComptrollerImpl, getUnitroller } from '../ContractLookup'; -import { verify } from '../Verify'; - -async function genUnitroller(world: World, from: string, params: Event): Promise { - let { world: nextWorld, unitroller, unitrollerData } = await buildUnitroller(world, from, params); - world = nextWorld; - - world = addAction( - world, - `Added Unitroller (${unitrollerData.description}) at address ${unitroller._address}`, - unitrollerData.invokation - ); - - return world; -} - -async function verifyUnitroller(world: World, unitroller: Unitroller, apiKey: string): Promise { - if (world.isLocalNetwork()) { - world.printer.printLine(`Politely declining to verify on local network: ${world.network}.`); - } else { - await verify(world, apiKey, 'Unitroller', 'Unitroller', unitroller._address); - } - - return world; -} - -async function acceptAdmin(world: World, from: string, unitroller: Unitroller): Promise { - let invokation = await invoke(world, unitroller.methods._acceptAdmin(), from, ComptrollerErrorReporter); - - world = addAction(world, `Accept admin as ${from}`, invokation); - - return world; -} - -async function setPendingAdmin( - world: World, - from: string, - unitroller: Unitroller, - pendingAdmin: string -): Promise { - let invokation = await invoke( - world, - unitroller.methods._setPendingAdmin(pendingAdmin), - from, - ComptrollerErrorReporter - ); - - world = addAction(world, `Set pending admin to ${pendingAdmin}`, invokation); - - return world; -} - -async function setPendingImpl( - world: World, - from: string, - unitroller: Unitroller, - comptrollerImpl: ComptrollerImpl -): Promise { - let invokation = await invoke( - world, - unitroller.methods._setPendingImplementation(comptrollerImpl._address), - from, - ComptrollerErrorReporter - ); - - world = addAction(world, `Set pending comptroller impl to ${comptrollerImpl.name}`, invokation); - - return world; -} - -export function unitrollerCommands() { - return [ - new Command<{ unitrollerParams: EventV }>( - ` - #### Deploy - - * "Unitroller Deploy ...unitrollerParams" - Generates a new Unitroller - * E.g. "Unitroller Deploy" - `, - 'Deploy', - [new Arg('unitrollerParams', getEventV, { variadic: true })], - (world, from, { unitrollerParams }) => genUnitroller(world, from, unitrollerParams.val) - ), - new View<{ unitroller: Unitroller; apiKey: StringV }>( - ` - #### Verify - - * "Unitroller Verify apiKey:" - Verifies Unitroller in Etherscan - * E.g. "Unitroller Verify "myApiKey" - `, - 'Verify', - [new Arg('unitroller', getUnitroller, { implicit: true }), new Arg('apiKey', getStringV)], - (world, { unitroller, apiKey }) => verifyUnitroller(world, unitroller, apiKey.val) - ), - new Command<{ unitroller: Unitroller; pendingAdmin: AddressV }>( - ` - #### AcceptAdmin - - * "AcceptAdmin" - Accept admin for this unitroller - * E.g. "Unitroller AcceptAdmin" - `, - 'AcceptAdmin', - [new Arg('unitroller', getUnitroller, { implicit: true })], - (world, from, { unitroller }) => acceptAdmin(world, from, unitroller) - ), - new Command<{ unitroller: Unitroller; pendingAdmin: AddressV }>( - ` - #### SetPendingAdmin - - * "SetPendingAdmin admin:" - Sets the pending admin for this unitroller - * E.g. "Unitroller SetPendingAdmin Jared" - `, - 'SetPendingAdmin', - [new Arg('unitroller', getUnitroller, { implicit: true }), new Arg('pendingAdmin', getAddressV)], - (world, from, { unitroller, pendingAdmin }) => - setPendingAdmin(world, from, unitroller, pendingAdmin.val) - ), - new Command<{ unitroller: Unitroller; comptrollerImpl: ComptrollerImpl }>( - ` - #### SetPendingImpl - - * "SetPendingImpl impl:" - Sets the pending comptroller implementation for this unitroller - * E.g. "Unitroller SetPendingImpl MyScenImpl" - Sets the current comptroller implementation to MyScenImpl - `, - 'SetPendingImpl', - [ - new Arg('unitroller', getUnitroller, { implicit: true }), - new Arg('comptrollerImpl', getComptrollerImpl) - ], - (world, from, { unitroller, comptrollerImpl }) => - setPendingImpl(world, from, unitroller, comptrollerImpl) - ) - ]; -} - -export async function processUnitrollerEvent( - world: World, - event: Event, - from: string | null -): Promise { - return await processCommandEvent('Unitroller', unitrollerCommands(), world, event, from); -} diff --git a/scenario/src/EventBuilder.ts b/scenario/src/EventBuilder.ts deleted file mode 100644 index 54d7a9d0e..000000000 --- a/scenario/src/EventBuilder.ts +++ /dev/null @@ -1,310 +0,0 @@ -import { Event } from './Event'; -import { addAction, World } from './World'; -import { Invokation } from './Invokation'; -import { Arg, Command, Fetcher, getFetcherValue, processCommandEvent, View } from './Command'; -import { storeAndSaveContract } from './Networks'; -import { Contract, getContract } from './Contract'; -import { getWorldContract } from './ContractLookup'; -import { mustString } from './Utils'; -import { Callable, Sendable, invoke } from './Invokation'; -import { - AddressV, - ArrayV, - EventV, - NumberV, - StringV, - Value -} from './Value'; -import { - getAddressV, - getArrayV, - getEventV, - getNumberV, - getStringV, -} from './CoreValue'; -import { AbiItem, AbiInput } from 'web3-utils'; - -export interface ContractData { - invokation: Invokation; - name: string; - contract: string; - address?: string; -} - -const typeMappings = () => ({ - address: { - builder: (x) => new AddressV(x), - getter: getAddressV - }, - 'address[]': { - builder: (x) => new ArrayV(x), - getter: (x) => getArrayV(x), - }, - string: { - builder: (x) => new StringV(x), - getter: getStringV - }, - uint256: { - builder: (x) => new NumberV(x), - getter: getNumberV - }, - 'uint256[]': { - builder: (x) => new ArrayV(x), - getter: (x) => getArrayV(x), - }, - 'uint32[]': { - builder: (x) => new ArrayV(x), - getter: (x) => getArrayV(x), - }, - 'uint96[]': { - builder: (x) => new ArrayV(x), - getter: (x) => getArrayV(x), - } -}); - -function buildArg(contractName: string, name: string, input: AbiInput): Arg { - let { getter } = typeMappings()[input.type] || {}; - - if (!getter) { - throw new Error(`Unknown ABI Input Type: ${input.type} of \`${name}\` in ${contractName}`); - } - - return new Arg(name, getter); -} - -function getEventName(s) { - return s.charAt(0).toUpperCase() + s.slice(1); -} - -function getContractObjectFn(contractName, implicit) { - if (implicit) { - return async function getContractObject(world: World): Promise { - return getWorldContract(world, [['Contracts', contractName]]); - } - } else { - return async function getContractObject(world: World, event: Event): Promise { - return getWorldContract(world, [['Contracts', mustString(event)]]); - } - } -} -export function buildContractEvent(contractName: string, implicit) { - - - return async (world) => { - let contractDeployer = getContract(contractName); - let abis: AbiItem[] = await world.saddle.abi(contractName); - - async function build( - world: World, - from: string, - params: Event - ): Promise<{ world: World; contract: T; data: ContractData }> { - let constructors = abis.filter(({type}) => type === 'constructor'); - if (constructors.length === 0) { - constructors.push({ - constant: false, - inputs: [], - outputs: [], - payable: true, - stateMutability: "payable", - type: 'constructor' - }); - } - - const fetchers = constructors.map((abi: any) => { - let nameArg = implicit ? [] : [ - new Arg('name', getStringV, { default: new StringV(contractName) }) - ]; - let nameArgDesc = implicit ? `` : `name:=${contractName}" ` - let inputNames = abi.inputs.map((input) => getEventName(input.name)); - let args = abi.inputs.map((input) => buildArg(contractName, input.name, input)); - return new Fetcher>( - ` - #### ${contractName} - - * "${contractName} ${nameArgDesc}${inputNames.join(" ")} - Build ${contractName} - * E.g. "${contractName} Deploy" - } - `, - contractName, - nameArg.concat(args), - async (world, paramValues) => { - let name = implicit ? contractName : paramValues['name'].val; - let params = args.map((arg) => paramValues[arg.name]); // TODO: This is just a guess - let paramsEncoded = params.map((param) => typeof(param['encode']) === 'function' ? param.encode() : param.val); - - return { - invokation: await contractDeployer.deploy(world, from, paramsEncoded), - name: name, - contract: contractName - }; - }, - { catchall: true } - ) - }); - - let data = await getFetcherValue>(`Deploy${contractName}`, fetchers, world, params); - let invokation = data.invokation; - delete data.invokation; - - if (invokation.error) { - throw invokation.error; - } - - const contract = invokation.value!; - contract.address = contract._address; - const index = contractName == data.name ? [contractName] : [contractName, data.name]; - - world = await storeAndSaveContract( - world, - contract, - data.name, - invokation, - [ - { index: index, data: data } - ] - ); - - return { world, contract, data }; - } - - async function deploy(world: World, from: string, params: Event) { - let { world: nextWorld, contract, data } = await build(world, from, params); - world = nextWorld; - - world = addAction( - world, - `Deployed ${contractName} ${data.contract} to address ${contract._address}`, - data.invokation - ); - - return world; - } - - function commands() { - async function buildOutput(world: World, from: string, fn: string, inputs: object, output: AbiItem): Promise { - const sendable = >(inputs['contract'].methods[fn](...Object.values(inputs).slice(1))); - let invokation = await invoke(world, sendable, from); - - world = addAction( - world, - `Invokation of ${fn} with inputs ${inputs}`, - invokation - ); - - return world; - } - - let abiCommands = abis.filter(({type}) => type === 'function').map((abi: any) => { - let eventName = getEventName(abi.name); - let inputNames = abi.inputs.map((input) => getEventName(input.name)); - let args = [ - new Arg("contract", getContractObjectFn(contractName, implicit), implicit ? { implicit: true } : {}) - ].concat(abi.inputs.map((input) => buildArg(contractName, abi.name, input))); - - return new Command(` - #### ${eventName} - - * "${eventName} ${inputNames.join(" ")}" - Executes \`${abi.name}\` function - `, - eventName, - args, - (world, from, inputs) => buildOutput(world, from, abi.name, inputs, abi.outputs[0]), - { namePos: implicit ? 0 : 1 } - ) - }); - - return [ - ...abiCommands, - new Command<{ params: EventV }>(` - #### ${contractName} - - * "${contractName} Deploy" - Deploy ${contractName} - * E.g. "Counter Deploy" - `, - "Deploy", - [ - new Arg("params", getEventV, { variadic: true }) - ], - (world, from, { params }) => deploy(world, from, params.val) - ) - ]; - } - - async function processEvent(world: World, event: Event, from: string | null): Promise { - return await processCommandEvent(contractName, commands(), world, event, from); - } - - let command = new Command<{ event: EventV }>( - ` - #### ${contractName} - - * "${contractName} ...event" - Runs given ${contractName} event - * E.g. "${contractName} Deploy" - `, - contractName, - [new Arg('event', getEventV, { variadic: true })], - (world, from, { event }) => { - return processEvent(world, event.val, from); - }, - { subExpressions: commands() } - ); - - return command; - } -} - -export async function buildContractFetcher(world: World, contractName: string, implicit: boolean) { - - let abis: AbiItem[] = await world.saddle.abi(contractName); - - function fetchers() { - async function buildOutput(world: World, fn: string, inputs: object, output: AbiItem): Promise { - const callable = >(inputs['contract'].methods[fn](...Object.values(inputs).slice(1))); - let value = await callable.call(); - let { builder } = typeMappings()[output.type] || {}; - - if (!builder) { - throw new Error(`Unknown ABI Output Type: ${output.type} of \`${fn}\` in ${contractName}`); - } - - return builder(value); - } - - return abis.filter(({name}) => !!name).map((abi: any) => { - let eventName = getEventName(abi.name); - let inputNames = abi.inputs.map((input) => getEventName(input.name)); - let args = [ - new Arg("contract", getContractObjectFn(contractName, implicit), implicit ? { implicit: true } : {}) - ].concat(abi.inputs.map((input) => buildArg(contractName, abi.name, input))); - return new Fetcher(` - #### ${eventName} - - * "${eventName} ${inputNames.join(" ")}" - Returns the result of \`${abi.name}\` function - `, - eventName, - args, - (world, inputs) => buildOutput(world, abi.name, inputs, abi.outputs[0]), - { namePos: implicit ? 0 : 1 } - ) - }); - } - - async function getValue(world: World, event: Event): Promise { - return await getFetcherValue(contractName, fetchers(), world, event); - } - - let fetcher = new Fetcher<{ res: Value }, Value>( - ` - #### ${contractName} - - * "${contractName} ...args" - Returns ${contractName} value - `, - contractName, - [new Arg('res', getValue, { variadic: true })], - async (world, { res }) => res, - { subExpressions: fetchers() } - ) - - return fetcher; -} diff --git a/scenario/src/Expectation.ts b/scenario/src/Expectation.ts deleted file mode 100644 index 7823f87fd..000000000 --- a/scenario/src/Expectation.ts +++ /dev/null @@ -1,4 +0,0 @@ - -export interface Expectation { - checker: (world: any) => Promise; -} diff --git a/scenario/src/Expectation/ChangesExpectation.ts b/scenario/src/Expectation/ChangesExpectation.ts deleted file mode 100644 index 91acee86e..000000000 --- a/scenario/src/Expectation/ChangesExpectation.ts +++ /dev/null @@ -1,52 +0,0 @@ -import {Expectation} from '../Expectation'; -import {fail, World} from '../World'; -import {getCoreValue} from '../CoreValue'; -import {Value, NumberV} from '../Value'; -import {Event} from '../Event'; -import {formatEvent} from '../Formatter'; -import {BigNumber} from 'bignumber.js'; - -function asNumberV(v: Value): NumberV { - if (v instanceof NumberV) { - return v; - } else { - throw new Error(`Expected NumberV for ChangesExpectation, got ${v.toString()}`); - } -} - -export class ChangesExpectation implements Expectation { - condition: Event; - originalValue: NumberV; - delta: NumberV; - tolerance: NumberV; - expected: NumberV; - - constructor(condition: Event, originalValue: Value, delta: NumberV, tolerance: NumberV) { - this.condition = condition; - this.originalValue = asNumberV(originalValue); - this.delta = delta; - this.tolerance = tolerance; - this.expected = this.originalValue.add(this.delta); - } - - async getCurrentValue(world: World): Promise { - return await getCoreValue(world, this.condition); - }; - - async checker(world: World, initialCheck: boolean=false): Promise { - const currentValue = asNumberV(await this.getCurrentValue(world)); - const trueDelta = currentValue.sub(this.originalValue); - - if (this.tolerance.val != 0) { - if (Math.abs(Number(trueDelta.sub(this.delta).div(this.originalValue).val)) > Number(this.tolerance.val)) { - fail(world, `Expected ${trueDelta.toString()} to approximately equal ${this.delta.toString()} within ${this.tolerance.toString()}`); - } - } else if (!currentValue.compareTo(world, this.expected)) { - fail(world, `${this.toString()} instead had value \`${currentValue.toString()}\` (true delta: ${trueDelta.toString()})`); - } - } - - toString() { - return `ChangesExpectation: condition=${formatEvent(this.condition)}, originalValue=${this.originalValue.toString()}, delta=${this.delta.toString()}, expected=${this.expected.toString()}`; - } -} diff --git a/scenario/src/Expectation/RemainsExpectation.ts b/scenario/src/Expectation/RemainsExpectation.ts deleted file mode 100644 index 9506cc473..000000000 --- a/scenario/src/Expectation/RemainsExpectation.ts +++ /dev/null @@ -1,32 +0,0 @@ -import {Expectation} from '../Expectation'; -import {fail, World} from '../World'; -import {getCoreValue} from '../CoreValue'; -import {Value} from '../Value'; -import {Event} from '../Event'; -import {formatEvent} from '../Formatter'; - -export class RemainsExpectation implements Expectation { - condition: Event; - value: Value; - - constructor(condition: Event, value: Value) { - this.condition = condition; - this.value = value; - } - - async getCurrentValue(world: World): Promise { - return await getCoreValue(world, this.condition); - }; - - async checker(world: World, initialCheck: boolean=false): Promise { - const currentValue = await this.getCurrentValue(world); - - if (!this.value.compareTo(world, currentValue)) { - fail(world, `${this.toString()} failed as value ${initialCheck ? 'started as' : 'became'} \`${currentValue.toString()}\``); - } - } - - toString() { - return `RemainsExpectation: condition=${formatEvent(this.condition)}, value=${this.value.toString()}`; - } -} diff --git a/scenario/src/File.ts b/scenario/src/File.ts deleted file mode 100644 index 1452e66a7..000000000 --- a/scenario/src/File.ts +++ /dev/null @@ -1,39 +0,0 @@ -import * as fs from 'fs'; -import * as path from 'path'; -import { World } from './World'; - -export function getNetworkPath(basePath: string | null, network: string, name: string, extension: string | null='json'): string { - return path.join(basePath || '', 'networks', `${network}${name}${extension ? `.${extension}` : ''}`); -} - -export async function readFile(world: World | null, file: string, def: T, fn: (data: string) => T): Promise { - if (world && world.fs) { - let data = world.fs[file]; - return Promise.resolve(data ? fn(data) : def); - } else { - return new Promise((resolve, reject) => { - fs.access(file, fs.constants.F_OK, (err) => { - if (err) { - resolve(def); - } else { - fs.readFile(file, 'utf8', (err, data) => { - return err ? reject(err) : resolve(fn(data)); - }); - } - }); - }); - } -} - -export async function writeFile(world: World | null, file: string, data: string): Promise { - if (world && world.fs) { - world = world.setIn(['fs', file], data); - return Promise.resolve(world); - } else { - return new Promise((resolve, reject) => { - fs.writeFile(file, data, (err) => { - return err ? reject(err) : resolve(world!); // XXXS `!` - }); - }); - } -} diff --git a/scenario/src/Formatter.ts b/scenario/src/Formatter.ts deleted file mode 100644 index 55e2d4806..000000000 --- a/scenario/src/Formatter.ts +++ /dev/null @@ -1,25 +0,0 @@ -import {Event} from './Event'; - -// Effectively the opposite of parse -export function formatEvent(event: Event, outter=true): string { - if (Array.isArray(event)) { - if (event.length === 2 && typeof event[0] === "string" && (event[0]).toLowerCase() === "exactly") { - return event[1].toString(); - } - - let mapped = event.map(e => formatEvent(e, false)); - let joined = mapped.join(' '); - - if (outter) { - return joined; - } else { - return `(${joined})`; - } - } else { - return event; - } -} - -export function formatError(err: any) { - return JSON.stringify(err); // yeah... for now -} diff --git a/scenario/src/Help.ts b/scenario/src/Help.ts deleted file mode 100644 index c67d53170..000000000 --- a/scenario/src/Help.ts +++ /dev/null @@ -1,64 +0,0 @@ -import {Event} from './Event'; -import {Expression} from './Command'; -import {mustString} from './Utils'; -import {Printer} from './Printer'; - -export function printHelp(printer: Printer, event: Event, expressions: Expression[], path: string[]=[]) { - if (event.length === 0) { - let banner; - - if (path.length === 0) { - banner = ( -` -## Compound Command Runner - -The Compound Command Runner makes it easy to interact with Compound. You can input simple commands -and it will construct Web3 calls to pull data or generate transactions. A list of available commands -is included below. To dig further into a command run \`Help \`, such as \`Help From\` or for -sub-commands run \`Help CToken\` or \`Help CToken Mint\`. -`).trim(); - } else { - if (expressions.length > 0) { - banner = `### ${path.join(" ")} Sub-Commands`; - } - } - - if (!!banner) { - printer.printMarkdown(banner); - } - - expressions.forEach((expression) => { - printer.printMarkdown(`\n${expression.doc}`); - if (expression.subExpressions.length > 0) { - printer.printMarkdown(`For more information, run: \`Help ${path} ${expression.name}\``); - } - }); - } else { - const [first, ...rest] = event; - const expressionName = mustString(first); - - let expression = expressions.find((expression) => expression.name.toLowerCase() === expressionName.toLowerCase()); - - if (expression) { - if (rest.length === 0) { - printer.printMarkdown(`${expression.doc}`); - } - - printHelp(printer, rest, expression.subExpressions, path.concat(expression.name)); - } else { - let matchingExpressions = expressions.filter((expression) => expression.name.toLowerCase().startsWith(expressionName.toLowerCase())); - - if (matchingExpressions.length === 0) { - printer.printLine(`\nError: cannot find help docs for ${path.concat(first).join(" ")}`); - } else { - if (rest.length === 0) { - matchingExpressions.forEach((expression) => { - printer.printMarkdown(`${expression.doc}`); - }); - } else { - printer.printLine(`\nError: cannot find help docs for ${path.concat(event).join(" ")}`); - } - } - } - } -} diff --git a/scenario/src/HistoricReadline.ts b/scenario/src/HistoricReadline.ts deleted file mode 100644 index 21dbc87c8..000000000 --- a/scenario/src/HistoricReadline.ts +++ /dev/null @@ -1,35 +0,0 @@ -import * as readline from 'readline'; -import * as fs from 'fs'; -import {readFile} from './File'; - -let readlineAny = readline; - -export async function createInterface(options): Promise { - let history: string[] = await readFile(null, options['path'], [], (x) => x.split("\n")); - let cleanHistory = history.filter((x) => !!x).reverse(); - - readlineAny.kHistorySize = Math.max(readlineAny.kHistorySize, options['maxLength']); - - let rl = readline.createInterface(options); - let rlAny = rl; - - let oldAddHistory = rlAny._addHistory; - - rlAny._addHistory = function() { - let last = rlAny.history[0]; - let line = oldAddHistory.call(rl); - - // TODO: Should this be sync? - if (line.length > 0 && line != last) { - fs.appendFileSync(options['path'], `${line}\n`); - } - - // TODO: Truncate file? - - return line; - } - - rlAny.history.push.apply(rlAny.history, cleanHistory); - - return rl; -} diff --git a/scenario/src/Hypothetical.ts b/scenario/src/Hypothetical.ts deleted file mode 100644 index 497ea3def..000000000 --- a/scenario/src/Hypothetical.ts +++ /dev/null @@ -1,36 +0,0 @@ -import {Accounts, loadAccounts} from './Accounts'; -import { - addAction, - checkExpectations, - checkInvariants, - clearInvariants, - describeUser, - holdInvariants, - setEvent, - World -} from './World'; -import {Ganache} from 'eth-saddle/dist/config'; -import Web3 from 'web3'; - -export async function forkWeb3(web3: Web3, url: string, accounts: string[]): Promise { - let lastBlock = await web3.eth.getBlock("latest") - return new Web3( - Ganache.provider({ - allowUnlimitedContractSize: true, - fork: url, - gasLimit: lastBlock.gasLimit, // maintain configured gas limit - gasPrice: '20000', - port: 8546, - unlocked_accounts: accounts - }) - ); -} - -export async function fork(world: World, url: string, accounts: string[]): Promise { - let newWeb3 = await forkWeb3(world.web3, url, accounts); - const newAccounts = loadAccounts(await newWeb3.eth.getAccounts()); - - return world - .set('web3', newWeb3) - .set('accounts', newAccounts); -} diff --git a/scenario/src/Invariant.ts b/scenario/src/Invariant.ts deleted file mode 100644 index fc5211c0a..000000000 --- a/scenario/src/Invariant.ts +++ /dev/null @@ -1,5 +0,0 @@ - -export interface Invariant { - held: boolean - checker: (world: any) => Promise; -} diff --git a/scenario/src/Invariant/RemainsInvariant.ts b/scenario/src/Invariant/RemainsInvariant.ts deleted file mode 100644 index b98a4c635..000000000 --- a/scenario/src/Invariant/RemainsInvariant.ts +++ /dev/null @@ -1,33 +0,0 @@ -import {Invariant} from '../Invariant'; -import {fail, World} from '../World'; -import {getCoreValue} from '../CoreValue'; -import {Value} from '../Value'; -import {Event} from '../Event'; -import {formatEvent} from '../Formatter'; - -export class RemainsInvariant implements Invariant { - condition: Event; - value: Value; - held = false; - - constructor(condition: Event, value: Value) { - this.condition = condition; - this.value = value; - } - - async getCurrentValue(world: World): Promise { - return await getCoreValue(world, this.condition); - }; - - async checker(world: World, initialCheck: boolean=false): Promise { - const currentValue = await this.getCurrentValue(world); - - if (!this.value.compareTo(world, currentValue)) { - fail(world, `Static invariant broken! Expected ${this.toString()} to remain static value \`${this.value}\` but ${initialCheck ? 'started as' : 'became'} \`${currentValue}\``); - } - } - - toString() { - return `RemainsInvariant: condition=${formatEvent(this.condition)}, value=${this.value.toString()}`; - } -} diff --git a/scenario/src/Invariant/StaticInvariant.ts b/scenario/src/Invariant/StaticInvariant.ts deleted file mode 100644 index 7a464c310..000000000 --- a/scenario/src/Invariant/StaticInvariant.ts +++ /dev/null @@ -1,33 +0,0 @@ -import {Invariant} from '../Invariant'; -import {fail, World} from '../World'; -import {getCoreValue} from '../CoreValue'; -import {Value} from '../Value'; -import {Event} from '../Event'; -import {formatEvent} from '../Formatter'; - -export class StaticInvariant implements Invariant { - condition: Event; - value: Value; - held = false; - - constructor(condition: Event, value: Value) { - this.condition = condition; - this.value = value; - } - - async getCurrentValue(world: World): Promise { - return await getCoreValue(world, this.condition); - }; - - async checker(world: World): Promise { - const currentValue = await this.getCurrentValue(world); - - if (!this.value.compareTo(world, currentValue)) { - fail(world, `Static invariant broken! Expected ${this.toString()} to remain static value \`${this.value}\` but became \`${currentValue}\``); - } - } - - toString() { - return `StaticInvariant: condition=${formatEvent(this.condition)}, value=${this.value.toString()}`; - } -} diff --git a/scenario/src/Invariant/SuccessInvariant.ts b/scenario/src/Invariant/SuccessInvariant.ts deleted file mode 100644 index 9abd2b49e..000000000 --- a/scenario/src/Invariant/SuccessInvariant.ts +++ /dev/null @@ -1,21 +0,0 @@ -import {Invariant} from '../Invariant'; -import {fail, World} from '../World'; -import {getCoreValue} from '../CoreValue'; -import {Value} from '../Value'; -import {Event} from '../Event'; - -export class SuccessInvariant implements Invariant { - held = false; - - constructor() {} - - async checker(world: World): Promise { - if (world.lastInvokation && !world.lastInvokation.success()) { - fail(world, `Success invariant broken! Expected successful execution, but had error ${world.lastInvokation.toString()}`); - } - } - - toString() { - return `SuccessInvariant`; - } -} diff --git a/scenario/src/Invokation.ts b/scenario/src/Invokation.ts deleted file mode 100644 index 0c7dd6ff8..000000000 --- a/scenario/src/Invokation.ts +++ /dev/null @@ -1,320 +0,0 @@ -import { ErrorReporter, NoErrorReporter, ComptrollerErrorReporter } from './ErrorReporter'; -import { mustArray } from './Utils'; -import { World } from './World'; -import { encodedNumber } from './Encoding'; -import { TransactionReceipt } from 'web3-eth'; - -const errorRegex = /^(.*) \((\d+)\)$/ - -function getErrorCode(revertMessage: string): [string, number] | null { - let res = errorRegex.exec(revertMessage); - - if (res) { - return [res[1], Number(res[2])]; - } else { - return null; - } -} - -export interface InvokationOpts { - from?: string, - gas?: number, - gasPrice?: number -} - -export class InvokationError extends Error { - err: Error - // function : string - // arguments : {[]} - - constructor(err: Error) { - super(err.message); - this.err = err; - } - - toString() { - return `InvokationError`; - } -} - -export class InvokationRevertFailure extends InvokationError { - errCode: number - error: string | null - errMessage: string - - constructor(err: Error, errMessage: string, errCode: number, error: string | null) { - super(err); - - this.errMessage = errMessage; - this.errCode = errCode; - this.error = error; - } - - toString() { - return `InvokationRevertError`; - } -} - -interface CustomErrorResult { - return: string - error: string -} - -export class InvokationRevertCustomError extends InvokationError { - errCode: number - errorResults: {[address: string]: CustomErrorResult} - - constructor(err: Error, errorResults: {[address: string]: CustomErrorResult}) { - super(err); - - this.errorResults = errorResults; - } - - toString() { - return `InvokationRevertCustomError`; - } -} - -interface Argument { - name: string - type: string -} - -interface Method { - name: string - inputs: Argument[] -} - -export interface Callable { - estimateGas: (InvokationOpts?) => Promise - call: (InvokationOpts?) => Promise - _method: Method - arguments: any[] -} - -export interface Sendable extends Callable { - send: (InvokationOpts) => Promise -} - -export class Failure { - error: string - info: string - detail: string - - constructor(error: string, info: string, detail: string) { - this.error = error; - this.info = info; - this.detail = detail; - } - - toString(): string { - return `Failure`; - } - - equals(other: Failure): boolean { - return ( - this.error === other.error && - this.info === other.info && - this.detail === other.detail - ); - } -} - -export class Invokation { - value: T | null - receipt: TransactionReceipt | null - error: Error | null - failures: Failure[] - method: string | null - args: { arg: string, val: any }[] - errorReporter: ErrorReporter - - constructor(value: T | null, receipt: TransactionReceipt | null, error: Error | null, fn: Callable | null, errorReporter: ErrorReporter=NoErrorReporter) { - this.value = value; - this.receipt = receipt; - this.error = error; - this.errorReporter = errorReporter; - - if (fn !== null) { - this.method = fn._method.name; - this.args = fn.arguments.map((argument, i) => ({ arg: fn._method.inputs[i].name, val: argument })); - } else { - this.method = null; - this.args = []; - } - - if (receipt !== null && receipt.events && receipt.events["Failure"]) { - const failures = mustArray(receipt.events["Failure"]); - - this.failures = failures.map((failure) => { - const { 'error': errorVal, 'info': infoVal, 'detail': detailVal } = failure.returnValues; - - return new Failure( - errorReporter.getError(errorVal) || `unknown error=${errorVal}`, - errorReporter.getInfo(infoVal) || `unknown info=${infoVal}`, - errorReporter.getDetail(errorVal, detailVal) - ); - }); - } else { - this.failures = []; - } - } - - success(): boolean { - return ( - this.error === null && this.failures.length === 0 - ); - } - - invokation(): string { - if (this.method) { - let argStr = this.args.map(({ arg, val }) => `${arg}=${val.toString()}`).join(','); - return `"${this.method}(${argStr})"`; - } else { - return `unknown method`; - } - } - - toString(): string { - return `Invokation<${this.invokation()}, tx=${this.receipt ? this.receipt.transactionHash : ''}, value=${this.value ? (this.value).toString() : ''}, error=${this.error}, failures=${this.failures.toString()}>`; - } -} - -export async function fallback(world: World, from: string, to: string, value: encodedNumber): Promise> { - let trxObj = { - from: from, - to: to, - value: value.toString() - }; - - let estimateGas = async (opts: InvokationOpts) => { - let trxObjMerged = { - ...trxObj, - ...opts - }; - - return await world.web3.eth.estimateGas(trxObjMerged); - }; - - let call = async (opts: InvokationOpts) => { - let trxObjMerged = { - ...trxObj, - ...opts - }; - - return await world.web3.eth.call(trxObjMerged); - }; - - let send = async (opts: InvokationOpts) => { - let trxObjMerged = { - ...trxObj, - ...opts - }; - - let receipt = await world.web3.eth.sendTransaction(trxObjMerged); - receipt.events = {}; - - return receipt; - } - - let fn: Sendable = { - estimateGas: estimateGas, - call: call, - send: send, - _method: { - name: "fallback", - inputs: [] - }, - arguments: [] - } - - return invoke(world, fn, from, NoErrorReporter); -} - -export async function invoke(world: World, fn: Sendable, from: string, errorReporter: ErrorReporter = NoErrorReporter): Promise> { - let value: T | null = null; - let result: TransactionReceipt | null = null; - let worldInvokationOpts = world.getInvokationOpts({from: from}); - let trxInvokationOpts = world.trxInvokationOpts.toJS(); - - let invokationOpts = { - ...worldInvokationOpts, - ...trxInvokationOpts - }; - - if (world.totalGas) { - invokationOpts = { - ...invokationOpts, - gas: world.totalGas - } - } else { - try { - const gas = await fn.estimateGas({ ...invokationOpts }); - invokationOpts = { - ...invokationOpts, - gas: gas * 2 - }; - } catch (e) { - invokationOpts = { - ...invokationOpts, - gas: 2000000 - }; - } - } - - try { - let error: null | Error = null; - - try { - value = await fn.call({ ...invokationOpts }); - } catch (err) { - error = new InvokationError(err); - } - - if (world.dryRun) { - world.printer.printLine(`Dry run: invoking \`${fn._method.name}\``); - // XXXS - result = { - blockNumber: -1, - transactionHash: '0x', - gasUsed: 0, - events: {} - }; - } else { - result = await fn.send({ ...invokationOpts }); - world.gasCounter.value += result.gasUsed; - } - - if (world.settings.printTxLogs) { - const eventLogs = Object.values(result && result.events || {}).map((event: any) => { - const eventLog = event.raw; - if (eventLog) { - const eventDecoder = world.eventDecoder[eventLog.topics[0]]; - if (eventDecoder) { - return eventDecoder(eventLog); - } else { - return eventLog; - } - } - }); - console.log('EMITTED EVENTS: ', eventLogs); - } - - return new Invokation(value, result, null, fn, errorReporter); - } catch (err) { - if (errorReporter) { - let decoded = getErrorCode(err.message); - - if (decoded) { - let [errMessage, errCode] = decoded; - - return new Invokation(value, result, new InvokationRevertFailure(err, errMessage, errCode, errorReporter.getError(errCode)), fn, errorReporter); - } - if (err.results) { - return new Invokation(value, result, new InvokationRevertCustomError(err, err.results), fn, errorReporter); - } - } - - return new Invokation(value, result, new InvokationError(err), fn, errorReporter); - } -} diff --git a/scenario/src/Macro.ts b/scenario/src/Macro.ts deleted file mode 100644 index a0a686733..000000000 --- a/scenario/src/Macro.ts +++ /dev/null @@ -1,98 +0,0 @@ -import {Event} from './Event'; - -interface Arg { - arg: any - def: any - splat: any -} - -interface Macro { - args: Arg[] - steps: Event -} - -type ArgMap = {[arg: string]: Event}; -type NamedArg = { argName: string, argValue: Event }; -type ArgValue = Event | NamedArg; - -export type Macros = {[eventName: string]: Macro}; - -export function expandEvent(macros: Macros, event: Event): Event[] { - const [eventName, ...eventArgs] = event; - - if (macros[eventName]) { - let expanded = expandMacro(macros[eventName], eventArgs); - - // Recursively expand steps - return expanded.map(event => expandEvent(macros, event)).flat(); - } else { - return [event]; - } -} - -function getArgValues(eventArgs: ArgValue[], macroArgs: Arg[]): ArgMap { - const eventArgNameMap: ArgMap = {}; - const eventArgIndexed: Event[] = []; - const argValues: ArgMap = {}; - let usedNamedArg: boolean = false; - let usedSplat: boolean = false; - - eventArgs.forEach((eventArg) => { - if (eventArg.hasOwnProperty('argName')) { - const {argName, argValue} = eventArg; - - eventArgNameMap[argName] = argValue; - usedNamedArg = true; - } else { - if (usedNamedArg) { - throw new Error("Cannot use positional arg after named arg in macro invokation."); - } - - eventArgIndexed.push(eventArg); - } - }); - - macroArgs.forEach(({arg, def, splat}, argIndex) => { - let val; - - if (usedSplat) { - throw new Error("Cannot have arg after splat arg"); - } - - if (eventArgNameMap[arg] !== undefined) { - val = eventArgNameMap[arg]; - } else if (splat) { - val = eventArgIndexed.slice(argIndex); - usedSplat = true; - } else if (eventArgIndexed[argIndex] !== undefined) { - val = eventArgIndexed[argIndex]; - } else if (def !== undefined) { - val = def; - } else { - throw new Error("Macro cannot find arg value for " + arg); - } - argValues[arg] = val; - }); - - return argValues; -} - -export function expandMacro(macro: Macro, event: Event): Event[] { - const argValues = getArgValues(event, macro.args); - - function expandStep(step) { - return step.map((token) => { - if (argValues[token] !== undefined) { - return argValues[token]; - } else { - if (Array.isArray(token)) { - return expandStep(token); - } else { - return token; - } - } - }); - }; - - return macro.steps.map(expandStep); -} diff --git a/scenario/src/Networks.ts b/scenario/src/Networks.ts deleted file mode 100644 index b241fc870..000000000 --- a/scenario/src/Networks.ts +++ /dev/null @@ -1,202 +0,0 @@ -import { fromJS, Map } from 'immutable'; -import { World } from './World'; -import { Invokation } from './Invokation'; -import { Contract, setContractName } from './Contract'; -import { getNetworkPath, readFile, writeFile } from './File'; -import { AbiItem } from 'web3-utils'; - -type Networks = Map; - -interface ExtraData { - index: string[]; - data: object | string | number; -} - -export function parseNetworkFile(data: string | object): Networks { - return fromJS(typeof data === 'string' ? JSON.parse(data) : data); -} - -function serializeNetworkFile(networks: Networks): string { - return JSON.stringify(networks.toJSON(), null, 4); -} - -function readNetworkFile(world: World, isABI: boolean): Promise { - return readFile( - world, - getNetworkPath(world.basePath, world.network, isABI ? '-abi' : ''), - Map({}), - parseNetworkFile - ); -} - -function writeNetworkFile(world: World, networks: Networks, isABI: boolean): Promise { - return writeFile( - world, - getNetworkPath(world.basePath, world.network, isABI ? '-abi' : ''), - serializeNetworkFile(networks) - ); -} - -export function storeContract(world: World, contract: Contract, name: string, extraData: ExtraData[]): World { - contract = setContractName(name, contract); - - world = world.set('lastContract', contract); - world = world.setIn(['contractIndex', contract._address.toLowerCase()], contract); - world = updateEventDecoder(world, contract); - - world = world.update('contractData', contractData => { - return extraData.reduce((acc, { index, data }) => { - if (typeof data !== 'string' && typeof data !== 'number') { - // Store extra data as an immutable - data = Map(data); - } - - return acc.setIn(index, data); - }, contractData); - }); - - return world; -} - -export async function saveContract( - world: World, - contract: Contract, - name: string, - extraData: ExtraData[] -): Promise { - let networks = await readNetworkFile(world, false); - let networksABI = await readNetworkFile(world, true); - - networks = extraData.reduce((acc, { index, data }) => acc.setIn(index, data), networks); - networksABI = networksABI.set(name, contract._jsonInterface); - - // Don't write during a dry-run - if (!world.dryRun) { - world = await writeNetworkFile(world, networks, false); - world = await writeNetworkFile(world, networksABI, true); - } - - return world; -} - -// Merges a contract into another, which is important for delegation -export async function mergeContractABI( - world: World, - targetName: string, - contractTarget: Contract, - a: string, - b: string -): Promise { - let networks = await readNetworkFile(world, false); - let networksABI = await readNetworkFile(world, true); - let aABI = networksABI.get(a); - let bABI = networksABI.get(b); - - if (!aABI) { - throw new Error(`Missing contract ABI for ${a}`); - } - - if (!bABI) { - throw new Error(`Missing contract ABI for ${b}`); - } - - const itemBySig: { [key: string]: AbiItem } = {}; - for (let item of aABI.toJS().concat(bABI.toJS())) { - itemBySig[item.signature] = item; - } - const fullABI = Object.values(itemBySig); - - // Store Comptroller address - networks = networks.setIn(['Contracts', targetName], contractTarget._address); - world = world.setIn(['contractData', 'Contracts', targetName], contractTarget._address); - - networksABI = networksABI.set(targetName, fullABI); - - let mergedContract = new world.web3.eth.Contract(fullABI, contractTarget._address, {}); - - /// XXXS - world = world.setIn( - ['contractIndex', contractTarget._address.toLowerCase()], - setContractName(targetName, mergedContract) - ); - - // Don't write during a dry-run - if (!world.dryRun) { - world = await writeNetworkFile(world, networks, false); - world = await writeNetworkFile(world, networksABI, true); - } - - return world; -} - -export async function loadContracts(world: World): Promise<[World, string[]]> { - let networks = await readNetworkFile(world, false); - let networksABI = await readNetworkFile(world, true); - - return loadContractData(world, networks, networksABI); -} - -function updateEventDecoder(world: World, contract: any) { - const updatedEventDecoder = contract._jsonInterface - .filter(i => i.type == 'event') - .reduce((accum, event) => { - const { anonymous, inputs, signature } = event; - return { - ...accum, - [signature]: log => { - let argTopics = anonymous ? log.topics : log.topics.slice(1); - return world.web3.eth.abi.decodeLog(inputs, log.data, argTopics); - } - }; - }, world.eventDecoder); - - return world.set('eventDecoder', updatedEventDecoder) -} - -export async function loadContractData( - world: World, - networks: Networks, - networksABI: Networks -): Promise<[World, string[]]> { - // Pull off contracts value and the rest is "extra" - let contractInfo: string[] = []; - let contracts = networks.get('Contracts') || Map({}); - - world = contracts.reduce((world: World, address: string, name: string) => { - let abi: AbiItem[] = networksABI.has(name) ? networksABI.get(name).toJS() : []; - let contract = new world.web3.eth.Contract(abi, address, {}); - - world = updateEventDecoder(world, contract); - - contractInfo.push(`${name}: ${address}`); - - // Store the contract - // XXXS - return world.setIn(['contractIndex', (contract)._address.toLowerCase()], setContractName(name, contract)); - }, world); - - world = world.update('contractData', contractData => contractData.mergeDeep(networks)); - - return [world, contractInfo]; -} - -export async function storeAndSaveContract( - world: World, - contract: Contract, - name: string, - invokation: Invokation | null, - extraData: ExtraData[] -): Promise { - extraData.push({ index: ['Contracts', name], data: contract._address }); - if (contract.constructorAbi) { - extraData.push({ index: ['Constructors', name], data: contract.constructorAbi }); - } - if (invokation && invokation.receipt) { - extraData.push({ index: ['Blocks', name], data: invokation.receipt.blockNumber }); - } - - world = storeContract(world, contract, name, extraData); - world = await saveContract(world, contract, name, extraData); - - return world; -} diff --git a/scenario/src/Parser.ts b/scenario/src/Parser.ts deleted file mode 100644 index 1a8deab3a..000000000 --- a/scenario/src/Parser.ts +++ /dev/null @@ -1,3210 +0,0 @@ -// tslint:disable:only-arrow-functions -// tslint:disable:object-literal-shorthand -// tslint:disable:trailing-comma -// tslint:disable:object-literal-sort-keys -// tslint:disable:one-variable-per-declaration -// tslint:disable:max-line-length -// tslint:disable:no-consecutive-blank-lines -// tslint:disable:align - - -// Generated by PEG.js v. 0.10.0 (ts-pegjs plugin v. 0.2.2 ) -// -// https://pegjs.org/ https://github.com/metadevpro/ts-pegjs - -"use strict"; - -export interface IFilePosition { - offset: number; - line: number; - column: number; -} - -export interface IFileRange { - start: IFilePosition; - end: IFilePosition; -} - -export interface ILiteralExpectation { - type: "literal"; - text: string; - ignoreCase: boolean; -} - -export interface IClassParts extends Array {} - -export interface IClassExpectation { - type: "class"; - parts: IClassParts; - inverted: boolean; - ignoreCase: boolean; -} - -export interface IAnyExpectation { - type: "any"; -} - -export interface IEndExpectation { - type: "end"; -} - -export interface IOtherExpectation { - type: "other"; - description: string; -} - -export type Expectation = ILiteralExpectation | IClassExpectation | IAnyExpectation | IEndExpectation | IOtherExpectation; - -export class SyntaxError extends Error { - public static buildMessage(expected: Expectation[], found: string | null) { - function hex(ch: string): string { - return ch.charCodeAt(0).toString(16).toUpperCase(); - } - - function literalEscape(s: string): string { - return s - .replace(/\\/g, "\\\\") - .replace(/"/g, "\\\"") - .replace(/\0/g, "\\0") - .replace(/\t/g, "\\t") - .replace(/\n/g, "\\n") - .replace(/\r/g, "\\r") - .replace(/[\x00-\x0F]/g, (ch) => "\\x0" + hex(ch) ) - .replace(/[\x10-\x1F\x7F-\x9F]/g, (ch) => "\\x" + hex(ch) ); - } - - function classEscape(s: string): string { - return s - .replace(/\\/g, "\\\\") - .replace(/\]/g, "\\]") - .replace(/\^/g, "\\^") - .replace(/-/g, "\\-") - .replace(/\0/g, "\\0") - .replace(/\t/g, "\\t") - .replace(/\n/g, "\\n") - .replace(/\r/g, "\\r") - .replace(/[\x00-\x0F]/g, (ch) => "\\x0" + hex(ch) ) - .replace(/[\x10-\x1F\x7F-\x9F]/g, (ch) => "\\x" + hex(ch) ); - } - - function describeExpectation(expectation: Expectation) { - switch (expectation.type) { - case "literal": - return "\"" + literalEscape(expectation.text) + "\""; - case "class": - const escapedParts = expectation.parts.map((part) => { - return Array.isArray(part) - ? classEscape(part[0] as string) + "-" + classEscape(part[1] as string) - : classEscape(part); - }); - - return "[" + (expectation.inverted ? "^" : "") + escapedParts + "]"; - case "any": - return "any character"; - case "end": - return "end of input"; - case "other": - return expectation.description; - } - } - - function describeExpected(expected1: Expectation[]) { - const descriptions = expected1.map(describeExpectation); - let i; - let j; - - descriptions.sort(); - - if (descriptions.length > 0) { - for (i = 1, j = 1; i < descriptions.length; i++) { - if (descriptions[i - 1] !== descriptions[i]) { - descriptions[j] = descriptions[i]; - j++; - } - } - descriptions.length = j; - } - - switch (descriptions.length) { - case 1: - return descriptions[0]; - - case 2: - return descriptions[0] + " or " + descriptions[1]; - - default: - return descriptions.slice(0, -1).join(", ") - + ", or " - + descriptions[descriptions.length - 1]; - } - } - - function describeFound(found1: string | null) { - return found1 ? "\"" + literalEscape(found1) + "\"" : "end of input"; - } - - return "Expected " + describeExpected(expected) + " but " + describeFound(found) + " found."; - } - - public message: string; - public expected: Expectation[]; - public found: string | null; - public location: IFileRange; - public name: string; - - constructor(message: string, expected: Expectation[], found: string | null, location: IFileRange) { - super(); - this.message = message; - this.expected = expected; - this.found = found; - this.location = location; - this.name = "SyntaxError"; - - if (typeof (Error as any).captureStackTrace === "function") { - (Error as any).captureStackTrace(this, SyntaxError); - } - } -} - -export interface ICached { - nextPos: number; - result: any; -} - -function peg$parse(input: string, options?: IParseOptions) { - options = options !== undefined ? options : {}; - - const peg$FAILED = {}; - - const peg$startRuleFunctions: {[id: string]: any} = { tests: peg$parsetests, step: peg$parsestep, macros: peg$parsemacros }; - let peg$startRuleFunction: () => any = peg$parsetests; - - const peg$c0 = function(head: any, t: any) { return t; }; - const peg$c1 = function(head: any, tail: any) { return tail.reduce((acc, el) => addTopLevelEl(acc, el), addTopLevelEl({macros: {}, tests: {}}, head)); }; - const peg$c2 = function(values: any) { return values !== null ? values.tests : {}; }; - const peg$c3 = function(values: any) { return values !== null ? values.macros : {}; }; - const peg$c4 = "Test"; - const peg$c5 = peg$literalExpectation("Test", false); - const peg$c6 = function(name: any, steps: any) { return {type: 'test', test: getString(name), steps: steps}; }; - const peg$c7 = "GasTest"; - const peg$c8 = peg$literalExpectation("GasTest", false); - const peg$c9 = function(name: any, steps: any) { return {type: 'test', test: getString(name), steps: ["Gas"].concat(steps)}; }; - const peg$c10 = "Pending"; - const peg$c11 = peg$literalExpectation("Pending", false); - const peg$c12 = function(name: any, steps: any) { return {type: 'test', test: getString(name), steps: ["Pending"].concat(steps)}; }; - const peg$c13 = "Only"; - const peg$c14 = peg$literalExpectation("Only", false); - const peg$c15 = function(name: any, steps: any) { return {type: 'test', test: getString(name), steps: ["Only"].concat(steps)}; }; - const peg$c16 = "Skip"; - const peg$c17 = peg$literalExpectation("Skip", false); - const peg$c18 = function(name: any, steps: any) { return {type: 'test', test: getString(name), steps: ["Skip"].concat(steps)}; }; - const peg$c19 = "Macro"; - const peg$c20 = peg$literalExpectation("Macro", false); - const peg$c21 = function(name: any, args: any, steps: any) { return {type: 'macro', name: getString(name), args: args || [], steps: steps}; }; - const peg$c22 = function(head: any, tail: any) { return [head].concat(tail).filter((x) => !!x); }; - const peg$c23 = function(args: any) { return args !== null ? args.flat() : []; }; - const peg$c24 = "..."; - const peg$c25 = peg$literalExpectation("...", false); - const peg$c26 = "="; - const peg$c27 = peg$literalExpectation("=", false); - const peg$c28 = function(splat: any, arg: any, t: any) { return t; }; - const peg$c29 = function(splat: any, arg: any, def: any) { return { arg, def, splat }; }; - const peg$c30 = function(tokens: any) { return tokens !== null ? tokens.flat() : []; }; - const peg$c31 = function(head: any, step: any) { return step; }; - const peg$c32 = function(steps: any) { return steps !== null ? steps : []; }; - const peg$c33 = function(step: any) { return step; }; - const peg$c34 = function() { return null; }; - const peg$c35 = function(val: any) { return val; }; - const peg$c36 = function(head: any, value: any) { return value }; - const peg$c37 = function(head: any, tail: any) { return [head].concat(tail.flat(1)); }; - const peg$c38 = function(inner: any) { return [inner]; }; - const peg$c39 = function(inner: any) { return [["List"].concat((inner || []).flat())] }; - const peg$c40 = "--"; - const peg$c41 = peg$literalExpectation("--", false); - const peg$c42 = /^[^\n]/; - const peg$c43 = peg$classExpectation(["\n"], true, false); - const peg$c44 = "#"; - const peg$c45 = peg$literalExpectation("#", false); - const peg$c46 = ":"; - const peg$c47 = peg$literalExpectation(":", false); - const peg$c48 = function(token1: any, token2: any) { return {argName: token1, argValue: token2} }; - const peg$c49 = /^[A-Za-z0-9_]/; - const peg$c50 = peg$classExpectation([["A", "Z"], ["a", "z"], ["0", "9"], "_"], false, false); - const peg$c51 = function(t: any) { return t.join("") }; - const peg$c52 = "0x"; - const peg$c53 = peg$literalExpectation("0x", false); - const peg$c54 = /^[0-9a-fA-F]/; - const peg$c55 = peg$classExpectation([["0", "9"], ["a", "f"], ["A", "F"]], false, false); - const peg$c56 = function(hex: any) { return ["Hex", hex.flat().flat().join("")] }; - const peg$c57 = "-"; - const peg$c58 = peg$literalExpectation("-", false); - const peg$c59 = "+"; - const peg$c60 = peg$literalExpectation("+", false); - const peg$c61 = /^[0-9]/; - const peg$c62 = peg$classExpectation([["0", "9"]], false, false); - const peg$c63 = "."; - const peg$c64 = peg$literalExpectation(".", false); - const peg$c65 = "e"; - const peg$c66 = peg$literalExpectation("e", false); - const peg$c67 = function(n: any) { return ["Exactly", n.flat().flat().join("")] }; - const peg$c68 = function(head: any, tail: any) { return [head].concat(tail.flat()); }; - const peg$c69 = "("; - const peg$c70 = peg$literalExpectation("(", false); - const peg$c71 = ")"; - const peg$c72 = peg$literalExpectation(")", false); - const peg$c73 = "["; - const peg$c74 = peg$literalExpectation("[", false); - const peg$c75 = "]"; - const peg$c76 = peg$literalExpectation("]", false); - const peg$c77 = "\r"; - const peg$c78 = peg$literalExpectation("\r", false); - const peg$c79 = "\n"; - const peg$c80 = peg$literalExpectation("\n", false); - const peg$c81 = "\t"; - const peg$c82 = peg$literalExpectation("\t", false); - const peg$c83 = " "; - const peg$c84 = peg$literalExpectation(" ", false); - const peg$c85 = "\\"; - const peg$c86 = peg$literalExpectation("\\", false); - const peg$c87 = peg$otherExpectation("whitespace"); - const peg$c88 = /^[ \t]/; - const peg$c89 = peg$classExpectation([" ", "\t"], false, false); - const peg$c90 = /^[ \t\r\n]/; - const peg$c91 = peg$classExpectation([" ", "\t", "\r", "\n"], false, false); - const peg$c92 = peg$otherExpectation("string"); - const peg$c93 = function(chars: any) { return ["String", chars.join("")]; }; - const peg$c94 = "\""; - const peg$c95 = peg$literalExpectation("\"", false); - const peg$c96 = "/"; - const peg$c97 = peg$literalExpectation("/", false); - const peg$c98 = "b"; - const peg$c99 = peg$literalExpectation("b", false); - const peg$c100 = function() { return "\b"; }; - const peg$c101 = "f"; - const peg$c102 = peg$literalExpectation("f", false); - const peg$c103 = function() { return "\f"; }; - const peg$c104 = "n"; - const peg$c105 = peg$literalExpectation("n", false); - const peg$c106 = function() { return "\n"; }; - const peg$c107 = "r"; - const peg$c108 = peg$literalExpectation("r", false); - const peg$c109 = function() { return "\r"; }; - const peg$c110 = "t"; - const peg$c111 = peg$literalExpectation("t", false); - const peg$c112 = function() { return "\t"; }; - const peg$c113 = "u"; - const peg$c114 = peg$literalExpectation("u", false); - const peg$c115 = function(digits: any) { - return String.fromCharCode(parseInt(digits, 16)); - }; - const peg$c116 = function(sequence: any) { return sequence; }; - const peg$c117 = /^[^\0-\x1F"\\]/; - const peg$c118 = peg$classExpectation([["\0", "\x1F"], "\"", "\\"], true, false); - const peg$c119 = /^[0-9a-f]/i; - const peg$c120 = peg$classExpectation([["0", "9"], ["a", "f"]], false, true); - - let peg$currPos = 0; - let peg$savedPos = 0; - const peg$posDetailsCache = [{ line: 1, column: 1 }]; - let peg$maxFailPos = 0; - let peg$maxFailExpected: any[] = []; - let peg$silentFails = 0; - - const peg$resultsCache: {[id: number]: ICached} = {}; - - let peg$result; - - if (options.startRule !== undefined) { - if (!(options.startRule in peg$startRuleFunctions)) { - throw new Error("Can't start parsing from rule \"" + options.startRule + "\"."); - } - - peg$startRuleFunction = peg$startRuleFunctions[options.startRule]; - } - - function text(): string { - return input.substring(peg$savedPos, peg$currPos); - } - - function location(): IFileRange { - return peg$computeLocation(peg$savedPos, peg$currPos); - } - - function expected(description: string, location1?: IFileRange) { - location1 = location1 !== undefined - ? location1 - : peg$computeLocation(peg$savedPos, peg$currPos); - - throw peg$buildStructuredError( - [peg$otherExpectation(description)], - input.substring(peg$savedPos, peg$currPos), - location1 - ); - } - - function error(message: string, location1?: IFileRange) { - location1 = location1 !== undefined - ? location1 - : peg$computeLocation(peg$savedPos, peg$currPos); - - throw peg$buildSimpleError(message, location1); - } - - function peg$literalExpectation(text1: string, ignoreCase: boolean): ILiteralExpectation { - return { type: "literal", text: text1, ignoreCase: ignoreCase }; - } - - function peg$classExpectation(parts: IClassParts, inverted: boolean, ignoreCase: boolean): IClassExpectation { - return { type: "class", parts: parts, inverted: inverted, ignoreCase: ignoreCase }; - } - - function peg$anyExpectation(): IAnyExpectation { - return { type: "any" }; - } - - function peg$endExpectation(): IEndExpectation { - return { type: "end" }; - } - - function peg$otherExpectation(description: string): IOtherExpectation { - return { type: "other", description: description }; - } - - function peg$computePosDetails(pos: number) { - let details = peg$posDetailsCache[pos]; - let p; - - if (details) { - return details; - } else { - p = pos - 1; - while (!peg$posDetailsCache[p]) { - p--; - } - - details = peg$posDetailsCache[p]; - details = { - line: details.line, - column: details.column - }; - - while (p < pos) { - if (input.charCodeAt(p) === 10) { - details.line++; - details.column = 1; - } else { - details.column++; - } - - p++; - } - - peg$posDetailsCache[pos] = details; - - return details; - } - } - - function peg$computeLocation(startPos: number, endPos: number): IFileRange { - const startPosDetails = peg$computePosDetails(startPos); - const endPosDetails = peg$computePosDetails(endPos); - - return { - start: { - offset: startPos, - line: startPosDetails.line, - column: startPosDetails.column - }, - end: { - offset: endPos, - line: endPosDetails.line, - column: endPosDetails.column - } - }; - } - - function peg$fail(expected1: Expectation) { - if (peg$currPos < peg$maxFailPos) { return; } - - if (peg$currPos > peg$maxFailPos) { - peg$maxFailPos = peg$currPos; - peg$maxFailExpected = []; - } - - peg$maxFailExpected.push(expected1); - } - - function peg$buildSimpleError(message: string, location1: IFileRange) { - return new SyntaxError(message, [], "", location1); - } - - function peg$buildStructuredError(expected1: Expectation[], found: string | null, location1: IFileRange) { - return new SyntaxError( - SyntaxError.buildMessage(expected1, found), - expected1, - found, - location1 - ); - } - - function peg$parsetests(): any { - let s0, s1, s2, s3, s4, s5, s6; - - const key = peg$currPos * 38 + 0; - const cached: ICached = peg$resultsCache[key]; - - if (cached) { - peg$currPos = cached.nextPos; - - return cached.result; - } - - s0 = peg$currPos; - s1 = peg$currPos; - s2 = peg$parsetop_level_el(); - if (s2 !== peg$FAILED) { - s3 = []; - s4 = peg$currPos; - s5 = peg$parseline_separator(); - if (s5 !== peg$FAILED) { - s6 = peg$parsetop_level_el(); - if (s6 !== peg$FAILED) { - peg$savedPos = s4; - s5 = peg$c0(s2, s6); - s4 = s5; - } else { - peg$currPos = s4; - s4 = peg$FAILED; - } - } else { - peg$currPos = s4; - s4 = peg$FAILED; - } - while (s4 !== peg$FAILED) { - s3.push(s4); - s4 = peg$currPos; - s5 = peg$parseline_separator(); - if (s5 !== peg$FAILED) { - s6 = peg$parsetop_level_el(); - if (s6 !== peg$FAILED) { - peg$savedPos = s4; - s5 = peg$c0(s2, s6); - s4 = s5; - } else { - peg$currPos = s4; - s4 = peg$FAILED; - } - } else { - peg$currPos = s4; - s4 = peg$FAILED; - } - } - if (s3 !== peg$FAILED) { - peg$savedPos = s1; - s2 = peg$c1(s2, s3); - s1 = s2; - } else { - peg$currPos = s1; - s1 = peg$FAILED; - } - } else { - peg$currPos = s1; - s1 = peg$FAILED; - } - if (s1 === peg$FAILED) { - s1 = null; - } - if (s1 !== peg$FAILED) { - s2 = peg$parsefull_ws(); - if (s2 !== peg$FAILED) { - peg$savedPos = s0; - s1 = peg$c2(s1); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - - peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; - - return s0; - } - - function peg$parsemacros(): any { - let s0, s1, s2, s3, s4, s5, s6; - - const key = peg$currPos * 38 + 1; - const cached: ICached = peg$resultsCache[key]; - - if (cached) { - peg$currPos = cached.nextPos; - - return cached.result; - } - - s0 = peg$currPos; - s1 = peg$currPos; - s2 = peg$parsetop_level_el(); - if (s2 !== peg$FAILED) { - s3 = []; - s4 = peg$currPos; - s5 = peg$parseline_separator(); - if (s5 !== peg$FAILED) { - s6 = peg$parsetop_level_el(); - if (s6 !== peg$FAILED) { - peg$savedPos = s4; - s5 = peg$c0(s2, s6); - s4 = s5; - } else { - peg$currPos = s4; - s4 = peg$FAILED; - } - } else { - peg$currPos = s4; - s4 = peg$FAILED; - } - while (s4 !== peg$FAILED) { - s3.push(s4); - s4 = peg$currPos; - s5 = peg$parseline_separator(); - if (s5 !== peg$FAILED) { - s6 = peg$parsetop_level_el(); - if (s6 !== peg$FAILED) { - peg$savedPos = s4; - s5 = peg$c0(s2, s6); - s4 = s5; - } else { - peg$currPos = s4; - s4 = peg$FAILED; - } - } else { - peg$currPos = s4; - s4 = peg$FAILED; - } - } - if (s3 !== peg$FAILED) { - peg$savedPos = s1; - s2 = peg$c1(s2, s3); - s1 = s2; - } else { - peg$currPos = s1; - s1 = peg$FAILED; - } - } else { - peg$currPos = s1; - s1 = peg$FAILED; - } - if (s1 === peg$FAILED) { - s1 = null; - } - if (s1 !== peg$FAILED) { - s2 = peg$parsefull_ws(); - if (s2 !== peg$FAILED) { - peg$savedPos = s0; - s1 = peg$c3(s1); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - - peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; - - return s0; - } - - function peg$parsetop_level_el(): any { - let s0; - - const key = peg$currPos * 38 + 2; - const cached: ICached = peg$resultsCache[key]; - - if (cached) { - peg$currPos = cached.nextPos; - - return cached.result; - } - - s0 = peg$parsetest(); - if (s0 === peg$FAILED) { - s0 = peg$parsemacro(); - if (s0 === peg$FAILED) { - s0 = peg$parsegastest(); - if (s0 === peg$FAILED) { - s0 = peg$parsepending(); - if (s0 === peg$FAILED) { - s0 = peg$parseonly(); - if (s0 === peg$FAILED) { - s0 = peg$parseskip(); - } - } - } - } - } - - peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; - - return s0; - } - - function peg$parsetest(): any { - let s0, s1, s2, s3, s4, s5, s6, s7; - - const key = peg$currPos * 38 + 3; - const cached: ICached = peg$resultsCache[key]; - - if (cached) { - peg$currPos = cached.nextPos; - - return cached.result; - } - - s0 = peg$currPos; - s1 = peg$parsefull_ws(); - if (s1 === peg$FAILED) { - s1 = null; - } - if (s1 !== peg$FAILED) { - if (input.substr(peg$currPos, 4) === peg$c4) { - s2 = peg$c4; - peg$currPos += 4; - } else { - s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c5); } - } - if (s2 !== peg$FAILED) { - s3 = peg$parsews(); - if (s3 !== peg$FAILED) { - s4 = peg$parsestring(); - if (s4 !== peg$FAILED) { - s5 = peg$parsews(); - if (s5 !== peg$FAILED) { - s6 = peg$parseline_separator(); - if (s6 !== peg$FAILED) { - s7 = peg$parsesteps(); - if (s7 === peg$FAILED) { - s7 = null; - } - if (s7 !== peg$FAILED) { - peg$savedPos = s0; - s1 = peg$c6(s4, s7); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - - peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; - - return s0; - } - - function peg$parsegastest(): any { - let s0, s1, s2, s3, s4, s5, s6, s7; - - const key = peg$currPos * 38 + 4; - const cached: ICached = peg$resultsCache[key]; - - if (cached) { - peg$currPos = cached.nextPos; - - return cached.result; - } - - s0 = peg$currPos; - s1 = peg$parsefull_ws(); - if (s1 === peg$FAILED) { - s1 = null; - } - if (s1 !== peg$FAILED) { - if (input.substr(peg$currPos, 7) === peg$c7) { - s2 = peg$c7; - peg$currPos += 7; - } else { - s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c8); } - } - if (s2 !== peg$FAILED) { - s3 = peg$parsews(); - if (s3 !== peg$FAILED) { - s4 = peg$parsestring(); - if (s4 !== peg$FAILED) { - s5 = peg$parsews(); - if (s5 !== peg$FAILED) { - s6 = peg$parseline_separator(); - if (s6 !== peg$FAILED) { - s7 = peg$parsesteps(); - if (s7 === peg$FAILED) { - s7 = null; - } - if (s7 !== peg$FAILED) { - peg$savedPos = s0; - s1 = peg$c9(s4, s7); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - - peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; - - return s0; - } - - function peg$parsepending(): any { - let s0, s1, s2, s3, s4, s5, s6, s7; - - const key = peg$currPos * 38 + 5; - const cached: ICached = peg$resultsCache[key]; - - if (cached) { - peg$currPos = cached.nextPos; - - return cached.result; - } - - s0 = peg$currPos; - s1 = peg$parsefull_ws(); - if (s1 === peg$FAILED) { - s1 = null; - } - if (s1 !== peg$FAILED) { - if (input.substr(peg$currPos, 7) === peg$c10) { - s2 = peg$c10; - peg$currPos += 7; - } else { - s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c11); } - } - if (s2 !== peg$FAILED) { - s3 = peg$parsews(); - if (s3 !== peg$FAILED) { - s4 = peg$parsestring(); - if (s4 !== peg$FAILED) { - s5 = peg$parsews(); - if (s5 !== peg$FAILED) { - s6 = peg$parseline_separator(); - if (s6 !== peg$FAILED) { - s7 = peg$parsesteps(); - if (s7 === peg$FAILED) { - s7 = null; - } - if (s7 !== peg$FAILED) { - peg$savedPos = s0; - s1 = peg$c12(s4, s7); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - - peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; - - return s0; - } - - function peg$parseonly(): any { - let s0, s1, s2, s3, s4, s5, s6, s7; - - const key = peg$currPos * 38 + 6; - const cached: ICached = peg$resultsCache[key]; - - if (cached) { - peg$currPos = cached.nextPos; - - return cached.result; - } - - s0 = peg$currPos; - s1 = peg$parsefull_ws(); - if (s1 === peg$FAILED) { - s1 = null; - } - if (s1 !== peg$FAILED) { - if (input.substr(peg$currPos, 4) === peg$c13) { - s2 = peg$c13; - peg$currPos += 4; - } else { - s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c14); } - } - if (s2 !== peg$FAILED) { - s3 = peg$parsews(); - if (s3 !== peg$FAILED) { - s4 = peg$parsestring(); - if (s4 !== peg$FAILED) { - s5 = peg$parsews(); - if (s5 !== peg$FAILED) { - s6 = peg$parseline_separator(); - if (s6 !== peg$FAILED) { - s7 = peg$parsesteps(); - if (s7 === peg$FAILED) { - s7 = null; - } - if (s7 !== peg$FAILED) { - peg$savedPos = s0; - s1 = peg$c15(s4, s7); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - - peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; - - return s0; - } - - function peg$parseskip(): any { - let s0, s1, s2, s3, s4, s5, s6, s7; - - const key = peg$currPos * 38 + 7; - const cached: ICached = peg$resultsCache[key]; - - if (cached) { - peg$currPos = cached.nextPos; - - return cached.result; - } - - s0 = peg$currPos; - s1 = peg$parsefull_ws(); - if (s1 === peg$FAILED) { - s1 = null; - } - if (s1 !== peg$FAILED) { - if (input.substr(peg$currPos, 4) === peg$c16) { - s2 = peg$c16; - peg$currPos += 4; - } else { - s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c17); } - } - if (s2 !== peg$FAILED) { - s3 = peg$parsews(); - if (s3 !== peg$FAILED) { - s4 = peg$parsestring(); - if (s4 !== peg$FAILED) { - s5 = peg$parsews(); - if (s5 !== peg$FAILED) { - s6 = peg$parseline_separator(); - if (s6 !== peg$FAILED) { - s7 = peg$parsesteps(); - if (s7 === peg$FAILED) { - s7 = null; - } - if (s7 !== peg$FAILED) { - peg$savedPos = s0; - s1 = peg$c18(s4, s7); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - - peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; - - return s0; - } - - function peg$parsemacro(): any { - let s0, s1, s2, s3, s4, s5, s6, s7, s8; - - const key = peg$currPos * 38 + 8; - const cached: ICached = peg$resultsCache[key]; - - if (cached) { - peg$currPos = cached.nextPos; - - return cached.result; - } - - s0 = peg$currPos; - s1 = peg$parsefull_ws(); - if (s1 === peg$FAILED) { - s1 = null; - } - if (s1 !== peg$FAILED) { - if (input.substr(peg$currPos, 5) === peg$c19) { - s2 = peg$c19; - peg$currPos += 5; - } else { - s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c20); } - } - if (s2 !== peg$FAILED) { - s3 = peg$parsews(); - if (s3 !== peg$FAILED) { - s4 = peg$parsetoken(); - if (s4 !== peg$FAILED) { - s5 = peg$parsews(); - if (s5 !== peg$FAILED) { - s6 = peg$parseargs(); - if (s6 === peg$FAILED) { - s6 = null; - } - if (s6 !== peg$FAILED) { - s7 = peg$parseline_separator(); - if (s7 !== peg$FAILED) { - s8 = peg$parsesteps(); - if (s8 !== peg$FAILED) { - peg$savedPos = s0; - s1 = peg$c21(s4, s6, s8); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - - peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; - - return s0; - } - - function peg$parseargs(): any { - let s0, s1, s2, s3, s4, s5, s6; - - const key = peg$currPos * 38 + 9; - const cached: ICached = peg$resultsCache[key]; - - if (cached) { - peg$currPos = cached.nextPos; - - return cached.result; - } - - s0 = peg$currPos; - s1 = peg$currPos; - s2 = peg$parsearg(); - if (s2 !== peg$FAILED) { - s3 = []; - s4 = peg$currPos; - s5 = peg$parsews(); - if (s5 !== peg$FAILED) { - s6 = peg$parseargs(); - if (s6 !== peg$FAILED) { - peg$savedPos = s4; - s5 = peg$c0(s2, s6); - s4 = s5; - } else { - peg$currPos = s4; - s4 = peg$FAILED; - } - } else { - peg$currPos = s4; - s4 = peg$FAILED; - } - while (s4 !== peg$FAILED) { - s3.push(s4); - s4 = peg$currPos; - s5 = peg$parsews(); - if (s5 !== peg$FAILED) { - s6 = peg$parseargs(); - if (s6 !== peg$FAILED) { - peg$savedPos = s4; - s5 = peg$c0(s2, s6); - s4 = s5; - } else { - peg$currPos = s4; - s4 = peg$FAILED; - } - } else { - peg$currPos = s4; - s4 = peg$FAILED; - } - } - if (s3 !== peg$FAILED) { - peg$savedPos = s1; - s2 = peg$c22(s2, s3); - s1 = s2; - } else { - peg$currPos = s1; - s1 = peg$FAILED; - } - } else { - peg$currPos = s1; - s1 = peg$FAILED; - } - if (s1 !== peg$FAILED) { - peg$savedPos = s0; - s1 = peg$c23(s1); - } - s0 = s1; - - peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; - - return s0; - } - - function peg$parsearg(): any { - let s0, s1, s2, s3, s4, s5, s6, s7; - - const key = peg$currPos * 38 + 10; - const cached: ICached = peg$resultsCache[key]; - - if (cached) { - peg$currPos = cached.nextPos; - - return cached.result; - } - - s0 = peg$currPos; - if (input.substr(peg$currPos, 3) === peg$c24) { - s1 = peg$c24; - peg$currPos += 3; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c25); } - } - if (s1 === peg$FAILED) { - s1 = null; - } - if (s1 !== peg$FAILED) { - s2 = peg$parsetoken(); - if (s2 !== peg$FAILED) { - s3 = peg$currPos; - s4 = peg$parsews(); - if (s4 === peg$FAILED) { - s4 = null; - } - if (s4 !== peg$FAILED) { - if (input.charCodeAt(peg$currPos) === 61) { - s5 = peg$c26; - peg$currPos++; - } else { - s5 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c27); } - } - if (s5 !== peg$FAILED) { - s6 = peg$parsetoken(); - if (s6 !== peg$FAILED) { - s7 = peg$parsews(); - if (s7 === peg$FAILED) { - s7 = null; - } - if (s7 !== peg$FAILED) { - peg$savedPos = s3; - s4 = peg$c28(s1, s2, s6); - s3 = s4; - } else { - peg$currPos = s3; - s3 = peg$FAILED; - } - } else { - peg$currPos = s3; - s3 = peg$FAILED; - } - } else { - peg$currPos = s3; - s3 = peg$FAILED; - } - } else { - peg$currPos = s3; - s3 = peg$FAILED; - } - if (s3 === peg$FAILED) { - s3 = null; - } - if (s3 !== peg$FAILED) { - peg$savedPos = s0; - s1 = peg$c29(s1, s2, s3); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - - peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; - - return s0; - } - - function peg$parsetoken_set(): any { - let s0, s1, s2, s3, s4, s5, s6; - - const key = peg$currPos * 38 + 11; - const cached: ICached = peg$resultsCache[key]; - - if (cached) { - peg$currPos = cached.nextPos; - - return cached.result; - } - - s0 = peg$currPos; - s1 = peg$currPos; - s2 = peg$parsetoken(); - if (s2 !== peg$FAILED) { - s3 = []; - s4 = peg$currPos; - s5 = peg$parsews(); - if (s5 !== peg$FAILED) { - s6 = peg$parsetoken_set(); - if (s6 !== peg$FAILED) { - peg$savedPos = s4; - s5 = peg$c0(s2, s6); - s4 = s5; - } else { - peg$currPos = s4; - s4 = peg$FAILED; - } - } else { - peg$currPos = s4; - s4 = peg$FAILED; - } - while (s4 !== peg$FAILED) { - s3.push(s4); - s4 = peg$currPos; - s5 = peg$parsews(); - if (s5 !== peg$FAILED) { - s6 = peg$parsetoken_set(); - if (s6 !== peg$FAILED) { - peg$savedPos = s4; - s5 = peg$c0(s2, s6); - s4 = s5; - } else { - peg$currPos = s4; - s4 = peg$FAILED; - } - } else { - peg$currPos = s4; - s4 = peg$FAILED; - } - } - if (s3 !== peg$FAILED) { - peg$savedPos = s1; - s2 = peg$c22(s2, s3); - s1 = s2; - } else { - peg$currPos = s1; - s1 = peg$FAILED; - } - } else { - peg$currPos = s1; - s1 = peg$FAILED; - } - if (s1 !== peg$FAILED) { - peg$savedPos = s0; - s1 = peg$c30(s1); - } - s0 = s1; - - peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; - - return s0; - } - - function peg$parsesteps(): any { - let s0, s1, s2, s3, s4, s5, s6; - - const key = peg$currPos * 38 + 12; - const cached: ICached = peg$resultsCache[key]; - - if (cached) { - peg$currPos = cached.nextPos; - - return cached.result; - } - - s0 = peg$currPos; - s1 = peg$currPos; - s2 = peg$parsefull_expr(); - if (s2 !== peg$FAILED) { - s3 = []; - s4 = peg$currPos; - s5 = peg$parseline_separator(); - if (s5 !== peg$FAILED) { - s6 = peg$parsefull_expr(); - if (s6 !== peg$FAILED) { - peg$savedPos = s4; - s5 = peg$c31(s2, s6); - s4 = s5; - } else { - peg$currPos = s4; - s4 = peg$FAILED; - } - } else { - peg$currPos = s4; - s4 = peg$FAILED; - } - while (s4 !== peg$FAILED) { - s3.push(s4); - s4 = peg$currPos; - s5 = peg$parseline_separator(); - if (s5 !== peg$FAILED) { - s6 = peg$parsefull_expr(); - if (s6 !== peg$FAILED) { - peg$savedPos = s4; - s5 = peg$c31(s2, s6); - s4 = s5; - } else { - peg$currPos = s4; - s4 = peg$FAILED; - } - } else { - peg$currPos = s4; - s4 = peg$FAILED; - } - } - if (s3 !== peg$FAILED) { - peg$savedPos = s1; - s2 = peg$c22(s2, s3); - s1 = s2; - } else { - peg$currPos = s1; - s1 = peg$FAILED; - } - } else { - peg$currPos = s1; - s1 = peg$FAILED; - } - if (s1 === peg$FAILED) { - s1 = null; - } - if (s1 !== peg$FAILED) { - peg$savedPos = s0; - s1 = peg$c32(s1); - } - s0 = s1; - - peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; - - return s0; - } - - function peg$parsefull_expr(): any { - let s0, s1, s2; - - const key = peg$currPos * 38 + 13; - const cached: ICached = peg$resultsCache[key]; - - if (cached) { - peg$currPos = cached.nextPos; - - return cached.result; - } - - s0 = peg$currPos; - s1 = peg$parsetab_separator(); - if (s1 !== peg$FAILED) { - s2 = peg$parsestep(); - if (s2 !== peg$FAILED) { - peg$savedPos = s0; - s1 = peg$c33(s2); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - if (s0 === peg$FAILED) { - s0 = peg$currPos; - s1 = peg$parsecomment(); - if (s1 !== peg$FAILED) { - peg$savedPos = s0; - s1 = peg$c34(); - } - s0 = s1; - if (s0 === peg$FAILED) { - s0 = peg$currPos; - s1 = peg$parsetab_separator(); - if (s1 !== peg$FAILED) { - s2 = peg$parsews(); - if (s2 !== peg$FAILED) { - peg$savedPos = s0; - s1 = peg$c34(); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } - } - - peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; - - return s0; - } - - function peg$parsestep(): any { - let s0, s1, s2; - - const key = peg$currPos * 38 + 14; - const cached: ICached = peg$resultsCache[key]; - - if (cached) { - peg$currPos = cached.nextPos; - - return cached.result; - } - - s0 = peg$currPos; - s1 = peg$parseexpr(); - if (s1 !== peg$FAILED) { - s2 = peg$parsecomment(); - if (s2 === peg$FAILED) { - s2 = null; - } - if (s2 !== peg$FAILED) { - peg$savedPos = s0; - s1 = peg$c35(s1); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - if (s0 === peg$FAILED) { - s0 = peg$currPos; - s1 = peg$parsecomment(); - if (s1 !== peg$FAILED) { - peg$savedPos = s0; - s1 = peg$c34(); - } - s0 = s1; - if (s0 === peg$FAILED) { - s0 = peg$currPos; - s1 = peg$parsetab_separator(); - if (s1 === peg$FAILED) { - s1 = null; - } - if (s1 !== peg$FAILED) { - s2 = peg$parsews(); - if (s2 !== peg$FAILED) { - peg$savedPos = s0; - s1 = peg$c34(); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } - } - - peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; - - return s0; - } - - function peg$parseexpr(): any { - let s0, s1, s2, s3, s4, s5, s6; - - const key = peg$currPos * 38 + 15; - const cached: ICached = peg$resultsCache[key]; - - if (cached) { - peg$currPos = cached.nextPos; - - return cached.result; - } - - s0 = peg$currPos; - s1 = peg$parsetoken(); - if (s1 !== peg$FAILED) { - s2 = []; - s3 = peg$currPos; - s4 = peg$parsews(); - if (s4 !== peg$FAILED) { - s5 = peg$parsecontinuation(); - if (s5 === peg$FAILED) { - s5 = null; - } - if (s5 !== peg$FAILED) { - s6 = peg$parseexpr(); - if (s6 !== peg$FAILED) { - peg$savedPos = s3; - s4 = peg$c36(s1, s6); - s3 = s4; - } else { - peg$currPos = s3; - s3 = peg$FAILED; - } - } else { - peg$currPos = s3; - s3 = peg$FAILED; - } - } else { - peg$currPos = s3; - s3 = peg$FAILED; - } - while (s3 !== peg$FAILED) { - s2.push(s3); - s3 = peg$currPos; - s4 = peg$parsews(); - if (s4 !== peg$FAILED) { - s5 = peg$parsecontinuation(); - if (s5 === peg$FAILED) { - s5 = null; - } - if (s5 !== peg$FAILED) { - s6 = peg$parseexpr(); - if (s6 !== peg$FAILED) { - peg$savedPos = s3; - s4 = peg$c36(s1, s6); - s3 = s4; - } else { - peg$currPos = s3; - s3 = peg$FAILED; - } - } else { - peg$currPos = s3; - s3 = peg$FAILED; - } - } else { - peg$currPos = s3; - s3 = peg$FAILED; - } - } - if (s2 !== peg$FAILED) { - peg$savedPos = s0; - s1 = peg$c37(s1, s2); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - if (s0 === peg$FAILED) { - s0 = peg$currPos; - s1 = peg$parsebegin_compound(); - if (s1 !== peg$FAILED) { - s2 = peg$parseexpr(); - if (s2 !== peg$FAILED) { - s3 = peg$parseend_compound(); - if (s3 !== peg$FAILED) { - peg$savedPos = s0; - s1 = peg$c38(s2); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - if (s0 === peg$FAILED) { - s0 = peg$currPos; - s1 = peg$parsebegin_list(); - if (s1 !== peg$FAILED) { - s2 = peg$parselist_inner(); - if (s2 === peg$FAILED) { - s2 = null; - } - if (s2 !== peg$FAILED) { - s3 = peg$parseend_list(); - if (s3 !== peg$FAILED) { - peg$savedPos = s0; - s1 = peg$c39(s2); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } - } - - peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; - - return s0; - } - - function peg$parsecomment(): any { - let s0, s1, s2, s3, s4; - - const key = peg$currPos * 38 + 16; - const cached: ICached = peg$resultsCache[key]; - - if (cached) { - peg$currPos = cached.nextPos; - - return cached.result; - } - - s0 = peg$currPos; - s1 = peg$parsews(); - if (s1 !== peg$FAILED) { - if (input.substr(peg$currPos, 2) === peg$c40) { - s2 = peg$c40; - peg$currPos += 2; - } else { - s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c41); } - } - if (s2 !== peg$FAILED) { - s3 = []; - if (peg$c42.test(input.charAt(peg$currPos))) { - s4 = input.charAt(peg$currPos); - peg$currPos++; - } else { - s4 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c43); } - } - while (s4 !== peg$FAILED) { - s3.push(s4); - if (peg$c42.test(input.charAt(peg$currPos))) { - s4 = input.charAt(peg$currPos); - peg$currPos++; - } else { - s4 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c43); } - } - } - if (s3 !== peg$FAILED) { - peg$savedPos = s0; - s1 = peg$c34(); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - if (s0 === peg$FAILED) { - s0 = peg$currPos; - s1 = peg$parsews(); - if (s1 !== peg$FAILED) { - if (input.charCodeAt(peg$currPos) === 35) { - s2 = peg$c44; - peg$currPos++; - } else { - s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c45); } - } - if (s2 !== peg$FAILED) { - s3 = []; - if (peg$c42.test(input.charAt(peg$currPos))) { - s4 = input.charAt(peg$currPos); - peg$currPos++; - } else { - s4 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c43); } - } - while (s4 !== peg$FAILED) { - s3.push(s4); - if (peg$c42.test(input.charAt(peg$currPos))) { - s4 = input.charAt(peg$currPos); - peg$currPos++; - } else { - s4 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c43); } - } - } - if (s3 !== peg$FAILED) { - peg$savedPos = s0; - s1 = peg$c34(); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } - - peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; - - return s0; - } - - function peg$parsetoken(): any { - let s0, s1, s2, s3; - - const key = peg$currPos * 38 + 17; - const cached: ICached = peg$resultsCache[key]; - - if (cached) { - peg$currPos = cached.nextPos; - - return cached.result; - } - - s0 = peg$currPos; - s1 = peg$parsesimple_token(); - if (s1 !== peg$FAILED) { - if (input.charCodeAt(peg$currPos) === 58) { - s2 = peg$c46; - peg$currPos++; - } else { - s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c47); } - } - if (s2 !== peg$FAILED) { - s3 = peg$parsesimple_token(); - if (s3 !== peg$FAILED) { - peg$savedPos = s0; - s1 = peg$c48(s1, s3); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - if (s0 === peg$FAILED) { - s0 = peg$parsesimple_token(); - } - - peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; - - return s0; - } - - function peg$parsesimple_token(): any { - let s0, s1, s2; - - const key = peg$currPos * 38 + 18; - const cached: ICached = peg$resultsCache[key]; - - if (cached) { - peg$currPos = cached.nextPos; - - return cached.result; - } - - s0 = peg$parsehex(); - if (s0 === peg$FAILED) { - s0 = peg$parsenumber(); - if (s0 === peg$FAILED) { - s0 = peg$currPos; - s1 = []; - if (peg$c49.test(input.charAt(peg$currPos))) { - s2 = input.charAt(peg$currPos); - peg$currPos++; - } else { - s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c50); } - } - if (s2 !== peg$FAILED) { - while (s2 !== peg$FAILED) { - s1.push(s2); - if (peg$c49.test(input.charAt(peg$currPos))) { - s2 = input.charAt(peg$currPos); - peg$currPos++; - } else { - s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c50); } - } - } - } else { - s1 = peg$FAILED; - } - if (s1 !== peg$FAILED) { - peg$savedPos = s0; - s1 = peg$c51(s1); - } - s0 = s1; - if (s0 === peg$FAILED) { - s0 = peg$parsestring(); - } - } - } - - peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; - - return s0; - } - - function peg$parsehex(): any { - let s0, s1, s2, s3, s4; - - const key = peg$currPos * 38 + 19; - const cached: ICached = peg$resultsCache[key]; - - if (cached) { - peg$currPos = cached.nextPos; - - return cached.result; - } - - s0 = peg$currPos; - s1 = peg$currPos; - if (input.substr(peg$currPos, 2) === peg$c52) { - s2 = peg$c52; - peg$currPos += 2; - } else { - s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c53); } - } - if (s2 !== peg$FAILED) { - s3 = []; - if (peg$c54.test(input.charAt(peg$currPos))) { - s4 = input.charAt(peg$currPos); - peg$currPos++; - } else { - s4 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c55); } - } - if (s4 !== peg$FAILED) { - while (s4 !== peg$FAILED) { - s3.push(s4); - if (peg$c54.test(input.charAt(peg$currPos))) { - s4 = input.charAt(peg$currPos); - peg$currPos++; - } else { - s4 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c55); } - } - } - } else { - s3 = peg$FAILED; - } - if (s3 !== peg$FAILED) { - s2 = [s2, s3]; - s1 = s2; - } else { - peg$currPos = s1; - s1 = peg$FAILED; - } - } else { - peg$currPos = s1; - s1 = peg$FAILED; - } - if (s1 !== peg$FAILED) { - peg$savedPos = s0; - s1 = peg$c56(s1); - } - s0 = s1; - - peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; - - return s0; - } - - function peg$parsenumber(): any { - let s0, s1, s2, s3, s4, s5, s6, s7, s8, s9; - - const key = peg$currPos * 38 + 20; - const cached: ICached = peg$resultsCache[key]; - - if (cached) { - peg$currPos = cached.nextPos; - - return cached.result; - } - - s0 = peg$currPos; - s1 = peg$currPos; - if (input.charCodeAt(peg$currPos) === 45) { - s2 = peg$c57; - peg$currPos++; - } else { - s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c58); } - } - if (s2 === peg$FAILED) { - if (input.charCodeAt(peg$currPos) === 43) { - s2 = peg$c59; - peg$currPos++; - } else { - s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c60); } - } - } - if (s2 === peg$FAILED) { - s2 = null; - } - if (s2 !== peg$FAILED) { - s3 = []; - if (peg$c61.test(input.charAt(peg$currPos))) { - s4 = input.charAt(peg$currPos); - peg$currPos++; - } else { - s4 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c62); } - } - if (s4 !== peg$FAILED) { - while (s4 !== peg$FAILED) { - s3.push(s4); - if (peg$c61.test(input.charAt(peg$currPos))) { - s4 = input.charAt(peg$currPos); - peg$currPos++; - } else { - s4 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c62); } - } - } - } else { - s3 = peg$FAILED; - } - if (s3 !== peg$FAILED) { - s4 = peg$currPos; - if (input.charCodeAt(peg$currPos) === 46) { - s5 = peg$c63; - peg$currPos++; - } else { - s5 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c64); } - } - if (s5 !== peg$FAILED) { - s6 = []; - if (peg$c61.test(input.charAt(peg$currPos))) { - s7 = input.charAt(peg$currPos); - peg$currPos++; - } else { - s7 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c62); } - } - if (s7 !== peg$FAILED) { - while (s7 !== peg$FAILED) { - s6.push(s7); - if (peg$c61.test(input.charAt(peg$currPos))) { - s7 = input.charAt(peg$currPos); - peg$currPos++; - } else { - s7 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c62); } - } - } - } else { - s6 = peg$FAILED; - } - if (s6 !== peg$FAILED) { - s5 = [s5, s6]; - s4 = s5; - } else { - peg$currPos = s4; - s4 = peg$FAILED; - } - } else { - peg$currPos = s4; - s4 = peg$FAILED; - } - if (s4 === peg$FAILED) { - s4 = null; - } - if (s4 !== peg$FAILED) { - s5 = peg$currPos; - if (input.charCodeAt(peg$currPos) === 101) { - s6 = peg$c65; - peg$currPos++; - } else { - s6 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c66); } - } - if (s6 !== peg$FAILED) { - if (input.charCodeAt(peg$currPos) === 45) { - s7 = peg$c57; - peg$currPos++; - } else { - s7 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c58); } - } - if (s7 === peg$FAILED) { - s7 = null; - } - if (s7 !== peg$FAILED) { - s8 = []; - if (peg$c61.test(input.charAt(peg$currPos))) { - s9 = input.charAt(peg$currPos); - peg$currPos++; - } else { - s9 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c62); } - } - if (s9 !== peg$FAILED) { - while (s9 !== peg$FAILED) { - s8.push(s9); - if (peg$c61.test(input.charAt(peg$currPos))) { - s9 = input.charAt(peg$currPos); - peg$currPos++; - } else { - s9 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c62); } - } - } - } else { - s8 = peg$FAILED; - } - if (s8 !== peg$FAILED) { - s6 = [s6, s7, s8]; - s5 = s6; - } else { - peg$currPos = s5; - s5 = peg$FAILED; - } - } else { - peg$currPos = s5; - s5 = peg$FAILED; - } - } else { - peg$currPos = s5; - s5 = peg$FAILED; - } - if (s5 === peg$FAILED) { - s5 = null; - } - if (s5 !== peg$FAILED) { - s2 = [s2, s3, s4, s5]; - s1 = s2; - } else { - peg$currPos = s1; - s1 = peg$FAILED; - } - } else { - peg$currPos = s1; - s1 = peg$FAILED; - } - } else { - peg$currPos = s1; - s1 = peg$FAILED; - } - } else { - peg$currPos = s1; - s1 = peg$FAILED; - } - if (s1 !== peg$FAILED) { - peg$savedPos = s0; - s1 = peg$c67(s1); - } - s0 = s1; - - peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; - - return s0; - } - - function peg$parselist_inner(): any { - let s0, s1, s2, s3, s4, s5; - - const key = peg$currPos * 38 + 21; - const cached: ICached = peg$resultsCache[key]; - - if (cached) { - peg$currPos = cached.nextPos; - - return cached.result; - } - - s0 = peg$currPos; - s1 = peg$parseexpr(); - if (s1 !== peg$FAILED) { - s2 = []; - s3 = peg$currPos; - s4 = peg$parsews(); - if (s4 === peg$FAILED) { - s4 = null; - } - if (s4 !== peg$FAILED) { - s5 = peg$parselist_inner(); - if (s5 !== peg$FAILED) { - peg$savedPos = s3; - s4 = peg$c36(s1, s5); - s3 = s4; - } else { - peg$currPos = s3; - s3 = peg$FAILED; - } - } else { - peg$currPos = s3; - s3 = peg$FAILED; - } - while (s3 !== peg$FAILED) { - s2.push(s3); - s3 = peg$currPos; - s4 = peg$parsews(); - if (s4 === peg$FAILED) { - s4 = null; - } - if (s4 !== peg$FAILED) { - s5 = peg$parselist_inner(); - if (s5 !== peg$FAILED) { - peg$savedPos = s3; - s4 = peg$c36(s1, s5); - s3 = s4; - } else { - peg$currPos = s3; - s3 = peg$FAILED; - } - } else { - peg$currPos = s3; - s3 = peg$FAILED; - } - } - if (s2 !== peg$FAILED) { - peg$savedPos = s0; - s1 = peg$c68(s1, s2); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - - peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; - - return s0; - } - - function peg$parsebegin_compound(): any { - let s0, s1, s2, s3; - - const key = peg$currPos * 38 + 22; - const cached: ICached = peg$resultsCache[key]; - - if (cached) { - peg$currPos = cached.nextPos; - - return cached.result; - } - - s0 = peg$currPos; - s1 = peg$parsews(); - if (s1 !== peg$FAILED) { - if (input.charCodeAt(peg$currPos) === 40) { - s2 = peg$c69; - peg$currPos++; - } else { - s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c70); } - } - if (s2 !== peg$FAILED) { - s3 = peg$parsews(); - if (s3 !== peg$FAILED) { - s1 = [s1, s2, s3]; - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - - peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; - - return s0; - } - - function peg$parseend_compound(): any { - let s0, s1, s2, s3; - - const key = peg$currPos * 38 + 23; - const cached: ICached = peg$resultsCache[key]; - - if (cached) { - peg$currPos = cached.nextPos; - - return cached.result; - } - - s0 = peg$currPos; - s1 = peg$parsews(); - if (s1 !== peg$FAILED) { - if (input.charCodeAt(peg$currPos) === 41) { - s2 = peg$c71; - peg$currPos++; - } else { - s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c72); } - } - if (s2 !== peg$FAILED) { - s3 = peg$parsews(); - if (s3 !== peg$FAILED) { - s1 = [s1, s2, s3]; - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - - peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; - - return s0; - } - - function peg$parsebegin_list(): any { - let s0, s1, s2, s3; - - const key = peg$currPos * 38 + 24; - const cached: ICached = peg$resultsCache[key]; - - if (cached) { - peg$currPos = cached.nextPos; - - return cached.result; - } - - s0 = peg$currPos; - s1 = peg$parsews(); - if (s1 !== peg$FAILED) { - if (input.charCodeAt(peg$currPos) === 91) { - s2 = peg$c73; - peg$currPos++; - } else { - s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c74); } - } - if (s2 !== peg$FAILED) { - s3 = peg$parsews(); - if (s3 !== peg$FAILED) { - s1 = [s1, s2, s3]; - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - - peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; - - return s0; - } - - function peg$parseend_list(): any { - let s0, s1, s2, s3; - - const key = peg$currPos * 38 + 25; - const cached: ICached = peg$resultsCache[key]; - - if (cached) { - peg$currPos = cached.nextPos; - - return cached.result; - } - - s0 = peg$currPos; - s1 = peg$parsews(); - if (s1 !== peg$FAILED) { - if (input.charCodeAt(peg$currPos) === 93) { - s2 = peg$c75; - peg$currPos++; - } else { - s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c76); } - } - if (s2 !== peg$FAILED) { - s3 = peg$parsews(); - if (s3 !== peg$FAILED) { - s1 = [s1, s2, s3]; - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - - peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; - - return s0; - } - - function peg$parseline_separator(): any { - let s0, s1, s2; - - const key = peg$currPos * 38 + 26; - const cached: ICached = peg$resultsCache[key]; - - if (cached) { - peg$currPos = cached.nextPos; - - return cached.result; - } - - s0 = peg$currPos; - if (input.charCodeAt(peg$currPos) === 13) { - s1 = peg$c77; - peg$currPos++; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c78); } - } - if (s1 === peg$FAILED) { - s1 = null; - } - if (s1 !== peg$FAILED) { - if (input.charCodeAt(peg$currPos) === 10) { - s2 = peg$c79; - peg$currPos++; - } else { - s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c80); } - } - if (s2 !== peg$FAILED) { - s1 = [s1, s2]; - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - - peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; - - return s0; - } - - function peg$parsetab_separator(): any { - let s0; - - const key = peg$currPos * 38 + 27; - const cached: ICached = peg$resultsCache[key]; - - if (cached) { - peg$currPos = cached.nextPos; - - return cached.result; - } - - if (input.charCodeAt(peg$currPos) === 9) { - s0 = peg$c81; - peg$currPos++; - } else { - s0 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c82); } - } - if (s0 === peg$FAILED) { - if (input.substr(peg$currPos, 4) === peg$c83) { - s0 = peg$c83; - peg$currPos += 4; - } else { - s0 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c84); } - } - } - - peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; - - return s0; - } - - function peg$parsecontinuation(): any { - let s0, s1, s2, s3, s4; - - const key = peg$currPos * 38 + 28; - const cached: ICached = peg$resultsCache[key]; - - if (cached) { - peg$currPos = cached.nextPos; - - return cached.result; - } - - s0 = peg$currPos; - if (input.charCodeAt(peg$currPos) === 92) { - s1 = peg$c85; - peg$currPos++; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c86); } - } - if (s1 !== peg$FAILED) { - s2 = peg$parseline_separator(); - if (s2 !== peg$FAILED) { - s3 = peg$parsetab_separator(); - if (s3 !== peg$FAILED) { - s4 = peg$parsetab_separator(); - if (s4 !== peg$FAILED) { - s1 = [s1, s2, s3, s4]; - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - - peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; - - return s0; - } - - function peg$parsews(): any { - let s0, s1; - - const key = peg$currPos * 38 + 29; - const cached: ICached = peg$resultsCache[key]; - - if (cached) { - peg$currPos = cached.nextPos; - - return cached.result; - } - - peg$silentFails++; - s0 = []; - if (peg$c88.test(input.charAt(peg$currPos))) { - s1 = input.charAt(peg$currPos); - peg$currPos++; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c89); } - } - while (s1 !== peg$FAILED) { - s0.push(s1); - if (peg$c88.test(input.charAt(peg$currPos))) { - s1 = input.charAt(peg$currPos); - peg$currPos++; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c89); } - } - } - peg$silentFails--; - if (s0 === peg$FAILED) { - s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c87); } - } - - peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; - - return s0; - } - - function peg$parsefull_ws(): any { - let s0, s1, s2; - - const key = peg$currPos * 38 + 30; - const cached: ICached = peg$resultsCache[key]; - - if (cached) { - peg$currPos = cached.nextPos; - - return cached.result; - } - - s0 = peg$currPos; - s1 = peg$parsecomment(); - if (s1 !== peg$FAILED) { - s2 = peg$parsefull_ws(); - if (s2 !== peg$FAILED) { - s1 = [s1, s2]; - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - if (s0 === peg$FAILED) { - s0 = peg$currPos; - if (peg$c90.test(input.charAt(peg$currPos))) { - s1 = input.charAt(peg$currPos); - peg$currPos++; - } else { - s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c91); } - } - if (s1 !== peg$FAILED) { - s2 = peg$parsefull_ws(); - if (s2 === peg$FAILED) { - s2 = null; - } - if (s2 !== peg$FAILED) { - s1 = [s1, s2]; - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } - - peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; - - return s0; - } - - function peg$parsestring(): any { - let s0, s1, s2, s3; - - const key = peg$currPos * 38 + 31; - const cached: ICached = peg$resultsCache[key]; - - if (cached) { - peg$currPos = cached.nextPos; - - return cached.result; - } - - peg$silentFails++; - s0 = peg$currPos; - s1 = peg$parsequotation_mark(); - if (s1 !== peg$FAILED) { - s2 = []; - s3 = peg$parsechar(); - while (s3 !== peg$FAILED) { - s2.push(s3); - s3 = peg$parsechar(); - } - if (s2 !== peg$FAILED) { - s3 = peg$parsequotation_mark(); - if (s3 !== peg$FAILED) { - peg$savedPos = s0; - s1 = peg$c93(s2); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - peg$silentFails--; - if (s0 === peg$FAILED) { - s1 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c92); } - } - - peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; - - return s0; - } - - function peg$parsechar(): any { - let s0, s1, s2, s3, s4, s5, s6, s7, s8, s9; - - const key = peg$currPos * 38 + 32; - const cached: ICached = peg$resultsCache[key]; - - if (cached) { - peg$currPos = cached.nextPos; - - return cached.result; - } - - s0 = peg$parseunescaped(); - if (s0 === peg$FAILED) { - s0 = peg$currPos; - s1 = peg$parseescape(); - if (s1 !== peg$FAILED) { - if (input.charCodeAt(peg$currPos) === 34) { - s2 = peg$c94; - peg$currPos++; - } else { - s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c95); } - } - if (s2 === peg$FAILED) { - if (input.charCodeAt(peg$currPos) === 92) { - s2 = peg$c85; - peg$currPos++; - } else { - s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c86); } - } - if (s2 === peg$FAILED) { - if (input.charCodeAt(peg$currPos) === 47) { - s2 = peg$c96; - peg$currPos++; - } else { - s2 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c97); } - } - if (s2 === peg$FAILED) { - s2 = peg$currPos; - if (input.charCodeAt(peg$currPos) === 98) { - s3 = peg$c98; - peg$currPos++; - } else { - s3 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c99); } - } - if (s3 !== peg$FAILED) { - peg$savedPos = s2; - s3 = peg$c100(); - } - s2 = s3; - if (s2 === peg$FAILED) { - s2 = peg$currPos; - if (input.charCodeAt(peg$currPos) === 102) { - s3 = peg$c101; - peg$currPos++; - } else { - s3 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c102); } - } - if (s3 !== peg$FAILED) { - peg$savedPos = s2; - s3 = peg$c103(); - } - s2 = s3; - if (s2 === peg$FAILED) { - s2 = peg$currPos; - if (input.charCodeAt(peg$currPos) === 110) { - s3 = peg$c104; - peg$currPos++; - } else { - s3 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c105); } - } - if (s3 !== peg$FAILED) { - peg$savedPos = s2; - s3 = peg$c106(); - } - s2 = s3; - if (s2 === peg$FAILED) { - s2 = peg$currPos; - if (input.charCodeAt(peg$currPos) === 114) { - s3 = peg$c107; - peg$currPos++; - } else { - s3 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c108); } - } - if (s3 !== peg$FAILED) { - peg$savedPos = s2; - s3 = peg$c109(); - } - s2 = s3; - if (s2 === peg$FAILED) { - s2 = peg$currPos; - if (input.charCodeAt(peg$currPos) === 116) { - s3 = peg$c110; - peg$currPos++; - } else { - s3 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c111); } - } - if (s3 !== peg$FAILED) { - peg$savedPos = s2; - s3 = peg$c112(); - } - s2 = s3; - if (s2 === peg$FAILED) { - s2 = peg$currPos; - if (input.charCodeAt(peg$currPos) === 117) { - s3 = peg$c113; - peg$currPos++; - } else { - s3 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c114); } - } - if (s3 !== peg$FAILED) { - s4 = peg$currPos; - s5 = peg$currPos; - s6 = peg$parseHEXDIG(); - if (s6 !== peg$FAILED) { - s7 = peg$parseHEXDIG(); - if (s7 !== peg$FAILED) { - s8 = peg$parseHEXDIG(); - if (s8 !== peg$FAILED) { - s9 = peg$parseHEXDIG(); - if (s9 !== peg$FAILED) { - s6 = [s6, s7, s8, s9]; - s5 = s6; - } else { - peg$currPos = s5; - s5 = peg$FAILED; - } - } else { - peg$currPos = s5; - s5 = peg$FAILED; - } - } else { - peg$currPos = s5; - s5 = peg$FAILED; - } - } else { - peg$currPos = s5; - s5 = peg$FAILED; - } - if (s5 !== peg$FAILED) { - s4 = input.substring(s4, peg$currPos); - } else { - s4 = s5; - } - if (s4 !== peg$FAILED) { - peg$savedPos = s2; - s3 = peg$c115(s4); - s2 = s3; - } else { - peg$currPos = s2; - s2 = peg$FAILED; - } - } else { - peg$currPos = s2; - s2 = peg$FAILED; - } - } - } - } - } - } - } - } - } - if (s2 !== peg$FAILED) { - peg$savedPos = s0; - s1 = peg$c116(s2); - s0 = s1; - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } else { - peg$currPos = s0; - s0 = peg$FAILED; - } - } - - peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; - - return s0; - } - - function peg$parseescape(): any { - let s0; - - const key = peg$currPos * 38 + 33; - const cached: ICached = peg$resultsCache[key]; - - if (cached) { - peg$currPos = cached.nextPos; - - return cached.result; - } - - if (input.charCodeAt(peg$currPos) === 92) { - s0 = peg$c85; - peg$currPos++; - } else { - s0 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c86); } - } - - peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; - - return s0; - } - - function peg$parsequotation_mark(): any { - let s0; - - const key = peg$currPos * 38 + 34; - const cached: ICached = peg$resultsCache[key]; - - if (cached) { - peg$currPos = cached.nextPos; - - return cached.result; - } - - if (input.charCodeAt(peg$currPos) === 34) { - s0 = peg$c94; - peg$currPos++; - } else { - s0 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c95); } - } - - peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; - - return s0; - } - - function peg$parseunescaped(): any { - let s0; - - const key = peg$currPos * 38 + 35; - const cached: ICached = peg$resultsCache[key]; - - if (cached) { - peg$currPos = cached.nextPos; - - return cached.result; - } - - if (peg$c117.test(input.charAt(peg$currPos))) { - s0 = input.charAt(peg$currPos); - peg$currPos++; - } else { - s0 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c118); } - } - - peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; - - return s0; - } - - function peg$parseDIGIT(): any { - let s0; - - const key = peg$currPos * 38 + 36; - const cached: ICached = peg$resultsCache[key]; - - if (cached) { - peg$currPos = cached.nextPos; - - return cached.result; - } - - if (peg$c61.test(input.charAt(peg$currPos))) { - s0 = input.charAt(peg$currPos); - peg$currPos++; - } else { - s0 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c62); } - } - - peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; - - return s0; - } - - function peg$parseHEXDIG(): any { - let s0; - - const key = peg$currPos * 38 + 37; - const cached: ICached = peg$resultsCache[key]; - - if (cached) { - peg$currPos = cached.nextPos; - - return cached.result; - } - - if (peg$c119.test(input.charAt(peg$currPos))) { - s0 = input.charAt(peg$currPos); - peg$currPos++; - } else { - s0 = peg$FAILED; - if (peg$silentFails === 0) { peg$fail(peg$c120); } - } - - peg$resultsCache[key] = { nextPos: peg$currPos, result: s0 }; - - return s0; - } - - - if (!Array.prototype.flat) { - Object.defineProperty(Array.prototype, 'flat', { - configurable: true, - value: function flat (x) { - var depth = isNaN(arguments[0]) ? 1 : Number(arguments[0]); - - return depth ? Array.prototype.reduce.call(this, function (acc, cur) { - if (Array.isArray(cur)) { - (acc).push.apply(acc, flat.call(cur, depth - 1)); - } else { - (acc).push(cur); - } - - return acc; - }, []) : Array.prototype.slice.call(this); - }, - writable: true - }); - } - - function getString(str) { - let val; - if (Array.isArray(str)) { - if (str.length !== 2 || str[0] !== 'String') { - throw new Error(`Expected string, got ${str}`); - } - - val = str[1]; - } else { - val = str; - } - - if (typeof val !== 'string') { - throw new Error(`Expected string, got ${val} (${typeof val})`); - } - - return val; - } - - function expandEvent(macros, step) { - const [eventName, ...eventArgs] = step; - - if (macros[eventName]) { - let expanded = expandMacro(macros[eventName], eventArgs); - - // Recursively expand steps - return expanded.map(event => expandEvent(macros, event)).flat(); - } else { - return [step]; - } - } - - function getArgValues(eventArgs, macroArgs) { - const eventArgNameMap = {}; - const eventArgIndexed = new Array(); - const argValues = {}; - let usedNamedArg = false; - let usedSplat = false; - - eventArgs.forEach((eventArg) => { - if (eventArg.argName) { - const {argName, argValue} = eventArg; - - eventArgNameMap[argName] = argValue; - usedNamedArg = true; - } else { - if (usedNamedArg) { - throw new Error(`Cannot use positional arg after named arg in macro invokation ${JSON.stringify(eventArgs)} looking at ${eventArg.toString()}`); - } - - eventArgIndexed.push(eventArg); - } - }); - - macroArgs.forEach(({arg, def, splat}, argIndex) => { - if (usedSplat) { - throw new Error("Cannot have arg after splat arg"); - } - - let val; - if (eventArgNameMap[arg] !== undefined) { - val = eventArgNameMap[arg]; - } else if (splat) { - val = eventArgIndexed.slice(argIndex); // Clear out any remaining args - usedSplat = true; - } else if (eventArgIndexed[argIndex] !== undefined) { - val = eventArgIndexed[argIndex]; - } else if (def !== undefined) { - val = def; - } else { - throw new Error("Macro cannot find arg value for " + arg); - } - argValues[arg] = val; - }); - - return argValues; - } - - function expandMacro(macro, eventArgs) { - const argValues = getArgValues(eventArgs, macro.args); - - function expandStep(step) { - return step.map((token) => { - if (argValues[token] !== undefined) { - return argValues[token]; - } else { - if (Array.isArray(token)) { - return expandStep(token); - } else { - return token; - } - } - }); - }; - - return macro.steps.map(expandStep); - } - - function addTopLevelEl(state, el) { - const macros = state.macros; - const tests = state.tests; - const pending = state.pending; - - switch (el.type) { - case 'macro': - const macro = {[el.name]: {args: el.args, steps: el.steps}}; - - return { - tests: tests, - macros: ({...macros, ...macro}) - }; - case 'test': - const steps = el.steps; - const expandedSteps = steps.map((step) => { - return expandEvent(macros, step) - }).flat(); - - const test = {[el.test]: expandedSteps}; - - return { - tests: {...tests, ...test}, - macros: macros - } - } - } - - - peg$result = peg$startRuleFunction(); - - if (peg$result !== peg$FAILED && peg$currPos === input.length) { - return peg$result; - } else { - if (peg$result !== peg$FAILED && peg$currPos < input.length) { - peg$fail(peg$endExpectation()); - } - - throw peg$buildStructuredError( - peg$maxFailExpected, - peg$maxFailPos < input.length ? input.charAt(peg$maxFailPos) : null, - peg$maxFailPos < input.length - ? peg$computeLocation(peg$maxFailPos, peg$maxFailPos + 1) - : peg$computeLocation(peg$maxFailPos, peg$maxFailPos) - ); - } -} - -export interface IParseOptions { - filename?: string; - startRule?: string; - tracer?: any; - [key: string]: any; -} -export type ParseFunction = (input: string, options?: IParseOptions) => any; -export const parse: ParseFunction = peg$parse; - diff --git a/scenario/src/Printer.ts b/scenario/src/Printer.ts deleted file mode 100644 index 478bbfc69..000000000 --- a/scenario/src/Printer.ts +++ /dev/null @@ -1,120 +0,0 @@ -import {Value} from './Value'; -import {Action} from './Action'; -import {EventProcessingError} from './CoreEvent' -import {formatEvent} from './Formatter'; - -import * as readline from 'readline'; - -export interface Printer { - printLine(str: string): void - printMarkdown(str: string): void - printValue(val: Value): void - printError(err: Error): void - printAction(action: Action): void -} - -export class CallbackPrinter implements Printer { - callback: (message: any, format: object) => void - - constructor(callback: (message: string) => void) { - this.callback = callback; - } - - printLine(str: string): void { - this.callback(str, {}); - } - - printMarkdown(str: string): void { - this.callback(str, {markdown: true}); - } - - printValue(val: Value): void { - this.callback(val.toString(), {value: true}); - } - - printError(err: Error): void { - if (process.env['verbose']) { - this.callback(err, {error: true}); - } - - this.callback(`Error: ${err.toString()}`, {error: true}); - } - - printAction(action: Action): void { - // Do nothing - } -} - -export class ConsolePrinter implements Printer { - verbose: boolean - - constructor(verbose: boolean) { - this.verbose = verbose; - } - - printLine(str: string): void { - console.log(str); - } - - printMarkdown(str: string): void { - console.log(str); - } - - printValue(val: Value): void { - console.log(val.toString()); - } - - printError(err: Error): void { - if (this.verbose) { - console.log(err); - } - - console.log(`Error: ${err.toString()}`); - } - - printAction(action: Action): void { - if (this.verbose) { - console.log(`Action: ${action.log}`); - } - } -} - -export class ReplPrinter implements Printer { - rl : readline.Interface; - verbose : boolean - - constructor(rl: readline.Interface, verbose: boolean) { - this.rl = rl; - this.verbose = verbose; - } - - printLine(str: string): void { - console.log(`${str}`); - } - - printMarkdown(str: string): void { - console.log(`${str}`); - } - - printValue(val: Value): void { - console.log(val.toString()); - } - - printError(err: Error): void { - if (this.verbose) { - console.log(err); - } - - if (err instanceof EventProcessingError) { - console.log(`Event Processing Error:`); - console.log(`\t${err.error.toString()}`); - console.log(`\twhen processing event \`${formatEvent(err.event)}\``); - } else { - console.log(`Error: ${err.toString()}`); - } - } - - printAction(action: Action): void { - console.log(`Action: ${action.log}`); - } -} diff --git a/scenario/src/Repl.d.ts b/scenario/src/Repl.d.ts deleted file mode 100644 index a4a22f456..000000000 --- a/scenario/src/Repl.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -import {Artifacts} from './Artifact'; -import {Web3} from './Web3'; - -declare namespace NodeJS { - interface Global { - Web3: Web3 - Artifacts: Artifacts - } -} diff --git a/scenario/src/Repl.ts b/scenario/src/Repl.ts deleted file mode 100644 index 2752ee017..000000000 --- a/scenario/src/Repl.ts +++ /dev/null @@ -1,188 +0,0 @@ -import {ReplPrinter} from './Printer'; -import { - addInvariant, - initWorld, - loadInvokationOpts, - loadDryRun, - loadSettings, - loadVerbose, - World -} from './World'; -import {throwExpect} from './Assert'; -import {Macros} from './Macro'; -import {formatEvent} from './Formatter'; -import {complete} from './Completer'; -import {loadContracts} from './Networks'; -import {accountAliases, loadAccounts} from './Accounts'; -import {getNetworkPath, readFile} from './File'; -import {SuccessInvariant} from './Invariant/SuccessInvariant'; -import {createInterface} from './HistoricReadline'; -import {runCommand} from './Runner'; -import {parse} from './Parser'; -import {forkWeb3} from './Hypothetical'; -import {getSaddle} from 'eth-saddle'; -import Web3 from 'web3'; - -import * as fs from 'fs'; -import * as path from 'path'; - -const basePath = process.env.proj_root || process.cwd(); -const baseScenarioPath = path.join(basePath, 'spec', 'scenario'); -const baseNetworksPath = path.join(basePath, 'networks'); - -const TOTAL_GAS = 8000000; - -function questionPromise(rl): Promise { - return new Promise((resolve, reject) => { - rl.question(" > ", (command) => { - resolve(command); - }); - }); -} - -async function loop(world, rl, macros): Promise { - let command = await questionPromise(rl); - - try { - let newWorld = await runCommand(world, command, macros); - - return await loop(newWorld, rl, macros); - } catch (err) { - world.printer.printError(err); - return await loop(world, rl, macros); - } -} - -function loadEnvVars(): object { - return (process.env['env_vars'] || '').split(',').reduce((acc, keyValue) => { - if (keyValue.length === 0) { - return acc; - } else { - const [key, value] = keyValue.split('='); - - return { - ...acc, - [key]: value - }; - } - }, {}); -} - -async function repl(): Promise { - // Uck, we need to load core macros :( - const coreMacros = fs.readFileSync(path.join(baseScenarioPath, 'CoreMacros'), 'utf8'); - - const macros = parse(coreMacros, {startRule: 'macros'}); - - let script = process.env['script']; - - let network = process.env['network']; - - if (!network) { - throw new Error(`Missing required "network" env argument`); - } - - let world; - - let rl = await createInterface({ - input: process.stdin, - output: process.stdout, - completer: (line) => complete(world, macros, line), - path: getNetworkPath(basePath, network, '-history', null) - }); - - const verbose: boolean = !!process.env['verbose']; - const hypothetical: boolean = !!process.env['hypothetical']; - - let printer = new ReplPrinter(rl, verbose); - let contractInfo: string[]; - - let saddle = await getSaddle(network); - let accounts: string[] = saddle.wallet_accounts.concat(saddle.accounts).filter((x) => !!x); - - world = await initWorld(throwExpect, printer, saddle.web3, saddle, network, accounts, basePath, TOTAL_GAS); - [world, contractInfo] = await loadContracts(world); - world = loadInvokationOpts(world); - world = loadVerbose(world); - world = loadDryRun(world); - world = await loadSettings(world); - - printer.printLine(`Network: ${network}`); - - if (hypothetical) { - const forkJsonPath = path.join(baseNetworksPath, `${network}-fork.json`); - let forkJson; - - try { - let forkJsonString = fs.readFileSync(forkJsonPath, 'utf8'); - forkJson = JSON.parse(forkJsonString); - } catch (err) { - throw new Error(`Cannot read fork configuration from \`${forkJsonPath}\`, ${err}`); - } - if (!forkJson['url']) { - throw new Error(`Missing url in fork json`); - } - if (!forkJson['unlocked'] || !Array.isArray(forkJson.unlocked)) { - throw new Error(`Missing unlocked in fork json`); - } - - saddle.web3 = await forkWeb3(saddle.web3, forkJson.url, forkJson.unlocked); - saddle.accounts = forkJson.unlocked; - console.log(`Running on fork ${forkJson.url} with unlocked accounts ${forkJson.unlocked.join(', ')}`) - } - - if (accounts.length > 0) { - printer.printLine(`Accounts:`); - accounts.forEach((account, i) => { - let aliases = world.settings.lookupAliases(account); - aliases = aliases.concat(accountAliases(i)); - - printer.printLine(`\t${account} (${aliases.join(',')})`) - }); - } - - if (contractInfo.length > 0) { - world.printer.printLine(`Contracts:`); - contractInfo.forEach((info) => world.printer.printLine(`\t${info}`)); - } - - printer.printLine(`Available macros: ${Object.keys(macros).toString()}`); - printer.printLine(``); - - if (script) { - const combined = script.split(',').reduce((acc, script) => { - printer.printLine(`Running script: ${script}...`); - const envVars = loadEnvVars(); - if (hypothetical) { - envVars['hypo'] = true; - } - const scriptData: string = fs.readFileSync(script).toString(); - - if (Object.keys(envVars).length > 0) { - printer.printLine(`Env Vars:`); - } - - const replacedScript = Object.entries(envVars).reduce((data, [key, val]) => { - printer.printLine(`\t${key}: ${val}`); - - return data.split(`$${key}`).join(val); - }, scriptData); - - const finalScript = replacedScript.replace(new RegExp(/\$[\w_]+/, 'g'), 'Nothing'); - - return [...acc, ...finalScript.split("\n")]; - }, []); - - return await combined.reduce(async (acc, command) => { - return await runCommand(await acc, command, macros); - }, Promise.resolve(world)); - printer.printLine(`Script complete.`); - } else { - await loop(world, rl, macros); - } -} - -repl().catch((error) => { - console.error(error); - process.exit(1); -}); diff --git a/scenario/src/Runner.ts b/scenario/src/Runner.ts deleted file mode 100644 index e5aac37e6..000000000 --- a/scenario/src/Runner.ts +++ /dev/null @@ -1,20 +0,0 @@ -import {World} from './World'; -import {parse} from './Parser'; -import {expandEvent, Macros} from './Macro'; -import {processEvents} from './CoreEvent' - -export async function runCommand(world: World, command: string, macros: Macros): Promise { - const trimmedCommand = command.trim(); - - const event = parse(trimmedCommand, {startRule: 'step'}); - - if (event === null) { - return world; - } else { - world.printer.printLine(`Command: ${trimmedCommand}`); - - let expanded = expandEvent(macros, event); - - return processEvents(world, expanded); - } -} diff --git a/scenario/src/Settings.ts b/scenario/src/Settings.ts deleted file mode 100644 index ba2ea5898..000000000 --- a/scenario/src/Settings.ts +++ /dev/null @@ -1,85 +0,0 @@ -import { getNetworkPath, readFile, writeFile } from './File'; - -export class Settings { - basePath: string | null; - network: string | null; - aliases: { [name: string]: string }; - from: string | undefined; - printTxLogs: boolean = false; - - constructor( - basePath: string | null, - network: string | null, - aliases: { [name: string]: string }, - from?: string - ) { - this.basePath = basePath; - this.network = network; - this.aliases = aliases; - this.from = from; - } - - static deserialize(basePath: string, network: string, data: string): Settings { - const { aliases } = JSON.parse(data); - - return new Settings(basePath, network, aliases); - } - - serialize(): string { - return JSON.stringify({ - aliases: this.aliases - }); - } - - static default(basePath: string | null, network: string | null): Settings { - return new Settings(basePath, network, {}); - } - - static getFilePath(basePath: string | null, network: string): string { - return getNetworkPath(basePath, network, '-settings'); - } - - static load(basePath: string, network: string): Promise { - return readFile(null, Settings.getFilePath(basePath, network), Settings.default(basePath, network), data => - Settings.deserialize(basePath, network, data) - ); - } - - async save(): Promise { - if (this.network) { - await writeFile(null, Settings.getFilePath(this.basePath, this.network), this.serialize()); - } - } - - lookupAlias(address: string): string { - let entry = Object.entries(this.aliases).find(([key, value]) => { - return value === address; - }); - - if (entry) { - return entry[0]; - } else { - return address; - } - } - - lookupAliases(address: string): string[] { - let entries = Object.entries(this.aliases).filter(([key, value]) => { - return value === address; - }); - - return entries.map(([key, _value]) => key); - } - - findAlias(name: string): string | null { - const alias = Object.entries(this.aliases).find( - ([alias, addr]) => alias.toLowerCase() === name.toLowerCase() - ); - - if (alias) { - return alias[1]; - } else { - return null; - } - } -} diff --git a/scenario/src/Utils.ts b/scenario/src/Utils.ts deleted file mode 100644 index 3820335e0..000000000 --- a/scenario/src/Utils.ts +++ /dev/null @@ -1,133 +0,0 @@ -import { Event } from './Event'; -import { World } from './World'; -import { AbiItem } from 'web3-utils'; - -// Wraps the element in an array, if it was not already an array -// If array is null or undefined, return the empty array -export function mustArray(arg: T[] | T): T[] { - if (Array.isArray(arg)) { - return arg; - } else { - if (arg === null || arg === undefined) { - return []; - } else { - return [arg]; - } - } -} - -// Asserts that the array must be given length and if so returns it, otherwise -// it will raise an error -export function mustLen(arg: any[] | any, len: number, maxLen?: number): any[] { - if (!Array.isArray(arg)) { - throw `Expected array of length ${len}, got ${arg}`; - } else if (maxLen === undefined && arg.length !== len) { - throw `Expected array of length ${len}, got length ${arg.length} (${arg})`; - } else if (maxLen !== undefined && (arg.length < len || arg.length > maxLen)) { - throw `Expected array of length ${len}-${maxLen}, got length ${arg.length} (${arg})`; - } else { - return arg; - } -} - -export function mustString(arg: Event): string { - if (typeof arg === 'string') { - return arg; - } - - throw new Error(`Expected string argument, got ${arg.toString()}`); -} - -export function rawValues(args) { - if (Array.isArray(args)) - return args.map(rawValues); - if (Array.isArray(args.val)) - return args.val.map(rawValues); - return args.val; -} - -// Web3 doesn't have a function ABI parser.. not sure why.. but we build a simple encoder -// that accepts "fun(uint256,uint256)" and params and returns the encoded value. -export function encodeABI(world: World, fnABI: string, fnParams: string[]): string { - if (fnParams.length == 0) { - return world.web3.eth.abi.encodeFunctionSignature(fnABI); - } else { - const regex = /(\w+)\(([\w,\[\]]+)\)/; - const res = regex.exec(fnABI); - if (!res) { - throw new Error(`Expected ABI signature, got: ${fnABI}`); - } - const [_, fnName, fnInputs] = <[string, string, string]>(res); - const jsonInterface = { - name: fnName, - inputs: fnInputs.split(',').map(i => ({ name: '', type: i })) - }; - // XXXS - return world.web3.eth.abi.encodeFunctionCall(jsonInterface, fnParams); - } -} - -export function encodeParameters(world: World, fnABI: string, fnParams: string[]): string { - const regex = /(\w+)\(([\w,\[\]]+)\)/; - const res = regex.exec(fnABI); - if (!res) { - return '0x0'; - } - const [_, __, fnInputs] = <[string, string, string]>(res); - return world.web3.eth.abi.encodeParameters(fnInputs.split(','), fnParams); -} - -export function decodeParameters(world: World, fnABI: string, data: string): string[] { - const regex = /(\w+)\(([\w,\[\]]+)\)/; - const res = regex.exec(fnABI); - if (!res) { - return []; - } - const [_, __, fnInputs] = <[string, string, string]>(res); - const inputTypes = fnInputs.split(','); - const parameters = world.web3.eth.abi.decodeParameters(inputTypes, data); - - return inputTypes.map((_, index) => parameters[index]); -} - -export async function getCurrentBlockNumber(world: World): Promise { - const { result: currentBlockNumber }: any = await sendRPC(world, 'eth_blockNumber', []); - return parseInt(currentBlockNumber); -} - -export function getCurrentTimestamp(): number { - return Math.floor(Date.now() / 1000); -} - - -export function sleep(timeout: number): Promise { - return new Promise((resolve, reject) => { - setTimeout(() => { - resolve(); - }, timeout); - }); -} - -export function sendRPC(world: World, method: string, params: any[]) { - return new Promise((resolve, reject) => { - if (!world.web3.currentProvider || typeof (world.web3.currentProvider) === 'string') { - return reject(`cannot send from currentProvider=${world.web3.currentProvider}`); - } - - world.web3.currentProvider.send( - { - jsonrpc: '2.0', - method: method, - params: params, - id: new Date().getTime() // Id of the request; anything works, really - }, - (err, response) => { - if (err) { - reject(err); - } else { - resolve(response); - } - } - ); - }); -} diff --git a/scenario/src/Value.ts b/scenario/src/Value.ts deleted file mode 100644 index 25c8c0a4c..000000000 --- a/scenario/src/Value.ts +++ /dev/null @@ -1,424 +0,0 @@ -import {World} from './World'; -import {Event} from './Event'; -import BigNumber from 'bignumber.js'; -import {toEncodableNum} from './Encoding'; -import {formatEvent} from './Formatter'; - -BigNumber.config({ ROUNDING_MODE: 3 }); -const mantissaOne = new BigNumber('1.0e18'); - -export enum Order { - EQUAL, - LESS_THAN, - GREATER_THAN -} - -export interface Value { - compareTo(world: World, given: Value): boolean - compareOrder(world: World, given: Value): Order - toString(): string - truthy(): boolean -} - -function compareInt(a: number, b: number): Order { - if (a === b) { - return Order.EQUAL; - } else if (a > b) { - return Order.GREATER_THAN; - } else { - return Order.LESS_THAN; - } -} - -export class EventV implements Value { - val: Event - - constructor(val) { - this.val = val; - } - - compareTo(world: World, given: Value): boolean { - if (given instanceof EventV) { - return JSON.stringify(this.val) === JSON.stringify(given.val); - } else { - throw new Error(`Cannot compare ${typeof this} to ${typeof given} (${this.toString()}, ${given.toString()})`); - } - } - - compareOrder(world: World, given: Value): Order { - throw new Error(`Cannot compare order of ${typeof this} to ${typeof given} (${this.toString()}, ${given.toString()})`); - } - - toString() { - return `EventV`; - } - - truthy() { - // This check applies to strings or arrays :) - return this.val.length > 0; - } -} - -export class AnythingV implements Value { - compareTo(world: World, given: Value): boolean { - // Everything is awesome. - return true; - } - - compareOrder(world: World, given: Value): Order { - throw new Error(`Cannot compare order of ${typeof this} to ${typeof given} (${this.toString()}, ${given.toString()})`); - } - - toString() { - return `AnythingV<>`; - } - - truthy() { - return true; - } -} - -export class NothingV implements Value { - val: null - - constructor() { - this.val = null; - } - - compareTo(world: World, given: Value): boolean { - // Everything is not awesome. - return false; - } - - compareOrder(world: World, given: Value): Order { - throw new Error(`Cannot compare order of ${typeof this} to ${typeof given} (${this.toString()}, ${given.toString()})`); - } - - encode() { - return null; - } - - toString() { - return `NothingV<>`; - } - - truthy() { - return false; - } -} - -export class BoolV implements Value { - val: boolean - - constructor(val) { - this.val = val; - } - - compareTo(world: World, given: Value): boolean { - if (given instanceof BoolV) { - return this.val === given.val; - } else if (given instanceof NumberV) { - return this.compareTo(world, given.toBoolV()); - } else if (given instanceof StringV && ( given.val === 'true' || given.val === 'false' )) { - return this.val || given.val !== 'true'; - } else { - throw new Error(`Cannot compare ${typeof this} to ${typeof given} (${this.toString()}, ${given.toString()})`); - } - } - - compareOrder(world: World, given: Value): Order { - throw new Error(`Cannot compare order of ${typeof this} to ${typeof given} (${this.toString()}, ${given.toString()})`); - } - - toString() { - return `BoolV`; - } - - truthy() { - return this.val; - } -} - -export class StringV implements Value { - val: string - - constructor(val) { - this.val = val; - } - - compareTo(world: World, given: Value): boolean { - if (given instanceof StringV) { - return this.val === given.val; - } else if ( given instanceof AddressV) { - return world.web3.utils.toChecksumAddress(this.val) === world.web3.utils.toChecksumAddress(given.val); - } else { - throw new Error(`Cannot compare ${typeof this} to ${typeof given} (${this.toString()}, ${given.toString()})`); - } - } - - compareOrder(world: World, given: Value): Order { - throw new Error(`Cannot compare order of ${typeof this} to ${typeof given} (${this.toString()}, ${given.toString()})`); - } - - toString() { - return `StringV`; - } - - truthy() { - return this.val.length > 0; - } -} - -export class MapV implements Value { - val: object - - constructor(val) { - this.val = val; - } - - compareTo(world: World, given: Value): boolean { - if (given instanceof MapV) { - return JSON.stringify(this.val) === JSON.stringify(given.val); - } else { - throw new Error(`Cannot compare ${typeof this} to ${typeof given} (${this.toString()}, ${given.toString()})`); - } - } - - compareOrder(world: World, given: Value): Order { - throw new Error(`Cannot compare order of ${typeof this} to ${typeof given} (${this.toString()}, ${given.toString()})`); - } - - toString() { - return `MapV`; - } - - truthy() { - return Object.keys(this.val).length > 0; - } -} - -export class AddressV implements Value { - val: string - - constructor(val) { - this.val = val; - } - - compareTo(world: World, given: Value): boolean { - if (given instanceof AddressV || given instanceof StringV) { - return world.web3.utils.toChecksumAddress(this.val) === world.web3.utils.toChecksumAddress(given.val); - } else { - throw new Error(`Cannot compare ${typeof this} to ${typeof given} (${this.toString()}, ${given.toString()})`); - } - } - - compareOrder(world: World, given: Value): Order { - throw new Error(`Cannot compare order of ${typeof this} to ${typeof given} (${this.toString()}, ${given.toString()})`); - } - - toString() { - return `AddressV`; - } - - truthy() { - return this.val !== "0x0000000000000000000000000000000000000000"; - } -} - -export class NumberV implements Value { - val : number | string - - constructor(val: number | string, denom?: number | undefined) { - if (denom) { - this.val = Number(val) / denom; - } else { - this.val = val; - } - } - - toNumber(): number { - return Number(this.val); - } - - encode() { - return toEncodableNum(this.val); - } - - compareTo(world: World, given: Value): boolean { - if (given instanceof NumberV) { - const thisBig = new BigNumber(this.val).toFixed(); - const givenBig = new BigNumber(given.val).toFixed(); - - return thisBig === givenBig; - } else if (given instanceof PreciseV) { - return this.compareTo(world, given.toNumberV()); - } else if (given instanceof StringV) { - return this.compareTo(world, new NumberV(Number(given.val))); - } else { - throw new Error(`Cannot compare ${typeof this} to ${typeof given} (${this.toString()}, ${given.toString()})`); - } - } - - compareOrder(world: World, given: Value): Order { - if (given instanceof NumberV) { - const thisBig = new BigNumber(this.val).toNumber(); - const givenBig = new BigNumber(given.val).toNumber(); - - return compareInt(thisBig, givenBig); - } else if (given instanceof PreciseV) { - return this.compareOrder(world, given.toNumberV()); - } else { - throw new Error(`Cannot compare ${typeof this} to ${typeof given} (${this.toString()}, ${given.toString()})`); - } - } - - toBoolV(): BoolV { - if (this.val === 0) { - return new BoolV(true) - } else if (this.val === 1) { - return new BoolV(false); - } - - throw new Error(`Cannot convert number ${this.val} into bool`) - } - - asExp(denom=undefined): string { - return new BigNumber(this.val).toExponential(); - } - - show(): string { - return new BigNumber(this.val).toExponential(); - } - - toString() { - return `NumberV`; - } - - truthy() { - return this.val != 0; - } - - add(b: NumberV): NumberV { - return new NumberV(new BigNumber(this.val).plus(new BigNumber(b.val)).toFixed()); - } - - div(b: NumberV): NumberV { - return new NumberV(new BigNumber(this.val).div(new BigNumber(b.val)).toFixed()); - } - - mul(b: NumberV): NumberV { - return new NumberV(new BigNumber(this.val).times(new BigNumber(b.val)).toFixed()); - } - - sub(b: NumberV): NumberV { - return new NumberV(new BigNumber(this.val).minus(new BigNumber(b.val)).toFixed()); - } -} - -export class ExpNumberV extends NumberV { - show() { - return new BigNumber(this.val).dividedBy(mantissaOne).toNumber().toString(); - } -} - -export class PercentV extends NumberV { - show() { - return new BigNumber(this.val).dividedBy(mantissaOne).multipliedBy(new BigNumber(100)).toNumber().toString() + '%'; - } -} - -export class PreciseV implements Value { - val: number - precision: number - - constructor(val, precision) { - this.val = val; - this.precision = precision; - } - - compareTo(world: World, given: Value): boolean { - if (given instanceof NumberV) { - const thisBig = new BigNumber(this.val.toString()).toPrecision(this.precision); - const givenBig = new BigNumber(given.val.toString()).toPrecision(this.precision); - - return thisBig === givenBig; - } else if (given instanceof PreciseV) { - // TODO: Is this okay? - return this.compareTo(world, given.toNumberV()); - } else { - throw new Error(`Cannot compare ${typeof this} to ${typeof given} (${this.toString()}, ${given.toString()})`); - } - } - - compareOrder(world: World, given: Value): Order { - throw new Error(`Cannot compare order of ${typeof this} to ${typeof given} (${this.toString()}, ${given.toString()})`); - } - - toNumberV(): NumberV { - return new NumberV(this.val); - } - - toString() { - return `PreciseV`; - } - - truthy() { - return this.val != 0; - } -} - -export class ListV implements Value { - val: Value[] - - constructor(els) { - this.val = els; - } - - compareTo(world: World, given: Value): boolean { - if (given instanceof ListV || given instanceof ArrayV) { - return this.val.every((el, i) => el.compareTo(world, given.val[i] || new NothingV())); - } else { - throw new Error(`Cannot compare ${typeof this} to ${typeof given} (${this.toString()}, ${given.toString()})`); - } - } - - compareOrder(world: World, given: Value): Order { - throw new Error(`Cannot compare order of ${typeof this} to ${typeof given} (${this.toString()}, ${given.toString()})`); - } - - toString() { - return `ListV el.toString()).join(',')}>`; - } - - truthy() { - return this.val.length > 0; - } -} - -export class ArrayV implements Value { - val: T[] - - constructor(els) { - this.val = els; - } - - compareTo(world: World, given: Value): boolean { - if (given instanceof ListV || given instanceof ArrayV) { - return this.val.every((el, i) => el.compareTo(world, given.val[i] || new NothingV())); - } else { - throw new Error(`Cannot compare ${typeof this} to ${typeof given} (${this.toString()}, ${given.toString()})`); - } - } - - compareOrder(world: World, given: Value): Order { - throw new Error(`Cannot compare order of ${typeof this} to ${typeof given} (${this.toString()}, ${given.toString()})`); - } - - toString() { - return `ArrayV el.toString()).join(',')}>`; - } - - truthy() { - return this.val.length > 0; - } -} diff --git a/scenario/src/Value/AnchoredViewValue.ts b/scenario/src/Value/AnchoredViewValue.ts deleted file mode 100644 index a63da77c7..000000000 --- a/scenario/src/Value/AnchoredViewValue.ts +++ /dev/null @@ -1,36 +0,0 @@ -import {Event} from '../Event'; -import {World} from '../World'; -import {AnchoredView} from '../Contract/AnchoredView'; -import {getAddressV} from '../CoreValue'; -import {AddressV, NumberV, Value} from '../Value'; -import {Arg, Fetcher, getFetcherValue} from '../Command'; -import {getAnchoredView} from '../ContractLookup'; - -export async function getAnchoredViewAddress(_: World, anchoredView: AnchoredView): Promise { - return new AddressV(anchoredView._address); -} - -async function getUnderlyingPrice(_: World, anchoredView: AnchoredView, asset: string): Promise { - return new NumberV(await anchoredView.methods.getUnderlyingPrice(asset).call()); -} - -export function anchoredViewFetchers() { - return [ - new Fetcher<{anchoredView: AnchoredView, asset: AddressV}, NumberV>(` - #### UnderlyingPrice - - * "UnderlyingPrice asset:
" - Gets the price of the given asset - `, - "UnderlyingPrice", - [ - new Arg("anchoredView", getAnchoredView, {implicit: true}), - new Arg("asset", getAddressV) - ], - (world, {anchoredView, asset}) => getUnderlyingPrice(world, anchoredView, asset.val) - ) - ]; -} - -export async function getAnchoredViewValue(world: World, event: Event): Promise { - return await getFetcherValue("AnchoredView", anchoredViewFetchers(), world, event); -} diff --git a/scenario/src/Value/CTokenDelegateValue.ts b/scenario/src/Value/CTokenDelegateValue.ts deleted file mode 100644 index b368552a5..000000000 --- a/scenario/src/Value/CTokenDelegateValue.ts +++ /dev/null @@ -1,51 +0,0 @@ -import { Event } from '../Event'; -import { World } from '../World'; -import { CErc20Delegate } from '../Contract/CErc20Delegate'; -import { - getCoreValue, - mapValue -} from '../CoreValue'; -import { Arg, Fetcher, getFetcherValue } from '../Command'; -import { - AddressV, - Value, -} from '../Value'; -import { getWorldContractByAddress, getCTokenDelegateAddress } from '../ContractLookup'; - -export async function getCTokenDelegateV(world: World, event: Event): Promise { - const address = await mapValue( - world, - event, - (str) => new AddressV(getCTokenDelegateAddress(world, str)), - getCoreValue, - AddressV - ); - - return getWorldContractByAddress(world, address.val); -} - -async function cTokenDelegateAddress(world: World, cTokenDelegate: CErc20Delegate): Promise { - return new AddressV(cTokenDelegate._address); -} - -export function cTokenDelegateFetchers() { - return [ - new Fetcher<{ cTokenDelegate: CErc20Delegate }, AddressV>(` - #### Address - - * "CTokenDelegate Address" - Returns address of CTokenDelegate contract - * E.g. "CTokenDelegate cDaiDelegate Address" - Returns cDaiDelegate's address - `, - "Address", - [ - new Arg("cTokenDelegate", getCTokenDelegateV) - ], - (world, { cTokenDelegate }) => cTokenDelegateAddress(world, cTokenDelegate), - { namePos: 1 } - ), - ]; -} - -export async function getCTokenDelegateValue(world: World, event: Event): Promise { - return await getFetcherValue("CTokenDelegate", cTokenDelegateFetchers(), world, event); -} diff --git a/scenario/src/Value/CTokenValue.ts b/scenario/src/Value/CTokenValue.ts deleted file mode 100644 index f0cd18342..000000000 --- a/scenario/src/Value/CTokenValue.ts +++ /dev/null @@ -1,395 +0,0 @@ -import { Event } from '../Event'; -import { World } from '../World'; -import { CToken } from '../Contract/CToken'; -import { CErc20Delegator } from '../Contract/CErc20Delegator'; -import { Erc20 } from '../Contract/Erc20'; -import { - getAddressV, - getCoreValue, - getStringV, - mapValue -} from '../CoreValue'; -import { Arg, Fetcher, getFetcherValue } from '../Command'; -import { - AddressV, - NumberV, - Value, - StringV -} from '../Value'; -import { getWorldContractByAddress, getCTokenAddress } from '../ContractLookup'; - -export async function getCTokenV(world: World, event: Event): Promise { - const address = await mapValue( - world, - event, - (str) => new AddressV(getCTokenAddress(world, str)), - getCoreValue, - AddressV - ); - - return getWorldContractByAddress(world, address.val); -} - -export async function getCErc20DelegatorV(world: World, event: Event): Promise { - const address = await mapValue( - world, - event, - (str) => new AddressV(getCTokenAddress(world, str)), - getCoreValue, - AddressV - ); - - return getWorldContractByAddress(world, address.val); -} - -async function getInterestRateModel(world: World, cToken: CToken): Promise { - return new AddressV(await cToken.methods.interestRateModel().call()); -} - -async function cTokenAddress(world: World, cToken: CToken): Promise { - return new AddressV(cToken._address); -} - -async function getCTokenAdmin(world: World, cToken: CToken): Promise { - return new AddressV(await cToken.methods.admin().call()); -} - -async function getCTokenPendingAdmin(world: World, cToken: CToken): Promise { - return new AddressV(await cToken.methods.pendingAdmin().call()); -} - -async function balanceOfUnderlying(world: World, cToken: CToken, user: string): Promise { - return new NumberV(await cToken.methods.balanceOfUnderlying(user).call()); -} - -async function getBorrowBalance(world: World, cToken: CToken, user): Promise { - return new NumberV(await cToken.methods.borrowBalanceCurrent(user).call()); -} - -async function getBorrowBalanceStored(world: World, cToken: CToken, user): Promise { - return new NumberV(await cToken.methods.borrowBalanceStored(user).call()); -} - -async function getTotalBorrows(world: World, cToken: CToken): Promise { - return new NumberV(await cToken.methods.totalBorrows().call()); -} - -async function getTotalBorrowsCurrent(world: World, cToken: CToken): Promise { - return new NumberV(await cToken.methods.totalBorrowsCurrent().call()); -} - -async function getReserveFactor(world: World, cToken: CToken): Promise { - return new NumberV(await cToken.methods.reserveFactorMantissa().call(), 1.0e18); -} - -async function getTotalReserves(world: World, cToken: CToken): Promise { - return new NumberV(await cToken.methods.totalReserves().call()); -} - -async function getComptroller(world: World, cToken: CToken): Promise { - return new AddressV(await cToken.methods.comptroller().call()); -} - -async function getExchangeRateStored(world: World, cToken: CToken): Promise { - return new NumberV(await cToken.methods.exchangeRateStored().call()); -} - -async function getExchangeRate(world: World, cToken: CToken): Promise { - return new NumberV(await cToken.methods.exchangeRateCurrent().call(), 1e18); -} - -async function getCash(world: World, cToken: CToken): Promise { - return new NumberV(await cToken.methods.getCash().call()); -} - -async function getInterestRate(world: World, cToken: CToken): Promise { - return new NumberV(await cToken.methods.borrowRatePerBlock().call(), 1.0e18 / 2102400); -} - -async function getImplementation(world: World, cToken: CToken): Promise { - return new AddressV(await (cToken as CErc20Delegator).methods.implementation().call()); -} - -export function cTokenFetchers() { - return [ - new Fetcher<{ cToken: CToken }, AddressV>(` - #### Address - - * "CToken Address" - Returns address of CToken contract - * E.g. "CToken cZRX Address" - Returns cZRX's address - `, - "Address", - [ - new Arg("cToken", getCTokenV) - ], - (world, { cToken }) => cTokenAddress(world, cToken), - { namePos: 1 } - ), - - new Fetcher<{ cToken: CToken }, AddressV>(` - #### InterestRateModel - - * "CToken InterestRateModel" - Returns the interest rate model of CToken contract - * E.g. "CToken cZRX InterestRateModel" - Returns cZRX's interest rate model - `, - "InterestRateModel", - [ - new Arg("cToken", getCTokenV) - ], - (world, { cToken }) => getInterestRateModel(world, cToken), - { namePos: 1 } - ), - - new Fetcher<{ cToken: CToken }, AddressV>(` - #### Admin - - * "CToken Admin" - Returns the admin of CToken contract - * E.g. "CToken cZRX Admin" - Returns cZRX's admin - `, - "Admin", - [ - new Arg("cToken", getCTokenV) - ], - (world, { cToken }) => getCTokenAdmin(world, cToken), - { namePos: 1 } - ), - - new Fetcher<{ cToken: CToken }, AddressV>(` - #### PendingAdmin - - * "CToken PendingAdmin" - Returns the pending admin of CToken contract - * E.g. "CToken cZRX PendingAdmin" - Returns cZRX's pending admin - `, - "PendingAdmin", - [ - new Arg("cToken", getCTokenV) - ], - (world, { cToken }) => getCTokenPendingAdmin(world, cToken), - { namePos: 1 } - ), - - new Fetcher<{ cToken: CToken }, AddressV>(` - #### Underlying - - * "CToken Underlying" - Returns the underlying asset (if applicable) - * E.g. "CToken cZRX Underlying" - `, - "Underlying", - [ - new Arg("cToken", getCTokenV) - ], - async (world, { cToken }) => new AddressV(await cToken.methods.underlying().call()), - { namePos: 1 } - ), - - new Fetcher<{ cToken: CToken, address: AddressV }, NumberV>(` - #### UnderlyingBalance - - * "CToken UnderlyingBalance " - Returns a user's underlying balance (based on given exchange rate) - * E.g. "CToken cZRX UnderlyingBalance Geoff" - `, - "UnderlyingBalance", - [ - new Arg("cToken", getCTokenV), - new Arg("address", getAddressV) - ], - (world, { cToken, address }) => balanceOfUnderlying(world, cToken, address.val), - { namePos: 1 } - ), - - new Fetcher<{ cToken: CToken, address: AddressV }, NumberV>(` - #### BorrowBalance - - * "CToken BorrowBalance " - Returns a user's borrow balance (including interest) - * E.g. "CToken cZRX BorrowBalance Geoff" - `, - "BorrowBalance", - [ - new Arg("cToken", getCTokenV), - new Arg("address", getAddressV) - ], - (world, { cToken, address }) => getBorrowBalance(world, cToken, address.val), - { namePos: 1 } - ), - - new Fetcher<{ cToken: CToken, address: AddressV }, NumberV>(` - #### BorrowBalanceStored - - * "CToken BorrowBalanceStored " - Returns a user's borrow balance (without specifically re-accruing interest) - * E.g. "CToken cZRX BorrowBalanceStored Geoff" - `, - "BorrowBalanceStored", - [ - new Arg("cToken", getCTokenV), - new Arg("address", getAddressV) - ], - (world, { cToken, address }) => getBorrowBalanceStored(world, cToken, address.val), - { namePos: 1 } - ), - - new Fetcher<{ cToken: CToken }, NumberV>(` - #### TotalBorrows - - * "CToken TotalBorrows" - Returns the cToken's total borrow balance - * E.g. "CToken cZRX TotalBorrows" - `, - "TotalBorrows", - [ - new Arg("cToken", getCTokenV) - ], - (world, { cToken }) => getTotalBorrows(world, cToken), - { namePos: 1 } - ), - - new Fetcher<{ cToken: CToken }, NumberV>(` - #### TotalBorrowsCurrent - - * "CToken TotalBorrowsCurrent" - Returns the cToken's total borrow balance with interest - * E.g. "CToken cZRX TotalBorrowsCurrent" - `, - "TotalBorrowsCurrent", - [ - new Arg("cToken", getCTokenV) - ], - (world, { cToken }) => getTotalBorrowsCurrent(world, cToken), - { namePos: 1 } - ), - - new Fetcher<{ cToken: CToken }, NumberV>(` - #### Reserves - - * "CToken Reserves" - Returns the cToken's total reserves - * E.g. "CToken cZRX Reserves" - `, - "Reserves", - [ - new Arg("cToken", getCTokenV) - ], - (world, { cToken }) => getTotalReserves(world, cToken), - { namePos: 1 } - ), - - new Fetcher<{ cToken: CToken }, NumberV>(` - #### ReserveFactor - - * "CToken ReserveFactor" - Returns reserve factor of CToken contract - * E.g. "CToken cZRX ReserveFactor" - Returns cZRX's reserve factor - `, - "ReserveFactor", - [ - new Arg("cToken", getCTokenV) - ], - (world, { cToken }) => getReserveFactor(world, cToken), - { namePos: 1 } - ), - - new Fetcher<{ cToken: CToken }, AddressV>(` - #### Comptroller - - * "CToken Comptroller" - Returns the cToken's comptroller - * E.g. "CToken cZRX Comptroller" - `, - "Comptroller", - [ - new Arg("cToken", getCTokenV) - ], - (world, { cToken }) => getComptroller(world, cToken), - { namePos: 1 } - ), - - new Fetcher<{ cToken: CToken }, NumberV>(` - #### ExchangeRateStored - - * "CToken ExchangeRateStored" - Returns the cToken's exchange rate (based on balances stored) - * E.g. "CToken cZRX ExchangeRateStored" - `, - "ExchangeRateStored", - [ - new Arg("cToken", getCTokenV) - ], - (world, { cToken }) => getExchangeRateStored(world, cToken), - { namePos: 1 } - ), - - new Fetcher<{ cToken: CToken }, NumberV>(` - #### ExchangeRate - - * "CToken ExchangeRate" - Returns the cToken's current exchange rate - * E.g. "CToken cZRX ExchangeRate" - `, - "ExchangeRate", - [ - new Arg("cToken", getCTokenV) - ], - (world, { cToken }) => getExchangeRate(world, cToken), - { namePos: 1 } - ), - - new Fetcher<{ cToken: CToken }, NumberV>(` - #### Cash - - * "CToken Cash" - Returns the cToken's current cash - * E.g. "CToken cZRX Cash" - `, - "Cash", - [ - new Arg("cToken", getCTokenV) - ], - (world, { cToken }) => getCash(world, cToken), - { namePos: 1 } - ), - - new Fetcher<{ cToken: CToken }, NumberV>(` - #### InterestRate - - * "CToken InterestRate" - Returns the cToken's current interest rate - * E.g. "CToken cZRX InterestRate" - `, - "InterestRate", - [ - new Arg("cToken", getCTokenV) - ], - (world, {cToken}) => getInterestRate(world, cToken), - {namePos: 1} - ), - new Fetcher<{cToken: CToken, signature: StringV}, NumberV>(` - #### CallNum - - * "CToken Call " - Simple direct call method, for now with no parameters - * E.g. "CToken cZRX Call \"borrowIndex()\"" - `, - "CallNum", - [ - new Arg("cToken", getCTokenV), - new Arg("signature", getStringV), - ], - async (world, {cToken, signature}) => { - const res = await world.web3.eth.call({ - to: cToken._address, - data: world.web3.eth.abi.encodeFunctionSignature(signature.val) - }) - const resNum : any = world.web3.eth.abi.decodeParameter('uint256',res); - return new NumberV(resNum); - } - , - {namePos: 1} - ), - new Fetcher<{ cToken: CToken }, AddressV>(` - #### Implementation - - * "CToken Implementation" - Returns the cToken's current implementation - * E.g. "CToken cDAI Implementation" - `, - "Implementation", - [ - new Arg("cToken", getCTokenV) - ], - (world, { cToken }) => getImplementation(world, cToken), - { namePos: 1 } - ) - ]; -} - -export async function getCTokenValue(world: World, event: Event): Promise { - return await getFetcherValue("cToken", cTokenFetchers(), world, event); -} diff --git a/scenario/src/Value/CompValue.ts b/scenario/src/Value/CompValue.ts deleted file mode 100644 index d95672434..000000000 --- a/scenario/src/Value/CompValue.ts +++ /dev/null @@ -1,202 +0,0 @@ -import { Event } from '../Event'; -import { World } from '../World'; -import { Comp } from '../Contract/Comp'; -import { - getAddressV, - getNumberV -} from '../CoreValue'; -import { - AddressV, - ListV, - NumberV, - StringV, - Value -} from '../Value'; -import { Arg, Fetcher, getFetcherValue } from '../Command'; -import { getComp } from '../ContractLookup'; - -export function compFetchers() { - return [ - new Fetcher<{ comp: Comp }, AddressV>(` - #### Address - - * " Address" - Returns the address of Comp token - * E.g. "Comp Address" - `, - "Address", - [ - new Arg("comp", getComp, { implicit: true }) - ], - async (world, { comp }) => new AddressV(comp._address) - ), - - new Fetcher<{ comp: Comp }, StringV>(` - #### Name - - * " Name" - Returns the name of the Comp token - * E.g. "Comp Name" - `, - "Name", - [ - new Arg("comp", getComp, { implicit: true }) - ], - async (world, { comp }) => new StringV(await comp.methods.name().call()) - ), - - new Fetcher<{ comp: Comp }, StringV>(` - #### Symbol - - * " Symbol" - Returns the symbol of the Comp token - * E.g. "Comp Symbol" - `, - "Symbol", - [ - new Arg("comp", getComp, { implicit: true }) - ], - async (world, { comp }) => new StringV(await comp.methods.symbol().call()) - ), - - new Fetcher<{ comp: Comp }, NumberV>(` - #### Decimals - - * " Decimals" - Returns the number of decimals of the Comp token - * E.g. "Comp Decimals" - `, - "Decimals", - [ - new Arg("comp", getComp, { implicit: true }) - ], - async (world, { comp }) => new NumberV(await comp.methods.decimals().call()) - ), - - new Fetcher<{ comp: Comp }, NumberV>(` - #### TotalSupply - - * "Comp TotalSupply" - Returns Comp token's total supply - `, - "TotalSupply", - [ - new Arg("comp", getComp, { implicit: true }) - ], - async (world, { comp }) => new NumberV(await comp.methods.totalSupply().call()) - ), - - new Fetcher<{ comp: Comp, address: AddressV }, NumberV>(` - #### TokenBalance - - * "Comp TokenBalance
" - Returns the Comp token balance of a given address - * E.g. "Comp TokenBalance Geoff" - Returns Geoff's Comp balance - `, - "TokenBalance", - [ - new Arg("comp", getComp, { implicit: true }), - new Arg("address", getAddressV) - ], - async (world, { comp, address }) => new NumberV(await comp.methods.balanceOf(address.val).call()) - ), - - new Fetcher<{ comp: Comp, owner: AddressV, spender: AddressV }, NumberV>(` - #### Allowance - - * "Comp Allowance owner:
spender:
" - Returns the Comp allowance from owner to spender - * E.g. "Comp Allowance Geoff Torrey" - Returns the Comp allowance of Geoff to Torrey - `, - "Allowance", - [ - new Arg("comp", getComp, { implicit: true }), - new Arg("owner", getAddressV), - new Arg("spender", getAddressV) - ], - async (world, { comp, owner, spender }) => new NumberV(await comp.methods.allowance(owner.val, spender.val).call()) - ), - - new Fetcher<{ comp: Comp, account: AddressV }, NumberV>(` - #### GetCurrentVotes - - * "Comp GetCurrentVotes account:
" - Returns the current Comp votes balance for an account - * E.g. "Comp GetCurrentVotes Geoff" - Returns the current Comp vote balance of Geoff - `, - "GetCurrentVotes", - [ - new Arg("comp", getComp, { implicit: true }), - new Arg("account", getAddressV), - ], - async (world, { comp, account }) => new NumberV(await comp.methods.getCurrentVotes(account.val).call()) - ), - - new Fetcher<{ comp: Comp, account: AddressV, blockNumber: NumberV }, NumberV>(` - #### GetPriorVotes - - * "Comp GetPriorVotes account:
blockBumber:" - Returns the current Comp votes balance at given block - * E.g. "Comp GetPriorVotes Geoff 5" - Returns the Comp vote balance for Geoff at block 5 - `, - "GetPriorVotes", - [ - new Arg("comp", getComp, { implicit: true }), - new Arg("account", getAddressV), - new Arg("blockNumber", getNumberV), - ], - async (world, { comp, account, blockNumber }) => new NumberV(await comp.methods.getPriorVotes(account.val, blockNumber.encode()).call()) - ), - - new Fetcher<{ comp: Comp, account: AddressV }, NumberV>(` - #### GetCurrentVotesBlock - - * "Comp GetCurrentVotesBlock account:
" - Returns the current Comp votes checkpoint block for an account - * E.g. "Comp GetCurrentVotesBlock Geoff" - Returns the current Comp votes checkpoint block for Geoff - `, - "GetCurrentVotesBlock", - [ - new Arg("comp", getComp, { implicit: true }), - new Arg("account", getAddressV), - ], - async (world, { comp, account }) => { - const numCheckpoints = Number(await comp.methods.numCheckpoints(account.val).call()); - const checkpoint = await comp.methods.checkpoints(account.val, numCheckpoints - 1).call(); - - return new NumberV(checkpoint.fromBlock); - } - ), - - new Fetcher<{ comp: Comp, account: AddressV }, NumberV>(` - #### VotesLength - - * "Comp VotesLength account:
" - Returns the Comp vote checkpoint array length - * E.g. "Comp VotesLength Geoff" - Returns the Comp vote checkpoint array length of Geoff - `, - "VotesLength", - [ - new Arg("comp", getComp, { implicit: true }), - new Arg("account", getAddressV), - ], - async (world, { comp, account }) => new NumberV(await comp.methods.numCheckpoints(account.val).call()) - ), - - new Fetcher<{ comp: Comp, account: AddressV }, ListV>(` - #### AllVotes - - * "Comp AllVotes account:
" - Returns information about all votes an account has had - * E.g. "Comp AllVotes Geoff" - Returns the Comp vote checkpoint array - `, - "AllVotes", - [ - new Arg("comp", getComp, { implicit: true }), - new Arg("account", getAddressV), - ], - async (world, { comp, account }) => { - const numCheckpoints = Number(await comp.methods.numCheckpoints(account.val).call()); - const checkpoints = await Promise.all(new Array(numCheckpoints).fill(undefined).map(async (_, i) => { - const {fromBlock, votes} = await comp.methods.checkpoints(account.val, i).call(); - - return new StringV(`Block ${fromBlock}: ${votes} vote${votes !== 1 ? "s" : ""}`); - })); - - return new ListV(checkpoints); - } - ) - ]; -} - -export async function getCompValue(world: World, event: Event): Promise { - return await getFetcherValue("Comp", compFetchers(), world, event); -} diff --git a/scenario/src/Value/ComptrollerImplValue.ts b/scenario/src/Value/ComptrollerImplValue.ts deleted file mode 100644 index a7678b969..000000000 --- a/scenario/src/Value/ComptrollerImplValue.ts +++ /dev/null @@ -1,35 +0,0 @@ -import {Event} from '../Event'; -import {World} from '../World'; -import {ComptrollerImpl} from '../Contract/ComptrollerImpl'; -import { - getAddressV -} from '../CoreValue'; -import { - AddressV, - Value -} from '../Value'; -import {Arg, Fetcher, getFetcherValue} from '../Command'; -import {getComptrollerImpl} from '../ContractLookup'; - -export async function getComptrollerImplAddress(world: World, comptrollerImpl: ComptrollerImpl): Promise { - return new AddressV(comptrollerImpl._address); -} - -export function comptrollerImplFetchers() { - return [ - new Fetcher<{comptrollerImpl: ComptrollerImpl}, AddressV>(` - #### Address - - * "ComptrollerImpl Address" - Returns address of comptroller implementation - `, - "Address", - [new Arg("comptrollerImpl", getComptrollerImpl)], - (world, {comptrollerImpl}) => getComptrollerImplAddress(world, comptrollerImpl), - {namePos: 1} - ) - ]; -} - -export async function getComptrollerImplValue(world: World, event: Event): Promise { - return await getFetcherValue("ComptrollerImpl", comptrollerImplFetchers(), world, event); -} diff --git a/scenario/src/Value/ComptrollerValue.ts b/scenario/src/Value/ComptrollerValue.ts deleted file mode 100644 index d60b29509..000000000 --- a/scenario/src/Value/ComptrollerValue.ts +++ /dev/null @@ -1,652 +0,0 @@ -import {Event} from '../Event'; -import {World} from '../World'; -import {Comptroller} from '../Contract/Comptroller'; -import {CToken} from '../Contract/CToken'; -import { - getAddressV, - getCoreValue, - getStringV, - getNumberV -} from '../CoreValue'; -import { - AddressV, - BoolV, - ListV, - NumberV, - StringV, - Value -} from '../Value'; -import {Arg, Fetcher, getFetcherValue} from '../Command'; -import {getComptroller} from '../ContractLookup'; -import {encodedNumber} from '../Encoding'; -import {getCTokenV} from '../Value/CTokenValue'; -import { encodeParameters, encodeABI } from '../Utils'; - -export async function getComptrollerAddress(world: World, comptroller: Comptroller): Promise { - return new AddressV(comptroller._address); -} - -export async function getLiquidity(world: World, comptroller: Comptroller, user: string): Promise { - let {0: error, 1: liquidity, 2: shortfall} = await comptroller.methods.getAccountLiquidity(user).call(); - if (Number(error) != 0) { - throw new Error(`Failed to compute account liquidity: error code = ${error}`); - } - return new NumberV(Number(liquidity) - Number(shortfall)); -} - -export async function getHypotheticalLiquidity(world: World, comptroller: Comptroller, account: string, asset: string, redeemTokens: encodedNumber, borrowAmount: encodedNumber): Promise { - let {0: error, 1: liquidity, 2: shortfall} = await comptroller.methods.getHypotheticalAccountLiquidity(account, asset, redeemTokens, borrowAmount).call(); - if (Number(error) != 0) { - throw new Error(`Failed to compute account hypothetical liquidity: error code = ${error}`); - } - return new NumberV(Number(liquidity) - Number(shortfall)); -} - -async function getPriceOracle(world: World, comptroller: Comptroller): Promise { - return new AddressV(await comptroller.methods.oracle().call()); -} - -async function getCloseFactor(world: World, comptroller: Comptroller): Promise { - return new NumberV(await comptroller.methods.closeFactorMantissa().call(), 1e18); -} - -async function getMaxAssets(world: World, comptroller: Comptroller): Promise { - return new NumberV(await comptroller.methods.maxAssets().call()); -} - -async function getLiquidationIncentive(world: World, comptroller: Comptroller): Promise { - return new NumberV(await comptroller.methods.liquidationIncentiveMantissa().call(), 1e18); -} - -async function getImplementation(world: World, comptroller: Comptroller): Promise { - return new AddressV(await comptroller.methods.comptrollerImplementation().call()); -} - -async function getBlockNumber(world: World, comptroller: Comptroller): Promise { - return new NumberV(await comptroller.methods.getBlockNumber().call()); -} - -async function getAdmin(world: World, comptroller: Comptroller): Promise { - return new AddressV(await comptroller.methods.admin().call()); -} - -async function getPendingAdmin(world: World, comptroller: Comptroller): Promise { - return new AddressV(await comptroller.methods.pendingAdmin().call()); -} - -async function getCollateralFactor(world: World, comptroller: Comptroller, cToken: CToken): Promise { - let {0: _isListed, 1: collateralFactorMantissa} = await comptroller.methods.markets(cToken._address).call(); - return new NumberV(collateralFactorMantissa, 1e18); -} - -async function membershipLength(world: World, comptroller: Comptroller, user: string): Promise { - return new NumberV(await comptroller.methods.membershipLength(user).call()); -} - -async function checkMembership(world: World, comptroller: Comptroller, user: string, cToken: CToken): Promise { - return new BoolV(await comptroller.methods.checkMembership(user, cToken._address).call()); -} - -async function getAssetsIn(world: World, comptroller: Comptroller, user: string): Promise { - let assetsList = await comptroller.methods.getAssetsIn(user).call(); - - return new ListV(assetsList.map((a) => new AddressV(a))); -} - -async function getCompMarkets(world: World, comptroller: Comptroller): Promise { - let mkts = await comptroller.methods.getCompMarkets().call(); - - return new ListV(mkts.map((a) => new AddressV(a))); -} - -async function checkListed(world: World, comptroller: Comptroller, cToken: CToken): Promise { - let {0: isListed, 1: _collateralFactorMantissa} = await comptroller.methods.markets(cToken._address).call(); - - return new BoolV(isListed); -} - -async function checkIsComped(world: World, comptroller: Comptroller, cToken: CToken): Promise { - let {0: isListed, 1: _collateralFactorMantissa, 2: isComped} = await comptroller.methods.markets(cToken._address).call(); - return new BoolV(isComped); -} - - -export function comptrollerFetchers() { - return [ - new Fetcher<{comptroller: Comptroller}, AddressV>(` - #### Address - - * "Comptroller Address" - Returns address of comptroller - `, - "Address", - [new Arg("comptroller", getComptroller, {implicit: true})], - (world, {comptroller}) => getComptrollerAddress(world, comptroller) - ), - new Fetcher<{comptroller: Comptroller, account: AddressV}, NumberV>(` - #### Liquidity - - * "Comptroller Liquidity " - Returns a given user's trued up liquidity - * E.g. "Comptroller Liquidity Geoff" - `, - "Liquidity", - [ - new Arg("comptroller", getComptroller, {implicit: true}), - new Arg("account", getAddressV) - ], - (world, {comptroller, account}) => getLiquidity(world, comptroller, account.val) - ), - new Fetcher<{comptroller: Comptroller, account: AddressV, action: StringV, amount: NumberV, cToken: CToken}, NumberV>(` - #### Hypothetical - - * "Comptroller Hypothetical " - Returns a given user's trued up liquidity given a hypothetical change in asset with redeeming a certain number of tokens and/or borrowing a given amount. - * E.g. "Comptroller Hypothetical Geoff Redeems 6.0 cZRX" - * E.g. "Comptroller Hypothetical Geoff Borrows 5.0 cZRX" - `, - "Hypothetical", - [ - new Arg("comptroller", getComptroller, {implicit: true}), - new Arg("account", getAddressV), - new Arg("action", getStringV), - new Arg("amount", getNumberV), - new Arg("cToken", getCTokenV) - ], - async (world, {comptroller, account, action, cToken, amount}) => { - let redeemTokens: NumberV; - let borrowAmount: NumberV; - - switch (action.val.toLowerCase()) { - case "borrows": - redeemTokens = new NumberV(0); - borrowAmount = amount; - break; - case "redeems": - redeemTokens = amount; - borrowAmount = new NumberV(0); - break; - default: - throw new Error(`Unknown hypothetical: ${action.val}`); - } - - return await getHypotheticalLiquidity(world, comptroller, account.val, cToken._address, redeemTokens.encode(), borrowAmount.encode()); - } - ), - new Fetcher<{comptroller: Comptroller}, AddressV>(` - #### Admin - - * "Comptroller Admin" - Returns the Comptrollers's admin - * E.g. "Comptroller Admin" - `, - "Admin", - [new Arg("comptroller", getComptroller, {implicit: true})], - (world, {comptroller}) => getAdmin(world, comptroller) - ), - new Fetcher<{comptroller: Comptroller}, AddressV>(` - #### PendingAdmin - - * "Comptroller PendingAdmin" - Returns the pending admin of the Comptroller - * E.g. "Comptroller PendingAdmin" - Returns Comptroller's pending admin - `, - "PendingAdmin", - [ - new Arg("comptroller", getComptroller, {implicit: true}), - ], - (world, {comptroller}) => getPendingAdmin(world, comptroller) - ), - new Fetcher<{comptroller: Comptroller}, AddressV>(` - #### PriceOracle - - * "Comptroller PriceOracle" - Returns the Comptrollers's price oracle - * E.g. "Comptroller PriceOracle" - `, - "PriceOracle", - [new Arg("comptroller", getComptroller, {implicit: true})], - (world, {comptroller}) => getPriceOracle(world, comptroller) - ), - new Fetcher<{comptroller: Comptroller}, NumberV>(` - #### CloseFactor - - * "Comptroller CloseFactor" - Returns the Comptrollers's close factor - * E.g. "Comptroller CloseFactor" - `, - "CloseFactor", - [new Arg("comptroller", getComptroller, {implicit: true})], - (world, {comptroller}) => getCloseFactor(world, comptroller) - ), - new Fetcher<{comptroller: Comptroller}, NumberV>(` - #### MaxAssets - - * "Comptroller MaxAssets" - Returns the Comptrollers's max assets - * E.g. "Comptroller MaxAssets" - `, - "MaxAssets", - [new Arg("comptroller", getComptroller, {implicit: true})], - (world, {comptroller}) => getMaxAssets(world, comptroller) - ), - new Fetcher<{comptroller: Comptroller}, NumberV>(` - #### LiquidationIncentive - - * "Comptroller LiquidationIncentive" - Returns the Comptrollers's liquidation incentive - * E.g. "Comptroller LiquidationIncentive" - `, - "LiquidationIncentive", - [new Arg("comptroller", getComptroller, {implicit: true})], - (world, {comptroller}) => getLiquidationIncentive(world, comptroller) - ), - new Fetcher<{comptroller: Comptroller}, AddressV>(` - #### Implementation - - * "Comptroller Implementation" - Returns the Comptrollers's implementation - * E.g. "Comptroller Implementation" - `, - "Implementation", - [new Arg("comptroller", getComptroller, {implicit: true})], - (world, {comptroller}) => getImplementation(world, comptroller) - ), - new Fetcher<{comptroller: Comptroller}, NumberV>(` - #### BlockNumber - - * "Comptroller BlockNumber" - Returns the Comptrollers's mocked block number (for scenario runner) - * E.g. "Comptroller BlockNumber" - `, - "BlockNumber", - [new Arg("comptroller", getComptroller, {implicit: true})], - (world, {comptroller}) => getBlockNumber(world, comptroller) - ), - new Fetcher<{comptroller: Comptroller, cToken: CToken}, NumberV>(` - #### CollateralFactor - - * "Comptroller CollateralFactor " - Returns the collateralFactor associated with a given asset - * E.g. "Comptroller CollateralFactor cZRX" - `, - "CollateralFactor", - [ - new Arg("comptroller", getComptroller, {implicit: true}), - new Arg("cToken", getCTokenV) - ], - (world, {comptroller, cToken}) => getCollateralFactor(world, comptroller, cToken) - ), - new Fetcher<{comptroller: Comptroller, account: AddressV}, NumberV>(` - #### MembershipLength - - * "Comptroller MembershipLength " - Returns a given user's length of membership - * E.g. "Comptroller MembershipLength Geoff" - `, - "MembershipLength", - [ - new Arg("comptroller", getComptroller, {implicit: true}), - new Arg("account", getAddressV) - ], - (world, {comptroller, account}) => membershipLength(world, comptroller, account.val) - ), - new Fetcher<{comptroller: Comptroller, account: AddressV, cToken: CToken}, BoolV>(` - #### CheckMembership - - * "Comptroller CheckMembership " - Returns one if user is in asset, zero otherwise. - * E.g. "Comptroller CheckMembership Geoff cZRX" - `, - "CheckMembership", - [ - new Arg("comptroller", getComptroller, {implicit: true}), - new Arg("account", getAddressV), - new Arg("cToken", getCTokenV) - ], - (world, {comptroller, account, cToken}) => checkMembership(world, comptroller, account.val, cToken) - ), - new Fetcher<{comptroller: Comptroller, account: AddressV}, ListV>(` - #### AssetsIn - - * "Comptroller AssetsIn " - Returns the assets a user is in - * E.g. "Comptroller AssetsIn Geoff" - `, - "AssetsIn", - [ - new Arg("comptroller", getComptroller, {implicit: true}), - new Arg("account", getAddressV) - ], - (world, {comptroller, account}) => getAssetsIn(world, comptroller, account.val) - ), - new Fetcher<{comptroller: Comptroller, cToken: CToken}, BoolV>(` - #### CheckListed - - * "Comptroller CheckListed " - Returns true if market is listed, false otherwise. - * E.g. "Comptroller CheckListed cZRX" - `, - "CheckListed", - [ - new Arg("comptroller", getComptroller, {implicit: true}), - new Arg("cToken", getCTokenV) - ], - (world, {comptroller, cToken}) => checkListed(world, comptroller, cToken) - ), - new Fetcher<{comptroller: Comptroller, cToken: CToken}, BoolV>(` - #### CheckIsComped - - * "Comptroller CheckIsComped " - Returns true if market is listed, false otherwise. - * E.g. "Comptroller CheckIsComped cZRX" - `, - "CheckIsComped", - [ - new Arg("comptroller", getComptroller, {implicit: true}), - new Arg("cToken", getCTokenV) - ], - (world, {comptroller, cToken}) => checkIsComped(world, comptroller, cToken) - ), - new Fetcher<{comptroller: Comptroller}, AddressV>(` - #### PauseGuardian - - * "PauseGuardian" - Returns the Comptrollers's PauseGuardian - * E.g. "Comptroller PauseGuardian" - `, - "PauseGuardian", - [ - new Arg("comptroller", getComptroller, {implicit: true}) - ], - async (world, {comptroller}) => new AddressV(await comptroller.methods.pauseGuardian().call()) - ), - - new Fetcher<{comptroller: Comptroller}, BoolV>(` - #### _MintGuardianPaused - - * "_MintGuardianPaused" - Returns the Comptrollers's original global Mint paused status - * E.g. "Comptroller _MintGuardianPaused" - `, - "_MintGuardianPaused", - [new Arg("comptroller", getComptroller, {implicit: true})], - async (world, {comptroller}) => new BoolV(await comptroller.methods._mintGuardianPaused().call()) - ), - new Fetcher<{comptroller: Comptroller}, BoolV>(` - #### _BorrowGuardianPaused - - * "_BorrowGuardianPaused" - Returns the Comptrollers's original global Borrow paused status - * E.g. "Comptroller _BorrowGuardianPaused" - `, - "_BorrowGuardianPaused", - [new Arg("comptroller", getComptroller, {implicit: true})], - async (world, {comptroller}) => new BoolV(await comptroller.methods._borrowGuardianPaused().call()) - ), - - new Fetcher<{comptroller: Comptroller}, BoolV>(` - #### TransferGuardianPaused - - * "TransferGuardianPaused" - Returns the Comptrollers's Transfer paused status - * E.g. "Comptroller TransferGuardianPaused" - `, - "TransferGuardianPaused", - [new Arg("comptroller", getComptroller, {implicit: true})], - async (world, {comptroller}) => new BoolV(await comptroller.methods.transferGuardianPaused().call()) - ), - new Fetcher<{comptroller: Comptroller}, BoolV>(` - #### SeizeGuardianPaused - - * "SeizeGuardianPaused" - Returns the Comptrollers's Seize paused status - * E.g. "Comptroller SeizeGuardianPaused" - `, - "SeizeGuardianPaused", - [new Arg("comptroller", getComptroller, {implicit: true})], - async (world, {comptroller}) => new BoolV(await comptroller.methods.seizeGuardianPaused().call()) - ), - - new Fetcher<{comptroller: Comptroller, cToken: CToken}, BoolV>(` - #### MintGuardianMarketPaused - - * "MintGuardianMarketPaused" - Returns the Comptrollers's Mint paused status in market - * E.g. "Comptroller MintGuardianMarketPaused cREP" - `, - "MintGuardianMarketPaused", - [ - new Arg("comptroller", getComptroller, {implicit: true}), - new Arg("cToken", getCTokenV) - ], - async (world, {comptroller, cToken}) => new BoolV(await comptroller.methods.mintGuardianPaused(cToken._address).call()) - ), - new Fetcher<{comptroller: Comptroller, cToken: CToken}, BoolV>(` - #### BorrowGuardianMarketPaused - - * "BorrowGuardianMarketPaused" - Returns the Comptrollers's Borrow paused status in market - * E.g. "Comptroller BorrowGuardianMarketPaused cREP" - `, - "BorrowGuardianMarketPaused", - [ - new Arg("comptroller", getComptroller, {implicit: true}), - new Arg("cToken", getCTokenV) - ], - async (world, {comptroller, cToken}) => new BoolV(await comptroller.methods.borrowGuardianPaused(cToken._address).call()) - ), - - new Fetcher<{comptroller: Comptroller}, ListV>(` - #### GetCompMarkets - - * "GetCompMarkets" - Returns an array of the currently enabled Comp markets. To use the auto-gen array getter compMarkets(uint), use CompMarkets - * E.g. "Comptroller GetCompMarkets" - `, - "GetCompMarkets", - [new Arg("comptroller", getComptroller, {implicit: true})], - async(world, {comptroller}) => await getCompMarkets(world, comptroller) - ), - - new Fetcher<{comptroller: Comptroller}, NumberV>(` - #### CompRate - - * "CompRate" - Returns the current comp rate. - * E.g. "Comptroller CompRate" - `, - "CompRate", - [new Arg("comptroller", getComptroller, {implicit: true})], - async(world, {comptroller}) => new NumberV(await comptroller.methods.compRate().call()) - ), - - new Fetcher<{comptroller: Comptroller, signature: StringV, callArgs: StringV[]}, NumberV>(` - #### CallNum - - * "CallNum signature: ...callArgs" - Simple direct call method - * E.g. "Comptroller CallNum \"compSpeeds(address)\" (Address Coburn)" - `, - "CallNum", - [ - new Arg("comptroller", getComptroller, {implicit: true}), - new Arg("signature", getStringV), - new Arg("callArgs", getCoreValue, {variadic: true, mapped: true}) - ], - async (world, {comptroller, signature, callArgs}) => { - const fnData = encodeABI(world, signature.val, callArgs.map(a => a.val)); - const res = await world.web3.eth.call({ - to: comptroller._address, - data: fnData - }) - const resNum : any = world.web3.eth.abi.decodeParameter('uint256',res); - return new NumberV(resNum); - } - ), - new Fetcher<{comptroller: Comptroller, CToken: CToken, key: StringV}, NumberV>(` - #### CompSupplyState(address) - - * "Comptroller CompBorrowState cZRX "index" - `, - "CompSupplyState", - [ - new Arg("comptroller", getComptroller, {implicit: true}), - new Arg("CToken", getCTokenV), - new Arg("key", getStringV), - ], - async (world, {comptroller, CToken, key}) => { - const result = await comptroller.methods.compSupplyState(CToken._address).call(); - return new NumberV(result[key.val]); - } - ), - new Fetcher<{comptroller: Comptroller, CToken: CToken, key: StringV}, NumberV>(` - #### CompBorrowState(address) - - * "Comptroller CompBorrowState cZRX "index" - `, - "CompBorrowState", - [ - new Arg("comptroller", getComptroller, {implicit: true}), - new Arg("CToken", getCTokenV), - new Arg("key", getStringV), - ], - async (world, {comptroller, CToken, key}) => { - const result = await comptroller.methods.compBorrowState(CToken._address).call(); - return new NumberV(result[key.val]); - } - ), - new Fetcher<{comptroller: Comptroller, account: AddressV, key: StringV}, NumberV>(` - #### CompAccrued(address) - - * "Comptroller CompAccrued Coburn - `, - "CompAccrued", - [ - new Arg("comptroller", getComptroller, {implicit: true}), - new Arg("account", getAddressV), - ], - async (world, {comptroller,account}) => { - const result = await comptroller.methods.compAccrued(account.val).call(); - return new NumberV(result); - } - ), - new Fetcher<{comptroller: Comptroller, account: AddressV, key: StringV}, NumberV>(` - #### CompReceivable(address) - - * "Comptroller CompReceivable Coburn - `, - "CompReceivable", - [ - new Arg("comptroller", getComptroller, {implicit: true}), - new Arg("account", getAddressV), - ], - async (world, {comptroller,account}) => { - const result = await comptroller.methods.compReceivable(account.val).call(); - return new NumberV(result); - } - ), - new Fetcher<{comptroller: Comptroller, CToken: CToken, account: AddressV}, NumberV>(` - #### compSupplierIndex - - * "Comptroller CompSupplierIndex cZRX Coburn - `, - "CompSupplierIndex", - [ - new Arg("comptroller", getComptroller, {implicit: true}), - new Arg("CToken", getCTokenV), - new Arg("account", getAddressV), - ], - async (world, {comptroller, CToken, account}) => { - return new NumberV(await comptroller.methods.compSupplierIndex(CToken._address, account.val).call()); - } - ), - new Fetcher<{comptroller: Comptroller, CToken: CToken, account: AddressV}, NumberV>(` - #### CompBorrowerIndex - - * "Comptroller CompBorrowerIndex cZRX Coburn - `, - "CompBorrowerIndex", - [ - new Arg("comptroller", getComptroller, {implicit: true}), - new Arg("CToken", getCTokenV), - new Arg("account", getAddressV), - ], - async (world, {comptroller, CToken, account}) => { - return new NumberV(await comptroller.methods.compBorrowerIndex(CToken._address, account.val).call()); - } - ), - new Fetcher<{comptroller: Comptroller, CToken: CToken}, NumberV>(` - #### CompSpeed - - * "Comptroller CompSpeed cZRX - `, - "CompSpeed", - [ - new Arg("comptroller", getComptroller, {implicit: true}), - new Arg("CToken", getCTokenV), - ], - async (world, {comptroller, CToken}) => { - return new NumberV(await comptroller.methods.compSpeeds(CToken._address).call()); - } - ), - new Fetcher<{comptroller: Comptroller, CToken: CToken}, NumberV>(` - #### CompSupplySpeed - - * "Comptroller CompSupplySpeed cZRX - `, - "CompSupplySpeed", - [ - new Arg("comptroller", getComptroller, {implicit: true}), - new Arg("CToken", getCTokenV), - ], - async (world, {comptroller, CToken}) => { - return new NumberV(await comptroller.methods.compSupplySpeeds(CToken._address).call()); - } - ), - new Fetcher<{comptroller: Comptroller, CToken: CToken}, NumberV>(` - #### CompBorrowSpeed - - * "Comptroller CompBorrowSpeed cZRX - `, - "CompBorrowSpeed", - [ - new Arg("comptroller", getComptroller, {implicit: true}), - new Arg("CToken", getCTokenV), - ], - async (world, {comptroller, CToken}) => { - return new NumberV(await comptroller.methods.compBorrowSpeeds(CToken._address).call()); - } - ), - new Fetcher<{comptroller: Comptroller}, AddressV>(` - #### BorrowCapGuardian - - * "BorrowCapGuardian" - Returns the Comptrollers's BorrowCapGuardian - * E.g. "Comptroller BorrowCapGuardian" - `, - "BorrowCapGuardian", - [ - new Arg("comptroller", getComptroller, {implicit: true}) - ], - async (world, {comptroller}) => new AddressV(await comptroller.methods.borrowCapGuardian().call()) - ), - new Fetcher<{comptroller: Comptroller, CToken: CToken}, NumberV>(` - #### BorrowCaps - - * "Comptroller BorrowCaps cZRX - `, - "BorrowCaps", - [ - new Arg("comptroller", getComptroller, {implicit: true}), - new Arg("CToken", getCTokenV), - ], - async (world, {comptroller, CToken}) => { - return new NumberV(await comptroller.methods.borrowCaps(CToken._address).call()); - } - ), - new Fetcher<{comptroller: Comptroller, CToken: CToken}, NumberV>(` - #### IsDeprecated - - * "Comptroller IsDeprecated cZRX - `, - "IsDeprecated", - [ - new Arg("comptroller", getComptroller, {implicit: true}), - new Arg("CToken", getCTokenV), - ], - async (world, {comptroller, CToken}) => { - return new NumberV(await comptroller.methods.isDeprecated(CToken._address).call()); - } - ), - new Fetcher<{ comptroller: Comptroller, cToken: CToken }, NumberV>(` - #### SupplyCaps - * "Comptroller SupplyCaps vZRX - `, - "SupplyCaps", - [ - new Arg("comptroller", getComptroller, { implicit: true }), - new Arg("VToken", getCTokenV), - ], - async (world, { comptroller, cToken }) => { - return new NumberV(await comptroller.methods.supplyCaps(cToken._address).call()); - } - ) - ]; -} - -export async function getComptrollerValue(world: World, event: Event): Promise { - return await getFetcherValue("Comptroller", comptrollerFetchers(), world, event); -} diff --git a/scenario/src/Value/Erc20Value.ts b/scenario/src/Value/Erc20Value.ts deleted file mode 100644 index 8f31716b0..000000000 --- a/scenario/src/Value/Erc20Value.ts +++ /dev/null @@ -1,160 +0,0 @@ -import {Event} from '../Event'; -import {World} from '../World'; -import {Erc20} from '../Contract/Erc20'; -import {getErc20Address, getWorldContractByAddress} from '../ContractLookup'; -import { - getAddressV, - getCoreValue, - mapValue, -} from '../CoreValue'; -import {Arg, Fetcher, getFetcherValue} from '../Command'; -import { - AddressV, - NumberV, - Value, - StringV -} from '../Value'; - -export async function getErc20Name(world: World, erc20: Erc20): Promise { - return new StringV(await erc20.methods.name().call()); -} - -export async function getErc20Symbol(world: World, erc20: Erc20): Promise { - return new StringV(await erc20.methods.symbol().call()); -} - -export async function getErc20Decimals(world: World, erc20: Erc20): Promise { - return new NumberV(await erc20.methods.decimals().call()); -} - -async function getTotalSupply(world: World, erc20: Erc20): Promise { - return new NumberV(await erc20.methods.totalSupply().call()); -} - -async function getTokenBalance(world: World, erc20: Erc20, address: string): Promise { - return new NumberV(await erc20.methods.balanceOf(address).call()); -} - -async function getAllowance(world: World, erc20: Erc20, owner: string, spender: string): Promise { - return new NumberV(await erc20.methods.allowance(owner, spender).call()); -} - -export async function getErc20V(world: World, event: Event): Promise { - const address = await mapValue( - world, - event, - (str) => new AddressV(getErc20Address(world, str)), - getCoreValue, - AddressV - ); - - return getWorldContractByAddress(world, address.val); -} - -export function erc20Fetchers() { - return [ - new Fetcher<{erc20: Erc20}, AddressV>(` - #### Address - - * "Erc20 Address" - Returns address of ERC-20 contract - * E.g. "Erc20 ZRX Address" - Returns ZRX's address - `, - "Address", - [ - new Arg("erc20", getErc20V) - ], - async (world, {erc20}) => new AddressV(erc20._address), - {namePos: 1} - ), - new Fetcher<{erc20: Erc20}, StringV>(` - #### Name - - * "Erc20 Name" - Returns name of ERC-20 contract - * E.g. "Erc20 ZRX Name" - Returns ZRX's name - `, - "Name", - [ - new Arg("erc20", getErc20V) - ], - (world, {erc20}) => getErc20Name(world, erc20), - {namePos: 1} - ), - new Fetcher<{erc20: Erc20}, StringV>(` - #### Symbol - - * "Erc20 Symbol" - Returns symbol of ERC-20 contract - * E.g. "Erc20 ZRX Symbol" - Returns ZRX's symbol - `, - "Symbol", - [ - new Arg("erc20", getErc20V) - ], - (world, {erc20}) => getErc20Symbol(world, erc20), - {namePos: 1} - ), - new Fetcher<{erc20: Erc20}, NumberV>(` - #### Decimals - - * "Erc20 Decimals" - Returns number of decimals in ERC-20 contract - * E.g. "Erc20 ZRX Decimals" - Returns ZRX's decimals - `, - "Decimals", - [ - new Arg("erc20", getErc20V) - ], - (world, {erc20}) => getErc20Decimals(world, erc20), - {namePos: 1} - ), - new Fetcher<{erc20: Erc20}, NumberV>(` - #### TotalSupply - - * "Erc20 TotalSupply" - Returns the ERC-20 token's total supply - * E.g. "Erc20 ZRX TotalSupply" - * E.g. "Erc20 cZRX TotalSupply" - `, - "TotalSupply", - [ - new Arg("erc20", getErc20V) - ], - (world, {erc20}) => getTotalSupply(world, erc20), - {namePos: 1} - ), - new Fetcher<{erc20: Erc20, address: AddressV}, NumberV>(` - #### TokenBalance - - * "Erc20 TokenBalance
" - Returns the ERC-20 token balance of a given address - * E.g. "Erc20 ZRX TokenBalance Geoff" - Returns a user's ZRX balance - * E.g. "Erc20 cZRX TokenBalance Geoff" - Returns a user's cZRX balance - * E.g. "Erc20 ZRX TokenBalance cZRX" - Returns cZRX's ZRX balance - `, - "TokenBalance", - [ - new Arg("erc20", getErc20V), - new Arg("address", getAddressV) - ], - (world, {erc20, address}) => getTokenBalance(world, erc20, address.val), - {namePos: 1} - ), - new Fetcher<{erc20: Erc20, owner: AddressV, spender: AddressV}, NumberV>(` - #### Allowance - - * "Erc20 Allowance owner:
spender:
" - Returns the ERC-20 allowance from owner to spender - * E.g. "Erc20 ZRX Allowance Geoff Torrey" - Returns the ZRX allowance of Geoff to Torrey - * E.g. "Erc20 cZRX Allowance Geoff Coburn" - Returns the cZRX allowance of Geoff to Coburn - * E.g. "Erc20 ZRX Allowance Geoff cZRX" - Returns the ZRX allowance of Geoff to the cZRX cToken - `, - "Allowance", - [ - new Arg("erc20", getErc20V), - new Arg("owner", getAddressV), - new Arg("spender", getAddressV) - ], - (world, {erc20, owner, spender}) => getAllowance(world, erc20, owner.val, spender.val), - {namePos: 1} - ) - ]; -} - -export async function getErc20Value(world: World, event: Event): Promise { - return await getFetcherValue("Erc20", erc20Fetchers(), world, event); -} diff --git a/scenario/src/Value/InterestRateModelValue.ts b/scenario/src/Value/InterestRateModelValue.ts deleted file mode 100644 index e4361d27b..000000000 --- a/scenario/src/Value/InterestRateModelValue.ts +++ /dev/null @@ -1,60 +0,0 @@ -import {Event} from '../Event'; -import {World} from '../World'; -import {InterestRateModel} from '../Contract/InterestRateModel'; -import { - getAddressV, - getNumberV -} from '../CoreValue'; -import { - AddressV, - NumberV, - Value} from '../Value'; -import {Arg, Fetcher, getFetcherValue} from '../Command'; -import {getInterestRateModel} from '../ContractLookup'; - -export async function getInterestRateModelAddress(world: World, interestRateModel: InterestRateModel): Promise { - return new AddressV(interestRateModel._address); -} - -export async function getBorrowRate(world: World, interestRateModel: InterestRateModel, cash: NumberV, borrows: NumberV, reserves: NumberV): Promise { - return new NumberV(await interestRateModel.methods.getBorrowRate(cash.encode(), borrows.encode(), reserves.encode()).call(), 1.0e18 / 2102400); -} - -export function interestRateModelFetchers() { - return [ - new Fetcher<{interestRateModel: InterestRateModel}, AddressV>(` - #### Address - - * " Address" - Gets the address of the interest rate model - * E.g. "InterestRateModel MyInterestRateModel Address" - `, - "Address", - [ - new Arg("interestRateModel", getInterestRateModel) - ], - (world, {interestRateModel}) => getInterestRateModelAddress(world, interestRateModel), - {namePos: 1} - ), - - new Fetcher<{interestRateModel: InterestRateModel, cash: NumberV, borrows: NumberV, reserves: NumberV}, NumberV>(` - #### BorrowRate - - * " BorrowRate" - Gets the borrow rate of the interest rate model - * E.g. "InterestRateModel MyInterestRateModel BorrowRate 0 10 0" - `, - "BorrowRate", - [ - new Arg("interestRateModel", getInterestRateModel), - new Arg("cash", getNumberV), - new Arg("borrows", getNumberV), - new Arg("reserves", getNumberV) - ], - (world, {interestRateModel, cash, borrows, reserves}) => getBorrowRate(world, interestRateModel, cash, borrows, reserves), - {namePos: 1} - ) - ]; -} - -export async function getInterestRateModelValue(world: World, event: Event): Promise { - return await getFetcherValue("InterestRateModel", interestRateModelFetchers(), world, event); -} diff --git a/scenario/src/Value/MCDValue.ts b/scenario/src/Value/MCDValue.ts deleted file mode 100644 index e970226c6..000000000 --- a/scenario/src/Value/MCDValue.ts +++ /dev/null @@ -1,65 +0,0 @@ -import { Event } from '../Event'; -import { World } from '../World'; -import { getContract } from '../Contract'; -import { Pot } from '../Contract/Pot'; -import { Vat } from '../Contract/Vat'; -import { - getAddressV, - getCoreValue, - getStringV -} from '../CoreValue'; -import { Arg, Fetcher, getFetcherValue } from '../Command'; -import { - AddressV, - NumberV, - Value, - StringV -} from '../Value'; - -export function mcdFetchers() { - return [ - new Fetcher<{ potAddress: AddressV, method: StringV, args: StringV[] }, Value>(` - #### PotAt - - * "MCD PotAt " - * E.g. "MCD PotAt "0xPotAddress" "pie" (CToken cDai Address)" - `, - "PotAt", - [ - new Arg("potAddress", getAddressV), - new Arg("method", getStringV), - new Arg('args', getCoreValue, { variadic: true, mapped: true }) - ], - async (world, { potAddress, method, args }) => { - const PotContract = getContract('PotLike'); - const pot = await PotContract.at(world, potAddress.val); - const argStrings = args.map(arg => arg.val); - return new NumberV(await pot.methods[method.val](...argStrings).call()) - } - ), - - new Fetcher<{ vatAddress: AddressV, method: StringV, args: StringV[] }, Value>(` - #### VatAt - - * "MCD VatAt " - * E.g. "MCD VatAt "0xVatAddress" "dai" (CToken cDai Address)" - `, - "VatAt", - [ - new Arg("vatAddress", getAddressV), - new Arg("method", getStringV), - new Arg('args', getCoreValue, { variadic: true, mapped: true }) - ], - async (world, { vatAddress, method, args }) => { - const VatContract = getContract('VatLike'); - const vat = await VatContract.at(world, vatAddress.val); - const argStrings = args.map(arg => arg.val); - return new NumberV(await vat.methods[method.val](...argStrings).call()) - } - ) - ]; -} - -export async function getMCDValue(world: World, event: Event): Promise { - return await getFetcherValue("MCD", mcdFetchers(), world, event); -} diff --git a/scenario/src/Value/PriceOracleProxyValue.ts b/scenario/src/Value/PriceOracleProxyValue.ts deleted file mode 100644 index cb1143806..000000000 --- a/scenario/src/Value/PriceOracleProxyValue.ts +++ /dev/null @@ -1,67 +0,0 @@ -import {Event} from '../Event'; -import {World} from '../World'; -import {PriceOracleProxy} from '../Contract/PriceOracleProxy'; -import { - getAddressV -} from '../CoreValue'; -import { - AddressV, - NumberV, - Value} from '../Value'; -import {Arg, Fetcher, getFetcherValue} from '../Command'; -import {getPriceOracleProxy} from '../ContractLookup'; - -export async function getPriceOracleProxyAddress(world: World, priceOracleProxy: PriceOracleProxy): Promise { - return new AddressV(priceOracleProxy._address); -} - -export async function getV1PriceOracle(world: World, priceOracleProxy: PriceOracleProxy): Promise { - return new AddressV(await priceOracleProxy.methods.v1PriceOracle().call()); -} - -async function getPrice(world: World, priceOracleProxy: PriceOracleProxy, asset: string): Promise { - return new NumberV(await priceOracleProxy.methods.getUnderlyingPrice(asset).call()); -} - -export function priceOracleProxyFetchers() { - return [ - new Fetcher<{priceOracleProxy: PriceOracleProxy}, AddressV>(` - #### V1PriceOracle - - * "V1PriceOracle" - Gets the address of the v1 Price - `, - "V1PriceOracle", - [ - new Arg("priceOracleProxy", getPriceOracleProxy, {implicit: true}) - ], - (world, {priceOracleProxy}) => getV1PriceOracle(world, priceOracleProxy) - ), - new Fetcher<{priceOracleProxy: PriceOracleProxy}, AddressV>(` - #### Address - - * "Address" - Gets the address of the global price oracle - `, - "Address", - [ - new Arg("priceOracleProxy", getPriceOracleProxy, {implicit: true}) - ], - (world, {priceOracleProxy}) => getPriceOracleProxyAddress(world, priceOracleProxy) - ), - new Fetcher<{priceOracle: PriceOracleProxy, asset: AddressV}, NumberV>(` - #### Price - - * "Price asset:
" - Gets the price of the given asset - `, - "Price", - [ - new Arg("priceOracle", getPriceOracleProxy, {implicit: true}), - new Arg("asset", getAddressV) - ], - (world, {priceOracle, asset}) => getPrice(world, priceOracle, asset.val) - ) - ]; -} - -export async function getPriceOracleProxyValue(world: World, event: Event): Promise { - return await getFetcherValue("PriceOracle", priceOracleProxyFetchers(), world, event); -} diff --git a/scenario/src/Value/PriceOracleValue.ts b/scenario/src/Value/PriceOracleValue.ts deleted file mode 100644 index f954bec9d..000000000 --- a/scenario/src/Value/PriceOracleValue.ts +++ /dev/null @@ -1,52 +0,0 @@ -import {Event} from '../Event'; -import {World} from '../World'; -import {PriceOracle} from '../Contract/PriceOracle'; -import { - getAddressV -} from '../CoreValue'; -import { - AddressV, - NumberV, - Value} from '../Value'; -import {Arg, Fetcher, getFetcherValue} from '../Command'; -import {getPriceOracle} from '../ContractLookup'; - -async function getPrice(world: World, priceOracle: PriceOracle, asset: string): Promise { - return new NumberV(await priceOracle.methods.assetPrices(asset).call()); -} - -export async function getPriceOracleAddress(world: World, priceOracle: PriceOracle): Promise { - return new AddressV(priceOracle._address); -} - -export function priceOracleFetchers() { - return [ - new Fetcher<{priceOracle: PriceOracle}, AddressV>(` - #### Address - - * "Address" - Gets the address of the global price oracle - `, - "Address", - [ - new Arg("priceOracle", getPriceOracle, {implicit: true}) - ], - (world, {priceOracle}) => getPriceOracleAddress(world, priceOracle) - ), - new Fetcher<{priceOracle: PriceOracle, asset: AddressV}, NumberV>(` - #### Price - - * "Price asset:
" - Gets the price of the given asset - `, - "Price", - [ - new Arg("priceOracle", getPriceOracle, {implicit: true}), - new Arg("asset", getAddressV,) - ], - (world, {priceOracle, asset}) => getPrice(world, priceOracle, asset.val) - ) - ]; -} - -export async function getPriceOracleValue(world: World, event: Event): Promise { - return await getFetcherValue("PriceOracle", priceOracleFetchers(), world, event); -} diff --git a/scenario/src/Value/UnitrollerValue.ts b/scenario/src/Value/UnitrollerValue.ts deleted file mode 100644 index e57c3887e..000000000 --- a/scenario/src/Value/UnitrollerValue.ts +++ /dev/null @@ -1,89 +0,0 @@ -import { Event } from '../Event'; -import { World } from '../World'; -import { Unitroller } from '../Contract/Unitroller'; -import { AddressV, Value } from '../Value'; -import { Arg, Fetcher, getFetcherValue } from '../Command'; -import { getUnitroller } from '../ContractLookup'; - -export async function getUnitrollerAddress(world: World, unitroller: Unitroller): Promise { - return new AddressV(unitroller._address); -} - -async function getUnitrollerAdmin(world: World, unitroller: Unitroller): Promise { - return new AddressV(await unitroller.methods.admin().call()); -} - -async function getUnitrollerPendingAdmin(world: World, unitroller: Unitroller): Promise { - return new AddressV(await unitroller.methods.pendingAdmin().call()); -} - -async function getComptrollerImplementation(world: World, unitroller: Unitroller): Promise { - return new AddressV(await unitroller.methods.comptrollerImplementation().call()); -} - -async function getPendingComptrollerImplementation(world: World, unitroller: Unitroller): Promise { - return new AddressV(await unitroller.methods.pendingComptrollerImplementation().call()); -} - -export function unitrollerFetchers() { - return [ - new Fetcher<{ unitroller: Unitroller }, AddressV>( - ` - #### Address - - * "Unitroller Address" - Returns address of unitroller - `, - 'Address', - [new Arg('unitroller', getUnitroller, { implicit: true })], - (world, { unitroller }) => getUnitrollerAddress(world, unitroller) - ), - new Fetcher<{ unitroller: Unitroller }, AddressV>( - ` - #### Admin - - * "Unitroller Admin" - Returns the admin of Unitroller contract - * E.g. "Unitroller Admin" - Returns address of admin - `, - 'Admin', - [new Arg('unitroller', getUnitroller, { implicit: true })], - (world, { unitroller }) => getUnitrollerAdmin(world, unitroller) - ), - new Fetcher<{ unitroller: Unitroller }, AddressV>( - ` - #### PendingAdmin - - * "Unitroller PendingAdmin" - Returns the pending admin of Unitroller contract - * E.g. "Unitroller PendingAdmin" - Returns address of pendingAdmin - `, - 'PendingAdmin', - [new Arg('unitroller', getUnitroller, { implicit: true })], - (world, { unitroller }) => getUnitrollerPendingAdmin(world, unitroller) - ), - new Fetcher<{ unitroller: Unitroller }, AddressV>( - ` - #### Implementation - - * "Unitroller Implementation" - Returns the Implementation of Unitroller contract - * E.g. "Unitroller Implementation" - Returns address of comptrollerImplentation - `, - 'Implementation', - [new Arg('unitroller', getUnitroller, { implicit: true })], - (world, { unitroller }) => getComptrollerImplementation(world, unitroller) - ), - new Fetcher<{ unitroller: Unitroller }, AddressV>( - ` - #### PendingImplementation - - * "Unitroller PendingImplementation" - Returns the pending implementation of Unitroller contract - * E.g. "Unitroller PendingImplementation" - Returns address of pendingComptrollerImplementation - `, - 'PendingImplementation', - [new Arg('unitroller', getUnitroller, { implicit: true })], - (world, { unitroller }) => getPendingComptrollerImplementation(world, unitroller) - ) - ]; -} - -export async function getUnitrollerValue(world: World, event: Event): Promise { - return await getFetcherValue('Unitroller', unitrollerFetchers(), world, event); -} diff --git a/scenario/src/Value/UserValue.ts b/scenario/src/Value/UserValue.ts deleted file mode 100644 index df183ccf1..000000000 --- a/scenario/src/Value/UserValue.ts +++ /dev/null @@ -1,36 +0,0 @@ -import {Event} from '../Event'; -import {World} from '../World'; -import { - getAddressV -} from '../CoreValue'; -import {Arg, Fetcher, getFetcherValue} from '../Command'; -import { - AddressV, - Value -} from '../Value'; - -async function getUserAddress(world: World, user: string): Promise { - return new AddressV(user); -} - -export function userFetchers() { - return [ - new Fetcher<{account: AddressV}, AddressV>(` - #### Address - - * "User Address" - Returns address of user - * E.g. "User Geoff Address" - Returns Geoff's address - `, - "Address", - [ - new Arg("account", getAddressV) - ], - async (world, {account}) => account, - {namePos: 1} - ) - ]; -} - -export async function getUserValue(world: World, event: Event): Promise { - return await getFetcherValue("User", userFetchers(), world, event); -} diff --git a/scenario/src/Verify.ts b/scenario/src/Verify.ts deleted file mode 100644 index 03b41c10e..000000000 --- a/scenario/src/Verify.ts +++ /dev/null @@ -1,157 +0,0 @@ -import {World} from './World'; -import {readFile} from './File'; -import request from 'request'; -import * as path from 'path'; -import truffleFlattener from 'truffle-flattener'; -import {getNetworkContracts} from './Contract'; - -interface DevDoc { - author: string - methods: object - title: string -} - -interface UserDoc { - methods: object - notice: string -} - -function getUrl(network: string): string { - let host = { - kovan: 'api-kovan.etherscan.io', - rinkeby: 'api-rinkeby.etherscan.io', - ropsten: 'api-ropsten.etherscan.io', - goerli: 'api-goerli.etherscan.io', - mainnet: 'api.etherscan.io' - }[network]; - - if (!host) { - throw new Error(`Unknown etherscan API host for network ${network}`); - } - - return `https://${host}/api`; -} - -function getConstructorABI(world: World, contractName: string): string { - let constructorAbi = world.getIn(['contractData', 'Constructors', contractName]); - - if (!constructorAbi) { - throw new Error(`Unknown Constructor ABI for ${contractName} on ${world.network}. Try deploying again?`); - } - - return constructorAbi; -} - -function post(url, data): Promise { - return new Promise((resolve, reject) => { - request.post(url, {form: data}, (err, httpResponse, body) => { - if (err) { - reject(err); - } else { - resolve(JSON.parse(body)); - } - }); - }); -} - -function get(url, data): Promise { - return new Promise((resolve, reject) => { - request.get(url, {form: data}, (err, httpResponse, body) => { - if (err) { - reject(err); - } else { - resolve(JSON.parse(body)); - } - }); - }); -} - -interface Result { - status: string - message: string - result: string -} - -async function sleep(timeout): Promise { - return new Promise((resolve, _reject) => { - setTimeout(() => resolve(), timeout); - }) -} - -async function checkStatus(world: World, url: string, token: string): Promise { - world.printer.printLine(`Checking status of ${token}...`); - - // Potential results: - // { status: '0', message: 'NOTOK', result: 'Fail - Unable to verify' } - // { status: '0', message: 'NOTOK', result: 'Pending in queue' } - // { status: '1', message: 'OK', result: 'Pass - Verified' } - - let result: Result = await get(url, { - guid: token, - module: "contract", - action: "checkverifystatus" - }); - - if (world.verbose) { - console.log(result); - } - - if (result.result === "Pending in queue") { - await sleep(5000); - return await checkStatus(world, url, token); - } - - if (result.result.startsWith('Fail')) { - throw new Error(`Etherscan failed to verify contract: ${result.message} "${result.result}"`) - } - - if (Number(result.status) !== 1) { - throw new Error(`Etherscan Error: ${result.message} "${result.result}"`) - } - - world.printer.printLine(`Verification result ${result.result}...`); -} - -export async function verify(world: World, apiKey: string, contractName: string, buildInfoName: string, address: string): Promise { - let contractAddress: string = address; - let {networkContracts, version} = await getNetworkContracts(world); - let networkContract = networkContracts[buildInfoName]; - if (!networkContract) { - throw new Error(`Cannot find contract ${buildInfoName}, found: ${Object.keys(networkContracts)}`) - } - let sourceCode: string = await truffleFlattener([networkContract.path]); - let compilerVersion: string = version.replace(/(\.Emscripten)|(\.clang)|(\.Darwin)|(\.appleclang)/gi, ''); - let constructorAbi = getConstructorABI(world, contractName); - let url = getUrl(world.network); - - const verifyData: object = { - apikey: apiKey, - module: 'contract', - action: 'verifysourcecode', - contractaddress: contractAddress, - sourceCode: sourceCode, - contractname: buildInfoName, - compilerversion: `v${compilerVersion}`, - optimizationUsed: '1', - runs: '200', - constructorArguements: constructorAbi.slice(2) - }; - - world.printer.printLine(`Verifying ${contractName} at ${address} with compiler version ${compilerVersion}...`); - - // Potential results - // {"status":"0","message":"NOTOK","result":"Invalid constructor arguments provided. Please verify that they are in ABI-encoded format"} - // {"status":"1","message":"OK","result":"usjpiyvmxtgwyee59wnycyiet7m3dba4ccdi6acdp8eddlzdde"} - - let result: Result = await post(url, verifyData); - - if (Number(result.status) === 0 || result.message !== "OK") { - if (result.result.includes('Contract source code already verified')) { - world.printer.printLine(`Contract already verified`); - } else { - throw new Error(`Etherscan Error: ${result.message}: ${result.result}`) - } - } else { - return await checkStatus(world, url, result.result); - } -} diff --git a/scenario/src/Web.ts b/scenario/src/Web.ts deleted file mode 100644 index 8d0b3bf23..000000000 --- a/scenario/src/Web.ts +++ /dev/null @@ -1,87 +0,0 @@ -import { parse } from './Parser'; -import { World, initWorld } from './World'; -import { throwExpect } from './Assert'; -import { CallbackPrinter } from './Printer'; -import { runCommand } from './Runner'; -import { loadContractData, parseNetworkFile } from './Networks'; -import Web3 from 'web3'; -import { Saddle } from 'eth-saddle'; - -function networkFromId(id: number) { - switch (id) { - case 0: - return 'olympic'; - - case 1: - return 'mainnet'; - - case 2: - return 'morden'; - - case 3: - return 'ropsten'; - - case 4: - return 'rinkeby'; - - case 5: - return 'goerli'; - - case 8: - return 'ubiq'; - - case 42: - return 'kovan'; - - case 77: - return 'sokol'; - - case 99: - return 'core'; - - case 999: - return 'development'; - - default: - return ''; - } -} - -export async function webWorld( - web3: Web3, - networksData: string, - networksABIData: string, - printerCallback: (message: any) => void -): Promise { - let printer = new CallbackPrinter(printerCallback); - let accounts; - if (web3.currentProvider && typeof(web3.currentProvider) !== 'string') { - // XXXS - accounts = [(web3.currentProvider).address]; - } - - const networkId = await (web3 as any).net.getId(); - const network: string = networkFromId(networkId); - - // XXXS - const saddle = { - web3: web3 - }; - - let world = await initWorld(throwExpect, printer, web3, saddle, network, accounts, null, null); - - let networks = parseNetworkFile(networksData); - let networksABI = parseNetworkFile(networksABIData); - - [world] = await loadContractData(world, networks, networksABI); - // world = loadInvokationOpts(world); - // world = loadVerbose(world); - // world = loadDryRun(world); - // world = await loadSettings(world); - - return world; -} - -export async function webParse(world: World, line: string): Promise { - return runCommand(world, line, {}); -} diff --git a/scenario/src/World.ts b/scenario/src/World.ts deleted file mode 100644 index 6a556e564..000000000 --- a/scenario/src/World.ts +++ /dev/null @@ -1,356 +0,0 @@ -import { Expect, throwExpect } from './Assert'; -import { Action } from './Action'; -import { Contract } from './Contract'; -import { Record } from 'immutable'; -import { Printer } from './Printer'; -import { Invariant } from './Invariant'; -import { SuccessInvariant } from './Invariant/SuccessInvariant'; -import { RemainsInvariant } from './Invariant/RemainsInvariant'; -import { StaticInvariant } from './Invariant/StaticInvariant'; -import { Expectation } from './Expectation'; -import { formatResult } from './ErrorReporter'; -import { Invokation, InvokationOpts } from './Invokation'; -import { Event } from './Event'; -import { formatEvent } from './Formatter'; -import { Map } from 'immutable'; -import { Settings } from './Settings'; -import { Accounts, loadAccounts } from './Accounts'; -import Web3 from 'web3'; -import { Saddle } from 'eth-saddle'; -import { Command, Fetcher } from './Command'; -import { Value} from './Value'; - -const startingBlockNumber = 1000; - -type ContractIndex = { [address: string]: Contract }; -type Counter = { value: number }; -type EventDecoder = { [eventSignature: string]: (log: any) => any }; - -export interface WorldProps { - actions: Action[]; - event: Event | null; - lastInvokation: Invokation | null; - newInvokation: boolean; - blockNumber: number; - gasCounter: Counter; - lastContract: Contract | null; - invariants: Invariant[]; - expectations: Expectation[]; - contractIndex: ContractIndex; - contractData: Map; - expect: Expect; - web3: Web3 | null; - saddle: Saddle | null; - printer: Printer | null; - network: string | null; - dryRun: boolean; - verbose: boolean; - settings: Settings; - accounts: Accounts | null; - invokationOpts: InvokationOpts; - trxInvokationOpts: Map; - basePath: string | null; - totalGas: number | null; - eventDecoder: EventDecoder; - fs: object | null; - commands: Command[] | undefined; - fetchers: Fetcher[] | undefined; -} - -const defaultWorldProps: WorldProps = { - actions: []>[], - event: null, - lastInvokation: null, - newInvokation: false, - blockNumber: 0, - gasCounter: {value: 0}, - lastContract: null, - invariants: [], - expectations: [], - contractIndex: {}, - contractData: Map({}), - expect: throwExpect, - web3: null, - saddle: null, - printer: null, - network: null, - dryRun: false, - verbose: false, - settings: Settings.default(null, null), - accounts: null, - invokationOpts: {}, - trxInvokationOpts: Map({}), - basePath: null, - totalGas: null, - eventDecoder: {}, - fs: null, - commands: undefined, - fetchers: undefined, -}; - -export class World extends Record(defaultWorldProps) { - public readonly actions!: Action[]; - public readonly event!: Event | null; - public readonly value!: number | null; - public readonly lastInvokation!: Invokation | null; - public readonly newInvokation!: boolean; - public readonly blockNumber!: number; - public readonly gasCounter!: Counter; - public readonly lastContract!: Contract | null; - public readonly invariants!: Invariant[]; - public readonly expectations!: Expectation[]; - public readonly contractIndex!: ContractIndex; - public readonly contractData!: Map; - public readonly expect!: Expect; - public readonly web3!: Web3; - public readonly saddle!: Saddle; - public readonly printer!: Printer; - public readonly network!: string; - public readonly dryRun!: boolean; - public readonly verbose!: boolean; - public readonly settings!: Settings; - public readonly accounts!: Accounts; - public readonly invokationOpts!: InvokationOpts; - public readonly trxInvokationOpts!: Map; - public readonly basePath!: string | null; - - public constructor(values?: Partial) { - values ? super(values) : super(); - } - - getInvokationOpts(baseOpts: InvokationOpts): InvokationOpts { - return { - ...baseOpts, - ...this.invokationOpts, - ...this.value ? {value: this.value.toString()} : {} - }; - } - - isLocalNetwork(): boolean { - return this.network === 'test' || this.network === 'development' || this.network === 'coverage'; - } - - async updateSettings(fn: (settings: Settings) => Promise): Promise { - // TODO: Should we do an immutable update? - const newSettings = await fn(this.settings); - - // TODO: Should we await or just let it clobber? - await newSettings.save(); - - return this.set('settings', newSettings); - } - - defaultFrom(): string | null { - let settingsFrom = this.settings.findAlias('Me'); - if (settingsFrom) { - return settingsFrom; - } - - let accountsDefault = this.accounts.get('default'); - if (accountsDefault) { - return accountsDefault.address; - } - - return null; - } -} - -export function loadInvokationOpts(world: World): World { - let networkOpts = {}; - const networkOptsStr = process.env[`${world.network}_opts`]; - if (networkOptsStr) { - networkOpts = JSON.parse(networkOptsStr); - } - - return world.set('invokationOpts', networkOpts); -} - -export function loadVerbose(world: World): World { - return world.set('verbose', !!process.env['verbose']); -} - -export function loadDryRun(world: World): World { - return world.set('dryRun', !!process.env['dry_run']); -} - -export async function loadSettings(world: World): Promise { - if (world.basePath) { - return world.set('settings', await Settings.load(world.basePath, world.network)); - } else { - return world; - } -} - -export async function initWorld( - expect: Expect, - printer: Printer, - iweb3: Web3, - saddle: Saddle, - network: string, - accounts: string[], - basePath: string | null, - totalGas: number | null -): Promise { - return new World({ - actions: [], - event: null, - lastInvokation: null, - newInvokation: true, - blockNumber: startingBlockNumber, - gasCounter: {value: 0}, - lastContract: null, - invariants: [new SuccessInvariant()], // Start with invariant success, - expectations: [], - contractIndex: {}, - contractData: Map({}), - expect: expect, - web3: iweb3, - saddle: saddle, - printer: printer, - network: network, - settings: Settings.default(basePath, null), - accounts: loadAccounts(accounts), - trxInvokationOpts: Map({}), - basePath: basePath, - totalGas: totalGas ? totalGas : null, - eventDecoder: {}, - fs: network === 'test' ? {} : null - }); -} - -export function setEvent(world: World, event: Event): World { - return world.set('event', event); -} - -export function addAction(world: World, log: string, invokation: Invokation): World { - const action = new Action(log, invokation); - - world = world.update('actions', actions => actions.concat([action])); - - // Print the action via the printer - world.printer.printAction(action); - - return world.merge(world, { - lastInvokation: invokation, - newInvokation: true - }); -} - -export function addInvariant(world: World, invariant: Invariant): World { - return world.update('invariants', invariants => invariants.concat([invariant])); -} - -export function addExpectation(world: World, expectation: Expectation): World { - return world.update('expectations', expectations => expectations.concat([expectation])); -} - -function getInvariantFilter(type: string) { - let filters: { [filter: string]: (invariant: Invariant) => boolean } = { - all: _invariant => true, - success: invariant => !(invariant instanceof SuccessInvariant), - remains: invariant => !(invariant instanceof RemainsInvariant), - static: invariant => !(invariant instanceof StaticInvariant) - }; - - let filter = filters[type.toLowerCase()]; - - if (!filter) { - throw new Error(`Unknown invariant type \`${type}\` when wiping invariants.`); - } - - return filter; -} - -export function clearInvariants(world: World, type: string): World { - let filter = getInvariantFilter(type); - - return world.update('invariants', invariants => world.invariants.filter(filter)); -} - -export function holdInvariants(world: World, type: string): World { - let filter = getInvariantFilter(type); - - return world.update('invariants', invariants => { - return world.invariants.map(invariant => { - if (filter(invariant)) { - invariant.held = true; - } - - return invariant; - }); - }); -} - -export async function checkExpectations(world: World): Promise { - if (!world.get('newInvokation')) { - return world; - } else { - // Lastly, check invariants each hold - await Promise.all( - world.get('expectations').map(expectation => { - // Check the expectation holds - return expectation.checker(world); - }) - ); - - return world.set('expectations', []); - } -} - -export async function checkInvariants(world: World): Promise { - if (!world.get('newInvokation')) { - return world; - } else { - // Lastly, check invariants each hold - await Promise.all( - world.get('invariants').map(invariant => { - // Check the invariant still holds - if (!invariant.held) { - return invariant.checker(world); - } - }) - ); - - // Remove holds - return world.update('invariants', invariants => { - return invariants.map(invariant => { - invariant.held = false; - - return invariant; - }); - }); - } -} - -export function describeUser(world: World, address: string): string { - // Look up by alias - let alias = Object.entries(world.settings.aliases).find(([name, aliasAddr]) => aliasAddr === address); - if (alias) { - return `${alias[0]} (${address.slice(0,6)}...)`; - } - - // Look up by `from` - if (world.settings.from === address) { - return `root (${address.slice(0,6)}...)`; - } - - // Look up by unlocked accounts - let account = world.accounts.find(account => account.address === address); - if (account) { - return `${account.name} (${address.slice(0,6)}...)`; - } - - // Otherwise, just return the address itself - return address; -} - -// Fails an assertion with reason -export function fail(world: World, reason: string): World { - if (world.event) { - world.expect(undefined).fail(`${reason} processing ${formatEvent(world.event)}`); - } else { - world.expect(undefined).fail(reason); - } - - return world; -} diff --git a/scenario/tsconfig.json b/scenario/tsconfig.json deleted file mode 100644 index 164399432..000000000 --- a/scenario/tsconfig.json +++ /dev/null @@ -1,63 +0,0 @@ -{ - "compilerOptions": { - /* Basic Options */ - "target": "es2018", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017','ES2018' or 'ESNEXT'. */ - "module": "commonjs", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */ - "lib": ["esnext"], /* Specify library files to be included in the compilation. */ - // "allowJs": true, /* Allow javascript files to be compiled. */ - // "checkJs": true, /* Report errors in .js files. */ - // "jsx": "preserve", /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */ - // "declaration": true, /* Generates corresponding '.d.ts' file. */ - // "declarationMap": true, /* Generates a sourcemap for each corresponding '.d.ts' file. */ - // "sourceMap": true, /* Generates corresponding '.map' file. */ - // "outFile": "./", /* Concatenate and emit output to single file. */ - "outDir": "./.tsbuilt", /* Redirect output structure to the directory. */ - // "rootDir": "./", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */ - // "composite": true, /* Enable project compilation */ - // "removeComments": true, /* Do not emit comments to output. */ - // "noEmit": true, /* Do not emit outputs. */ - // "importHelpers": true, /* Import emit helpers from 'tslib'. */ - // "downlevelIteration": true, /* Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'. */ - // "isolatedModules": true, /* Transpile each file as a separate module (similar to 'ts.transpileModule'). */ - - /* Strict Type-Checking Options */ - "strict": false, /* Enable all strict type-checking options. */ - "noImplicitAny": false, /* Raise error on expressions and declarations with an implied 'any' type. */ - // "strictNullChecks": true, /* Enable strict null checks. */ - // "strictFunctionTypes": true, /* Enable strict checking of function types. */ - // "strictBindCallApply": true, /* Enable strict 'bind', 'call', and 'apply' methods on functions. */ - // "strictPropertyInitialization": true, /* Enable strict checking of property initialization in classes. */ - // "noImplicitThis": true, /* Raise error on 'this' expressions with an implied 'any' type. */ - // "alwaysStrict": true, /* Parse in strict mode and emit "use strict" for each source file. */ - - /* Additional Checks */ - // "noUnusedLocals": true, /* Report errors on unused locals. */ - // "noUnusedParameters": true, /* Report errors on unused parameters. */ - // "noImplicitReturns": true, /* Report error when not all code paths in function return a value. */ - // "noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */ - - /* Module Resolution Options */ - // "moduleResolution": "node", /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */ - // "baseUrl": "./", /* Base directory to resolve non-absolute module names. */ - // "paths": {}, /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */ - // "rootDirs": [], /* List of root folders whose combined content represents the structure of the project at runtime. */ - // "typeRoots": [], /* List of folders to include type definitions from. */ - // "types": [], /* Type declaration files to be included in compilation. */ - // "allowSyntheticDefaultImports": true, /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */ - "esModuleInterop": true, /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */ - // "preserveSymlinks": true, /* Do not resolve the real path of symlinks. */ - - /* Source Map Options */ - // "sourceRoot": "", /* Specify the location where debugger should locate TypeScript files instead of source locations. */ - // "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */ - "inlineSourceMap": true, /* Emit a single file with source maps instead of having a separate file. */ - "inlineSources": true, /* Emit the source alongside the sourcemaps within a single file; requires '--inlineSourceMap' or '--sourceMap' to be set. */ - - /* Experimental Options */ - // "experimentalDecorators": true, /* Enables experimental support for ES7 decorators. */ - // "emitDecoratorMetadata": true, /* Enables experimental support for emitting type metadata for decorators. */ - }, - "include": [ - "./src/**/*" - ] -} diff --git a/scenario/webpack.config.js b/scenario/webpack.config.js deleted file mode 100644 index e25a1fbae..000000000 --- a/scenario/webpack.config.js +++ /dev/null @@ -1,28 +0,0 @@ -'use strict' -const webpack = require('webpack'); - -module.exports = { - stats: 'verbose', - devtool: 'source-map', - externals: { - file: '{}', - fs: '{}', - tls: '{}', - net: '{}', - xmlhttprequest: '{}', - 'truffle-flattener': '{}', - 'request': '{}' - }, - optimization: { - minimize: true - }, - plugins: [ - new webpack.IgnorePlugin(/^\.\/locale$/, /moment$/), - new webpack.DefinePlugin({ - 'process.env': { - // This has effect on the react lib size - 'NODE_ENV': JSON.stringify('production'), - } - }) - ] -} diff --git a/scenario/yarn.lock b/scenario/yarn.lock deleted file mode 100644 index 405b4491a..000000000 --- a/scenario/yarn.lock +++ /dev/null @@ -1,12154 +0,0 @@ -# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. -# yarn lockfile v1 - - -"@0x/assert@^3.0.0": - version "3.0.0" - resolved "https://registry.yarnpkg.com/@0x/assert/-/assert-3.0.0.tgz#a5fa5defd6638431c76309968fed175ddab5956a" - integrity sha512-SiU9pWEtHzDsmFx80/uBGZScpVwN4EhMlqcqt3fGa3u4e3iK6rtqLCD9qvlN9OgEljbvyuq6pzI8bGr27xspkw== - dependencies: - "@0x/json-schemas" "^5.0.0" - "@0x/typescript-typings" "^5.0.0" - "@0x/utils" "^5.0.0" - lodash "^4.17.11" - valid-url "^1.0.9" - -"@0x/assert@^3.0.9": - version "3.0.9" - resolved "https://registry.yarnpkg.com/@0x/assert/-/assert-3.0.9.tgz#4bc750b786c1f02ea0b7ceb701ebe2e46d30c113" - integrity sha512-ywQuG8feXtIpRn/3tekPZeXLjKfDJPooA5QJEDxHDv1E5ZjSrKSK6B3wdkVW6NJvNPECw0eKjM50uF2784tbfA== - dependencies: - "@0x/json-schemas" "^5.1.0" - "@0x/typescript-typings" "^5.1.1" - "@0x/utils" "^5.5.1" - lodash "^4.17.11" - valid-url "^1.0.9" - -"@0x/dev-utils@^3.3.0": - version "3.3.0" - resolved "https://registry.yarnpkg.com/@0x/dev-utils/-/dev-utils-3.3.0.tgz#ff56021d13b9630bb7f42d102e30a18f2b9aa7ff" - integrity sha512-/SPF/dVrGeYgZMo4vhHjG/YPxEsbnSi3sKA3+R6hySF7AKOH0u+78cUZ1NwrVOhGHToNWmehhci1Ic2BOXxQ9g== - dependencies: - "@0x/subproviders" "^6.1.1" - "@0x/types" "^3.2.0" - "@0x/typescript-typings" "^5.1.1" - "@0x/utils" "^5.5.1" - "@0x/web3-wrapper" "^7.2.0" - "@types/web3-provider-engine" "^14.0.0" - chai "^4.0.1" - chai-as-promised "^7.1.0" - chai-bignumber "^3.0.0" - dirty-chai "^2.0.1" - ethereum-types "^3.2.0" - lodash "^4.17.11" - web3-provider-engine "14.0.6" - -"@0x/json-schemas@^5.0.0": - version "5.0.0" - resolved "https://registry.yarnpkg.com/@0x/json-schemas/-/json-schemas-5.0.0.tgz#95c29fb7977adb19b9f0127122ec90efb38651ec" - integrity sha512-+OlJ5UBdX1MpXA/wD3j3GCD51IQmgp9zTvFriWbUIBn35imZe1gUETdn7tpeqxbTMOm4kHzwcSDrf5bdx6ztLA== - dependencies: - "@0x/typescript-typings" "^5.0.0" - "@types/node" "*" - jsonschema "^1.2.0" - lodash.values "^4.3.0" - -"@0x/json-schemas@^5.1.0": - version "5.1.0" - resolved "https://registry.yarnpkg.com/@0x/json-schemas/-/json-schemas-5.1.0.tgz#3f30529049ea5aa4cfc4aed2c2124c7482d632f1" - integrity sha512-qDiCz94AR140puQ0MHT6XyDbmDrvWjw+Zyysmf4tD9PfM8sD+MOhF9dfvaYPNlS51M1CIlOTWZYqo5OUCIBEXQ== - dependencies: - "@0x/typescript-typings" "^5.1.1" - "@types/node" "*" - jsonschema "^1.2.0" - lodash.values "^4.3.0" - -"@0x/sol-compiler@^4.1.1": - version "4.1.1" - resolved "https://registry.yarnpkg.com/@0x/sol-compiler/-/sol-compiler-4.1.1.tgz#dfab22e2370c03ef8dcfd910d66ced0d46ef5579" - integrity sha512-ktcTBz1m0cRn34t1ZkCn1BzssgLEI3ZLB6+aLq1OZzb3hGha9RW/yzl8UC7K/G/GPAK0rb3ip4t3TYHzIH/3lg== - dependencies: - "@0x/assert" "^3.0.9" - "@0x/json-schemas" "^5.1.0" - "@0x/sol-resolver" "^3.1.0" - "@0x/types" "^3.2.0" - "@0x/typescript-typings" "^5.1.1" - "@0x/utils" "^5.5.1" - "@0x/web3-wrapper" "^7.2.0" - "@types/yargs" "^11.0.0" - chalk "^2.3.0" - chokidar "^3.0.2" - ethereum-types "^3.2.0" - ethereumjs-util "^5.1.1" - lodash "^4.17.11" - mkdirp "^0.5.1" - pluralize "^7.0.0" - require-from-string "^2.0.1" - semver "5.5.0" - solc "^0.5.5" - source-map-support "^0.5.0" - web3-eth-abi "^1.0.0-beta.24" - yargs "^10.0.3" - -"@0x/sol-resolver@^3.1.0": - version "3.1.0" - resolved "https://registry.yarnpkg.com/@0x/sol-resolver/-/sol-resolver-3.1.0.tgz#86dbbc6641011df446f5a0e4545cd3360a3af52b" - integrity sha512-fyOngwc1qzN/rH+lrsGAACnXd8UuTVHkzj423+s3p5I2qhjDrQcxTfJpxQ1Yuc74fb9R0cXFRQto3A9LevjKxA== - dependencies: - "@0x/types" "^3.2.0" - "@0x/typescript-typings" "^5.1.1" - lodash "^4.17.11" - -"@0x/subproviders@=6.0.0": - version "6.0.0" - resolved "https://registry.yarnpkg.com/@0x/subproviders/-/subproviders-6.0.0.tgz#9d4b32e22c9e71f450b0f6d00978ca6b1129c0b3" - integrity sha512-5u0JpSGz6RtU0YKckV9FQeJAWkuESG6oR94GQujvkdxg1i1b/QGe9Njq+9VdPq6jhFwl7Hzr8K0JJYTXPlIo5A== - dependencies: - "@0x/assert" "^3.0.0" - "@0x/types" "^3.0.0" - "@0x/typescript-typings" "^5.0.0" - "@0x/utils" "^5.0.0" - "@0x/web3-wrapper" "^7.0.0" - "@ledgerhq/hw-app-eth" "^4.3.0" - "@ledgerhq/hw-transport-u2f" "4.24.0" - "@types/hdkey" "^0.7.0" - "@types/web3-provider-engine" "^14.0.0" - bip39 "^2.5.0" - bn.js "^4.11.8" - ethereum-types "^3.0.0" - ethereumjs-tx "^1.3.5" - ethereumjs-util "^5.1.1" - ganache-core "^2.6.0" - hdkey "^0.7.1" - json-rpc-error "2.0.0" - lodash "^4.17.11" - semaphore-async-await "^1.5.1" - web3-provider-engine "14.0.6" - optionalDependencies: - "@ledgerhq/hw-transport-node-hid" "^4.3.0" - -"@0x/subproviders@^6.1.1": - version "6.1.1" - resolved "https://registry.yarnpkg.com/@0x/subproviders/-/subproviders-6.1.1.tgz#f0d523055cb889652a7e53263cbe0b9d93bb1d4b" - integrity sha512-5rXmQbokPAlq6Am+O/C2QV6VlxKJGREncJ50ymLp0z8Bsyjt864Mgb1sB1ym19Qg6EJEhamQiJzVrrkN4ApbTQ== - dependencies: - "@0x/assert" "^3.0.9" - "@0x/types" "^3.2.0" - "@0x/typescript-typings" "^5.1.1" - "@0x/utils" "^5.5.1" - "@0x/web3-wrapper" "^7.2.0" - "@ledgerhq/hw-app-eth" "^4.3.0" - "@ledgerhq/hw-transport-u2f" "4.24.0" - "@types/hdkey" "^0.7.0" - "@types/web3-provider-engine" "^14.0.0" - bip39 "^2.5.0" - bn.js "^4.11.8" - ethereum-types "^3.2.0" - ethereumjs-tx "^1.3.5" - ethereumjs-util "^5.1.1" - ganache-core "^2.10.2" - hdkey "^0.7.1" - json-rpc-error "2.0.0" - lodash "^4.17.11" - semaphore-async-await "^1.5.1" - web3-provider-engine "14.0.6" - optionalDependencies: - "@ledgerhq/hw-transport-node-hid" "^4.3.0" - -"@0x/types@^3.0.0": - version "3.0.0" - resolved "https://registry.yarnpkg.com/@0x/types/-/types-3.0.0.tgz#3cc815094fb9b73d3bc6bbe29735af982a0f519c" - integrity sha512-q+XRLgd/I7UbT73w0SRKLs9ZHe1FpIc5JZO1sLI3asNj+bb9FrFjuHiDJvZV33MjMI8u3IajN534YjVCMTBefg== - dependencies: - "@types/node" "*" - bignumber.js "~9.0.0" - ethereum-types "^3.0.0" - -"@0x/types@^3.2.0": - version "3.2.0" - resolved "https://registry.yarnpkg.com/@0x/types/-/types-3.2.0.tgz#490627e9440c3ff4e4660b0c10960ccd02d7105f" - integrity sha512-HcYXmz7gYtibJmZQjrQCnzV2FjRoo5b/Ul1QoTeQFAZ2M2ggt1wHspQ7vOkEAZEK/7TE4TKA4MlRwRLa4isL1Q== - dependencies: - "@types/node" "*" - bignumber.js "~9.0.0" - ethereum-types "^3.2.0" - -"@0x/typescript-typings@^5.0.0": - version "5.0.0" - resolved "https://registry.yarnpkg.com/@0x/typescript-typings/-/typescript-typings-5.0.0.tgz#54bb89fe78216cd9a1a737dead329ad1cb05bd94" - integrity sha512-4ZgHGY5OniFC8giOMF4W2l6YuOccIt7L0a52BKbJvBGpPeaDIlKWGuqxhp9nXDd212SlkYxALyoXlJd/We2kew== - dependencies: - "@types/bn.js" "^4.11.0" - "@types/react" "*" - bignumber.js "~9.0.0" - ethereum-types "^3.0.0" - popper.js "1.14.3" - -"@0x/typescript-typings@^5.1.1": - version "5.1.1" - resolved "https://registry.yarnpkg.com/@0x/typescript-typings/-/typescript-typings-5.1.1.tgz#e5216f33e5859d48cd441a059da9c56c2b6df36a" - integrity sha512-a8/uKPNStHORFQzI/DDEq4ixb4IricPogAJ3P17YnNYr/yF3HwXEu6+cFxs4qi1fr0zGoPe7D3XtqtR+dX/ajQ== - dependencies: - "@types/bn.js" "^4.11.0" - "@types/react" "*" - bignumber.js "~9.0.0" - ethereum-types "^3.2.0" - popper.js "1.14.3" - -"@0x/utils@^5.0.0": - version "5.0.0" - resolved "https://registry.yarnpkg.com/@0x/utils/-/utils-5.0.0.tgz#4b0acff872c9b158c9293849f8bd2bb62f17b8c5" - integrity sha512-Nsa8VHdSo4jhWmsEuuIAJIBG55swbtDn5vb4/Kh+pXWRoOhkCuJyE6E0OIikL0wmgasIISD+xaOnpgqCY1N/mQ== - dependencies: - "@0x/types" "^3.0.0" - "@0x/typescript-typings" "^5.0.0" - "@types/node" "*" - abortcontroller-polyfill "^1.1.9" - bignumber.js "~9.0.0" - chalk "^2.3.0" - detect-node "2.0.3" - ethereum-types "^3.0.0" - ethereumjs-util "^5.1.1" - ethers "~4.0.4" - isomorphic-fetch "2.2.1" - js-sha3 "^0.7.0" - lodash "^4.17.11" - -"@0x/utils@^5.5.1": - version "5.5.1" - resolved "https://registry.yarnpkg.com/@0x/utils/-/utils-5.5.1.tgz#5f131755e1692e7c7b74d03d224d94808d475dd7" - integrity sha512-UreVm7R/qEv1v4dVccb4Y6Oz13o8ko2vB10sdNrPAGbstqx3NfdEBkylNxD7I8Bkta/BIwHrLbtCN3jni8CSeg== - dependencies: - "@0x/types" "^3.2.0" - "@0x/typescript-typings" "^5.1.1" - "@types/node" "*" - abortcontroller-polyfill "^1.1.9" - bignumber.js "~9.0.0" - chalk "^2.3.0" - detect-node "2.0.3" - ethereum-types "^3.2.0" - ethereumjs-util "^5.1.1" - ethers "~4.0.4" - isomorphic-fetch "2.2.1" - js-sha3 "^0.7.0" - lodash "^4.17.11" - -"@0x/web3-wrapper@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@0x/web3-wrapper/-/web3-wrapper-7.0.0.tgz#323e7931f067f7f9ed88cca30bd1ed1f7505fc48" - integrity sha512-Cyd4/LIP69XDRkLA+OCRjFxx3mba0M+gG5zoXcc69HFTvZXV/mB36ibsQBvBI/CNVxUkxkrOQA/lG4+/zl3Dcg== - dependencies: - "@0x/assert" "^3.0.0" - "@0x/json-schemas" "^5.0.0" - "@0x/typescript-typings" "^5.0.0" - "@0x/utils" "^5.0.0" - ethereum-types "^3.0.0" - ethereumjs-util "^5.1.1" - ethers "~4.0.4" - lodash "^4.17.11" - -"@0x/web3-wrapper@^7.2.0": - version "7.2.0" - resolved "https://registry.yarnpkg.com/@0x/web3-wrapper/-/web3-wrapper-7.2.0.tgz#079f59276a7ea4e2920881645c51f71b1c0251e3" - integrity sha512-5jRr5Xl/co5VZB2sCFiokuRwuPc2BENeSVuXll/+YNmytP5+C+7oDvVt6GrGP3j5921GIr4EhusZMbvOFw1oKQ== - dependencies: - "@0x/assert" "^3.0.9" - "@0x/json-schemas" "^5.1.0" - "@0x/typescript-typings" "^5.1.1" - "@0x/utils" "^5.5.1" - ethereum-types "^3.2.0" - ethereumjs-util "^5.1.1" - ethers "~4.0.4" - lodash "^4.17.11" - -"@babel/code-frame@^7.0.0", "@babel/code-frame@^7.5.5": - version "7.5.5" - resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.5.5.tgz#bc0782f6d69f7b7d49531219699b988f669a8f9d" - integrity sha512-27d4lZoomVyo51VegxI20xZPuSHusqbQag/ztrBC7wegWoQ1nLREPVSKSW8byhTlzTKyNE4ifaTA6lCp7JjpFw== - dependencies: - "@babel/highlight" "^7.0.0" - -"@babel/core@^7.1.0": - version "7.7.7" - resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.7.7.tgz#ee155d2e12300bcc0cff6a8ad46f2af5063803e9" - integrity sha512-jlSjuj/7z138NLZALxVgrx13AOtqip42ATZP7+kYl53GvDV6+4dCek1mVUo8z8c8Xnw/mx2q3d9HWh3griuesQ== - dependencies: - "@babel/code-frame" "^7.5.5" - "@babel/generator" "^7.7.7" - "@babel/helpers" "^7.7.4" - "@babel/parser" "^7.7.7" - "@babel/template" "^7.7.4" - "@babel/traverse" "^7.7.4" - "@babel/types" "^7.7.4" - convert-source-map "^1.7.0" - debug "^4.1.0" - json5 "^2.1.0" - lodash "^4.17.13" - resolve "^1.3.2" - semver "^5.4.1" - source-map "^0.5.0" - -"@babel/generator@^7.4.0", "@babel/generator@^7.7.4", "@babel/generator@^7.7.7": - version "7.7.7" - resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.7.7.tgz#859ac733c44c74148e1a72980a64ec84b85f4f45" - integrity sha512-/AOIBpHh/JU1l0ZFS4kiRCBnLi6OTHzh0RPk3h9isBxkkqELtQNFi1Vr/tiG9p1yfoUdKVwISuXWQR+hwwM4VQ== - dependencies: - "@babel/types" "^7.7.4" - jsesc "^2.5.1" - lodash "^4.17.13" - source-map "^0.5.0" - -"@babel/helper-function-name@^7.7.4": - version "7.7.4" - resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.7.4.tgz#ab6e041e7135d436d8f0a3eca15de5b67a341a2e" - integrity sha512-AnkGIdiBhEuiwdoMnKm7jfPfqItZhgRaZfMg1XX3bS25INOnLPjPG1Ppnajh8eqgt5kPJnfqrRHqFqmjKDZLzQ== - dependencies: - "@babel/helper-get-function-arity" "^7.7.4" - "@babel/template" "^7.7.4" - "@babel/types" "^7.7.4" - -"@babel/helper-get-function-arity@^7.7.4": - version "7.7.4" - resolved "https://registry.yarnpkg.com/@babel/helper-get-function-arity/-/helper-get-function-arity-7.7.4.tgz#cb46348d2f8808e632f0ab048172130e636005f0" - integrity sha512-QTGKEdCkjgzgfJ3bAyRwF4yyT3pg+vDgan8DSivq1eS0gwi+KGKE5x8kRcbeFTb/673mkO5SN1IZfmCfA5o+EA== - dependencies: - "@babel/types" "^7.7.4" - -"@babel/helper-module-imports@^7.7.4": - version "7.7.4" - resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.7.4.tgz#e5a92529f8888bf319a6376abfbd1cebc491ad91" - integrity sha512-dGcrX6K9l8258WFjyDLJwuVKxR4XZfU0/vTUgOQYWEnRD8mgr+p4d6fCUMq/ys0h4CCt/S5JhbvtyErjWouAUQ== - dependencies: - "@babel/types" "^7.7.4" - -"@babel/helper-plugin-utils@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.0.0.tgz#bbb3fbee98661c569034237cc03967ba99b4f250" - integrity sha512-CYAOUCARwExnEixLdB6sDm2dIJ/YgEAKDM1MOeMeZu9Ld/bDgVo8aiWrXwcY7OBh+1Ea2uUcVRcxKk0GJvW7QA== - -"@babel/helper-split-export-declaration@^7.7.4": - version "7.7.4" - resolved "https://registry.yarnpkg.com/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.7.4.tgz#57292af60443c4a3622cf74040ddc28e68336fd8" - integrity sha512-guAg1SXFcVr04Guk9eq0S4/rWS++sbmyqosJzVs8+1fH5NI+ZcmkaSkc7dmtAFbHFva6yRJnjW3yAcGxjueDug== - dependencies: - "@babel/types" "^7.7.4" - -"@babel/helpers@^7.7.4": - version "7.7.4" - resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.7.4.tgz#62c215b9e6c712dadc15a9a0dcab76c92a940302" - integrity sha512-ak5NGZGJ6LV85Q1Zc9gn2n+ayXOizryhjSUBTdu5ih1tlVCJeuQENzc4ItyCVhINVXvIT/ZQ4mheGIsfBkpskg== - dependencies: - "@babel/template" "^7.7.4" - "@babel/traverse" "^7.7.4" - "@babel/types" "^7.7.4" - -"@babel/highlight@^7.0.0": - version "7.5.0" - resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.5.0.tgz#56d11312bd9248fa619591d02472be6e8cb32540" - integrity sha512-7dV4eu9gBxoM0dAnj/BCFDW9LFU0zvTrkq0ugM7pnHEgguOEeOz1so2ZghEdzviYzQEED0r4EAgpsBChKy1TRQ== - dependencies: - chalk "^2.0.0" - esutils "^2.0.2" - js-tokens "^4.0.0" - -"@babel/parser@^7.1.0", "@babel/parser@^7.4.3", "@babel/parser@^7.7.4", "@babel/parser@^7.7.7": - version "7.7.7" - resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.7.7.tgz#1b886595419cf92d811316d5b715a53ff38b4937" - integrity sha512-WtTZMZAZLbeymhkd/sEaPD8IQyGAhmuTuvTzLiCFM7iXiVdY0gc0IaI+cW0fh1BnSMbJSzXX6/fHllgHKwHhXw== - -"@babel/plugin-syntax-object-rest-spread@^7.0.0": - version "7.7.4" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.7.4.tgz#47cf220d19d6d0d7b154304701f468fc1cc6ff46" - integrity sha512-mObR+r+KZq0XhRVS2BrBKBpr5jqrqzlPvS9C9vuOf5ilSwzloAl7RPWLrgKdWS6IreaVrjHxTjtyqFiOisaCwg== - dependencies: - "@babel/helper-plugin-utils" "^7.0.0" - -"@babel/plugin-transform-runtime@^7.5.5": - version "7.7.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-runtime/-/plugin-transform-runtime-7.7.6.tgz#4f2b548c88922fb98ec1c242afd4733ee3e12f61" - integrity sha512-tajQY+YmXR7JjTwRvwL4HePqoL3DYxpYXIHKVvrOIvJmeHe2y1w4tz5qz9ObUDC9m76rCzIMPyn4eERuwA4a4A== - dependencies: - "@babel/helper-module-imports" "^7.7.4" - "@babel/helper-plugin-utils" "^7.0.0" - resolve "^1.8.1" - semver "^5.5.1" - -"@babel/runtime@^7.5.5": - version "7.7.6" - resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.7.6.tgz#d18c511121aff1b4f2cd1d452f1bac9601dd830f" - integrity sha512-BWAJxpNVa0QlE5gZdWjSxXtemZyZ9RmrmVozxt3NUXeZhVIJ5ANyqmMc0JDrivBZyxUuQvFxlvH4OWWOogGfUw== - dependencies: - regenerator-runtime "^0.13.2" - -"@babel/template@^7.4.0", "@babel/template@^7.7.4": - version "7.7.4" - resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.7.4.tgz#428a7d9eecffe27deac0a98e23bf8e3675d2a77b" - integrity sha512-qUzihgVPguAzXCK7WXw8pqs6cEwi54s3E+HrejlkuWO6ivMKx9hZl3Y2fSXp9i5HgyWmj7RKP+ulaYnKM4yYxw== - dependencies: - "@babel/code-frame" "^7.0.0" - "@babel/parser" "^7.7.4" - "@babel/types" "^7.7.4" - -"@babel/traverse@^7.1.0", "@babel/traverse@^7.4.3", "@babel/traverse@^7.7.4": - version "7.7.4" - resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.7.4.tgz#9c1e7c60fb679fe4fcfaa42500833333c2058558" - integrity sha512-P1L58hQyupn8+ezVA2z5KBm4/Zr4lCC8dwKCMYzsa5jFMDMQAzaBNy9W5VjB+KAmBjb40U7a/H6ao+Xo+9saIw== - dependencies: - "@babel/code-frame" "^7.5.5" - "@babel/generator" "^7.7.4" - "@babel/helper-function-name" "^7.7.4" - "@babel/helper-split-export-declaration" "^7.7.4" - "@babel/parser" "^7.7.4" - "@babel/types" "^7.7.4" - debug "^4.1.0" - globals "^11.1.0" - lodash "^4.17.13" - -"@babel/types@^7.0.0", "@babel/types@^7.3.0", "@babel/types@^7.4.0", "@babel/types@^7.7.4": - version "7.7.4" - resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.7.4.tgz#516570d539e44ddf308c07569c258ff94fde9193" - integrity sha512-cz5Ji23KCi4T+YIE/BolWosrJuSmoZeN1EFnRtBwF+KKLi8GG/Z2c2hOJJeCXPk4mwk4QFvTmwIodJowXgttRA== - dependencies: - esutils "^2.0.2" - lodash "^4.17.13" - to-fast-properties "^2.0.0" - -"@cnakazawa/watch@^1.0.3": - version "1.0.3" - resolved "https://registry.yarnpkg.com/@cnakazawa/watch/-/watch-1.0.3.tgz#099139eaec7ebf07a27c1786a3ff64f39464d2ef" - integrity sha512-r5160ogAvGyHsal38Kux7YYtodEKOj89RGb28ht1jh3SJb08VwRwAKKJL0bGb04Zd/3r9FL3BFIc3bBidYffCA== - dependencies: - exec-sh "^0.3.2" - minimist "^1.2.0" - -"@compound-finance/sol-coverage@=4.0.10-alpha.7": - version "4.0.10-alpha.7" - resolved "https://registry.yarnpkg.com/@compound-finance/sol-coverage/-/sol-coverage-4.0.10-alpha.7.tgz#7459f23a9934f987e865bc1717a33da137dae696" - integrity sha512-UtBAc50sdv2KEnG3y5d2Vm/WvN5UvnhhZZ73BSYut67DNu4l22kOvlgivgO+Gd4cfTHRNhoy7cy0mZuUBomDfQ== - dependencies: - "@0x/subproviders" "^6.1.1" - "@0x/typescript-typings" "^5.1.1" - "@compound-finance/sol-tracing-utils" "^7.1.0-alpha.7" - "@types/minimatch" "^3.0.3" - ethereum-types "^3.2.0" - lodash "^4.17.11" - minimatch "^3.0.4" - web3-provider-engine "14.0.6" - -"@compound-finance/sol-tracing-utils@=7.1.0-alpha.7", "@compound-finance/sol-tracing-utils@^7.1.0-alpha.7": - version "7.1.0-alpha.7" - resolved "https://registry.yarnpkg.com/@compound-finance/sol-tracing-utils/-/sol-tracing-utils-7.1.0-alpha.7.tgz#ad4b06320fb2db115d3266ca8fdfdd68e6d57080" - integrity sha512-7yrJsjg7U6zwrDu09FTRN2ziQAv140dBZnQEasiXGy2UPhv17hToKow/bXtrR233ULQ3xHNR9hlpm2jatE5xVQ== - dependencies: - "@0x/dev-utils" "^3.3.0" - "@0x/sol-compiler" "^4.1.1" - "@0x/sol-resolver" "^3.1.0" - "@0x/subproviders" "^6.1.1" - "@0x/typescript-typings" "^5.1.1" - "@0x/utils" "^5.5.1" - "@0x/web3-wrapper" "^7.2.0" - "@types/solidity-parser-antlr" "^0.2.3" - chalk "^2.3.0" - ethereum-types "^3.2.0" - ethereumjs-util "^5.1.1" - ethers "~4.0.4" - glob "^7.1.2" - istanbul "^0.4.5" - lodash "^4.17.11" - loglevel "^1.6.1" - mkdirp "^0.5.1" - rimraf "^2.6.2" - semaphore-async-await "^1.5.1" - solc "^0.5.5" - solidity-parser-antlr "https://github.com/solidity-parser/parser" - -"@ethersproject/abi@5.0.0-beta.153": - version "5.0.0-beta.153" - resolved "https://registry.yarnpkg.com/@ethersproject/abi/-/abi-5.0.0-beta.153.tgz#43a37172b33794e4562999f6e2d555b7599a8eee" - integrity sha512-aXweZ1Z7vMNzJdLpR1CZUAIgnwjrZeUSvN9syCwlBaEBUFJmFY+HHnfuTI5vIhVs/mRkfJVrbEyl51JZQqyjAg== - dependencies: - "@ethersproject/address" ">=5.0.0-beta.128" - "@ethersproject/bignumber" ">=5.0.0-beta.130" - "@ethersproject/bytes" ">=5.0.0-beta.129" - "@ethersproject/constants" ">=5.0.0-beta.128" - "@ethersproject/hash" ">=5.0.0-beta.128" - "@ethersproject/keccak256" ">=5.0.0-beta.127" - "@ethersproject/logger" ">=5.0.0-beta.129" - "@ethersproject/properties" ">=5.0.0-beta.131" - "@ethersproject/strings" ">=5.0.0-beta.130" - -"@ethersproject/abi@5.4.1", "@ethersproject/abi@^5.4.0": - version "5.4.1" - resolved "https://registry.yarnpkg.com/@ethersproject/abi/-/abi-5.4.1.tgz#6ac28fafc9ef6f5a7a37e30356a2eb31fa05d39b" - integrity sha512-9mhbjUk76BiSluiiW4BaYyI58KSbDMMQpCLdsAR+RsT2GyATiNYxVv+pGWRrekmsIdY3I+hOqsYQSTkc8L/mcg== - dependencies: - "@ethersproject/address" "^5.4.0" - "@ethersproject/bignumber" "^5.4.0" - "@ethersproject/bytes" "^5.4.0" - "@ethersproject/constants" "^5.4.0" - "@ethersproject/hash" "^5.4.0" - "@ethersproject/keccak256" "^5.4.0" - "@ethersproject/logger" "^5.4.0" - "@ethersproject/properties" "^5.4.0" - "@ethersproject/strings" "^5.4.0" - -"@ethersproject/abstract-provider@5.4.1", "@ethersproject/abstract-provider@^5.4.0": - version "5.4.1" - resolved "https://registry.yarnpkg.com/@ethersproject/abstract-provider/-/abstract-provider-5.4.1.tgz#e404309a29f771bd4d28dbafadcaa184668c2a6e" - integrity sha512-3EedfKI3LVpjSKgAxoUaI+gB27frKsxzm+r21w9G60Ugk+3wVLQwhi1LsEJAKNV7WoZc8CIpNrATlL1QFABjtQ== - dependencies: - "@ethersproject/bignumber" "^5.4.0" - "@ethersproject/bytes" "^5.4.0" - "@ethersproject/logger" "^5.4.0" - "@ethersproject/networks" "^5.4.0" - "@ethersproject/properties" "^5.4.0" - "@ethersproject/transactions" "^5.4.0" - "@ethersproject/web" "^5.4.0" - -"@ethersproject/abstract-signer@5.4.1", "@ethersproject/abstract-signer@^5.4.0": - version "5.4.1" - resolved "https://registry.yarnpkg.com/@ethersproject/abstract-signer/-/abstract-signer-5.4.1.tgz#e4e9abcf4dd4f1ba0db7dff9746a5f78f355ea81" - integrity sha512-SkkFL5HVq1k4/25dM+NWP9MILgohJCgGv5xT5AcRruGz4ILpfHeBtO/y6j+Z3UN/PAjDeb4P7E51Yh8wcGNLGA== - dependencies: - "@ethersproject/abstract-provider" "^5.4.0" - "@ethersproject/bignumber" "^5.4.0" - "@ethersproject/bytes" "^5.4.0" - "@ethersproject/logger" "^5.4.0" - "@ethersproject/properties" "^5.4.0" - -"@ethersproject/address@5.4.0", "@ethersproject/address@^5.0.0", "@ethersproject/address@^5.4.0": - version "5.4.0" - resolved "https://registry.yarnpkg.com/@ethersproject/address/-/address-5.4.0.tgz#ba2d00a0f8c4c0854933b963b9a3a9f6eb4a37a3" - integrity sha512-SD0VgOEkcACEG/C6xavlU1Hy3m5DGSXW3CUHkaaEHbAPPsgi0coP5oNPsxau8eTlZOk/bpa/hKeCNoK5IzVI2Q== - dependencies: - "@ethersproject/bignumber" "^5.4.0" - "@ethersproject/bytes" "^5.4.0" - "@ethersproject/keccak256" "^5.4.0" - "@ethersproject/logger" "^5.4.0" - "@ethersproject/rlp" "^5.4.0" - -"@ethersproject/address@>=5.0.0-beta.128": - version "5.0.2" - resolved "https://registry.yarnpkg.com/@ethersproject/address/-/address-5.0.2.tgz#80d0ddfb7d4bd0d32657747fa4bdd2defef2e00a" - integrity sha512-+rz26RKj7ujGfQynys4V9VJRbR+wpC6eL8F22q3raWMH3152Ha31GwJPWzxE/bEA+43M/zTNVwY0R53gn53L2Q== - dependencies: - "@ethersproject/bignumber" "^5.0.0" - "@ethersproject/bytes" "^5.0.0" - "@ethersproject/keccak256" "^5.0.0" - "@ethersproject/logger" "^5.0.0" - "@ethersproject/rlp" "^5.0.0" - bn.js "^4.4.0" - -"@ethersproject/base64@5.4.0", "@ethersproject/base64@^5.4.0": - version "5.4.0" - resolved "https://registry.yarnpkg.com/@ethersproject/base64/-/base64-5.4.0.tgz#7252bf65295954c9048c7ca5f43e5c86441b2a9a" - integrity sha512-CjQw6E17QDSSC5jiM9YpF7N1aSCHmYGMt9bWD8PWv6YPMxjsys2/Q8xLrROKI3IWJ7sFfZ8B3flKDTM5wlWuZQ== - dependencies: - "@ethersproject/bytes" "^5.4.0" - -"@ethersproject/basex@5.4.0", "@ethersproject/basex@^5.4.0": - version "5.4.0" - resolved "https://registry.yarnpkg.com/@ethersproject/basex/-/basex-5.4.0.tgz#0a2da0f4e76c504a94f2b21d3161ed9438c7f8a6" - integrity sha512-J07+QCVJ7np2bcpxydFVf/CuYo9mZ7T73Pe7KQY4c1lRlrixMeblauMxHXD0MPwFmUHZIILDNViVkykFBZylbg== - dependencies: - "@ethersproject/bytes" "^5.4.0" - "@ethersproject/properties" "^5.4.0" - -"@ethersproject/bignumber@5.4.1", "@ethersproject/bignumber@^5.0.0", "@ethersproject/bignumber@^5.4.0": - version "5.4.1" - resolved "https://registry.yarnpkg.com/@ethersproject/bignumber/-/bignumber-5.4.1.tgz#64399d3b9ae80aa83d483e550ba57ea062c1042d" - integrity sha512-fJhdxqoQNuDOk6epfM7yD6J8Pol4NUCy1vkaGAkuujZm0+lNow//MKu1hLhRiYV4BsOHyBv5/lsTjF+7hWwhJg== - dependencies: - "@ethersproject/bytes" "^5.4.0" - "@ethersproject/logger" "^5.4.0" - bn.js "^4.11.9" - -"@ethersproject/bignumber@>=5.0.0-beta.130": - version "5.0.5" - resolved "https://registry.yarnpkg.com/@ethersproject/bignumber/-/bignumber-5.0.5.tgz#31bd7e75aad46ace345fae69b1f5bb120906af1b" - integrity sha512-24ln7PV0g8ZzjcVZiLW9Wod0i+XCmK6zKkAaxw5enraTIT1p7gVOcSXFSzNQ9WYAwtiFQPvvA+TIO2oEITZNJA== - dependencies: - "@ethersproject/bytes" "^5.0.0" - "@ethersproject/logger" "^5.0.0" - bn.js "^4.4.0" - -"@ethersproject/bytes@5.4.0", "@ethersproject/bytes@^5.0.0", "@ethersproject/bytes@^5.4.0": - version "5.4.0" - resolved "https://registry.yarnpkg.com/@ethersproject/bytes/-/bytes-5.4.0.tgz#56fa32ce3bf67153756dbaefda921d1d4774404e" - integrity sha512-H60ceqgTHbhzOj4uRc/83SCN9d+BSUnOkrr2intevqdtEMO1JFVZ1XL84OEZV+QjV36OaZYxtnt4lGmxcGsPfA== - dependencies: - "@ethersproject/logger" "^5.4.0" - -"@ethersproject/bytes@>=5.0.0-beta.129": - version "5.0.3" - resolved "https://registry.yarnpkg.com/@ethersproject/bytes/-/bytes-5.0.3.tgz#b3769963ae0188a35713d343890a903bda20af9c" - integrity sha512-AyPMAlY+Amaw4Zfp8OAivm1xYPI8mqiUYmEnSUk1CnS2NrQGHEMmFJFiOJdS3gDDpgSOFhWIjZwxKq2VZpqNTA== - dependencies: - "@ethersproject/logger" "^5.0.0" - -"@ethersproject/constants@5.4.0", "@ethersproject/constants@^5.0.0", "@ethersproject/constants@^5.4.0": - version "5.4.0" - resolved "https://registry.yarnpkg.com/@ethersproject/constants/-/constants-5.4.0.tgz#ee0bdcb30bf1b532d2353c977bf2ef1ee117958a" - integrity sha512-tzjn6S7sj9+DIIeKTJLjK9WGN2Tj0P++Z8ONEIlZjyoTkBuODN+0VfhAyYksKi43l1Sx9tX2VlFfzjfmr5Wl3Q== - dependencies: - "@ethersproject/bignumber" "^5.4.0" - -"@ethersproject/constants@>=5.0.0-beta.128": - version "5.0.2" - resolved "https://registry.yarnpkg.com/@ethersproject/constants/-/constants-5.0.2.tgz#f7ac0b320e2bbec1a5950da075015f8bc4e8fed1" - integrity sha512-nNoVlNP6bgpog7pQ2EyD1xjlaXcy1Cl4kK5v1KoskHj58EtB6TK8M8AFGi3GgHTdMldfT4eN3OsoQ/CdOTVNFA== - dependencies: - "@ethersproject/bignumber" "^5.0.0" - -"@ethersproject/contracts@5.4.1": - version "5.4.1" - resolved "https://registry.yarnpkg.com/@ethersproject/contracts/-/contracts-5.4.1.tgz#3eb4f35b7fe60a962a75804ada2746494df3e470" - integrity sha512-m+z2ZgPy4pyR15Je//dUaymRUZq5MtDajF6GwFbGAVmKz/RF+DNIPwF0k5qEcL3wPGVqUjFg2/krlCRVTU4T5w== - dependencies: - "@ethersproject/abi" "^5.4.0" - "@ethersproject/abstract-provider" "^5.4.0" - "@ethersproject/abstract-signer" "^5.4.0" - "@ethersproject/address" "^5.4.0" - "@ethersproject/bignumber" "^5.4.0" - "@ethersproject/bytes" "^5.4.0" - "@ethersproject/constants" "^5.4.0" - "@ethersproject/logger" "^5.4.0" - "@ethersproject/properties" "^5.4.0" - "@ethersproject/transactions" "^5.4.0" - -"@ethersproject/hash@5.4.0", "@ethersproject/hash@^5.4.0": - version "5.4.0" - resolved "https://registry.yarnpkg.com/@ethersproject/hash/-/hash-5.4.0.tgz#d18a8e927e828e22860a011f39e429d388344ae0" - integrity sha512-xymAM9tmikKgbktOCjW60Z5sdouiIIurkZUr9oW5NOex5uwxrbsYG09kb5bMcNjlVeJD3yPivTNzViIs1GCbqA== - dependencies: - "@ethersproject/abstract-signer" "^5.4.0" - "@ethersproject/address" "^5.4.0" - "@ethersproject/bignumber" "^5.4.0" - "@ethersproject/bytes" "^5.4.0" - "@ethersproject/keccak256" "^5.4.0" - "@ethersproject/logger" "^5.4.0" - "@ethersproject/properties" "^5.4.0" - "@ethersproject/strings" "^5.4.0" - -"@ethersproject/hash@>=5.0.0-beta.128": - version "5.0.2" - resolved "https://registry.yarnpkg.com/@ethersproject/hash/-/hash-5.0.2.tgz#6d69558786961836d530b8b4a8714eac5388aec7" - integrity sha512-dWGvNwmVRX2bxoQQ3ciMw46Vzl1nqfL+5R8+2ZxsRXD3Cjgw1dL2mdjJF7xMMWPvPdrlhKXWSK0gb8VLwHZ8Cw== - dependencies: - "@ethersproject/bytes" "^5.0.0" - "@ethersproject/keccak256" "^5.0.0" - "@ethersproject/logger" "^5.0.0" - "@ethersproject/strings" "^5.0.0" - -"@ethersproject/hdnode@5.4.0", "@ethersproject/hdnode@^5.4.0": - version "5.4.0" - resolved "https://registry.yarnpkg.com/@ethersproject/hdnode/-/hdnode-5.4.0.tgz#4bc9999b9a12eb5ce80c5faa83114a57e4107cac" - integrity sha512-pKxdS0KAaeVGfZPp1KOiDLB0jba11tG6OP1u11QnYfb7pXn6IZx0xceqWRr6ygke8+Kw74IpOoSi7/DwANhy8Q== - dependencies: - "@ethersproject/abstract-signer" "^5.4.0" - "@ethersproject/basex" "^5.4.0" - "@ethersproject/bignumber" "^5.4.0" - "@ethersproject/bytes" "^5.4.0" - "@ethersproject/logger" "^5.4.0" - "@ethersproject/pbkdf2" "^5.4.0" - "@ethersproject/properties" "^5.4.0" - "@ethersproject/sha2" "^5.4.0" - "@ethersproject/signing-key" "^5.4.0" - "@ethersproject/strings" "^5.4.0" - "@ethersproject/transactions" "^5.4.0" - "@ethersproject/wordlists" "^5.4.0" - -"@ethersproject/json-wallets@5.4.0", "@ethersproject/json-wallets@^5.4.0": - version "5.4.0" - resolved "https://registry.yarnpkg.com/@ethersproject/json-wallets/-/json-wallets-5.4.0.tgz#2583341cfe313fc9856642e8ace3080154145e95" - integrity sha512-igWcu3fx4aiczrzEHwG1xJZo9l1cFfQOWzTqwRw/xcvxTk58q4f9M7cjh51EKphMHvrJtcezJ1gf1q1AUOfEQQ== - dependencies: - "@ethersproject/abstract-signer" "^5.4.0" - "@ethersproject/address" "^5.4.0" - "@ethersproject/bytes" "^5.4.0" - "@ethersproject/hdnode" "^5.4.0" - "@ethersproject/keccak256" "^5.4.0" - "@ethersproject/logger" "^5.4.0" - "@ethersproject/pbkdf2" "^5.4.0" - "@ethersproject/properties" "^5.4.0" - "@ethersproject/random" "^5.4.0" - "@ethersproject/strings" "^5.4.0" - "@ethersproject/transactions" "^5.4.0" - aes-js "3.0.0" - scrypt-js "3.0.1" - -"@ethersproject/keccak256@5.4.0", "@ethersproject/keccak256@^5.0.0", "@ethersproject/keccak256@^5.4.0": - version "5.4.0" - resolved "https://registry.yarnpkg.com/@ethersproject/keccak256/-/keccak256-5.4.0.tgz#7143b8eea4976080241d2bd92e3b1f1bf7025318" - integrity sha512-FBI1plWet+dPUvAzPAeHzRKiPpETQzqSUWR1wXJGHVWi4i8bOSrpC3NwpkPjgeXG7MnugVc1B42VbfnQikyC/A== - dependencies: - "@ethersproject/bytes" "^5.4.0" - js-sha3 "0.5.7" - -"@ethersproject/keccak256@>=5.0.0-beta.127": - version "5.0.2" - resolved "https://registry.yarnpkg.com/@ethersproject/keccak256/-/keccak256-5.0.2.tgz#7ed4a95bb45ee502cf4532223833740a83602797" - integrity sha512-MbroXutc0gPNYIrUjS4Aw0lDuXabdzI7+l7elRWr1G6G+W0v00e/3gbikWkCReGtt2Jnt4lQSgnflhDwQGcIhA== - dependencies: - "@ethersproject/bytes" "^5.0.0" - js-sha3 "0.5.7" - -"@ethersproject/logger@5.4.1", "@ethersproject/logger@^5.0.0", "@ethersproject/logger@^5.4.0": - version "5.4.1" - resolved "https://registry.yarnpkg.com/@ethersproject/logger/-/logger-5.4.1.tgz#503bd33683538b923c578c07d1c2c0dd18672054" - integrity sha512-DZ+bRinnYLPw1yAC64oRl0QyVZj43QeHIhVKfD/+YwSz4wsv1pfwb5SOFjz+r710YEWzU6LrhuSjpSO+6PeE4A== - -"@ethersproject/logger@>=5.0.0-beta.129": - version "5.0.4" - resolved "https://registry.yarnpkg.com/@ethersproject/logger/-/logger-5.0.4.tgz#09fa4765b5691233e3afb6617cb38a700f9dd2e4" - integrity sha512-alA2LiAy1LdQ/L1SA9ajUC7MvGAEQLsICEfKK4erX5qhkXE1LwLSPIzobtOWFsMHf2yrXGKBLnnpuVHprI3sAw== - -"@ethersproject/networks@5.4.2", "@ethersproject/networks@^5.4.0": - version "5.4.2" - resolved "https://registry.yarnpkg.com/@ethersproject/networks/-/networks-5.4.2.tgz#2247d977626e97e2c3b8ee73cd2457babde0ce35" - integrity sha512-eekOhvJyBnuibfJnhtK46b8HimBc5+4gqpvd1/H9LEl7Q7/qhsIhM81dI9Fcnjpk3jB1aTy6bj0hz3cifhNeYw== - dependencies: - "@ethersproject/logger" "^5.4.0" - -"@ethersproject/pbkdf2@5.4.0", "@ethersproject/pbkdf2@^5.4.0": - version "5.4.0" - resolved "https://registry.yarnpkg.com/@ethersproject/pbkdf2/-/pbkdf2-5.4.0.tgz#ed88782a67fda1594c22d60d0ca911a9d669641c" - integrity sha512-x94aIv6tiA04g6BnazZSLoRXqyusawRyZWlUhKip2jvoLpzJuLb//KtMM6PEovE47pMbW+Qe1uw+68ameJjB7g== - dependencies: - "@ethersproject/bytes" "^5.4.0" - "@ethersproject/sha2" "^5.4.0" - -"@ethersproject/properties@5.4.1", "@ethersproject/properties@^5.0.0", "@ethersproject/properties@^5.4.0": - version "5.4.1" - resolved "https://registry.yarnpkg.com/@ethersproject/properties/-/properties-5.4.1.tgz#9f051f976ce790142c6261ccb7b826eaae1f2f36" - integrity sha512-cyCGlF8wWlIZyizsj2PpbJ9I7rIlUAfnHYwy/T90pdkSn/NFTa5YWZx2wTJBe9V7dD65dcrrEMisCRUJiq6n3w== - dependencies: - "@ethersproject/logger" "^5.4.0" - -"@ethersproject/properties@>=5.0.0-beta.131": - version "5.0.2" - resolved "https://registry.yarnpkg.com/@ethersproject/properties/-/properties-5.0.2.tgz#2facb62d2f2d968c7b3d0befa5bcc884cc565d3b" - integrity sha512-FxAisPGAOACQjMJzewl9OJG6lsGCPTm5vpUMtfeoxzAlAb2lv+kHzQPUh9h4jfAILzE8AR1jgXMzRmlhwyra1Q== - dependencies: - "@ethersproject/logger" "^5.0.0" - -"@ethersproject/providers@5.4.5": - version "5.4.5" - resolved "https://registry.yarnpkg.com/@ethersproject/providers/-/providers-5.4.5.tgz#eb2ea2a743a8115f79604a8157233a3a2c832928" - integrity sha512-1GkrvkiAw3Fj28cwi1Sqm8ED1RtERtpdXmRfwIBGmqBSN5MoeRUHuwHPppMtbPayPgpFcvD7/Gdc9doO5fGYgw== - dependencies: - "@ethersproject/abstract-provider" "^5.4.0" - "@ethersproject/abstract-signer" "^5.4.0" - "@ethersproject/address" "^5.4.0" - "@ethersproject/basex" "^5.4.0" - "@ethersproject/bignumber" "^5.4.0" - "@ethersproject/bytes" "^5.4.0" - "@ethersproject/constants" "^5.4.0" - "@ethersproject/hash" "^5.4.0" - "@ethersproject/logger" "^5.4.0" - "@ethersproject/networks" "^5.4.0" - "@ethersproject/properties" "^5.4.0" - "@ethersproject/random" "^5.4.0" - "@ethersproject/rlp" "^5.4.0" - "@ethersproject/sha2" "^5.4.0" - "@ethersproject/strings" "^5.4.0" - "@ethersproject/transactions" "^5.4.0" - "@ethersproject/web" "^5.4.0" - bech32 "1.1.4" - ws "7.4.6" - -"@ethersproject/random@5.4.0", "@ethersproject/random@^5.4.0": - version "5.4.0" - resolved "https://registry.yarnpkg.com/@ethersproject/random/-/random-5.4.0.tgz#9cdde60e160d024be39cc16f8de3b9ce39191e16" - integrity sha512-pnpWNQlf0VAZDEOVp1rsYQosmv2o0ITS/PecNw+mS2/btF8eYdspkN0vIXrCMtkX09EAh9bdk8GoXmFXM1eAKw== - dependencies: - "@ethersproject/bytes" "^5.4.0" - "@ethersproject/logger" "^5.4.0" - -"@ethersproject/rlp@5.4.0", "@ethersproject/rlp@^5.0.0", "@ethersproject/rlp@^5.4.0": - version "5.4.0" - resolved "https://registry.yarnpkg.com/@ethersproject/rlp/-/rlp-5.4.0.tgz#de61afda5ff979454e76d3b3310a6c32ad060931" - integrity sha512-0I7MZKfi+T5+G8atId9QaQKHRvvasM/kqLyAH4XxBCBchAooH2EX5rL9kYZWwcm3awYV+XC7VF6nLhfeQFKVPg== - dependencies: - "@ethersproject/bytes" "^5.4.0" - "@ethersproject/logger" "^5.4.0" - -"@ethersproject/sha2@5.4.0", "@ethersproject/sha2@^5.4.0": - version "5.4.0" - resolved "https://registry.yarnpkg.com/@ethersproject/sha2/-/sha2-5.4.0.tgz#c9a8db1037014cbc4e9482bd662f86c090440371" - integrity sha512-siheo36r1WD7Cy+bDdE1BJ8y0bDtqXCOxRMzPa4bV1TGt/eTUUt03BHoJNB6reWJD8A30E/pdJ8WFkq+/uz4Gg== - dependencies: - "@ethersproject/bytes" "^5.4.0" - "@ethersproject/logger" "^5.4.0" - hash.js "1.1.7" - -"@ethersproject/signing-key@5.4.0", "@ethersproject/signing-key@^5.0.0", "@ethersproject/signing-key@^5.4.0": - version "5.4.0" - resolved "https://registry.yarnpkg.com/@ethersproject/signing-key/-/signing-key-5.4.0.tgz#2f05120984e81cf89a3d5f6dec5c68ee0894fbec" - integrity sha512-q8POUeywx6AKg2/jX9qBYZIAmKSB4ubGXdQ88l40hmATj29JnG5pp331nAWwwxPn2Qao4JpWHNZsQN+bPiSW9A== - dependencies: - "@ethersproject/bytes" "^5.4.0" - "@ethersproject/logger" "^5.4.0" - "@ethersproject/properties" "^5.4.0" - bn.js "^4.11.9" - elliptic "6.5.4" - hash.js "1.1.7" - -"@ethersproject/solidity@5.4.0": - version "5.4.0" - resolved "https://registry.yarnpkg.com/@ethersproject/solidity/-/solidity-5.4.0.tgz#1305e058ea02dc4891df18b33232b11a14ece9ec" - integrity sha512-XFQTZ7wFSHOhHcV1DpcWj7VXECEiSrBuv7JErJvB9Uo+KfCdc3QtUZV+Vjh/AAaYgezUEKbCtE6Khjm44seevQ== - dependencies: - "@ethersproject/bignumber" "^5.4.0" - "@ethersproject/bytes" "^5.4.0" - "@ethersproject/keccak256" "^5.4.0" - "@ethersproject/sha2" "^5.4.0" - "@ethersproject/strings" "^5.4.0" - -"@ethersproject/strings@5.4.0", "@ethersproject/strings@^5.0.0", "@ethersproject/strings@^5.4.0": - version "5.4.0" - resolved "https://registry.yarnpkg.com/@ethersproject/strings/-/strings-5.4.0.tgz#fb12270132dd84b02906a8d895ae7e7fa3d07d9a" - integrity sha512-k/9DkH5UGDhv7aReXLluFG5ExurwtIpUfnDNhQA29w896Dw3i4uDTz01Quaptbks1Uj9kI8wo9tmW73wcIEaWA== - dependencies: - "@ethersproject/bytes" "^5.4.0" - "@ethersproject/constants" "^5.4.0" - "@ethersproject/logger" "^5.4.0" - -"@ethersproject/strings@>=5.0.0-beta.130": - version "5.0.2" - resolved "https://registry.yarnpkg.com/@ethersproject/strings/-/strings-5.0.2.tgz#1753408c3c889813fd0992abd76393e3e47a2619" - integrity sha512-oNa+xvSqsFU96ndzog0IBTtsRFGOqGpzrXJ7shXLBT7juVeSEyZA/sYs0DMZB5mJ9FEjHdZKxR/rTyBY91vuXg== - dependencies: - "@ethersproject/bytes" "^5.0.0" - "@ethersproject/constants" "^5.0.0" - "@ethersproject/logger" "^5.0.0" - -"@ethersproject/transactions@5.4.0", "@ethersproject/transactions@^5.4.0": - version "5.4.0" - resolved "https://registry.yarnpkg.com/@ethersproject/transactions/-/transactions-5.4.0.tgz#a159d035179334bd92f340ce0f77e83e9e1522e0" - integrity sha512-s3EjZZt7xa4BkLknJZ98QGoIza94rVjaEed0rzZ/jB9WrIuu/1+tjvYCWzVrystXtDswy7TPBeIepyXwSYa4WQ== - dependencies: - "@ethersproject/address" "^5.4.0" - "@ethersproject/bignumber" "^5.4.0" - "@ethersproject/bytes" "^5.4.0" - "@ethersproject/constants" "^5.4.0" - "@ethersproject/keccak256" "^5.4.0" - "@ethersproject/logger" "^5.4.0" - "@ethersproject/properties" "^5.4.0" - "@ethersproject/rlp" "^5.4.0" - "@ethersproject/signing-key" "^5.4.0" - -"@ethersproject/transactions@^5.0.0-beta.135": - version "5.0.2" - resolved "https://registry.yarnpkg.com/@ethersproject/transactions/-/transactions-5.0.2.tgz#590ede71fc87b45be7bd46002e18ae52246a2347" - integrity sha512-jZp0ZbbJlq4JLZY6qoMzNtp2HQsX6USQposi3ns0MPUdn3OdZJBDtrcO15r/2VS5t/K1e1GE5MI1HmMKlcTbbQ== - dependencies: - "@ethersproject/address" "^5.0.0" - "@ethersproject/bignumber" "^5.0.0" - "@ethersproject/bytes" "^5.0.0" - "@ethersproject/constants" "^5.0.0" - "@ethersproject/keccak256" "^5.0.0" - "@ethersproject/logger" "^5.0.0" - "@ethersproject/properties" "^5.0.0" - "@ethersproject/rlp" "^5.0.0" - "@ethersproject/signing-key" "^5.0.0" - -"@ethersproject/units@5.4.0": - version "5.4.0" - resolved "https://registry.yarnpkg.com/@ethersproject/units/-/units-5.4.0.tgz#d57477a4498b14b88b10396062c8cbbaf20c79fe" - integrity sha512-Z88krX40KCp+JqPCP5oPv5p750g+uU6gopDYRTBGcDvOASh6qhiEYCRatuM/suC4S2XW9Zz90QI35MfSrTIaFg== - dependencies: - "@ethersproject/bignumber" "^5.4.0" - "@ethersproject/constants" "^5.4.0" - "@ethersproject/logger" "^5.4.0" - -"@ethersproject/wallet@5.4.0": - version "5.4.0" - resolved "https://registry.yarnpkg.com/@ethersproject/wallet/-/wallet-5.4.0.tgz#fa5b59830b42e9be56eadd45a16a2e0933ad9353" - integrity sha512-wU29majLjM6AjCjpat21mPPviG+EpK7wY1+jzKD0fg3ui5fgedf2zEu1RDgpfIMsfn8fJHJuzM4zXZ2+hSHaSQ== - dependencies: - "@ethersproject/abstract-provider" "^5.4.0" - "@ethersproject/abstract-signer" "^5.4.0" - "@ethersproject/address" "^5.4.0" - "@ethersproject/bignumber" "^5.4.0" - "@ethersproject/bytes" "^5.4.0" - "@ethersproject/hash" "^5.4.0" - "@ethersproject/hdnode" "^5.4.0" - "@ethersproject/json-wallets" "^5.4.0" - "@ethersproject/keccak256" "^5.4.0" - "@ethersproject/logger" "^5.4.0" - "@ethersproject/properties" "^5.4.0" - "@ethersproject/random" "^5.4.0" - "@ethersproject/signing-key" "^5.4.0" - "@ethersproject/transactions" "^5.4.0" - "@ethersproject/wordlists" "^5.4.0" - -"@ethersproject/web@5.4.0", "@ethersproject/web@^5.4.0": - version "5.4.0" - resolved "https://registry.yarnpkg.com/@ethersproject/web/-/web-5.4.0.tgz#49fac173b96992334ed36a175538ba07a7413d1f" - integrity sha512-1bUusGmcoRLYgMn6c1BLk1tOKUIFuTg8j+6N8lYlbMpDesnle+i3pGSagGNvwjaiLo4Y5gBibwctpPRmjrh4Og== - dependencies: - "@ethersproject/base64" "^5.4.0" - "@ethersproject/bytes" "^5.4.0" - "@ethersproject/logger" "^5.4.0" - "@ethersproject/properties" "^5.4.0" - "@ethersproject/strings" "^5.4.0" - -"@ethersproject/wordlists@5.4.0", "@ethersproject/wordlists@^5.4.0": - version "5.4.0" - resolved "https://registry.yarnpkg.com/@ethersproject/wordlists/-/wordlists-5.4.0.tgz#f34205ec3bbc9e2c49cadaee774cf0b07e7573d7" - integrity sha512-FemEkf6a+EBKEPxlzeVgUaVSodU7G0Na89jqKjmWMlDB0tomoU8RlEMgUvXyqtrg8N4cwpLh8nyRnm1Nay1isA== - dependencies: - "@ethersproject/bytes" "^5.4.0" - "@ethersproject/hash" "^5.4.0" - "@ethersproject/logger" "^5.4.0" - "@ethersproject/properties" "^5.4.0" - "@ethersproject/strings" "^5.4.0" - -"@jest/console@^24.7.1", "@jest/console@^24.9.0": - version "24.9.0" - resolved "https://registry.yarnpkg.com/@jest/console/-/console-24.9.0.tgz#79b1bc06fb74a8cfb01cbdedf945584b1b9707f0" - integrity sha512-Zuj6b8TnKXi3q4ymac8EQfc3ea/uhLeCGThFqXeC8H9/raaH8ARPUTdId+XyGd03Z4In0/VjD2OYFcBF09fNLQ== - dependencies: - "@jest/source-map" "^24.9.0" - chalk "^2.0.1" - slash "^2.0.0" - -"@jest/core@^24.9.0": - version "24.9.0" - resolved "https://registry.yarnpkg.com/@jest/core/-/core-24.9.0.tgz#2ceccd0b93181f9c4850e74f2a9ad43d351369c4" - integrity sha512-Fogg3s4wlAr1VX7q+rhV9RVnUv5tD7VuWfYy1+whMiWUrvl7U3QJSJyWcDio9Lq2prqYsZaeTv2Rz24pWGkJ2A== - dependencies: - "@jest/console" "^24.7.1" - "@jest/reporters" "^24.9.0" - "@jest/test-result" "^24.9.0" - "@jest/transform" "^24.9.0" - "@jest/types" "^24.9.0" - ansi-escapes "^3.0.0" - chalk "^2.0.1" - exit "^0.1.2" - graceful-fs "^4.1.15" - jest-changed-files "^24.9.0" - jest-config "^24.9.0" - jest-haste-map "^24.9.0" - jest-message-util "^24.9.0" - jest-regex-util "^24.3.0" - jest-resolve "^24.9.0" - jest-resolve-dependencies "^24.9.0" - jest-runner "^24.9.0" - jest-runtime "^24.9.0" - jest-snapshot "^24.9.0" - jest-util "^24.9.0" - jest-validate "^24.9.0" - jest-watcher "^24.9.0" - micromatch "^3.1.10" - p-each-series "^1.0.0" - realpath-native "^1.1.0" - rimraf "^2.5.4" - slash "^2.0.0" - strip-ansi "^5.0.0" - -"@jest/environment@^24.9.0": - version "24.9.0" - resolved "https://registry.yarnpkg.com/@jest/environment/-/environment-24.9.0.tgz#21e3afa2d65c0586cbd6cbefe208bafade44ab18" - integrity sha512-5A1QluTPhvdIPFYnO3sZC3smkNeXPVELz7ikPbhUj0bQjB07EoE9qtLrem14ZUYWdVayYbsjVwIiL4WBIMV4aQ== - dependencies: - "@jest/fake-timers" "^24.9.0" - "@jest/transform" "^24.9.0" - "@jest/types" "^24.9.0" - jest-mock "^24.9.0" - -"@jest/fake-timers@^24.9.0": - version "24.9.0" - resolved "https://registry.yarnpkg.com/@jest/fake-timers/-/fake-timers-24.9.0.tgz#ba3e6bf0eecd09a636049896434d306636540c93" - integrity sha512-eWQcNa2YSwzXWIMC5KufBh3oWRIijrQFROsIqt6v/NS9Io/gknw1jsAC9c+ih/RQX4A3O7SeWAhQeN0goKhT9A== - dependencies: - "@jest/types" "^24.9.0" - jest-message-util "^24.9.0" - jest-mock "^24.9.0" - -"@jest/reporters@^24.9.0": - version "24.9.0" - resolved "https://registry.yarnpkg.com/@jest/reporters/-/reporters-24.9.0.tgz#86660eff8e2b9661d042a8e98a028b8d631a5b43" - integrity sha512-mu4X0yjaHrffOsWmVLzitKmmmWSQ3GGuefgNscUSWNiUNcEOSEQk9k3pERKEQVBb0Cnn88+UESIsZEMH3o88Gw== - dependencies: - "@jest/environment" "^24.9.0" - "@jest/test-result" "^24.9.0" - "@jest/transform" "^24.9.0" - "@jest/types" "^24.9.0" - chalk "^2.0.1" - exit "^0.1.2" - glob "^7.1.2" - istanbul-lib-coverage "^2.0.2" - istanbul-lib-instrument "^3.0.1" - istanbul-lib-report "^2.0.4" - istanbul-lib-source-maps "^3.0.1" - istanbul-reports "^2.2.6" - jest-haste-map "^24.9.0" - jest-resolve "^24.9.0" - jest-runtime "^24.9.0" - jest-util "^24.9.0" - jest-worker "^24.6.0" - node-notifier "^5.4.2" - slash "^2.0.0" - source-map "^0.6.0" - string-length "^2.0.0" - -"@jest/source-map@^24.3.0", "@jest/source-map@^24.9.0": - version "24.9.0" - resolved "https://registry.yarnpkg.com/@jest/source-map/-/source-map-24.9.0.tgz#0e263a94430be4b41da683ccc1e6bffe2a191714" - integrity sha512-/Xw7xGlsZb4MJzNDgB7PW5crou5JqWiBQaz6xyPd3ArOg2nfn/PunV8+olXbbEZzNl591o5rWKE9BRDaFAuIBg== - dependencies: - callsites "^3.0.0" - graceful-fs "^4.1.15" - source-map "^0.6.0" - -"@jest/test-result@^24.9.0": - version "24.9.0" - resolved "https://registry.yarnpkg.com/@jest/test-result/-/test-result-24.9.0.tgz#11796e8aa9dbf88ea025757b3152595ad06ba0ca" - integrity sha512-XEFrHbBonBJ8dGp2JmF8kP/nQI/ImPpygKHwQ/SY+es59Z3L5PI4Qb9TQQMAEeYsThG1xF0k6tmG0tIKATNiiA== - dependencies: - "@jest/console" "^24.9.0" - "@jest/types" "^24.9.0" - "@types/istanbul-lib-coverage" "^2.0.0" - -"@jest/test-sequencer@^24.9.0": - version "24.9.0" - resolved "https://registry.yarnpkg.com/@jest/test-sequencer/-/test-sequencer-24.9.0.tgz#f8f334f35b625a4f2f355f2fe7e6036dad2e6b31" - integrity sha512-6qqsU4o0kW1dvA95qfNog8v8gkRN9ph6Lz7r96IvZpHdNipP2cBcb07J1Z45mz/VIS01OHJ3pY8T5fUY38tg4A== - dependencies: - "@jest/test-result" "^24.9.0" - jest-haste-map "^24.9.0" - jest-runner "^24.9.0" - jest-runtime "^24.9.0" - -"@jest/transform@^24.9.0": - version "24.9.0" - resolved "https://registry.yarnpkg.com/@jest/transform/-/transform-24.9.0.tgz#4ae2768b296553fadab09e9ec119543c90b16c56" - integrity sha512-TcQUmyNRxV94S0QpMOnZl0++6RMiqpbH/ZMccFB/amku6Uwvyb1cjYX7xkp5nGNkbX4QPH/FcB6q1HBTHynLmQ== - dependencies: - "@babel/core" "^7.1.0" - "@jest/types" "^24.9.0" - babel-plugin-istanbul "^5.1.0" - chalk "^2.0.1" - convert-source-map "^1.4.0" - fast-json-stable-stringify "^2.0.0" - graceful-fs "^4.1.15" - jest-haste-map "^24.9.0" - jest-regex-util "^24.9.0" - jest-util "^24.9.0" - micromatch "^3.1.10" - pirates "^4.0.1" - realpath-native "^1.1.0" - slash "^2.0.0" - source-map "^0.6.1" - write-file-atomic "2.4.1" - -"@jest/types@^24.9.0": - version "24.9.0" - resolved "https://registry.yarnpkg.com/@jest/types/-/types-24.9.0.tgz#63cb26cb7500d069e5a389441a7c6ab5e909fc59" - integrity sha512-XKK7ze1apu5JWQ5eZjHITP66AX+QsLlbaJRBGYr8pNzwcAE2JVkwnf0yqjHTsDRcjR0mujy/NmZMXw5kl+kGBw== - dependencies: - "@types/istanbul-lib-coverage" "^2.0.0" - "@types/istanbul-reports" "^1.1.1" - "@types/yargs" "^13.0.0" - -"@jest/types@^25.3.0": - version "25.3.0" - resolved "https://registry.yarnpkg.com/@jest/types/-/types-25.3.0.tgz#88f94b277a1d028fd7117bc1f74451e0fc2131e7" - integrity sha512-UkaDNewdqXAmCDbN2GlUM6amDKS78eCqiw/UmF5nE0mmLTd6moJkiZJML/X52Ke3LH7Swhw883IRXq8o9nWjVw== - dependencies: - "@types/istanbul-lib-coverage" "^2.0.0" - "@types/istanbul-reports" "^1.1.1" - "@types/yargs" "^15.0.0" - chalk "^3.0.0" - -"@ledgerhq/devices@^4.78.0": - version "4.78.0" - resolved "https://registry.yarnpkg.com/@ledgerhq/devices/-/devices-4.78.0.tgz#149b572f0616096e2bd5eb14ce14d0061c432be6" - integrity sha512-tWKS5WM/UU82czihnVjRwz9SXNTQzWjGJ/7+j/xZ70O86nlnGJ1aaFbs5/WTzfrVKpOKgj1ZoZkAswX67i/JTw== - dependencies: - "@ledgerhq/errors" "^4.78.0" - "@ledgerhq/logs" "^4.72.0" - rxjs "^6.5.3" - -"@ledgerhq/errors@^4.78.0": - version "4.78.0" - resolved "https://registry.yarnpkg.com/@ledgerhq/errors/-/errors-4.78.0.tgz#23daf3af54d03b1bda3e616002b555da1bdb705a" - integrity sha512-FX6zHZeiNtegBvXabK6M5dJ+8OV8kQGGaGtuXDeK/Ss5EmG4Ltxc6Lnhe8hiHpm9pCHtktOsnUVL7IFBdHhYUg== - -"@ledgerhq/hw-app-eth@^4.3.0": - version "4.78.0" - resolved "https://registry.yarnpkg.com/@ledgerhq/hw-app-eth/-/hw-app-eth-4.78.0.tgz#fbd7ffe7f371d0c32a53f38c5149ab8d13514297" - integrity sha512-m4s4Zhy4lwYJjZB3xPeGV/8mxQcnoui+Eu1KDEl6atsquZHUpbtern/0hZl88+OlFUz0XrX34W3I9cqj61Y6KA== - dependencies: - "@ledgerhq/errors" "^4.78.0" - "@ledgerhq/hw-transport" "^4.78.0" - -"@ledgerhq/hw-transport-node-hid-noevents@^4.78.0": - version "4.78.0" - resolved "https://registry.yarnpkg.com/@ledgerhq/hw-transport-node-hid-noevents/-/hw-transport-node-hid-noevents-4.78.0.tgz#6f0dbe1bbfad6516b42ad2d6b6b34a8b07e4cd46" - integrity sha512-CJPVR4wksq+apiXH2GnsttguBxmj9zdM2HjqZ3dHZN8SFW/9Xj3k+baS+pYoUISkECVxDrdfaW3Bd5dWv+jPUg== - dependencies: - "@ledgerhq/devices" "^4.78.0" - "@ledgerhq/errors" "^4.78.0" - "@ledgerhq/hw-transport" "^4.78.0" - "@ledgerhq/logs" "^4.72.0" - node-hid "^0.7.9" - -"@ledgerhq/hw-transport-node-hid@^4.3.0": - version "4.78.0" - resolved "https://registry.yarnpkg.com/@ledgerhq/hw-transport-node-hid/-/hw-transport-node-hid-4.78.0.tgz#abd99e0f918b810a61c035e5ab8c2bd8807aff55" - integrity sha512-OMrY2ecfQ1XjMAuuHqu3n3agMPR06HN1s0ENrKc+Twbb5A17jujpv07WzjxfTN2V1G7vgeZpRqrg2ulhowWbdg== - dependencies: - "@ledgerhq/devices" "^4.78.0" - "@ledgerhq/errors" "^4.78.0" - "@ledgerhq/hw-transport" "^4.78.0" - "@ledgerhq/hw-transport-node-hid-noevents" "^4.78.0" - "@ledgerhq/logs" "^4.72.0" - lodash "^4.17.15" - node-hid "^0.7.9" - usb "^1.6.0" - -"@ledgerhq/hw-transport-u2f@4.24.0": - version "4.24.0" - resolved "https://registry.yarnpkg.com/@ledgerhq/hw-transport-u2f/-/hw-transport-u2f-4.24.0.tgz#d67cfc4abf6d9a900ed45f2e2df7fe06dfdff5c7" - integrity sha512-/gFjhkM0sJfZ7iUf8HoIkGufAWgPacrbb1LW0TvWnZwvsATVJ1BZJBtrr90Wo401PKsjVwYtFt3Ce4gOAUv9jQ== - dependencies: - "@ledgerhq/hw-transport" "^4.24.0" - u2f-api "0.2.7" - -"@ledgerhq/hw-transport@^4.24.0", "@ledgerhq/hw-transport@^4.78.0": - version "4.78.0" - resolved "https://registry.yarnpkg.com/@ledgerhq/hw-transport/-/hw-transport-4.78.0.tgz#714786658e1f2fbc0569e06e2abf8d15d310d931" - integrity sha512-xQu16OMPQjFYLjqCysij+8sXtdWv2YLxPrB6FoLvEWGTlQ7yL1nUBRQyzyQtWIYqZd4THQowQmzm1VjxuN6SZw== - dependencies: - "@ledgerhq/devices" "^4.78.0" - "@ledgerhq/errors" "^4.78.0" - events "^3.0.0" - -"@ledgerhq/logs@^4.72.0": - version "4.72.0" - resolved "https://registry.yarnpkg.com/@ledgerhq/logs/-/logs-4.72.0.tgz#43df23af013ad1135407e5cf33ca6e4c4c7708d5" - integrity sha512-o+TYF8vBcyySRsb2kqBDv/KMeme8a2nwWoG+lAWzbDmWfb2/MrVWYCVYDYvjXdSoI/Cujqy1i0gIDrkdxa9chA== - -"@nodelib/fs.scandir@2.1.3": - version "2.1.3" - resolved "https://registry.yarnpkg.com/@nodelib/fs.scandir/-/fs.scandir-2.1.3.tgz#3a582bdb53804c6ba6d146579c46e52130cf4a3b" - integrity sha512-eGmwYQn3gxo4r7jdQnkrrN6bY478C3P+a/y72IJukF8LjB6ZHeB3c+Ehacj3sYeSmUXGlnA67/PmbM9CVwL7Dw== - dependencies: - "@nodelib/fs.stat" "2.0.3" - run-parallel "^1.1.9" - -"@nodelib/fs.stat@2.0.3", "@nodelib/fs.stat@^2.0.2": - version "2.0.3" - resolved "https://registry.yarnpkg.com/@nodelib/fs.stat/-/fs.stat-2.0.3.tgz#34dc5f4cabbc720f4e60f75a747e7ecd6c175bd3" - integrity sha512-bQBFruR2TAwoevBEd/NWMoAAtNGzTRgdrqnYCc7dhzfoNvqPzLyqlEQnzZ3kVnNrSp25iyxE00/3h2fqGAGArA== - -"@nodelib/fs.walk@^1.2.3": - version "1.2.4" - resolved "https://registry.yarnpkg.com/@nodelib/fs.walk/-/fs.walk-1.2.4.tgz#011b9202a70a6366e436ca5c065844528ab04976" - integrity sha512-1V9XOY4rDW0rehzbrcqAmHnz8e7SKvX27gh8Gt2WgB0+pdzdiLV83p72kZPU+jvMbS1qU5mauP2iOvO8rhmurQ== - dependencies: - "@nodelib/fs.scandir" "2.1.3" - fastq "^1.6.0" - -"@resolver-engine/core@^0.2.1": - version "0.2.1" - resolved "https://registry.yarnpkg.com/@resolver-engine/core/-/core-0.2.1.tgz#0d71803f6d3b8cb2e9ed481a1bf0ca5f5256d0c0" - integrity sha512-nsLQHmPJ77QuifqsIvqjaF5B9aHnDzJjp73Q1z6apY3e9nqYrx4Dtowhpsf7Jwftg/XzVDEMQC+OzUBNTS+S1A== - dependencies: - debug "^3.1.0" - request "^2.85.0" - -"@resolver-engine/fs@^0.2.1": - version "0.2.1" - resolved "https://registry.yarnpkg.com/@resolver-engine/fs/-/fs-0.2.1.tgz#f98a308d77568cc02651d03636f46536b941b241" - integrity sha512-7kJInM1Qo2LJcKyDhuYzh9ZWd+mal/fynfL9BNjWOiTcOpX+jNfqb/UmGUqros5pceBITlWGqS4lU709yHFUbg== - dependencies: - "@resolver-engine/core" "^0.2.1" - debug "^3.1.0" - -"@resolver-engine/imports-fs@^0.2.2": - version "0.2.2" - resolved "https://registry.yarnpkg.com/@resolver-engine/imports-fs/-/imports-fs-0.2.2.tgz#5a81ef3285dbf0411ab3b15205080a1ad7622d9e" - integrity sha512-gFCgMvCwyppjwq0UzIjde/WI+yDs3oatJhozG9xdjJdewwtd7LiF0T5i9lrHAUtqrQbqoFE4E+ZMRVHWpWHpKQ== - dependencies: - "@resolver-engine/fs" "^0.2.1" - "@resolver-engine/imports" "^0.2.2" - debug "^3.1.0" - -"@resolver-engine/imports@^0.2.2": - version "0.2.2" - resolved "https://registry.yarnpkg.com/@resolver-engine/imports/-/imports-0.2.2.tgz#d3de55a1bb5f3beb7703fdde743298f321175843" - integrity sha512-u5/HUkvo8q34AA+hnxxqqXGfby5swnH0Myw91o3Sm2TETJlNKXibFGSKBavAH+wvWdBi4Z5gS2Odu0PowgVOUg== - dependencies: - "@resolver-engine/core" "^0.2.1" - debug "^3.1.0" - hosted-git-info "^2.6.0" - -"@sindresorhus/is@^0.14.0": - version "0.14.0" - resolved "https://registry.yarnpkg.com/@sindresorhus/is/-/is-0.14.0.tgz#9fb3a3cf3132328151f353de4632e01e52102bea" - integrity sha512-9NET910DNaIPngYnLLPeg+Ogzqsi9uM4mSboU5y6p8S5DzMTVEsJZrawi+BoDNUVBa2DhJqQYUFvMDfgU062LQ== - -"@solidity-parser/parser@^0.6.0": - version "0.6.2" - resolved "https://registry.yarnpkg.com/@solidity-parser/parser/-/parser-0.6.2.tgz#49707fc4e06649d39d6b25bdab2e9093d372ce50" - integrity sha512-kUVUvrqttndeprLoXjI5arWHeiP3uh4XODAKbG+ZaWHCVQeelxCbnXBeWxZ2BPHdXgH0xR9dU1b916JhDhbgAA== - -"@szmarczak/http-timer@^1.1.2": - version "1.1.2" - resolved "https://registry.yarnpkg.com/@szmarczak/http-timer/-/http-timer-1.1.2.tgz#b1665e2c461a2cd92f4c1bbf50d5454de0d4b421" - integrity sha512-XIB2XbzHTN6ieIjfIMV9hlVcfPU26s2vafYWQcZHWXHOxiaRZYEDKEwdl129Zyg50+foYV2jCgtrqSA6qNuNSA== - dependencies: - defer-to-connect "^1.0.1" - -"@types/babel__core@^7.1.0": - version "7.1.3" - resolved "https://registry.yarnpkg.com/@types/babel__core/-/babel__core-7.1.3.tgz#e441ea7df63cd080dfcd02ab199e6d16a735fc30" - integrity sha512-8fBo0UR2CcwWxeX7WIIgJ7lXjasFxoYgRnFHUj+hRvKkpiBJbxhdAPTCY6/ZKM0uxANFVzt4yObSLuTiTnazDA== - dependencies: - "@babel/parser" "^7.1.0" - "@babel/types" "^7.0.0" - "@types/babel__generator" "*" - "@types/babel__template" "*" - "@types/babel__traverse" "*" - -"@types/babel__generator@*": - version "7.6.1" - resolved "https://registry.yarnpkg.com/@types/babel__generator/-/babel__generator-7.6.1.tgz#4901767b397e8711aeb99df8d396d7ba7b7f0e04" - integrity sha512-bBKm+2VPJcMRVwNhxKu8W+5/zT7pwNEqeokFOmbvVSqGzFneNxYcEBro9Ac7/N9tlsaPYnZLK8J1LWKkMsLAew== - dependencies: - "@babel/types" "^7.0.0" - -"@types/babel__template@*": - version "7.0.2" - resolved "https://registry.yarnpkg.com/@types/babel__template/-/babel__template-7.0.2.tgz#4ff63d6b52eddac1de7b975a5223ed32ecea9307" - integrity sha512-/K6zCpeW7Imzgab2bLkLEbz0+1JlFSrUMdw7KoIIu+IUdu51GWaBZpd3y1VXGVXzynvGa4DaIaxNZHiON3GXUg== - dependencies: - "@babel/parser" "^7.1.0" - "@babel/types" "^7.0.0" - -"@types/babel__traverse@*", "@types/babel__traverse@^7.0.6": - version "7.0.8" - resolved "https://registry.yarnpkg.com/@types/babel__traverse/-/babel__traverse-7.0.8.tgz#479a4ee3e291a403a1096106013ec22cf9b64012" - integrity sha512-yGeB2dHEdvxjP0y4UbRtQaSkXJ9649fYCmIdRoul5kfAoGCwxuCbMhag0k3RPfnuh9kPGm8x89btcfDEXdVWGw== - dependencies: - "@babel/types" "^7.3.0" - -"@types/bignumber.js@^5.0.0": - version "5.0.0" - resolved "https://registry.yarnpkg.com/@types/bignumber.js/-/bignumber.js-5.0.0.tgz#d9f1a378509f3010a3255e9cc822ad0eeb4ab969" - integrity sha512-0DH7aPGCClywOFaxxjE6UwpN2kQYe9LwuDQMv+zYA97j5GkOMo8e66LYT+a8JYU7jfmUFRZLa9KycxHDsKXJCA== - dependencies: - bignumber.js "*" - -"@types/bn.js@^4.11.0", "@types/bn.js@^4.11.3", "@types/bn.js@^4.11.4": - version "4.11.5" - resolved "https://registry.yarnpkg.com/@types/bn.js/-/bn.js-4.11.5.tgz#40e36197433f78f807524ec623afcf0169ac81dc" - integrity sha512-AEAZcIZga0JgVMHNtl1CprA/hXX7/wPt79AgR4XqaDt7jyj3QWYw6LPoOiznPtugDmlubUnAahMs2PFxGcQrng== - dependencies: - "@types/node" "*" - -"@types/bn.js@^4.11.5": - version "4.11.6" - resolved "https://registry.yarnpkg.com/@types/bn.js/-/bn.js-4.11.6.tgz#c306c70d9358aaea33cd4eda092a742b9505967c" - integrity sha512-pqr857jrp2kPuO9uRjZ3PwnJTjoQy+fcdxvBTvHm6dkmEL9q+hDD/2j/0ELOBPtPnS8LjCX0gI9nbl8lVkadpg== - dependencies: - "@types/node" "*" - -"@types/color-name@^1.1.1": - version "1.1.1" - resolved "https://registry.yarnpkg.com/@types/color-name/-/color-name-1.1.1.tgz#1c1261bbeaa10a8055bbc5d8ab84b7b2afc846a0" - integrity sha512-rr+OQyAjxze7GgWrSaJwydHStIhHq2lvY3BOC2Mj7KnzI7XK0Uw1TOOdI9lDoajEbSWLiYgoo4f1R51erQfhPQ== - -"@types/ethereum-protocol@*": - version "1.0.0" - resolved "https://registry.yarnpkg.com/@types/ethereum-protocol/-/ethereum-protocol-1.0.0.tgz#416e3827d5fdfa4658b0045b35a008747871b271" - integrity sha512-3DiI3Zxf81CgX+VhxNNFJBv/sfr1BFBKQK2sQ85hU9FwWJJMWV5gRDV79OUNShiwj3tYYIezU94qpucsb3dThQ== - dependencies: - bignumber.js "7.2.1" - -"@types/hdkey@^0.7.0": - version "0.7.1" - resolved "https://registry.yarnpkg.com/@types/hdkey/-/hdkey-0.7.1.tgz#9bc63ebbe96b107b277b65ea7a95442a677d0d61" - integrity sha512-4Kkr06hq+R8a9EzVNqXGOY2x1xA7dhY6qlp6OvaZ+IJy1BCca1Cv126RD9X7CMJoXoLo8WvAizy8gQHpqW6K0Q== - dependencies: - "@types/node" "*" - -"@types/istanbul-lib-coverage@*", "@types/istanbul-lib-coverage@^2.0.0": - version "2.0.1" - resolved "https://registry.yarnpkg.com/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.1.tgz#42995b446db9a48a11a07ec083499a860e9138ff" - integrity sha512-hRJD2ahnnpLgsj6KWMYSrmXkM3rm2Dl1qkx6IOFD5FnuNPXJIG5L0dhgKXCYTRMGzU4n0wImQ/xfmRc4POUFlg== - -"@types/istanbul-lib-report@*": - version "1.1.1" - resolved "https://registry.yarnpkg.com/@types/istanbul-lib-report/-/istanbul-lib-report-1.1.1.tgz#e5471e7fa33c61358dd38426189c037a58433b8c" - integrity sha512-3BUTyMzbZa2DtDI2BkERNC6jJw2Mr2Y0oGI7mRxYNBPxppbtEK1F66u3bKwU2g+wxwWI7PAoRpJnOY1grJqzHg== - dependencies: - "@types/istanbul-lib-coverage" "*" - -"@types/istanbul-reports@^1.1.1": - version "1.1.1" - resolved "https://registry.yarnpkg.com/@types/istanbul-reports/-/istanbul-reports-1.1.1.tgz#7a8cbf6a406f36c8add871625b278eaf0b0d255a" - integrity sha512-UpYjBi8xefVChsCoBpKShdxTllC9pwISirfoZsUa2AAdQg/Jd2KQGtSbw+ya7GPo7x/wAPlH6JBhKhAsXUEZNA== - dependencies: - "@types/istanbul-lib-coverage" "*" - "@types/istanbul-lib-report" "*" - -"@types/jest@^24.0.15": - version "24.0.25" - resolved "https://registry.yarnpkg.com/@types/jest/-/jest-24.0.25.tgz#2aba377824ce040114aa906ad2cac2c85351360f" - integrity sha512-hnP1WpjN4KbGEK4dLayul6lgtys6FPz0UfxMeMQCv0M+sTnzN3ConfiO72jHgLxl119guHgI8gLqDOrRLsyp2g== - dependencies: - jest-diff "^24.3.0" - -"@types/minimatch@^3.0.3": - version "3.0.3" - resolved "https://registry.yarnpkg.com/@types/minimatch/-/minimatch-3.0.3.tgz#3dca0e3f33b200fc7d1139c0cd96c1268cadfd9d" - integrity sha512-tHq6qdbT9U1IRSGf14CL0pUlULksvY9OZ+5eEgl1N7t+OA3tGvNpxJCzuKQlsNgCVwbAs670L1vcVQi8j9HjnA== - -"@types/node@*": - version "12.12.14" - resolved "https://registry.yarnpkg.com/@types/node/-/node-12.12.14.tgz#1c1d6e3c75dba466e0326948d56e8bd72a1903d2" - integrity sha512-u/SJDyXwuihpwjXy7hOOghagLEV1KdAST6syfnOk6QZAMzZuWZqXy5aYYZbh8Jdpd4escVFP0MvftHNDb9pruA== - -"@types/node@^10.12.18": - version "10.17.11" - resolved "https://registry.yarnpkg.com/@types/node/-/node-10.17.11.tgz#46ba035fb917b31c948280dbea22ab8838f386a4" - integrity sha512-dNd2pp8qTzzNLAs3O8nH3iU9DG9866KHq9L3ISPB7DOGERZN81nW/5/g/KzMJpCU8jrbCiMRBzV9/sCEdRosig== - -"@types/node@^10.3.2": - version "10.14.4" - resolved "https://registry.yarnpkg.com/@types/node/-/node-10.14.4.tgz#1c586b991457cbb58fef51bc4e0cfcfa347714b5" - integrity sha512-DT25xX/YgyPKiHFOpNuANIQIVvYEwCWXgK2jYYwqgaMrYE6+tq+DtmMwlD3drl6DJbUwtlIDnn0d7tIn/EbXBg== - -"@types/node@^12.12.6": - version "12.12.54" - resolved "https://registry.yarnpkg.com/@types/node/-/node-12.12.54.tgz#a4b58d8df3a4677b6c08bfbc94b7ad7a7a5f82d1" - integrity sha512-ge4xZ3vSBornVYlDnk7yZ0gK6ChHf/CHB7Gl1I0Jhah8DDnEQqBzgohYG4FX4p81TNirSETOiSyn+y1r9/IR6w== - -"@types/node@^12.6.1": - version "12.12.21" - resolved "https://registry.yarnpkg.com/@types/node/-/node-12.12.21.tgz#aa44a6363291c7037111c47e4661ad210aded23f" - integrity sha512-8sRGhbpU+ck1n0PGAUgVrWrWdjSW2aqNeyC15W88GRsMpSwzv6RJGlLhE7s2RhVSOdyDmxbqlWSeThq4/7xqlA== - -"@types/prop-types@*": - version "15.7.3" - resolved "https://registry.yarnpkg.com/@types/prop-types/-/prop-types-15.7.3.tgz#2ab0d5da2e5815f94b0b9d4b95d1e5f243ab2ca7" - integrity sha512-KfRL3PuHmqQLOG+2tGpRO26Ctg+Cq1E01D2DMriKEATHgWLfeNDmq9e29Q9WIky0dQ3NPkd1mzYH8Lm936Z9qw== - -"@types/react@*": - version "16.9.15" - resolved "https://registry.yarnpkg.com/@types/react/-/react-16.9.15.tgz#aeabb7a50f96c9e31a16079ada20ede9ed602977" - integrity sha512-WsmM1b6xQn1tG3X2Hx4F3bZwc2E82pJXt5OPs2YJgg71IzvUoKOSSSYOvLXYCg1ttipM+UuA4Lj3sfvqjVxyZw== - dependencies: - "@types/prop-types" "*" - csstype "^2.2.0" - -"@types/solidity-parser-antlr@^0.2.3": - version "0.2.3" - resolved "https://registry.yarnpkg.com/@types/solidity-parser-antlr/-/solidity-parser-antlr-0.2.3.tgz#bb2d9c6511bf483afe4fc3e2714da8a924e59e3f" - integrity sha512-FoSyZT+1TTaofbEtGW1oC9wHND1YshvVeHerME/Jh6gIdHbBAWFW8A97YYqO/dpHcFjIwEPEepX0Efl2ckJgwA== - -"@types/stack-utils@^1.0.1": - version "1.0.1" - resolved "https://registry.yarnpkg.com/@types/stack-utils/-/stack-utils-1.0.1.tgz#0a851d3bd96498fa25c33ab7278ed3bd65f06c3e" - integrity sha512-l42BggppR6zLmpfU6fq9HEa2oGPEI8yrSPL3GITjfRInppYFahObbIQOQK3UGxEnyQpltZLaPe75046NOZQikw== - -"@types/web3-provider-engine@^14.0.0": - version "14.0.0" - resolved "https://registry.yarnpkg.com/@types/web3-provider-engine/-/web3-provider-engine-14.0.0.tgz#43adc3b39dc9812b82aef8cd2d66577665ad59b0" - integrity sha512-yHr8mX2SoX3JNyfqdLXdO1UobsGhfiwSgtekbVxKLQrzD7vtpPkKbkIVsPFOhvekvNbPsCmDyeDCLkpeI9gSmA== - dependencies: - "@types/ethereum-protocol" "*" - -"@types/yargs-parser@*": - version "13.1.0" - resolved "https://registry.yarnpkg.com/@types/yargs-parser/-/yargs-parser-13.1.0.tgz#c563aa192f39350a1d18da36c5a8da382bbd8228" - integrity sha512-gCubfBUZ6KxzoibJ+SCUc/57Ms1jz5NjHe4+dI2krNmU5zCPAphyLJYyTOg06ueIyfj+SaCUqmzun7ImlxDcKg== - -"@types/yargs@^11.0.0": - version "11.1.3" - resolved "https://registry.yarnpkg.com/@types/yargs/-/yargs-11.1.3.tgz#33c8ebf05f78f1edeb249c1cde1a42ae57f5664e" - integrity sha512-moBUF6X8JsK5MbLZGP3vCfG/TVHZHsaePj3EimlLKp8+ESUjGjpXalxyn90a2L9fTM2ZGtW4swb6Am1DvVRNGA== - -"@types/yargs@^13.0.0": - version "13.0.4" - resolved "https://registry.yarnpkg.com/@types/yargs/-/yargs-13.0.4.tgz#53d231cebe1a540e7e13727fc1f0d13ad4a9ba3b" - integrity sha512-Ke1WmBbIkVM8bpvsNEcGgQM70XcEh/nbpxQhW7FhrsbCsXSY9BmLB1+LHtD7r9zrsOcFlLiF+a/UeJsdfw3C5A== - dependencies: - "@types/yargs-parser" "*" - -"@types/yargs@^15.0.0": - version "15.0.4" - resolved "https://registry.yarnpkg.com/@types/yargs/-/yargs-15.0.4.tgz#7e5d0f8ca25e9d5849f2ea443cf7c402decd8299" - integrity sha512-9T1auFmbPZoxHz0enUFlUuKRy3it01R+hlggyVUMtnCTQRunsQYifnSGb8hET4Xo8yiC0o0r1paW3ud5+rbURg== - dependencies: - "@types/yargs-parser" "*" - -"@web3-js/scrypt-shim@^0.1.0": - version "0.1.0" - resolved "https://registry.yarnpkg.com/@web3-js/scrypt-shim/-/scrypt-shim-0.1.0.tgz#0bf7529ab6788311d3e07586f7d89107c3bea2cc" - integrity sha512-ZtZeWCc/s0nMcdx/+rZwY1EcuRdemOK9ag21ty9UsHkFxsNb/AaoucUz0iPuyGe0Ku+PFuRmWZG7Z7462p9xPw== - dependencies: - scryptsy "^2.1.0" - semver "^6.3.0" - -"@web3-js/websocket@^1.0.29": - version "1.0.30" - resolved "https://registry.yarnpkg.com/@web3-js/websocket/-/websocket-1.0.30.tgz#9ea15b7b582cf3bf3e8bc1f4d3d54c0731a87f87" - integrity sha512-fDwrD47MiDrzcJdSeTLF75aCcxVVt8B1N74rA+vh2XCAvFy4tEWJjtnUtj2QG7/zlQ6g9cQ88bZFBxwd9/FmtA== - dependencies: - debug "^2.2.0" - es5-ext "^0.10.50" - nan "^2.14.0" - typedarray-to-buffer "^3.1.5" - yaeti "^0.0.6" - -"@webassemblyjs/ast@1.9.0": - version "1.9.0" - resolved "https://registry.yarnpkg.com/@webassemblyjs/ast/-/ast-1.9.0.tgz#bd850604b4042459a5a41cd7d338cbed695ed964" - integrity sha512-C6wW5L+b7ogSDVqymbkkvuW9kruN//YisMED04xzeBBqjHa2FYnmvOlS6Xj68xWQRgWvI9cIglsjFowH/RJyEA== - dependencies: - "@webassemblyjs/helper-module-context" "1.9.0" - "@webassemblyjs/helper-wasm-bytecode" "1.9.0" - "@webassemblyjs/wast-parser" "1.9.0" - -"@webassemblyjs/floating-point-hex-parser@1.9.0": - version "1.9.0" - resolved "https://registry.yarnpkg.com/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.9.0.tgz#3c3d3b271bddfc84deb00f71344438311d52ffb4" - integrity sha512-TG5qcFsS8QB4g4MhrxK5TqfdNe7Ey/7YL/xN+36rRjl/BlGE/NcBvJcqsRgCP6Z92mRE+7N50pRIi8SmKUbcQA== - -"@webassemblyjs/helper-api-error@1.9.0": - version "1.9.0" - resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-api-error/-/helper-api-error-1.9.0.tgz#203f676e333b96c9da2eeab3ccef33c45928b6a2" - integrity sha512-NcMLjoFMXpsASZFxJ5h2HZRcEhDkvnNFOAKneP5RbKRzaWJN36NC4jqQHKwStIhGXu5mUWlUUk7ygdtrO8lbmw== - -"@webassemblyjs/helper-buffer@1.9.0": - version "1.9.0" - resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-buffer/-/helper-buffer-1.9.0.tgz#a1442d269c5feb23fcbc9ef759dac3547f29de00" - integrity sha512-qZol43oqhq6yBPx7YM3m9Bv7WMV9Eevj6kMi6InKOuZxhw+q9hOkvq5e/PpKSiLfyetpaBnogSbNCfBwyB00CA== - -"@webassemblyjs/helper-code-frame@1.9.0": - version "1.9.0" - resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-code-frame/-/helper-code-frame-1.9.0.tgz#647f8892cd2043a82ac0c8c5e75c36f1d9159f27" - integrity sha512-ERCYdJBkD9Vu4vtjUYe8LZruWuNIToYq/ME22igL+2vj2dQ2OOujIZr3MEFvfEaqKoVqpsFKAGsRdBSBjrIvZA== - dependencies: - "@webassemblyjs/wast-printer" "1.9.0" - -"@webassemblyjs/helper-fsm@1.9.0": - version "1.9.0" - resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-fsm/-/helper-fsm-1.9.0.tgz#c05256b71244214671f4b08ec108ad63b70eddb8" - integrity sha512-OPRowhGbshCb5PxJ8LocpdX9Kl0uB4XsAjl6jH/dWKlk/mzsANvhwbiULsaiqT5GZGT9qinTICdj6PLuM5gslw== - -"@webassemblyjs/helper-module-context@1.9.0": - version "1.9.0" - resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-module-context/-/helper-module-context-1.9.0.tgz#25d8884b76839871a08a6c6f806c3979ef712f07" - integrity sha512-MJCW8iGC08tMk2enck1aPW+BE5Cw8/7ph/VGZxwyvGbJwjktKkDK7vy7gAmMDx88D7mhDTCNKAW5tED+gZ0W8g== - dependencies: - "@webassemblyjs/ast" "1.9.0" - -"@webassemblyjs/helper-wasm-bytecode@1.9.0": - version "1.9.0" - resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.9.0.tgz#4fed8beac9b8c14f8c58b70d124d549dd1fe5790" - integrity sha512-R7FStIzyNcd7xKxCZH5lE0Bqy+hGTwS3LJjuv1ZVxd9O7eHCedSdrId/hMOd20I+v8wDXEn+bjfKDLzTepoaUw== - -"@webassemblyjs/helper-wasm-section@1.9.0": - version "1.9.0" - resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.9.0.tgz#5a4138d5a6292ba18b04c5ae49717e4167965346" - integrity sha512-XnMB8l3ek4tvrKUUku+IVaXNHz2YsJyOOmz+MMkZvh8h1uSJpSen6vYnw3IoQ7WwEuAhL8Efjms1ZWjqh2agvw== - dependencies: - "@webassemblyjs/ast" "1.9.0" - "@webassemblyjs/helper-buffer" "1.9.0" - "@webassemblyjs/helper-wasm-bytecode" "1.9.0" - "@webassemblyjs/wasm-gen" "1.9.0" - -"@webassemblyjs/ieee754@1.9.0": - version "1.9.0" - resolved "https://registry.yarnpkg.com/@webassemblyjs/ieee754/-/ieee754-1.9.0.tgz#15c7a0fbaae83fb26143bbacf6d6df1702ad39e4" - integrity sha512-dcX8JuYU/gvymzIHc9DgxTzUUTLexWwt8uCTWP3otys596io0L5aW02Gb1RjYpx2+0Jus1h4ZFqjla7umFniTg== - dependencies: - "@xtuc/ieee754" "^1.2.0" - -"@webassemblyjs/leb128@1.9.0": - version "1.9.0" - resolved "https://registry.yarnpkg.com/@webassemblyjs/leb128/-/leb128-1.9.0.tgz#f19ca0b76a6dc55623a09cffa769e838fa1e1c95" - integrity sha512-ENVzM5VwV1ojs9jam6vPys97B/S65YQtv/aanqnU7D8aSoHFX8GyhGg0CMfyKNIHBuAVjy3tlzd5QMMINa7wpw== - dependencies: - "@xtuc/long" "4.2.2" - -"@webassemblyjs/utf8@1.9.0": - version "1.9.0" - resolved "https://registry.yarnpkg.com/@webassemblyjs/utf8/-/utf8-1.9.0.tgz#04d33b636f78e6a6813227e82402f7637b6229ab" - integrity sha512-GZbQlWtopBTP0u7cHrEx+73yZKrQoBMpwkGEIqlacljhXCkVM1kMQge/Mf+csMJAjEdSwhOyLAS0AoR3AG5P8w== - -"@webassemblyjs/wasm-edit@1.9.0": - version "1.9.0" - resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-edit/-/wasm-edit-1.9.0.tgz#3fe6d79d3f0f922183aa86002c42dd256cfee9cf" - integrity sha512-FgHzBm80uwz5M8WKnMTn6j/sVbqilPdQXTWraSjBwFXSYGirpkSWE2R9Qvz9tNiTKQvoKILpCuTjBKzOIm0nxw== - dependencies: - "@webassemblyjs/ast" "1.9.0" - "@webassemblyjs/helper-buffer" "1.9.0" - "@webassemblyjs/helper-wasm-bytecode" "1.9.0" - "@webassemblyjs/helper-wasm-section" "1.9.0" - "@webassemblyjs/wasm-gen" "1.9.0" - "@webassemblyjs/wasm-opt" "1.9.0" - "@webassemblyjs/wasm-parser" "1.9.0" - "@webassemblyjs/wast-printer" "1.9.0" - -"@webassemblyjs/wasm-gen@1.9.0": - version "1.9.0" - resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-gen/-/wasm-gen-1.9.0.tgz#50bc70ec68ded8e2763b01a1418bf43491a7a49c" - integrity sha512-cPE3o44YzOOHvlsb4+E9qSqjc9Qf9Na1OO/BHFy4OI91XDE14MjFN4lTMezzaIWdPqHnsTodGGNP+iRSYfGkjA== - dependencies: - "@webassemblyjs/ast" "1.9.0" - "@webassemblyjs/helper-wasm-bytecode" "1.9.0" - "@webassemblyjs/ieee754" "1.9.0" - "@webassemblyjs/leb128" "1.9.0" - "@webassemblyjs/utf8" "1.9.0" - -"@webassemblyjs/wasm-opt@1.9.0": - version "1.9.0" - resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-opt/-/wasm-opt-1.9.0.tgz#2211181e5b31326443cc8112eb9f0b9028721a61" - integrity sha512-Qkjgm6Anhm+OMbIL0iokO7meajkzQD71ioelnfPEj6r4eOFuqm4YC3VBPqXjFyyNwowzbMD+hizmprP/Fwkl2A== - dependencies: - "@webassemblyjs/ast" "1.9.0" - "@webassemblyjs/helper-buffer" "1.9.0" - "@webassemblyjs/wasm-gen" "1.9.0" - "@webassemblyjs/wasm-parser" "1.9.0" - -"@webassemblyjs/wasm-parser@1.9.0": - version "1.9.0" - resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-parser/-/wasm-parser-1.9.0.tgz#9d48e44826df4a6598294aa6c87469d642fff65e" - integrity sha512-9+wkMowR2AmdSWQzsPEjFU7njh8HTO5MqO8vjwEHuM+AMHioNqSBONRdr0NQQ3dVQrzp0s8lTcYqzUdb7YgELA== - dependencies: - "@webassemblyjs/ast" "1.9.0" - "@webassemblyjs/helper-api-error" "1.9.0" - "@webassemblyjs/helper-wasm-bytecode" "1.9.0" - "@webassemblyjs/ieee754" "1.9.0" - "@webassemblyjs/leb128" "1.9.0" - "@webassemblyjs/utf8" "1.9.0" - -"@webassemblyjs/wast-parser@1.9.0": - version "1.9.0" - resolved "https://registry.yarnpkg.com/@webassemblyjs/wast-parser/-/wast-parser-1.9.0.tgz#3031115d79ac5bd261556cecc3fa90a3ef451914" - integrity sha512-qsqSAP3QQ3LyZjNC/0jBJ/ToSxfYJ8kYyuiGvtn/8MK89VrNEfwj7BPQzJVHi0jGTRK2dGdJ5PRqhtjzoww+bw== - dependencies: - "@webassemblyjs/ast" "1.9.0" - "@webassemblyjs/floating-point-hex-parser" "1.9.0" - "@webassemblyjs/helper-api-error" "1.9.0" - "@webassemblyjs/helper-code-frame" "1.9.0" - "@webassemblyjs/helper-fsm" "1.9.0" - "@xtuc/long" "4.2.2" - -"@webassemblyjs/wast-printer@1.9.0": - version "1.9.0" - resolved "https://registry.yarnpkg.com/@webassemblyjs/wast-printer/-/wast-printer-1.9.0.tgz#4935d54c85fef637b00ce9f52377451d00d47899" - integrity sha512-2J0nE95rHXHyQ24cWjMKJ1tqB/ds8z/cyeOZxJhcb+rW+SQASVjuznUSmdz5GpVJTzU8JkhYut0D3siFDD6wsA== - dependencies: - "@webassemblyjs/ast" "1.9.0" - "@webassemblyjs/wast-parser" "1.9.0" - "@xtuc/long" "4.2.2" - -"@xtuc/ieee754@^1.2.0": - version "1.2.0" - resolved "https://registry.yarnpkg.com/@xtuc/ieee754/-/ieee754-1.2.0.tgz#eef014a3145ae477a1cbc00cd1e552336dceb790" - integrity sha512-DX8nKgqcGwsc0eJSqYt5lwP4DH5FlHnmuWWBRy7X0NcaGR0ZtuyeESgMwTYVEtxmsNGY+qit4QYT/MIYTOTPeA== - -"@xtuc/long@4.2.2": - version "4.2.2" - resolved "https://registry.yarnpkg.com/@xtuc/long/-/long-4.2.2.tgz#d291c6a4e97989b5c61d9acf396ae4fe133a718d" - integrity sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ== - -abab@^2.0.0: - version "2.0.3" - resolved "https://registry.yarnpkg.com/abab/-/abab-2.0.3.tgz#623e2075e02eb2d3f2475e49f99c91846467907a" - integrity sha512-tsFzPpcttalNjFBCFMqsKYQcWxxen1pgJR56by//QwvJc4/OUS3kPOOttx2tSIfjsylB0pYu7f5D3K1RCxUnUg== - -abbrev@1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.1.1.tgz#f8f2c887ad10bf67f634f005b6987fed3179aac8" - integrity sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q== - -abbrev@1.0.x: - version "1.0.9" - resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.0.9.tgz#91b4792588a7738c25f35dd6f63752a2f8776135" - integrity sha1-kbR5JYinc4wl813W9jdSovh3YTU= - -abortcontroller-polyfill@^1.1.9: - version "1.4.0" - resolved "https://registry.yarnpkg.com/abortcontroller-polyfill/-/abortcontroller-polyfill-1.4.0.tgz#0d5eb58e522a461774af8086414f68e1dda7a6c4" - integrity sha512-3ZFfCRfDzx3GFjO6RAkYx81lPGpUS20ISxux9gLxuKnqafNcFQo59+IoZqpO2WvQlyc287B62HDnDdNYRmlvWA== - -abstract-leveldown@3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/abstract-leveldown/-/abstract-leveldown-3.0.0.tgz#5cb89f958a44f526779d740d1440e743e0c30a57" - integrity sha512-KUWx9UWGQD12zsmLNj64/pndaz4iJh/Pj7nopgkfDG6RlCcbMZvT6+9l7dchK4idog2Is8VdC/PvNbFuFmalIQ== - dependencies: - xtend "~4.0.0" - -abstract-leveldown@^2.4.1, abstract-leveldown@~2.7.1: - version "2.7.2" - resolved "https://registry.yarnpkg.com/abstract-leveldown/-/abstract-leveldown-2.7.2.tgz#87a44d7ebebc341d59665204834c8b7e0932cc93" - integrity sha512-+OVvxH2rHVEhWLdbudP6p0+dNMXu8JA1CbhP19T8paTYAcX7oJ4OVjT+ZUVpv7mITxXHqDMej+GdqXBmXkw09w== - dependencies: - xtend "~4.0.0" - -abstract-leveldown@^5.0.0, abstract-leveldown@~5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/abstract-leveldown/-/abstract-leveldown-5.0.0.tgz#f7128e1f86ccabf7d2893077ce5d06d798e386c6" - integrity sha512-5mU5P1gXtsMIXg65/rsYGsi93+MlogXZ9FA8JnwKurHQg64bfXwGYVdVdijNTVNOlAsuIiOwHdvFFD5JqCJQ7A== - dependencies: - xtend "~4.0.0" - -abstract-leveldown@~2.6.0: - version "2.6.3" - resolved "https://registry.yarnpkg.com/abstract-leveldown/-/abstract-leveldown-2.6.3.tgz#1c5e8c6a5ef965ae8c35dfb3a8770c476b82c4b8" - integrity sha512-2++wDf/DYqkPR3o5tbfdhF96EfMApo1GpPfzOsR/ZYXdkSmELlvOOEAl9iKkRsktMPHdGjO4rtkBpf2I7TiTeA== - dependencies: - xtend "~4.0.0" - -accepts@~1.3.7: - version "1.3.7" - resolved "https://registry.yarnpkg.com/accepts/-/accepts-1.3.7.tgz#531bc726517a3b2b41f850021c6cc15eaab507cd" - integrity sha512-Il80Qs2WjYlJIBNzNkK6KYqlVMTbZLXgHx2oT0pU/fjRHyEp+PEfEPY0R3WCwAGVOtauxh1hOxNgIf5bv7dQpA== - dependencies: - mime-types "~2.1.24" - negotiator "0.6.2" - -acorn-globals@^4.1.0: - version "4.3.4" - resolved "https://registry.yarnpkg.com/acorn-globals/-/acorn-globals-4.3.4.tgz#9fa1926addc11c97308c4e66d7add0d40c3272e7" - integrity sha512-clfQEh21R+D0leSbUdWf3OcfqyaCSAQ8Ryq00bofSekfr9W8u1jyYZo6ir0xu9Gtcf7BjcHJpnbZH7JOCpP60A== - dependencies: - acorn "^6.0.1" - acorn-walk "^6.0.1" - -acorn-walk@^6.0.1: - version "6.2.0" - resolved "https://registry.yarnpkg.com/acorn-walk/-/acorn-walk-6.2.0.tgz#123cb8f3b84c2171f1f7fb252615b1c78a6b1a8c" - integrity sha512-7evsyfH1cLOCdAzZAd43Cic04yKydNx0cF+7tiA19p1XnLLPU4dpCQOqpjqwokFe//vS0QqfqqjCS2JkiIs0cA== - -acorn-walk@^7.1.1: - version "7.2.0" - resolved "https://registry.yarnpkg.com/acorn-walk/-/acorn-walk-7.2.0.tgz#0de889a601203909b0fbe07b8938dc21d2e967bc" - integrity sha512-OPdCF6GsMIP+Az+aWfAAOEt2/+iVDKE7oy6lJ098aoe59oAmK76qV6Gw60SbZ8jHuG2wH058GF4pLFbYamYrVA== - -acorn@^5.5.3: - version "5.7.3" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-5.7.3.tgz#67aa231bf8812974b85235a96771eb6bd07ea279" - integrity sha512-T/zvzYRfbVojPWahDsE5evJdHb3oJoQfFbsrKM7w5Zcs++Tr257tia3BmMP8XYVjp1S9RZXQMh7gao96BlqZOw== - -acorn@^6.0.1: - version "6.4.0" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-6.4.0.tgz#b659d2ffbafa24baf5db1cdbb2c94a983ecd2784" - integrity sha512-gac8OEcQ2Li1dxIEWGZzsp2BitJxwkwcOm0zHAJLcPJaVvm58FRnk6RkuLRpU1EujipU2ZFODv2P9DLMfnV8mw== - -acorn@^6.4.1: - version "6.4.1" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-6.4.1.tgz#531e58ba3f51b9dacb9a6646ca4debf5b14ca474" - integrity sha512-ZVA9k326Nwrj3Cj9jlh3wGFutC2ZornPNARZwsNYqQYgN0EsV2d53w5RN/co65Ohn4sUAUtb1rSUAOD6XN9idA== - -acorn@^7.1.1: - version "7.4.0" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-7.4.0.tgz#e1ad486e6c54501634c6c397c5c121daa383607c" - integrity sha512-+G7P8jJmCHr+S+cLfQxygbWhXy+8YTVGzAkpEbcLo2mLoL7tij/VG41QSHACSf5QgYRhMZYHuNc6drJaO0Da+w== - -aes-js@3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/aes-js/-/aes-js-3.0.0.tgz#e21df10ad6c2053295bcbb8dab40b09dbea87e4d" - integrity sha1-4h3xCtbCBTKVvLuNq0Cwnb6ofk0= - -aes-js@^3.1.1: - version "3.1.2" - resolved "https://registry.yarnpkg.com/aes-js/-/aes-js-3.1.2.tgz#db9aabde85d5caabbfc0d4f2a4446960f627146a" - integrity sha512-e5pEa2kBnBOgR4Y/p20pskXI74UEz7de8ZGVo58asOtvSVG5YAbJeELPZxOmt+Bnz3rX753YKhfIn4X4l1PPRQ== - -ajv-errors@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/ajv-errors/-/ajv-errors-1.0.1.tgz#f35986aceb91afadec4102fbd85014950cefa64d" - integrity sha512-DCRfO/4nQ+89p/RK43i8Ezd41EqdGIU4ld7nGF8OQ14oc/we5rEntLCUa7+jrn3nn83BosfwZA0wb4pon2o8iQ== - -ajv-keywords@^3.1.0, ajv-keywords@^3.4.1: - version "3.4.1" - resolved "https://registry.yarnpkg.com/ajv-keywords/-/ajv-keywords-3.4.1.tgz#ef916e271c64ac12171fd8384eaae6b2345854da" - integrity sha512-RO1ibKvd27e6FEShVFfPALuHI3WjSVNeK5FIsmme/LYRNxjKuNj+Dt7bucLa6NdSv3JcVTyMlm9kGR84z1XpaQ== - -ajv@^6.1.0, ajv@^6.10.2, ajv@^6.5.5: - version "6.10.2" - resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.10.2.tgz#d3cea04d6b017b2894ad69040fec8b623eb4bd52" - integrity sha512-TXtUUEYHuaTEbLZWIKUr5pmBuhDLy+8KYtPYdcV8qC+pOZL+NKqYwvWSRrVXHn+ZmRRAu8vJTAznH7Oag6RVRw== - dependencies: - fast-deep-equal "^2.0.1" - fast-json-stable-stringify "^2.0.0" - json-schema-traverse "^0.4.1" - uri-js "^4.2.2" - -ajv@^6.12.3: - version "6.12.4" - resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.12.4.tgz#0614facc4522127fa713445c6bfd3ebd376e2234" - integrity sha512-eienB2c9qVQs2KWexhkrdMLVDoIQCz5KSeLxwg9Lzk4DOfBtIK9PQwwufcsn1jjGuf9WZmqPMbGxOzfcuphJCQ== - dependencies: - fast-deep-equal "^3.1.1" - fast-json-stable-stringify "^2.0.0" - json-schema-traverse "^0.4.1" - uri-js "^4.2.2" - -amdefine@>=0.0.4: - version "1.0.1" - resolved "https://registry.yarnpkg.com/amdefine/-/amdefine-1.0.1.tgz#4a5282ac164729e93619bcfd3ad151f817ce91f5" - integrity sha1-SlKCrBZHKek2Gbz9OtFR+BfOkfU= - -ansi-colors@^1.0.1: - version "1.1.0" - resolved "https://registry.yarnpkg.com/ansi-colors/-/ansi-colors-1.1.0.tgz#6374b4dd5d4718ff3ce27a671a3b1cad077132a9" - integrity sha512-SFKX67auSNoVR38N3L+nvsPjOE0bybKTYbkf5tRvushrAPQ9V75huw0ZxBkKVeRU9kqH3d6HA4xTckbwZ4ixmA== - dependencies: - ansi-wrap "^0.1.0" - -ansi-escapes@^3.0.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-3.2.0.tgz#8780b98ff9dbf5638152d1f1fe5c1d7b4442976b" - integrity sha512-cBhpre4ma+U0T1oM5fXg7Dy1Jw7zzwv7lt/GoCpr+hDQJoYnKVPLL4dCvSEFMmQurOQvSrwT7SL/DAlhBI97RQ== - -ansi-gray@^0.1.1: - version "0.1.1" - resolved "https://registry.yarnpkg.com/ansi-gray/-/ansi-gray-0.1.1.tgz#2962cf54ec9792c48510a3deb524436861ef7251" - integrity sha1-KWLPVOyXksSFEKPetSRDaGHvclE= - dependencies: - ansi-wrap "0.1.0" - -ansi-regex@^2.0.0: - version "2.1.1" - resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-2.1.1.tgz#c3b33ab5ee360d86e0e628f0468ae7ef27d654df" - integrity sha1-w7M6te42DYbg5ijwRorn7yfWVN8= - -ansi-regex@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-3.0.0.tgz#ed0317c322064f79466c02966bddb605ab37d998" - integrity sha1-7QMXwyIGT3lGbAKWa922Bas32Zg= - -ansi-regex@^4.0.0, ansi-regex@^4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-4.1.0.tgz#8b9f8f08cf1acb843756a839ca8c7e3168c51997" - integrity sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg== - -ansi-regex@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-5.0.0.tgz#388539f55179bf39339c81af30a654d69f87cb75" - integrity sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg== - -ansi-styles@^2.2.1: - version "2.2.1" - resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-2.2.1.tgz#b432dd3358b634cf75e1e4664368240533c1ddbe" - integrity sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4= - -ansi-styles@^3.2.0, ansi-styles@^3.2.1: - version "3.2.1" - resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.1.tgz#41fbb20243e50b12be0f04b8dedbf07520ce841d" - integrity sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA== - dependencies: - color-convert "^1.9.0" - -ansi-styles@^4.0.0, ansi-styles@^4.1.0: - version "4.2.1" - resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-4.2.1.tgz#90ae75c424d008d2624c5bf29ead3177ebfcf359" - integrity sha512-9VGjrMsG1vePxcSweQsN20KY/c4zN0h9fLjqAbwbPfahM3t+NL+M9HC8xeXG2I8pX5NoamTGNuomEUFI7fcUjA== - dependencies: - "@types/color-name" "^1.1.1" - color-convert "^2.0.1" - -ansi-wrap@0.1.0, ansi-wrap@^0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/ansi-wrap/-/ansi-wrap-0.1.0.tgz#a82250ddb0015e9a27ca82e82ea603bbfa45efaf" - integrity sha1-qCJQ3bABXponyoLoLqYDu/pF768= - -any-promise@1.3.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/any-promise/-/any-promise-1.3.0.tgz#abc6afeedcea52e809cdc0376aed3ce39635d17f" - integrity sha1-q8av7tzqUugJzcA3au0845Y10X8= - -anymatch@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-2.0.0.tgz#bcb24b4f37934d9aa7ac17b4adaf89e7c76ef2eb" - integrity sha512-5teOsQWABXHHBFP9y3skS5P3d/WfWXpv3FUpy+LorMrNYaT9pI4oLMQX7jzQ2KklNpGpWHzdCXTDT2Y3XGlZBw== - dependencies: - micromatch "^3.1.4" - normalize-path "^2.1.1" - -anymatch@~3.1.1: - version "3.1.1" - resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-3.1.1.tgz#c55ecf02185e2469259399310c173ce31233b142" - integrity sha512-mM8522psRCqzV+6LhomX5wgp25YVibjh8Wj23I5RPkPppSVSjyKD2A2mBJmWGa+KN7f2D6LNh9jkBCeyLktzjg== - dependencies: - normalize-path "^3.0.0" - picomatch "^2.0.4" - -append-buffer@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/append-buffer/-/append-buffer-1.0.2.tgz#d8220cf466081525efea50614f3de6514dfa58f1" - integrity sha1-2CIM9GYIFSXv6lBhTz3mUU36WPE= - dependencies: - buffer-equal "^1.0.0" - -aproba@^1.0.3, aproba@^1.1.1: - version "1.2.0" - resolved "https://registry.yarnpkg.com/aproba/-/aproba-1.2.0.tgz#6802e6264efd18c790a1b0d517f0f2627bf2c94a" - integrity sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw== - -archy@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/archy/-/archy-1.0.0.tgz#f9c8c13757cc1dd7bc379ac77b2c62a5c2868c40" - integrity sha1-+cjBN1fMHde8N5rHeyxipcKGjEA= - -are-we-there-yet@~1.1.2: - version "1.1.5" - resolved "https://registry.yarnpkg.com/are-we-there-yet/-/are-we-there-yet-1.1.5.tgz#4b35c2944f062a8bfcda66410760350fe9ddfc21" - integrity sha512-5hYdAkZlcG8tOLujVDTgCT+uPX0VnpAH28gWsLfzpXYm7wP6mp5Q/gYyR7YQ0cKVJcXJnl3j2kpBan13PtQf6w== - dependencies: - delegates "^1.0.0" - readable-stream "^2.0.6" - -argparse@^1.0.7: - version "1.0.10" - resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.10.tgz#bcd6791ea5ae09725e17e5ad988134cd40b3d911" - integrity sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg== - dependencies: - sprintf-js "~1.0.2" - -arr-diff@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/arr-diff/-/arr-diff-4.0.0.tgz#d6461074febfec71e7e15235761a329a5dc7c520" - integrity sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA= - -arr-filter@^1.1.1: - version "1.1.2" - resolved "https://registry.yarnpkg.com/arr-filter/-/arr-filter-1.1.2.tgz#43fdddd091e8ef11aa4c45d9cdc18e2dff1711ee" - integrity sha1-Q/3d0JHo7xGqTEXZzcGOLf8XEe4= - dependencies: - make-iterator "^1.0.0" - -arr-flatten@^1.0.1, arr-flatten@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/arr-flatten/-/arr-flatten-1.1.0.tgz#36048bbff4e7b47e136644316c99669ea5ae91f1" - integrity sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg== - -arr-map@^2.0.0, arr-map@^2.0.2: - version "2.0.2" - resolved "https://registry.yarnpkg.com/arr-map/-/arr-map-2.0.2.tgz#3a77345ffc1cf35e2a91825601f9e58f2e24cac4" - integrity sha1-Onc0X/wc814qkYJWAfnljy4kysQ= - dependencies: - make-iterator "^1.0.0" - -arr-union@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/arr-union/-/arr-union-3.1.0.tgz#e39b09aea9def866a8f206e288af63919bae39c4" - integrity sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ= - -array-each@^1.0.0, array-each@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/array-each/-/array-each-1.0.1.tgz#a794af0c05ab1752846ee753a1f211a05ba0c44f" - integrity sha1-p5SvDAWrF1KEbudTofIRoFugxE8= - -array-equal@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/array-equal/-/array-equal-1.0.0.tgz#8c2a5ef2472fd9ea742b04c77a75093ba2757c93" - integrity sha1-jCpe8kcv2ep0KwTHenUJO6J1fJM= - -array-flatten@1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/array-flatten/-/array-flatten-1.1.1.tgz#9a5f699051b1e7073328f2a008968b64ea2955d2" - integrity sha1-ml9pkFGx5wczKPKgCJaLZOopVdI= - -array-initial@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/array-initial/-/array-initial-1.1.0.tgz#2fa74b26739371c3947bd7a7adc73be334b3d795" - integrity sha1-L6dLJnOTccOUe9enrcc74zSz15U= - dependencies: - array-slice "^1.0.0" - is-number "^4.0.0" - -array-last@^1.1.1: - version "1.3.0" - resolved "https://registry.yarnpkg.com/array-last/-/array-last-1.3.0.tgz#7aa77073fec565ddab2493f5f88185f404a9d336" - integrity sha512-eOCut5rXlI6aCOS7Z7kCplKRKyiFQ6dHFBem4PwlwKeNFk2/XxTrhRh5T9PyaEWGy/NHTZWbY+nsZlNFJu9rYg== - dependencies: - is-number "^4.0.0" - -array-slice@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/array-slice/-/array-slice-1.1.0.tgz#e368ea15f89bc7069f7ffb89aec3a6c7d4ac22d4" - integrity sha512-B1qMD3RBP7O8o0H2KbrXDyB0IccejMF15+87Lvlor12ONPRHP6gTjXMNkt/d3ZuOGbAe66hFmaCfECI24Ufp6w== - -array-sort@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/array-sort/-/array-sort-1.0.0.tgz#e4c05356453f56f53512a7d1d6123f2c54c0a88a" - integrity sha512-ihLeJkonmdiAsD7vpgN3CRcx2J2S0TiYW+IS/5zHBI7mKUq3ySvBdzzBfD236ubDBQFiiyG3SWCPc+msQ9KoYg== - dependencies: - default-compare "^1.0.0" - get-value "^2.0.6" - kind-of "^5.0.2" - -array-unique@^0.3.2: - version "0.3.2" - resolved "https://registry.yarnpkg.com/array-unique/-/array-unique-0.3.2.tgz#a894b75d4bc4f6cd679ef3244a9fd8f46ae2d428" - integrity sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg= - -asn1.js@^4.0.0: - version "4.10.1" - resolved "https://registry.yarnpkg.com/asn1.js/-/asn1.js-4.10.1.tgz#b9c2bf5805f1e64aadeed6df3a2bfafb5a73f5a0" - integrity sha512-p32cOF5q0Zqs9uBiONKYLm6BClCoBCM5O9JfeUSlnQLBTxYdTK+pW+nXflm8UkKd2UYlEbYz5qEi0JuZR9ckSw== - dependencies: - bn.js "^4.0.0" - inherits "^2.0.1" - minimalistic-assert "^1.0.0" - -asn1@~0.2.3: - version "0.2.4" - resolved "https://registry.yarnpkg.com/asn1/-/asn1-0.2.4.tgz#8d2475dfab553bb33e77b54e59e880bb8ce23136" - integrity sha512-jxwzQpLQjSmWXgwaCZE9Nz+glAG01yF1QnWgbhGwHI5A6FRIEY6IVqtHhIepHqI7/kyEyQEagBC5mBEFlIYvdg== - dependencies: - safer-buffer "~2.1.0" - -assert-plus@1.0.0, assert-plus@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/assert-plus/-/assert-plus-1.0.0.tgz#f12e0f3c5d77b0b1cdd9146942e4e96c1e4dd525" - integrity sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU= - -assert@^1.1.1: - version "1.5.0" - resolved "https://registry.yarnpkg.com/assert/-/assert-1.5.0.tgz#55c109aaf6e0aefdb3dc4b71240c70bf574b18eb" - integrity sha512-EDsgawzwoun2CZkCgtxJbv392v4nbk9XDD06zI+kQYoBM/3RBWLlEyJARDOmhAAosBjWACEkKL6S+lIZtcAubA== - dependencies: - object-assign "^4.1.1" - util "0.10.3" - -assertion-error@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/assertion-error/-/assertion-error-1.1.0.tgz#e60b6b0e8f301bd97e5375215bda406c85118c0b" - integrity sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw== - -assign-symbols@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/assign-symbols/-/assign-symbols-1.0.0.tgz#59667f41fadd4f20ccbc2bb96b8d4f7f78ec0367" - integrity sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c= - -astral-regex@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/astral-regex/-/astral-regex-1.0.0.tgz#6c8c3fb827dd43ee3918f27b82782ab7658a6fd9" - integrity sha512-+Ryf6g3BKoRc7jfp7ad8tM4TtMiaWvbF/1/sQcZPkkS7ag3D5nMBCe2UfOTONtAkaG0tO0ij3C5Lwmf1EiyjHg== - -async-done@^1.2.0, async-done@^1.2.2: - version "1.3.2" - resolved "https://registry.yarnpkg.com/async-done/-/async-done-1.3.2.tgz#5e15aa729962a4b07414f528a88cdf18e0b290a2" - integrity sha512-uYkTP8dw2og1tu1nmza1n1CMW0qb8gWWlwqMmLb7MhBVs4BXrFziT6HXUd+/RlRA/i4H9AkofYloUbs1fwMqlw== - dependencies: - end-of-stream "^1.1.0" - once "^1.3.2" - process-nextick-args "^2.0.0" - stream-exhaust "^1.0.1" - -async-each@^1.0.1: - version "1.0.3" - resolved "https://registry.yarnpkg.com/async-each/-/async-each-1.0.3.tgz#b727dbf87d7651602f06f4d4ac387f47d91b0cbf" - integrity sha512-z/WhQ5FPySLdvREByI2vZiTWwCnF0moMJ1hK9YQwDTHKh6I7/uSckMetoRGb5UBZPC1z0jlw+n/XCgjeH7y1AQ== - -async-eventemitter@^0.2.2: - version "0.2.4" - resolved "https://registry.yarnpkg.com/async-eventemitter/-/async-eventemitter-0.2.4.tgz#f5e7c8ca7d3e46aab9ec40a292baf686a0bafaca" - integrity sha512-pd20BwL7Yt1zwDFy+8MX8F1+WCT8aQeKj0kQnTrH9WaeRETlRamVhD0JtRPmrV4GfOJ2F9CvdQkZeZhnh2TuHw== - dependencies: - async "^2.4.0" - -async-limiter@~1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/async-limiter/-/async-limiter-1.0.1.tgz#dd379e94f0db8310b08291f9d64c3209766617fd" - integrity sha512-csOlWGAcRFJaI6m+F2WKdnMKr4HhdhFVBk0H/QbJFMCr+uO2kwohwXQPxw/9OCxp05r5ghVBFSyioixx3gfkNQ== - -async-settle@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/async-settle/-/async-settle-1.0.0.tgz#1d0a914bb02575bec8a8f3a74e5080f72b2c0c6b" - integrity sha1-HQqRS7Aldb7IqPOnTlCA9yssDGs= - dependencies: - async-done "^1.2.2" - -async@1.x, async@^1.4.2: - version "1.5.2" - resolved "https://registry.yarnpkg.com/async/-/async-1.5.2.tgz#ec6a61ae56480c0c3cb241c95618e20892f9672a" - integrity sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo= - -async@2.6.2: - version "2.6.2" - resolved "https://registry.yarnpkg.com/async/-/async-2.6.2.tgz#18330ea7e6e313887f5d2f2a904bac6fe4dd5381" - integrity sha512-H1qVYh1MYhEEFLsP97cVKqCGo7KfCyTt6uEWqsTBr9SO84oK9Uwbyd/yCW+6rKJLHksBNUVWZDAjfS+Ccx0Bbg== - dependencies: - lodash "^4.17.11" - -async@^2.0.1, async@^2.1.2, async@^2.4.0, async@^2.5.0, async@^2.6.1: - version "2.6.3" - resolved "https://registry.yarnpkg.com/async/-/async-2.6.3.tgz#d72625e2344a3656e3a3ad4fa749fa83299d82ff" - integrity sha512-zflvls11DCy+dQWzTW2dzuilv8Z5X/pjfmZOWba6TNIVDm+2UDaJmXSOXlasHKfNBs8oo3M0aT50fDEWfKZjXg== - dependencies: - lodash "^4.17.14" - -asynckit@^0.4.0: - version "0.4.0" - resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79" - integrity sha1-x57Zf380y48robyXkLzDZkdLS3k= - -atob@^2.1.1: - version "2.1.2" - resolved "https://registry.yarnpkg.com/atob/-/atob-2.1.2.tgz#6d9517eb9e030d2436666651e86bd9f6f13533c9" - integrity sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg== - -await-semaphore@^0.1.3: - version "0.1.3" - resolved "https://registry.yarnpkg.com/await-semaphore/-/await-semaphore-0.1.3.tgz#2b88018cc8c28e06167ae1cdff02504f1f9688d3" - integrity sha512-d1W2aNSYcz/sxYO4pMGX9vq65qOTu0P800epMud+6cYYX0QcT7zyqcxec3VWzpgvdXo57UWmVbZpLMjX2m1I7Q== - -aws-sign2@~0.7.0: - version "0.7.0" - resolved "https://registry.yarnpkg.com/aws-sign2/-/aws-sign2-0.7.0.tgz#b46e890934a9591f2d2f6f86d7e6a9f1b3fe76a8" - integrity sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg= - -aws4@^1.8.0: - version "1.9.0" - resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.9.0.tgz#24390e6ad61386b0a747265754d2a17219de862c" - integrity sha512-Uvq6hVe90D0B2WEnUqtdgY1bATGz3mw33nH9Y+dmA+w5DHvUmBgkr5rM/KCHpCsiFNRUfokW/szpPPgMK2hm4A== - -babel-code-frame@^6.26.0: - version "6.26.0" - resolved "https://registry.yarnpkg.com/babel-code-frame/-/babel-code-frame-6.26.0.tgz#63fd43f7dc1e3bb7ce35947db8fe369a3f58c74b" - integrity sha1-Y/1D99weO7fONZR9uP42mj9Yx0s= - dependencies: - chalk "^1.1.3" - esutils "^2.0.2" - js-tokens "^3.0.2" - -babel-core@^6.0.14, babel-core@^6.26.0: - version "6.26.3" - resolved "https://registry.yarnpkg.com/babel-core/-/babel-core-6.26.3.tgz#b2e2f09e342d0f0c88e2f02e067794125e75c207" - integrity sha512-6jyFLuDmeidKmUEb3NM+/yawG0M2bDZ9Z1qbZP59cyHLz8kYGKYwpJP0UwUKKUiTRNvxfLesJnTedqczP7cTDA== - dependencies: - babel-code-frame "^6.26.0" - babel-generator "^6.26.0" - babel-helpers "^6.24.1" - babel-messages "^6.23.0" - babel-register "^6.26.0" - babel-runtime "^6.26.0" - babel-template "^6.26.0" - babel-traverse "^6.26.0" - babel-types "^6.26.0" - babylon "^6.18.0" - convert-source-map "^1.5.1" - debug "^2.6.9" - json5 "^0.5.1" - lodash "^4.17.4" - minimatch "^3.0.4" - path-is-absolute "^1.0.1" - private "^0.1.8" - slash "^1.0.0" - source-map "^0.5.7" - -babel-generator@^6.26.0: - version "6.26.1" - resolved "https://registry.yarnpkg.com/babel-generator/-/babel-generator-6.26.1.tgz#1844408d3b8f0d35a404ea7ac180f087a601bd90" - integrity sha512-HyfwY6ApZj7BYTcJURpM5tznulaBvyio7/0d4zFOeMPUmfxkCjHocCuoLa2SAGzBI8AREcH3eP3758F672DppA== - dependencies: - babel-messages "^6.23.0" - babel-runtime "^6.26.0" - babel-types "^6.26.0" - detect-indent "^4.0.0" - jsesc "^1.3.0" - lodash "^4.17.4" - source-map "^0.5.7" - trim-right "^1.0.1" - -babel-helper-builder-binary-assignment-operator-visitor@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-helper-builder-binary-assignment-operator-visitor/-/babel-helper-builder-binary-assignment-operator-visitor-6.24.1.tgz#cce4517ada356f4220bcae8a02c2b346f9a56664" - integrity sha1-zORReto1b0IgvK6KAsKzRvmlZmQ= - dependencies: - babel-helper-explode-assignable-expression "^6.24.1" - babel-runtime "^6.22.0" - babel-types "^6.24.1" - -babel-helper-call-delegate@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-helper-call-delegate/-/babel-helper-call-delegate-6.24.1.tgz#ece6aacddc76e41c3461f88bfc575bd0daa2df8d" - integrity sha1-7Oaqzdx25Bw0YfiL/Fdb0Nqi340= - dependencies: - babel-helper-hoist-variables "^6.24.1" - babel-runtime "^6.22.0" - babel-traverse "^6.24.1" - babel-types "^6.24.1" - -babel-helper-define-map@^6.24.1: - version "6.26.0" - resolved "https://registry.yarnpkg.com/babel-helper-define-map/-/babel-helper-define-map-6.26.0.tgz#a5f56dab41a25f97ecb498c7ebaca9819f95be5f" - integrity sha1-pfVtq0GiX5fstJjH66ypgZ+Vvl8= - dependencies: - babel-helper-function-name "^6.24.1" - babel-runtime "^6.26.0" - babel-types "^6.26.0" - lodash "^4.17.4" - -babel-helper-explode-assignable-expression@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-helper-explode-assignable-expression/-/babel-helper-explode-assignable-expression-6.24.1.tgz#f25b82cf7dc10433c55f70592d5746400ac22caa" - integrity sha1-8luCz33BBDPFX3BZLVdGQArCLKo= - dependencies: - babel-runtime "^6.22.0" - babel-traverse "^6.24.1" - babel-types "^6.24.1" - -babel-helper-function-name@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-helper-function-name/-/babel-helper-function-name-6.24.1.tgz#d3475b8c03ed98242a25b48351ab18399d3580a9" - integrity sha1-00dbjAPtmCQqJbSDUasYOZ01gKk= - dependencies: - babel-helper-get-function-arity "^6.24.1" - babel-runtime "^6.22.0" - babel-template "^6.24.1" - babel-traverse "^6.24.1" - babel-types "^6.24.1" - -babel-helper-get-function-arity@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-helper-get-function-arity/-/babel-helper-get-function-arity-6.24.1.tgz#8f7782aa93407c41d3aa50908f89b031b1b6853d" - integrity sha1-j3eCqpNAfEHTqlCQj4mwMbG2hT0= - dependencies: - babel-runtime "^6.22.0" - babel-types "^6.24.1" - -babel-helper-hoist-variables@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-helper-hoist-variables/-/babel-helper-hoist-variables-6.24.1.tgz#1ecb27689c9d25513eadbc9914a73f5408be7a76" - integrity sha1-HssnaJydJVE+rbyZFKc/VAi+enY= - dependencies: - babel-runtime "^6.22.0" - babel-types "^6.24.1" - -babel-helper-optimise-call-expression@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-helper-optimise-call-expression/-/babel-helper-optimise-call-expression-6.24.1.tgz#f7a13427ba9f73f8f4fa993c54a97882d1244257" - integrity sha1-96E0J7qfc/j0+pk8VKl4gtEkQlc= - dependencies: - babel-runtime "^6.22.0" - babel-types "^6.24.1" - -babel-helper-regex@^6.24.1: - version "6.26.0" - resolved "https://registry.yarnpkg.com/babel-helper-regex/-/babel-helper-regex-6.26.0.tgz#325c59f902f82f24b74faceed0363954f6495e72" - integrity sha1-MlxZ+QL4LyS3T6zu0DY5VPZJXnI= - dependencies: - babel-runtime "^6.26.0" - babel-types "^6.26.0" - lodash "^4.17.4" - -babel-helper-remap-async-to-generator@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-helper-remap-async-to-generator/-/babel-helper-remap-async-to-generator-6.24.1.tgz#5ec581827ad723fecdd381f1c928390676e4551b" - integrity sha1-XsWBgnrXI/7N04HxySg5BnbkVRs= - dependencies: - babel-helper-function-name "^6.24.1" - babel-runtime "^6.22.0" - babel-template "^6.24.1" - babel-traverse "^6.24.1" - babel-types "^6.24.1" - -babel-helper-replace-supers@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-helper-replace-supers/-/babel-helper-replace-supers-6.24.1.tgz#bf6dbfe43938d17369a213ca8a8bf74b6a90ab1a" - integrity sha1-v22/5Dk40XNpohPKiov3S2qQqxo= - dependencies: - babel-helper-optimise-call-expression "^6.24.1" - babel-messages "^6.23.0" - babel-runtime "^6.22.0" - babel-template "^6.24.1" - babel-traverse "^6.24.1" - babel-types "^6.24.1" - -babel-helpers@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-helpers/-/babel-helpers-6.24.1.tgz#3471de9caec388e5c850e597e58a26ddf37602b2" - integrity sha1-NHHenK7DiOXIUOWX5Yom3fN2ArI= - dependencies: - babel-runtime "^6.22.0" - babel-template "^6.24.1" - -babel-jest@^24.9.0: - version "24.9.0" - resolved "https://registry.yarnpkg.com/babel-jest/-/babel-jest-24.9.0.tgz#3fc327cb8467b89d14d7bc70e315104a783ccd54" - integrity sha512-ntuddfyiN+EhMw58PTNL1ph4C9rECiQXjI4nMMBKBaNjXvqLdkXpPRcMSr4iyBrJg/+wz9brFUD6RhOAT6r4Iw== - dependencies: - "@jest/transform" "^24.9.0" - "@jest/types" "^24.9.0" - "@types/babel__core" "^7.1.0" - babel-plugin-istanbul "^5.1.0" - babel-preset-jest "^24.9.0" - chalk "^2.4.2" - slash "^2.0.0" - -babel-messages@^6.23.0: - version "6.23.0" - resolved "https://registry.yarnpkg.com/babel-messages/-/babel-messages-6.23.0.tgz#f3cdf4703858035b2a2951c6ec5edf6c62f2630e" - integrity sha1-8830cDhYA1sqKVHG7F7fbGLyYw4= - dependencies: - babel-runtime "^6.22.0" - -babel-plugin-check-es2015-constants@^6.22.0: - version "6.22.0" - resolved "https://registry.yarnpkg.com/babel-plugin-check-es2015-constants/-/babel-plugin-check-es2015-constants-6.22.0.tgz#35157b101426fd2ffd3da3f75c7d1e91835bbf8a" - integrity sha1-NRV7EBQm/S/9PaP3XH0ekYNbv4o= - dependencies: - babel-runtime "^6.22.0" - -babel-plugin-istanbul@^5.1.0: - version "5.2.0" - resolved "https://registry.yarnpkg.com/babel-plugin-istanbul/-/babel-plugin-istanbul-5.2.0.tgz#df4ade83d897a92df069c4d9a25cf2671293c854" - integrity sha512-5LphC0USA8t4i1zCtjbbNb6jJj/9+X6P37Qfirc/70EQ34xKlMW+a1RHGwxGI+SwWpNwZ27HqvzAobeqaXwiZw== - dependencies: - "@babel/helper-plugin-utils" "^7.0.0" - find-up "^3.0.0" - istanbul-lib-instrument "^3.3.0" - test-exclude "^5.2.3" - -babel-plugin-jest-hoist@^24.9.0: - version "24.9.0" - resolved "https://registry.yarnpkg.com/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-24.9.0.tgz#4f837091eb407e01447c8843cbec546d0002d756" - integrity sha512-2EMA2P8Vp7lG0RAzr4HXqtYwacfMErOuv1U3wrvxHX6rD1sV6xS3WXG3r8TRQ2r6w8OhvSdWt+z41hQNwNm3Xw== - dependencies: - "@types/babel__traverse" "^7.0.6" - -babel-plugin-syntax-async-functions@^6.8.0: - version "6.13.0" - resolved "https://registry.yarnpkg.com/babel-plugin-syntax-async-functions/-/babel-plugin-syntax-async-functions-6.13.0.tgz#cad9cad1191b5ad634bf30ae0872391e0647be95" - integrity sha1-ytnK0RkbWtY0vzCuCHI5HgZHvpU= - -babel-plugin-syntax-exponentiation-operator@^6.8.0: - version "6.13.0" - resolved "https://registry.yarnpkg.com/babel-plugin-syntax-exponentiation-operator/-/babel-plugin-syntax-exponentiation-operator-6.13.0.tgz#9ee7e8337290da95288201a6a57f4170317830de" - integrity sha1-nufoM3KQ2pUoggGmpX9BcDF4MN4= - -babel-plugin-syntax-trailing-function-commas@^6.22.0: - version "6.22.0" - resolved "https://registry.yarnpkg.com/babel-plugin-syntax-trailing-function-commas/-/babel-plugin-syntax-trailing-function-commas-6.22.0.tgz#ba0360937f8d06e40180a43fe0d5616fff532cf3" - integrity sha1-ugNgk3+NBuQBgKQ/4NVhb/9TLPM= - -babel-plugin-transform-async-to-generator@^6.22.0: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-async-to-generator/-/babel-plugin-transform-async-to-generator-6.24.1.tgz#6536e378aff6cb1d5517ac0e40eb3e9fc8d08761" - integrity sha1-ZTbjeK/2yx1VF6wOQOs+n8jQh2E= - dependencies: - babel-helper-remap-async-to-generator "^6.24.1" - babel-plugin-syntax-async-functions "^6.8.0" - babel-runtime "^6.22.0" - -babel-plugin-transform-es2015-arrow-functions@^6.22.0: - version "6.22.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-arrow-functions/-/babel-plugin-transform-es2015-arrow-functions-6.22.0.tgz#452692cb711d5f79dc7f85e440ce41b9f244d221" - integrity sha1-RSaSy3EdX3ncf4XkQM5BufJE0iE= - dependencies: - babel-runtime "^6.22.0" - -babel-plugin-transform-es2015-block-scoped-functions@^6.22.0: - version "6.22.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-block-scoped-functions/-/babel-plugin-transform-es2015-block-scoped-functions-6.22.0.tgz#bbc51b49f964d70cb8d8e0b94e820246ce3a6141" - integrity sha1-u8UbSflk1wy42OC5ToICRs46YUE= - dependencies: - babel-runtime "^6.22.0" - -babel-plugin-transform-es2015-block-scoping@^6.23.0: - version "6.26.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-block-scoping/-/babel-plugin-transform-es2015-block-scoping-6.26.0.tgz#d70f5299c1308d05c12f463813b0a09e73b1895f" - integrity sha1-1w9SmcEwjQXBL0Y4E7CgnnOxiV8= - dependencies: - babel-runtime "^6.26.0" - babel-template "^6.26.0" - babel-traverse "^6.26.0" - babel-types "^6.26.0" - lodash "^4.17.4" - -babel-plugin-transform-es2015-classes@^6.23.0: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-classes/-/babel-plugin-transform-es2015-classes-6.24.1.tgz#5a4c58a50c9c9461e564b4b2a3bfabc97a2584db" - integrity sha1-WkxYpQyclGHlZLSyo7+ryXolhNs= - dependencies: - babel-helper-define-map "^6.24.1" - babel-helper-function-name "^6.24.1" - babel-helper-optimise-call-expression "^6.24.1" - babel-helper-replace-supers "^6.24.1" - babel-messages "^6.23.0" - babel-runtime "^6.22.0" - babel-template "^6.24.1" - babel-traverse "^6.24.1" - babel-types "^6.24.1" - -babel-plugin-transform-es2015-computed-properties@^6.22.0: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-computed-properties/-/babel-plugin-transform-es2015-computed-properties-6.24.1.tgz#6fe2a8d16895d5634f4cd999b6d3480a308159b3" - integrity sha1-b+Ko0WiV1WNPTNmZttNICjCBWbM= - dependencies: - babel-runtime "^6.22.0" - babel-template "^6.24.1" - -babel-plugin-transform-es2015-destructuring@^6.23.0: - version "6.23.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-destructuring/-/babel-plugin-transform-es2015-destructuring-6.23.0.tgz#997bb1f1ab967f682d2b0876fe358d60e765c56d" - integrity sha1-mXux8auWf2gtKwh2/jWNYOdlxW0= - dependencies: - babel-runtime "^6.22.0" - -babel-plugin-transform-es2015-duplicate-keys@^6.22.0: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-duplicate-keys/-/babel-plugin-transform-es2015-duplicate-keys-6.24.1.tgz#73eb3d310ca969e3ef9ec91c53741a6f1576423e" - integrity sha1-c+s9MQypaePvnskcU3QabxV2Qj4= - dependencies: - babel-runtime "^6.22.0" - babel-types "^6.24.1" - -babel-plugin-transform-es2015-for-of@^6.23.0: - version "6.23.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-for-of/-/babel-plugin-transform-es2015-for-of-6.23.0.tgz#f47c95b2b613df1d3ecc2fdb7573623c75248691" - integrity sha1-9HyVsrYT3x0+zC/bdXNiPHUkhpE= - dependencies: - babel-runtime "^6.22.0" - -babel-plugin-transform-es2015-function-name@^6.22.0: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-function-name/-/babel-plugin-transform-es2015-function-name-6.24.1.tgz#834c89853bc36b1af0f3a4c5dbaa94fd8eacaa8b" - integrity sha1-g0yJhTvDaxrw86TF26qU/Y6sqos= - dependencies: - babel-helper-function-name "^6.24.1" - babel-runtime "^6.22.0" - babel-types "^6.24.1" - -babel-plugin-transform-es2015-literals@^6.22.0: - version "6.22.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-literals/-/babel-plugin-transform-es2015-literals-6.22.0.tgz#4f54a02d6cd66cf915280019a31d31925377ca2e" - integrity sha1-T1SgLWzWbPkVKAAZox0xklN3yi4= - dependencies: - babel-runtime "^6.22.0" - -babel-plugin-transform-es2015-modules-amd@^6.22.0, babel-plugin-transform-es2015-modules-amd@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-modules-amd/-/babel-plugin-transform-es2015-modules-amd-6.24.1.tgz#3b3e54017239842d6d19c3011c4bd2f00a00d154" - integrity sha1-Oz5UAXI5hC1tGcMBHEvS8AoA0VQ= - dependencies: - babel-plugin-transform-es2015-modules-commonjs "^6.24.1" - babel-runtime "^6.22.0" - babel-template "^6.24.1" - -babel-plugin-transform-es2015-modules-commonjs@^6.23.0, babel-plugin-transform-es2015-modules-commonjs@^6.24.1: - version "6.26.2" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-modules-commonjs/-/babel-plugin-transform-es2015-modules-commonjs-6.26.2.tgz#58a793863a9e7ca870bdc5a881117ffac27db6f3" - integrity sha512-CV9ROOHEdrjcwhIaJNBGMBCodN+1cfkwtM1SbUHmvyy35KGT7fohbpOxkE2uLz1o6odKK2Ck/tz47z+VqQfi9Q== - dependencies: - babel-plugin-transform-strict-mode "^6.24.1" - babel-runtime "^6.26.0" - babel-template "^6.26.0" - babel-types "^6.26.0" - -babel-plugin-transform-es2015-modules-systemjs@^6.23.0: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-modules-systemjs/-/babel-plugin-transform-es2015-modules-systemjs-6.24.1.tgz#ff89a142b9119a906195f5f106ecf305d9407d23" - integrity sha1-/4mhQrkRmpBhlfXxBuzzBdlAfSM= - dependencies: - babel-helper-hoist-variables "^6.24.1" - babel-runtime "^6.22.0" - babel-template "^6.24.1" - -babel-plugin-transform-es2015-modules-umd@^6.23.0: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-modules-umd/-/babel-plugin-transform-es2015-modules-umd-6.24.1.tgz#ac997e6285cd18ed6176adb607d602344ad38468" - integrity sha1-rJl+YoXNGO1hdq22B9YCNErThGg= - dependencies: - babel-plugin-transform-es2015-modules-amd "^6.24.1" - babel-runtime "^6.22.0" - babel-template "^6.24.1" - -babel-plugin-transform-es2015-object-super@^6.22.0: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-object-super/-/babel-plugin-transform-es2015-object-super-6.24.1.tgz#24cef69ae21cb83a7f8603dad021f572eb278f8d" - integrity sha1-JM72muIcuDp/hgPa0CH1cusnj40= - dependencies: - babel-helper-replace-supers "^6.24.1" - babel-runtime "^6.22.0" - -babel-plugin-transform-es2015-parameters@^6.23.0: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-parameters/-/babel-plugin-transform-es2015-parameters-6.24.1.tgz#57ac351ab49caf14a97cd13b09f66fdf0a625f2b" - integrity sha1-V6w1GrScrxSpfNE7CfZv3wpiXys= - dependencies: - babel-helper-call-delegate "^6.24.1" - babel-helper-get-function-arity "^6.24.1" - babel-runtime "^6.22.0" - babel-template "^6.24.1" - babel-traverse "^6.24.1" - babel-types "^6.24.1" - -babel-plugin-transform-es2015-shorthand-properties@^6.22.0: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-shorthand-properties/-/babel-plugin-transform-es2015-shorthand-properties-6.24.1.tgz#24f875d6721c87661bbd99a4622e51f14de38aa0" - integrity sha1-JPh11nIch2YbvZmkYi5R8U3jiqA= - dependencies: - babel-runtime "^6.22.0" - babel-types "^6.24.1" - -babel-plugin-transform-es2015-spread@^6.22.0: - version "6.22.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-spread/-/babel-plugin-transform-es2015-spread-6.22.0.tgz#d6d68a99f89aedc4536c81a542e8dd9f1746f8d1" - integrity sha1-1taKmfia7cRTbIGlQujdnxdG+NE= - dependencies: - babel-runtime "^6.22.0" - -babel-plugin-transform-es2015-sticky-regex@^6.22.0: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-sticky-regex/-/babel-plugin-transform-es2015-sticky-regex-6.24.1.tgz#00c1cdb1aca71112cdf0cf6126c2ed6b457ccdbc" - integrity sha1-AMHNsaynERLN8M9hJsLta0V8zbw= - dependencies: - babel-helper-regex "^6.24.1" - babel-runtime "^6.22.0" - babel-types "^6.24.1" - -babel-plugin-transform-es2015-template-literals@^6.22.0: - version "6.22.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-template-literals/-/babel-plugin-transform-es2015-template-literals-6.22.0.tgz#a84b3450f7e9f8f1f6839d6d687da84bb1236d8d" - integrity sha1-qEs0UPfp+PH2g51taH2oS7EjbY0= - dependencies: - babel-runtime "^6.22.0" - -babel-plugin-transform-es2015-typeof-symbol@^6.23.0: - version "6.23.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-typeof-symbol/-/babel-plugin-transform-es2015-typeof-symbol-6.23.0.tgz#dec09f1cddff94b52ac73d505c84df59dcceb372" - integrity sha1-3sCfHN3/lLUqxz1QXITfWdzOs3I= - dependencies: - babel-runtime "^6.22.0" - -babel-plugin-transform-es2015-unicode-regex@^6.22.0: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-unicode-regex/-/babel-plugin-transform-es2015-unicode-regex-6.24.1.tgz#d38b12f42ea7323f729387f18a7c5ae1faeb35e9" - integrity sha1-04sS9C6nMj9yk4fxinxa4frrNek= - dependencies: - babel-helper-regex "^6.24.1" - babel-runtime "^6.22.0" - regexpu-core "^2.0.0" - -babel-plugin-transform-exponentiation-operator@^6.22.0: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-exponentiation-operator/-/babel-plugin-transform-exponentiation-operator-6.24.1.tgz#2ab0c9c7f3098fa48907772bb813fe41e8de3a0e" - integrity sha1-KrDJx/MJj6SJB3cruBP+QejeOg4= - dependencies: - babel-helper-builder-binary-assignment-operator-visitor "^6.24.1" - babel-plugin-syntax-exponentiation-operator "^6.8.0" - babel-runtime "^6.22.0" - -babel-plugin-transform-regenerator@^6.22.0: - version "6.26.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-regenerator/-/babel-plugin-transform-regenerator-6.26.0.tgz#e0703696fbde27f0a3efcacf8b4dca2f7b3a8f2f" - integrity sha1-4HA2lvveJ/Cj78rPi03KL3s6jy8= - dependencies: - regenerator-transform "^0.10.0" - -babel-plugin-transform-strict-mode@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-strict-mode/-/babel-plugin-transform-strict-mode-6.24.1.tgz#d5faf7aa578a65bbe591cf5edae04a0c67020758" - integrity sha1-1fr3qleKZbvlkc9e2uBKDGcCB1g= - dependencies: - babel-runtime "^6.22.0" - babel-types "^6.24.1" - -babel-preset-env@^1.7.0: - version "1.7.0" - resolved "https://registry.yarnpkg.com/babel-preset-env/-/babel-preset-env-1.7.0.tgz#dea79fa4ebeb883cd35dab07e260c1c9c04df77a" - integrity sha512-9OR2afuKDneX2/q2EurSftUYM0xGu4O2D9adAhVfADDhrYDaxXV0rBbevVYoY9n6nyX1PmQW/0jtpJvUNr9CHg== - dependencies: - babel-plugin-check-es2015-constants "^6.22.0" - babel-plugin-syntax-trailing-function-commas "^6.22.0" - babel-plugin-transform-async-to-generator "^6.22.0" - babel-plugin-transform-es2015-arrow-functions "^6.22.0" - babel-plugin-transform-es2015-block-scoped-functions "^6.22.0" - babel-plugin-transform-es2015-block-scoping "^6.23.0" - babel-plugin-transform-es2015-classes "^6.23.0" - babel-plugin-transform-es2015-computed-properties "^6.22.0" - babel-plugin-transform-es2015-destructuring "^6.23.0" - babel-plugin-transform-es2015-duplicate-keys "^6.22.0" - babel-plugin-transform-es2015-for-of "^6.23.0" - babel-plugin-transform-es2015-function-name "^6.22.0" - babel-plugin-transform-es2015-literals "^6.22.0" - babel-plugin-transform-es2015-modules-amd "^6.22.0" - babel-plugin-transform-es2015-modules-commonjs "^6.23.0" - babel-plugin-transform-es2015-modules-systemjs "^6.23.0" - babel-plugin-transform-es2015-modules-umd "^6.23.0" - babel-plugin-transform-es2015-object-super "^6.22.0" - babel-plugin-transform-es2015-parameters "^6.23.0" - babel-plugin-transform-es2015-shorthand-properties "^6.22.0" - babel-plugin-transform-es2015-spread "^6.22.0" - babel-plugin-transform-es2015-sticky-regex "^6.22.0" - babel-plugin-transform-es2015-template-literals "^6.22.0" - babel-plugin-transform-es2015-typeof-symbol "^6.23.0" - babel-plugin-transform-es2015-unicode-regex "^6.22.0" - babel-plugin-transform-exponentiation-operator "^6.22.0" - babel-plugin-transform-regenerator "^6.22.0" - browserslist "^3.2.6" - invariant "^2.2.2" - semver "^5.3.0" - -babel-preset-jest@^24.9.0: - version "24.9.0" - resolved "https://registry.yarnpkg.com/babel-preset-jest/-/babel-preset-jest-24.9.0.tgz#192b521e2217fb1d1f67cf73f70c336650ad3cdc" - integrity sha512-izTUuhE4TMfTRPF92fFwD2QfdXaZW08qvWTFCI51V8rW5x00UuPgc3ajRoWofXOuxjfcOM5zzSYsQS3H8KGCAg== - dependencies: - "@babel/plugin-syntax-object-rest-spread" "^7.0.0" - babel-plugin-jest-hoist "^24.9.0" - -babel-register@^6.26.0: - version "6.26.0" - resolved "https://registry.yarnpkg.com/babel-register/-/babel-register-6.26.0.tgz#6ed021173e2fcb486d7acb45c6009a856f647071" - integrity sha1-btAhFz4vy0htestFxgCahW9kcHE= - dependencies: - babel-core "^6.26.0" - babel-runtime "^6.26.0" - core-js "^2.5.0" - home-or-tmp "^2.0.0" - lodash "^4.17.4" - mkdirp "^0.5.1" - source-map-support "^0.4.15" - -babel-runtime@^6.18.0, babel-runtime@^6.22.0, babel-runtime@^6.26.0: - version "6.26.0" - resolved "https://registry.yarnpkg.com/babel-runtime/-/babel-runtime-6.26.0.tgz#965c7058668e82b55d7bfe04ff2337bc8b5647fe" - integrity sha1-llxwWGaOgrVde/4E/yM3vItWR/4= - dependencies: - core-js "^2.4.0" - regenerator-runtime "^0.11.0" - -babel-template@^6.24.1, babel-template@^6.26.0: - version "6.26.0" - resolved "https://registry.yarnpkg.com/babel-template/-/babel-template-6.26.0.tgz#de03e2d16396b069f46dd9fff8521fb1a0e35e02" - integrity sha1-3gPi0WOWsGn0bdn/+FIfsaDjXgI= - dependencies: - babel-runtime "^6.26.0" - babel-traverse "^6.26.0" - babel-types "^6.26.0" - babylon "^6.18.0" - lodash "^4.17.4" - -babel-traverse@^6.24.1, babel-traverse@^6.26.0: - version "6.26.0" - resolved "https://registry.yarnpkg.com/babel-traverse/-/babel-traverse-6.26.0.tgz#46a9cbd7edcc62c8e5c064e2d2d8d0f4035766ee" - integrity sha1-RqnL1+3MYsjlwGTi0tjQ9ANXZu4= - dependencies: - babel-code-frame "^6.26.0" - babel-messages "^6.23.0" - babel-runtime "^6.26.0" - babel-types "^6.26.0" - babylon "^6.18.0" - debug "^2.6.8" - globals "^9.18.0" - invariant "^2.2.2" - lodash "^4.17.4" - -babel-types@^6.19.0, babel-types@^6.24.1, babel-types@^6.26.0: - version "6.26.0" - resolved "https://registry.yarnpkg.com/babel-types/-/babel-types-6.26.0.tgz#a3b073f94ab49eb6fa55cd65227a334380632497" - integrity sha1-o7Bz+Uq0nrb6Vc1lInozQ4BjJJc= - dependencies: - babel-runtime "^6.26.0" - esutils "^2.0.2" - lodash "^4.17.4" - to-fast-properties "^1.0.3" - -babelify@^7.3.0: - version "7.3.0" - resolved "https://registry.yarnpkg.com/babelify/-/babelify-7.3.0.tgz#aa56aede7067fd7bd549666ee16dc285087e88e5" - integrity sha1-qlau3nBn/XvVSWZu4W3ChQh+iOU= - dependencies: - babel-core "^6.0.14" - object-assign "^4.0.0" - -babylon@^6.18.0: - version "6.18.0" - resolved "https://registry.yarnpkg.com/babylon/-/babylon-6.18.0.tgz#af2f3b88fa6f5c1e4c634d1a0f8eac4f55b395e3" - integrity sha512-q/UEjfGJ2Cm3oKV71DJz9d25TPnq5rhBVL2Q4fA5wcC3jcrdn7+SssEybFIxwAvvP+YCsCYNKughoF33GxgycQ== - -bach@^1.0.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/bach/-/bach-1.2.0.tgz#4b3ce96bf27134f79a1b414a51c14e34c3bd9880" - integrity sha1-Szzpa/JxNPeaG0FKUcFONMO9mIA= - dependencies: - arr-filter "^1.1.1" - arr-flatten "^1.0.1" - arr-map "^2.0.0" - array-each "^1.0.0" - array-initial "^1.0.0" - array-last "^1.1.1" - async-done "^1.2.2" - async-settle "^1.0.0" - now-and-later "^2.0.0" - -backoff@^2.5.0: - version "2.5.0" - resolved "https://registry.yarnpkg.com/backoff/-/backoff-2.5.0.tgz#f616eda9d3e4b66b8ca7fca79f695722c5f8e26f" - integrity sha1-9hbtqdPktmuMp/ynn2lXIsX44m8= - dependencies: - precond "0.2" - -balanced-match@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767" - integrity sha1-ibTRmasr7kneFk6gK4nORi1xt2c= - -base-x@^3.0.2: - version "3.0.7" - resolved "https://registry.yarnpkg.com/base-x/-/base-x-3.0.7.tgz#1c5a7fafe8f66b4114063e8da102799d4e7c408f" - integrity sha512-zAKJGuQPihXW22fkrfOclUUZXM2g92z5GzlSMHxhO6r6Qj+Nm0ccaGNBzDZojzwOMkpjAv4J0fOv1U4go+a4iw== - dependencies: - safe-buffer "^5.0.1" - -base-x@^3.0.8: - version "3.0.8" - resolved "https://registry.yarnpkg.com/base-x/-/base-x-3.0.8.tgz#1e1106c2537f0162e8b52474a557ebb09000018d" - integrity sha512-Rl/1AWP4J/zRrk54hhlxH4drNxPJXYUaKffODVI53/dAsV4t9fBxyxYKAVPU1XBHxYwOWP9h9H0hM2MVw4YfJA== - dependencies: - safe-buffer "^5.0.1" - -base64-js@^1.0.2: - version "1.3.1" - resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.3.1.tgz#58ece8cb75dd07e71ed08c736abc5fac4dbf8df1" - integrity sha512-mLQ4i2QO1ytvGWFWmcngKO//JXAQueZvwEKtjgQFM4jIK0kU+ytMfplL8j+n5mspOfjHwoAg+9yhb7BwAHm36g== - -base@^0.11.1: - version "0.11.2" - resolved "https://registry.yarnpkg.com/base/-/base-0.11.2.tgz#7bde5ced145b6d551a90db87f83c558b4eb48a8f" - integrity sha512-5T6P4xPgpp0YDFvSWwEZ4NoE3aM4QBQXDzmVbraCkFj8zHM+mba8SyqB5DbZWyR7mYHo6Y7BdQo3MoA4m0TeQg== - dependencies: - cache-base "^1.0.1" - class-utils "^0.3.5" - component-emitter "^1.2.1" - define-property "^1.0.0" - isobject "^3.0.1" - mixin-deep "^1.2.0" - pascalcase "^0.1.1" - -bcrypt-pbkdf@^1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz#a4301d389b6a43f9b67ff3ca11a3f6637e360e9e" - integrity sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4= - dependencies: - tweetnacl "^0.14.3" - -bech32@1.1.4: - version "1.1.4" - resolved "https://registry.yarnpkg.com/bech32/-/bech32-1.1.4.tgz#e38c9f37bf179b8eb16ae3a772b40c356d4832e9" - integrity sha512-s0IrSOzLlbvX7yp4WBfPITzpAU8sqQcpsmwXDiKwrG4r491vwCO/XpejasRNl0piBMe/DvP4Tz0mIS/X1DPJBQ== - -bfj@^6.1.1: - version "6.1.2" - resolved "https://registry.yarnpkg.com/bfj/-/bfj-6.1.2.tgz#325c861a822bcb358a41c78a33b8e6e2086dde7f" - integrity sha512-BmBJa4Lip6BPRINSZ0BPEIfB1wUY/9rwbwvIHQA1KjX9om29B6id0wnWXq7m3bn5JrUVjeOTnVuhPT1FiHwPGw== - dependencies: - bluebird "^3.5.5" - check-types "^8.0.3" - hoopy "^0.1.4" - tryer "^1.0.1" - -big.js@^5.2.2: - version "5.2.2" - resolved "https://registry.yarnpkg.com/big.js/-/big.js-5.2.2.tgz#65f0af382f578bcdc742bd9c281e9cb2d7768328" - integrity sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ== - -bignumber.js@*, bignumber.js@9.0.0, bignumber.js@^9.0.0, bignumber.js@~9.0.0: - version "9.0.0" - resolved "https://registry.yarnpkg.com/bignumber.js/-/bignumber.js-9.0.0.tgz#805880f84a329b5eac6e7cb6f8274b6d82bdf075" - integrity sha512-t/OYhhJ2SD+YGBQcjY8GzzDHEk9f3nerxjtfa6tlMXfe7frs/WozhvCNoGvpM0P3bNf3Gq5ZRMlGr5f3r4/N8A== - -bignumber.js@7.2.1: - version "7.2.1" - resolved "https://registry.yarnpkg.com/bignumber.js/-/bignumber.js-7.2.1.tgz#80c048759d826800807c4bfd521e50edbba57a5f" - integrity sha512-S4XzBk5sMB+Rcb/LNcpzXr57VRTxgAvaAEDAl1AwRx27j00hT84O6OkteE7u8UB3NuaaygCRrEpqox4uDOrbdQ== - -binary-extensions@^1.0.0: - version "1.13.1" - resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-1.13.1.tgz#598afe54755b2868a5330d2aff9d4ebb53209b65" - integrity sha512-Un7MIEDdUC5gNpcGDV97op1Ywk748MpHcFTHoYs6qnj1Z3j7I53VG3nwZhKzoBZmbdRNnb6WRdFlwl7tSDuZGw== - -binary-extensions@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-2.0.0.tgz#23c0df14f6a88077f5f986c0d167ec03c3d5537c" - integrity sha512-Phlt0plgpIIBOGTT/ehfFnbNlfsDEiqmzE2KRXoX1bLIlir4X/MR+zSyBEkL05ffWgnRSf/DXv+WrUAVr93/ow== - -bindings@^1.2.1, bindings@^1.4.0, bindings@^1.5.0: - version "1.5.0" - resolved "https://registry.yarnpkg.com/bindings/-/bindings-1.5.0.tgz#10353c9e945334bc0511a6d90b38fbc7c9c504df" - integrity sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ== - dependencies: - file-uri-to-path "1.0.0" - -bip39@2.5.0: - version "2.5.0" - resolved "https://registry.yarnpkg.com/bip39/-/bip39-2.5.0.tgz#51cbd5179460504a63ea3c000db3f787ca051235" - integrity sha512-xwIx/8JKoT2+IPJpFEfXoWdYwP7UVAoUxxLNfGCfVowaJE7yg1Y5B1BVPqlUNsBq5/nGwmFkwRJ8xDW4sX8OdA== - dependencies: - create-hash "^1.1.0" - pbkdf2 "^3.0.9" - randombytes "^2.0.1" - safe-buffer "^5.0.1" - unorm "^1.3.3" - -bip39@^2.5.0: - version "2.6.0" - resolved "https://registry.yarnpkg.com/bip39/-/bip39-2.6.0.tgz#9e3a720b42ec8b3fbe4038f1e445317b6a99321c" - integrity sha512-RrnQRG2EgEoqO24ea+Q/fftuPUZLmrEM3qNhhGsA3PbaXaCW791LTzPuVyx/VprXQcTbPJ3K3UeTna8ZnVl2sg== - dependencies: - create-hash "^1.1.0" - pbkdf2 "^3.0.9" - randombytes "^2.0.1" - safe-buffer "^5.0.1" - unorm "^1.3.3" - -bip66@^1.1.5: - version "1.1.5" - resolved "https://registry.yarnpkg.com/bip66/-/bip66-1.1.5.tgz#01fa8748785ca70955d5011217d1b3139969ca22" - integrity sha1-AfqHSHhcpwlV1QESF9GzE5lpyiI= - dependencies: - safe-buffer "^5.0.1" - -bl@^1.0.0: - version "1.2.2" - resolved "https://registry.yarnpkg.com/bl/-/bl-1.2.2.tgz#a160911717103c07410cef63ef51b397c025af9c" - integrity sha512-e8tQYnZodmebYDWGH7KMRvtzKXaJHx3BbilrgZCfvyLUYdKpK1t5PSPmpkny/SgiTSCnjfLW7v5rlONXVFkQEA== - dependencies: - readable-stream "^2.3.5" - safe-buffer "^5.1.1" - -bl@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/bl/-/bl-3.0.0.tgz#3611ec00579fd18561754360b21e9f784500ff88" - integrity sha512-EUAyP5UHU5hxF8BPT0LKW8gjYLhq1DQIcneOX/pL/m2Alo+OYDQAJlHq+yseMP50Os2nHXOSic6Ss3vSQeyf4A== - dependencies: - readable-stream "^3.0.1" - -bluebird@^3.5.0, bluebird@^3.5.5: - version "3.7.2" - resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.7.2.tgz#9f229c15be272454ffa973ace0dbee79a1b0c36f" - integrity sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg== - -bn.js@4.11.6: - version "4.11.6" - resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-4.11.6.tgz#53344adb14617a13f6e8dd2ce28905d1c0ba3215" - integrity sha1-UzRK2xRhehP26N0s4okF0cC6MhU= - -bn.js@4.11.8, bn.js@^4.0.0, bn.js@^4.1.0, bn.js@^4.1.1, bn.js@^4.10.0, bn.js@^4.11.0, bn.js@^4.11.1, bn.js@^4.11.6, bn.js@^4.11.8, bn.js@^4.8.0: - version "4.11.8" - resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-4.11.8.tgz#2cde09eb5ee341f484746bb0309b3253b1b1442f" - integrity sha512-ItfYfPLkWHUjckQCk8xC+LwxgK8NYcXywGigJgSwOP8Y2iyWT4f2vsZnoOXTTbo+o5yXmIUJ4gn5538SO5S3gA== - -bn.js@^4.11.9: - version "4.11.9" - resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-4.11.9.tgz#26d556829458f9d1e81fc48952493d0ba3507828" - integrity sha512-E6QoYqCKZfgatHTdHzs1RRKP7ip4vvm+EyRUeE2RF0NblwVvb0p6jSVeNTOFxPn26QXN2o6SMfNxKp6kU8zQaw== - -bn.js@^4.4.0: - version "4.12.0" - resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-4.12.0.tgz#775b3f278efbb9718eec7361f483fb36fbbfea88" - integrity sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA== - -body-parser@1.19.0, body-parser@^1.16.0: - version "1.19.0" - resolved "https://registry.yarnpkg.com/body-parser/-/body-parser-1.19.0.tgz#96b2709e57c9c4e09a6fd66a8fd979844f69f08a" - integrity sha512-dhEPs72UPbDnAQJ9ZKMNTP6ptJaionhP5cBb541nXPlW60Jepo9RV/a4fX4XWW9CuFNK22krhrj1+rgzifNCsw== - dependencies: - bytes "3.1.0" - content-type "~1.0.4" - debug "2.6.9" - depd "~1.1.2" - http-errors "1.7.2" - iconv-lite "0.4.24" - on-finished "~2.3.0" - qs "6.7.0" - raw-body "2.4.0" - type-is "~1.6.17" - -brace-expansion@^1.1.7: - version "1.1.11" - resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd" - integrity sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA== - dependencies: - balanced-match "^1.0.0" - concat-map "0.0.1" - -braces@^2.3.1, braces@^2.3.2: - version "2.3.2" - resolved "https://registry.yarnpkg.com/braces/-/braces-2.3.2.tgz#5979fd3f14cd531565e5fa2df1abfff1dfaee729" - integrity sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w== - dependencies: - arr-flatten "^1.1.0" - array-unique "^0.3.2" - extend-shallow "^2.0.1" - fill-range "^4.0.0" - isobject "^3.0.1" - repeat-element "^1.1.2" - snapdragon "^0.8.1" - snapdragon-node "^2.0.1" - split-string "^3.0.2" - to-regex "^3.0.1" - -braces@^3.0.1, braces@~3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.2.tgz#3454e1a462ee8d599e236df336cd9ea4f8afe107" - integrity sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A== - dependencies: - fill-range "^7.0.1" - -brorand@^1.0.1, brorand@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/brorand/-/brorand-1.1.0.tgz#12c25efe40a45e3c323eb8675a0a0ce57b22371f" - integrity sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8= - -browser-process-hrtime@^0.1.2: - version "0.1.3" - resolved "https://registry.yarnpkg.com/browser-process-hrtime/-/browser-process-hrtime-0.1.3.tgz#616f00faef1df7ec1b5bf9cfe2bdc3170f26c7b4" - integrity sha512-bRFnI4NnjO6cnyLmOV/7PVoDEMJChlcfN0z4s1YMBY989/SvlfMI1lgCnkFUs53e9gQF+w7qu7XdllSTiSl8Aw== - -browser-resolve@^1.11.3: - version "1.11.3" - resolved "https://registry.yarnpkg.com/browser-resolve/-/browser-resolve-1.11.3.tgz#9b7cbb3d0f510e4cb86bdbd796124d28b5890af6" - integrity sha512-exDi1BYWB/6raKHmDTCicQfTkqwN5fioMFV4j8BsfMU4R2DK/QfZfK7kOVkmWCNANf0snkBzqGqAJBao9gZMdQ== - dependencies: - resolve "1.1.7" - -browser-stdout@1.3.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/browser-stdout/-/browser-stdout-1.3.0.tgz#f351d32969d32fa5d7a5567154263d928ae3bd1f" - integrity sha1-81HTKWnTL6XXpVZxVCY9korjvR8= - -browserify-aes@^1.0.0, browserify-aes@^1.0.4, browserify-aes@^1.0.6: - version "1.2.0" - resolved "https://registry.yarnpkg.com/browserify-aes/-/browserify-aes-1.2.0.tgz#326734642f403dabc3003209853bb70ad428ef48" - integrity sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA== - dependencies: - buffer-xor "^1.0.3" - cipher-base "^1.0.0" - create-hash "^1.1.0" - evp_bytestokey "^1.0.3" - inherits "^2.0.1" - safe-buffer "^5.0.1" - -browserify-cipher@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/browserify-cipher/-/browserify-cipher-1.0.1.tgz#8d6474c1b870bfdabcd3bcfcc1934a10e94f15f0" - integrity sha512-sPhkz0ARKbf4rRQt2hTpAHqn47X3llLkUGn+xEJzLjwY8LRs2p0v7ljvI5EyoRO/mexrNunNECisZs+gw2zz1w== - dependencies: - browserify-aes "^1.0.4" - browserify-des "^1.0.0" - evp_bytestokey "^1.0.0" - -browserify-des@^1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/browserify-des/-/browserify-des-1.0.2.tgz#3af4f1f59839403572f1c66204375f7a7f703e9c" - integrity sha512-BioO1xf3hFwz4kc6iBhI3ieDFompMhrMlnDFC4/0/vd5MokpuAc3R+LYbwTA9A5Yc9pq9UYPqffKpW2ObuwX5A== - dependencies: - cipher-base "^1.0.1" - des.js "^1.0.0" - inherits "^2.0.1" - safe-buffer "^5.1.2" - -browserify-rsa@^4.0.0: - version "4.0.1" - resolved "https://registry.yarnpkg.com/browserify-rsa/-/browserify-rsa-4.0.1.tgz#21e0abfaf6f2029cf2fafb133567a701d4135524" - integrity sha1-IeCr+vbyApzy+vsTNWenAdQTVSQ= - dependencies: - bn.js "^4.1.0" - randombytes "^2.0.1" - -browserify-sha3@^0.0.4: - version "0.0.4" - resolved "https://registry.yarnpkg.com/browserify-sha3/-/browserify-sha3-0.0.4.tgz#086c47b8c82316c9d47022c26185954576dd8e26" - integrity sha1-CGxHuMgjFsnUcCLCYYWVRXbdjiY= - dependencies: - js-sha3 "^0.6.1" - safe-buffer "^5.1.1" - -browserify-sign@^4.0.0: - version "4.0.4" - resolved "https://registry.yarnpkg.com/browserify-sign/-/browserify-sign-4.0.4.tgz#aa4eb68e5d7b658baa6bf6a57e630cbd7a93d298" - integrity sha1-qk62jl17ZYuqa/alfmMMvXqT0pg= - dependencies: - bn.js "^4.1.1" - browserify-rsa "^4.0.0" - create-hash "^1.1.0" - create-hmac "^1.1.2" - elliptic "^6.0.0" - inherits "^2.0.1" - parse-asn1 "^5.0.0" - -browserify-zlib@^0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/browserify-zlib/-/browserify-zlib-0.2.0.tgz#2869459d9aa3be245fe8fe2ca1f46e2e7f54d73f" - integrity sha512-Z942RysHXmJrhqk88FmKBVq/v5tqmSkDz7p54G/MGyjMnCFFnC79XWNbg+Vta8W6Wb2qtSZTSxIGkJrRpCFEiA== - dependencies: - pako "~1.0.5" - -browserslist@^3.2.6: - version "3.2.8" - resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-3.2.8.tgz#b0005361d6471f0f5952797a76fc985f1f978fc6" - integrity sha512-WHVocJYavUwVgVViC0ORikPHQquXwVh939TaelZ4WDqpWgTX/FsGhl/+P4qBUAGcRvtOgDgC+xftNWWp2RUTAQ== - dependencies: - caniuse-lite "^1.0.30000844" - electron-to-chromium "^1.3.47" - -bs-logger@0.x: - version "0.2.6" - resolved "https://registry.yarnpkg.com/bs-logger/-/bs-logger-0.2.6.tgz#eb7d365307a72cf974cc6cda76b68354ad336bd8" - integrity sha512-pd8DCoxmbgc7hyPKOvxtqNcjYoOsABPQdcCUjGp3d42VR2CX1ORhk2A87oqqu5R1kk+76nsxZupkmyd+MVtCog== - dependencies: - fast-json-stable-stringify "2.x" - -bs58@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/bs58/-/bs58-2.0.1.tgz#55908d58f1982aba2008fa1bed8f91998a29bf8d" - integrity sha1-VZCNWPGYKrogCPob7Y+RmYopv40= - -bs58@^4.0.0: - version "4.0.1" - resolved "https://registry.yarnpkg.com/bs58/-/bs58-4.0.1.tgz#be161e76c354f6f788ae4071f63f34e8c4f0a42a" - integrity sha1-vhYedsNU9veIrkBx9j806MTwpCo= - dependencies: - base-x "^3.0.2" - -bs58check@^2.1.2: - version "2.1.2" - resolved "https://registry.yarnpkg.com/bs58check/-/bs58check-2.1.2.tgz#53b018291228d82a5aa08e7d796fdafda54aebfc" - integrity sha512-0TS1jicxdU09dwJMNZtVAfzPi6Q6QeN0pM1Fkzrjn+XYHvzMKPU3pHVpva+769iNVSfIYWf7LJ6WR+BuuMf8cA== - dependencies: - bs58 "^4.0.0" - create-hash "^1.1.0" - safe-buffer "^5.1.2" - -bser@2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/bser/-/bser-2.1.1.tgz#e6787da20ece9d07998533cfd9de6f5c38f4bc05" - integrity sha512-gQxTNE/GAfIIrmHLUE3oJyp5FO6HRBfhjnw4/wMmA63ZGDJnWBmgY/lyQBpnDUkGmAhbSe39tx2d/iTOAfglwQ== - dependencies: - node-int64 "^0.4.0" - -btoa@^1.2.1: - version "1.2.1" - resolved "https://registry.yarnpkg.com/btoa/-/btoa-1.2.1.tgz#01a9909f8b2c93f6bf680ba26131eb30f7fa3d73" - integrity sha512-SB4/MIGlsiVkMcHmT+pSmIPoNDoHg+7cMzmt3Uxt628MTz2487DKSqK/fuhFBrkuqrYv5UCEnACpF4dTFNKc/g== - -buffer-alloc-unsafe@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/buffer-alloc-unsafe/-/buffer-alloc-unsafe-1.1.0.tgz#bd7dc26ae2972d0eda253be061dba992349c19f0" - integrity sha512-TEM2iMIEQdJ2yjPJoSIsldnleVaAk1oW3DBVUykyOLsEsFmEc9kn+SFFPz+gl54KQNxlDnAwCXosOS9Okx2xAg== - -buffer-alloc@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/buffer-alloc/-/buffer-alloc-1.2.0.tgz#890dd90d923a873e08e10e5fd51a57e5b7cce0ec" - integrity sha512-CFsHQgjtW1UChdXgbyJGtnm+O/uLQeZdtbDo8mfUgYXCHSM1wgrVxXm6bSyrUuErEb+4sYVGCzASBRot7zyrow== - dependencies: - buffer-alloc-unsafe "^1.1.0" - buffer-fill "^1.0.0" - -buffer-crc32@~0.2.3: - version "0.2.13" - resolved "https://registry.yarnpkg.com/buffer-crc32/-/buffer-crc32-0.2.13.tgz#0d333e3f00eac50aa1454abd30ef8c2a5d9a7242" - integrity sha1-DTM+PwDqxQqhRUq9MO+MKl2ackI= - -buffer-equal@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/buffer-equal/-/buffer-equal-1.0.0.tgz#59616b498304d556abd466966b22eeda3eca5fbe" - integrity sha1-WWFrSYME1Var1GaWayLu2j7KX74= - -buffer-fill@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/buffer-fill/-/buffer-fill-1.0.0.tgz#f8f78b76789888ef39f205cd637f68e702122b2c" - integrity sha1-+PeLdniYiO858gXNY39o5wISKyw= - -buffer-from@1.x, buffer-from@^1.0.0: - version "1.1.1" - resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.1.tgz#32713bc028f75c02fdb710d7c7bcec1f2c6070ef" - integrity sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A== - -buffer-to-arraybuffer@^0.0.5: - version "0.0.5" - resolved "https://registry.yarnpkg.com/buffer-to-arraybuffer/-/buffer-to-arraybuffer-0.0.5.tgz#6064a40fa76eb43c723aba9ef8f6e1216d10511a" - integrity sha1-YGSkD6dutDxyOrqe+PbhIW0QURo= - -buffer-xor@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/buffer-xor/-/buffer-xor-1.0.3.tgz#26e61ed1422fb70dd42e6e36729ed51d855fe8d9" - integrity sha1-JuYe0UIvtw3ULm42cp7VHYVf6Nk= - -buffer@^4.3.0: - version "4.9.2" - resolved "https://registry.yarnpkg.com/buffer/-/buffer-4.9.2.tgz#230ead344002988644841ab0244af8c44bbe3ef8" - integrity sha512-xq+q3SRMOxGivLhBNaUdC64hDTQwejJ+H0T/NB1XMtTVEwNTrfFF3gAxiyW0Bu/xWEGhjVKgUcMhCrUy2+uCWg== - dependencies: - base64-js "^1.0.2" - ieee754 "^1.1.4" - isarray "^1.0.0" - -buffer@^5.0.5, buffer@^5.2.1: - version "5.4.3" - resolved "https://registry.yarnpkg.com/buffer/-/buffer-5.4.3.tgz#3fbc9c69eb713d323e3fc1a895eee0710c072115" - integrity sha512-zvj65TkFeIt3i6aj5bIvJDzjjQQGs4o/sNoezg1F1kYap9Nu2jcUdpwzRSJTHMMzG0H7bZkn4rNQpImhuxWX2A== - dependencies: - base64-js "^1.0.2" - ieee754 "^1.1.4" - -buffer@^5.5.0, buffer@^5.6.0: - version "5.6.0" - resolved "https://registry.yarnpkg.com/buffer/-/buffer-5.6.0.tgz#a31749dc7d81d84db08abf937b6b8c4033f62786" - integrity sha512-/gDYp/UtU0eA1ys8bOs9J6a+E/KWIY+DZ+Q2WESNUA0jFRsJOc0SNUO6xJ5SGA1xueg3NL65W6s+NY5l9cunuw== - dependencies: - base64-js "^1.0.2" - ieee754 "^1.1.4" - -builtin-status-codes@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/builtin-status-codes/-/builtin-status-codes-3.0.0.tgz#85982878e21b98e1c66425e03d0174788f569ee8" - integrity sha1-hZgoeOIbmOHGZCXgPQF0eI9Wnug= - -bytes@3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/bytes/-/bytes-3.1.0.tgz#f6cf7933a360e0588fa9fde85651cdc7f805d1f6" - integrity sha512-zauLjrfCG+xvoyaqLoV8bLVXXNGC4JqlxFCutSDWA6fJrTo2ZuvLYTqZ7aHBLZSMOopbzwv8f+wZcVzfVTI2Dg== - -bytewise-core@^1.2.2: - version "1.2.3" - resolved "https://registry.yarnpkg.com/bytewise-core/-/bytewise-core-1.2.3.tgz#3fb410c7e91558eb1ab22a82834577aa6bd61d42" - integrity sha1-P7QQx+kVWOsasiqCg0V3qmvWHUI= - dependencies: - typewise-core "^1.2" - -bytewise@~1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/bytewise/-/bytewise-1.1.0.tgz#1d13cbff717ae7158094aa881b35d081b387253e" - integrity sha1-HRPL/3F65xWAlKqIGzXQgbOHJT4= - dependencies: - bytewise-core "^1.2.2" - typewise "^1.0.3" - -cacache@^12.0.2: - version "12.0.3" - resolved "https://registry.yarnpkg.com/cacache/-/cacache-12.0.3.tgz#be99abba4e1bf5df461cd5a2c1071fc432573390" - integrity sha512-kqdmfXEGFepesTuROHMs3MpFLWrPkSSpRqOw80RCflZXy/khxaArvFrQ7uJxSUduzAufc6G0g1VUCOZXxWavPw== - dependencies: - bluebird "^3.5.5" - chownr "^1.1.1" - figgy-pudding "^3.5.1" - glob "^7.1.4" - graceful-fs "^4.1.15" - infer-owner "^1.0.3" - lru-cache "^5.1.1" - mississippi "^3.0.0" - mkdirp "^0.5.1" - move-concurrently "^1.0.1" - promise-inflight "^1.0.1" - rimraf "^2.6.3" - ssri "^6.0.1" - unique-filename "^1.1.1" - y18n "^4.0.0" - -cache-base@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/cache-base/-/cache-base-1.0.1.tgz#0a7f46416831c8b662ee36fe4e7c59d76f666ab2" - integrity sha512-AKcdTnFSWATd5/GCPRxr2ChwIJ85CeyrEyjRHlKxQ56d4XJMGym0uAiKn0xbLOGOl3+yRpOTi484dVCEc5AUzQ== - dependencies: - collection-visit "^1.0.0" - component-emitter "^1.2.1" - get-value "^2.0.6" - has-value "^1.0.0" - isobject "^3.0.1" - set-value "^2.0.0" - to-object-path "^0.3.0" - union-value "^1.0.0" - unset-value "^1.0.0" - -cacheable-request@^6.0.0: - version "6.1.0" - resolved "https://registry.yarnpkg.com/cacheable-request/-/cacheable-request-6.1.0.tgz#20ffb8bd162ba4be11e9567d823db651052ca912" - integrity sha512-Oj3cAGPCqOZX7Rz64Uny2GYAZNliQSqfbePrgAQ1wKAihYmCUnraBtJtKcGR4xz7wF+LoJC+ssFZvv5BgF9Igg== - dependencies: - clone-response "^1.0.2" - get-stream "^5.1.0" - http-cache-semantics "^4.0.0" - keyv "^3.0.0" - lowercase-keys "^2.0.0" - normalize-url "^4.1.0" - responselike "^1.0.2" - -cachedown@1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/cachedown/-/cachedown-1.0.0.tgz#d43f036e4510696b31246d7db31ebf0f7ac32d15" - integrity sha1-1D8DbkUQaWsxJG19sx6/D3rDLRU= - dependencies: - abstract-leveldown "^2.4.1" - lru-cache "^3.2.0" - -callsites@^3.0.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/callsites/-/callsites-3.1.0.tgz#b3630abd8943432f54b3f0519238e33cd7df2f73" - integrity sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ== - -camelcase@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-3.0.0.tgz#32fc4b9fcdaf845fcdf7e73bb97cac2261f0ab0a" - integrity sha1-MvxLn82vhF/N9+c7uXysImHwqwo= - -camelcase@^4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-4.1.0.tgz#d545635be1e33c542649c69173e5de6acfae34dd" - integrity sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0= - -camelcase@^5.0.0, camelcase@^5.3.1: - version "5.3.1" - resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-5.3.1.tgz#e3c9b31569e106811df242f715725a1f4c494320" - integrity sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg== - -caniuse-lite@^1.0.30000844: - version "1.0.30001015" - resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001015.tgz#15a7ddf66aba786a71d99626bc8f2b91c6f0f5f0" - integrity sha512-/xL2AbW/XWHNu1gnIrO8UitBGoFthcsDgU9VLK1/dpsoxbaD5LscHozKze05R6WLsBvLhqv78dAPozMFQBYLbQ== - -capture-exit@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/capture-exit/-/capture-exit-2.0.0.tgz#fb953bfaebeb781f62898239dabb426d08a509a4" - integrity sha512-PiT/hQmTonHhl/HFGN+Lx3JJUznrVYJ3+AQsnthneZbvW7x+f08Tk7yLJTLEOUvBTbduLeeBkxEaYXUOUrRq6g== - dependencies: - rsvp "^4.8.4" - -caseless@~0.12.0: - version "0.12.0" - resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.12.0.tgz#1b681c21ff84033c826543090689420d187151dc" - integrity sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw= - -chai-as-promised@^7.1.0: - version "7.1.1" - resolved "https://registry.yarnpkg.com/chai-as-promised/-/chai-as-promised-7.1.1.tgz#08645d825deb8696ee61725dbf590c012eb00ca0" - integrity sha512-azL6xMoi+uxu6z4rhWQ1jbdUhOMhis2PvscD/xjLqNMkv3BPPp2JyyuTHOrf9BOosGpNQ11v6BKv/g57RXbiaA== - dependencies: - check-error "^1.0.2" - -chai-bignumber@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/chai-bignumber/-/chai-bignumber-3.0.0.tgz#e90cf1f468355bbb11a9acd051222586cd2648a9" - integrity sha512-SubOtaSI2AILWTWe2j0c6i2yFT/f9J6UBjeVGDuwDiPLkF/U5+/eTWUE3sbCZ1KgcPF6UJsDVYbIxaYA097MQA== - -chai@^4.0.1: - version "4.2.0" - resolved "https://registry.yarnpkg.com/chai/-/chai-4.2.0.tgz#760aa72cf20e3795e84b12877ce0e83737aa29e5" - integrity sha512-XQU3bhBukrOsQCuwZndwGcCVQHyZi53fQ6Ys1Fym7E4olpIqqZZhhoFJoaKVvV17lWQoXYwgWN2nF5crA8J2jw== - dependencies: - assertion-error "^1.1.0" - check-error "^1.0.2" - deep-eql "^3.0.1" - get-func-name "^2.0.0" - pathval "^1.1.0" - type-detect "^4.0.5" - -chalk@^1.1.3: - version "1.1.3" - resolved "https://registry.yarnpkg.com/chalk/-/chalk-1.1.3.tgz#a8115c55e4a702fe4d150abd3872822a7e09fc98" - integrity sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg= - dependencies: - ansi-styles "^2.2.1" - escape-string-regexp "^1.0.2" - has-ansi "^2.0.0" - strip-ansi "^3.0.0" - supports-color "^2.0.0" - -chalk@^2.0.0, chalk@^2.0.1, chalk@^2.3.0, chalk@^2.4.1, chalk@^2.4.2: - version "2.4.2" - resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424" - integrity sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ== - dependencies: - ansi-styles "^3.2.1" - escape-string-regexp "^1.0.5" - supports-color "^5.3.0" - -chalk@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/chalk/-/chalk-3.0.0.tgz#3f73c2bf526591f574cc492c51e2456349f844e4" - integrity sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg== - dependencies: - ansi-styles "^4.1.0" - supports-color "^7.1.0" - -check-error@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/check-error/-/check-error-1.0.2.tgz#574d312edd88bb5dd8912e9286dd6c0aed4aac82" - integrity sha1-V00xLt2Iu13YkS6Sht1sCu1KrII= - -check-types@^8.0.3: - version "8.0.3" - resolved "https://registry.yarnpkg.com/check-types/-/check-types-8.0.3.tgz#3356cca19c889544f2d7a95ed49ce508a0ecf552" - integrity sha512-YpeKZngUmG65rLudJ4taU7VLkOCTMhNl/u4ctNC56LQS/zJTyNH0Lrtwm1tfTsbLlwvlfsA2d1c8vCf/Kh2KwQ== - -checkpoint-store@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/checkpoint-store/-/checkpoint-store-1.1.0.tgz#04e4cb516b91433893581e6d4601a78e9552ea06" - integrity sha1-BOTLUWuRQziTWB5tRgGnjpVS6gY= - dependencies: - functional-red-black-tree "^1.0.1" - -chokidar@^2.0.0, chokidar@^2.1.8: - version "2.1.8" - resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-2.1.8.tgz#804b3a7b6a99358c3c5c61e71d8728f041cff917" - integrity sha512-ZmZUazfOzf0Nve7duiCKD23PFSCs4JPoYyccjUFF3aQkQadqBhfzhjkwBH2mNOG9cTBwhamM37EIsIkZw3nRgg== - dependencies: - anymatch "^2.0.0" - async-each "^1.0.1" - braces "^2.3.2" - glob-parent "^3.1.0" - inherits "^2.0.3" - is-binary-path "^1.0.0" - is-glob "^4.0.0" - normalize-path "^3.0.0" - path-is-absolute "^1.0.0" - readdirp "^2.2.1" - upath "^1.1.1" - optionalDependencies: - fsevents "^1.2.7" - -chokidar@^3.0.2: - version "3.3.0" - resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.3.0.tgz#12c0714668c55800f659e262d4962a97faf554a6" - integrity sha512-dGmKLDdT3Gdl7fBUe8XK+gAtGmzy5Fn0XkkWQuYxGIgWVPPse2CxFA5mtrlD0TOHaHjEUqkWNyP1XdHoJES/4A== - dependencies: - anymatch "~3.1.1" - braces "~3.0.2" - glob-parent "~5.1.0" - is-binary-path "~2.1.0" - is-glob "~4.0.1" - normalize-path "~3.0.0" - readdirp "~3.2.0" - optionalDependencies: - fsevents "~2.1.1" - -chokidar@^3.4.1: - version "3.4.2" - resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.4.2.tgz#38dc8e658dec3809741eb3ef7bb0a47fe424232d" - integrity sha512-IZHaDeBeI+sZJRX7lGcXsdzgvZqKv6sECqsbErJA4mHWfpRrD8B97kSFN4cQz6nGBGiuFia1MKR4d6c1o8Cv7A== - dependencies: - anymatch "~3.1.1" - braces "~3.0.2" - glob-parent "~5.1.0" - is-binary-path "~2.1.0" - is-glob "~4.0.1" - normalize-path "~3.0.0" - readdirp "~3.4.0" - optionalDependencies: - fsevents "~2.1.2" - -chownr@^1.1.1: - version "1.1.3" - resolved "https://registry.yarnpkg.com/chownr/-/chownr-1.1.3.tgz#42d837d5239688d55f303003a508230fa6727142" - integrity sha512-i70fVHhmV3DtTl6nqvZOnIjbY0Pe4kAUjwHj8z0zAdgBtYrJyYwLKCCuRBQ5ppkyL0AkN7HKRnETdmdp1zqNXw== - -chrome-trace-event@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/chrome-trace-event/-/chrome-trace-event-1.0.2.tgz#234090ee97c7d4ad1a2c4beae27505deffc608a4" - integrity sha512-9e/zx1jw7B4CO+c/RXoCsfg/x1AfUBioy4owYH0bJprEYAx5hRFLRhWBqHAG57D0ZM4H7vxbP7bPe0VwhQRYDQ== - dependencies: - tslib "^1.9.0" - -ci-info@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-2.0.0.tgz#67a9e964be31a51e15e5010d58e6f12834002f46" - integrity sha512-5tK7EtrZ0N+OLFMthtqOj4fI2Jeb88C4CAZPu25LDVUgXJ0A3Js4PMGqrn0JU1W0Mh1/Z8wZzYPxqUrXeBboCQ== - -cids@^0.7.1: - version "0.7.5" - resolved "https://registry.yarnpkg.com/cids/-/cids-0.7.5.tgz#60a08138a99bfb69b6be4ceb63bfef7a396b28b2" - integrity sha512-zT7mPeghoWAu+ppn8+BS1tQ5qGmbMfB4AregnQjA/qHY3GC1m1ptI9GkWNlgeu38r7CuRdXB47uY2XgAYt6QVA== - dependencies: - buffer "^5.5.0" - class-is "^1.1.0" - multibase "~0.6.0" - multicodec "^1.0.0" - multihashes "~0.4.15" - -cipher-base@^1.0.0, cipher-base@^1.0.1, cipher-base@^1.0.3: - version "1.0.4" - resolved "https://registry.yarnpkg.com/cipher-base/-/cipher-base-1.0.4.tgz#8760e4ecc272f4c363532f926d874aae2c1397de" - integrity sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q== - dependencies: - inherits "^2.0.1" - safe-buffer "^5.0.1" - -class-is@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/class-is/-/class-is-1.1.0.tgz#9d3c0fba0440d211d843cec3dedfa48055005825" - integrity sha512-rhjH9AG1fvabIDoGRVH587413LPjTZgmDF9fOFCbFJQV4yuocX1mHxxvXI4g3cGwbVY9wAYIoKlg1N79frJKQw== - -class-utils@^0.3.5: - version "0.3.6" - resolved "https://registry.yarnpkg.com/class-utils/-/class-utils-0.3.6.tgz#f93369ae8b9a7ce02fd41faad0ca83033190c463" - integrity sha512-qOhPa/Fj7s6TY8H8esGu5QNpMMQxz79h+urzrNYN6mn+9BnxlDGf5QZ+XeCDsxSjPqsSR56XOZOJmpeurnLMeg== - dependencies: - arr-union "^3.1.0" - define-property "^0.2.5" - isobject "^3.0.0" - static-extend "^0.1.1" - -cliui@^3.2.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/cliui/-/cliui-3.2.0.tgz#120601537a916d29940f934da3b48d585a39213d" - integrity sha1-EgYBU3qRbSmUD5NNo7SNWFo5IT0= - dependencies: - string-width "^1.0.1" - strip-ansi "^3.0.1" - wrap-ansi "^2.0.0" - -cliui@^4.0.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/cliui/-/cliui-4.1.0.tgz#348422dbe82d800b3022eef4f6ac10bf2e4d1b49" - integrity sha512-4FG+RSG9DL7uEwRUZXZn3SS34DiDPfzP0VOiEwtUWlE+AR2EIg+hSyvrIgUUfhdgR/UkAeW2QHgeP+hWrXs7jQ== - dependencies: - string-width "^2.1.1" - strip-ansi "^4.0.0" - wrap-ansi "^2.0.0" - -cliui@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/cliui/-/cliui-5.0.0.tgz#deefcfdb2e800784aa34f46fa08e06851c7bbbc5" - integrity sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA== - dependencies: - string-width "^3.1.0" - strip-ansi "^5.2.0" - wrap-ansi "^5.1.0" - -clone-buffer@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/clone-buffer/-/clone-buffer-1.0.0.tgz#e3e25b207ac4e701af721e2cb5a16792cac3dc58" - integrity sha1-4+JbIHrE5wGvch4staFnksrD3Fg= - -clone-response@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/clone-response/-/clone-response-1.0.2.tgz#d1dc973920314df67fbeb94223b4ee350239e96b" - integrity sha1-0dyXOSAxTfZ/vrlCI7TuNQI56Ws= - dependencies: - mimic-response "^1.0.0" - -clone-stats@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/clone-stats/-/clone-stats-1.0.0.tgz#b3782dff8bb5474e18b9b6bf0fdfe782f8777680" - integrity sha1-s3gt/4u1R04Yuba/D9/ngvh3doA= - -clone@2.1.2, clone@^2.0.0, clone@^2.1.1: - version "2.1.2" - resolved "https://registry.yarnpkg.com/clone/-/clone-2.1.2.tgz#1b7f4b9f591f1e8f83670401600345a02887435f" - integrity sha1-G39Ln1kfHo+DZwQBYANFoCiHQ18= - -cloneable-readable@^1.0.0: - version "1.1.3" - resolved "https://registry.yarnpkg.com/cloneable-readable/-/cloneable-readable-1.1.3.tgz#120a00cb053bfb63a222e709f9683ea2e11d8cec" - integrity sha512-2EF8zTQOxYq70Y4XKtorQupqF0m49MBz2/yf5Bj+MHjvpG3Hy7sImifnqD6UA+TKYxeSV+u6qqQPawN5UvnpKQ== - dependencies: - inherits "^2.0.1" - process-nextick-args "^2.0.0" - readable-stream "^2.3.5" - -co@^4.6.0: - version "4.6.0" - resolved "https://registry.yarnpkg.com/co/-/co-4.6.0.tgz#6ea6bdf3d853ae54ccb8e47bfa0bf3f9031fb184" - integrity sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ= - -code-point-at@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/code-point-at/-/code-point-at-1.1.0.tgz#0d070b4d043a5bea33a2f1a40e2edb3d9a4ccf77" - integrity sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c= - -coinstring@^2.0.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/coinstring/-/coinstring-2.3.0.tgz#cdb63363a961502404a25afb82c2e26d5ff627a4" - integrity sha1-zbYzY6lhUCQEolr7gsLibV/2J6Q= - dependencies: - bs58 "^2.0.1" - create-hash "^1.1.1" - -collection-map@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/collection-map/-/collection-map-1.0.0.tgz#aea0f06f8d26c780c2b75494385544b2255af18c" - integrity sha1-rqDwb40mx4DCt1SUOFVEsiVa8Yw= - dependencies: - arr-map "^2.0.2" - for-own "^1.0.0" - make-iterator "^1.0.0" - -collection-visit@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/collection-visit/-/collection-visit-1.0.0.tgz#4bc0373c164bc3291b4d368c829cf1a80a59dca0" - integrity sha1-S8A3PBZLwykbTTaMgpzxqApZ3KA= - dependencies: - map-visit "^1.0.0" - object-visit "^1.0.0" - -color-convert@^1.9.0: - version "1.9.3" - resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.3.tgz#bb71850690e1f136567de629d2d5471deda4c1e8" - integrity sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg== - dependencies: - color-name "1.1.3" - -color-convert@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-2.0.1.tgz#72d3a68d598c9bdb3af2ad1e84f21d896abd4de3" - integrity sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ== - dependencies: - color-name "~1.1.4" - -color-name@1.1.3: - version "1.1.3" - resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25" - integrity sha1-p9BVi9icQveV3UIyj3QIMcpTvCU= - -color-name@~1.1.4: - version "1.1.4" - resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2" - integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA== - -color-support@^1.1.3: - version "1.1.3" - resolved "https://registry.yarnpkg.com/color-support/-/color-support-1.1.3.tgz#93834379a1cc9a0c61f82f52f0d04322251bd5a2" - integrity sha512-qiBjkpbMLO/HL68y+lh4q0/O1MZFj2RX6X/KmMa3+gJD3z+WwI1ZzDHysvqHGS3mP6mznPckpXmw1nI9cJjyRg== - -combined-stream@^1.0.6, combined-stream@~1.0.6: - version "1.0.8" - resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.8.tgz#c3d45a8b34fd730631a110a8a2520682b31d5a7f" - integrity sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg== - dependencies: - delayed-stream "~1.0.0" - -command-exists@^1.2.8: - version "1.2.8" - resolved "https://registry.yarnpkg.com/command-exists/-/command-exists-1.2.8.tgz#715acefdd1223b9c9b37110a149c6392c2852291" - integrity sha512-PM54PkseWbiiD/mMsbvW351/u+dafwTJ0ye2qB60G1aGQP9j3xK2gmMDc+R34L3nDtx4qMCitXT75mkbkGJDLw== - -commander@2.11.0: - version "2.11.0" - resolved "https://registry.yarnpkg.com/commander/-/commander-2.11.0.tgz#157152fd1e7a6c8d98a5b715cf376df928004563" - integrity sha512-b0553uYA5YAEGgyYIGYROzKQ7X5RAqedkfjiZxwi0kL1g3bOaBNNZfYkzt/CL0umgD5wc9Jec2FbB98CjkMRvQ== - -commander@3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/commander/-/commander-3.0.2.tgz#6837c3fb677ad9933d1cfba42dd14d5117d6b39e" - integrity sha512-Gar0ASD4BDyKC4hl4DwHqDrmvjoxWKZigVnAbn5H1owvm4CxCPdb0HQDehwNYMJpla5+M2tPmPARzhtYuwpHow== - -commander@^2.18.0, commander@^2.20.0, commander@~2.20.3: - version "2.20.3" - resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.3.tgz#fd485e84c03eb4881c20722ba48035e8531aeb33" - integrity sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ== - -commander@~2.8.1: - version "2.8.1" - resolved "https://registry.yarnpkg.com/commander/-/commander-2.8.1.tgz#06be367febfda0c330aa1e2a072d3dc9762425d4" - integrity sha1-Br42f+v9oMMwqh4qBy09yXYkJdQ= - dependencies: - graceful-readlink ">= 1.0.0" - -commondir@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/commondir/-/commondir-1.0.1.tgz#ddd800da0c66127393cca5950ea968a3aaf1253b" - integrity sha1-3dgA2gxmEnOTzKWVDqloo6rxJTs= - -component-emitter@^1.2.1: - version "1.3.0" - resolved "https://registry.yarnpkg.com/component-emitter/-/component-emitter-1.3.0.tgz#16e4070fba8ae29b679f2215853ee181ab2eabc0" - integrity sha512-Rd3se6QB+sO1TwqZjscQrurpEPIfO0/yYnSin6Q/rD3mOutHvUrCAhJub3r90uNb+SESBuE0QYoB90YdfatsRg== - -concat-map@0.0.1: - version "0.0.1" - resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" - integrity sha1-2Klr13/Wjfd5OnMDajug1UBdR3s= - -concat-stream@^1.5.0, concat-stream@^1.5.1, concat-stream@^1.6.0: - version "1.6.2" - resolved "https://registry.yarnpkg.com/concat-stream/-/concat-stream-1.6.2.tgz#904bdf194cd3122fc675c77fc4ac3d4ff0fd1a34" - integrity sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw== - dependencies: - buffer-from "^1.0.0" - inherits "^2.0.3" - readable-stream "^2.2.2" - typedarray "^0.0.6" - -console-browserify@^1.1.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/console-browserify/-/console-browserify-1.2.0.tgz#67063cef57ceb6cf4993a2ab3a55840ae8c49336" - integrity sha512-ZMkYO/LkF17QvCPqM0gxw8yUzigAOZOSWSHg91FH6orS7vcEj5dVZTidN2fQ14yBSdg97RqhSNwLUXInd52OTA== - -console-control-strings@^1.0.0, console-control-strings@~1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/console-control-strings/-/console-control-strings-1.1.0.tgz#3d7cf4464db6446ea644bf4b39507f9851008e8e" - integrity sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4= - -constants-browserify@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/constants-browserify/-/constants-browserify-1.0.0.tgz#c20b96d8c617748aaf1c16021760cd27fcb8cb75" - integrity sha1-wguW2MYXdIqvHBYCF2DNJ/y4y3U= - -content-disposition@0.5.3: - version "0.5.3" - resolved "https://registry.yarnpkg.com/content-disposition/-/content-disposition-0.5.3.tgz#e130caf7e7279087c5616c2007d0485698984fbd" - integrity sha512-ExO0774ikEObIAEV9kDo50o+79VCUdEB6n6lzKgGwupcVeRlhrj3qGAfwq8G6uBJjkqLrhT0qEYFcWng8z1z0g== - dependencies: - safe-buffer "5.1.2" - -content-hash@^2.5.2: - version "2.5.2" - resolved "https://registry.yarnpkg.com/content-hash/-/content-hash-2.5.2.tgz#bbc2655e7c21f14fd3bfc7b7d4bfe6e454c9e211" - integrity sha512-FvIQKy0S1JaWV10sMsA7TRx8bpU+pqPkhbsfvOJAdjRXvYxEckAwQWGwtRjiaJfh+E0DvcWUGqcdjwMGFjsSdw== - dependencies: - cids "^0.7.1" - multicodec "^0.5.5" - multihashes "^0.4.15" - -content-type@~1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/content-type/-/content-type-1.0.4.tgz#e138cc75e040c727b1966fe5e5f8c9aee256fe3b" - integrity sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA== - -convert-source-map@^1.4.0, convert-source-map@^1.5.0, convert-source-map@^1.5.1, convert-source-map@^1.7.0: - version "1.7.0" - resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.7.0.tgz#17a2cb882d7f77d3490585e2ce6c524424a3a442" - integrity sha512-4FJkXzKXEDB1snCFZlLP4gpC3JILicCpGbzG9f9G7tGqGCzETQ2hWPrcinA9oU4wtf2biUaEH5065UnMeR33oA== - dependencies: - safe-buffer "~5.1.1" - -cookie-signature@1.0.6: - version "1.0.6" - resolved "https://registry.yarnpkg.com/cookie-signature/-/cookie-signature-1.0.6.tgz#e303a882b342cc3ee8ca513a79999734dab3ae2c" - integrity sha1-4wOogrNCzD7oylE6eZmXNNqzriw= - -cookie@0.4.0: - version "0.4.0" - resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.4.0.tgz#beb437e7022b3b6d49019d088665303ebe9c14ba" - integrity sha512-+Hp8fLp57wnUSt0tY0tHEXh4voZRDnoIrZPqlo3DPiI4y9lwg/jqx+1Om94/W6ZaPDOUbnjOt/99w66zk+l1Xg== - -cookiejar@^2.1.1: - version "2.1.2" - resolved "https://registry.yarnpkg.com/cookiejar/-/cookiejar-2.1.2.tgz#dd8a235530752f988f9a0844f3fc589e3111125c" - integrity sha512-Mw+adcfzPxcPeI+0WlvRrr/3lGVO0bD75SxX6811cxSh1Wbxx7xZBGK1eVtDf6si8rg2lhnUjsVLMFMfbRIuwA== - -copy-concurrently@^1.0.0: - version "1.0.5" - resolved "https://registry.yarnpkg.com/copy-concurrently/-/copy-concurrently-1.0.5.tgz#92297398cae34937fcafd6ec8139c18051f0b5e0" - integrity sha512-f2domd9fsVDFtaFcbaRZuYXwtdmnzqbADSwhSWYxYB/Q8zsdUUFMXVRwXGDMWmbEzAn1kdRrtI1T/KTFOL4X2A== - dependencies: - aproba "^1.1.1" - fs-write-stream-atomic "^1.0.8" - iferr "^0.1.5" - mkdirp "^0.5.1" - rimraf "^2.5.4" - run-queue "^1.0.0" - -copy-descriptor@^0.1.0: - version "0.1.1" - resolved "https://registry.yarnpkg.com/copy-descriptor/-/copy-descriptor-0.1.1.tgz#676f6eb3c39997c2ee1ac3a924fd6124748f578d" - integrity sha1-Z29us8OZl8LuGsOpJP1hJHSPV40= - -copy-props@^2.0.1: - version "2.0.4" - resolved "https://registry.yarnpkg.com/copy-props/-/copy-props-2.0.4.tgz#93bb1cadfafd31da5bb8a9d4b41f471ec3a72dfe" - integrity sha512-7cjuUME+p+S3HZlbllgsn2CDwS+5eCCX16qBgNC4jgSTf49qR1VKy/Zhl400m0IQXl/bPGEVqncgUUMjrr4s8A== - dependencies: - each-props "^1.3.0" - is-plain-object "^2.0.1" - -core-js-pure@^3.0.1: - version "3.6.2" - resolved "https://registry.yarnpkg.com/core-js-pure/-/core-js-pure-3.6.2.tgz#81f08059134d1c7318838024e1b8e866bcb1ddb3" - integrity sha512-PRasaCPjjCB65au2dMBPtxuIR6LM8MVNdbIbN57KxcDV1FAYQWlF0pqje/HC2sM6nm/s9KqSTkMTU75pozaghA== - -core-js@^2.4.0, core-js@^2.5.0: - version "2.6.10" - resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.6.10.tgz#8a5b8391f8cc7013da703411ce5b585706300d7f" - integrity sha512-I39t74+4t+zau64EN1fE5v2W31Adtc/REhzWN+gWRRXg6WH5qAsZm62DHpQ1+Yhe4047T55jvzz7MUqF/dBBlA== - -core-util-is@1.0.2, core-util-is@~1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7" - integrity sha1-tf1UIgqivFq1eqtxQMlAdUUDwac= - -cors@^2.8.1: - version "2.8.5" - resolved "https://registry.yarnpkg.com/cors/-/cors-2.8.5.tgz#eac11da51592dd86b9f06f6e7ac293b3df875d29" - integrity sha512-KIHbLJqu73RGr/hnbrO9uBeixNGuvSQjul/jdFvS/KFSIH1hWVd1ng7zOHx+YrEfInLG7q4n6GHQ9cDtxv/P6g== - dependencies: - object-assign "^4" - vary "^1" - -create-ecdh@^4.0.0: - version "4.0.3" - resolved "https://registry.yarnpkg.com/create-ecdh/-/create-ecdh-4.0.3.tgz#c9111b6f33045c4697f144787f9254cdc77c45ff" - integrity sha512-GbEHQPMOswGpKXM9kCWVrremUcBmjteUaQ01T9rkKCPDXfUHX0IoP9LpHYo2NPFampa4e+/pFDc3jQdxrxQLaw== - dependencies: - bn.js "^4.1.0" - elliptic "^6.0.0" - -create-hash@^1.1.0, create-hash@^1.1.1, create-hash@^1.1.2, create-hash@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/create-hash/-/create-hash-1.2.0.tgz#889078af11a63756bcfb59bd221996be3a9ef196" - integrity sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg== - dependencies: - cipher-base "^1.0.1" - inherits "^2.0.1" - md5.js "^1.3.4" - ripemd160 "^2.0.1" - sha.js "^2.4.0" - -create-hmac@^1.1.0, create-hmac@^1.1.2, create-hmac@^1.1.4: - version "1.1.7" - resolved "https://registry.yarnpkg.com/create-hmac/-/create-hmac-1.1.7.tgz#69170c78b3ab957147b2b8b04572e47ead2243ff" - integrity sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg== - dependencies: - cipher-base "^1.0.3" - create-hash "^1.1.0" - inherits "^2.0.1" - ripemd160 "^2.0.0" - safe-buffer "^5.0.1" - sha.js "^2.4.8" - -cross-fetch@^2.1.0, cross-fetch@^2.1.1: - version "2.2.3" - resolved "https://registry.yarnpkg.com/cross-fetch/-/cross-fetch-2.2.3.tgz#e8a0b3c54598136e037f8650f8e823ccdfac198e" - integrity sha512-PrWWNH3yL2NYIb/7WF/5vFG3DCQiXDOVf8k3ijatbrtnwNuhMWLC7YF7uqf53tbTFDzHIUD8oITw4Bxt8ST3Nw== - dependencies: - node-fetch "2.1.2" - whatwg-fetch "2.0.4" - -cross-spawn@^5.0.1: - version "5.1.0" - resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-5.1.0.tgz#e8bd0efee58fcff6f8f94510a0a554bbfa235449" - integrity sha1-6L0O/uWPz/b4+UUQoKVUu/ojVEk= - dependencies: - lru-cache "^4.0.1" - shebang-command "^1.2.0" - which "^1.2.9" - -cross-spawn@^6.0.0, cross-spawn@^6.0.5: - version "6.0.5" - resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-6.0.5.tgz#4a5ec7c64dfae22c3a14124dbacdee846d80cbc4" - integrity sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ== - dependencies: - nice-try "^1.0.4" - path-key "^2.0.1" - semver "^5.5.0" - shebang-command "^1.2.0" - which "^1.2.9" - -crypto-browserify@3.12.0, crypto-browserify@^3.11.0: - version "3.12.0" - resolved "https://registry.yarnpkg.com/crypto-browserify/-/crypto-browserify-3.12.0.tgz#396cf9f3137f03e4b8e532c58f698254e00f80ec" - integrity sha512-fz4spIh+znjO2VjL+IdhEpRJ3YN6sMzITSBijk6FK2UvTqruSQW+/cCZTSNsMiZNvUeq0CqurF+dAbyiGOY6Wg== - dependencies: - browserify-cipher "^1.0.0" - browserify-sign "^4.0.0" - create-ecdh "^4.0.0" - create-hash "^1.1.0" - create-hmac "^1.1.0" - diffie-hellman "^5.0.0" - inherits "^2.0.1" - pbkdf2 "^3.0.3" - public-encrypt "^4.0.0" - randombytes "^2.0.0" - randomfill "^1.0.3" - -cssom@0.3.x, "cssom@>= 0.3.2 < 0.4.0": - version "0.3.8" - resolved "https://registry.yarnpkg.com/cssom/-/cssom-0.3.8.tgz#9f1276f5b2b463f2114d3f2c75250af8c1a36f4a" - integrity sha512-b0tGHbfegbhPJpxpiBPU2sCkigAqtM9O121le6bbOlgyV+NyGyCmVfJ6QW9eRjz8CpNfWEOYBIMIGRYkLwsIYg== - -cssstyle@^1.0.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/cssstyle/-/cssstyle-1.4.0.tgz#9d31328229d3c565c61e586b02041a28fccdccf1" - integrity sha512-GBrLZYZ4X4x6/QEoBnIrqb8B/f5l4+8me2dkom/j1Gtbxy0kBv6OGzKuAsGM75bkGwGAFkt56Iwg28S3XTZgSA== - dependencies: - cssom "0.3.x" - -csstype@^2.2.0: - version "2.6.7" - resolved "https://registry.yarnpkg.com/csstype/-/csstype-2.6.7.tgz#20b0024c20b6718f4eda3853a1f5a1cce7f5e4a5" - integrity sha512-9Mcn9sFbGBAdmimWb2gLVDtFJzeKtDGIr76TUqmjZrw9LFXBMSU70lcs+C0/7fyCd6iBDqmksUcCOUIkisPHsQ== - -cyclist@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/cyclist/-/cyclist-1.0.1.tgz#596e9698fd0c80e12038c2b82d6eb1b35b6224d9" - integrity sha1-WW6WmP0MgOEgOMK4LW6xs1tiJNk= - -d@1, d@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/d/-/d-1.0.1.tgz#8698095372d58dbee346ffd0c7093f99f8f9eb5a" - integrity sha512-m62ShEObQ39CfralilEQRjH6oAMtNCV1xJyEx5LpRYUVN+EviphDgUc/F3hnYbADmkiNs67Y+3ylmlG7Lnu+FA== - dependencies: - es5-ext "^0.10.50" - type "^1.0.1" - -dashdash@^1.12.0: - version "1.14.1" - resolved "https://registry.yarnpkg.com/dashdash/-/dashdash-1.14.1.tgz#853cfa0f7cbe2fed5de20326b8dd581035f6e2f0" - integrity sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA= - dependencies: - assert-plus "^1.0.0" - -data-urls@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/data-urls/-/data-urls-1.1.0.tgz#15ee0582baa5e22bb59c77140da8f9c76963bbfe" - integrity sha512-YTWYI9se1P55u58gL5GkQHW4P6VJBJ5iBT+B5a7i2Tjadhv52paJG0qHX4A0OR6/t52odI64KP2YvFpkDOi3eQ== - dependencies: - abab "^2.0.0" - whatwg-mimetype "^2.2.0" - whatwg-url "^7.0.0" - -debug@2.6.9, debug@^2.2.0, debug@^2.3.3, debug@^2.6.8, debug@^2.6.9: - version "2.6.9" - resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f" - integrity sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA== - dependencies: - ms "2.0.0" - -debug@3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/debug/-/debug-3.1.0.tgz#5bb5a0672628b64149566ba16819e61518c67261" - integrity sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g== - dependencies: - ms "2.0.0" - -debug@3.2.6, debug@^3.1.0, debug@^3.2.6: - version "3.2.6" - resolved "https://registry.yarnpkg.com/debug/-/debug-3.2.6.tgz#e83d17de16d8a7efb7717edbe5fb10135eee629b" - integrity sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ== - dependencies: - ms "^2.1.1" - -debug@^4.1.0, debug@^4.1.1: - version "4.1.1" - resolved "https://registry.yarnpkg.com/debug/-/debug-4.1.1.tgz#3b72260255109c6b589cee050f1d516139664791" - integrity sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw== - dependencies: - ms "^2.1.1" - -decamelize@^1.1.1, decamelize@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290" - integrity sha1-9lNNFRSCabIDUue+4m9QH5oZEpA= - -decode-uri-component@^0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/decode-uri-component/-/decode-uri-component-0.2.0.tgz#eb3913333458775cb84cd1a1fae062106bb87545" - integrity sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU= - -decompress-response@^3.2.0, decompress-response@^3.3.0: - version "3.3.0" - resolved "https://registry.yarnpkg.com/decompress-response/-/decompress-response-3.3.0.tgz#80a4dd323748384bfa248083622aedec982adff3" - integrity sha1-gKTdMjdIOEv6JICDYirt7Jgq3/M= - dependencies: - mimic-response "^1.0.0" - -decompress-response@^4.2.0: - version "4.2.1" - resolved "https://registry.yarnpkg.com/decompress-response/-/decompress-response-4.2.1.tgz#414023cc7a302da25ce2ec82d0d5238ccafd8986" - integrity sha512-jOSne2qbyE+/r8G1VU+G/82LBs2Fs4LAsTiLSHOCOMZQl2OKZ6i8i4IyHemTe+/yIXOtTcRQMzPcgyhoFlqPkw== - dependencies: - mimic-response "^2.0.0" - -decompress-tar@^4.0.0, decompress-tar@^4.1.0, decompress-tar@^4.1.1: - version "4.1.1" - resolved "https://registry.yarnpkg.com/decompress-tar/-/decompress-tar-4.1.1.tgz#718cbd3fcb16209716e70a26b84e7ba4592e5af1" - integrity sha512-JdJMaCrGpB5fESVyxwpCx4Jdj2AagLmv3y58Qy4GE6HMVjWz1FeVQk1Ct4Kye7PftcdOo/7U7UKzYBJgqnGeUQ== - dependencies: - file-type "^5.2.0" - is-stream "^1.1.0" - tar-stream "^1.5.2" - -decompress-tarbz2@^4.0.0: - version "4.1.1" - resolved "https://registry.yarnpkg.com/decompress-tarbz2/-/decompress-tarbz2-4.1.1.tgz#3082a5b880ea4043816349f378b56c516be1a39b" - integrity sha512-s88xLzf1r81ICXLAVQVzaN6ZmX4A6U4z2nMbOwobxkLoIIfjVMBg7TeguTUXkKeXni795B6y5rnvDw7rxhAq9A== - dependencies: - decompress-tar "^4.1.0" - file-type "^6.1.0" - is-stream "^1.1.0" - seek-bzip "^1.0.5" - unbzip2-stream "^1.0.9" - -decompress-targz@^4.0.0: - version "4.1.1" - resolved "https://registry.yarnpkg.com/decompress-targz/-/decompress-targz-4.1.1.tgz#c09bc35c4d11f3de09f2d2da53e9de23e7ce1eee" - integrity sha512-4z81Znfr6chWnRDNfFNqLwPvm4db3WuZkqV+UgXQzSngG3CEKdBkw5jrv3axjjL96glyiiKjsxJG3X6WBZwX3w== - dependencies: - decompress-tar "^4.1.1" - file-type "^5.2.0" - is-stream "^1.1.0" - -decompress-unzip@^4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/decompress-unzip/-/decompress-unzip-4.0.1.tgz#deaaccdfd14aeaf85578f733ae8210f9b4848f69" - integrity sha1-3qrM39FK6vhVePczroIQ+bSEj2k= - dependencies: - file-type "^3.8.0" - get-stream "^2.2.0" - pify "^2.3.0" - yauzl "^2.4.2" - -decompress@^4.0.0: - version "4.2.0" - resolved "https://registry.yarnpkg.com/decompress/-/decompress-4.2.0.tgz#7aedd85427e5a92dacfe55674a7c505e96d01f9d" - integrity sha1-eu3YVCflqS2s/lVnSnxQXpbQH50= - dependencies: - decompress-tar "^4.0.0" - decompress-tarbz2 "^4.0.0" - decompress-targz "^4.0.0" - decompress-unzip "^4.0.1" - graceful-fs "^4.1.10" - make-dir "^1.0.0" - pify "^2.3.0" - strip-dirs "^2.0.0" - -deep-eql@^3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/deep-eql/-/deep-eql-3.0.1.tgz#dfc9404400ad1c8fe023e7da1df1c147c4b444df" - integrity sha512-+QeIQyN5ZuO+3Uk5DYh6/1eKO0m0YmJFGNmFHGACpf1ClL1nmlV/p4gNgbl2pJGxgXb4faqo6UE+M5ACEMyVcw== - dependencies: - type-detect "^4.0.0" - -deep-equal@~1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/deep-equal/-/deep-equal-1.0.1.tgz#f5d260292b660e084eff4cdbc9f08ad3247448b5" - integrity sha1-9dJgKStmDghO/0zbyfCK0yR0SLU= - -deep-extend@^0.6.0: - version "0.6.0" - resolved "https://registry.yarnpkg.com/deep-extend/-/deep-extend-0.6.0.tgz#c4fa7c95404a17a9c3e8ca7e1537312b736330ac" - integrity sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA== - -deep-is@~0.1.3: - version "0.1.3" - resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.3.tgz#b369d6fb5dbc13eecf524f91b070feedc357cf34" - integrity sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ= - -default-compare@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/default-compare/-/default-compare-1.0.0.tgz#cb61131844ad84d84788fb68fd01681ca7781a2f" - integrity sha512-QWfXlM0EkAbqOCbD/6HjdwT19j7WCkMyiRhWilc4H9/5h/RzTF9gv5LYh1+CmDV5d1rki6KAWLtQale0xt20eQ== - dependencies: - kind-of "^5.0.2" - -default-resolution@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/default-resolution/-/default-resolution-2.0.0.tgz#bcb82baa72ad79b426a76732f1a81ad6df26d684" - integrity sha1-vLgrqnKtebQmp2cy8aga1t8m1oQ= - -defer-to-connect@^1.0.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/defer-to-connect/-/defer-to-connect-1.1.1.tgz#88ae694b93f67b81815a2c8c769aef6574ac8f2f" - integrity sha512-J7thop4u3mRTkYRQ+Vpfwy2G5Ehoy82I14+14W4YMDLKdWloI9gSzRbV30s/NckQGVJtPkWNcW4oMAUigTdqiQ== - -deferred-leveldown@~1.2.1: - version "1.2.2" - resolved "https://registry.yarnpkg.com/deferred-leveldown/-/deferred-leveldown-1.2.2.tgz#3acd2e0b75d1669924bc0a4b642851131173e1eb" - integrity sha512-uukrWD2bguRtXilKt6cAWKyoXrTSMo5m7crUdLfWQmu8kIm88w3QZoUL+6nhpfKVmhHANER6Re3sKoNoZ3IKMA== - dependencies: - abstract-leveldown "~2.6.0" - -deferred-leveldown@~4.0.0: - version "4.0.2" - resolved "https://registry.yarnpkg.com/deferred-leveldown/-/deferred-leveldown-4.0.2.tgz#0b0570087827bf480a23494b398f04c128c19a20" - integrity sha512-5fMC8ek8alH16QiV0lTCis610D1Zt1+LA4MS4d63JgS32lrCjTFDUFz2ao09/j2I4Bqb5jL4FZYwu7Jz0XO1ww== - dependencies: - abstract-leveldown "~5.0.0" - inherits "^2.0.3" - -define-properties@^1.1.2, define-properties@^1.1.3: - version "1.1.3" - resolved "https://registry.yarnpkg.com/define-properties/-/define-properties-1.1.3.tgz#cf88da6cbee26fe6db7094f61d870cbd84cee9f1" - integrity sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ== - dependencies: - object-keys "^1.0.12" - -define-property@^0.2.5: - version "0.2.5" - resolved "https://registry.yarnpkg.com/define-property/-/define-property-0.2.5.tgz#c35b1ef918ec3c990f9a5bc57be04aacec5c8116" - integrity sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY= - dependencies: - is-descriptor "^0.1.0" - -define-property@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/define-property/-/define-property-1.0.0.tgz#769ebaaf3f4a63aad3af9e8d304c9bbe79bfb0e6" - integrity sha1-dp66rz9KY6rTr56NMEybvnm/sOY= - dependencies: - is-descriptor "^1.0.0" - -define-property@^2.0.2: - version "2.0.2" - resolved "https://registry.yarnpkg.com/define-property/-/define-property-2.0.2.tgz#d459689e8d654ba77e02a817f8710d702cb16e9d" - integrity sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ== - dependencies: - is-descriptor "^1.0.2" - isobject "^3.0.1" - -defined@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/defined/-/defined-1.0.0.tgz#c98d9bcef75674188e110969151199e39b1fa693" - integrity sha1-yY2bzvdWdBiOEQlpFRGZ45sfppM= - -delayed-stream@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619" - integrity sha1-3zrhmayt+31ECqrgsp4icrJOxhk= - -delegates@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/delegates/-/delegates-1.0.0.tgz#84c6e159b81904fdca59a0ef44cd870d31250f9a" - integrity sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o= - -depd@~1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/depd/-/depd-1.1.2.tgz#9bcd52e14c097763e749b274c4346ed2e560b5a9" - integrity sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak= - -des.js@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/des.js/-/des.js-1.0.1.tgz#5382142e1bdc53f85d86d53e5f4aa7deb91e0843" - integrity sha512-Q0I4pfFrv2VPd34/vfLrFOoRmlYj3OV50i7fskps1jZWK1kApMWWT9G6RRUeYedLcBDIhnSDaUvJMb3AhUlaEA== - dependencies: - inherits "^2.0.1" - minimalistic-assert "^1.0.0" - -destroy@~1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/destroy/-/destroy-1.0.4.tgz#978857442c44749e4206613e37946205826abd80" - integrity sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA= - -detect-file@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/detect-file/-/detect-file-1.0.0.tgz#f0d66d03672a825cb1b73bdb3fe62310c8e552b7" - integrity sha1-8NZtA2cqglyxtzvbP+YjEMjlUrc= - -detect-indent@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/detect-indent/-/detect-indent-4.0.0.tgz#f76d064352cdf43a1cb6ce619c4ee3a9475de208" - integrity sha1-920GQ1LN9Docts5hnE7jqUdd4gg= - dependencies: - repeating "^2.0.0" - -detect-libc@^1.0.2, detect-libc@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/detect-libc/-/detect-libc-1.0.3.tgz#fa137c4bd698edf55cd5cd02ac559f91a4c4ba9b" - integrity sha1-+hN8S9aY7fVc1c0CrFWfkaTEups= - -detect-newline@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/detect-newline/-/detect-newline-2.1.0.tgz#f41f1c10be4b00e87b5f13da680759f2c5bfd3e2" - integrity sha1-9B8cEL5LAOh7XxPaaAdZ8sW/0+I= - -detect-node@2.0.3: - version "2.0.3" - resolved "https://registry.yarnpkg.com/detect-node/-/detect-node-2.0.3.tgz#a2033c09cc8e158d37748fbde7507832bd6ce127" - integrity sha1-ogM8CcyOFY03dI+951B4Mr1s4Sc= - -diff-sequences@^24.9.0: - version "24.9.0" - resolved "https://registry.yarnpkg.com/diff-sequences/-/diff-sequences-24.9.0.tgz#5715d6244e2aa65f48bba0bc972db0b0b11e95b5" - integrity sha512-Dj6Wk3tWyTE+Fo1rW8v0Xhwk80um6yFYKbuAxc9c3EZxIHFDYwbi34Uk42u1CdnIiVorvt4RmlSDjIPyzGC2ew== - -diff-sequences@^25.2.6: - version "25.2.6" - resolved "https://registry.yarnpkg.com/diff-sequences/-/diff-sequences-25.2.6.tgz#5f467c00edd35352b7bca46d7927d60e687a76dd" - integrity sha512-Hq8o7+6GaZeoFjtpgvRBUknSXNeJiCx7V9Fr94ZMljNiCr9n9L8H8aJqgWOQiDDGdyn29fRNcDdRVJ5fdyihfg== - -diff@3.3.1: - version "3.3.1" - resolved "https://registry.yarnpkg.com/diff/-/diff-3.3.1.tgz#aa8567a6eed03c531fc89d3f711cd0e5259dec75" - integrity sha512-MKPHZDMB0o6yHyDryUOScqZibp914ksXwAMYMTHj6KO8UeKsRYNJD3oNCKjTqZon+V488P7N/HzXF8t7ZR95ww== - -diffie-hellman@^5.0.0: - version "5.0.3" - resolved "https://registry.yarnpkg.com/diffie-hellman/-/diffie-hellman-5.0.3.tgz#40e8ee98f55a2149607146921c63e1ae5f3d2875" - integrity sha512-kqag/Nl+f3GwyK25fhUMYj81BUOrZ9IuJsjIcDE5icNM9FJHAVm3VcUDxdLPoQtTuUylWm6ZIknYJwwaPxsUzg== - dependencies: - bn.js "^4.1.0" - miller-rabin "^4.0.0" - randombytes "^2.0.0" - -dirty-chai@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/dirty-chai/-/dirty-chai-2.0.1.tgz#6b2162ef17f7943589da840abc96e75bda01aff3" - integrity sha512-ys79pWKvDMowIDEPC6Fig8d5THiC0DJ2gmTeGzVAoEH18J8OzLud0Jh7I9IWg3NSk8x2UocznUuFmfHCXYZx9w== - -dom-walk@^0.1.0: - version "0.1.1" - resolved "https://registry.yarnpkg.com/dom-walk/-/dom-walk-0.1.1.tgz#672226dc74c8f799ad35307df936aba11acd6018" - integrity sha1-ZyIm3HTI95mtNTB9+TaroRrNYBg= - -domain-browser@^1.1.1: - version "1.2.0" - resolved "https://registry.yarnpkg.com/domain-browser/-/domain-browser-1.2.0.tgz#3d31f50191a6749dd1375a7f522e823d42e54eda" - integrity sha512-jnjyiM6eRyZl2H+W8Q/zLMA481hzi0eszAaBUzIVnmYVDBbnLxVNnfu1HgEBvCbL+71FrxMl3E6lpKH7Ge3OXA== - -domexception@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/domexception/-/domexception-1.0.1.tgz#937442644ca6a31261ef36e3ec677fe805582c90" - integrity sha512-raigMkn7CJNNo6Ihro1fzG7wr3fHuYVytzquZKX5n0yizGsTcYgzdIUwj1X9pK0VvjeihV+XiclP+DjwbsSKug== - dependencies: - webidl-conversions "^4.0.2" - -drbg.js@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/drbg.js/-/drbg.js-1.0.1.tgz#3e36b6c42b37043823cdbc332d58f31e2445480b" - integrity sha1-Pja2xCs3BDgjzbwzLVjzHiRFSAs= - dependencies: - browserify-aes "^1.0.6" - create-hash "^1.1.2" - create-hmac "^1.1.4" - -duplexer3@^0.1.4: - version "0.1.4" - resolved "https://registry.yarnpkg.com/duplexer3/-/duplexer3-0.1.4.tgz#ee01dd1cac0ed3cbc7fdbea37dc0a8f1ce002ce2" - integrity sha1-7gHdHKwO08vH/b6jfcCo8c4ALOI= - -duplexer@^0.1.1: - version "0.1.1" - resolved "https://registry.yarnpkg.com/duplexer/-/duplexer-0.1.1.tgz#ace6ff808c1ce66b57d1ebf97977acb02334cfc1" - integrity sha1-rOb/gIwc5mtX0ev5eXessCM0z8E= - -duplexify@^3.4.2, duplexify@^3.6.0: - version "3.7.1" - resolved "https://registry.yarnpkg.com/duplexify/-/duplexify-3.7.1.tgz#2a4df5317f6ccfd91f86d6fd25d8d8a103b88309" - integrity sha512-07z8uv2wMyS51kKhD1KsdXJg5WQ6t93RneqRxUHnskXVtlYYkLqM0gqStQZ3pj073g687jPCHrqNfCzawLYh5g== - dependencies: - end-of-stream "^1.0.0" - inherits "^2.0.1" - readable-stream "^2.0.0" - stream-shift "^1.0.0" - -each-props@^1.3.0: - version "1.3.2" - resolved "https://registry.yarnpkg.com/each-props/-/each-props-1.3.2.tgz#ea45a414d16dd5cfa419b1a81720d5ca06892333" - integrity sha512-vV0Hem3zAGkJAyU7JSjixeU66rwdynTAa1vofCrSA5fEln+m67Az9CcnkVD776/fsN/UjIWmBDoNRS6t6G9RfA== - dependencies: - is-plain-object "^2.0.1" - object.defaults "^1.1.0" - -ecc-jsbn@~0.1.1: - version "0.1.2" - resolved "https://registry.yarnpkg.com/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz#3a83a904e54353287874c564b7549386849a98c9" - integrity sha1-OoOpBOVDUyh4dMVkt1SThoSamMk= - dependencies: - jsbn "~0.1.0" - safer-buffer "^2.1.0" - -ee-first@1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/ee-first/-/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d" - integrity sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0= - -ejs@^2.6.1: - version "2.7.4" - resolved "https://registry.yarnpkg.com/ejs/-/ejs-2.7.4.tgz#48661287573dcc53e366c7a1ae52c3a120eec9ba" - integrity sha512-7vmuyh5+kuUyJKePhQfRQBhXV5Ce+RnaeeQArKu1EAMpL3WbgMt5WG6uQZpEVvYSSsxMXRKOewtDk9RaTKXRlA== - -electron-to-chromium@^1.3.47: - version "1.3.322" - resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.322.tgz#a6f7e1c79025c2b05838e8e344f6e89eb83213a8" - integrity sha512-Tc8JQEfGQ1MzfSzI/bTlSr7btJv/FFO7Yh6tanqVmIWOuNCu6/D1MilIEgLtmWqIrsv+o4IjpLAhgMBr/ncNAA== - -elliptic@6.3.3: - version "6.3.3" - resolved "https://registry.yarnpkg.com/elliptic/-/elliptic-6.3.3.tgz#5482d9646d54bcb89fd7d994fc9e2e9568876e3f" - integrity sha1-VILZZG1UvLif19mU/J4ulWiHbj8= - dependencies: - bn.js "^4.4.0" - brorand "^1.0.1" - hash.js "^1.0.0" - inherits "^2.0.1" - -elliptic@6.5.2, elliptic@^6.0.0, elliptic@^6.4.0, elliptic@^6.4.1: - version "6.5.2" - resolved "https://registry.yarnpkg.com/elliptic/-/elliptic-6.5.2.tgz#05c5678d7173c049d8ca433552224a495d0e3762" - integrity sha512-f4x70okzZbIQl/NSRLkI/+tteV/9WqL98zx+SQ69KbXxmVrmjwsNUPn/gYJJ0sHvEak24cZgHIPegRePAtA/xw== - dependencies: - bn.js "^4.4.0" - brorand "^1.0.1" - hash.js "^1.0.0" - hmac-drbg "^1.0.0" - inherits "^2.0.1" - minimalistic-assert "^1.0.0" - minimalistic-crypto-utils "^1.0.0" - -elliptic@6.5.4: - version "6.5.4" - resolved "https://registry.yarnpkg.com/elliptic/-/elliptic-6.5.4.tgz#da37cebd31e79a1367e941b592ed1fbebd58abbb" - integrity sha512-iLhC6ULemrljPZb+QutR5TQGB+pdW6KGD5RSegS+8sorOZT+rdQFbsQFJgvN3eRqNALqJer4oQ16YvJHlU8hzQ== - dependencies: - bn.js "^4.11.9" - brorand "^1.1.0" - hash.js "^1.0.0" - hmac-drbg "^1.0.1" - inherits "^2.0.4" - minimalistic-assert "^1.0.1" - minimalistic-crypto-utils "^1.0.1" - -emoji-regex@^7.0.1: - version "7.0.3" - resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-7.0.3.tgz#933a04052860c85e83c122479c4748a8e4c72156" - integrity sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA== - -emojis-list@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/emojis-list/-/emojis-list-2.1.0.tgz#4daa4d9db00f9819880c79fa457ae5b09a1fd389" - integrity sha1-TapNnbAPmBmIDHn6RXrlsJof04k= - -emojis-list@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/emojis-list/-/emojis-list-3.0.0.tgz#5570662046ad29e2e916e71aae260abdff4f6a78" - integrity sha512-/kyM18EfinwXZbno9FyUGeFh87KC8HRQBQGildHZbEuRyWFOmv1U10o9BBp8XVZDVNNuQKyIGIu5ZYAAXJ0V2Q== - -encodeurl@~1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/encodeurl/-/encodeurl-1.0.2.tgz#ad3ff4c86ec2d029322f5a02c3a9a606c95b3f59" - integrity sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k= - -encoding-down@5.0.4, encoding-down@~5.0.0: - version "5.0.4" - resolved "https://registry.yarnpkg.com/encoding-down/-/encoding-down-5.0.4.tgz#1e477da8e9e9d0f7c8293d320044f8b2cd8e9614" - integrity sha512-8CIZLDcSKxgzT+zX8ZVfgNbu8Md2wq/iqa1Y7zyVR18QBEAc0Nmzuvj/N5ykSKpfGzjM8qxbaFntLPwnVoUhZw== - dependencies: - abstract-leveldown "^5.0.0" - inherits "^2.0.3" - level-codec "^9.0.0" - level-errors "^2.0.0" - xtend "^4.0.1" - -encoding@^0.1.11: - version "0.1.12" - resolved "https://registry.yarnpkg.com/encoding/-/encoding-0.1.12.tgz#538b66f3ee62cd1ab51ec323829d1f9480c74beb" - integrity sha1-U4tm8+5izRq1HsMjgp0flIDHS+s= - dependencies: - iconv-lite "~0.4.13" - -end-of-stream@^1.0.0, end-of-stream@^1.1.0, end-of-stream@^1.4.1: - version "1.4.4" - resolved "https://registry.yarnpkg.com/end-of-stream/-/end-of-stream-1.4.4.tgz#5ae64a5f45057baf3626ec14da0ca5e4b2431eb0" - integrity sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q== - dependencies: - once "^1.4.0" - -enhanced-resolve@^4.0.0: - version "4.1.1" - resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-4.1.1.tgz#2937e2b8066cd0fe7ce0990a98f0d71a35189f66" - integrity sha512-98p2zE+rL7/g/DzMHMTF4zZlCgeVdJ7yr6xzEpJRYwFYrGi9ANdn5DnJURg6RpBkyk60XYDnWIv51VfIhfNGuA== - dependencies: - graceful-fs "^4.1.2" - memory-fs "^0.5.0" - tapable "^1.0.0" - -enhanced-resolve@^4.1.1, enhanced-resolve@^4.3.0: - version "4.3.0" - resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-4.3.0.tgz#3b806f3bfafc1ec7de69551ef93cca46c1704126" - integrity sha512-3e87LvavsdxyoCfGusJnrZ5G8SLPOFeHSNpZI/ATL9a5leXo2k0w6MKnbqhdBad9qTobSfB20Ld7UmgoNbAZkQ== - dependencies: - graceful-fs "^4.1.2" - memory-fs "^0.5.0" - tapable "^1.0.0" - -errno@^0.1.3, errno@~0.1.1, errno@~0.1.7: - version "0.1.7" - resolved "https://registry.yarnpkg.com/errno/-/errno-0.1.7.tgz#4684d71779ad39af177e3f007996f7c67c852618" - integrity sha512-MfrRBDWzIWifgq6tJj60gkAwtLNb6sQPlcFrSOflcP1aFmmruKQ2wRnze/8V6kgyz7H3FF8Npzv78mZ7XLLflg== - dependencies: - prr "~1.0.1" - -error-ex@^1.2.0, error-ex@^1.3.1: - version "1.3.2" - resolved "https://registry.yarnpkg.com/error-ex/-/error-ex-1.3.2.tgz#b4ac40648107fdcdcfae242f428bea8a14d4f1bf" - integrity sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g== - dependencies: - is-arrayish "^0.2.1" - -es-abstract@^1.17.0-next.1: - version "1.17.0" - resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.17.0.tgz#f42a517d0036a5591dbb2c463591dc8bb50309b1" - integrity sha512-yYkE07YF+6SIBmg1MsJ9dlub5L48Ek7X0qz+c/CPCHS9EBXfESorzng4cJQjJW5/pB6vDF41u7F8vUhLVDqIug== - dependencies: - es-to-primitive "^1.2.1" - function-bind "^1.1.1" - has "^1.0.3" - has-symbols "^1.0.1" - is-callable "^1.1.5" - is-regex "^1.0.5" - object-inspect "^1.7.0" - object-keys "^1.1.1" - object.assign "^4.1.0" - string.prototype.trimleft "^2.1.1" - string.prototype.trimright "^2.1.1" - -es-abstract@^1.5.0: - version "1.16.3" - resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.16.3.tgz#52490d978f96ff9f89ec15b5cf244304a5bca161" - integrity sha512-WtY7Fx5LiOnSYgF5eg/1T+GONaGmpvpPdCpSnYij+U2gDTL0UPfWrhDw7b2IYb+9NQJsYpCA0wOQvZfsd6YwRw== - dependencies: - es-to-primitive "^1.2.1" - function-bind "^1.1.1" - has "^1.0.3" - has-symbols "^1.0.1" - is-callable "^1.1.4" - is-regex "^1.0.4" - object-inspect "^1.7.0" - object-keys "^1.1.1" - string.prototype.trimleft "^2.1.0" - string.prototype.trimright "^2.1.0" - -es-to-primitive@^1.2.1: - version "1.2.1" - resolved "https://registry.yarnpkg.com/es-to-primitive/-/es-to-primitive-1.2.1.tgz#e55cd4c9cdc188bcefb03b366c736323fc5c898a" - integrity sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA== - dependencies: - is-callable "^1.1.4" - is-date-object "^1.0.1" - is-symbol "^1.0.2" - -es5-ext@^0.10.35, es5-ext@^0.10.46, es5-ext@^0.10.50: - version "0.10.53" - resolved "https://registry.yarnpkg.com/es5-ext/-/es5-ext-0.10.53.tgz#93c5a3acfdbef275220ad72644ad02ee18368de1" - integrity sha512-Xs2Stw6NiNHWypzRTY1MtaG/uJlwCk8kH81920ma8mvN8Xq1gsfhZvpkImLQArw8AHnv8MT2I45J3c0R8slE+Q== - dependencies: - es6-iterator "~2.0.3" - es6-symbol "~3.1.3" - next-tick "~1.0.0" - -es6-iterator@^2.0.1, es6-iterator@^2.0.3, es6-iterator@~2.0.3: - version "2.0.3" - resolved "https://registry.yarnpkg.com/es6-iterator/-/es6-iterator-2.0.3.tgz#a7de889141a05a94b0854403b2d0a0fbfa98f3b7" - integrity sha1-p96IkUGgWpSwhUQDstCg+/qY87c= - dependencies: - d "1" - es5-ext "^0.10.35" - es6-symbol "^3.1.1" - -es6-symbol@^3.1.1, es6-symbol@~3.1.3: - version "3.1.3" - resolved "https://registry.yarnpkg.com/es6-symbol/-/es6-symbol-3.1.3.tgz#bad5d3c1bcdac28269f4cb331e431c78ac705d18" - integrity sha512-NJ6Yn3FuDinBaBRWl/q5X/s4koRHBrgKAu+yGI6JCBeiu3qrcbJhwT2GeR/EXVfylRk8dpQVJoLEFhK+Mu31NA== - dependencies: - d "^1.0.1" - ext "^1.1.2" - -es6-weak-map@^2.0.1: - version "2.0.3" - resolved "https://registry.yarnpkg.com/es6-weak-map/-/es6-weak-map-2.0.3.tgz#b6da1f16cc2cc0d9be43e6bdbfc5e7dfcdf31d53" - integrity sha512-p5um32HOTO1kP+w7PRnB+5lQ43Z6muuMuIMffvDN8ZB4GcnjLBV6zGStpbASIMk4DCAvEaamhe2zhyCb/QXXsA== - dependencies: - d "1" - es5-ext "^0.10.46" - es6-iterator "^2.0.3" - es6-symbol "^3.1.1" - -escape-html@~1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/escape-html/-/escape-html-1.0.3.tgz#0258eae4d3d0c0974de1c169188ef0051d1d1988" - integrity sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg= - -escape-string-regexp@1.0.5, escape-string-regexp@^1.0.2, escape-string-regexp@^1.0.5: - version "1.0.5" - resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" - integrity sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ= - -escodegen@1.8.x: - version "1.8.1" - resolved "https://registry.yarnpkg.com/escodegen/-/escodegen-1.8.1.tgz#5a5b53af4693110bebb0867aa3430dd3b70a1018" - integrity sha1-WltTr0aTEQvrsIZ6o0MN07cKEBg= - dependencies: - esprima "^2.7.1" - estraverse "^1.9.1" - esutils "^2.0.2" - optionator "^0.8.1" - optionalDependencies: - source-map "~0.2.0" - -escodegen@^1.9.1: - version "1.12.1" - resolved "https://registry.yarnpkg.com/escodegen/-/escodegen-1.12.1.tgz#08770602a74ac34c7a90ca9229e7d51e379abc76" - integrity sha512-Q8t2YZ+0e0pc7NRVj3B4tSQ9rim1oi4Fh46k2xhJ2qOiEwhQfdjyEQddWdj7ZFaKmU+5104vn1qrcjEPWq+bgQ== - dependencies: - esprima "^3.1.3" - estraverse "^4.2.0" - esutils "^2.0.2" - optionator "^0.8.1" - optionalDependencies: - source-map "~0.6.1" - -eslint-scope@^4.0.3: - version "4.0.3" - resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-4.0.3.tgz#ca03833310f6889a3264781aa82e63eb9cfe7848" - integrity sha512-p7VutNr1O/QrxysMo3E45FjYDTeXBy0iTltPFNSqKAIfjDSXC+4dj+qfyuD8bfAXrW/y6lW3O76VaYNPKfpKrg== - dependencies: - esrecurse "^4.1.0" - estraverse "^4.1.1" - -esprima@2.7.x, esprima@^2.7.1: - version "2.7.3" - resolved "https://registry.yarnpkg.com/esprima/-/esprima-2.7.3.tgz#96e3b70d5779f6ad49cd032673d1c312767ba581" - integrity sha1-luO3DVd59q1JzQMmc9HDEnZ7pYE= - -esprima@^3.1.3: - version "3.1.3" - resolved "https://registry.yarnpkg.com/esprima/-/esprima-3.1.3.tgz#fdca51cee6133895e3c88d535ce49dbff62a4633" - integrity sha1-/cpRzuYTOJXjyI1TXOSdv/YqRjM= - -esprima@^4.0.0: - version "4.0.1" - resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.1.tgz#13b04cdb3e6c5d19df91ab6987a8695619b0aa71" - integrity sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A== - -esrecurse@^4.1.0: - version "4.2.1" - resolved "https://registry.yarnpkg.com/esrecurse/-/esrecurse-4.2.1.tgz#007a3b9fdbc2b3bb87e4879ea19c92fdbd3942cf" - integrity sha512-64RBB++fIOAXPw3P9cy89qfMlvZEXZkqqJkjqqXIvzP5ezRZjW+lPWjw35UX/3EhUPFYbg5ER4JYgDw4007/DQ== - dependencies: - estraverse "^4.1.0" - -estraverse@^1.9.1: - version "1.9.3" - resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-1.9.3.tgz#af67f2dc922582415950926091a4005d29c9bb44" - integrity sha1-r2fy3JIlgkFZUJJgkaQAXSnJu0Q= - -estraverse@^4.1.0, estraverse@^4.1.1, estraverse@^4.2.0: - version "4.3.0" - resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-4.3.0.tgz#398ad3f3c5a24948be7725e83d11a7de28cdbd1d" - integrity sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw== - -esutils@^2.0.2: - version "2.0.3" - resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.3.tgz#74d2eb4de0b8da1293711910d50775b9b710ef64" - integrity sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g== - -etag@~1.8.1: - version "1.8.1" - resolved "https://registry.yarnpkg.com/etag/-/etag-1.8.1.tgz#41ae2eeb65efa62268aebfea83ac7d79299b0887" - integrity sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc= - -eth-block-tracker@^3.0.0: - version "3.0.1" - resolved "https://registry.yarnpkg.com/eth-block-tracker/-/eth-block-tracker-3.0.1.tgz#95cd5e763c7293e0b1b2790a2a39ac2ac188a5e1" - integrity sha512-WUVxWLuhMmsfenfZvFO5sbl1qFY2IqUlw/FPVmjjdElpqLsZtSG+wPe9Dz7W/sB6e80HgFKknOmKk2eNlznHug== - dependencies: - eth-query "^2.1.0" - ethereumjs-tx "^1.3.3" - ethereumjs-util "^5.1.3" - ethjs-util "^0.1.3" - json-rpc-engine "^3.6.0" - pify "^2.3.0" - tape "^4.6.3" - -eth-block-tracker@^4.4.2: - version "4.4.3" - resolved "https://registry.yarnpkg.com/eth-block-tracker/-/eth-block-tracker-4.4.3.tgz#766a0a0eb4a52c867a28328e9ae21353812cf626" - 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" - -eth-ens-namehash@2.0.8: - version "2.0.8" - resolved "https://registry.yarnpkg.com/eth-ens-namehash/-/eth-ens-namehash-2.0.8.tgz#229ac46eca86d52e0c991e7cb2aef83ff0f68bcf" - integrity sha1-IprEbsqG1S4MmR58sq74P/D2i88= - dependencies: - idna-uts46-hx "^2.3.1" - js-sha3 "^0.5.7" - -eth-json-rpc-errors@^1.0.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/eth-json-rpc-errors/-/eth-json-rpc-errors-1.1.1.tgz#148377ef55155585981c21ff574a8937f9d6991f" - integrity sha512-WT5shJ5KfNqHi9jOZD+ID8I1kuYWNrigtZat7GOQkvwo99f8SzAVaEcWhJUv656WiZOAg3P1RiJQANtUmDmbIg== - dependencies: - fast-safe-stringify "^2.0.6" - -eth-json-rpc-errors@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/eth-json-rpc-errors/-/eth-json-rpc-errors-2.0.0.tgz#bdc19df8b80a820844709193372f0d75fb74fed8" - integrity sha512-casdSTVOxbC3ptfUdclJRvU0Sgmdm/QtezLku8l4iVR5wNFe+KF+tfnlm2I84xxpx7mkyyHeeUxmRkcB5Os6mw== - dependencies: - fast-safe-stringify "^2.0.6" - -eth-json-rpc-filters@^4.1.1: - version "4.1.1" - resolved "https://registry.yarnpkg.com/eth-json-rpc-filters/-/eth-json-rpc-filters-4.1.1.tgz#15277c66790236d85f798f4d7dc6bab99a798cd2" - integrity sha512-GkXb2h6STznD+AmMzblwXgm1JMvjdK9PTIXG7BvIkTlXQ9g0QOxuU1iQRYHoslF9S30BYBSoLSisAYPdLggW+A== - dependencies: - await-semaphore "^0.1.3" - eth-json-rpc-middleware "^4.1.4" - eth-query "^2.1.2" - json-rpc-engine "^5.1.3" - lodash.flatmap "^4.5.0" - safe-event-emitter "^1.0.1" - -eth-json-rpc-infura@^3.1.0: - version "3.2.1" - resolved "https://registry.yarnpkg.com/eth-json-rpc-infura/-/eth-json-rpc-infura-3.2.1.tgz#26702a821067862b72d979c016fd611502c6057f" - integrity sha512-W7zR4DZvyTn23Bxc0EWsq4XGDdD63+XPUCEhV2zQvQGavDVC4ZpFDK4k99qN7bd7/fjj37+rxmuBOBeIqCA5Mw== - dependencies: - cross-fetch "^2.1.1" - eth-json-rpc-middleware "^1.5.0" - json-rpc-engine "^3.4.0" - json-rpc-error "^2.0.0" - -eth-json-rpc-infura@^4.0.1: - version "4.0.2" - resolved "https://registry.yarnpkg.com/eth-json-rpc-infura/-/eth-json-rpc-infura-4.0.2.tgz#8af1a1a2e9a0a82aaa302bbc96fb1a4c15d69b83" - integrity sha512-dvgOrci9lZqpjpp0hoC3Zfedhg3aIpLFVDH0TdlKxRlkhR75hTrKTwxghDrQwE0bn3eKrC8RsN1m/JdnIWltpw== - dependencies: - cross-fetch "^2.1.1" - eth-json-rpc-errors "^1.0.1" - eth-json-rpc-middleware "^4.1.4" - json-rpc-engine "^5.1.3" - -eth-json-rpc-middleware@^1.5.0: - version "1.6.0" - resolved "https://registry.yarnpkg.com/eth-json-rpc-middleware/-/eth-json-rpc-middleware-1.6.0.tgz#5c9d4c28f745ccb01630f0300ba945f4bef9593f" - integrity sha512-tDVCTlrUvdqHKqivYMjtFZsdD7TtpNLBCfKAcOpaVs7orBMS/A8HWro6dIzNtTZIR05FAbJ3bioFOnZpuCew9Q== - dependencies: - async "^2.5.0" - eth-query "^2.1.2" - eth-tx-summary "^3.1.2" - ethereumjs-block "^1.6.0" - ethereumjs-tx "^1.3.3" - ethereumjs-util "^5.1.2" - ethereumjs-vm "^2.1.0" - fetch-ponyfill "^4.0.0" - json-rpc-engine "^3.6.0" - json-rpc-error "^2.0.0" - json-stable-stringify "^1.0.1" - promise-to-callback "^1.0.0" - tape "^4.6.3" - -eth-json-rpc-middleware@^4.1.4, eth-json-rpc-middleware@^4.1.5: - version "4.3.0" - resolved "https://registry.yarnpkg.com/eth-json-rpc-middleware/-/eth-json-rpc-middleware-4.3.0.tgz#d3e72efb60b6f601f022ce01384481eaed552b6b" - integrity sha512-Acr+FaIHB0oIV0nWrCvepQghgA3FzYFvnMDXdTUeHQvAX/G6ioMbw1exGJs+6HirRjJ+MmkZqaArphx+PTrRNQ== - dependencies: - btoa "^1.2.1" - clone "^2.1.1" - eth-json-rpc-errors "^1.0.1" - eth-query "^2.1.2" - eth-sig-util "^1.4.2" - ethereumjs-block "^1.6.0" - ethereumjs-tx "^1.3.7" - ethereumjs-util "^5.1.2" - ethereumjs-vm "^2.6.0" - fetch-ponyfill "^4.0.0" - json-rpc-engine "^5.1.3" - json-stable-stringify "^1.0.1" - pify "^3.0.0" - safe-event-emitter "^1.0.1" - -eth-lib@0.2.7: - version "0.2.7" - resolved "https://registry.yarnpkg.com/eth-lib/-/eth-lib-0.2.7.tgz#2f93f17b1e23aec3759cd4a3fe20c1286a3fc1ca" - integrity sha1-L5Pxex4jrsN1nNSj/iDBKGo/wco= - dependencies: - bn.js "^4.11.6" - elliptic "^6.4.0" - xhr-request-promise "^0.1.2" - -eth-lib@0.2.8: - version "0.2.8" - resolved "https://registry.yarnpkg.com/eth-lib/-/eth-lib-0.2.8.tgz#b194058bef4b220ad12ea497431d6cb6aa0623c8" - integrity sha512-ArJ7x1WcWOlSpzdoTBX8vkwlkSQ85CjjifSZtV4co64vWxSV8geWfPI9x4SVYu3DSxnX4yWFVTtGL+j9DUFLNw== - dependencies: - bn.js "^4.11.6" - elliptic "^6.4.0" - xhr-request-promise "^0.1.2" - -eth-lib@^0.1.26: - version "0.1.29" - resolved "https://registry.yarnpkg.com/eth-lib/-/eth-lib-0.1.29.tgz#0c11f5060d42da9f931eab6199084734f4dbd1d9" - integrity sha512-bfttrr3/7gG4E02HoWTDUcDDslN003OlOoBxk9virpAZQ1ja/jDgwkWB8QfJF7ojuEowrqy+lzp9VcJG7/k5bQ== - dependencies: - bn.js "^4.11.6" - elliptic "^6.4.0" - nano-json-stream-parser "^0.1.2" - servify "^0.1.12" - ws "^3.0.0" - xhr-request-promise "^0.1.2" - -eth-query@^2.0.2, eth-query@^2.1.0, eth-query@^2.1.2: - version "2.1.2" - resolved "https://registry.yarnpkg.com/eth-query/-/eth-query-2.1.2.tgz#d6741d9000106b51510c72db92d6365456a6da5e" - integrity sha1-1nQdkAAQa1FRDHLbktY2VFam2l4= - dependencies: - json-rpc-random-id "^1.0.0" - xtend "^4.0.1" - -eth-saddle@^0.1.25: - version "0.1.25" - resolved "https://registry.yarnpkg.com/eth-saddle/-/eth-saddle-0.1.25.tgz#8bbfefa6eabcdaca0c88e838fa60213e9fff9d8b" - integrity sha512-BUames0/ap3Cm7bJVjp0sFfTxKUv+xK+zbwZLYQghky9KrfowlURqBZgJHPxF3w9HyCh95UQBY5QsIeed1Ppqw== - dependencies: - "@0x/subproviders" "=6.0.0" - "@compound-finance/sol-coverage" "=4.0.10-alpha.7" - "@compound-finance/sol-tracing-utils" "=7.1.0-alpha.7" - "@types/jest" "^24.0.15" - ethereumjs-tx "2.1.2" - ethereumjs-util "5.2.0" - fast-glob "^3.2.2" - ganache-core "^2.13.2" - jest "^24.9.0" - jest-cli "^24.9.0" - jest-diff "^25.3.0" - jest-junit "^6.4.0" - ts-jest "^24.0.2" - typescript "^3.5.1" - web3 "^1.2.11" - web3-provider-engine "^15.0.4" - yargs "^13.2.4" - -eth-sig-util@2.3.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/eth-sig-util/-/eth-sig-util-2.3.0.tgz#c54a6ac8e8796f7e25f59cf436982a930e645231" - integrity sha512-ugD1AvaggvKaZDgnS19W5qOfepjGc7qHrt7TrAaL54gJw9SHvgIXJ3r2xOMW30RWJZNP+1GlTOy5oye7yXA4xA== - dependencies: - buffer "^5.2.1" - elliptic "^6.4.0" - ethereumjs-abi "0.6.5" - ethereumjs-util "^5.1.1" - tweetnacl "^1.0.0" - tweetnacl-util "^0.15.0" - -eth-sig-util@^1.4.2: - version "1.4.2" - resolved "https://registry.yarnpkg.com/eth-sig-util/-/eth-sig-util-1.4.2.tgz#8d958202c7edbaae839707fba6f09ff327606210" - integrity sha1-jZWCAsftuq6Dlwf7pvCf8ydgYhA= - dependencies: - ethereumjs-abi "git+https://github.com/ethereumjs/ethereumjs-abi.git" - ethereumjs-util "^5.1.1" - -eth-tx-summary@^3.1.2: - version "3.2.4" - resolved "https://registry.yarnpkg.com/eth-tx-summary/-/eth-tx-summary-3.2.4.tgz#e10eb95eb57cdfe549bf29f97f1e4f1db679035c" - integrity sha512-NtlDnaVZah146Rm8HMRUNMgIwG/ED4jiqk0TME9zFheMl1jOp6jL1m0NKGjJwehXQ6ZKCPr16MTr+qspKpEXNg== - dependencies: - async "^2.1.2" - clone "^2.0.0" - concat-stream "^1.5.1" - end-of-stream "^1.1.0" - eth-query "^2.0.2" - ethereumjs-block "^1.4.1" - ethereumjs-tx "^1.1.1" - ethereumjs-util "^5.0.1" - ethereumjs-vm "^2.6.0" - through2 "^2.0.3" - -ethashjs@~0.0.7: - version "0.0.7" - resolved "https://registry.yarnpkg.com/ethashjs/-/ethashjs-0.0.7.tgz#30bfe4196726690a0c59d3b8272e70d4d0c34bae" - integrity sha1-ML/kGWcmaQoMWdO4Jy5w1NDDS64= - dependencies: - async "^1.4.2" - buffer-xor "^1.0.3" - ethereumjs-util "^4.0.1" - miller-rabin "^4.0.0" - -ethereum-bloom-filters@^1.0.6: - version "1.0.6" - resolved "https://registry.yarnpkg.com/ethereum-bloom-filters/-/ethereum-bloom-filters-1.0.6.tgz#9cdebb3ec20de96ec4a434c6bad6ea5a513037aa" - integrity sha512-dE9CGNzgOOsdh7msZirvv8qjHtnHpvBlKe2647kM8v+yeF71IRso55jpojemvHV+jMjr48irPWxMRaHuOWzAFA== - dependencies: - js-sha3 "^0.8.0" - -ethereum-common@0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/ethereum-common/-/ethereum-common-0.2.0.tgz#13bf966131cce1eeade62a1b434249bb4cb120ca" - integrity sha512-XOnAR/3rntJgbCdGhqdaLIxDLWKLmsZOGhHdBKadEr6gEnJLH52k93Ou+TUdFaPN3hJc3isBZBal3U/XZ15abA== - -ethereum-common@^0.0.18: - version "0.0.18" - resolved "https://registry.yarnpkg.com/ethereum-common/-/ethereum-common-0.0.18.tgz#2fdc3576f232903358976eb39da783213ff9523f" - integrity sha1-L9w1dvIykDNYl26znaeDIT/5Uj8= - -ethereum-types@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/ethereum-types/-/ethereum-types-3.0.0.tgz#9fa3a98b8b9b64a0fab1864de7bc7fd7b1699fcd" - integrity sha512-jRSsiua+e4/89r7M3mqPcP1M2f3TgXxpVmWysy+7pEg2H4lwEQRWarbYfIpWp81NtxrcMQv5bMK+yR1MN4sDpg== - dependencies: - "@types/node" "*" - bignumber.js "~9.0.0" - -ethereum-types@^3.2.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/ethereum-types/-/ethereum-types-3.2.0.tgz#5bd27cadc3c1b3c2e2bf94654fa2bc3618a4520f" - integrity sha512-osxikvWF2CuHauo2jiBpGalLXbCj5xWm2WcNr+Z4sNTk7z6DArPNXwsgANu2bA+aAsqSSF4NgsNx8JS1d3xdOQ== - dependencies: - "@types/node" "*" - bignumber.js "~9.0.0" - -ethereumjs-abi@0.6.5: - version "0.6.5" - resolved "https://registry.yarnpkg.com/ethereumjs-abi/-/ethereumjs-abi-0.6.5.tgz#5a637ef16ab43473fa72a29ad90871405b3f5241" - integrity sha1-WmN+8Wq0NHP6cqKa2QhxQFs/UkE= - dependencies: - bn.js "^4.10.0" - ethereumjs-util "^4.3.0" - -ethereumjs-abi@0.6.7: - version "0.6.7" - resolved "https://registry.yarnpkg.com/ethereumjs-abi/-/ethereumjs-abi-0.6.7.tgz#d1d1c5cdb8d910a7d97645ba9e93be5d153bba2e" - integrity sha512-EMLOA8ICO5yAaXDhjVEfYjsJIXYutY8ufTE93eEKwsVtp2usQreKwsDTJ9zvam3omYqNuffr8IONIqb2uUslGQ== - dependencies: - bn.js "^4.11.8" - ethereumjs-util "^6.0.0" - -"ethereumjs-abi@git+https://github.com/ethereumjs/ethereumjs-abi.git": - version "0.6.8" - resolved "git+https://github.com/ethereumjs/ethereumjs-abi.git#1cfbb13862f90f0b391d8a699544d5fe4dfb8c7b" - dependencies: - bn.js "^4.11.8" - ethereumjs-util "^6.0.0" - -ethereumjs-account@3.0.0, ethereumjs-account@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/ethereumjs-account/-/ethereumjs-account-3.0.0.tgz#728f060c8e0c6e87f1e987f751d3da25422570a9" - integrity sha512-WP6BdscjiiPkQfF9PVfMcwx/rDvfZTjFKY0Uwc09zSQr9JfIVH87dYIJu0gNhBhpmovV4yq295fdllS925fnBA== - dependencies: - ethereumjs-util "^6.0.0" - rlp "^2.2.1" - safe-buffer "^5.1.1" - -ethereumjs-account@^2.0.3: - version "2.0.5" - resolved "https://registry.yarnpkg.com/ethereumjs-account/-/ethereumjs-account-2.0.5.tgz#eeafc62de544cb07b0ee44b10f572c9c49e00a84" - integrity sha512-bgDojnXGjhMwo6eXQC0bY6UK2liSFUSMwwylOmQvZbSl/D7NXQ3+vrGO46ZeOgjGfxXmgIeVNDIiHw7fNZM4VA== - dependencies: - ethereumjs-util "^5.0.0" - rlp "^2.0.0" - safe-buffer "^5.1.1" - -ethereumjs-block@2.2.2, ethereumjs-block@^2.2.2, ethereumjs-block@~2.2.2: - version "2.2.2" - resolved "https://registry.yarnpkg.com/ethereumjs-block/-/ethereumjs-block-2.2.2.tgz#c7654be7e22df489fda206139ecd63e2e9c04965" - integrity sha512-2p49ifhek3h2zeg/+da6XpdFR3GlqY3BIEiqxGF8j9aSRIgkb7M1Ky+yULBKJOu8PAZxfhsYA+HxUk2aCQp3vg== - 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" - -ethereumjs-block@^1.2.2, ethereumjs-block@^1.4.1, ethereumjs-block@^1.6.0: - version "1.7.1" - resolved "https://registry.yarnpkg.com/ethereumjs-block/-/ethereumjs-block-1.7.1.tgz#78b88e6cc56de29a6b4884ee75379b6860333c3f" - integrity sha512-B+sSdtqm78fmKkBq78/QLKJbu/4Ts4P2KFISdgcuZUPDm9x+N7qgBPIIFUGbaakQh8bzuquiRVbdmvPKqbILRg== - 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" - -ethereumjs-block@~2.2.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/ethereumjs-block/-/ethereumjs-block-2.2.0.tgz#8c6c3ab4a5eff0a16d9785fbeedbe643f4dbcbef" - integrity sha512-Ye+uG/L2wrp364Zihdlr/GfC3ft+zG8PdHcRtsBFNNH1CkOhxOwdB8friBU85n89uRZ9eIMAywCq0F4CwT1wAw== - dependencies: - async "^2.0.1" - ethereumjs-common "^1.1.0" - ethereumjs-tx "^1.2.2" - ethereumjs-util "^5.0.0" - merkle-patricia-tree "^2.1.2" - -ethereumjs-blockchain@^4.0.3: - version "4.0.3" - resolved "https://registry.yarnpkg.com/ethereumjs-blockchain/-/ethereumjs-blockchain-4.0.3.tgz#e013034633a30ad2006728e8e2b21956b267b773" - integrity sha512-0nJWbyA+Gu0ZKZr/cywMtB/77aS/4lOVsIKbgUN2sFQYscXO5rPbUfrEe7G2Zhjp86/a0VqLllemDSTHvx3vZA== - dependencies: - async "^2.6.1" - ethashjs "~0.0.7" - ethereumjs-block "~2.2.2" - ethereumjs-common "^1.5.0" - ethereumjs-util "~6.1.0" - flow-stoplight "^1.0.0" - level-mem "^3.0.1" - lru-cache "^5.1.1" - rlp "^2.2.2" - semaphore "^1.1.0" - -ethereumjs-common@1.5.0, ethereumjs-common@^1.3.1, ethereumjs-common@^1.3.2, ethereumjs-common@^1.5.0: - version "1.5.0" - resolved "https://registry.yarnpkg.com/ethereumjs-common/-/ethereumjs-common-1.5.0.tgz#d3e82fc7c47c0cef95047f431a99485abc9bb1cd" - integrity sha512-SZOjgK1356hIY7MRj3/ma5qtfr/4B5BL+G4rP/XSMYr2z1H5el4RX5GReYCKmQmYI/nSBmRnwrZ17IfHuG0viQ== - -ethereumjs-common@^1.1.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/ethereumjs-common/-/ethereumjs-common-1.4.0.tgz#a940685f88f3c2587e4061630fe720b089c965b8" - integrity sha512-ser2SAplX/YI5W2AnzU8wmSjKRy4KQd4uxInJ36BzjS3m18E/B9QedPUIresZN1CSEQb/RgNQ2gN7C/XbpTafA== - -ethereumjs-tx@2.1.2, ethereumjs-tx@^2.1.2: - version "2.1.2" - resolved "https://registry.yarnpkg.com/ethereumjs-tx/-/ethereumjs-tx-2.1.2.tgz#5dfe7688bf177b45c9a23f86cf9104d47ea35fed" - integrity sha512-zZEK1onCeiORb0wyCXUvg94Ve5It/K6GD1K+26KfFKodiBiS6d9lfCXlUKGBBdQ+bv7Day+JK0tj1K+BeNFRAw== - dependencies: - ethereumjs-common "^1.5.0" - ethereumjs-util "^6.0.0" - -ethereumjs-tx@^1.1.1, ethereumjs-tx@^1.2.0, ethereumjs-tx@^1.2.2, ethereumjs-tx@^1.3.3, ethereumjs-tx@^1.3.5, ethereumjs-tx@^1.3.7: - version "1.3.7" - resolved "https://registry.yarnpkg.com/ethereumjs-tx/-/ethereumjs-tx-1.3.7.tgz#88323a2d875b10549b8347e09f4862b546f3d89a" - integrity sha512-wvLMxzt1RPhAQ9Yi3/HKZTn0FZYpnsmQdbKYfUUpi4j1SEIcbkd9tndVjcPrufY3V7j2IebOpC00Zp2P/Ay2kA== - dependencies: - ethereum-common "^0.0.18" - ethereumjs-util "^5.0.0" - -ethereumjs-tx@^2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/ethereumjs-tx/-/ethereumjs-tx-2.1.1.tgz#7d204e2b319156c9bc6cec67e9529424a26e8ccc" - integrity sha512-QtVriNqowCFA19X9BCRPMgdVNJ0/gMBS91TQb1DfrhsbR748g4STwxZptFAwfqehMyrF8rDwB23w87PQwru0wA== - dependencies: - ethereumjs-common "^1.3.1" - ethereumjs-util "^6.0.0" - -ethereumjs-util@5.2.0, ethereumjs-util@^5.0.0, ethereumjs-util@^5.0.1, ethereumjs-util@^5.1.1, ethereumjs-util@^5.1.2, ethereumjs-util@^5.1.3, ethereumjs-util@^5.1.5: - version "5.2.0" - resolved "https://registry.yarnpkg.com/ethereumjs-util/-/ethereumjs-util-5.2.0.tgz#3e0c0d1741471acf1036052d048623dee54ad642" - integrity sha512-CJAKdI0wgMbQFLlLRtZKGcy/L6pzVRgelIZqRqNbuVFM3K9VEnyfbcvz0ncWMRNCe4kaHWjwRYQcYMucmwsnWA== - dependencies: - bn.js "^4.11.0" - create-hash "^1.1.2" - ethjs-util "^0.1.3" - keccak "^1.0.2" - rlp "^2.0.0" - safe-buffer "^5.1.1" - secp256k1 "^3.0.1" - -ethereumjs-util@6.2.0, ethereumjs-util@^6.0.0, ethereumjs-util@^6.2.0: - version "6.2.0" - resolved "https://registry.yarnpkg.com/ethereumjs-util/-/ethereumjs-util-6.2.0.tgz#23ec79b2488a7d041242f01e25f24e5ad0357960" - integrity sha512-vb0XN9J2QGdZGIEKG2vXM+kUdEivUfU6Wmi5y0cg+LRhDYKnXIZ/Lz7XjFbHRR9VIKq2lVGLzGBkA++y2nOdOQ== - dependencies: - "@types/bn.js" "^4.11.3" - bn.js "^4.11.0" - create-hash "^1.1.2" - ethjs-util "0.1.6" - keccak "^2.0.0" - rlp "^2.2.3" - secp256k1 "^3.0.1" - -ethereumjs-util@^4.0.1, ethereumjs-util@^4.3.0: - version "4.5.0" - resolved "https://registry.yarnpkg.com/ethereumjs-util/-/ethereumjs-util-4.5.0.tgz#3e9428b317eebda3d7260d854fddda954b1f1bc6" - integrity sha1-PpQosxfuvaPXJg2FT93alUsfG8Y= - dependencies: - bn.js "^4.8.0" - create-hash "^1.1.2" - keccakjs "^0.2.0" - rlp "^2.0.0" - secp256k1 "^3.0.1" - -ethereumjs-util@~6.1.0: - version "6.1.0" - resolved "https://registry.yarnpkg.com/ethereumjs-util/-/ethereumjs-util-6.1.0.tgz#e9c51e5549e8ebd757a339cc00f5380507e799c8" - integrity sha512-URESKMFbDeJxnAxPppnk2fN6Y3BIatn9fwn76Lm8bQlt+s52TpG8dN9M66MLPuRAiAOIqL3dfwqWJf0sd0fL0Q== - dependencies: - bn.js "^4.11.0" - create-hash "^1.1.2" - ethjs-util "0.1.6" - keccak "^1.0.2" - rlp "^2.0.0" - safe-buffer "^5.1.1" - secp256k1 "^3.0.1" - -ethereumjs-vm@4.1.3: - version "4.1.3" - resolved "https://registry.yarnpkg.com/ethereumjs-vm/-/ethereumjs-vm-4.1.3.tgz#dc8eb45f47d775da9f0b2437d5e20896fdf66f37" - integrity sha512-RTrD0y7My4O6Qr1P2ZIsMfD6RzL6kU/RhBZ0a5XrPzAeR61crBS7or66ohDrvxDI/rDBxMi+6SnsELih6fzalw== - dependencies: - async "^2.1.2" - async-eventemitter "^0.2.2" - core-js-pure "^3.0.1" - ethereumjs-account "^3.0.0" - ethereumjs-block "^2.2.2" - ethereumjs-blockchain "^4.0.3" - ethereumjs-common "^1.5.0" - ethereumjs-tx "^2.1.2" - ethereumjs-util "^6.2.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" - util.promisify "^1.0.0" - -ethereumjs-vm@^2.1.0, ethereumjs-vm@^2.3.4, ethereumjs-vm@^2.6.0: - version "2.6.0" - resolved "https://registry.yarnpkg.com/ethereumjs-vm/-/ethereumjs-vm-2.6.0.tgz#76243ed8de031b408793ac33907fb3407fe400c6" - integrity sha512-r/XIUik/ynGbxS3y+mvGnbOKnuLo40V5Mj1J25+HEO63aWYREIqvWeRO/hnROlMBE5WoniQmPmhiaN0ctiHaXw== - 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" - -ethereumjs-wallet@0.6.3: - version "0.6.3" - resolved "https://registry.yarnpkg.com/ethereumjs-wallet/-/ethereumjs-wallet-0.6.3.tgz#b0eae6f327637c2aeb9ccb9047b982ac542e6ab1" - integrity sha512-qiXPiZOsStem+Dj/CQHbn5qex+FVkuPmGH7SvSnA9F3tdRDt8dLMyvIj3+U05QzVZNPYh4HXEdnzoYI4dZkr9w== - dependencies: - aes-js "^3.1.1" - bs58check "^2.1.2" - ethereumjs-util "^6.0.0" - hdkey "^1.1.0" - randombytes "^2.0.6" - safe-buffer "^5.1.2" - scrypt.js "^0.3.0" - utf8 "^3.0.0" - uuid "^3.3.2" - -ethers@4.0.0-beta.3: - version "4.0.0-beta.3" - resolved "https://registry.yarnpkg.com/ethers/-/ethers-4.0.0-beta.3.tgz#15bef14e57e94ecbeb7f9b39dd0a4bd435bc9066" - integrity sha512-YYPogooSknTwvHg3+Mv71gM/3Wcrx+ZpCzarBj3mqs9njjRkrOo2/eufzhHloOCo3JSoNI4TQJJ6yU5ABm3Uog== - dependencies: - "@types/node" "^10.3.2" - aes-js "3.0.0" - bn.js "^4.4.0" - elliptic "6.3.3" - hash.js "1.1.3" - js-sha3 "0.5.7" - scrypt-js "2.0.3" - setimmediate "1.0.4" - uuid "2.0.1" - xmlhttprequest "1.8.0" - -ethers@^5.0.8: - version "5.4.6" - resolved "https://registry.yarnpkg.com/ethers/-/ethers-5.4.6.tgz#fe0a023956b5502c947f58e82fbcf9a73e5e75b6" - integrity sha512-F7LXARyB/Px3AQC6/QKedWZ8eqCkgOLORqL4B/F0Mag/K+qJSFGqsR36EaOZ6fKg3ZonI+pdbhb4A8Knt/43jQ== - dependencies: - "@ethersproject/abi" "5.4.1" - "@ethersproject/abstract-provider" "5.4.1" - "@ethersproject/abstract-signer" "5.4.1" - "@ethersproject/address" "5.4.0" - "@ethersproject/base64" "5.4.0" - "@ethersproject/basex" "5.4.0" - "@ethersproject/bignumber" "5.4.1" - "@ethersproject/bytes" "5.4.0" - "@ethersproject/constants" "5.4.0" - "@ethersproject/contracts" "5.4.1" - "@ethersproject/hash" "5.4.0" - "@ethersproject/hdnode" "5.4.0" - "@ethersproject/json-wallets" "5.4.0" - "@ethersproject/keccak256" "5.4.0" - "@ethersproject/logger" "5.4.1" - "@ethersproject/networks" "5.4.2" - "@ethersproject/pbkdf2" "5.4.0" - "@ethersproject/properties" "5.4.1" - "@ethersproject/providers" "5.4.5" - "@ethersproject/random" "5.4.0" - "@ethersproject/rlp" "5.4.0" - "@ethersproject/sha2" "5.4.0" - "@ethersproject/signing-key" "5.4.0" - "@ethersproject/solidity" "5.4.0" - "@ethersproject/strings" "5.4.0" - "@ethersproject/transactions" "5.4.0" - "@ethersproject/units" "5.4.0" - "@ethersproject/wallet" "5.4.0" - "@ethersproject/web" "5.4.0" - "@ethersproject/wordlists" "5.4.0" - -ethers@~4.0.4: - version "4.0.40" - resolved "https://registry.yarnpkg.com/ethers/-/ethers-4.0.40.tgz#6e1963d10b5d336a13cd81b519c230cc17624653" - integrity sha512-MC9BtV7Hpq4dgFONEfanx9aU9GhhoWU270F+/wegHZXA7FR+2KXFdt36YIQYLmVY5ykUWswDxd+f9EVkIa7JOA== - dependencies: - aes-js "3.0.0" - bn.js "^4.4.0" - elliptic "6.5.2" - hash.js "1.1.3" - js-sha3 "0.5.7" - scrypt-js "2.0.4" - setimmediate "1.0.4" - uuid "2.0.1" - xmlhttprequest "1.8.0" - -ethjs-unit@0.1.6: - version "0.1.6" - resolved "https://registry.yarnpkg.com/ethjs-unit/-/ethjs-unit-0.1.6.tgz#c665921e476e87bce2a9d588a6fe0405b2c41699" - integrity sha1-xmWSHkduh7ziqdWIpv4EBbLEFpk= - dependencies: - bn.js "4.11.6" - number-to-bn "1.7.0" - -ethjs-util@0.1.6, ethjs-util@^0.1.3: - version "0.1.6" - resolved "https://registry.yarnpkg.com/ethjs-util/-/ethjs-util-0.1.6.tgz#f308b62f185f9fe6237132fb2a9818866a5cd536" - integrity sha512-CUnVOQq7gSpDHZVVrQW8ExxUETWrnrvXYvYz55wOU8Uj4VCgw56XC2B/fVqQN+f7gmrnRHSLVnFAwsCuNwji8w== - dependencies: - is-hex-prefixed "1.0.0" - strip-hex-prefix "1.0.0" - -eventemitter3@3.1.2: - version "3.1.2" - resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-3.1.2.tgz#2d3d48f9c346698fce83a85d7d664e98535df6e7" - integrity sha512-tvtQIeLVHjDkJYnzf2dgVMxfuSGJeM/7UCG17TT4EumTfNtF+0nebF/4zWOIkCreAbtNqhGEboB6BWrwqNaw4Q== - -eventemitter3@4.0.4: - version "4.0.4" - resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-4.0.4.tgz#b5463ace635a083d018bdc7c917b4c5f10a85384" - integrity sha512-rlaVLnVxtxvoyLsQQFBx53YmXHDxRIzzTLbdfxqi4yocpSjAxXwkU0cScM5JgSKMqEhrZpnvQ2D9gjylR0AimQ== - -events@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/events/-/events-3.0.0.tgz#9a0a0dfaf62893d92b875b8f2698ca4114973e88" - integrity sha512-Dc381HFWJzEOhQ+d8pkNon++bk9h6cdAoAj4iE6Q4y6xgTzySWXlKn05/TVNpjnfRqi/X0EpJEJohPjNI3zpVA== - -evp_bytestokey@^1.0.0, evp_bytestokey@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz#7fcbdb198dc71959432efe13842684e0525acb02" - integrity sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA== - dependencies: - md5.js "^1.3.4" - safe-buffer "^5.1.1" - -exec-sh@^0.3.2: - version "0.3.4" - resolved "https://registry.yarnpkg.com/exec-sh/-/exec-sh-0.3.4.tgz#3a018ceb526cc6f6df2bb504b2bfe8e3a4934ec5" - integrity sha512-sEFIkc61v75sWeOe72qyrqg2Qg0OuLESziUDk/O/z2qgS15y2gWVFrI6f2Qn/qw/0/NCfCEsmNA4zOjkwEZT1A== - -execa@^0.7.0: - version "0.7.0" - resolved "https://registry.yarnpkg.com/execa/-/execa-0.7.0.tgz#944becd34cc41ee32a63a9faf27ad5a65fc59777" - integrity sha1-lEvs00zEHuMqY6n68nrVpl/Fl3c= - dependencies: - cross-spawn "^5.0.1" - get-stream "^3.0.0" - is-stream "^1.1.0" - npm-run-path "^2.0.0" - p-finally "^1.0.0" - signal-exit "^3.0.0" - strip-eof "^1.0.0" - -execa@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/execa/-/execa-1.0.0.tgz#c6236a5bb4df6d6f15e88e7f017798216749ddd8" - integrity sha512-adbxcyWV46qiHyvSp50TKt05tB4tK3HcmF7/nxfAdhnox83seTDbwnaqKO4sXRy7roHAIFqJP/Rw/AuEbX61LA== - dependencies: - cross-spawn "^6.0.0" - get-stream "^4.0.0" - is-stream "^1.1.0" - npm-run-path "^2.0.0" - p-finally "^1.0.0" - signal-exit "^3.0.0" - strip-eof "^1.0.0" - -exit@^0.1.2: - version "0.1.2" - resolved "https://registry.yarnpkg.com/exit/-/exit-0.1.2.tgz#0632638f8d877cc82107d30a0fff1a17cba1cd0c" - integrity sha1-BjJjj42HfMghB9MKD/8aF8uhzQw= - -expand-brackets@^2.1.4: - version "2.1.4" - resolved "https://registry.yarnpkg.com/expand-brackets/-/expand-brackets-2.1.4.tgz#b77735e315ce30f6b6eff0f83b04151a22449622" - integrity sha1-t3c14xXOMPa27/D4OwQVGiJEliI= - dependencies: - debug "^2.3.3" - define-property "^0.2.5" - extend-shallow "^2.0.1" - posix-character-classes "^0.1.0" - regex-not "^1.0.0" - snapdragon "^0.8.1" - to-regex "^3.0.1" - -expand-template@^2.0.3: - version "2.0.3" - resolved "https://registry.yarnpkg.com/expand-template/-/expand-template-2.0.3.tgz#6e14b3fcee0f3a6340ecb57d2e8918692052a47c" - integrity sha512-XYfuKMvj4O35f/pOXLObndIRvyQ+/+6AhODh+OKWj9S9498pHHn/IMszH+gt0fBCRWMNfk1ZSp5x3AifmnI2vg== - -expand-tilde@^2.0.0, expand-tilde@^2.0.2: - version "2.0.2" - resolved "https://registry.yarnpkg.com/expand-tilde/-/expand-tilde-2.0.2.tgz#97e801aa052df02454de46b02bf621642cdc8502" - integrity sha1-l+gBqgUt8CRU3kawK/YhZCzchQI= - dependencies: - homedir-polyfill "^1.0.1" - -expect@^24.9.0: - version "24.9.0" - resolved "https://registry.yarnpkg.com/expect/-/expect-24.9.0.tgz#b75165b4817074fa4a157794f46fe9f1ba15b6ca" - integrity sha512-wvVAx8XIol3Z5m9zvZXiyZOQ+sRJqNTIm6sGjdWlaZIeupQGO3WbYI+15D/AmEwZywL6wtJkbAbJtzkOfBuR0Q== - dependencies: - "@jest/types" "^24.9.0" - ansi-styles "^3.2.0" - jest-get-type "^24.9.0" - jest-matcher-utils "^24.9.0" - jest-message-util "^24.9.0" - jest-regex-util "^24.9.0" - -express@^4.14.0, express@^4.16.3: - version "4.17.1" - resolved "https://registry.yarnpkg.com/express/-/express-4.17.1.tgz#4491fc38605cf51f8629d39c2b5d026f98a4c134" - integrity sha512-mHJ9O79RqluphRrcw2X/GTh3k9tVv8YcoyY4Kkh4WDMUYKRZUq0h1o0w2rrrxBqM7VoeUVqgb27xlEMXTnYt4g== - dependencies: - accepts "~1.3.7" - array-flatten "1.1.1" - body-parser "1.19.0" - content-disposition "0.5.3" - content-type "~1.0.4" - cookie "0.4.0" - cookie-signature "1.0.6" - debug "2.6.9" - depd "~1.1.2" - encodeurl "~1.0.2" - escape-html "~1.0.3" - etag "~1.8.1" - finalhandler "~1.1.2" - fresh "0.5.2" - merge-descriptors "1.0.1" - methods "~1.1.2" - on-finished "~2.3.0" - parseurl "~1.3.3" - path-to-regexp "0.1.7" - proxy-addr "~2.0.5" - qs "6.7.0" - range-parser "~1.2.1" - safe-buffer "5.1.2" - send "0.17.1" - serve-static "1.14.1" - setprototypeof "1.1.1" - statuses "~1.5.0" - type-is "~1.6.18" - utils-merge "1.0.1" - vary "~1.1.2" - -ext@^1.1.2: - version "1.4.0" - resolved "https://registry.yarnpkg.com/ext/-/ext-1.4.0.tgz#89ae7a07158f79d35517882904324077e4379244" - integrity sha512-Key5NIsUxdqKg3vIsdw9dSuXpPCQ297y6wBjL30edxwPgt2E44WcWBZey/ZvUc6sERLTxKdyCu4gZFmUbk1Q7A== - dependencies: - type "^2.0.0" - -extend-shallow@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/extend-shallow/-/extend-shallow-2.0.1.tgz#51af7d614ad9a9f610ea1bafbb989d6b1c56890f" - integrity sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8= - dependencies: - is-extendable "^0.1.0" - -extend-shallow@^3.0.0, extend-shallow@^3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/extend-shallow/-/extend-shallow-3.0.2.tgz#26a71aaf073b39fb2127172746131c2704028db8" - integrity sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg= - dependencies: - assign-symbols "^1.0.0" - is-extendable "^1.0.1" - -extend@^3.0.0, extend@~3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.2.tgz#f8b1136b4071fbd8eb140aff858b1019ec2915fa" - integrity sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g== - -extglob@^2.0.4: - version "2.0.4" - resolved "https://registry.yarnpkg.com/extglob/-/extglob-2.0.4.tgz#ad00fe4dc612a9232e8718711dc5cb5ab0285543" - integrity sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw== - dependencies: - array-unique "^0.3.2" - define-property "^1.0.0" - expand-brackets "^2.1.4" - extend-shallow "^2.0.1" - fragment-cache "^0.2.1" - regex-not "^1.0.0" - snapdragon "^0.8.1" - to-regex "^3.0.1" - -extsprintf@1.3.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.3.0.tgz#96918440e3041a7a414f8c52e3c574eb3c3e1e05" - integrity sha1-lpGEQOMEGnpBT4xS48V06zw+HgU= - -extsprintf@^1.2.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.4.0.tgz#e2689f8f356fad62cca65a3a91c5df5f9551692f" - integrity sha1-4mifjzVvrWLMplo6kcXfX5VRaS8= - -fake-merkle-patricia-tree@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/fake-merkle-patricia-tree/-/fake-merkle-patricia-tree-1.0.1.tgz#4b8c3acfb520afadf9860b1f14cd8ce3402cddd3" - integrity sha1-S4w6z7Ugr635hgsfFM2M40As3dM= - dependencies: - checkpoint-store "^1.1.0" - -fancy-log@^1.3.2: - version "1.3.3" - resolved "https://registry.yarnpkg.com/fancy-log/-/fancy-log-1.3.3.tgz#dbc19154f558690150a23953a0adbd035be45fc7" - integrity sha512-k9oEhlyc0FrVh25qYuSELjr8oxsCoc4/LEZfg2iJJrfEk/tZL9bCoJE47gqAvI2m/AUjluCS4+3I0eTx8n3AEw== - dependencies: - ansi-gray "^0.1.1" - color-support "^1.1.3" - parse-node-version "^1.0.0" - time-stamp "^1.0.0" - -fast-deep-equal@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz#7b05218ddf9667bf7f370bf7fdb2cb15fdd0aa49" - integrity sha1-ewUhjd+WZ79/Nwv3/bLLFf3Qqkk= - -fast-deep-equal@^3.1.1: - version "3.1.3" - resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz#3a7d56b559d6cbc3eb512325244e619a65c6c525" - integrity sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q== - -fast-glob@^3.2.2: - version "3.2.2" - resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.2.2.tgz#ade1a9d91148965d4bf7c51f72e1ca662d32e63d" - integrity sha512-UDV82o4uQyljznxwMxyVRJgZZt3O5wENYojjzbaGEGZgeOxkLFf+V4cnUD+krzb2F72E18RhamkMZ7AdeggF7A== - dependencies: - "@nodelib/fs.stat" "^2.0.2" - "@nodelib/fs.walk" "^1.2.3" - glob-parent "^5.1.0" - merge2 "^1.3.0" - micromatch "^4.0.2" - picomatch "^2.2.1" - -fast-json-stable-stringify@2.x: - version "2.1.0" - resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz#874bf69c6f404c2b5d99c481341399fd55892633" - integrity sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw== - -fast-json-stable-stringify@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz#d5142c0caee6b1189f87d3a76111064f86c8bbf2" - integrity sha1-1RQsDK7msRifh9OnYREGT4bIu/I= - -fast-levenshtein@~2.0.6: - version "2.0.6" - resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917" - integrity sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc= - -fast-safe-stringify@^2.0.6: - version "2.0.7" - resolved "https://registry.yarnpkg.com/fast-safe-stringify/-/fast-safe-stringify-2.0.7.tgz#124aa885899261f68aedb42a7c080de9da608743" - integrity sha512-Utm6CdzT+6xsDk2m8S6uL8VHxNwI6Jub+e9NYTcAms28T84pTa25GJQV9j0CY0N1rM8hK4x6grpF2BQf+2qwVA== - -fastq@^1.6.0: - version "1.7.0" - resolved "https://registry.yarnpkg.com/fastq/-/fastq-1.7.0.tgz#fcd79a08c5bd7ec5b55cd3f5c4720db551929801" - integrity sha512-YOadQRnHd5q6PogvAR/x62BGituF2ufiEA6s8aavQANw5YKHERI4AREboX6KotzP8oX2klxYF2wcV/7bn1clfQ== - dependencies: - reusify "^1.0.4" - -fb-watchman@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/fb-watchman/-/fb-watchman-2.0.1.tgz#fc84fb39d2709cf3ff6d743706157bb5708a8a85" - integrity sha512-DkPJKQeY6kKwmuMretBhr7G6Vodr7bFwDYTXIkfG1gjvNpaxBTQV3PbXg6bR1c1UP4jPOX0jHUbbHANL9vRjVg== - dependencies: - bser "2.1.1" - -fd-slicer@~1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/fd-slicer/-/fd-slicer-1.1.0.tgz#25c7c89cb1f9077f8891bbe61d8f390eae256f1e" - integrity sha1-JcfInLH5B3+IkbvmHY85Dq4lbx4= - dependencies: - pend "~1.2.0" - -fetch-ponyfill@^4.0.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/fetch-ponyfill/-/fetch-ponyfill-4.1.0.tgz#ae3ce5f732c645eab87e4ae8793414709b239893" - integrity sha1-rjzl9zLGReq4fkroeTQUcJsjmJM= - dependencies: - node-fetch "~1.7.1" - -figgy-pudding@^3.5.1: - version "3.5.1" - resolved "https://registry.yarnpkg.com/figgy-pudding/-/figgy-pudding-3.5.1.tgz#862470112901c727a0e495a80744bd5baa1d6790" - integrity sha512-vNKxJHTEKNThjfrdJwHc7brvM6eVevuO5nTj6ez8ZQ1qbXTvGthucRF7S4vf2cr71QVnT70V34v0S1DyQsti0w== - -file-type@^3.8.0: - version "3.9.0" - resolved "https://registry.yarnpkg.com/file-type/-/file-type-3.9.0.tgz#257a078384d1db8087bc449d107d52a52672b9e9" - integrity sha1-JXoHg4TR24CHvESdEH1SpSZyuek= - -file-type@^5.2.0: - version "5.2.0" - resolved "https://registry.yarnpkg.com/file-type/-/file-type-5.2.0.tgz#2ddbea7c73ffe36368dfae49dc338c058c2b8ad6" - integrity sha1-LdvqfHP/42No365J3DOMBYwritY= - -file-type@^6.1.0: - version "6.2.0" - resolved "https://registry.yarnpkg.com/file-type/-/file-type-6.2.0.tgz#e50cd75d356ffed4e306dc4f5bcf52a79903a919" - integrity sha512-YPcTBDV+2Tm0VqjybVd32MHdlEGAtuxS3VAYsumFokDSMG+ROT5wawGlnHDoz7bfMcMDt9hxuXvXwoKUx2fkOg== - -file-uri-to-path@1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz#553a7b8446ff6f684359c445f1e37a05dacc33dd" - integrity sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw== - -filesize@^3.6.1: - version "3.6.1" - resolved "https://registry.yarnpkg.com/filesize/-/filesize-3.6.1.tgz#090bb3ee01b6f801a8a8be99d31710b3422bb317" - integrity sha512-7KjR1vv6qnicaPMi1iiTcI85CyYwRO/PSFCu6SvqL8jN2Wjt/NIYQTFtFs7fSDCYOstUkEWIQGFUg5YZQfjlcg== - -fill-range@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-4.0.0.tgz#d544811d428f98eb06a63dc402d2403c328c38f7" - integrity sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc= - dependencies: - extend-shallow "^2.0.1" - is-number "^3.0.0" - repeat-string "^1.6.1" - to-regex-range "^2.1.0" - -fill-range@^7.0.1: - version "7.0.1" - resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-7.0.1.tgz#1919a6a7c75fe38b2c7c77e5198535da9acdda40" - integrity sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ== - dependencies: - to-regex-range "^5.0.1" - -finalhandler@~1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/finalhandler/-/finalhandler-1.1.2.tgz#b7e7d000ffd11938d0fdb053506f6ebabe9f587d" - integrity sha512-aAWcW57uxVNrQZqFXjITpW3sIUQmHGG3qSb9mUah9MgMC4NeWhNOlNjXEYq3HjRAvL6arUviZGGJsBg6z0zsWA== - dependencies: - debug "2.6.9" - encodeurl "~1.0.2" - escape-html "~1.0.3" - on-finished "~2.3.0" - parseurl "~1.3.3" - statuses "~1.5.0" - unpipe "~1.0.0" - -find-cache-dir@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/find-cache-dir/-/find-cache-dir-2.1.0.tgz#8d0f94cd13fe43c6c7c261a0d86115ca918c05f7" - integrity sha512-Tq6PixE0w/VMFfCgbONnkiQIVol/JJL7nRMi20fqzA4NRs9AfeqMGeRdPi3wIhYkxjeBaWh2rxwapn5Tu3IqOQ== - dependencies: - commondir "^1.0.1" - make-dir "^2.0.0" - pkg-dir "^3.0.0" - -find-up@^1.0.0: - version "1.1.2" - resolved "https://registry.yarnpkg.com/find-up/-/find-up-1.1.2.tgz#6b2e9822b1a2ce0a60ab64d610eccad53cb24d0f" - integrity sha1-ay6YIrGizgpgq2TWEOzK1TyyTQ8= - dependencies: - path-exists "^2.0.0" - pinkie-promise "^2.0.0" - -find-up@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/find-up/-/find-up-2.1.0.tgz#45d1b7e506c717ddd482775a2b77920a3c0c57a7" - integrity sha1-RdG35QbHF93UgndaK3eSCjwMV6c= - dependencies: - locate-path "^2.0.0" - -find-up@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/find-up/-/find-up-3.0.0.tgz#49169f1d7993430646da61ecc5ae355c21c97b73" - integrity sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg== - dependencies: - locate-path "^3.0.0" - -findup-sync@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/findup-sync/-/findup-sync-2.0.0.tgz#9326b1488c22d1a6088650a86901b2d9a90a2cbc" - integrity sha1-kyaxSIwi0aYIhlCoaQGy2akKLLw= - dependencies: - detect-file "^1.0.0" - is-glob "^3.1.0" - micromatch "^3.0.4" - resolve-dir "^1.0.1" - -findup-sync@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/findup-sync/-/findup-sync-3.0.0.tgz#17b108f9ee512dfb7a5c7f3c8b27ea9e1a9c08d1" - integrity sha512-YbffarhcicEhOrm4CtrwdKBdCuz576RLdhJDsIfvNtxUuhdRet1qZcsMjqbePtAseKdAnDyM/IyXbu7PRPRLYg== - dependencies: - detect-file "^1.0.0" - is-glob "^4.0.0" - micromatch "^3.0.4" - resolve-dir "^1.0.1" - -fined@^1.0.1: - version "1.2.0" - resolved "https://registry.yarnpkg.com/fined/-/fined-1.2.0.tgz#d00beccf1aa2b475d16d423b0238b713a2c4a37b" - integrity sha512-ZYDqPLGxDkDhDZBjZBb+oD1+j0rA4E0pXY50eplAAOPg2N/gUBSSk5IM1/QhPfyVo19lJ+CvXpqfvk+b2p/8Ng== - dependencies: - expand-tilde "^2.0.2" - is-plain-object "^2.0.3" - object.defaults "^1.1.0" - object.pick "^1.2.0" - parse-filepath "^1.0.1" - -flagged-respawn@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/flagged-respawn/-/flagged-respawn-1.0.1.tgz#e7de6f1279ddd9ca9aac8a5971d618606b3aab41" - integrity sha512-lNaHNVymajmk0OJMBn8fVUAU1BtDeKIqKoVhk4xAALB57aALg6b4W0MfJ/cUE0g9YBXy5XhSlPIpYIJ7HaY/3Q== - -flow-stoplight@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/flow-stoplight/-/flow-stoplight-1.0.0.tgz#4a292c5bcff8b39fa6cc0cb1a853d86f27eeff7b" - integrity sha1-SiksW8/4s5+mzAyxqFPYbyfu/3s= - -flush-write-stream@^1.0.0, flush-write-stream@^1.0.2: - version "1.1.1" - resolved "https://registry.yarnpkg.com/flush-write-stream/-/flush-write-stream-1.1.1.tgz#8dd7d873a1babc207d94ead0c2e0e44276ebf2e8" - integrity sha512-3Z4XhFZ3992uIq0XOqb9AreonueSYphE6oYbpt5+3u06JWklbsPkNv3ZKkP9Bz/r+1MWCaMoSQ28P85+1Yc77w== - dependencies: - inherits "^2.0.3" - readable-stream "^2.3.6" - -for-each@~0.3.3: - version "0.3.3" - resolved "https://registry.yarnpkg.com/for-each/-/for-each-0.3.3.tgz#69b447e88a0a5d32c3e7084f3f1710034b21376e" - integrity sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw== - dependencies: - is-callable "^1.1.3" - -for-in@^1.0.1, for-in@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/for-in/-/for-in-1.0.2.tgz#81068d295a8142ec0ac726c6e2200c30fb6d5e80" - integrity sha1-gQaNKVqBQuwKxybG4iAMMPttXoA= - -for-own@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/for-own/-/for-own-1.0.0.tgz#c63332f415cedc4b04dbfe70cf836494c53cb44b" - integrity sha1-xjMy9BXO3EsE2/5wz4NklMU8tEs= - dependencies: - for-in "^1.0.1" - -forever-agent@~0.6.1: - version "0.6.1" - resolved "https://registry.yarnpkg.com/forever-agent/-/forever-agent-0.6.1.tgz#fbc71f0c41adeb37f96c577ad1ed42d8fdacca91" - integrity sha1-+8cfDEGt6zf5bFd60e1C2P2sypE= - -form-data@~2.3.2: - version "2.3.3" - resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.3.3.tgz#dcce52c05f644f298c6a7ab936bd724ceffbf3a6" - integrity sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ== - dependencies: - asynckit "^0.4.0" - combined-stream "^1.0.6" - mime-types "^2.1.12" - -forwarded@~0.1.2: - version "0.1.2" - resolved "https://registry.yarnpkg.com/forwarded/-/forwarded-0.1.2.tgz#98c23dab1175657b8c0573e8ceccd91b0ff18c84" - integrity sha1-mMI9qxF1ZXuMBXPozszZGw/xjIQ= - -fragment-cache@^0.2.1: - version "0.2.1" - resolved "https://registry.yarnpkg.com/fragment-cache/-/fragment-cache-0.2.1.tgz#4290fad27f13e89be7f33799c6bc5a0abfff0d19" - integrity sha1-QpD60n8T6Jvn8zeZxrxaCr//DRk= - dependencies: - map-cache "^0.2.2" - -fresh@0.5.2: - version "0.5.2" - resolved "https://registry.yarnpkg.com/fresh/-/fresh-0.5.2.tgz#3d8cadd90d976569fa835ab1f8e4b23a105605a7" - integrity sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac= - -from2@^2.1.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/from2/-/from2-2.3.0.tgz#8bfb5502bde4a4d36cfdeea007fcca21d7e382af" - integrity sha1-i/tVAr3kpNNs/e6gB/zKIdfjgq8= - dependencies: - inherits "^2.0.1" - readable-stream "^2.0.0" - -fs-constants@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/fs-constants/-/fs-constants-1.0.0.tgz#6be0de9be998ce16af8afc24497b9ee9b7ccd9ad" - integrity sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow== - -fs-extra@^0.30.0: - version "0.30.0" - resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-0.30.0.tgz#f233ffcc08d4da7d432daa449776989db1df93f0" - integrity sha1-8jP/zAjU2n1DLapEl3aYnbHfk/A= - dependencies: - graceful-fs "^4.1.2" - jsonfile "^2.1.0" - klaw "^1.0.0" - path-is-absolute "^1.0.0" - rimraf "^2.2.8" - -fs-extra@^4.0.2: - version "4.0.3" - resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-4.0.3.tgz#0d852122e5bc5beb453fb028e9c0c9bf36340c94" - integrity sha512-q6rbdDd1o2mAnQreO7YADIxf/Whx4AHBiRf6d+/cVT8h44ss+lHgxf1FemcqDnQt9X3ct4McHr+JMGlYSsK7Cg== - dependencies: - graceful-fs "^4.1.2" - jsonfile "^4.0.0" - universalify "^0.1.0" - -fs-minipass@^1.2.5: - version "1.2.7" - resolved "https://registry.yarnpkg.com/fs-minipass/-/fs-minipass-1.2.7.tgz#ccff8570841e7fe4265693da88936c55aed7f7c7" - integrity sha512-GWSSJGFy4e9GUeCcbIkED+bgAoFyj7XF1mV8rma3QW4NIqX9Kyx79N/PF61H5udOV3aY1IaMLs6pGbH71nlCTA== - dependencies: - minipass "^2.6.0" - -fs-mkdirp-stream@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/fs-mkdirp-stream/-/fs-mkdirp-stream-1.0.0.tgz#0b7815fc3201c6a69e14db98ce098c16935259eb" - integrity sha1-C3gV/DIBxqaeFNuYzgmMFpNSWes= - dependencies: - graceful-fs "^4.1.11" - through2 "^2.0.3" - -fs-write-stream-atomic@^1.0.8: - version "1.0.10" - resolved "https://registry.yarnpkg.com/fs-write-stream-atomic/-/fs-write-stream-atomic-1.0.10.tgz#b47df53493ef911df75731e70a9ded0189db40c9" - integrity sha1-tH31NJPvkR33VzHnCp3tAYnbQMk= - dependencies: - graceful-fs "^4.1.2" - iferr "^0.1.5" - imurmurhash "^0.1.4" - readable-stream "1 || 2" - -fs.realpath@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" - integrity sha1-FQStJSMVjKpA20onh8sBQRmU6k8= - -fsevents@^1.2.7: - version "1.2.9" - resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-1.2.9.tgz#3f5ed66583ccd6f400b5a00db6f7e861363e388f" - integrity sha512-oeyj2H3EjjonWcFjD5NvZNE9Rqe4UW+nQBU2HNeKw0koVLEFIhtyETyAakeAM3de7Z/SW5kcA+fZUait9EApnw== - dependencies: - nan "^2.12.1" - node-pre-gyp "^0.12.0" - -fsevents@~2.1.1: - version "2.1.2" - resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.1.2.tgz#4c0a1fb34bc68e543b4b82a9ec392bfbda840805" - integrity sha512-R4wDiBwZ0KzpgOWetKDug1FZcYhqYnUYKtfZYt4mD5SBz76q0KR4Q9o7GIPamsVPGmW3EYPPJ0dOOjvx32ldZA== - -fsevents@~2.1.2: - version "2.1.3" - resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.1.3.tgz#fb738703ae8d2f9fe900c33836ddebee8b97f23e" - integrity sha512-Auw9a4AxqWpa9GUfj370BMPzzyncfBABW8Mab7BGWBYDj4Isgq+cDKtx0i6u9jcX9pQDnswsaaOTgTmA5pEjuQ== - -function-bind@^1.0.2, function-bind@^1.1.1, function-bind@~1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d" - integrity sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A== - -functional-red-black-tree@^1.0.1, functional-red-black-tree@~1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz#1b0ab3bd553b2a0d6399d29c0e3ea0b252078327" - integrity sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc= - -ganache-core@^2.10.2, ganache-core@^2.13.2, ganache-core@^2.6.0, "ganache-core@github:compound-finance/ganache-core.git#jflatow/unbreak-fork": - version "2.10.2" - resolved "https://codeload.github.com/compound-finance/ganache-core/tar.gz/4c7e063f6d423e1b3850f4cb328029e819670a64" - dependencies: - abstract-leveldown "3.0.0" - async "2.6.2" - bip39 "2.5.0" - cachedown "1.0.0" - clone "2.1.2" - debug "3.2.6" - encoding-down "5.0.4" - eth-sig-util "2.3.0" - ethereumjs-abi "0.6.7" - ethereumjs-account "3.0.0" - ethereumjs-block "2.2.2" - ethereumjs-common "1.5.0" - ethereumjs-tx "2.1.2" - ethereumjs-util "6.2.0" - ethereumjs-vm "4.1.3" - heap "0.2.6" - level-sublevel "6.6.4" - levelup "3.1.1" - lodash "4.17.14" - merkle-patricia-tree "2.3.2" - seedrandom "3.0.1" - source-map-support "0.5.12" - tmp "0.1.0" - web3-provider-engine "14.2.1" - websocket "1.0.29" - optionalDependencies: - ethereumjs-wallet "0.6.3" - web3 "1.2.4" - -gauge@~2.7.3: - version "2.7.4" - resolved "https://registry.yarnpkg.com/gauge/-/gauge-2.7.4.tgz#2c03405c7538c39d7eb37b317022e325fb018bf7" - integrity sha1-LANAXHU4w51+s3sxcCLjJfsBi/c= - dependencies: - aproba "^1.0.3" - console-control-strings "^1.0.0" - has-unicode "^2.0.0" - object-assign "^4.1.0" - signal-exit "^3.0.0" - string-width "^1.0.1" - strip-ansi "^3.0.1" - wide-align "^1.1.0" - -get-caller-file@^1.0.1: - version "1.0.3" - resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-1.0.3.tgz#f978fa4c90d1dfe7ff2d6beda2a515e713bdcf4a" - integrity sha512-3t6rVToeoZfYSGd8YoLFR2DJkiQrIiUrGcjvFX2mDw3bn6k2OtwHN0TNCLbBO+w8qTvimhDkv+LSscbJY1vE6w== - -get-caller-file@^2.0.1: - version "2.0.5" - resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-2.0.5.tgz#4f94412a82db32f36e3b0b9741f8a97feb031f7e" - integrity sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg== - -get-func-name@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/get-func-name/-/get-func-name-2.0.0.tgz#ead774abee72e20409433a066366023dd6887a41" - integrity sha1-6td0q+5y4gQJQzoGY2YCPdaIekE= - -get-stream@^2.2.0: - version "2.3.1" - resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-2.3.1.tgz#5f38f93f346009666ee0150a054167f91bdd95de" - integrity sha1-Xzj5PzRgCWZu4BUKBUFn+Rvdld4= - dependencies: - object-assign "^4.0.1" - pinkie-promise "^2.0.0" - -get-stream@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-3.0.0.tgz#8e943d1358dc37555054ecbe2edb05aa174ede14" - integrity sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ= - -get-stream@^4.0.0, get-stream@^4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-4.1.0.tgz#c1b255575f3dc21d59bfc79cd3d2b46b1c3a54b5" - integrity sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w== - dependencies: - pump "^3.0.0" - -get-stream@^5.1.0: - version "5.1.0" - resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-5.1.0.tgz#01203cdc92597f9b909067c3e656cc1f4d3c4dc9" - integrity sha512-EXr1FOzrzTfGeL0gQdeFEvOMm2mzMOglyiOXSTpPC+iAjAKftbr3jpCMWynogwYnM+eSj9sHGc6wjIcDvYiygw== - dependencies: - pump "^3.0.0" - -get-value@^2.0.3, get-value@^2.0.6: - version "2.0.6" - resolved "https://registry.yarnpkg.com/get-value/-/get-value-2.0.6.tgz#dc15ca1c672387ca76bd37ac0a395ba2042a2c28" - integrity sha1-3BXKHGcjh8p2vTesCjlbogQqLCg= - -getpass@^0.1.1: - version "0.1.7" - resolved "https://registry.yarnpkg.com/getpass/-/getpass-0.1.7.tgz#5eff8e3e684d569ae4cb2b1282604e8ba62149fa" - integrity sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo= - dependencies: - assert-plus "^1.0.0" - -github-from-package@0.0.0: - version "0.0.0" - resolved "https://registry.yarnpkg.com/github-from-package/-/github-from-package-0.0.0.tgz#97fb5d96bfde8973313f20e8288ef9a167fa64ce" - integrity sha1-l/tdlr/eiXMxPyDoKI75oWf6ZM4= - -glob-parent@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-3.1.0.tgz#9e6af6299d8d3bd2bd40430832bd113df906c5ae" - integrity sha1-nmr2KZ2NO9K9QEMIMr0RPfkGxa4= - dependencies: - is-glob "^3.1.0" - path-dirname "^1.0.0" - -glob-parent@^5.1.0: - version "5.1.1" - resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.1.tgz#b6c1ef417c4e5663ea498f1c45afac6916bbc229" - integrity sha512-FnI+VGOpnlGHWZxthPGR+QhR78fuiK0sNLkHQv+bL9fQi57lNNdquIbna/WrfROrolq8GK5Ek6BiMwqL/voRYQ== - dependencies: - is-glob "^4.0.1" - -glob-parent@~5.1.0: - version "5.1.0" - resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.0.tgz#5f4c1d1e748d30cd73ad2944b3577a81b081e8c2" - integrity sha512-qjtRgnIVmOfnKUE3NJAQEdk+lKrxfw8t5ke7SXtfMTHcjsBfOfWXCQfdb30zfDoZQ2IRSIiidmjtbHZPZ++Ihw== - dependencies: - is-glob "^4.0.1" - -glob-stream@^6.1.0: - version "6.1.0" - resolved "https://registry.yarnpkg.com/glob-stream/-/glob-stream-6.1.0.tgz#7045c99413b3eb94888d83ab46d0b404cc7bdde4" - integrity sha1-cEXJlBOz65SIjYOrRtC0BMx73eQ= - dependencies: - extend "^3.0.0" - glob "^7.1.1" - glob-parent "^3.1.0" - is-negated-glob "^1.0.0" - ordered-read-streams "^1.0.0" - pumpify "^1.3.5" - readable-stream "^2.1.5" - remove-trailing-separator "^1.0.1" - to-absolute-glob "^2.0.0" - unique-stream "^2.0.2" - -glob-watcher@^5.0.3: - version "5.0.3" - resolved "https://registry.yarnpkg.com/glob-watcher/-/glob-watcher-5.0.3.tgz#88a8abf1c4d131eb93928994bc4a593c2e5dd626" - integrity sha512-8tWsULNEPHKQ2MR4zXuzSmqbdyV5PtwwCaWSGQ1WwHsJ07ilNeN1JB8ntxhckbnpSHaf9dXFUHzIWvm1I13dsg== - dependencies: - anymatch "^2.0.0" - async-done "^1.2.0" - chokidar "^2.0.0" - is-negated-glob "^1.0.0" - just-debounce "^1.0.0" - object.defaults "^1.1.0" - -glob@7.1.2: - version "7.1.2" - resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.2.tgz#c19c9df9a028702d678612384a6552404c636d15" - integrity sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ== - dependencies: - fs.realpath "^1.0.0" - inflight "^1.0.4" - inherits "2" - minimatch "^3.0.4" - once "^1.3.0" - path-is-absolute "^1.0.0" - -glob@^5.0.15: - version "5.0.15" - resolved "https://registry.yarnpkg.com/glob/-/glob-5.0.15.tgz#1bc936b9e02f4a603fcc222ecf7633d30b8b93b1" - integrity sha1-G8k2ueAvSmA/zCIuz3Yz0wuLk7E= - dependencies: - inflight "^1.0.4" - inherits "2" - minimatch "2 || 3" - once "^1.3.0" - path-is-absolute "^1.0.0" - -glob@^7.1.1, glob@^7.1.2, glob@^7.1.3, glob@^7.1.4, glob@~7.1.4: - version "7.1.6" - resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.6.tgz#141f33b81a7c2492e125594307480c46679278a6" - integrity sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA== - dependencies: - fs.realpath "^1.0.0" - inflight "^1.0.4" - inherits "2" - minimatch "^3.0.4" - once "^1.3.0" - path-is-absolute "^1.0.0" - -global-modules@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/global-modules/-/global-modules-1.0.0.tgz#6d770f0eb523ac78164d72b5e71a8877265cc3ea" - integrity sha512-sKzpEkf11GpOFuw0Zzjzmt4B4UZwjOcG757PPvrfhxcLFbq0wpsgpOqxpxtxFiCG4DtG93M6XRVbF2oGdev7bg== - dependencies: - global-prefix "^1.0.1" - is-windows "^1.0.1" - resolve-dir "^1.0.0" - -global-modules@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/global-modules/-/global-modules-2.0.0.tgz#997605ad2345f27f51539bea26574421215c7780" - integrity sha512-NGbfmJBp9x8IxyJSd1P+otYK8vonoJactOogrVfFRIAEY1ukil8RSKDz2Yo7wh1oihl51l/r6W4epkeKJHqL8A== - dependencies: - global-prefix "^3.0.0" - -global-prefix@^1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/global-prefix/-/global-prefix-1.0.2.tgz#dbf743c6c14992593c655568cb66ed32c0122ebe" - integrity sha1-2/dDxsFJklk8ZVVoy2btMsASLr4= - dependencies: - expand-tilde "^2.0.2" - homedir-polyfill "^1.0.1" - ini "^1.3.4" - is-windows "^1.0.1" - which "^1.2.14" - -global-prefix@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/global-prefix/-/global-prefix-3.0.0.tgz#fc85f73064df69f50421f47f883fe5b913ba9b97" - integrity sha512-awConJSVCHVGND6x3tmMaKcQvwXLhjdkmomy2W+Goaui8YPgYgXJZewhg3fWC+DlfqqQuWg8AwqjGTD2nAPVWg== - dependencies: - ini "^1.3.5" - kind-of "^6.0.2" - which "^1.3.1" - -global@~4.3.0: - version "4.3.2" - resolved "https://registry.yarnpkg.com/global/-/global-4.3.2.tgz#e76989268a6c74c38908b1305b10fc0e394e9d0f" - integrity sha1-52mJJopsdMOJCLEwWxD8DjlOnQ8= - dependencies: - min-document "^2.19.0" - process "~0.5.1" - -globals@^11.1.0: - version "11.12.0" - resolved "https://registry.yarnpkg.com/globals/-/globals-11.12.0.tgz#ab8795338868a0babd8525758018c2a7eb95c42e" - integrity sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA== - -globals@^9.18.0: - version "9.18.0" - resolved "https://registry.yarnpkg.com/globals/-/globals-9.18.0.tgz#aa3896b3e69b487f17e31ed2143d69a8e30c2d8a" - integrity sha512-S0nG3CLEQiY/ILxqtztTWH/3iRRdyBLw6KMDxnKMchrtbj2OFmehVh0WUCfW3DUrIgx/qFrJPICrq4Z4sTR9UQ== - -glogg@^1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/glogg/-/glogg-1.0.2.tgz#2d7dd702beda22eb3bffadf880696da6d846313f" - integrity sha512-5mwUoSuBk44Y4EshyiqcH95ZntbDdTQqA3QYSrxmzj28Ai0vXBGMH1ApSANH14j2sIRtqCEyg6PfsuP7ElOEDA== - dependencies: - sparkles "^1.0.0" - -got@9.6.0: - version "9.6.0" - resolved "https://registry.yarnpkg.com/got/-/got-9.6.0.tgz#edf45e7d67f99545705de1f7bbeeeb121765ed85" - integrity sha512-R7eWptXuGYxwijs0eV+v3o6+XH1IqVK8dJOEecQfTmkncw9AV4dcw/Dhxi8MdlqPthxxpZyizMzyg8RTmEsG+Q== - dependencies: - "@sindresorhus/is" "^0.14.0" - "@szmarczak/http-timer" "^1.1.2" - cacheable-request "^6.0.0" - decompress-response "^3.3.0" - duplexer3 "^0.1.4" - get-stream "^4.1.0" - lowercase-keys "^1.0.1" - mimic-response "^1.0.1" - p-cancelable "^1.0.0" - to-readable-stream "^1.0.0" - url-parse-lax "^3.0.0" - -got@^7.1.0: - version "7.1.0" - resolved "https://registry.yarnpkg.com/got/-/got-7.1.0.tgz#05450fd84094e6bbea56f451a43a9c289166385a" - integrity sha512-Y5WMo7xKKq1muPsxD+KmrR8DH5auG7fBdDVueZwETwV6VytKyU9OX/ddpq2/1hp1vIPvVb4T81dKQz3BivkNLw== - dependencies: - decompress-response "^3.2.0" - duplexer3 "^0.1.4" - get-stream "^3.0.0" - is-plain-obj "^1.1.0" - is-retry-allowed "^1.0.0" - is-stream "^1.0.0" - isurl "^1.0.0-alpha5" - lowercase-keys "^1.0.0" - p-cancelable "^0.3.0" - p-timeout "^1.1.1" - safe-buffer "^5.0.1" - timed-out "^4.0.0" - url-parse-lax "^1.0.0" - url-to-options "^1.0.1" - -graceful-fs@^4.0.0, graceful-fs@^4.1.10, graceful-fs@^4.1.11, graceful-fs@^4.1.15, graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.1.9: - version "4.2.3" - resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.3.tgz#4a12ff1b60376ef09862c2093edd908328be8423" - integrity sha512-a30VEBm4PEdx1dRB7MFK7BejejvCvBronbLjht+sHuGYj8PHs7M/5Z+rt5lw551vZ7yfTCj4Vuyy3mSJytDWRQ== - -"graceful-readlink@>= 1.0.0": - version "1.0.1" - resolved "https://registry.yarnpkg.com/graceful-readlink/-/graceful-readlink-1.0.1.tgz#4cafad76bc62f02fa039b2f94e9a3dd3a391a725" - integrity sha1-TK+tdrxi8C+gObL5Tpo906ORpyU= - -growl@1.10.3: - version "1.10.3" - resolved "https://registry.yarnpkg.com/growl/-/growl-1.10.3.tgz#1926ba90cf3edfe2adb4927f5880bc22c66c790f" - integrity sha512-hKlsbA5Vu3xsh1Cg3J7jSmX/WaW6A5oBeqzM88oNbCRQFz+zUaXm6yxS4RVytp1scBoJzSYl4YAEOQIt6O8V1Q== - -growly@^1.3.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/growly/-/growly-1.3.0.tgz#f10748cbe76af964b7c96c93c6bcc28af120c081" - integrity sha1-8QdIy+dq+WS3yWyTxrzCivEgwIE= - -gulp-cli@^2.2.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/gulp-cli/-/gulp-cli-2.2.0.tgz#5533126eeb7fe415a7e3e84a297d334d5cf70ebc" - integrity sha512-rGs3bVYHdyJpLqR0TUBnlcZ1O5O++Zs4bA0ajm+zr3WFCfiSLjGwoCBqFs18wzN+ZxahT9DkOK5nDf26iDsWjA== - dependencies: - ansi-colors "^1.0.1" - archy "^1.0.0" - array-sort "^1.0.0" - color-support "^1.1.3" - concat-stream "^1.6.0" - copy-props "^2.0.1" - fancy-log "^1.3.2" - gulplog "^1.0.0" - interpret "^1.1.0" - isobject "^3.0.1" - liftoff "^3.1.0" - matchdep "^2.0.0" - mute-stdout "^1.0.0" - pretty-hrtime "^1.0.0" - replace-homedir "^1.0.0" - semver-greatest-satisfied-range "^1.1.0" - v8flags "^3.0.1" - yargs "^7.1.0" - -gulp@^4.0.2: - version "4.0.2" - resolved "https://registry.yarnpkg.com/gulp/-/gulp-4.0.2.tgz#543651070fd0f6ab0a0650c6a3e6ff5a7cb09caa" - integrity sha512-dvEs27SCZt2ibF29xYgmnwwCYZxdxhQ/+LFWlbAW8y7jt68L/65402Lz3+CKy0Ov4rOs+NERmDq7YlZaDqUIfA== - dependencies: - glob-watcher "^5.0.3" - gulp-cli "^2.2.0" - undertaker "^1.2.1" - vinyl-fs "^3.0.0" - -gulplog@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/gulplog/-/gulplog-1.0.0.tgz#e28c4d45d05ecbbed818363ce8f9c5926229ffe5" - integrity sha1-4oxNRdBey77YGDY86PnFkmIp/+U= - dependencies: - glogg "^1.0.0" - -gzip-size@^5.0.0: - version "5.1.1" - resolved "https://registry.yarnpkg.com/gzip-size/-/gzip-size-5.1.1.tgz#cb9bee692f87c0612b232840a873904e4c135274" - integrity sha512-FNHi6mmoHvs1mxZAds4PpdCS6QG8B4C1krxJsMutgxl5t3+GlRTzzI3NEkifXx2pVsOvJdOGSmIgDhQ55FwdPA== - dependencies: - duplexer "^0.1.1" - pify "^4.0.1" - -handlebars@^4.0.1, handlebars@^4.1.2: - version "4.5.3" - resolved "https://registry.yarnpkg.com/handlebars/-/handlebars-4.5.3.tgz#5cf75bd8714f7605713511a56be7c349becb0482" - integrity sha512-3yPecJoJHK/4c6aZhSvxOyG4vJKDshV36VHp0iVCDVh7o9w2vwi3NSnL2MMPj3YdduqaBcu7cGbggJQM0br9xA== - dependencies: - neo-async "^2.6.0" - optimist "^0.6.1" - source-map "^0.6.1" - optionalDependencies: - uglify-js "^3.1.4" - -har-schema@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/har-schema/-/har-schema-2.0.0.tgz#a94c2224ebcac04782a0d9035521f24735b7ec92" - integrity sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI= - -har-validator@~5.1.0: - version "5.1.3" - resolved "https://registry.yarnpkg.com/har-validator/-/har-validator-5.1.3.tgz#1ef89ebd3e4996557675eed9893110dc350fa080" - integrity sha512-sNvOCzEQNr/qrvJgc3UG/kD4QtlHycrzwS+6mfTrrSq97BvaYcPZZI1ZSqGSPR73Cxn4LKTD4PttRwfU7jWq5g== - dependencies: - ajv "^6.5.5" - har-schema "^2.0.0" - -har-validator@~5.1.3: - version "5.1.5" - resolved "https://registry.yarnpkg.com/har-validator/-/har-validator-5.1.5.tgz#1f0803b9f8cb20c0fa13822df1ecddb36bde1efd" - integrity sha512-nmT2T0lljbxdQZfspsno9hgrG3Uir6Ks5afism62poxqBM6sDnMEuPmzTq8XN0OEwqKLLdh1jQI3qyE66Nzb3w== - dependencies: - ajv "^6.12.3" - har-schema "^2.0.0" - -has-ansi@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/has-ansi/-/has-ansi-2.0.0.tgz#34f5049ce1ecdf2b0649af3ef24e45ed35416d91" - integrity sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE= - dependencies: - ansi-regex "^2.0.0" - -has-flag@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-1.0.0.tgz#9d9e793165ce017a00f00418c43f942a7b1d11fa" - integrity sha1-nZ55MWXOAXoA8AQYxD+UKnsdEfo= - -has-flag@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-2.0.0.tgz#e8207af1cc7b30d446cc70b734b5e8be18f88d51" - integrity sha1-6CB68cx7MNRGzHC3NLXovhj4jVE= - -has-flag@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd" - integrity sha1-tdRU3CGZriJWmfNGfloH87lVuv0= - -has-flag@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-4.0.0.tgz#944771fd9c81c81265c4d6941860da06bb59479b" - integrity sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ== - -has-symbol-support-x@^1.4.1: - version "1.4.2" - resolved "https://registry.yarnpkg.com/has-symbol-support-x/-/has-symbol-support-x-1.4.2.tgz#1409f98bc00247da45da67cee0a36f282ff26455" - integrity sha512-3ToOva++HaW+eCpgqZrCfN51IPB+7bJNVT6CUATzueB5Heb8o6Nam0V3HG5dlDvZU1Gn5QLcbahiKw/XVk5JJw== - -has-symbols@^1.0.0, has-symbols@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.0.1.tgz#9f5214758a44196c406d9bd76cebf81ec2dd31e8" - integrity sha512-PLcsoqu++dmEIZB+6totNFKq/7Do+Z0u4oT0zKOJNl3lYK6vGwwu2hjHs+68OEZbTjiUE9bgOABXbP/GvrS0Kg== - -has-to-string-tag-x@^1.2.0: - version "1.4.1" - resolved "https://registry.yarnpkg.com/has-to-string-tag-x/-/has-to-string-tag-x-1.4.1.tgz#a045ab383d7b4b2012a00148ab0aa5f290044d4d" - integrity sha512-vdbKfmw+3LoOYVr+mtxHaX5a96+0f3DljYd8JOqvOLsf5mw2Otda2qCDT9qRqLAhrjyQ0h7ual5nOiASpsGNFw== - dependencies: - has-symbol-support-x "^1.4.1" - -has-unicode@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/has-unicode/-/has-unicode-2.0.1.tgz#e0e6fe6a28cf51138855e086d1691e771de2a8b9" - integrity sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk= - -has-value@^0.3.1: - version "0.3.1" - resolved "https://registry.yarnpkg.com/has-value/-/has-value-0.3.1.tgz#7b1f58bada62ca827ec0a2078025654845995e1f" - integrity sha1-ex9YutpiyoJ+wKIHgCVlSEWZXh8= - dependencies: - get-value "^2.0.3" - has-values "^0.1.4" - isobject "^2.0.0" - -has-value@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/has-value/-/has-value-1.0.0.tgz#18b281da585b1c5c51def24c930ed29a0be6b177" - integrity sha1-GLKB2lhbHFxR3vJMkw7SmgvmsXc= - dependencies: - get-value "^2.0.6" - has-values "^1.0.0" - isobject "^3.0.0" - -has-values@^0.1.4: - version "0.1.4" - resolved "https://registry.yarnpkg.com/has-values/-/has-values-0.1.4.tgz#6d61de95d91dfca9b9a02089ad384bff8f62b771" - integrity sha1-bWHeldkd/Km5oCCJrThL/49it3E= - -has-values@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/has-values/-/has-values-1.0.0.tgz#95b0b63fec2146619a6fe57fe75628d5a39efe4f" - integrity sha1-lbC2P+whRmGab+V/51Yo1aOe/k8= - dependencies: - is-number "^3.0.0" - kind-of "^4.0.0" - -has@^1.0.1, has@^1.0.3, has@~1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/has/-/has-1.0.3.tgz#722d7cbfc1f6aa8241f16dd814e011e1f41e8796" - integrity sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw== - dependencies: - function-bind "^1.1.1" - -hash-base@^3.0.0: - version "3.0.4" - resolved "https://registry.yarnpkg.com/hash-base/-/hash-base-3.0.4.tgz#5fc8686847ecd73499403319a6b0a3f3f6ae4918" - integrity sha1-X8hoaEfs1zSZQDMZprCj8/auSRg= - dependencies: - inherits "^2.0.1" - safe-buffer "^5.0.1" - -hash.js@1.1.3: - version "1.1.3" - resolved "https://registry.yarnpkg.com/hash.js/-/hash.js-1.1.3.tgz#340dedbe6290187151c1ea1d777a3448935df846" - integrity sha512-/UETyP0W22QILqS+6HowevwhEFJ3MBJnwTf75Qob9Wz9t0DPuisL8kW8YZMK62dHAKE1c1p+gY1TtOLY+USEHA== - dependencies: - inherits "^2.0.3" - minimalistic-assert "^1.0.0" - -hash.js@1.1.7, hash.js@^1.0.0, hash.js@^1.0.3: - version "1.1.7" - resolved "https://registry.yarnpkg.com/hash.js/-/hash.js-1.1.7.tgz#0babca538e8d4ee4a0f8988d68866537a003cf42" - integrity sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA== - dependencies: - inherits "^2.0.3" - minimalistic-assert "^1.0.1" - -hdkey@^0.7.1: - version "0.7.1" - resolved "https://registry.yarnpkg.com/hdkey/-/hdkey-0.7.1.tgz#caee4be81aa77921e909b8d228dd0f29acaee632" - integrity sha1-yu5L6BqneSHpCbjSKN0PKayu5jI= - dependencies: - coinstring "^2.0.0" - secp256k1 "^3.0.1" - -hdkey@^1.1.0, hdkey@^1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/hdkey/-/hdkey-1.1.1.tgz#c2b3bfd5883ff9529b72f2f08b28be0972a9f64a" - integrity sha512-DvHZ5OuavsfWs5yfVJZestsnc3wzPvLWNk6c2nRUfo6X+OtxypGt20vDDf7Ba+MJzjL3KS1og2nw2eBbLCOUTA== - dependencies: - coinstring "^2.0.0" - safe-buffer "^5.1.1" - secp256k1 "^3.0.1" - -he@1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/he/-/he-1.1.1.tgz#93410fd21b009735151f8868c2f271f3427e23fd" - integrity sha1-k0EP0hsAlzUVH4howvJx80J+I/0= - -heap@0.2.6: - version "0.2.6" - resolved "https://registry.yarnpkg.com/heap/-/heap-0.2.6.tgz#087e1f10b046932fc8594dd9e6d378afc9d1e5ac" - integrity sha1-CH4fELBGky/IWU3Z5tN4r8nR5aw= - -hmac-drbg@^1.0.0, hmac-drbg@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/hmac-drbg/-/hmac-drbg-1.0.1.tgz#d2745701025a6c775a6c545793ed502fc0c649a1" - integrity sha1-0nRXAQJabHdabFRXk+1QL8DGSaE= - dependencies: - hash.js "^1.0.3" - minimalistic-assert "^1.0.0" - minimalistic-crypto-utils "^1.0.1" - -home-or-tmp@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/home-or-tmp/-/home-or-tmp-2.0.0.tgz#e36c3f2d2cae7d746a857e38d18d5f32a7882db8" - integrity sha1-42w/LSyufXRqhX440Y1fMqeILbg= - dependencies: - os-homedir "^1.0.0" - os-tmpdir "^1.0.1" - -homedir-polyfill@^1.0.1: - version "1.0.3" - resolved "https://registry.yarnpkg.com/homedir-polyfill/-/homedir-polyfill-1.0.3.tgz#743298cef4e5af3e194161fbadcc2151d3a058e8" - integrity sha512-eSmmWE5bZTK2Nou4g0AI3zZ9rswp7GRKoKXS1BLUkvPviOqs4YTN1djQIqrXy9k5gEtdLPy86JjRwsNM9tnDcA== - dependencies: - parse-passwd "^1.0.0" - -hoopy@^0.1.4: - version "0.1.4" - resolved "https://registry.yarnpkg.com/hoopy/-/hoopy-0.1.4.tgz#609207d661100033a9a9402ad3dea677381c1b1d" - integrity sha512-HRcs+2mr52W0K+x8RzcLzuPPmVIKMSv97RGHy0Ea9y/mpcaK+xTrjICA04KAHi4GRzxliNqNJEFYWHghy3rSfQ== - -hosted-git-info@^2.1.4, hosted-git-info@^2.6.0: - version "2.8.5" - resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.8.5.tgz#759cfcf2c4d156ade59b0b2dfabddc42a6b9c70c" - integrity sha512-kssjab8CvdXfcXMXVcvsXum4Hwdq9XGtRD3TteMEvEbq0LXyiNQr6AprqKqfeaDXze7SxWvRxdpwE6ku7ikLkg== - -html-encoding-sniffer@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/html-encoding-sniffer/-/html-encoding-sniffer-1.0.2.tgz#e70d84b94da53aa375e11fe3a351be6642ca46f8" - integrity sha512-71lZziiDnsuabfdYiUeWdCVyKuqwWi23L8YeIgV9jSSZHCtb6wB1BKWooH7L3tn4/FuZJMVWyNaIDr4RGmaSYw== - dependencies: - whatwg-encoding "^1.0.1" - -http-cache-semantics@^4.0.0: - version "4.0.3" - resolved "https://registry.yarnpkg.com/http-cache-semantics/-/http-cache-semantics-4.0.3.tgz#495704773277eeef6e43f9ab2c2c7d259dda25c5" - integrity sha512-TcIMG3qeVLgDr1TEd2XvHaTnMPwYQUQMIBLy+5pLSDKYFc7UIqj39w8EGzZkaxoLv/l2K8HaI0t5AVA+YYgUew== - -http-errors@1.7.2: - version "1.7.2" - resolved "https://registry.yarnpkg.com/http-errors/-/http-errors-1.7.2.tgz#4f5029cf13239f31036e5b2e55292bcfbcc85c8f" - integrity sha512-uUQBt3H/cSIVfch6i1EuPNy/YsRSOUBXTVfZ+yR7Zjez3qjBz6i9+i4zjNaoqcoFVI4lQJ5plg63TvGfRSDCRg== - dependencies: - depd "~1.1.2" - inherits "2.0.3" - setprototypeof "1.1.1" - statuses ">= 1.5.0 < 2" - toidentifier "1.0.0" - -http-errors@~1.7.2: - version "1.7.3" - resolved "https://registry.yarnpkg.com/http-errors/-/http-errors-1.7.3.tgz#6c619e4f9c60308c38519498c14fbb10aacebb06" - integrity sha512-ZTTX0MWrsQ2ZAhA1cejAwDLycFsd7I7nVtnkT3Ol0aqodaKW+0CTZDQ1uBv5whptCnc8e8HeRRJxRs0kmm/Qfw== - dependencies: - depd "~1.1.2" - inherits "2.0.4" - setprototypeof "1.1.1" - statuses ">= 1.5.0 < 2" - toidentifier "1.0.0" - -http-https@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/http-https/-/http-https-1.0.0.tgz#2f908dd5f1db4068c058cd6e6d4ce392c913389b" - integrity sha1-L5CN1fHbQGjAWM1ubUzjkskTOJs= - -http-signature@~1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/http-signature/-/http-signature-1.2.0.tgz#9aecd925114772f3d95b65a60abb8f7c18fbace1" - integrity sha1-muzZJRFHcvPZW2WmCruPfBj7rOE= - dependencies: - assert-plus "^1.0.0" - jsprim "^1.2.2" - sshpk "^1.7.0" - -https-browserify@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/https-browserify/-/https-browserify-1.0.0.tgz#ec06c10e0a34c0f2faf199f7fd7fc78fffd03c73" - integrity sha1-7AbBDgo0wPL68Zn3/X/Hj//QPHM= - -iconv-lite@0.4.24, iconv-lite@^0.4.4, iconv-lite@~0.4.13: - version "0.4.24" - resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.24.tgz#2022b4b25fbddc21d2f524974a474aafe733908b" - integrity sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA== - dependencies: - safer-buffer ">= 2.1.2 < 3" - -idna-uts46-hx@^2.3.1: - version "2.3.1" - resolved "https://registry.yarnpkg.com/idna-uts46-hx/-/idna-uts46-hx-2.3.1.tgz#a1dc5c4df37eee522bf66d969cc980e00e8711f9" - integrity sha512-PWoF9Keq6laYdIRwwCdhTPl60xRqAloYNMQLiyUnG42VjT53oW07BXIRM+NK7eQjzXjAk2gUvX9caRxlnF9TAA== - dependencies: - punycode "2.1.0" - -ieee754@^1.1.4: - version "1.1.13" - resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.1.13.tgz#ec168558e95aa181fd87d37f55c32bbcb6708b84" - integrity sha512-4vf7I2LYV/HaWerSo3XmlMkp5eZ83i+/CDluXi/IGTs/O1sejBNhTtnxzmRZfvOUqj7lZjqHkeTvpgSFDlWZTg== - -iferr@^0.1.5: - version "0.1.5" - resolved "https://registry.yarnpkg.com/iferr/-/iferr-0.1.5.tgz#c60eed69e6d8fdb6b3104a1fcbca1c192dc5b501" - integrity sha1-xg7taebY/bazEEofy8ocGS3FtQE= - -ignore-walk@^3.0.1: - version "3.0.3" - resolved "https://registry.yarnpkg.com/ignore-walk/-/ignore-walk-3.0.3.tgz#017e2447184bfeade7c238e4aefdd1e8f95b1e37" - integrity sha512-m7o6xuOaT1aqheYHKf8W6J5pYH85ZI9w077erOzLje3JsB1gkafkAhHHY19dqjulgIZHFm32Cp5uNZgcQqdJKw== - dependencies: - minimatch "^3.0.4" - -immediate@^3.2.3, immediate@~3.2.3: - version "3.2.3" - resolved "https://registry.yarnpkg.com/immediate/-/immediate-3.2.3.tgz#d140fa8f614659bd6541233097ddaac25cdd991c" - integrity sha1-0UD6j2FGWb1lQSMwl92qwlzdmRw= - -immutable@^4.0.0-rc.12: - version "4.0.0-rc.12" - resolved "https://registry.yarnpkg.com/immutable/-/immutable-4.0.0-rc.12.tgz#ca59a7e4c19ae8d9bf74a97bdf0f6e2f2a5d0217" - integrity sha512-0M2XxkZLx/mi3t8NVwIm1g8nHoEmM9p9UBl/G9k4+hm0kBgOVdMV/B3CY5dQ8qG8qc80NN4gDV4HQv6FTJ5q7A== - -import-local@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/import-local/-/import-local-2.0.0.tgz#55070be38a5993cf18ef6db7e961f5bee5c5a09d" - integrity sha512-b6s04m3O+s3CGSbqDIyP4R6aAwAeYlVq9+WUWep6iHa8ETRf9yei1U48C5MmfJmV9AiLYYBKPMq/W+/WRpQmCQ== - dependencies: - pkg-dir "^3.0.0" - resolve-cwd "^2.0.0" - -imurmurhash@^0.1.4: - version "0.1.4" - resolved "https://registry.yarnpkg.com/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea" - integrity sha1-khi5srkoojixPcT7a21XbyMUU+o= - -infer-owner@^1.0.3: - version "1.0.4" - resolved "https://registry.yarnpkg.com/infer-owner/-/infer-owner-1.0.4.tgz#c4cefcaa8e51051c2a40ba2ce8a3d27295af9467" - integrity sha512-IClj+Xz94+d7irH5qRyfJonOdfTzuDaifE6ZPWfx0N0+/ATZCbuTPq2prFl526urkQd90WyUKIh1DfBQ2hMz9A== - -inflight@^1.0.4: - version "1.0.6" - resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" - integrity sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk= - dependencies: - once "^1.3.0" - wrappy "1" - -inherits@2, inherits@2.0.4, inherits@^2.0.1, inherits@^2.0.3, inherits@^2.0.4, inherits@~2.0.1, inherits@~2.0.3, inherits@~2.0.4: - version "2.0.4" - resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" - integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== - -inherits@2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.1.tgz#b17d08d326b4423e568eff719f91b0b1cbdf69f1" - integrity sha1-sX0I0ya0Qj5Wjv9xn5GwscvfafE= - -inherits@2.0.3: - version "2.0.3" - resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de" - integrity sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4= - -ini@^1.3.4, ini@^1.3.5, ini@~1.3.0: - version "1.3.5" - resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.5.tgz#eee25f56db1c9ec6085e0c22778083f596abf927" - integrity sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw== - -interpret@^1.1.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/interpret/-/interpret-1.2.0.tgz#d5061a6224be58e8083985f5014d844359576296" - integrity sha512-mT34yGKMNceBQUoVn7iCDKDntA7SC6gycMAWzGx1z/CMCTV7b2AAtXlo3nRyHZ1FelRkQbQjprHSYGwzLtkVbw== - -interpret@^1.4.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/interpret/-/interpret-1.4.0.tgz#665ab8bc4da27a774a40584e812e3e0fa45b1a1e" - integrity sha512-agE4QfB2Lkp9uICn7BAqoscw4SZP9kTE2hxiFI3jBPmXJfdqiahTbUuKGsMoN2GtqL9AxhYioAcVvgsb1HvRbA== - -invariant@^2.2.2, invariant@^2.2.4: - version "2.2.4" - resolved "https://registry.yarnpkg.com/invariant/-/invariant-2.2.4.tgz#610f3c92c9359ce1db616e538008d23ff35158e6" - integrity sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA== - dependencies: - loose-envify "^1.0.0" - -invert-kv@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/invert-kv/-/invert-kv-1.0.0.tgz#104a8e4aaca6d3d8cd157a8ef8bfab2d7a3ffdb6" - integrity sha1-EEqOSqym09jNFXqO+L+rLXo//bY= - -ipaddr.js@1.9.0: - version "1.9.0" - resolved "https://registry.yarnpkg.com/ipaddr.js/-/ipaddr.js-1.9.0.tgz#37df74e430a0e47550fe54a2defe30d8acd95f65" - integrity sha512-M4Sjn6N/+O6/IXSJseKqHoFc+5FdGJ22sXqnjTpdZweHK64MzEPAyQZyEU3R/KRv2GLoa7nNtg/C2Ev6m7z+eA== - -is-absolute@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-absolute/-/is-absolute-1.0.0.tgz#395e1ae84b11f26ad1795e73c17378e48a301576" - integrity sha512-dOWoqflvcydARa360Gvv18DZ/gRuHKi2NU/wU5X1ZFzdYfH29nkiNZsF3mp4OJ3H4yo9Mx8A/uAGNzpzPN3yBA== - dependencies: - is-relative "^1.0.0" - is-windows "^1.0.1" - -is-accessor-descriptor@^0.1.6: - version "0.1.6" - resolved "https://registry.yarnpkg.com/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz#a9e12cb3ae8d876727eeef3843f8a0897b5c98d6" - integrity sha1-qeEss66Nh2cn7u84Q/igiXtcmNY= - dependencies: - kind-of "^3.0.2" - -is-accessor-descriptor@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz#169c2f6d3df1f992618072365c9b0ea1f6878656" - integrity sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ== - dependencies: - kind-of "^6.0.0" - -is-arrayish@^0.2.1: - version "0.2.1" - resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.2.1.tgz#77c99840527aa8ecb1a8ba697b80645a7a926a9d" - integrity sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0= - -is-binary-path@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/is-binary-path/-/is-binary-path-1.0.1.tgz#75f16642b480f187a711c814161fd3a4a7655898" - integrity sha1-dfFmQrSA8YenEcgUFh/TpKdlWJg= - dependencies: - binary-extensions "^1.0.0" - -is-binary-path@~2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/is-binary-path/-/is-binary-path-2.1.0.tgz#ea1f7f3b80f064236e83470f86c09c254fb45b09" - integrity sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw== - dependencies: - binary-extensions "^2.0.0" - -is-buffer@^1.1.5: - version "1.1.6" - resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-1.1.6.tgz#efaa2ea9daa0d7ab2ea13a97b2b8ad51fefbe8be" - integrity sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w== - -is-callable@^1.1.3, is-callable@^1.1.4: - version "1.1.4" - resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.1.4.tgz#1e1adf219e1eeb684d691f9d6a05ff0d30a24d75" - integrity sha512-r5p9sxJjYnArLjObpjA4xu5EKI3CuKHkJXMhT7kwbpUyIFD1n5PMAsoPvWnvtZiNz7LjkYDRZhd7FlI0eMijEA== - -is-callable@^1.1.5: - version "1.1.5" - resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.1.5.tgz#f7e46b596890456db74e7f6e976cb3273d06faab" - integrity sha512-ESKv5sMCJB2jnHTWZ3O5itG+O128Hsus4K4Qh1h2/cgn2vbgnLSVqfV46AeJA9D5EeeLa9w81KUXMtn34zhX+Q== - -is-ci@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/is-ci/-/is-ci-2.0.0.tgz#6bc6334181810e04b5c22b3d589fdca55026404c" - integrity sha512-YfJT7rkpQB0updsdHLGWrvhBJfcfzNNawYDNIyQXJz0IViGf75O8EBPKSdvw2rF+LGCsX4FZ8tcr3b19LcZq4w== - dependencies: - ci-info "^2.0.0" - -is-data-descriptor@^0.1.4: - version "0.1.4" - resolved "https://registry.yarnpkg.com/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz#0b5ee648388e2c860282e793f1856fec3f301b56" - integrity sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y= - dependencies: - kind-of "^3.0.2" - -is-data-descriptor@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz#d84876321d0e7add03990406abbbbd36ba9268c7" - integrity sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ== - dependencies: - kind-of "^6.0.0" - -is-date-object@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/is-date-object/-/is-date-object-1.0.1.tgz#9aa20eb6aeebbff77fbd33e74ca01b33581d3a16" - integrity sha1-mqIOtq7rv/d/vTPnTKAbM1gdOhY= - -is-descriptor@^0.1.0: - version "0.1.6" - resolved "https://registry.yarnpkg.com/is-descriptor/-/is-descriptor-0.1.6.tgz#366d8240dde487ca51823b1ab9f07a10a78251ca" - integrity sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg== - dependencies: - is-accessor-descriptor "^0.1.6" - is-data-descriptor "^0.1.4" - kind-of "^5.0.0" - -is-descriptor@^1.0.0, is-descriptor@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/is-descriptor/-/is-descriptor-1.0.2.tgz#3b159746a66604b04f8c81524ba365c5f14d86ec" - integrity sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg== - dependencies: - is-accessor-descriptor "^1.0.0" - is-data-descriptor "^1.0.0" - kind-of "^6.0.2" - -is-extendable@^0.1.0, is-extendable@^0.1.1: - version "0.1.1" - resolved "https://registry.yarnpkg.com/is-extendable/-/is-extendable-0.1.1.tgz#62b110e289a471418e3ec36a617d472e301dfc89" - integrity sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik= - -is-extendable@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/is-extendable/-/is-extendable-1.0.1.tgz#a7470f9e426733d81bd81e1155264e3a3507cab4" - integrity sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA== - dependencies: - is-plain-object "^2.0.4" - -is-extglob@^2.1.0, is-extglob@^2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2" - integrity sha1-qIwCU1eR8C7TfHahueqXc8gz+MI= - -is-finite@^1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/is-finite/-/is-finite-1.0.2.tgz#cc6677695602be550ef11e8b4aa6305342b6d0aa" - integrity sha1-zGZ3aVYCvlUO8R6LSqYwU0K20Ko= - dependencies: - number-is-nan "^1.0.0" - -is-fn@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-fn/-/is-fn-1.0.0.tgz#9543d5de7bcf5b08a22ec8a20bae6e286d510d8c" - integrity sha1-lUPV3nvPWwiiLsiiC65uKG1RDYw= - -is-fullwidth-code-point@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz#ef9e31386f031a7f0d643af82fde50c457ef00cb" - integrity sha1-754xOG8DGn8NZDr4L95QxFfvAMs= - dependencies: - number-is-nan "^1.0.0" - -is-fullwidth-code-point@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz#a3b30a5c4f199183167aaab93beefae3ddfb654f" - integrity sha1-o7MKXE8ZkYMWeqq5O+764937ZU8= - -is-function@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/is-function/-/is-function-1.0.1.tgz#12cfb98b65b57dd3d193a3121f5f6e2f437602b5" - integrity sha1-Es+5i2W1fdPRk6MSH19uL0N2ArU= - -is-generator-fn@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/is-generator-fn/-/is-generator-fn-2.1.0.tgz#7d140adc389aaf3011a8f2a2a4cfa6faadffb118" - integrity sha512-cTIB4yPYL/Grw0EaSzASzg6bBy9gqCofvWN8okThAYIxKJZC+udlRAmGbM0XLeniEJSs8uEgHPGuHSe1XsOLSQ== - -is-glob@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-3.1.0.tgz#7ba5ae24217804ac70707b96922567486cc3e84a" - integrity sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo= - dependencies: - is-extglob "^2.1.0" - -is-glob@^4.0.0, is-glob@^4.0.1, is-glob@~4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.1.tgz#7567dbe9f2f5e2467bc77ab83c4a29482407a5dc" - integrity sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg== - dependencies: - is-extglob "^2.1.1" - -is-hex-prefixed@1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-hex-prefixed/-/is-hex-prefixed-1.0.0.tgz#7d8d37e6ad77e5d127148913c573e082d777f554" - integrity sha1-fY035q135dEnFIkTxXPggtd39VQ= - -is-natural-number@^4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/is-natural-number/-/is-natural-number-4.0.1.tgz#ab9d76e1db4ced51e35de0c72ebecf09f734cde8" - integrity sha1-q5124dtM7VHjXeDHLr7PCfc0zeg= - -is-negated-glob@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-negated-glob/-/is-negated-glob-1.0.0.tgz#6910bca5da8c95e784b5751b976cf5a10fee36d2" - integrity sha1-aRC8pdqMleeEtXUbl2z1oQ/uNtI= - -is-number@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/is-number/-/is-number-3.0.0.tgz#24fd6201a4782cf50561c810276afc7d12d71195" - integrity sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU= - dependencies: - kind-of "^3.0.2" - -is-number@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/is-number/-/is-number-4.0.0.tgz#0026e37f5454d73e356dfe6564699867c6a7f0ff" - integrity sha512-rSklcAIlf1OmFdyAqbnWTLVelsQ58uvZ66S/ZyawjWqIviTWCjg2PzVGw8WUA+nNuPTqb4wgA+NszrJ+08LlgQ== - -is-number@^7.0.0: - version "7.0.0" - resolved "https://registry.yarnpkg.com/is-number/-/is-number-7.0.0.tgz#7535345b896734d5f80c4d06c50955527a14f12b" - integrity sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng== - -is-object@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/is-object/-/is-object-1.0.1.tgz#8952688c5ec2ffd6b03ecc85e769e02903083470" - integrity sha1-iVJojF7C/9awPsyF52ngKQMINHA= - -is-plain-obj@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/is-plain-obj/-/is-plain-obj-1.1.0.tgz#71a50c8429dfca773c92a390a4a03b39fcd51d3e" - integrity sha1-caUMhCnfync8kqOQpKA7OfzVHT4= - -is-plain-object@^2.0.1, is-plain-object@^2.0.3, is-plain-object@^2.0.4: - version "2.0.4" - resolved "https://registry.yarnpkg.com/is-plain-object/-/is-plain-object-2.0.4.tgz#2c163b3fafb1b606d9d17928f05c2a1c38e07677" - integrity sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og== - dependencies: - isobject "^3.0.1" - -is-regex@^1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/is-regex/-/is-regex-1.0.4.tgz#5517489b547091b0930e095654ced25ee97e9491" - integrity sha1-VRdIm1RwkbCTDglWVM7SXul+lJE= - dependencies: - has "^1.0.1" - -is-regex@^1.0.5: - version "1.0.5" - resolved "https://registry.yarnpkg.com/is-regex/-/is-regex-1.0.5.tgz#39d589a358bf18967f726967120b8fc1aed74eae" - integrity sha512-vlKW17SNq44owv5AQR3Cq0bQPEb8+kF3UKZ2fiZNOWtztYE5i0CzCZxFDwO58qAOWtxdBRVO/V5Qin1wjCqFYQ== - dependencies: - has "^1.0.3" - -is-relative@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-relative/-/is-relative-1.0.0.tgz#a1bb6935ce8c5dba1e8b9754b9b2dcc020e2260d" - integrity sha512-Kw/ReK0iqwKeu0MITLFuj0jbPAmEiOsIwyIXvvbfa6QfmN9pkD1M+8pdk7Rl/dTKbH34/XBFMbgD4iMJhLQbGA== - dependencies: - is-unc-path "^1.0.0" - -is-retry-allowed@^1.0.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/is-retry-allowed/-/is-retry-allowed-1.2.0.tgz#d778488bd0a4666a3be8a1482b9f2baafedea8b4" - integrity sha512-RUbUeKwvm3XG2VYamhJL1xFktgjvPzL0Hq8C+6yrWIswDy3BIXGqCxhxkc30N9jqK311gVU137K8Ei55/zVJRg== - -is-stream@^1.0.0, is-stream@^1.0.1, is-stream@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-1.1.0.tgz#12d4a3dd4e68e0b79ceb8dbc84173ae80d91ca44" - integrity sha1-EtSj3U5o4Lec6428hBc66A2RykQ= - -is-symbol@^1.0.2: - version "1.0.3" - resolved "https://registry.yarnpkg.com/is-symbol/-/is-symbol-1.0.3.tgz#38e1014b9e6329be0de9d24a414fd7441ec61937" - integrity sha512-OwijhaRSgqvhm/0ZdAcXNZt9lYdKFpcRDT5ULUuYXPoT794UNOdU+gpT6Rzo7b4V2HUl/op6GqY894AZwv9faQ== - dependencies: - has-symbols "^1.0.1" - -is-typedarray@^1.0.0, is-typedarray@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-typedarray/-/is-typedarray-1.0.0.tgz#e479c80858df0c1b11ddda6940f96011fcda4a9a" - integrity sha1-5HnICFjfDBsR3dppQPlgEfzaSpo= - -is-unc-path@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-unc-path/-/is-unc-path-1.0.0.tgz#d731e8898ed090a12c352ad2eaed5095ad322c9d" - integrity sha512-mrGpVd0fs7WWLfVsStvgF6iEJnbjDFZh9/emhRDcGWTduTfNHd9CHeUwH3gYIjdbwo4On6hunkztwOaAw0yllQ== - dependencies: - unc-path-regex "^0.1.2" - -is-utf8@^0.2.0, is-utf8@^0.2.1: - version "0.2.1" - resolved "https://registry.yarnpkg.com/is-utf8/-/is-utf8-0.2.1.tgz#4b0da1442104d1b336340e80797e865cf39f7d72" - integrity sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI= - -is-valid-glob@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-valid-glob/-/is-valid-glob-1.0.0.tgz#29bf3eff701be2d4d315dbacc39bc39fe8f601aa" - integrity sha1-Kb8+/3Ab4tTTFdusw5vDn+j2Aao= - -is-windows@^1.0.1, is-windows@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/is-windows/-/is-windows-1.0.2.tgz#d1850eb9791ecd18e6182ce12a30f396634bb19d" - integrity sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA== - -is-wsl@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/is-wsl/-/is-wsl-1.1.0.tgz#1f16e4aa22b04d1336b66188a66af3c600c3a66d" - integrity sha1-HxbkqiKwTRM2tmGIpmrzxgDDpm0= - -isarray@0.0.1: - version "0.0.1" - resolved "https://registry.yarnpkg.com/isarray/-/isarray-0.0.1.tgz#8a18acfca9a8f4177e09abfc6038939b05d1eedf" - integrity sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8= - -isarray@1.0.0, isarray@^1.0.0, isarray@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" - integrity sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE= - -isexe@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" - integrity sha1-6PvzdNxVb/iUehDcsFctYz8s+hA= - -isobject@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/isobject/-/isobject-2.1.0.tgz#f065561096a3f1da2ef46272f815c840d87e0c89" - integrity sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk= - dependencies: - isarray "1.0.0" - -isobject@^3.0.0, isobject@^3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/isobject/-/isobject-3.0.1.tgz#4e431e92b11a9731636aa1f9c8d1ccbcfdab78df" - integrity sha1-TkMekrEalzFjaqH5yNHMvP2reN8= - -isomorphic-fetch@2.2.1: - version "2.2.1" - resolved "https://registry.yarnpkg.com/isomorphic-fetch/-/isomorphic-fetch-2.2.1.tgz#611ae1acf14f5e81f729507472819fe9733558a9" - integrity sha1-YRrhrPFPXoH3KVB0coGf6XM1WKk= - dependencies: - node-fetch "^1.0.1" - whatwg-fetch ">=0.10.0" - -isstream@~0.1.2: - version "0.1.2" - resolved "https://registry.yarnpkg.com/isstream/-/isstream-0.1.2.tgz#47e63f7af55afa6f92e1500e690eb8b8529c099a" - integrity sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo= - -istanbul-lib-coverage@^2.0.2, istanbul-lib-coverage@^2.0.5: - version "2.0.5" - resolved "https://registry.yarnpkg.com/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.5.tgz#675f0ab69503fad4b1d849f736baaca803344f49" - integrity sha512-8aXznuEPCJvGnMSRft4udDRDtb1V3pkQkMMI5LI+6HuQz5oQ4J2UFn1H82raA3qJtyOLkkwVqICBQkjnGtn5mA== - -istanbul-lib-instrument@^3.0.1, istanbul-lib-instrument@^3.3.0: - version "3.3.0" - resolved "https://registry.yarnpkg.com/istanbul-lib-instrument/-/istanbul-lib-instrument-3.3.0.tgz#a5f63d91f0bbc0c3e479ef4c5de027335ec6d630" - integrity sha512-5nnIN4vo5xQZHdXno/YDXJ0G+I3dAm4XgzfSVTPLQpj/zAV2dV6Juy0yaf10/zrJOJeHoN3fraFe+XRq2bFVZA== - dependencies: - "@babel/generator" "^7.4.0" - "@babel/parser" "^7.4.3" - "@babel/template" "^7.4.0" - "@babel/traverse" "^7.4.3" - "@babel/types" "^7.4.0" - istanbul-lib-coverage "^2.0.5" - semver "^6.0.0" - -istanbul-lib-report@^2.0.4: - version "2.0.8" - resolved "https://registry.yarnpkg.com/istanbul-lib-report/-/istanbul-lib-report-2.0.8.tgz#5a8113cd746d43c4889eba36ab10e7d50c9b4f33" - integrity sha512-fHBeG573EIihhAblwgxrSenp0Dby6tJMFR/HvlerBsrCTD5bkUuoNtn3gVh29ZCS824cGGBPn7Sg7cNk+2xUsQ== - dependencies: - istanbul-lib-coverage "^2.0.5" - make-dir "^2.1.0" - supports-color "^6.1.0" - -istanbul-lib-source-maps@^3.0.1: - version "3.0.6" - resolved "https://registry.yarnpkg.com/istanbul-lib-source-maps/-/istanbul-lib-source-maps-3.0.6.tgz#284997c48211752ec486253da97e3879defba8c8" - integrity sha512-R47KzMtDJH6X4/YW9XTx+jrLnZnscW4VpNN+1PViSYTejLVPWv7oov+Duf8YQSPyVRUvueQqz1TcsC6mooZTXw== - dependencies: - debug "^4.1.1" - istanbul-lib-coverage "^2.0.5" - make-dir "^2.1.0" - rimraf "^2.6.3" - source-map "^0.6.1" - -istanbul-reports@^2.2.6: - version "2.2.6" - resolved "https://registry.yarnpkg.com/istanbul-reports/-/istanbul-reports-2.2.6.tgz#7b4f2660d82b29303a8fe6091f8ca4bf058da1af" - integrity sha512-SKi4rnMyLBKe0Jy2uUdx28h8oG7ph2PPuQPvIAh31d+Ci+lSiEu4C+h3oBPuJ9+mPKhOyW0M8gY4U5NM1WLeXA== - dependencies: - handlebars "^4.1.2" - -istanbul@^0.4.5: - version "0.4.5" - resolved "https://registry.yarnpkg.com/istanbul/-/istanbul-0.4.5.tgz#65c7d73d4c4da84d4f3ac310b918fb0b8033733b" - integrity sha1-ZcfXPUxNqE1POsMQuRj7C4Azczs= - dependencies: - abbrev "1.0.x" - async "1.x" - escodegen "1.8.x" - esprima "2.7.x" - glob "^5.0.15" - handlebars "^4.0.1" - js-yaml "3.x" - mkdirp "0.5.x" - nopt "3.x" - once "1.x" - resolve "1.1.x" - supports-color "^3.1.0" - which "^1.1.1" - wordwrap "^1.0.0" - -isurl@^1.0.0-alpha5: - version "1.0.0" - resolved "https://registry.yarnpkg.com/isurl/-/isurl-1.0.0.tgz#b27f4f49f3cdaa3ea44a0a5b7f3462e6edc39d67" - integrity sha512-1P/yWsxPlDtn7QeRD+ULKQPaIaN6yF368GZ2vDfv0AL0NwpStafjWCDDdn0k8wgFMWpVAqG7oJhxHnlud42i9w== - dependencies: - has-to-string-tag-x "^1.2.0" - is-object "^1.0.1" - -jest-changed-files@^24.9.0: - version "24.9.0" - resolved "https://registry.yarnpkg.com/jest-changed-files/-/jest-changed-files-24.9.0.tgz#08d8c15eb79a7fa3fc98269bc14b451ee82f8039" - integrity sha512-6aTWpe2mHF0DhL28WjdkO8LyGjs3zItPET4bMSeXU6T3ub4FPMw+mcOcbdGXQOAfmLcxofD23/5Bl9Z4AkFwqg== - dependencies: - "@jest/types" "^24.9.0" - execa "^1.0.0" - throat "^4.0.0" - -jest-cli@^24.9.0: - version "24.9.0" - resolved "https://registry.yarnpkg.com/jest-cli/-/jest-cli-24.9.0.tgz#ad2de62d07472d419c6abc301fc432b98b10d2af" - integrity sha512-+VLRKyitT3BWoMeSUIHRxV/2g8y9gw91Jh5z2UmXZzkZKpbC08CSehVxgHUwTpy+HwGcns/tqafQDJW7imYvGg== - dependencies: - "@jest/core" "^24.9.0" - "@jest/test-result" "^24.9.0" - "@jest/types" "^24.9.0" - chalk "^2.0.1" - exit "^0.1.2" - import-local "^2.0.0" - is-ci "^2.0.0" - jest-config "^24.9.0" - jest-util "^24.9.0" - jest-validate "^24.9.0" - prompts "^2.0.1" - realpath-native "^1.1.0" - yargs "^13.3.0" - -jest-config@^24.9.0: - version "24.9.0" - resolved "https://registry.yarnpkg.com/jest-config/-/jest-config-24.9.0.tgz#fb1bbc60c73a46af03590719efa4825e6e4dd1b5" - integrity sha512-RATtQJtVYQrp7fvWg6f5y3pEFj9I+H8sWw4aKxnDZ96mob5i5SD6ZEGWgMLXQ4LE8UurrjbdlLWdUeo+28QpfQ== - dependencies: - "@babel/core" "^7.1.0" - "@jest/test-sequencer" "^24.9.0" - "@jest/types" "^24.9.0" - babel-jest "^24.9.0" - chalk "^2.0.1" - glob "^7.1.1" - jest-environment-jsdom "^24.9.0" - jest-environment-node "^24.9.0" - jest-get-type "^24.9.0" - jest-jasmine2 "^24.9.0" - jest-regex-util "^24.3.0" - jest-resolve "^24.9.0" - jest-util "^24.9.0" - jest-validate "^24.9.0" - micromatch "^3.1.10" - pretty-format "^24.9.0" - realpath-native "^1.1.0" - -jest-diff@^24.3.0, jest-diff@^24.9.0: - version "24.9.0" - resolved "https://registry.yarnpkg.com/jest-diff/-/jest-diff-24.9.0.tgz#931b7d0d5778a1baf7452cb816e325e3724055da" - integrity sha512-qMfrTs8AdJE2iqrTp0hzh7kTd2PQWrsFyj9tORoKmu32xjPjeE4NyjVRDz8ybYwqS2ik8N4hsIpiVTyFeo2lBQ== - dependencies: - chalk "^2.0.1" - diff-sequences "^24.9.0" - jest-get-type "^24.9.0" - pretty-format "^24.9.0" - -jest-diff@^25.3.0: - version "25.3.0" - resolved "https://registry.yarnpkg.com/jest-diff/-/jest-diff-25.3.0.tgz#0d7d6f5d6171e5dacde9e05be47b3615e147c26f" - integrity sha512-vyvs6RPoVdiwARwY4kqFWd4PirPLm2dmmkNzKqo38uZOzJvLee87yzDjIZLmY1SjM3XR5DwsUH+cdQ12vgqi1w== - dependencies: - chalk "^3.0.0" - diff-sequences "^25.2.6" - jest-get-type "^25.2.6" - pretty-format "^25.3.0" - -jest-docblock@^24.3.0: - version "24.9.0" - resolved "https://registry.yarnpkg.com/jest-docblock/-/jest-docblock-24.9.0.tgz#7970201802ba560e1c4092cc25cbedf5af5a8ce2" - integrity sha512-F1DjdpDMJMA1cN6He0FNYNZlo3yYmOtRUnktrT9Q37njYzC5WEaDdmbynIgy0L/IvXvvgsG8OsqhLPXTpfmZAA== - dependencies: - detect-newline "^2.1.0" - -jest-each@^24.9.0: - version "24.9.0" - resolved "https://registry.yarnpkg.com/jest-each/-/jest-each-24.9.0.tgz#eb2da602e2a610898dbc5f1f6df3ba86b55f8b05" - integrity sha512-ONi0R4BvW45cw8s2Lrx8YgbeXL1oCQ/wIDwmsM3CqM/nlblNCPmnC3IPQlMbRFZu3wKdQ2U8BqM6lh3LJ5Bsog== - dependencies: - "@jest/types" "^24.9.0" - chalk "^2.0.1" - jest-get-type "^24.9.0" - jest-util "^24.9.0" - pretty-format "^24.9.0" - -jest-environment-jsdom@^24.9.0: - version "24.9.0" - resolved "https://registry.yarnpkg.com/jest-environment-jsdom/-/jest-environment-jsdom-24.9.0.tgz#4b0806c7fc94f95edb369a69cc2778eec2b7375b" - integrity sha512-Zv9FV9NBRzLuALXjvRijO2351DRQeLYXtpD4xNvfoVFw21IOKNhZAEUKcbiEtjTkm2GsJ3boMVgkaR7rN8qetA== - dependencies: - "@jest/environment" "^24.9.0" - "@jest/fake-timers" "^24.9.0" - "@jest/types" "^24.9.0" - jest-mock "^24.9.0" - jest-util "^24.9.0" - jsdom "^11.5.1" - -jest-environment-node@^24.9.0: - version "24.9.0" - resolved "https://registry.yarnpkg.com/jest-environment-node/-/jest-environment-node-24.9.0.tgz#333d2d2796f9687f2aeebf0742b519f33c1cbfd3" - integrity sha512-6d4V2f4nxzIzwendo27Tr0aFm+IXWa0XEUnaH6nU0FMaozxovt+sfRvh4J47wL1OvF83I3SSTu0XK+i4Bqe7uA== - dependencies: - "@jest/environment" "^24.9.0" - "@jest/fake-timers" "^24.9.0" - "@jest/types" "^24.9.0" - jest-mock "^24.9.0" - jest-util "^24.9.0" - -jest-get-type@^24.9.0: - version "24.9.0" - resolved "https://registry.yarnpkg.com/jest-get-type/-/jest-get-type-24.9.0.tgz#1684a0c8a50f2e4901b6644ae861f579eed2ef0e" - integrity sha512-lUseMzAley4LhIcpSP9Jf+fTrQ4a1yHQwLNeeVa2cEmbCGeoZAtYPOIv8JaxLD/sUpKxetKGP+gsHl8f8TSj8Q== - -jest-get-type@^25.2.6: - version "25.2.6" - resolved "https://registry.yarnpkg.com/jest-get-type/-/jest-get-type-25.2.6.tgz#0b0a32fab8908b44d508be81681487dbabb8d877" - integrity sha512-DxjtyzOHjObRM+sM1knti6or+eOgcGU4xVSb2HNP1TqO4ahsT+rqZg+nyqHWJSvWgKC5cG3QjGFBqxLghiF/Ig== - -jest-haste-map@^24.9.0: - version "24.9.0" - resolved "https://registry.yarnpkg.com/jest-haste-map/-/jest-haste-map-24.9.0.tgz#b38a5d64274934e21fa417ae9a9fbeb77ceaac7d" - integrity sha512-kfVFmsuWui2Sj1Rp1AJ4D9HqJwE4uwTlS/vO+eRUaMmd54BFpli2XhMQnPC2k4cHFVbB2Q2C+jtI1AGLgEnCjQ== - dependencies: - "@jest/types" "^24.9.0" - anymatch "^2.0.0" - fb-watchman "^2.0.0" - graceful-fs "^4.1.15" - invariant "^2.2.4" - jest-serializer "^24.9.0" - jest-util "^24.9.0" - jest-worker "^24.9.0" - micromatch "^3.1.10" - sane "^4.0.3" - walker "^1.0.7" - optionalDependencies: - fsevents "^1.2.7" - -jest-jasmine2@^24.9.0: - version "24.9.0" - resolved "https://registry.yarnpkg.com/jest-jasmine2/-/jest-jasmine2-24.9.0.tgz#1f7b1bd3242c1774e62acabb3646d96afc3be6a0" - integrity sha512-Cq7vkAgaYKp+PsX+2/JbTarrk0DmNhsEtqBXNwUHkdlbrTBLtMJINADf2mf5FkowNsq8evbPc07/qFO0AdKTzw== - dependencies: - "@babel/traverse" "^7.1.0" - "@jest/environment" "^24.9.0" - "@jest/test-result" "^24.9.0" - "@jest/types" "^24.9.0" - chalk "^2.0.1" - co "^4.6.0" - expect "^24.9.0" - is-generator-fn "^2.0.0" - jest-each "^24.9.0" - jest-matcher-utils "^24.9.0" - jest-message-util "^24.9.0" - jest-runtime "^24.9.0" - jest-snapshot "^24.9.0" - jest-util "^24.9.0" - pretty-format "^24.9.0" - throat "^4.0.0" - -jest-junit@^6.4.0: - version "6.4.0" - resolved "https://registry.yarnpkg.com/jest-junit/-/jest-junit-6.4.0.tgz#23e15c979fa6338afde46f2d2ac2a6b7e8cf0d9e" - integrity sha512-GXEZA5WBeUich94BARoEUccJumhCgCerg7mXDFLxWwI2P7wL3Z7sGWk+53x343YdBLjiMR9aD/gYMVKO+0pE4Q== - dependencies: - jest-validate "^24.0.0" - mkdirp "^0.5.1" - strip-ansi "^4.0.0" - xml "^1.0.1" - -jest-leak-detector@^24.9.0: - version "24.9.0" - resolved "https://registry.yarnpkg.com/jest-leak-detector/-/jest-leak-detector-24.9.0.tgz#b665dea7c77100c5c4f7dfcb153b65cf07dcf96a" - integrity sha512-tYkFIDsiKTGwb2FG1w8hX9V0aUb2ot8zY/2nFg087dUageonw1zrLMP4W6zsRO59dPkTSKie+D4rhMuP9nRmrA== - dependencies: - jest-get-type "^24.9.0" - pretty-format "^24.9.0" - -jest-matcher-utils@^24.9.0: - version "24.9.0" - resolved "https://registry.yarnpkg.com/jest-matcher-utils/-/jest-matcher-utils-24.9.0.tgz#f5b3661d5e628dffe6dd65251dfdae0e87c3a073" - integrity sha512-OZz2IXsu6eaiMAwe67c1T+5tUAtQyQx27/EMEkbFAGiw52tB9em+uGbzpcgYVpA8wl0hlxKPZxrly4CXU/GjHA== - dependencies: - chalk "^2.0.1" - jest-diff "^24.9.0" - jest-get-type "^24.9.0" - pretty-format "^24.9.0" - -jest-message-util@^24.9.0: - version "24.9.0" - resolved "https://registry.yarnpkg.com/jest-message-util/-/jest-message-util-24.9.0.tgz#527f54a1e380f5e202a8d1149b0ec872f43119e3" - integrity sha512-oCj8FiZ3U0hTP4aSui87P4L4jC37BtQwUMqk+zk/b11FR19BJDeZsZAvIHutWnmtw7r85UmR3CEWZ0HWU2mAlw== - dependencies: - "@babel/code-frame" "^7.0.0" - "@jest/test-result" "^24.9.0" - "@jest/types" "^24.9.0" - "@types/stack-utils" "^1.0.1" - chalk "^2.0.1" - micromatch "^3.1.10" - slash "^2.0.0" - stack-utils "^1.0.1" - -jest-mock@^24.9.0: - version "24.9.0" - resolved "https://registry.yarnpkg.com/jest-mock/-/jest-mock-24.9.0.tgz#c22835541ee379b908673ad51087a2185c13f1c6" - integrity sha512-3BEYN5WbSq9wd+SyLDES7AHnjH9A/ROBwmz7l2y+ol+NtSFO8DYiEBzoO1CeFc9a8DYy10EO4dDFVv/wN3zl1w== - dependencies: - "@jest/types" "^24.9.0" - -jest-pnp-resolver@^1.2.1: - version "1.2.1" - resolved "https://registry.yarnpkg.com/jest-pnp-resolver/-/jest-pnp-resolver-1.2.1.tgz#ecdae604c077a7fbc70defb6d517c3c1c898923a" - integrity sha512-pgFw2tm54fzgYvc/OHrnysABEObZCUNFnhjoRjaVOCN8NYc032/gVjPaHD4Aq6ApkSieWtfKAFQtmDKAmhupnQ== - -jest-regex-util@^24.3.0, jest-regex-util@^24.9.0: - version "24.9.0" - resolved "https://registry.yarnpkg.com/jest-regex-util/-/jest-regex-util-24.9.0.tgz#c13fb3380bde22bf6575432c493ea8fe37965636" - integrity sha512-05Cmb6CuxaA+Ys6fjr3PhvV3bGQmO+2p2La4hFbU+W5uOc479f7FdLXUWXw4pYMAhhSZIuKHwSXSu6CsSBAXQA== - -jest-resolve-dependencies@^24.9.0: - version "24.9.0" - resolved "https://registry.yarnpkg.com/jest-resolve-dependencies/-/jest-resolve-dependencies-24.9.0.tgz#ad055198959c4cfba8a4f066c673a3f0786507ab" - integrity sha512-Fm7b6AlWnYhT0BXy4hXpactHIqER7erNgIsIozDXWl5dVm+k8XdGVe1oTg1JyaFnOxarMEbax3wyRJqGP2Pq+g== - dependencies: - "@jest/types" "^24.9.0" - jest-regex-util "^24.3.0" - jest-snapshot "^24.9.0" - -jest-resolve@^24.9.0: - version "24.9.0" - resolved "https://registry.yarnpkg.com/jest-resolve/-/jest-resolve-24.9.0.tgz#dff04c7687af34c4dd7e524892d9cf77e5d17321" - integrity sha512-TaLeLVL1l08YFZAt3zaPtjiVvyy4oSA6CRe+0AFPPVX3Q/VI0giIWWoAvoS5L96vj9Dqxj4fB5p2qrHCmTU/MQ== - dependencies: - "@jest/types" "^24.9.0" - browser-resolve "^1.11.3" - chalk "^2.0.1" - jest-pnp-resolver "^1.2.1" - realpath-native "^1.1.0" - -jest-runner@^24.9.0: - version "24.9.0" - resolved "https://registry.yarnpkg.com/jest-runner/-/jest-runner-24.9.0.tgz#574fafdbd54455c2b34b4bdf4365a23857fcdf42" - integrity sha512-KksJQyI3/0mhcfspnxxEOBueGrd5E4vV7ADQLT9ESaCzz02WnbdbKWIf5Mkaucoaj7obQckYPVX6JJhgUcoWWg== - dependencies: - "@jest/console" "^24.7.1" - "@jest/environment" "^24.9.0" - "@jest/test-result" "^24.9.0" - "@jest/types" "^24.9.0" - chalk "^2.4.2" - exit "^0.1.2" - graceful-fs "^4.1.15" - jest-config "^24.9.0" - jest-docblock "^24.3.0" - jest-haste-map "^24.9.0" - jest-jasmine2 "^24.9.0" - jest-leak-detector "^24.9.0" - jest-message-util "^24.9.0" - jest-resolve "^24.9.0" - jest-runtime "^24.9.0" - jest-util "^24.9.0" - jest-worker "^24.6.0" - source-map-support "^0.5.6" - throat "^4.0.0" - -jest-runtime@^24.9.0: - version "24.9.0" - resolved "https://registry.yarnpkg.com/jest-runtime/-/jest-runtime-24.9.0.tgz#9f14583af6a4f7314a6a9d9f0226e1a781c8e4ac" - integrity sha512-8oNqgnmF3v2J6PVRM2Jfuj8oX3syKmaynlDMMKQ4iyzbQzIG6th5ub/lM2bCMTmoTKM3ykcUYI2Pw9xwNtjMnw== - dependencies: - "@jest/console" "^24.7.1" - "@jest/environment" "^24.9.0" - "@jest/source-map" "^24.3.0" - "@jest/transform" "^24.9.0" - "@jest/types" "^24.9.0" - "@types/yargs" "^13.0.0" - chalk "^2.0.1" - exit "^0.1.2" - glob "^7.1.3" - graceful-fs "^4.1.15" - jest-config "^24.9.0" - jest-haste-map "^24.9.0" - jest-message-util "^24.9.0" - jest-mock "^24.9.0" - jest-regex-util "^24.3.0" - jest-resolve "^24.9.0" - jest-snapshot "^24.9.0" - jest-util "^24.9.0" - jest-validate "^24.9.0" - realpath-native "^1.1.0" - slash "^2.0.0" - strip-bom "^3.0.0" - yargs "^13.3.0" - -jest-serializer@^24.9.0: - version "24.9.0" - resolved "https://registry.yarnpkg.com/jest-serializer/-/jest-serializer-24.9.0.tgz#e6d7d7ef96d31e8b9079a714754c5d5c58288e73" - integrity sha512-DxYipDr8OvfrKH3Kel6NdED3OXxjvxXZ1uIY2I9OFbGg+vUkkg7AGvi65qbhbWNPvDckXmzMPbK3u3HaDO49bQ== - -jest-snapshot@^24.9.0: - version "24.9.0" - resolved "https://registry.yarnpkg.com/jest-snapshot/-/jest-snapshot-24.9.0.tgz#ec8e9ca4f2ec0c5c87ae8f925cf97497b0e951ba" - integrity sha512-uI/rszGSs73xCM0l+up7O7a40o90cnrk429LOiK3aeTvfC0HHmldbd81/B7Ix81KSFe1lwkbl7GnBGG4UfuDew== - dependencies: - "@babel/types" "^7.0.0" - "@jest/types" "^24.9.0" - chalk "^2.0.1" - expect "^24.9.0" - jest-diff "^24.9.0" - jest-get-type "^24.9.0" - jest-matcher-utils "^24.9.0" - jest-message-util "^24.9.0" - jest-resolve "^24.9.0" - mkdirp "^0.5.1" - natural-compare "^1.4.0" - pretty-format "^24.9.0" - semver "^6.2.0" - -jest-util@^24.9.0: - version "24.9.0" - resolved "https://registry.yarnpkg.com/jest-util/-/jest-util-24.9.0.tgz#7396814e48536d2e85a37de3e4c431d7cb140162" - integrity sha512-x+cZU8VRmOJxbA1K5oDBdxQmdq0OIdADarLxk0Mq+3XS4jgvhG/oKGWcIDCtPG0HgjxOYvF+ilPJQsAyXfbNOg== - dependencies: - "@jest/console" "^24.9.0" - "@jest/fake-timers" "^24.9.0" - "@jest/source-map" "^24.9.0" - "@jest/test-result" "^24.9.0" - "@jest/types" "^24.9.0" - callsites "^3.0.0" - chalk "^2.0.1" - graceful-fs "^4.1.15" - is-ci "^2.0.0" - mkdirp "^0.5.1" - slash "^2.0.0" - source-map "^0.6.0" - -jest-validate@^24.0.0, jest-validate@^24.9.0: - version "24.9.0" - resolved "https://registry.yarnpkg.com/jest-validate/-/jest-validate-24.9.0.tgz#0775c55360d173cd854e40180756d4ff52def8ab" - integrity sha512-HPIt6C5ACwiqSiwi+OfSSHbK8sG7akG8eATl+IPKaeIjtPOeBUd/g3J7DghugzxrGjI93qS/+RPKe1H6PqvhRQ== - dependencies: - "@jest/types" "^24.9.0" - camelcase "^5.3.1" - chalk "^2.0.1" - jest-get-type "^24.9.0" - leven "^3.1.0" - pretty-format "^24.9.0" - -jest-watcher@^24.9.0: - version "24.9.0" - resolved "https://registry.yarnpkg.com/jest-watcher/-/jest-watcher-24.9.0.tgz#4b56e5d1ceff005f5b88e528dc9afc8dd4ed2b3b" - integrity sha512-+/fLOfKPXXYJDYlks62/4R4GoT+GU1tYZed99JSCOsmzkkF7727RqKrjNAxtfO4YpGv11wybgRvCjR73lK2GZw== - dependencies: - "@jest/test-result" "^24.9.0" - "@jest/types" "^24.9.0" - "@types/yargs" "^13.0.0" - ansi-escapes "^3.0.0" - chalk "^2.0.1" - jest-util "^24.9.0" - string-length "^2.0.0" - -jest-worker@^24.6.0, jest-worker@^24.9.0: - version "24.9.0" - resolved "https://registry.yarnpkg.com/jest-worker/-/jest-worker-24.9.0.tgz#5dbfdb5b2d322e98567898238a9697bcce67b3e5" - integrity sha512-51PE4haMSXcHohnSMdM42anbvZANYTqMrr52tVKPqqsPJMzoP6FYYDVqahX/HrAoKEKz3uUPzSvKs9A3qR4iVw== - dependencies: - merge-stream "^2.0.0" - supports-color "^6.1.0" - -jest@^24.9.0: - version "24.9.0" - resolved "https://registry.yarnpkg.com/jest/-/jest-24.9.0.tgz#987d290c05a08b52c56188c1002e368edb007171" - integrity sha512-YvkBL1Zm7d2B1+h5fHEOdyjCG+sGMz4f8D86/0HiqJ6MB4MnDc8FgP5vdWsGnemOQro7lnYo8UakZ3+5A0jxGw== - dependencies: - import-local "^2.0.0" - jest-cli "^24.9.0" - -js-sha3@0.5.7, js-sha3@^0.5.7: - version "0.5.7" - resolved "https://registry.yarnpkg.com/js-sha3/-/js-sha3-0.5.7.tgz#0d4ffd8002d5333aabaf4a23eed2f6374c9f28e7" - integrity sha1-DU/9gALVMzqrr0oj7tL2N0yfKOc= - -js-sha3@0.8.0, js-sha3@^0.8.0: - version "0.8.0" - resolved "https://registry.yarnpkg.com/js-sha3/-/js-sha3-0.8.0.tgz#b9b7a5da73afad7dedd0f8c463954cbde6818840" - integrity sha512-gF1cRrHhIzNfToc802P800N8PpXS+evLLXfsVpowqmAFR9uwbi89WvXg2QspOmXL8QL86J4T1EpFu+yUkwJY3Q== - -js-sha3@^0.6.1: - version "0.6.1" - resolved "https://registry.yarnpkg.com/js-sha3/-/js-sha3-0.6.1.tgz#5b89f77a7477679877f58c4a075240934b1f95c0" - integrity sha1-W4n3enR3Z5h39YxKB1JAk0sflcA= - -js-sha3@^0.7.0: - version "0.7.0" - resolved "https://registry.yarnpkg.com/js-sha3/-/js-sha3-0.7.0.tgz#0a5c57b36f79882573b2d84051f8bb85dd1bd63a" - integrity sha512-Wpks3yBDm0UcL5qlVhwW9Jr9n9i4FfeWBFOOXP5puDS/SiudJGhw7DPyBqn3487qD4F0lsC0q3zxink37f7zeA== - -"js-tokens@^3.0.0 || ^4.0.0", js-tokens@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" - integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ== - -js-tokens@^3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-3.0.2.tgz#9866df395102130e38f7f996bceb65443209c25b" - integrity sha1-mGbfOVECEw449/mWvOtlRDIJwls= - -js-yaml@3.x: - version "3.13.1" - resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.13.1.tgz#aff151b30bfdfa8e49e05da22e7415e9dfa37847" - integrity sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw== - dependencies: - argparse "^1.0.7" - esprima "^4.0.0" - -jsbn@~0.1.0: - version "0.1.1" - resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-0.1.1.tgz#a5e654c2e5a2deb5f201d96cefbca80c0ef2f513" - integrity sha1-peZUwuWi3rXyAdls77yoDA7y9RM= - -jsdom@^11.5.1: - version "11.12.0" - resolved "https://registry.yarnpkg.com/jsdom/-/jsdom-11.12.0.tgz#1a80d40ddd378a1de59656e9e6dc5a3ba8657bc8" - integrity sha512-y8Px43oyiBM13Zc1z780FrfNLJCXTL40EWlty/LXUtcjykRBNgLlCjWXpfSPBl2iv+N7koQN+dvqszHZgT/Fjw== - dependencies: - abab "^2.0.0" - acorn "^5.5.3" - acorn-globals "^4.1.0" - array-equal "^1.0.0" - cssom ">= 0.3.2 < 0.4.0" - cssstyle "^1.0.0" - data-urls "^1.0.0" - domexception "^1.0.1" - escodegen "^1.9.1" - html-encoding-sniffer "^1.0.2" - left-pad "^1.3.0" - nwsapi "^2.0.7" - parse5 "4.0.0" - pn "^1.1.0" - request "^2.87.0" - request-promise-native "^1.0.5" - sax "^1.2.4" - symbol-tree "^3.2.2" - tough-cookie "^2.3.4" - w3c-hr-time "^1.0.1" - webidl-conversions "^4.0.2" - whatwg-encoding "^1.0.3" - whatwg-mimetype "^2.1.0" - whatwg-url "^6.4.1" - ws "^5.2.0" - xml-name-validator "^3.0.0" - -jsesc@^1.3.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-1.3.0.tgz#46c3fec8c1892b12b0833db9bc7622176dbab34b" - integrity sha1-RsP+yMGJKxKwgz25vHYiF226s0s= - -jsesc@^2.5.1: - version "2.5.2" - resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-2.5.2.tgz#80564d2e483dacf6e8ef209650a67df3f0c283a4" - integrity sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA== - -jsesc@~0.5.0: - version "0.5.0" - resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-0.5.0.tgz#e7dee66e35d6fc16f710fe91d5cf69f70f08911d" - integrity sha1-597mbjXW/Bb3EP6R1c9p9w8IkR0= - -json-buffer@3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/json-buffer/-/json-buffer-3.0.0.tgz#5b1f397afc75d677bde8bcfc0e47e1f9a3d9a898" - integrity sha1-Wx85evx11ne96Lz8Dkfh+aPZqJg= - -json-parse-better-errors@^1.0.1, json-parse-better-errors@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz#bb867cfb3450e69107c131d1c514bab3dc8bcaa9" - integrity sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw== - -json-rpc-engine@^3.4.0, json-rpc-engine@^3.6.0: - version "3.8.0" - resolved "https://registry.yarnpkg.com/json-rpc-engine/-/json-rpc-engine-3.8.0.tgz#9d4ff447241792e1d0a232f6ef927302bb0c62a9" - integrity sha512-6QNcvm2gFuuK4TKU1uwfH0Qd/cOSb9c1lls0gbnIhciktIUQJwz6NQNAW4B1KiGPenv7IKu97V222Yo1bNhGuA== - dependencies: - async "^2.0.1" - babel-preset-env "^1.7.0" - babelify "^7.3.0" - json-rpc-error "^2.0.0" - promise-to-callback "^1.0.0" - safe-event-emitter "^1.0.1" - -json-rpc-engine@^5.1.3: - version "5.1.5" - resolved "https://registry.yarnpkg.com/json-rpc-engine/-/json-rpc-engine-5.1.5.tgz#a5f9915356ea916d5305716354080723c63dede7" - integrity sha512-HTT9HixG4j8vHYrmJIckgbISW9Q8tCkySv7x7Q8zjMpcw10wSe/dZSQ0w08VkDm3y195K4074UlvD3hxaznvlw== - dependencies: - async "^2.0.1" - eth-json-rpc-errors "^2.0.0" - promise-to-callback "^1.0.0" - safe-event-emitter "^1.0.1" - -json-rpc-error@2.0.0, json-rpc-error@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/json-rpc-error/-/json-rpc-error-2.0.0.tgz#a7af9c202838b5e905c7250e547f1aff77258a02" - integrity sha1-p6+cICg4tekFxyUOVH8a/3cligI= - dependencies: - inherits "^2.0.1" - -json-rpc-random-id@^1.0.0, json-rpc-random-id@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/json-rpc-random-id/-/json-rpc-random-id-1.0.1.tgz#ba49d96aded1444dbb8da3d203748acbbcdec8c8" - integrity sha1-uknZat7RRE27jaPSA3SKy7zeyMg= - -json-schema-traverse@^0.4.1: - version "0.4.1" - resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz#69f6a87d9513ab8bb8fe63bdb0979c448e684660" - integrity sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg== - -json-schema@0.2.3: - version "0.2.3" - resolved "https://registry.yarnpkg.com/json-schema/-/json-schema-0.2.3.tgz#b480c892e59a2f05954ce727bd3f2a4e882f9e13" - integrity sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM= - -json-stable-stringify-without-jsonify@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz#9db7b59496ad3f3cfef30a75142d2d930ad72651" - integrity sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE= - -json-stable-stringify@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/json-stable-stringify/-/json-stable-stringify-1.0.1.tgz#9a759d39c5f2ff503fd5300646ed445f88c4f9af" - integrity sha1-mnWdOcXy/1A/1TAGRu1EX4jE+a8= - dependencies: - jsonify "~0.0.0" - -json-stringify-safe@~5.0.1: - version "5.0.1" - resolved "https://registry.yarnpkg.com/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz#1296a2d58fd45f19a0f6ce01d65701e2c735b6eb" - integrity sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus= - -json5@2.x, json5@^2.1.0: - version "2.1.1" - resolved "https://registry.yarnpkg.com/json5/-/json5-2.1.1.tgz#81b6cb04e9ba496f1c7005d07b4368a2638f90b6" - integrity sha512-l+3HXD0GEI3huGq1njuqtzYK8OYJyXMkOLtQ53pjWh89tvWS2h6l+1zMkYWqlb57+SiQodKZyvMEFb2X+KrFhQ== - dependencies: - minimist "^1.2.0" - -json5@^0.5.1: - version "0.5.1" - resolved "https://registry.yarnpkg.com/json5/-/json5-0.5.1.tgz#1eade7acc012034ad84e2396767ead9fa5495821" - integrity sha1-Hq3nrMASA0rYTiOWdn6tn6VJWCE= - -json5@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/json5/-/json5-1.0.1.tgz#779fb0018604fa854eacbf6252180d83543e3dbe" - integrity sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow== - dependencies: - minimist "^1.2.0" - -jsonfile@^2.1.0: - version "2.4.0" - resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-2.4.0.tgz#3736a2b428b87bbda0cc83b53fa3d633a35c2ae8" - integrity sha1-NzaitCi4e72gzIO1P6PWM6NcKug= - optionalDependencies: - graceful-fs "^4.1.6" - -jsonfile@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-4.0.0.tgz#8771aae0799b64076b76640fca058f9c10e33ecb" - integrity sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss= - optionalDependencies: - graceful-fs "^4.1.6" - -jsonify@~0.0.0: - version "0.0.0" - resolved "https://registry.yarnpkg.com/jsonify/-/jsonify-0.0.0.tgz#2c74b6ee41d93ca51b7b5aaee8f503631d252a73" - integrity sha1-LHS27kHZPKUbe1qu6PUDYx0lKnM= - -jsonschema@^1.2.0: - version "1.2.5" - resolved "https://registry.yarnpkg.com/jsonschema/-/jsonschema-1.2.5.tgz#bab69d97fa28946aec0a56a9cc266d23fe80ae61" - integrity sha512-kVTF+08x25PQ0CjuVc0gRM9EUPb0Fe9Ln/utFOgcdxEIOHuU7ooBk/UPTd7t1M91pP35m0MU1T8M5P7vP1bRRw== - -jsprim@^1.2.2: - version "1.4.1" - resolved "https://registry.yarnpkg.com/jsprim/-/jsprim-1.4.1.tgz#313e66bc1e5cc06e438bc1b7499c2e5c56acb6a2" - integrity sha1-MT5mvB5cwG5Di8G3SZwuXFastqI= - dependencies: - assert-plus "1.0.0" - extsprintf "1.3.0" - json-schema "0.2.3" - verror "1.10.0" - -just-debounce@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/just-debounce/-/just-debounce-1.0.0.tgz#87fccfaeffc0b68cd19d55f6722943f929ea35ea" - integrity sha1-h/zPrv/AtozRnVX2cilD+SnqNeo= - -keccak@^1.0.2: - version "1.4.0" - resolved "https://registry.yarnpkg.com/keccak/-/keccak-1.4.0.tgz#572f8a6dbee8e7b3aa421550f9e6408ca2186f80" - integrity sha512-eZVaCpblK5formjPjeTBik7TAg+pqnDrMHIffSvi9Lh7PQgM1+hSzakUeZFCk9DVVG0dacZJuaz2ntwlzZUIBw== - dependencies: - bindings "^1.2.1" - inherits "^2.0.3" - nan "^2.2.1" - safe-buffer "^5.1.0" - -keccak@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/keccak/-/keccak-2.1.0.tgz#734ea53f2edcfd0f42cdb8d5f4c358fef052752b" - integrity sha512-m1wbJRTo+gWbctZWay9i26v5fFnYkOn7D5PCxJ3fZUGUEb49dE1Pm4BREUYCt/aoO6di7jeoGmhvqN9Nzylm3Q== - dependencies: - bindings "^1.5.0" - inherits "^2.0.4" - nan "^2.14.0" - safe-buffer "^5.2.0" - -keccakjs@^0.2.0: - version "0.2.3" - resolved "https://registry.yarnpkg.com/keccakjs/-/keccakjs-0.2.3.tgz#5e4e969ce39689a3861f445d7752ee3477f9fe72" - integrity sha512-BjLkNDcfaZ6l8HBG9tH0tpmDv3sS2mA7FNQxFHpCdzP3Gb2MVruXBSuoM66SnVxKJpAr5dKGdkHD+bDokt8fTg== - dependencies: - browserify-sha3 "^0.0.4" - sha3 "^1.2.2" - -keyv@^3.0.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/keyv/-/keyv-3.1.0.tgz#ecc228486f69991e49e9476485a5be1e8fc5c4d9" - integrity sha512-9ykJ/46SN/9KPM/sichzQ7OvXyGDYKGTaDlKMGCAlg2UK8KRy4jb0d8sFc+0Tt0YYnThq8X2RZgCg74RPxgcVA== - dependencies: - json-buffer "3.0.0" - -kind-of@^3.0.2, kind-of@^3.0.3, kind-of@^3.2.0: - version "3.2.2" - resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-3.2.2.tgz#31ea21a734bab9bbb0f32466d893aea51e4a3c64" - integrity sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ= - dependencies: - is-buffer "^1.1.5" - -kind-of@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-4.0.0.tgz#20813df3d712928b207378691a45066fae72dd57" - integrity sha1-IIE989cSkosgc3hpGkUGb65y3Vc= - dependencies: - is-buffer "^1.1.5" - -kind-of@^5.0.0, kind-of@^5.0.2: - version "5.1.0" - resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-5.1.0.tgz#729c91e2d857b7a419a1f9aa65685c4c33f5845d" - integrity sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw== - -kind-of@^6.0.0, kind-of@^6.0.2: - version "6.0.2" - resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-6.0.2.tgz#01146b36a6218e64e58f3a8d66de5d7fc6f6d051" - integrity sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA== - -klaw@^1.0.0: - version "1.3.1" - resolved "https://registry.yarnpkg.com/klaw/-/klaw-1.3.1.tgz#4088433b46b3b1ba259d78785d8e96f73ba02439" - integrity sha1-QIhDO0azsbolnXh4XY6W9zugJDk= - optionalDependencies: - graceful-fs "^4.1.9" - -kleur@^3.0.3: - version "3.0.3" - resolved "https://registry.yarnpkg.com/kleur/-/kleur-3.0.3.tgz#a79c9ecc86ee1ce3fa6206d1216c501f147fc07e" - integrity sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w== - -last-run@^1.1.0: - version "1.1.1" - resolved "https://registry.yarnpkg.com/last-run/-/last-run-1.1.1.tgz#45b96942c17b1c79c772198259ba943bebf8ca5b" - integrity sha1-RblpQsF7HHnHchmCWbqUO+v4yls= - dependencies: - default-resolution "^2.0.0" - es6-weak-map "^2.0.1" - -lazystream@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/lazystream/-/lazystream-1.0.0.tgz#f6995fe0f820392f61396be89462407bb77168e4" - integrity sha1-9plf4PggOS9hOWvolGJAe7dxaOQ= - dependencies: - readable-stream "^2.0.5" - -lcid@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/lcid/-/lcid-1.0.0.tgz#308accafa0bc483a3867b4b6f2b9506251d1b835" - integrity sha1-MIrMr6C8SDo4Z7S28rlQYlHRuDU= - dependencies: - invert-kv "^1.0.0" - -lead@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/lead/-/lead-1.0.0.tgz#6f14f99a37be3a9dd784f5495690e5903466ee42" - integrity sha1-bxT5mje+Op3XhPVJVpDlkDRm7kI= - dependencies: - flush-write-stream "^1.0.2" - -left-pad@^1.3.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/left-pad/-/left-pad-1.3.0.tgz#5b8a3a7765dfe001261dde915589e782f8c94d1e" - integrity sha512-XI5MPzVNApjAyhQzphX8BkmKsKUxD4LdyK24iZeQGinBN9yTQT3bFlCBy/aVx2HrNcqQGsdot8ghrjyrvMCoEA== - -level-codec@^9.0.0: - version "9.0.1" - resolved "https://registry.yarnpkg.com/level-codec/-/level-codec-9.0.1.tgz#042f4aa85e56d4328ace368c950811ba802b7247" - integrity sha512-ajFP0kJ+nyq4i6kptSM+mAvJKLOg1X5FiFPtLG9M5gCEZyBmgDi3FkDrvlMkEzrUn1cWxtvVmrvoS4ASyO/q+Q== - -level-codec@~7.0.0: - version "7.0.1" - resolved "https://registry.yarnpkg.com/level-codec/-/level-codec-7.0.1.tgz#341f22f907ce0f16763f24bddd681e395a0fb8a7" - integrity sha512-Ua/R9B9r3RasXdRmOtd+t9TCOEIIlts+TN/7XTT2unhDaL6sJn83S3rUyljbr6lVtw49N3/yA0HHjpV6Kzb2aQ== - -level-errors@^1.0.3: - version "1.1.2" - resolved "https://registry.yarnpkg.com/level-errors/-/level-errors-1.1.2.tgz#4399c2f3d3ab87d0625f7e3676e2d807deff404d" - integrity sha512-Sw/IJwWbPKF5Ai4Wz60B52yj0zYeqzObLh8k1Tk88jVmD51cJSKWSYpRyhVIvFzZdvsPqlH5wfhp/yxdsaQH4w== - dependencies: - errno "~0.1.1" - -level-errors@^2.0.0, level-errors@~2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/level-errors/-/level-errors-2.0.1.tgz#2132a677bf4e679ce029f517c2f17432800c05c8" - integrity sha512-UVprBJXite4gPS+3VznfgDSU8PTRuVX0NXwoWW50KLxd2yw4Y1t2JUR5In1itQnudZqRMT9DlAM3Q//9NCjCFw== - dependencies: - errno "~0.1.1" - -level-errors@~1.0.3: - version "1.0.5" - resolved "https://registry.yarnpkg.com/level-errors/-/level-errors-1.0.5.tgz#83dbfb12f0b8a2516bdc9a31c4876038e227b859" - integrity sha512-/cLUpQduF6bNrWuAC4pwtUKA5t669pCsCi2XbmojG2tFeOr9j6ShtdDCtFFQO1DRt+EVZhx9gPzP9G2bUaG4ig== - dependencies: - errno "~0.1.1" - -level-iterator-stream@^2.0.3: - version "2.0.3" - resolved "https://registry.yarnpkg.com/level-iterator-stream/-/level-iterator-stream-2.0.3.tgz#ccfff7c046dcf47955ae9a86f46dfa06a31688b4" - integrity sha512-I6Heg70nfF+e5Y3/qfthJFexhRw/Gi3bIymCoXAlijZdAcLaPuWSJs3KXyTYf23ID6g0o2QF62Yh+grOXY3Rig== - dependencies: - inherits "^2.0.1" - readable-stream "^2.0.5" - xtend "^4.0.0" - -level-iterator-stream@~1.3.0: - version "1.3.1" - resolved "https://registry.yarnpkg.com/level-iterator-stream/-/level-iterator-stream-1.3.1.tgz#e43b78b1a8143e6fa97a4f485eb8ea530352f2ed" - integrity sha1-5Dt4sagUPm+pek9IXrjqUwNS8u0= - dependencies: - inherits "^2.0.1" - level-errors "^1.0.3" - readable-stream "^1.0.33" - xtend "^4.0.0" - -level-iterator-stream@~3.0.0: - version "3.0.1" - resolved "https://registry.yarnpkg.com/level-iterator-stream/-/level-iterator-stream-3.0.1.tgz#2c98a4f8820d87cdacab3132506815419077c730" - integrity sha512-nEIQvxEED9yRThxvOrq8Aqziy4EGzrxSZK+QzEFAVuJvQ8glfyZ96GB6BoI4sBbLfjMXm2w4vu3Tkcm9obcY0g== - dependencies: - inherits "^2.0.1" - readable-stream "^2.3.6" - xtend "^4.0.0" - -level-mem@^3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/level-mem/-/level-mem-3.0.1.tgz#7ce8cf256eac40f716eb6489654726247f5a89e5" - integrity sha512-LbtfK9+3Ug1UmvvhR2DqLqXiPW1OJ5jEh0a3m9ZgAipiwpSxGj/qaVVy54RG5vAQN1nCuXqjvprCuKSCxcJHBg== - dependencies: - level-packager "~4.0.0" - memdown "~3.0.0" - -level-packager@~4.0.0: - version "4.0.1" - resolved "https://registry.yarnpkg.com/level-packager/-/level-packager-4.0.1.tgz#7e7d3016af005be0869bc5fa8de93d2a7f56ffe6" - integrity sha512-svCRKfYLn9/4CoFfi+d8krOtrp6RoX8+xm0Na5cgXMqSyRru0AnDYdLl+YI8u1FyS6gGZ94ILLZDE5dh2but3Q== - dependencies: - encoding-down "~5.0.0" - levelup "^3.0.0" - -level-post@^1.0.7: - version "1.0.7" - resolved "https://registry.yarnpkg.com/level-post/-/level-post-1.0.7.tgz#19ccca9441a7cc527879a0635000f06d5e8f27d0" - integrity sha512-PWYqG4Q00asOrLhX7BejSajByB4EmG2GaKHfj3h5UmmZ2duciXLPGYWIjBzLECFWUGOZWlm5B20h/n3Gs3HKew== - dependencies: - ltgt "^2.1.2" - -level-sublevel@6.6.4: - version "6.6.4" - resolved "https://registry.yarnpkg.com/level-sublevel/-/level-sublevel-6.6.4.tgz#f7844ae893919cd9d69ae19d7159499afd5352ba" - integrity sha512-pcCrTUOiO48+Kp6F1+UAzF/OtWqLcQVTVF39HLdZ3RO8XBoXt+XVPKZO1vVr1aUoxHZA9OtD2e1v7G+3S5KFDA== - dependencies: - bytewise "~1.1.0" - level-codec "^9.0.0" - level-errors "^2.0.0" - level-iterator-stream "^2.0.3" - ltgt "~2.1.1" - pull-defer "^0.2.2" - pull-level "^2.0.3" - pull-stream "^3.6.8" - typewiselite "~1.0.0" - xtend "~4.0.0" - -level-ws@0.0.0: - version "0.0.0" - resolved "https://registry.yarnpkg.com/level-ws/-/level-ws-0.0.0.tgz#372e512177924a00424b0b43aef2bb42496d228b" - integrity sha1-Ny5RIXeSSgBCSwtDrvK7QkltIos= - dependencies: - readable-stream "~1.0.15" - xtend "~2.1.1" - -levelup@3.1.1, levelup@^3.0.0: - version "3.1.1" - resolved "https://registry.yarnpkg.com/levelup/-/levelup-3.1.1.tgz#c2c0b3be2b4dc316647c53b42e2f559e232d2189" - integrity sha512-9N10xRkUU4dShSRRFTBdNaBxofz+PGaIZO962ckboJZiNmLuhVT6FZ6ZKAsICKfUBO76ySaYU6fJWX/jnj3Lcg== - dependencies: - deferred-leveldown "~4.0.0" - level-errors "~2.0.0" - level-iterator-stream "~3.0.0" - xtend "~4.0.0" - -levelup@^1.2.1: - version "1.3.9" - resolved "https://registry.yarnpkg.com/levelup/-/levelup-1.3.9.tgz#2dbcae845b2bb2b6bea84df334c475533bbd82ab" - 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" - -leven@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/leven/-/leven-3.1.0.tgz#77891de834064cccba82ae7842bb6b14a13ed7f2" - integrity sha512-qsda+H8jTaUaN/x5vzW2rzc+8Rw4TAQ/4KjB46IwK5VH+IlVeeeje/EoZRpiXvIqjFgK84QffqPztGI3VBLG1A== - -levn@~0.3.0: - version "0.3.0" - resolved "https://registry.yarnpkg.com/levn/-/levn-0.3.0.tgz#3b09924edf9f083c0490fdd4c0bc4421e04764ee" - integrity sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4= - dependencies: - prelude-ls "~1.1.2" - type-check "~0.3.2" - -liftoff@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/liftoff/-/liftoff-3.1.0.tgz#c9ba6081f908670607ee79062d700df062c52ed3" - integrity sha512-DlIPlJUkCV0Ips2zf2pJP0unEoT1kwYhiiPUGF3s/jtxTCjziNLoiVVh+jqWOWeFi6mmwQ5fNxvAUyPad4Dfog== - dependencies: - extend "^3.0.0" - findup-sync "^3.0.0" - fined "^1.0.1" - flagged-respawn "^1.0.0" - is-plain-object "^2.0.4" - object.map "^1.0.0" - rechoir "^0.6.2" - resolve "^1.1.7" - -load-json-file@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/load-json-file/-/load-json-file-1.1.0.tgz#956905708d58b4bab4c2261b04f59f31c99374c0" - integrity sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA= - dependencies: - graceful-fs "^4.1.2" - parse-json "^2.2.0" - pify "^2.0.0" - pinkie-promise "^2.0.0" - strip-bom "^2.0.0" - -load-json-file@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/load-json-file/-/load-json-file-4.0.0.tgz#2f5f45ab91e33216234fd53adab668eb4ec0993b" - integrity sha1-L19Fq5HjMhYjT9U62rZo607AmTs= - dependencies: - graceful-fs "^4.1.2" - parse-json "^4.0.0" - pify "^3.0.0" - strip-bom "^3.0.0" - -loader-runner@^2.4.0: - version "2.4.0" - resolved "https://registry.yarnpkg.com/loader-runner/-/loader-runner-2.4.0.tgz#ed47066bfe534d7e84c4c7b9998c2a75607d9357" - integrity sha512-Jsmr89RcXGIwivFY21FcRrisYZfvLMTWx5kOLc+JTxtpBOG6xML0vzbc6SEQG2FO9/4Fc3wW4LVcB5DmGflaRw== - -loader-utils@^1.0.2, loader-utils@^1.2.3: - version "1.2.3" - resolved "https://registry.yarnpkg.com/loader-utils/-/loader-utils-1.2.3.tgz#1ff5dc6911c9f0a062531a4c04b609406108c2c7" - integrity sha512-fkpz8ejdnEMG3s37wGL07iSBDg99O9D5yflE9RGNH3hRdx9SOwYfnGYdZOUIZitN8E+E2vkq3MUMYMvPYl5ZZA== - dependencies: - big.js "^5.2.2" - emojis-list "^2.0.0" - json5 "^1.0.1" - -loader-utils@^1.4.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/loader-utils/-/loader-utils-1.4.0.tgz#c579b5e34cb34b1a74edc6c1fb36bfa371d5a613" - integrity sha512-qH0WSMBtn/oHuwjy/NucEgbx5dbxxnxup9s4PVXJUDHZBQY+s0NWA9rJf53RBnQZxfch7euUui7hpoAPvALZdA== - dependencies: - big.js "^5.2.2" - emojis-list "^3.0.0" - json5 "^1.0.1" - -locate-path@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-2.0.0.tgz#2b568b265eec944c6d9c0de9c3dbbbca0354cd8e" - integrity sha1-K1aLJl7slExtnA3pw9u7ygNUzY4= - dependencies: - p-locate "^2.0.0" - path-exists "^3.0.0" - -locate-path@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-3.0.0.tgz#dbec3b3ab759758071b58fe59fc41871af21400e" - integrity sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A== - dependencies: - p-locate "^3.0.0" - path-exists "^3.0.0" - -lodash.flatmap@^4.5.0: - version "4.5.0" - resolved "https://registry.yarnpkg.com/lodash.flatmap/-/lodash.flatmap-4.5.0.tgz#ef8cbf408f6e48268663345305c6acc0b778702e" - integrity sha1-74y/QI9uSCaGYzRTBcaswLd4cC4= - -lodash.memoize@4.x: - version "4.1.2" - resolved "https://registry.yarnpkg.com/lodash.memoize/-/lodash.memoize-4.1.2.tgz#bcc6c49a42a2840ed997f323eada5ecd182e0bfe" - integrity sha1-vMbEmkKihA7Zl/Mj6tpezRguC/4= - -lodash.sortby@^4.7.0: - version "4.7.0" - resolved "https://registry.yarnpkg.com/lodash.sortby/-/lodash.sortby-4.7.0.tgz#edd14c824e2cc9c1e0b0a1b42bb5210516a42438" - integrity sha1-7dFMgk4sycHgsKG0K7UhBRakJDg= - -lodash.values@^4.3.0: - version "4.3.0" - resolved "https://registry.yarnpkg.com/lodash.values/-/lodash.values-4.3.0.tgz#a3a6c2b0ebecc5c2cba1c17e6e620fe81b53d347" - integrity sha1-o6bCsOvsxcLLocF+bmIP6BtT00c= - -lodash@4.17.14: - version "4.17.14" - resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.14.tgz#9ce487ae66c96254fe20b599f21b6816028078ba" - integrity sha512-mmKYbW3GLuJeX+iGP+Y7Gp1AiGHGbXHCOh/jZmrawMmsE7MS4znI3RL2FsjbqOyMayHInjOeykW7PEajUk1/xw== - -lodash@^4.17.11, lodash@^4.17.13, lodash@^4.17.14, lodash@^4.17.15, lodash@^4.17.4: - version "4.17.15" - resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.15.tgz#b447f6670a0455bbfeedd11392eff330ea097548" - integrity sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A== - -loglevel@^1.6.1: - version "1.6.6" - resolved "https://registry.yarnpkg.com/loglevel/-/loglevel-1.6.6.tgz#0ee6300cc058db6b3551fa1c4bf73b83bb771312" - integrity sha512-Sgr5lbboAUBo3eXCSPL4/KoVz3ROKquOjcctxmHIt+vol2DrqTQe3SwkKKuYhEiWB5kYa13YyopJ69deJ1irzQ== - -looper@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/looper/-/looper-2.0.0.tgz#66cd0c774af3d4fedac53794f742db56da8f09ec" - integrity sha1-Zs0Md0rz1P7axTeU90LbVtqPCew= - -looper@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/looper/-/looper-3.0.0.tgz#2efa54c3b1cbaba9b94aee2e5914b0be57fbb749" - integrity sha1-LvpUw7HLq6m5Su4uWRSwvlf7t0k= - -loose-envify@^1.0.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/loose-envify/-/loose-envify-1.4.0.tgz#71ee51fa7be4caec1a63839f7e682d8132d30caf" - integrity sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q== - dependencies: - js-tokens "^3.0.0 || ^4.0.0" - -lowercase-keys@^1.0.0, lowercase-keys@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/lowercase-keys/-/lowercase-keys-1.0.1.tgz#6f9e30b47084d971a7c820ff15a6c5167b74c26f" - integrity sha512-G2Lj61tXDnVFFOi8VZds+SoQjtQC3dgokKdDG2mTm1tx4m50NUHBOZSBwQQHyy0V12A0JTG4icfZQH+xPyh8VA== - -lowercase-keys@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/lowercase-keys/-/lowercase-keys-2.0.0.tgz#2603e78b7b4b0006cbca2fbcc8a3202558ac9479" - integrity sha512-tqNXrS78oMOE73NMxK4EMLQsQowWf8jKooH9g7xPavRT706R6bkQJ6DY2Te7QukaZsulxa30wQ7bk0pm4XiHmA== - -lru-cache@^3.2.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-3.2.0.tgz#71789b3b7f5399bec8565dda38aa30d2a097efee" - integrity sha1-cXibO39Tmb7IVl3aOKow0qCX7+4= - dependencies: - pseudomap "^1.0.1" - -lru-cache@^4.0.1: - version "4.1.5" - resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-4.1.5.tgz#8bbe50ea85bed59bc9e33dcab8235ee9bcf443cd" - integrity sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g== - dependencies: - pseudomap "^1.0.2" - yallist "^2.1.2" - -lru-cache@^5.1.1: - version "5.1.1" - resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-5.1.1.tgz#1da27e6710271947695daf6848e847f01d84b920" - integrity sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w== - dependencies: - yallist "^3.0.2" - -ltgt@^2.1.2, ltgt@~2.2.0: - version "2.2.1" - resolved "https://registry.yarnpkg.com/ltgt/-/ltgt-2.2.1.tgz#f35ca91c493f7b73da0e07495304f17b31f87ee5" - integrity sha1-81ypHEk/e3PaDgdJUwTxezH4fuU= - -ltgt@~2.1.1: - version "2.1.3" - resolved "https://registry.yarnpkg.com/ltgt/-/ltgt-2.1.3.tgz#10851a06d9964b971178441c23c9e52698eece34" - integrity sha1-EIUaBtmWS5cReEQcI8nlJpjuzjQ= - -make-dir@^1.0.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-1.3.0.tgz#79c1033b80515bd6d24ec9933e860ca75ee27f0c" - integrity sha512-2w31R7SJtieJJnQtGc7RVL2StM2vGYVfqUOvUDxH6bC6aJTxPxTF0GnIgCyu7tjockiUWAYQRbxa7vKn34s5sQ== - dependencies: - pify "^3.0.0" - -make-dir@^2.0.0, make-dir@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-2.1.0.tgz#5f0310e18b8be898cc07009295a30ae41e91e6f5" - integrity sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA== - dependencies: - pify "^4.0.1" - semver "^5.6.0" - -make-error@1.x: - version "1.3.5" - resolved "https://registry.yarnpkg.com/make-error/-/make-error-1.3.5.tgz#efe4e81f6db28cadd605c70f29c831b58ef776c8" - integrity sha512-c3sIjNUow0+8swNwVpqoH4YCShKNFkMaw6oH1mNS2haDZQqkeZFlHS3dhoeEbKKmJB4vXpJucU6oH75aDYeE9g== - -make-iterator@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/make-iterator/-/make-iterator-1.0.1.tgz#29b33f312aa8f547c4a5e490f56afcec99133ad6" - integrity sha512-pxiuXh0iVEq7VM7KMIhs5gxsfxCux2URptUQaXo4iZZJxBAzTPOLE2BumO5dbfVYq/hBJFBR/a1mFDmOx5AGmw== - dependencies: - kind-of "^6.0.2" - -makeerror@1.0.x: - version "1.0.11" - resolved "https://registry.yarnpkg.com/makeerror/-/makeerror-1.0.11.tgz#e01a5c9109f2af79660e4e8b9587790184f5a96c" - integrity sha1-4BpckQnyr3lmDk6LlYd5AYT1qWw= - dependencies: - tmpl "1.0.x" - -map-cache@^0.2.0, map-cache@^0.2.2: - version "0.2.2" - resolved "https://registry.yarnpkg.com/map-cache/-/map-cache-0.2.2.tgz#c32abd0bd6525d9b051645bb4f26ac5dc98a0dbf" - integrity sha1-wyq9C9ZSXZsFFkW7TyasXcmKDb8= - -map-visit@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/map-visit/-/map-visit-1.0.0.tgz#ecdca8f13144e660f1b5bd41f12f3479d98dfb8f" - integrity sha1-7Nyo8TFE5mDxtb1B8S80edmN+48= - dependencies: - object-visit "^1.0.0" - -matchdep@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/matchdep/-/matchdep-2.0.0.tgz#c6f34834a0d8dbc3b37c27ee8bbcb27c7775582e" - integrity sha1-xvNINKDY28OzfCfui7yyfHd1WC4= - dependencies: - findup-sync "^2.0.0" - micromatch "^3.0.4" - resolve "^1.4.0" - stack-trace "0.0.10" - -md5.js@^1.3.4: - version "1.3.5" - resolved "https://registry.yarnpkg.com/md5.js/-/md5.js-1.3.5.tgz#b5d07b8e3216e3e27cd728d72f70d1e6a342005f" - integrity sha512-xitP+WxNPcTTOgnTJcrhM0xvdPepipPSf3I8EIpGKeFLjt3PlJLIDG3u8EX53ZIubkb+5U2+3rELYpEhHhzdkg== - dependencies: - hash-base "^3.0.0" - inherits "^2.0.1" - safe-buffer "^5.1.2" - -media-typer@0.3.0: - version "0.3.0" - resolved "https://registry.yarnpkg.com/media-typer/-/media-typer-0.3.0.tgz#8710d7af0aa626f8fffa1ce00168545263255748" - integrity sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g= - -mem@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/mem/-/mem-1.1.0.tgz#5edd52b485ca1d900fe64895505399a0dfa45f76" - integrity sha1-Xt1StIXKHZAP5kiVUFOZoN+kX3Y= - dependencies: - mimic-fn "^1.0.0" - -memdown@^1.0.0: - version "1.4.1" - resolved "https://registry.yarnpkg.com/memdown/-/memdown-1.4.1.tgz#b4e4e192174664ffbae41361aa500f3119efe215" - 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" - -memdown@~3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/memdown/-/memdown-3.0.0.tgz#93aca055d743b20efc37492e9e399784f2958309" - integrity sha512-tbV02LfZMWLcHcq4tw++NuqMO+FZX8tNJEiD2aNRm48ZZusVg5N8NART+dmBkepJVye986oixErf7jfXboMGMA== - dependencies: - abstract-leveldown "~5.0.0" - functional-red-black-tree "~1.0.1" - immediate "~3.2.3" - inherits "~2.0.1" - ltgt "~2.2.0" - safe-buffer "~5.1.1" - -memory-fs@^0.4.1: - version "0.4.1" - resolved "https://registry.yarnpkg.com/memory-fs/-/memory-fs-0.4.1.tgz#3a9a20b8462523e447cfbc7e8bb80ed667bfc552" - integrity sha1-OpoguEYlI+RHz7x+i7gO1me/xVI= - dependencies: - errno "^0.1.3" - readable-stream "^2.0.1" - -memory-fs@^0.5.0: - version "0.5.0" - resolved "https://registry.yarnpkg.com/memory-fs/-/memory-fs-0.5.0.tgz#324c01288b88652966d161db77838720845a8e3c" - integrity sha512-jA0rdU5KoQMC0e6ppoNRtpp6vjFq6+NY7r8hywnC7V+1Xj/MtHwGIbB1QaK/dunyjWteJzmkpd7ooeWg10T7GA== - dependencies: - errno "^0.1.3" - readable-stream "^2.0.1" - -memorystream@^0.3.1: - version "0.3.1" - resolved "https://registry.yarnpkg.com/memorystream/-/memorystream-0.3.1.tgz#86d7090b30ce455d63fbae12dda51a47ddcaf9b2" - integrity sha1-htcJCzDORV1j+64S3aUaR93K+bI= - -merge-descriptors@1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/merge-descriptors/-/merge-descriptors-1.0.1.tgz#b00aaa556dd8b44568150ec9d1b953f3f90cbb61" - integrity sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E= - -merge-stream@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/merge-stream/-/merge-stream-2.0.0.tgz#52823629a14dd00c9770fb6ad47dc6310f2c1f60" - integrity sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w== - -merge2@^1.3.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/merge2/-/merge2-1.3.0.tgz#5b366ee83b2f1582c48f87e47cf1a9352103ca81" - integrity sha512-2j4DAdlBOkiSZIsaXk4mTE3sRS02yBHAtfy127xRV3bQUFqXkjHCHLW6Scv7DwNRbIWNHH8zpnz9zMaKXIdvYw== - -merkle-patricia-tree@2.3.2, merkle-patricia-tree@^2.1.2, merkle-patricia-tree@^2.3.2: - version "2.3.2" - resolved "https://registry.yarnpkg.com/merkle-patricia-tree/-/merkle-patricia-tree-2.3.2.tgz#982ca1b5a0fde00eed2f6aeed1f9152860b8208a" - 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" - -methods@~1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/methods/-/methods-1.1.2.tgz#5529a4d67654134edcc5266656835b0f851afcee" - integrity sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4= - -micromatch@^3.0.4, micromatch@^3.1.10, micromatch@^3.1.4: - version "3.1.10" - resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-3.1.10.tgz#70859bc95c9840952f359a068a3fc49f9ecfac23" - integrity sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg== - dependencies: - arr-diff "^4.0.0" - array-unique "^0.3.2" - braces "^2.3.1" - define-property "^2.0.2" - extend-shallow "^3.0.2" - extglob "^2.0.4" - fragment-cache "^0.2.1" - kind-of "^6.0.2" - nanomatch "^1.2.9" - object.pick "^1.3.0" - regex-not "^1.0.0" - snapdragon "^0.8.1" - to-regex "^3.0.2" - -micromatch@^4.0.0, micromatch@^4.0.2: - version "4.0.2" - resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-4.0.2.tgz#4fcb0999bf9fbc2fcbdd212f6d629b9a56c39259" - integrity sha512-y7FpHSbMUMoyPbYUSzO6PaZ6FyRnQOpHuKwbo1G+Knck95XVU4QAiKdGEnj5wwoS7PlOgthX/09u5iFJ+aYf5Q== - dependencies: - braces "^3.0.1" - picomatch "^2.0.5" - -miller-rabin@^4.0.0: - version "4.0.1" - resolved "https://registry.yarnpkg.com/miller-rabin/-/miller-rabin-4.0.1.tgz#f080351c865b0dc562a8462966daa53543c78a4d" - integrity sha512-115fLhvZVqWwHPbClyntxEVfVDfl9DLLTuJvq3g2O/Oxi8AiNouAHvDSzHS0viUJc+V5vm3eq91Xwqn9dp4jRA== - dependencies: - bn.js "^4.0.0" - brorand "^1.0.1" - -mime-db@1.42.0: - version "1.42.0" - resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.42.0.tgz#3e252907b4c7adb906597b4b65636272cf9e7bac" - integrity sha512-UbfJCR4UAVRNgMpfImz05smAXK7+c+ZntjaA26ANtkXLlOe947Aag5zdIcKQULAiF9Cq4WxBi9jUs5zkA84bYQ== - -mime-types@^2.1.12, mime-types@^2.1.16, mime-types@~2.1.19, mime-types@~2.1.24: - version "2.1.25" - resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.25.tgz#39772d46621f93e2a80a856c53b86a62156a6437" - integrity sha512-5KhStqB5xpTAeGqKBAMgwaYMnQik7teQN4IAzC7npDv6kzeU6prfkR67bc87J1kWMPGkoaZSq1npmexMgkmEVg== - dependencies: - mime-db "1.42.0" - -mime@1.6.0: - version "1.6.0" - resolved "https://registry.yarnpkg.com/mime/-/mime-1.6.0.tgz#32cd9e5c64553bd58d19a568af452acff04981b1" - integrity sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg== - -mimic-fn@^1.0.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-1.2.0.tgz#820c86a39334640e99516928bd03fca88057d022" - integrity sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ== - -mimic-response@^1.0.0, mimic-response@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/mimic-response/-/mimic-response-1.0.1.tgz#4923538878eef42063cb8a3e3b0798781487ab1b" - integrity sha512-j5EctnkH7amfV/q5Hgmoal1g2QHFJRraOtmx0JpIqkxhBhI/lJSl1nMpQ45hVarwNETOoWEimndZ4QK0RHxuxQ== - -mimic-response@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/mimic-response/-/mimic-response-2.0.0.tgz#996a51c60adf12cb8a87d7fb8ef24c2f3d5ebb46" - integrity sha512-8ilDoEapqA4uQ3TwS0jakGONKXVJqpy+RpM+3b7pLdOjghCrEiGp9SRkFbUHAmZW9vdnrENWHjaweIoTIJExSQ== - -min-document@^2.19.0: - version "2.19.0" - resolved "https://registry.yarnpkg.com/min-document/-/min-document-2.19.0.tgz#7bd282e3f5842ed295bb748cdd9f1ffa2c824685" - integrity sha1-e9KC4/WELtKVu3SM3Z8f+iyCRoU= - dependencies: - dom-walk "^0.1.0" - -minimalistic-assert@^1.0.0, minimalistic-assert@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz#2e194de044626d4a10e7f7fbc00ce73e83e4d5c7" - integrity sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A== - -minimalistic-crypto-utils@^1.0.0, minimalistic-crypto-utils@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz#f6c00c1c0b082246e5c4d99dfb8c7c083b2b582a" - integrity sha1-9sAMHAsIIkblxNmd+4x8CDsrWCo= - -"minimatch@2 || 3", minimatch@^3.0.4: - version "3.0.4" - resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083" - integrity sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA== - dependencies: - brace-expansion "^1.1.7" - -minimist@0.0.8: - version "0.0.8" - resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.8.tgz#857fcabfc3397d2625b8228262e86aa7a011b05d" - integrity sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0= - -minimist@^1.1.1, minimist@^1.2.0, minimist@~1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.0.tgz#a35008b20f41383eec1fb914f4cd5df79a264284" - integrity sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ= - -minimist@^1.2.5: - version "1.2.5" - resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.5.tgz#67d66014b66a6a8aaa0c083c5fd58df4e4e97602" - integrity sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw== - -minimist@~0.0.1: - version "0.0.10" - resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.10.tgz#de3f98543dbf96082be48ad1a0c7cda836301dcf" - integrity sha1-3j+YVD2/lggr5IrRoMfNqDYwHc8= - -minipass@^2.6.0, minipass@^2.8.6, minipass@^2.9.0: - version "2.9.0" - resolved "https://registry.yarnpkg.com/minipass/-/minipass-2.9.0.tgz#e713762e7d3e32fed803115cf93e04bca9fcc9a6" - integrity sha512-wxfUjg9WebH+CUDX/CdbRlh5SmfZiy/hpkxaRI16Y9W56Pa75sWgd/rvFilSgrauD9NyFymP/+JFV3KwzIsJeg== - dependencies: - safe-buffer "^5.1.2" - yallist "^3.0.0" - -minizlib@^1.2.1: - version "1.3.3" - resolved "https://registry.yarnpkg.com/minizlib/-/minizlib-1.3.3.tgz#2290de96818a34c29551c8a8d301216bd65a861d" - integrity sha512-6ZYMOEnmVsdCeTJVE0W9ZD+pVnE8h9Hma/iOwwRDsdQoePpoX56/8B6z3P9VNwppJuBKNRuFDRNRqRWexT9G9Q== - dependencies: - minipass "^2.9.0" - -mississippi@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/mississippi/-/mississippi-3.0.0.tgz#ea0a3291f97e0b5e8776b363d5f0a12d94c67022" - integrity sha512-x471SsVjUtBRtcvd4BzKE9kFC+/2TeWgKCgw0bZcw1b9l2X3QX5vCWgF+KaZaYm87Ss//rHnWryupDrgLvmSkA== - dependencies: - concat-stream "^1.5.0" - duplexify "^3.4.2" - end-of-stream "^1.1.0" - flush-write-stream "^1.0.0" - from2 "^2.1.0" - parallel-transform "^1.1.0" - pump "^3.0.0" - pumpify "^1.3.3" - stream-each "^1.1.0" - through2 "^2.0.0" - -mixin-deep@^1.2.0: - version "1.3.2" - resolved "https://registry.yarnpkg.com/mixin-deep/-/mixin-deep-1.3.2.tgz#1120b43dc359a785dce65b55b82e257ccf479566" - integrity sha512-WRoDn//mXBiJ1H40rqa3vH0toePwSsGb45iInWlTySa+Uu4k3tYUSxa2v1KqAiLtvlrSzaExqS1gtk96A9zvEA== - dependencies: - for-in "^1.0.2" - is-extendable "^1.0.1" - -mkdirp-promise@^5.0.1: - version "5.0.1" - resolved "https://registry.yarnpkg.com/mkdirp-promise/-/mkdirp-promise-5.0.1.tgz#e9b8f68e552c68a9c1713b84883f7a1dd039b8a1" - integrity sha1-6bj2jlUsaKnBcTuEiD96HdA5uKE= - dependencies: - mkdirp "*" - -mkdirp@*, mkdirp@0.5.1, mkdirp@0.5.x, mkdirp@0.x, mkdirp@^0.5.0, mkdirp@^0.5.1: - version "0.5.1" - resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.1.tgz#30057438eac6cf7f8c4767f38648d6697d75c903" - integrity sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM= - dependencies: - minimist "0.0.8" - -mkdirp@^0.5.3: - version "0.5.5" - resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.5.tgz#d91cefd62d1436ca0f41620e251288d420099def" - integrity sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ== - dependencies: - minimist "^1.2.5" - -mkdirp@^1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-1.0.4.tgz#3eb5ed62622756d79a5f0e2a221dfebad75c2f7e" - integrity sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw== - -mocha@^4.0.1: - version "4.1.0" - resolved "https://registry.yarnpkg.com/mocha/-/mocha-4.1.0.tgz#7d86cfbcf35cb829e2754c32e17355ec05338794" - integrity sha512-0RVnjg1HJsXY2YFDoTNzcc1NKhYuXKRrBAG2gDygmJJA136Cs2QlRliZG1mA0ap7cuaT30mw16luAeln+4RiNA== - dependencies: - browser-stdout "1.3.0" - commander "2.11.0" - debug "3.1.0" - diff "3.3.1" - escape-string-regexp "1.0.5" - glob "7.1.2" - growl "1.10.3" - he "1.1.1" - mkdirp "0.5.1" - supports-color "4.4.0" - -mock-fs@^4.1.0: - version "4.10.4" - resolved "https://registry.yarnpkg.com/mock-fs/-/mock-fs-4.10.4.tgz#4eaa3d6f7da2f44e1f3dd6b462cbbcb7b082e3d4" - integrity sha512-gDfZDLaPIvtOusbusLinfx6YSe2YpQsDT8qdP41P47dQ/NQggtkHukz7hwqgt8QvMBmAv+Z6DGmXPyb5BWX2nQ== - -move-concurrently@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/move-concurrently/-/move-concurrently-1.0.1.tgz#be2c005fda32e0b29af1f05d7c4b33214c701f92" - integrity sha1-viwAX9oy4LKa8fBdfEszIUxwH5I= - dependencies: - aproba "^1.1.1" - copy-concurrently "^1.0.0" - fs-write-stream-atomic "^1.0.8" - mkdirp "^0.5.1" - rimraf "^2.5.4" - run-queue "^1.0.3" - -ms@2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" - integrity sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g= - -ms@2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.1.tgz#30a5864eb3ebb0a66f2ebe6d727af06a09d86e0a" - integrity sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg== - -ms@^2.1.1: - version "2.1.2" - resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009" - integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== - -multibase@^0.7.0: - version "0.7.0" - resolved "https://registry.yarnpkg.com/multibase/-/multibase-0.7.0.tgz#1adfc1c50abe05eefeb5091ac0c2728d6b84581b" - integrity sha512-TW8q03O0f6PNFTQDvh3xxH03c8CjGaaYrjkl9UQPG6rz53TQzzxJVCIWVjzcbN/Q5Y53Zd0IBQBMVktVgNx4Fg== - dependencies: - base-x "^3.0.8" - buffer "^5.5.0" - -multibase@~0.6.0: - version "0.6.1" - resolved "https://registry.yarnpkg.com/multibase/-/multibase-0.6.1.tgz#b76df6298536cc17b9f6a6db53ec88f85f8cc12b" - integrity sha512-pFfAwyTjbbQgNc3G7D48JkJxWtoJoBMaR4xQUOuB8RnCgRqaYmWNFeJTTvrJ2w51bjLq2zTby6Rqj9TQ9elSUw== - dependencies: - base-x "^3.0.8" - buffer "^5.5.0" - -multicodec@^0.5.5: - version "0.5.7" - resolved "https://registry.yarnpkg.com/multicodec/-/multicodec-0.5.7.tgz#1fb3f9dd866a10a55d226e194abba2dcc1ee9ffd" - integrity sha512-PscoRxm3f+88fAtELwUnZxGDkduE2HD9Q6GHUOywQLjOGT/HAdhjLDYNZ1e7VR0s0TP0EwZ16LNUTFpoBGivOA== - dependencies: - varint "^5.0.0" - -multicodec@^1.0.0: - version "1.0.4" - resolved "https://registry.yarnpkg.com/multicodec/-/multicodec-1.0.4.tgz#46ac064657c40380c28367c90304d8ed175a714f" - integrity sha512-NDd7FeS3QamVtbgfvu5h7fd1IlbaC4EQ0/pgU4zqE2vdHCmBGsUa0TiM8/TdSeG6BMPC92OOCf8F1ocE/Wkrrg== - dependencies: - buffer "^5.6.0" - varint "^5.0.0" - -multihashes@^0.4.15, multihashes@~0.4.15: - version "0.4.21" - resolved "https://registry.yarnpkg.com/multihashes/-/multihashes-0.4.21.tgz#dc02d525579f334a7909ade8a122dabb58ccfcb5" - integrity sha512-uVSvmeCWf36pU2nB4/1kzYZjsXD9vofZKpgudqkceYY5g2aZZXJ5r9lxuzoRLl1OAp28XljXsEJ/X/85ZsKmKw== - dependencies: - buffer "^5.5.0" - multibase "^0.7.0" - varint "^5.0.0" - -mute-stdout@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/mute-stdout/-/mute-stdout-1.0.1.tgz#acb0300eb4de23a7ddeec014e3e96044b3472331" - integrity sha512-kDcwXR4PS7caBpuRYYBUz9iVixUk3anO3f5OYFiIPwK/20vCzKCHyKoulbiDY1S53zD2bxUpxN/IJ+TnXjfvxg== - -nan@2.13.2: - version "2.13.2" - resolved "https://registry.yarnpkg.com/nan/-/nan-2.13.2.tgz#f51dc7ae66ba7d5d55e1e6d4d8092e802c9aefe7" - integrity sha512-TghvYc72wlMGMVMluVo9WRJc0mB8KxxF/gZ4YYFy7V2ZQX9l7rgbPg7vjS9mt6U5HXODVFVI2bOduCzwOMv/lw== - -nan@^2.11.0, nan@^2.12.1, nan@^2.13.2, nan@^2.14.0, nan@^2.2.1: - version "2.14.0" - resolved "https://registry.yarnpkg.com/nan/-/nan-2.14.0.tgz#7818f722027b2459a86f0295d434d1fc2336c52c" - integrity sha512-INOFj37C7k3AfaNTtX8RhsTw7qRy7eLET14cROi9+5HAVbbHuIWUHEauBv5qT4Av2tWasiTY1Jw6puUNqRJXQg== - -nano-json-stream-parser@^0.1.2: - version "0.1.2" - resolved "https://registry.yarnpkg.com/nano-json-stream-parser/-/nano-json-stream-parser-0.1.2.tgz#0cc8f6d0e2b622b479c40d499c46d64b755c6f5f" - integrity sha1-DMj20OK2IrR5xA1JnEbWS3Vcb18= - -nanomatch@^1.2.9: - version "1.2.13" - resolved "https://registry.yarnpkg.com/nanomatch/-/nanomatch-1.2.13.tgz#b87a8aa4fc0de8fe6be88895b38983ff265bd119" - integrity sha512-fpoe2T0RbHwBTBUOftAfBPaDEi06ufaUai0mE6Yn1kacc3SnTErfb/h+X94VXzI64rKFHYImXSvdwGGCmwOqCA== - dependencies: - arr-diff "^4.0.0" - array-unique "^0.3.2" - define-property "^2.0.2" - extend-shallow "^3.0.2" - fragment-cache "^0.2.1" - is-windows "^1.0.2" - kind-of "^6.0.2" - object.pick "^1.3.0" - regex-not "^1.0.0" - snapdragon "^0.8.1" - to-regex "^3.0.1" - -napi-build-utils@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/napi-build-utils/-/napi-build-utils-1.0.1.tgz#1381a0f92c39d66bf19852e7873432fc2123e508" - integrity sha512-boQj1WFgQH3v4clhu3mTNfP+vOBxorDlE8EKiMjUlLG3C4qAESnn9AxIOkFgTR2c9LtzNjPrjS60cT27ZKBhaA== - -natural-compare@^1.4.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7" - integrity sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc= - -needle@^2.2.1: - version "2.4.0" - resolved "https://registry.yarnpkg.com/needle/-/needle-2.4.0.tgz#6833e74975c444642590e15a750288c5f939b57c" - integrity sha512-4Hnwzr3mi5L97hMYeNl8wRW/Onhy4nUKR/lVemJ8gJedxxUyBLm9kkrDColJvoSfwi0jCNhD+xCdOtiGDQiRZg== - dependencies: - debug "^3.2.6" - iconv-lite "^0.4.4" - sax "^1.2.4" - -negotiator@0.6.2: - version "0.6.2" - resolved "https://registry.yarnpkg.com/negotiator/-/negotiator-0.6.2.tgz#feacf7ccf525a77ae9634436a64883ffeca346fb" - integrity sha512-hZXc7K2e+PgeI1eDBe/10Ard4ekbfrrqG8Ep+8Jmf4JID2bNg7NvCPOZN+kfF574pFQI7mum2AUqDidoKqcTOw== - -neo-async@^2.5.0, neo-async@^2.6.0, neo-async@^2.6.1: - version "2.6.1" - resolved "https://registry.yarnpkg.com/neo-async/-/neo-async-2.6.1.tgz#ac27ada66167fa8849a6addd837f6b189ad2081c" - integrity sha512-iyam8fBuCUpWeKPGpaNMetEocMt364qkCsfL9JuhjXX6dRnguRVOfk2GZaDpPjcOKiiXCPINZC1GczQ7iTq3Zw== - -next-tick@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/next-tick/-/next-tick-1.0.0.tgz#ca86d1fe8828169b0120208e3dc8424b9db8342c" - integrity sha1-yobR/ogoFpsBICCOPchCS524NCw= - -nice-try@^1.0.4: - version "1.0.5" - resolved "https://registry.yarnpkg.com/nice-try/-/nice-try-1.0.5.tgz#a3378a7696ce7d223e88fc9b764bd7ef1089e366" - integrity sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ== - -node-abi@^2.7.0: - version "2.13.0" - resolved "https://registry.yarnpkg.com/node-abi/-/node-abi-2.13.0.tgz#e2f2ec444d0aca3ea1b3874b6de41d1665828f63" - integrity sha512-9HrZGFVTR5SOu3PZAnAY2hLO36aW1wmA+FDsVkr85BTST32TLCA1H/AEcatVRAsWLyXS3bqUDYCAjq5/QGuSTA== - dependencies: - semver "^5.4.1" - -node-fetch@2.1.2: - version "2.1.2" - resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.1.2.tgz#ab884e8e7e57e38a944753cec706f788d1768bb5" - integrity sha1-q4hOjn5X44qUR1POxwb3iNF2i7U= - -node-fetch@^1.0.1, node-fetch@~1.7.1: - version "1.7.3" - resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-1.7.3.tgz#980f6f72d85211a5347c6b2bc18c5b84c3eb47ef" - integrity sha512-NhZ4CsKx7cYm2vSrBAr2PvFOe6sWDf0UYLRqA6svUYg7+/TSfVAu49jYC4BvQ4Sms9SZgdqGBgroqfDhJdTyKQ== - dependencies: - encoding "^0.1.11" - is-stream "^1.0.1" - -node-hid@^0.7.9: - version "0.7.9" - resolved "https://registry.yarnpkg.com/node-hid/-/node-hid-0.7.9.tgz#cc0cdf1418a286a7667f0b63642b5eeb544ccd05" - integrity sha512-vJnonTqmq3frCyTumJqG4g2IZcny3ynkfmbfDfQ90P3ZhRzcWYS/Um1ux6HFmAxmkaQnrZqIYHcGpL7kdqY8jA== - dependencies: - bindings "^1.5.0" - nan "^2.13.2" - prebuild-install "^5.3.0" - -node-int64@^0.4.0: - version "0.4.0" - resolved "https://registry.yarnpkg.com/node-int64/-/node-int64-0.4.0.tgz#87a9065cdb355d3182d8f94ce11188b825c68a3b" - integrity sha1-h6kGXNs1XTGC2PlM4RGIuCXGijs= - -node-libs-browser@^2.2.1: - version "2.2.1" - resolved "https://registry.yarnpkg.com/node-libs-browser/-/node-libs-browser-2.2.1.tgz#b64f513d18338625f90346d27b0d235e631f6425" - integrity sha512-h/zcD8H9kaDZ9ALUWwlBUDo6TKF8a7qBSCSEGfjTVIYeqsioSKaAX+BN7NgiMGp6iSIXZ3PxgCu8KS3b71YK5Q== - dependencies: - assert "^1.1.1" - browserify-zlib "^0.2.0" - buffer "^4.3.0" - console-browserify "^1.1.0" - constants-browserify "^1.0.0" - crypto-browserify "^3.11.0" - domain-browser "^1.1.1" - events "^3.0.0" - https-browserify "^1.0.0" - os-browserify "^0.3.0" - path-browserify "0.0.1" - process "^0.11.10" - punycode "^1.2.4" - querystring-es3 "^0.2.0" - readable-stream "^2.3.3" - stream-browserify "^2.0.1" - stream-http "^2.7.2" - string_decoder "^1.0.0" - timers-browserify "^2.0.4" - tty-browserify "0.0.0" - url "^0.11.0" - util "^0.11.0" - vm-browserify "^1.0.1" - -node-modules-regexp@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/node-modules-regexp/-/node-modules-regexp-1.0.0.tgz#8d9dbe28964a4ac5712e9131642107c71e90ec40" - integrity sha1-jZ2+KJZKSsVxLpExZCEHxx6Q7EA= - -node-notifier@^5.4.2: - version "5.4.3" - resolved "https://registry.yarnpkg.com/node-notifier/-/node-notifier-5.4.3.tgz#cb72daf94c93904098e28b9c590fd866e464bd50" - integrity sha512-M4UBGcs4jeOK9CjTsYwkvH6/MzuUmGCyTW+kCY7uO+1ZVr0+FHGdPdIf5CCLqAaxnRrWidyoQlNkMIIVwbKB8Q== - dependencies: - growly "^1.3.0" - is-wsl "^1.1.0" - semver "^5.5.0" - shellwords "^0.1.1" - which "^1.3.0" - -node-pre-gyp@^0.12.0: - version "0.12.0" - resolved "https://registry.yarnpkg.com/node-pre-gyp/-/node-pre-gyp-0.12.0.tgz#39ba4bb1439da030295f899e3b520b7785766149" - integrity sha512-4KghwV8vH5k+g2ylT+sLTjy5wmUOb9vPhnM8NHvRf9dHmnW/CndrFXy2aRPaPST6dugXSdHXfeaHQm77PIz/1A== - dependencies: - detect-libc "^1.0.2" - mkdirp "^0.5.1" - needle "^2.2.1" - nopt "^4.0.1" - npm-packlist "^1.1.6" - npmlog "^4.0.2" - rc "^1.2.7" - rimraf "^2.6.1" - semver "^5.3.0" - tar "^4" - -noop-logger@^0.1.1: - version "0.1.1" - resolved "https://registry.yarnpkg.com/noop-logger/-/noop-logger-0.1.1.tgz#94a2b1633c4f1317553007d8966fd0e841b6a4c2" - integrity sha1-lKKxYzxPExdVMAfYlm/Q6EG2pMI= - -nopt@3.x: - version "3.0.6" - resolved "https://registry.yarnpkg.com/nopt/-/nopt-3.0.6.tgz#c6465dbf08abcd4db359317f79ac68a646b28ff9" - integrity sha1-xkZdvwirzU2zWTF/eaxopkayj/k= - dependencies: - abbrev "1" - -nopt@^4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/nopt/-/nopt-4.0.1.tgz#d0d4685afd5415193c8c7505602d0d17cd64474d" - integrity sha1-0NRoWv1UFRk8jHUFYC0NF81kR00= - dependencies: - abbrev "1" - osenv "^0.1.4" - -normalize-package-data@^2.3.2: - version "2.5.0" - resolved "https://registry.yarnpkg.com/normalize-package-data/-/normalize-package-data-2.5.0.tgz#e66db1838b200c1dfc233225d12cb36520e234a8" - integrity sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA== - dependencies: - hosted-git-info "^2.1.4" - resolve "^1.10.0" - semver "2 || 3 || 4 || 5" - validate-npm-package-license "^3.0.1" - -normalize-path@^2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-2.1.1.tgz#1ab28b556e198363a8c1a6f7e6fa20137fe6aed9" - integrity sha1-GrKLVW4Zg2Oowab35vogE3/mrtk= - dependencies: - remove-trailing-separator "^1.0.1" - -normalize-path@^3.0.0, normalize-path@~3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-3.0.0.tgz#0dcd69ff23a1c9b11fd0978316644a0388216a65" - integrity sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA== - -normalize-url@^4.1.0: - version "4.5.0" - resolved "https://registry.yarnpkg.com/normalize-url/-/normalize-url-4.5.0.tgz#453354087e6ca96957bd8f5baf753f5982142129" - integrity sha512-2s47yzUxdexf1OhyRi4Em83iQk0aPvwTddtFz4hnSSw9dCEsLEGf6SwIO8ss/19S9iBb5sJaOuTvTGDeZI00BQ== - -now-and-later@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/now-and-later/-/now-and-later-2.0.1.tgz#8e579c8685764a7cc02cb680380e94f43ccb1f7c" - integrity sha512-KGvQ0cB70AQfg107Xvs/Fbu+dGmZoTRJp2TaPwcwQm3/7PteUyN2BCgk8KBMPGBUXZdVwyWS8fDCGFygBm19UQ== - dependencies: - once "^1.3.2" - -npm-bundled@^1.0.1: - version "1.1.0" - resolved "https://registry.yarnpkg.com/npm-bundled/-/npm-bundled-1.1.0.tgz#2e8fdb7e69eff2df963937b696243316537c284b" - integrity sha512-ez6dcKBFNo4FvlMqscBEFUum6M2FTLW5grqm3DyBKB5XOyKVCeeWvAuoZtbmW/5Cv8EM2bQUOA6ufxa/TKVN0g== - -npm-packlist@^1.1.6: - version "1.4.6" - resolved "https://registry.yarnpkg.com/npm-packlist/-/npm-packlist-1.4.6.tgz#53ba3ed11f8523079f1457376dd379ee4ea42ff4" - integrity sha512-u65uQdb+qwtGvEJh/DgQgW1Xg7sqeNbmxYyrvlNznaVTjV3E5P6F/EFjM+BVHXl7JJlsdG8A64M0XI8FI/IOlg== - dependencies: - ignore-walk "^3.0.1" - npm-bundled "^1.0.1" - -npm-run-path@^2.0.0: - version "2.0.2" - resolved "https://registry.yarnpkg.com/npm-run-path/-/npm-run-path-2.0.2.tgz#35a9232dfa35d7067b4cb2ddf2357b1871536c5f" - integrity sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8= - dependencies: - path-key "^2.0.0" - -npmlog@^4.0.1, npmlog@^4.0.2: - version "4.1.2" - resolved "https://registry.yarnpkg.com/npmlog/-/npmlog-4.1.2.tgz#08a7f2a8bf734604779a9efa4ad5cc717abb954b" - integrity sha512-2uUqazuKlTaSI/dC8AzicUck7+IrEaOnN/e0jd3Xtt1KcGpwx30v50mL7oPyr/h9bL3E4aZccVwpwP+5W9Vjkg== - dependencies: - are-we-there-yet "~1.1.2" - console-control-strings "~1.1.0" - gauge "~2.7.3" - set-blocking "~2.0.0" - -number-is-nan@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/number-is-nan/-/number-is-nan-1.0.1.tgz#097b602b53422a522c1afb8790318336941a011d" - integrity sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0= - -number-to-bn@1.7.0: - version "1.7.0" - resolved "https://registry.yarnpkg.com/number-to-bn/-/number-to-bn-1.7.0.tgz#bb3623592f7e5f9e0030b1977bd41a0c53fe1ea0" - integrity sha1-uzYjWS9+X54AMLGXe9QaDFP+HqA= - dependencies: - bn.js "4.11.6" - strip-hex-prefix "1.0.0" - -nwsapi@^2.0.7: - version "2.2.0" - resolved "https://registry.yarnpkg.com/nwsapi/-/nwsapi-2.2.0.tgz#204879a9e3d068ff2a55139c2c772780681a38b7" - integrity sha512-h2AatdwYH+JHiZpv7pt/gSX1XoRGb7L/qSIeuqA6GwYoF9w1vP1cw42TO0aI2pNyshRK5893hNSl+1//vHK7hQ== - -oauth-sign@~0.9.0: - version "0.9.0" - resolved "https://registry.yarnpkg.com/oauth-sign/-/oauth-sign-0.9.0.tgz#47a7b016baa68b5fa0ecf3dee08a85c679ac6455" - integrity sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ== - -object-assign@^4, object-assign@^4.0.0, object-assign@^4.0.1, object-assign@^4.1.0, object-assign@^4.1.1: - version "4.1.1" - resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" - integrity sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM= - -object-copy@^0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/object-copy/-/object-copy-0.1.0.tgz#7e7d858b781bd7c991a41ba975ed3812754e998c" - integrity sha1-fn2Fi3gb18mRpBupde04EnVOmYw= - dependencies: - copy-descriptor "^0.1.0" - define-property "^0.2.5" - kind-of "^3.0.3" - -object-inspect@^1.7.0: - version "1.7.0" - resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.7.0.tgz#f4f6bd181ad77f006b5ece60bd0b6f398ff74a67" - integrity sha512-a7pEHdh1xKIAgTySUGgLMx/xwDZskN1Ud6egYYN3EdRW4ZMPNEDUTF+hwy2LUC+Bl+SyLXANnwz/jyh/qutKUw== - -object-inspect@~1.6.0: - version "1.6.0" - resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.6.0.tgz#c70b6cbf72f274aab4c34c0c82f5167bf82cf15b" - integrity sha512-GJzfBZ6DgDAmnuaM3104jR4s1Myxr3Y3zfIyN4z3UdqN69oSRacNK8UhnobDdC+7J2AHCjGwxQubNJfE70SXXQ== - -object-keys@^1.0.11, object-keys@^1.0.12, object-keys@^1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/object-keys/-/object-keys-1.1.1.tgz#1c47f272df277f3b1daf061677d9c82e2322c60e" - integrity sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA== - -object-keys@~0.4.0: - version "0.4.0" - resolved "https://registry.yarnpkg.com/object-keys/-/object-keys-0.4.0.tgz#28a6aae7428dd2c3a92f3d95f21335dd204e0336" - integrity sha1-KKaq50KN0sOpLz2V8hM13SBOAzY= - -object-visit@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/object-visit/-/object-visit-1.0.1.tgz#f79c4493af0c5377b59fe39d395e41042dd045bb" - integrity sha1-95xEk68MU3e1n+OdOV5BBC3QRbs= - dependencies: - isobject "^3.0.0" - -object.assign@^4.0.4, object.assign@^4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/object.assign/-/object.assign-4.1.0.tgz#968bf1100d7956bb3ca086f006f846b3bc4008da" - integrity sha512-exHJeq6kBKj58mqGyTQ9DFvrZC/eR6OwxzoM9YRoGBqrXYonaFyGiFMuc9VZrXf7DarreEwMpurG3dd+CNyW5w== - dependencies: - define-properties "^1.1.2" - function-bind "^1.1.1" - has-symbols "^1.0.0" - object-keys "^1.0.11" - -object.defaults@^1.0.0, object.defaults@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/object.defaults/-/object.defaults-1.1.0.tgz#3a7f868334b407dea06da16d88d5cd29e435fecf" - integrity sha1-On+GgzS0B96gbaFtiNXNKeQ1/s8= - dependencies: - array-each "^1.0.1" - array-slice "^1.0.0" - for-own "^1.0.0" - isobject "^3.0.0" - -object.getownpropertydescriptors@^2.0.3: - version "2.1.0" - resolved "https://registry.yarnpkg.com/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.1.0.tgz#369bf1f9592d8ab89d712dced5cb81c7c5352649" - integrity sha512-Z53Oah9A3TdLoblT7VKJaTDdXdT+lQO+cNpKVnya5JDe9uLvzu1YyY1yFDFrcxrlRgWrEFH0jJtD/IbuwjcEVg== - dependencies: - define-properties "^1.1.3" - es-abstract "^1.17.0-next.1" - -object.map@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/object.map/-/object.map-1.0.1.tgz#cf83e59dc8fcc0ad5f4250e1f78b3b81bd801d37" - integrity sha1-z4Plncj8wK1fQlDh94s7gb2AHTc= - dependencies: - for-own "^1.0.0" - make-iterator "^1.0.0" - -object.pick@^1.2.0, object.pick@^1.3.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/object.pick/-/object.pick-1.3.0.tgz#87a10ac4c1694bd2e1cbf53591a66141fb5dd747" - integrity sha1-h6EKxMFpS9Lhy/U1kaZhQftd10c= - dependencies: - isobject "^3.0.1" - -object.reduce@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/object.reduce/-/object.reduce-1.0.1.tgz#6fe348f2ac7fa0f95ca621226599096825bb03ad" - integrity sha1-b+NI8qx/oPlcpiEiZZkJaCW7A60= - dependencies: - for-own "^1.0.0" - make-iterator "^1.0.0" - -oboe@2.1.4: - version "2.1.4" - resolved "https://registry.yarnpkg.com/oboe/-/oboe-2.1.4.tgz#20c88cdb0c15371bb04119257d4fdd34b0aa49f6" - integrity sha1-IMiM2wwVNxuwQRklfU/dNLCqSfY= - dependencies: - http-https "^1.0.0" - -on-finished@~2.3.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/on-finished/-/on-finished-2.3.0.tgz#20f1336481b083cd75337992a16971aa2d906947" - integrity sha1-IPEzZIGwg811M3mSoWlxqi2QaUc= - dependencies: - ee-first "1.1.1" - -once@1.x, once@^1.3.0, once@^1.3.1, once@^1.3.2, once@^1.4.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" - integrity sha1-WDsap3WWHUsROsF9nFC6753Xa9E= - dependencies: - wrappy "1" - -opener@^1.5.1: - version "1.5.1" - resolved "https://registry.yarnpkg.com/opener/-/opener-1.5.1.tgz#6d2f0e77f1a0af0032aca716c2c1fbb8e7e8abed" - integrity sha512-goYSy5c2UXE4Ra1xixabeVh1guIX/ZV/YokJksb6q2lubWu6UbvPQ20p542/sFIll1nl8JnCyK9oBaOcCWXwvA== - -optimist@^0.6.1: - version "0.6.1" - resolved "https://registry.yarnpkg.com/optimist/-/optimist-0.6.1.tgz#da3ea74686fa21a19a111c326e90eb15a0196686" - integrity sha1-2j6nRob6IaGaERwybpDrFaAZZoY= - dependencies: - minimist "~0.0.1" - wordwrap "~0.0.2" - -optionator@^0.8.1: - version "0.8.3" - resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.8.3.tgz#84fa1d036fe9d3c7e21d99884b601167ec8fb495" - integrity sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA== - dependencies: - deep-is "~0.1.3" - fast-levenshtein "~2.0.6" - levn "~0.3.0" - prelude-ls "~1.1.2" - type-check "~0.3.2" - word-wrap "~1.2.3" - -ordered-read-streams@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/ordered-read-streams/-/ordered-read-streams-1.0.1.tgz#77c0cb37c41525d64166d990ffad7ec6a0e1363e" - integrity sha1-d8DLN8QVJdZBZtmQ/61+xqDhNj4= - dependencies: - readable-stream "^2.0.1" - -os-browserify@^0.3.0: - version "0.3.0" - resolved "https://registry.yarnpkg.com/os-browserify/-/os-browserify-0.3.0.tgz#854373c7f5c2315914fc9bfc6bd8238fdda1ec27" - integrity sha1-hUNzx/XCMVkU/Jv8a9gjj92h7Cc= - -os-homedir@^1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/os-homedir/-/os-homedir-1.0.2.tgz#ffbc4988336e0e833de0c168c7ef152121aa7fb3" - integrity sha1-/7xJiDNuDoM94MFox+8VISGqf7M= - -os-locale@^1.4.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/os-locale/-/os-locale-1.4.0.tgz#20f9f17ae29ed345e8bde583b13d2009803c14d9" - integrity sha1-IPnxeuKe00XoveWDsT0gCYA8FNk= - dependencies: - lcid "^1.0.0" - -os-locale@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/os-locale/-/os-locale-2.1.0.tgz#42bc2900a6b5b8bd17376c8e882b65afccf24bf2" - integrity sha512-3sslG3zJbEYcaC4YVAvDorjGxc7tv6KVATnLPZONiljsUncvihe9BQoVCEs0RZ1kmf4Hk9OBqlZfJZWI4GanKA== - dependencies: - execa "^0.7.0" - lcid "^1.0.0" - mem "^1.1.0" - -os-tmpdir@^1.0.0, os-tmpdir@^1.0.1, os-tmpdir@~1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/os-tmpdir/-/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274" - integrity sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ= - -osenv@^0.1.4: - version "0.1.5" - resolved "https://registry.yarnpkg.com/osenv/-/osenv-0.1.5.tgz#85cdfafaeb28e8677f416e287592b5f3f49ea410" - integrity sha512-0CWcCECdMVc2Rw3U5w9ZjqX6ga6ubk1xDVKxtBQPK7wis/0F2r9T6k4ydGYhecl7YUBxBVxhL5oisPsNxAPe2g== - dependencies: - os-homedir "^1.0.0" - os-tmpdir "^1.0.0" - -p-cancelable@^0.3.0: - version "0.3.0" - resolved "https://registry.yarnpkg.com/p-cancelable/-/p-cancelable-0.3.0.tgz#b9e123800bcebb7ac13a479be195b507b98d30fa" - integrity sha512-RVbZPLso8+jFeq1MfNvgXtCRED2raz/dKpacfTNxsx6pLEpEomM7gah6VeHSYV3+vo0OAi4MkArtQcWWXuQoyw== - -p-cancelable@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/p-cancelable/-/p-cancelable-1.1.0.tgz#d078d15a3af409220c886f1d9a0ca2e441ab26cc" - integrity sha512-s73XxOZ4zpt1edZYZzvhqFa6uvQc1vwUa0K0BdtIZgQMAJj9IbebH+JkgKZc9h+B05PKHLOTl4ajG1BmNrVZlw== - -p-each-series@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/p-each-series/-/p-each-series-1.0.0.tgz#930f3d12dd1f50e7434457a22cd6f04ac6ad7f71" - integrity sha1-kw89Et0fUOdDRFeiLNbwSsatf3E= - dependencies: - p-reduce "^1.0.0" - -p-finally@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/p-finally/-/p-finally-1.0.0.tgz#3fbcfb15b899a44123b34b6dcc18b724336a2cae" - integrity sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4= - -p-limit@^1.1.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-1.3.0.tgz#b86bd5f0c25690911c7590fcbfc2010d54b3ccb8" - integrity sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q== - dependencies: - p-try "^1.0.0" - -p-limit@^2.0.0: - version "2.2.1" - resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-2.2.1.tgz#aa07a788cc3151c939b5131f63570f0dd2009537" - integrity sha512-85Tk+90UCVWvbDavCLKPOLC9vvY8OwEX/RtKF+/1OADJMVlFfEHOiMTPVyxg7mk/dKa+ipdHm0OUkTvCpMTuwg== - dependencies: - p-try "^2.0.0" - -p-locate@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-2.0.0.tgz#20a0103b222a70c8fd39cc2e580680f3dde5ec43" - integrity sha1-IKAQOyIqcMj9OcwuWAaA893l7EM= - dependencies: - p-limit "^1.1.0" - -p-locate@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-3.0.0.tgz#322d69a05c0264b25997d9f40cd8a891ab0064a4" - integrity sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ== - dependencies: - p-limit "^2.0.0" - -p-reduce@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/p-reduce/-/p-reduce-1.0.0.tgz#18c2b0dd936a4690a529f8231f58a0fdb6a47dfa" - integrity sha1-GMKw3ZNqRpClKfgjH1ig/bakffo= - -p-timeout@^1.1.1: - version "1.2.1" - resolved "https://registry.yarnpkg.com/p-timeout/-/p-timeout-1.2.1.tgz#5eb3b353b7fce99f101a1038880bb054ebbea386" - integrity sha1-XrOzU7f86Z8QGhA4iAuwVOu+o4Y= - dependencies: - p-finally "^1.0.0" - -p-try@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/p-try/-/p-try-1.0.0.tgz#cbc79cdbaf8fd4228e13f621f2b1a237c1b207b3" - integrity sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M= - -p-try@^2.0.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/p-try/-/p-try-2.2.0.tgz#cb2868540e313d61de58fafbe35ce9004d5540e6" - integrity sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ== - -pako@~1.0.5: - version "1.0.10" - resolved "https://registry.yarnpkg.com/pako/-/pako-1.0.10.tgz#4328badb5086a426aa90f541977d4955da5c9732" - integrity sha512-0DTvPVU3ed8+HNXOu5Bs+o//Mbdj9VNQMUOe9oKCwh8l0GNwpTDMKCWbRjgtD291AWnkAgkqA/LOnQS8AmS1tw== - -parallel-transform@^1.1.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/parallel-transform/-/parallel-transform-1.2.0.tgz#9049ca37d6cb2182c3b1d2c720be94d14a5814fc" - integrity sha512-P2vSmIu38uIlvdcU7fDkyrxj33gTUy/ABO5ZUbGowxNCopBq/OoD42bP4UmMrJoPyk4Uqf0mu3mtWBhHCZD8yg== - dependencies: - cyclist "^1.0.1" - inherits "^2.0.3" - readable-stream "^2.1.5" - -parse-asn1@^5.0.0: - version "5.1.5" - resolved "https://registry.yarnpkg.com/parse-asn1/-/parse-asn1-5.1.5.tgz#003271343da58dc94cace494faef3d2147ecea0e" - integrity sha512-jkMYn1dcJqF6d5CpU689bq7w/b5ALS9ROVSpQDPrZsqqesUJii9qutvoT5ltGedNXMO2e16YUWIghG9KxaViTQ== - dependencies: - asn1.js "^4.0.0" - browserify-aes "^1.0.0" - create-hash "^1.1.0" - evp_bytestokey "^1.0.0" - pbkdf2 "^3.0.3" - safe-buffer "^5.1.1" - -parse-filepath@^1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/parse-filepath/-/parse-filepath-1.0.2.tgz#a632127f53aaf3d15876f5872f3ffac763d6c891" - integrity sha1-pjISf1Oq89FYdvWHLz/6x2PWyJE= - dependencies: - is-absolute "^1.0.0" - map-cache "^0.2.0" - path-root "^0.1.1" - -parse-headers@^2.0.0: - version "2.0.3" - resolved "https://registry.yarnpkg.com/parse-headers/-/parse-headers-2.0.3.tgz#5e8e7512383d140ba02f0c7aa9f49b4399c92515" - integrity sha512-QhhZ+DCCit2Coi2vmAKbq5RGTRcQUOE2+REgv8vdyu7MnYx2eZztegqtTx99TZ86GTIwqiy3+4nQTWZ2tgmdCA== - -parse-json@^2.2.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-2.2.0.tgz#f480f40434ef80741f8469099f8dea18f55a4dc9" - integrity sha1-9ID0BDTvgHQfhGkJn43qGPVaTck= - dependencies: - error-ex "^1.2.0" - -parse-json@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-4.0.0.tgz#be35f5425be1f7f6c747184f98a788cb99477ee0" - integrity sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA= - dependencies: - error-ex "^1.3.1" - json-parse-better-errors "^1.0.1" - -parse-node-version@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/parse-node-version/-/parse-node-version-1.0.1.tgz#e2b5dbede00e7fa9bc363607f53327e8b073189b" - integrity sha512-3YHlOa/JgH6Mnpr05jP9eDG254US9ek25LyIxZlDItp2iJtwyaXQb57lBYLdT3MowkUFYEV2XXNAYIPlESvJlA== - -parse-passwd@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/parse-passwd/-/parse-passwd-1.0.0.tgz#6d5b934a456993b23d37f40a382d6f1666a8e5c6" - integrity sha1-bVuTSkVpk7I9N/QKOC1vFmao5cY= - -parse5@4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/parse5/-/parse5-4.0.0.tgz#6d78656e3da8d78b4ec0b906f7c08ef1dfe3f608" - integrity sha512-VrZ7eOd3T1Fk4XWNXMgiGBK/z0MG48BWG2uQNU4I72fkQuKUTZpl+u9k+CxEG0twMVzSmXEEz12z5Fnw1jIQFA== - -parseurl@~1.3.3: - version "1.3.3" - resolved "https://registry.yarnpkg.com/parseurl/-/parseurl-1.3.3.tgz#9da19e7bee8d12dff0513ed5b76957793bc2e8d4" - integrity sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ== - -pascalcase@^0.1.1: - version "0.1.1" - resolved "https://registry.yarnpkg.com/pascalcase/-/pascalcase-0.1.1.tgz#b363e55e8006ca6fe21784d2db22bd15d7917f14" - integrity sha1-s2PlXoAGym/iF4TS2yK9FdeRfxQ= - -path-browserify@0.0.1: - version "0.0.1" - resolved "https://registry.yarnpkg.com/path-browserify/-/path-browserify-0.0.1.tgz#e6c4ddd7ed3aa27c68a20cc4e50e1a4ee83bbc4a" - integrity sha512-BapA40NHICOS+USX9SN4tyhq+A2RrN/Ws5F0Z5aMHDp98Fl86lX8Oti8B7uN93L4Ifv4fHOEA+pQw87gmMO/lQ== - -path-dirname@^1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/path-dirname/-/path-dirname-1.0.2.tgz#cc33d24d525e099a5388c0336c6e32b9160609e0" - integrity sha1-zDPSTVJeCZpTiMAzbG4yuRYGCeA= - -path-exists@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-2.1.0.tgz#0feb6c64f0fc518d9a754dd5efb62c7022761f4b" - integrity sha1-D+tsZPD8UY2adU3V77YscCJ2H0s= - dependencies: - pinkie-promise "^2.0.0" - -path-exists@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-3.0.0.tgz#ce0ebeaa5f78cb18925ea7d810d7b59b010fd515" - integrity sha1-zg6+ql94yxiSXqfYENe1mwEP1RU= - -path-is-absolute@^1.0.0, path-is-absolute@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" - integrity sha1-F0uSaHNVNP+8es5r9TpanhtcX18= - -path-key@^2.0.0, path-key@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/path-key/-/path-key-2.0.1.tgz#411cadb574c5a140d3a4b1910d40d80cc9f40b40" - integrity sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A= - -path-parse@^1.0.6: - version "1.0.6" - resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.6.tgz#d62dbb5679405d72c4737ec58600e9ddcf06d24c" - integrity sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw== - -path-root-regex@^0.1.0: - version "0.1.2" - resolved "https://registry.yarnpkg.com/path-root-regex/-/path-root-regex-0.1.2.tgz#bfccdc8df5b12dc52c8b43ec38d18d72c04ba96d" - integrity sha1-v8zcjfWxLcUsi0PsONGNcsBLqW0= - -path-root@^0.1.1: - version "0.1.1" - resolved "https://registry.yarnpkg.com/path-root/-/path-root-0.1.1.tgz#9a4a6814cac1c0cd73360a95f32083c8ea4745b7" - integrity sha1-mkpoFMrBwM1zNgqV8yCDyOpHRbc= - dependencies: - path-root-regex "^0.1.0" - -path-to-regexp@0.1.7: - version "0.1.7" - resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-0.1.7.tgz#df604178005f522f15eb4490e7247a1bfaa67f8c" - integrity sha1-32BBeABfUi8V60SQ5yR6G/qmf4w= - -path-type@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/path-type/-/path-type-1.1.0.tgz#59c44f7ee491da704da415da5a4070ba4f8fe441" - integrity sha1-WcRPfuSR2nBNpBXaWkBwuk+P5EE= - dependencies: - graceful-fs "^4.1.2" - pify "^2.0.0" - pinkie-promise "^2.0.0" - -path-type@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/path-type/-/path-type-3.0.0.tgz#cef31dc8e0a1a3bb0d105c0cd97cf3bf47f4e36f" - integrity sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg== - dependencies: - pify "^3.0.0" - -pathval@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/pathval/-/pathval-1.1.0.tgz#b942e6d4bde653005ef6b71361def8727d0645e0" - integrity sha1-uULm1L3mUwBe9rcTYd74cn0GReA= - -pbkdf2@^3.0.3, pbkdf2@^3.0.9: - version "3.0.17" - resolved "https://registry.yarnpkg.com/pbkdf2/-/pbkdf2-3.0.17.tgz#976c206530617b14ebb32114239f7b09336e93a6" - integrity sha512-U/il5MsrZp7mGg3mSQfn742na2T+1/vHDCG5/iTI3X9MKUuYUZVLQhyRsg06mCgDBTd57TxzgZt7P+fYfjRLtA== - dependencies: - create-hash "^1.1.2" - create-hmac "^1.1.4" - ripemd160 "^2.0.1" - safe-buffer "^5.0.1" - sha.js "^2.4.8" - -pegjs@^0.10.0: - version "0.10.0" - resolved "https://registry.yarnpkg.com/pegjs/-/pegjs-0.10.0.tgz#cf8bafae6eddff4b5a7efb185269eaaf4610ddbd" - integrity sha1-z4uvrm7d/0tafvsYUmnqr0YQ3b0= - -pend@~1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/pend/-/pend-1.2.0.tgz#7a57eb550a6783f9115331fcf4663d5c8e007a50" - integrity sha1-elfrVQpng/kRUzH89GY9XI4AelA= - -performance-now@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-2.1.0.tgz#6309f4e0e5fa913ec1c69307ae364b4b377c9e7b" - integrity sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns= - -picomatch@^2.0.4: - version "2.1.1" - resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.1.1.tgz#ecdfbea7704adb5fe6fb47f9866c4c0e15e905c5" - integrity sha512-OYMyqkKzK7blWO/+XZYP6w8hH0LDvkBvdvKukti+7kqYFCiEAk+gI3DWnryapc0Dau05ugGTy0foQ6mqn4AHYA== - -picomatch@^2.0.5, picomatch@^2.2.1: - version "2.2.2" - resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.2.2.tgz#21f333e9b6b8eaff02468f5146ea406d345f4dad" - integrity sha512-q0M/9eZHzmr0AulXyPwNfZjtwZ/RBZlbN3K3CErVrk50T2ASYI7Bye0EvekFY3IP1Nt2DHu0re+V2ZHIpMkuWg== - -pify@^2.0.0, pify@^2.3.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/pify/-/pify-2.3.0.tgz#ed141a6ac043a849ea588498e7dca8b15330e90c" - integrity sha1-7RQaasBDqEnqWISY59yosVMw6Qw= - -pify@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/pify/-/pify-3.0.0.tgz#e5a4acd2c101fdf3d9a4d07f0dbc4db49dd28176" - integrity sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY= - -pify@^4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/pify/-/pify-4.0.1.tgz#4b2cd25c50d598735c50292224fd8c6df41e3231" - integrity sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g== - -pinkie-promise@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/pinkie-promise/-/pinkie-promise-2.0.1.tgz#2135d6dfa7a358c069ac9b178776288228450ffa" - integrity sha1-ITXW36ejWMBprJsXh3YogihFD/o= - dependencies: - pinkie "^2.0.0" - -pinkie@^2.0.0: - version "2.0.4" - resolved "https://registry.yarnpkg.com/pinkie/-/pinkie-2.0.4.tgz#72556b80cfa0d48a974e80e77248e80ed4f7f870" - integrity sha1-clVrgM+g1IqXToDnckjoDtT3+HA= - -pirates@^4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/pirates/-/pirates-4.0.1.tgz#643a92caf894566f91b2b986d2c66950a8e2fb87" - integrity sha512-WuNqLTbMI3tmfef2TKxlQmAiLHKtFhlsCZnPIpuv2Ow0RDVO8lfy1Opf4NUzlMXLjPl+Men7AuVdX6TA+s+uGA== - dependencies: - node-modules-regexp "^1.0.0" - -pkg-dir@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-3.0.0.tgz#2749020f239ed990881b1f71210d51eb6523bea3" - integrity sha512-/E57AYkoeQ25qkxMj5PBOVgF8Kiu/h7cYS30Z5+R7WaiCCBfLq58ZI/dSeaEKb9WVJV5n/03QwrN3IeWIFllvw== - dependencies: - find-up "^3.0.0" - -pluralize@^7.0.0: - version "7.0.0" - resolved "https://registry.yarnpkg.com/pluralize/-/pluralize-7.0.0.tgz#298b89df8b93b0221dbf421ad2b1b1ea23fc6777" - integrity sha512-ARhBOdzS3e41FbkW/XWrTEtukqqLoK5+Z/4UeDaLuSW+39JPeFgs4gCGqsrJHVZX0fUrx//4OF0K1CUGwlIFow== - -pn@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/pn/-/pn-1.1.0.tgz#e2f4cef0e219f463c179ab37463e4e1ecdccbafb" - integrity sha512-2qHaIQr2VLRFoxe2nASzsV6ef4yOOH+Fi9FBOVH6cqeSgUnoyySPZkxzLuzd+RYOQTRpROA0ztTMqxROKSb/nA== - -popper.js@1.14.3: - version "1.14.3" - resolved "https://registry.yarnpkg.com/popper.js/-/popper.js-1.14.3.tgz#1438f98d046acf7b4d78cd502bf418ac64d4f095" - integrity sha1-FDj5jQRqz3tNeM1QK/QYrGTU8JU= - -posix-character-classes@^0.1.0: - version "0.1.1" - resolved "https://registry.yarnpkg.com/posix-character-classes/-/posix-character-classes-0.1.1.tgz#01eac0fe3b5af71a2a6c02feabb8c1fef7e00eab" - integrity sha1-AerA/jta9xoqbAL+q7jB/vfgDqs= - -prebuild-install@^5.3.0, prebuild-install@^5.3.3: - version "5.3.3" - resolved "https://registry.yarnpkg.com/prebuild-install/-/prebuild-install-5.3.3.tgz#ef4052baac60d465f5ba6bf003c9c1de79b9da8e" - integrity sha512-GV+nsUXuPW2p8Zy7SarF/2W/oiK8bFQgJcncoJ0d7kRpekEA0ftChjfEaF9/Y+QJEc/wFR7RAEa8lYByuUIe2g== - dependencies: - detect-libc "^1.0.3" - expand-template "^2.0.3" - github-from-package "0.0.0" - minimist "^1.2.0" - mkdirp "^0.5.1" - napi-build-utils "^1.0.1" - node-abi "^2.7.0" - noop-logger "^0.1.1" - npmlog "^4.0.1" - pump "^3.0.0" - rc "^1.2.7" - simple-get "^3.0.3" - tar-fs "^2.0.0" - tunnel-agent "^0.6.0" - which-pm-runs "^1.0.0" - -precond@0.2: - version "0.2.3" - resolved "https://registry.yarnpkg.com/precond/-/precond-0.2.3.tgz#aa9591bcaa24923f1e0f4849d240f47efc1075ac" - integrity sha1-qpWRvKokkj8eD0hJ0kD0fvwQdaw= - -prelude-ls@~1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.1.2.tgz#21932a549f5e52ffd9a827f570e04be62a97da54" - integrity sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ= - -prepend-http@^1.0.1: - version "1.0.4" - resolved "https://registry.yarnpkg.com/prepend-http/-/prepend-http-1.0.4.tgz#d4f4562b0ce3696e41ac52d0e002e57a635dc6dc" - integrity sha1-1PRWKwzjaW5BrFLQ4ALlemNdxtw= - -prepend-http@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/prepend-http/-/prepend-http-2.0.0.tgz#e92434bfa5ea8c19f41cdfd401d741a3c819d897" - integrity sha1-6SQ0v6XqjBn0HN/UAddBo8gZ2Jc= - -pretty-format@^24.9.0: - version "24.9.0" - resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-24.9.0.tgz#12fac31b37019a4eea3c11aa9a959eb7628aa7c9" - integrity sha512-00ZMZUiHaJrNfk33guavqgvfJS30sLYf0f8+Srklv0AMPodGGHcoHgksZ3OThYnIvOd+8yMCn0YiEOogjlgsnA== - dependencies: - "@jest/types" "^24.9.0" - ansi-regex "^4.0.0" - ansi-styles "^3.2.0" - react-is "^16.8.4" - -pretty-format@^25.3.0: - version "25.3.0" - resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-25.3.0.tgz#d0a4f988ff4a6cd350342fdabbb809aeb4d49ad5" - integrity sha512-wToHwF8bkQknIcFkBqNfKu4+UZqnrLn/Vr+wwKQwwvPzkBfDDKp/qIabFqdgtoi5PEnM8LFByVsOrHoa3SpTVA== - dependencies: - "@jest/types" "^25.3.0" - ansi-regex "^5.0.0" - ansi-styles "^4.0.0" - react-is "^16.12.0" - -pretty-hrtime@^1.0.0: - version "1.0.3" - resolved "https://registry.yarnpkg.com/pretty-hrtime/-/pretty-hrtime-1.0.3.tgz#b7e3ea42435a4c9b2759d99e0f201eb195802ee1" - integrity sha1-t+PqQkNaTJsnWdmeDyAesZWALuE= - -private@^0.1.6, private@^0.1.8: - version "0.1.8" - resolved "https://registry.yarnpkg.com/private/-/private-0.1.8.tgz#2381edb3689f7a53d653190060fcf822d2f368ff" - integrity sha512-VvivMrbvd2nKkiG38qjULzlc+4Vx4wm/whI9pQD35YrARNnhxeiRktSOhSukRLFNlzg6Br/cJPet5J/u19r/mg== - -process-nextick-args@^2.0.0, process-nextick-args@~2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-2.0.1.tgz#7820d9b16120cc55ca9ae7792680ae7dba6d7fe2" - integrity sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag== - -process@^0.11.10: - version "0.11.10" - resolved "https://registry.yarnpkg.com/process/-/process-0.11.10.tgz#7332300e840161bda3e69a1d1d91a7d4bc16f182" - integrity sha1-czIwDoQBYb2j5podHZGn1LwW8YI= - -process@~0.5.1: - version "0.5.2" - resolved "https://registry.yarnpkg.com/process/-/process-0.5.2.tgz#1638d8a8e34c2f440a91db95ab9aeb677fc185cf" - integrity sha1-FjjYqONML0QKkduVq5rrZ3/Bhc8= - -promise-inflight@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/promise-inflight/-/promise-inflight-1.0.1.tgz#98472870bf228132fcbdd868129bad12c3c029e3" - integrity sha1-mEcocL8igTL8vdhoEputEsPAKeM= - -promise-to-callback@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/promise-to-callback/-/promise-to-callback-1.0.0.tgz#5d2a749010bfb67d963598fcd3960746a68feef7" - integrity sha1-XSp0kBC/tn2WNZj805YHRqaP7vc= - dependencies: - is-fn "^1.0.0" - set-immediate-shim "^1.0.1" - -prompts@^2.0.1: - version "2.3.0" - resolved "https://registry.yarnpkg.com/prompts/-/prompts-2.3.0.tgz#a444e968fa4cc7e86689a74050685ac8006c4cc4" - integrity sha512-NfbbPPg/74fT7wk2XYQ7hAIp9zJyZp5Fu19iRbORqqy1BhtrkZ0fPafBU+7bmn8ie69DpT0R6QpJIN2oisYjJg== - dependencies: - kleur "^3.0.3" - sisteransi "^1.0.3" - -proxy-addr@~2.0.5: - version "2.0.5" - resolved "https://registry.yarnpkg.com/proxy-addr/-/proxy-addr-2.0.5.tgz#34cbd64a2d81f4b1fd21e76f9f06c8a45299ee34" - integrity sha512-t/7RxHXPH6cJtP0pRG6smSr9QJidhB+3kXu0KgXnbGYMgzEnUxRQ4/LDdfOwZEMyIh3/xHb8PX3t+lfL9z+YVQ== - dependencies: - forwarded "~0.1.2" - ipaddr.js "1.9.0" - -prr@~1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/prr/-/prr-1.0.1.tgz#d3fc114ba06995a45ec6893f484ceb1d78f5f476" - integrity sha1-0/wRS6BplaRexok/SEzrHXj19HY= - -pseudomap@^1.0.1, pseudomap@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/pseudomap/-/pseudomap-1.0.2.tgz#f052a28da70e618917ef0a8ac34c1ae5a68286b3" - integrity sha1-8FKijacOYYkX7wqKw0wa5aaChrM= - -psl@^1.1.24: - version "1.6.0" - resolved "https://registry.yarnpkg.com/psl/-/psl-1.6.0.tgz#60557582ee23b6c43719d9890fb4170ecd91e110" - integrity sha512-SYKKmVel98NCOYXpkwUqZqh0ahZeeKfmisiLIcEZdsb+WbLv02g/dI5BUmZnIyOe7RzZtLax81nnb2HbvC2tzA== - -psl@^1.1.28: - version "1.7.0" - resolved "https://registry.yarnpkg.com/psl/-/psl-1.7.0.tgz#f1c4c47a8ef97167dea5d6bbf4816d736e884a3c" - integrity sha512-5NsSEDv8zY70ScRnOTn7bK7eanl2MvFrOrS/R6x+dBt5g1ghnj9Zv90kO8GwT8gxcu2ANyFprnFYB85IogIJOQ== - -public-encrypt@^4.0.0: - version "4.0.3" - resolved "https://registry.yarnpkg.com/public-encrypt/-/public-encrypt-4.0.3.tgz#4fcc9d77a07e48ba7527e7cbe0de33d0701331e0" - integrity sha512-zVpa8oKZSz5bTMTFClc1fQOnyyEzpl5ozpi1B5YcvBrdohMjH2rfsBtyXcuNuwjsDIXmBYlF2N5FlJYhR29t8Q== - dependencies: - bn.js "^4.1.0" - browserify-rsa "^4.0.0" - create-hash "^1.1.0" - parse-asn1 "^5.0.0" - randombytes "^2.0.1" - safe-buffer "^5.1.2" - -pull-cat@^1.1.9: - version "1.1.11" - resolved "https://registry.yarnpkg.com/pull-cat/-/pull-cat-1.1.11.tgz#b642dd1255da376a706b6db4fa962f5fdb74c31b" - integrity sha1-tkLdElXaN2pwa220+pYvX9t0wxs= - -pull-defer@^0.2.2: - version "0.2.3" - resolved "https://registry.yarnpkg.com/pull-defer/-/pull-defer-0.2.3.tgz#4ee09c6d9e227bede9938db80391c3dac489d113" - integrity sha512-/An3KE7mVjZCqNhZsr22k1Tx8MACnUnHZZNPSJ0S62td8JtYr/AiRG42Vz7Syu31SoTLUzVIe61jtT/pNdjVYA== - -pull-level@^2.0.3: - version "2.0.4" - resolved "https://registry.yarnpkg.com/pull-level/-/pull-level-2.0.4.tgz#4822e61757c10bdcc7cf4a03af04c92734c9afac" - integrity sha512-fW6pljDeUThpq5KXwKbRG3X7Ogk3vc75d5OQU/TvXXui65ykm+Bn+fiktg+MOx2jJ85cd+sheufPL+rw9QSVZg== - dependencies: - level-post "^1.0.7" - pull-cat "^1.1.9" - pull-live "^1.0.1" - pull-pushable "^2.0.0" - pull-stream "^3.4.0" - pull-window "^2.1.4" - stream-to-pull-stream "^1.7.1" - -pull-live@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/pull-live/-/pull-live-1.0.1.tgz#a4ecee01e330155e9124bbbcf4761f21b38f51f5" - integrity sha1-pOzuAeMwFV6RJLu89HYfIbOPUfU= - dependencies: - pull-cat "^1.1.9" - pull-stream "^3.4.0" - -pull-pushable@^2.0.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/pull-pushable/-/pull-pushable-2.2.0.tgz#5f2f3aed47ad86919f01b12a2e99d6f1bd776581" - integrity sha1-Xy867UethpGfAbEqLpnW8b13ZYE= - -pull-stream@^3.2.3, pull-stream@^3.4.0, pull-stream@^3.6.8: - version "3.6.14" - resolved "https://registry.yarnpkg.com/pull-stream/-/pull-stream-3.6.14.tgz#529dbd5b86131f4a5ed636fdf7f6af00781357ee" - integrity sha512-KIqdvpqHHaTUA2mCYcLG1ibEbu/LCKoJZsBWyv9lSYtPkJPBq8m3Hxa103xHi6D2thj5YXa0TqK3L3GUkwgnew== - -pull-window@^2.1.4: - version "2.1.4" - resolved "https://registry.yarnpkg.com/pull-window/-/pull-window-2.1.4.tgz#fc3b86feebd1920c7ae297691e23f705f88552f0" - integrity sha1-/DuG/uvRkgx64pdpHiP3BfiFUvA= - dependencies: - looper "^2.0.0" - -pump@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/pump/-/pump-2.0.1.tgz#12399add6e4cf7526d973cbc8b5ce2e2908b3909" - integrity sha512-ruPMNRkN3MHP1cWJc9OWr+T/xDP0jhXYCLfJcBuX54hhfIBnaQmAUMfDcG4DM5UMWByBbJY69QSphm3jtDKIkA== - dependencies: - end-of-stream "^1.1.0" - once "^1.3.1" - -pump@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/pump/-/pump-3.0.0.tgz#b4a2116815bde2f4e1ea602354e8c75565107a64" - integrity sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww== - dependencies: - end-of-stream "^1.1.0" - once "^1.3.1" - -pumpify@^1.3.3, pumpify@^1.3.5: - version "1.5.1" - resolved "https://registry.yarnpkg.com/pumpify/-/pumpify-1.5.1.tgz#36513be246ab27570b1a374a5ce278bfd74370ce" - integrity sha512-oClZI37HvuUJJxSKKrC17bZ9Cu0ZYhEAGPsPUy9KlMUmv9dKX2o77RUmq7f3XjIxbwyGwYzbzQ1L2Ks8sIradQ== - dependencies: - duplexify "^3.6.0" - inherits "^2.0.3" - pump "^2.0.0" - -punycode@1.3.2: - version "1.3.2" - resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.3.2.tgz#9653a036fb7c1ee42342f2325cceefea3926c48d" - integrity sha1-llOgNvt8HuQjQvIyXM7v6jkmxI0= - -punycode@2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.1.0.tgz#5f863edc89b96db09074bad7947bf09056ca4e7d" - integrity sha1-X4Y+3Im5bbCQdLrXlHvwkFbKTn0= - -punycode@^1.2.4, punycode@^1.4.1: - version "1.4.1" - resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.4.1.tgz#c0d5a63b2718800ad8e1eb0fa5269c84dd41845e" - integrity sha1-wNWmOycYgArY4esPpSachN1BhF4= - -punycode@^2.1.0, punycode@^2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.1.1.tgz#b58b010ac40c22c5657616c8d2c2c02c7bf479ec" - integrity sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A== - -qs@6.7.0: - version "6.7.0" - resolved "https://registry.yarnpkg.com/qs/-/qs-6.7.0.tgz#41dc1a015e3d581f1621776be31afb2876a9b1bc" - integrity sha512-VCdBRNFTX1fyE7Nb6FYoURo/SPe62QCaAyzJvUjwRaIsc+NePBEniHlvxFmmX56+HZphIGtV0XeCirBtpDrTyQ== - -qs@~6.5.2: - version "6.5.2" - resolved "https://registry.yarnpkg.com/qs/-/qs-6.5.2.tgz#cb3ae806e8740444584ef154ce8ee98d403f3e36" - integrity sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA== - -query-string@^5.0.1: - version "5.1.1" - resolved "https://registry.yarnpkg.com/query-string/-/query-string-5.1.1.tgz#a78c012b71c17e05f2e3fa2319dd330682efb3cb" - integrity sha512-gjWOsm2SoGlgLEdAGt7a6slVOk9mGiXmPFMqrEhLQ68rhQuBnpfs3+EmlvqKyxnCo9/PPlF+9MtY02S1aFg+Jw== - dependencies: - decode-uri-component "^0.2.0" - object-assign "^4.1.0" - strict-uri-encode "^1.0.0" - -querystring-es3@^0.2.0: - version "0.2.1" - resolved "https://registry.yarnpkg.com/querystring-es3/-/querystring-es3-0.2.1.tgz#9ec61f79049875707d69414596fd907a4d711e73" - integrity sha1-nsYfeQSYdXB9aUFFlv2Qek1xHnM= - -querystring@0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/querystring/-/querystring-0.2.0.tgz#b209849203bb25df820da756e747005878521620" - integrity sha1-sgmEkgO7Jd+CDadW50cAWHhSFiA= - -randombytes@^2.0.0, randombytes@^2.0.1, randombytes@^2.0.5, randombytes@^2.0.6, randombytes@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/randombytes/-/randombytes-2.1.0.tgz#df6f84372f0270dc65cdf6291349ab7a473d4f2a" - integrity sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ== - dependencies: - safe-buffer "^5.1.0" - -randomfill@^1.0.3: - version "1.0.4" - resolved "https://registry.yarnpkg.com/randomfill/-/randomfill-1.0.4.tgz#c92196fc86ab42be983f1bf31778224931d61458" - integrity sha512-87lcbR8+MhcWcUiQ+9e+Rwx8MyR2P7qnt15ynUlbm3TU/fjbgz4GsvfSUDTemtCCtVCqb4ZcEFlyPNTh9bBTLw== - dependencies: - randombytes "^2.0.5" - safe-buffer "^5.1.0" - -range-parser@~1.2.1: - version "1.2.1" - resolved "https://registry.yarnpkg.com/range-parser/-/range-parser-1.2.1.tgz#3cf37023d199e1c24d1a55b84800c2f3e6468031" - integrity sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg== - -raw-body@2.4.0: - version "2.4.0" - resolved "https://registry.yarnpkg.com/raw-body/-/raw-body-2.4.0.tgz#a1ce6fb9c9bc356ca52e89256ab59059e13d0332" - integrity sha512-4Oz8DUIwdvoa5qMJelxipzi/iJIi40O5cGV1wNYp5hvZP8ZN0T+jiNkL0QepXs+EsQ9XJ8ipEDoiH70ySUJP3Q== - dependencies: - bytes "3.1.0" - http-errors "1.7.2" - iconv-lite "0.4.24" - unpipe "1.0.0" - -rc@^1.2.7: - version "1.2.8" - resolved "https://registry.yarnpkg.com/rc/-/rc-1.2.8.tgz#cd924bf5200a075b83c188cd6b9e211b7fc0d3ed" - integrity sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw== - dependencies: - deep-extend "^0.6.0" - ini "~1.3.0" - minimist "^1.2.0" - strip-json-comments "~2.0.1" - -react-is@^16.12.0: - version "16.13.1" - resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.13.1.tgz#789729a4dc36de2999dc156dd6c1d9c18cea56a4" - integrity sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ== - -react-is@^16.8.4: - version "16.12.0" - resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.12.0.tgz#2cc0fe0fba742d97fd527c42a13bec4eeb06241c" - integrity sha512-rPCkf/mWBtKc97aLL9/txD8DZdemK0vkA3JMLShjlJB3Pj3s+lpf1KaBzMfQrAmhMQB0n1cU/SUGgKKBCe837Q== - -read-pkg-up@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/read-pkg-up/-/read-pkg-up-1.0.1.tgz#9d63c13276c065918d57f002a57f40a1b643fb02" - integrity sha1-nWPBMnbAZZGNV/ACpX9AobZD+wI= - dependencies: - find-up "^1.0.0" - read-pkg "^1.0.0" - -read-pkg-up@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/read-pkg-up/-/read-pkg-up-4.0.0.tgz#1b221c6088ba7799601c808f91161c66e58f8978" - integrity sha512-6etQSH7nJGsK0RbG/2TeDzZFa8shjQ1um+SwQQ5cwKy0dhSXdOncEhb1CPpvQG4h7FyOV6EB6YlV0yJvZQNAkA== - dependencies: - find-up "^3.0.0" - read-pkg "^3.0.0" - -read-pkg@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/read-pkg/-/read-pkg-1.1.0.tgz#f5ffaa5ecd29cb31c0474bca7d756b6bb29e3f28" - integrity sha1-9f+qXs0pyzHAR0vKfXVra7KePyg= - dependencies: - load-json-file "^1.0.0" - normalize-package-data "^2.3.2" - path-type "^1.0.0" - -read-pkg@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/read-pkg/-/read-pkg-3.0.0.tgz#9cbc686978fee65d16c00e2b19c237fcf6e38389" - integrity sha1-nLxoaXj+5l0WwA4rGcI3/Pbjg4k= - dependencies: - load-json-file "^4.0.0" - normalize-package-data "^2.3.2" - path-type "^3.0.0" - -"readable-stream@1 || 2", readable-stream@^2.0.0, readable-stream@^2.0.1, readable-stream@^2.0.2, readable-stream@^2.0.5, readable-stream@^2.0.6, readable-stream@^2.1.5, readable-stream@^2.2.2, readable-stream@^2.2.9, readable-stream@^2.3.0, readable-stream@^2.3.3, readable-stream@^2.3.5, readable-stream@^2.3.6, readable-stream@~2.3.6: - version "2.3.6" - resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.6.tgz#b11c27d88b8ff1fbe070643cf94b0c79ae1b0aaf" - integrity sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw== - dependencies: - core-util-is "~1.0.0" - inherits "~2.0.3" - isarray "~1.0.0" - process-nextick-args "~2.0.0" - safe-buffer "~5.1.1" - string_decoder "~1.1.1" - util-deprecate "~1.0.1" - -readable-stream@^1.0.33: - version "1.1.14" - resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-1.1.14.tgz#7cf4c54ef648e3813084c636dd2079e166c081d9" - integrity sha1-fPTFTvZI44EwhMY23SB54WbAgdk= - dependencies: - core-util-is "~1.0.0" - inherits "~2.0.1" - isarray "0.0.1" - string_decoder "~0.10.x" - -readable-stream@^3.0.1, readable-stream@^3.1.1: - version "3.4.0" - resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-3.4.0.tgz#a51c26754658e0a3c21dbf59163bd45ba6f447fc" - integrity sha512-jItXPLmrSR8jmTRmRWJXCnGJsfy85mB3Wd/uINMXA65yrnFo0cPClFIUWzo2najVNSl+mx7/4W8ttlLWJe99pQ== - dependencies: - inherits "^2.0.3" - string_decoder "^1.1.1" - util-deprecate "^1.0.1" - -readable-stream@~1.0.15: - version "1.0.34" - resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-1.0.34.tgz#125820e34bc842d2f2aaafafe4c2916ee32c157c" - integrity sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw= - dependencies: - core-util-is "~1.0.0" - inherits "~2.0.1" - isarray "0.0.1" - string_decoder "~0.10.x" - -readdirp@^2.2.1: - version "2.2.1" - resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-2.2.1.tgz#0e87622a3325aa33e892285caf8b4e846529a525" - integrity sha512-1JU/8q+VgFZyxwrJ+SVIOsh+KywWGpds3NTqikiKpDMZWScmAYyKIgqkO+ARvNWJfXeXR1zxz7aHF4u4CyH6vQ== - dependencies: - graceful-fs "^4.1.11" - micromatch "^3.1.10" - readable-stream "^2.0.2" - -readdirp@~3.2.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-3.2.0.tgz#c30c33352b12c96dfb4b895421a49fd5a9593839" - integrity sha512-crk4Qu3pmXwgxdSgGhgA/eXiJAPQiX4GMOZZMXnqKxHX7TaoL+3gQVo/WeuAiogr07DpnfjIMpXXa+PAIvwPGQ== - dependencies: - picomatch "^2.0.4" - -readdirp@~3.4.0: - version "3.4.0" - resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-3.4.0.tgz#9fdccdf9e9155805449221ac645e8303ab5b9ada" - integrity sha512-0xe001vZBnJEK+uKcj8qOhyAKPzIT+gStxWr3LCB0DwcXR5NZJ3IaC+yGnHCYzB/S7ov3m3EEbZI2zeNvX+hGQ== - dependencies: - picomatch "^2.2.1" - -realpath-native@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/realpath-native/-/realpath-native-1.1.0.tgz#2003294fea23fb0672f2476ebe22fcf498a2d65c" - integrity sha512-wlgPA6cCIIg9gKz0fgAPjnzh4yR/LnXovwuo9hvyGvx3h8nX4+/iLZplfUWasXpqD8BdnGnP5njOFjkUwPzvjA== - dependencies: - util.promisify "^1.0.0" - -rechoir@^0.6.2: - version "0.6.2" - resolved "https://registry.yarnpkg.com/rechoir/-/rechoir-0.6.2.tgz#85204b54dba82d5742e28c96756ef43af50e3384" - integrity sha1-hSBLVNuoLVdC4oyWdW70OvUOM4Q= - dependencies: - resolve "^1.1.6" - -regenerate@^1.2.1: - version "1.4.0" - resolved "https://registry.yarnpkg.com/regenerate/-/regenerate-1.4.0.tgz#4a856ec4b56e4077c557589cae85e7a4c8869a11" - integrity sha512-1G6jJVDWrt0rK99kBjvEtziZNCICAuvIPkSiUFIQxVP06RCVpq3dmDo2oi6ABpYaDYaTRr67BEhL8r1wgEZZKg== - -regenerator-runtime@^0.11.0: - version "0.11.1" - resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz#be05ad7f9bf7d22e056f9726cee5017fbf19e2e9" - integrity sha512-MguG95oij0fC3QV3URf4V2SDYGJhJnJGqvIIgdECeODCT98wSWDAJ94SSuVpYQUoTcGUIL6L4yNB7j1DFFHSBg== - -regenerator-runtime@^0.13.2: - version "0.13.3" - resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.13.3.tgz#7cf6a77d8f5c6f60eb73c5fc1955b2ceb01e6bf5" - integrity sha512-naKIZz2GQ8JWh///G7L3X6LaQUAMp2lvb1rvwwsURe/VXwD6VMfr+/1NuNw3ag8v2kY1aQ/go5SNn79O9JU7yw== - -regenerator-transform@^0.10.0: - version "0.10.1" - resolved "https://registry.yarnpkg.com/regenerator-transform/-/regenerator-transform-0.10.1.tgz#1e4996837231da8b7f3cf4114d71b5691a0680dd" - integrity sha512-PJepbvDbuK1xgIgnau7Y90cwaAmO/LCLMI2mPvaXq2heGMR3aWW5/BQvYrhJ8jgmQjXewXvBjzfqKcVOmhjZ6Q== - dependencies: - babel-runtime "^6.18.0" - babel-types "^6.19.0" - private "^0.1.6" - -regex-not@^1.0.0, regex-not@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/regex-not/-/regex-not-1.0.2.tgz#1f4ece27e00b0b65e0247a6810e6a85d83a5752c" - integrity sha512-J6SDjUgDxQj5NusnOtdFxDwN/+HWykR8GELwctJ7mdqhcyy1xEc4SRFHUXvxTp661YaVKAjfRLZ9cCqS6tn32A== - dependencies: - extend-shallow "^3.0.2" - safe-regex "^1.1.0" - -regexpu-core@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/regexpu-core/-/regexpu-core-2.0.0.tgz#49d038837b8dcf8bfa5b9a42139938e6ea2ae240" - integrity sha1-SdA4g3uNz4v6W5pCE5k45uoq4kA= - dependencies: - regenerate "^1.2.1" - regjsgen "^0.2.0" - regjsparser "^0.1.4" - -regjsgen@^0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/regjsgen/-/regjsgen-0.2.0.tgz#6c016adeac554f75823fe37ac05b92d5a4edb1f7" - integrity sha1-bAFq3qxVT3WCP+N6wFuS1aTtsfc= - -regjsparser@^0.1.4: - version "0.1.5" - resolved "https://registry.yarnpkg.com/regjsparser/-/regjsparser-0.1.5.tgz#7ee8f84dc6fa792d3fd0ae228d24bd949ead205c" - integrity sha1-fuj4Tcb6eS0/0K4ijSS9lJ6tIFw= - dependencies: - jsesc "~0.5.0" - -remove-bom-buffer@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/remove-bom-buffer/-/remove-bom-buffer-3.0.0.tgz#c2bf1e377520d324f623892e33c10cac2c252b53" - integrity sha512-8v2rWhaakv18qcvNeli2mZ/TMTL2nEyAKRvzo1WtnZBl15SHyEhrCu2/xKlJyUFKHiHgfXIyuY6g2dObJJycXQ== - dependencies: - is-buffer "^1.1.5" - is-utf8 "^0.2.1" - -remove-bom-stream@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/remove-bom-stream/-/remove-bom-stream-1.2.0.tgz#05f1a593f16e42e1fb90ebf59de8e569525f9523" - integrity sha1-BfGlk/FuQuH7kOv1nejlaVJflSM= - dependencies: - remove-bom-buffer "^3.0.0" - safe-buffer "^5.1.0" - through2 "^2.0.3" - -remove-trailing-separator@^1.0.1, remove-trailing-separator@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz#c24bce2a283adad5bc3f58e0d48249b92379d8ef" - integrity sha1-wkvOKig62tW8P1jg1IJJuSN52O8= - -repeat-element@^1.1.2: - version "1.1.3" - resolved "https://registry.yarnpkg.com/repeat-element/-/repeat-element-1.1.3.tgz#782e0d825c0c5a3bb39731f84efee6b742e6b1ce" - integrity sha512-ahGq0ZnV5m5XtZLMb+vP76kcAM5nkLqk0lpqAuojSKGgQtn4eRi4ZZGm2olo2zKFH+sMsWaqOCW1dqAnOru72g== - -repeat-string@^1.6.1: - version "1.6.1" - resolved "https://registry.yarnpkg.com/repeat-string/-/repeat-string-1.6.1.tgz#8dcae470e1c88abc2d600fff4a776286da75e637" - integrity sha1-jcrkcOHIirwtYA//Sndihtp15jc= - -repeating@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/repeating/-/repeating-2.0.1.tgz#5214c53a926d3552707527fbab415dbc08d06dda" - integrity sha1-UhTFOpJtNVJwdSf7q0FdvAjQbdo= - dependencies: - is-finite "^1.0.0" - -replace-ext@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/replace-ext/-/replace-ext-1.0.0.tgz#de63128373fcbf7c3ccfa4de5a480c45a67958eb" - integrity sha1-3mMSg3P8v3w8z6TeWkgMRaZ5WOs= - -replace-homedir@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/replace-homedir/-/replace-homedir-1.0.0.tgz#e87f6d513b928dde808260c12be7fec6ff6e798c" - integrity sha1-6H9tUTuSjd6AgmDBK+f+xv9ueYw= - dependencies: - homedir-polyfill "^1.0.1" - is-absolute "^1.0.0" - remove-trailing-separator "^1.1.0" - -request-promise-core@1.1.3: - version "1.1.3" - resolved "https://registry.yarnpkg.com/request-promise-core/-/request-promise-core-1.1.3.tgz#e9a3c081b51380dfea677336061fea879a829ee9" - integrity sha512-QIs2+ArIGQVp5ZYbWD5ZLCY29D5CfWizP8eWnm8FoGD1TX61veauETVQbrV60662V0oFBkrDOuaBI8XgtuyYAQ== - dependencies: - lodash "^4.17.15" - -request-promise-native@^1.0.5: - version "1.0.8" - resolved "https://registry.yarnpkg.com/request-promise-native/-/request-promise-native-1.0.8.tgz#a455b960b826e44e2bf8999af64dff2bfe58cb36" - integrity sha512-dapwLGqkHtwL5AEbfenuzjTYg35Jd6KPytsC2/TLkVMz8rm+tNt72MGUWT1RP/aYawMpN6HqbNGBQaRcBtjQMQ== - dependencies: - request-promise-core "1.1.3" - stealthy-require "^1.1.1" - tough-cookie "^2.3.3" - -request@^2.67.0, request@^2.79.0, request@^2.85.0, request@^2.87.0: - version "2.88.0" - resolved "https://registry.yarnpkg.com/request/-/request-2.88.0.tgz#9c2fca4f7d35b592efe57c7f0a55e81052124fef" - integrity sha512-NAqBSrijGLZdM0WZNsInLJpkJokL72XYjUpnB0iwsRgxh7dB6COrHnTBNwN0E+lHDAJzu7kLAkDeY08z2/A0hg== - dependencies: - aws-sign2 "~0.7.0" - aws4 "^1.8.0" - caseless "~0.12.0" - combined-stream "~1.0.6" - extend "~3.0.2" - forever-agent "~0.6.1" - form-data "~2.3.2" - har-validator "~5.1.0" - http-signature "~1.2.0" - is-typedarray "~1.0.0" - isstream "~0.1.2" - json-stringify-safe "~5.0.1" - mime-types "~2.1.19" - oauth-sign "~0.9.0" - performance-now "^2.1.0" - qs "~6.5.2" - safe-buffer "^5.1.2" - tough-cookie "~2.4.3" - tunnel-agent "^0.6.0" - uuid "^3.3.2" - -request@^2.88.2: - version "2.88.2" - resolved "https://registry.yarnpkg.com/request/-/request-2.88.2.tgz#d73c918731cb5a87da047e207234146f664d12b3" - integrity sha512-MsvtOrfG9ZcrOwAW+Qi+F6HbD0CWXEh9ou77uOb7FM2WPhwT7smM833PzanhJLsgXjN89Ir6V2PczXNnMpwKhw== - dependencies: - aws-sign2 "~0.7.0" - aws4 "^1.8.0" - caseless "~0.12.0" - combined-stream "~1.0.6" - extend "~3.0.2" - forever-agent "~0.6.1" - form-data "~2.3.2" - har-validator "~5.1.3" - http-signature "~1.2.0" - is-typedarray "~1.0.0" - isstream "~0.1.2" - json-stringify-safe "~5.0.1" - mime-types "~2.1.19" - oauth-sign "~0.9.0" - performance-now "^2.1.0" - qs "~6.5.2" - safe-buffer "^5.1.2" - tough-cookie "~2.5.0" - tunnel-agent "^0.6.0" - uuid "^3.3.2" - -require-directory@^2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42" - integrity sha1-jGStX9MNqxyXbiNE/+f3kqam30I= - -require-from-string@^2.0.0, require-from-string@^2.0.1: - version "2.0.2" - resolved "https://registry.yarnpkg.com/require-from-string/-/require-from-string-2.0.2.tgz#89a7fdd938261267318eafe14f9c32e598c36909" - integrity sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw== - -require-main-filename@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/require-main-filename/-/require-main-filename-1.0.1.tgz#97f717b69d48784f5f526a6c5aa8ffdda055a4d1" - integrity sha1-l/cXtp1IeE9fUmpsWqj/3aBVpNE= - -require-main-filename@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/require-main-filename/-/require-main-filename-2.0.0.tgz#d0b329ecc7cc0f61649f62215be69af54aa8989b" - integrity sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg== - -resolve-cwd@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/resolve-cwd/-/resolve-cwd-2.0.0.tgz#00a9f7387556e27038eae232caa372a6a59b665a" - integrity sha1-AKn3OHVW4nA46uIyyqNypqWbZlo= - dependencies: - resolve-from "^3.0.0" - -resolve-dir@^1.0.0, resolve-dir@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/resolve-dir/-/resolve-dir-1.0.1.tgz#79a40644c362be82f26effe739c9bb5382046f43" - integrity sha1-eaQGRMNivoLybv/nOcm7U4IEb0M= - dependencies: - expand-tilde "^2.0.0" - global-modules "^1.0.0" - -resolve-from@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-3.0.0.tgz#b22c7af7d9d6881bc8b6e653335eebcb0a188748" - integrity sha1-six699nWiBvItuZTM17rywoYh0g= - -resolve-options@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/resolve-options/-/resolve-options-1.1.0.tgz#32bb9e39c06d67338dc9378c0d6d6074566ad131" - integrity sha1-MrueOcBtZzONyTeMDW1gdFZq0TE= - dependencies: - value-or-function "^3.0.0" - -resolve-url@^0.2.1: - version "0.2.1" - resolved "https://registry.yarnpkg.com/resolve-url/-/resolve-url-0.2.1.tgz#2c637fe77c893afd2a663fe21aa9080068e2052a" - integrity sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo= - -resolve@1.1.7, resolve@1.1.x: - version "1.1.7" - resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.1.7.tgz#203114d82ad2c5ed9e8e0411b3932875e889e97b" - integrity sha1-IDEU2CrSxe2ejgQRs5ModeiJ6Xs= - -resolve@1.x, resolve@^1.3.2: - version "1.14.2" - resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.14.2.tgz#dbf31d0fa98b1f29aa5169783b9c290cb865fea2" - integrity sha512-EjlOBLBO1kxsUxsKjLt7TAECyKW6fOh1VRkykQkKGzcBbjjPIxBqGh0jf7GJ3k/f5mxMqW3htMD3WdTUVtW8HQ== - dependencies: - path-parse "^1.0.6" - -resolve@^1.1.6, resolve@^1.1.7, resolve@^1.10.0, resolve@^1.4.0, resolve@^1.8.1: - version "1.13.1" - resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.13.1.tgz#be0aa4c06acd53083505abb35f4d66932ab35d16" - integrity sha512-CxqObCX8K8YtAhOBRg+lrcdn+LK+WYOS8tSjqSFbjtrI5PnS63QPhZl4+yKfrU9tdsbMu9Anr/amegT87M9Z6w== - dependencies: - path-parse "^1.0.6" - -resolve@~1.11.1: - version "1.11.1" - resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.11.1.tgz#ea10d8110376982fef578df8fc30b9ac30a07a3e" - integrity sha512-vIpgF6wfuJOZI7KKKSP+HmiKggadPQAdsp5HiC1mvqnfp0gF1vdwgBWZIdrVft9pgqoMFQN+R7BSWZiBxx+BBw== - dependencies: - path-parse "^1.0.6" - -responselike@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/responselike/-/responselike-1.0.2.tgz#918720ef3b631c5642be068f15ade5a46f4ba1e7" - integrity sha1-kYcg7ztjHFZCvgaPFa3lpG9Loec= - dependencies: - lowercase-keys "^1.0.0" - -resumer@~0.0.0: - version "0.0.0" - resolved "https://registry.yarnpkg.com/resumer/-/resumer-0.0.0.tgz#f1e8f461e4064ba39e82af3cdc2a8c893d076759" - integrity sha1-8ej0YeQGS6Oegq883CqMiT0HZ1k= - dependencies: - through "~2.3.4" - -ret@~0.1.10: - version "0.1.15" - resolved "https://registry.yarnpkg.com/ret/-/ret-0.1.15.tgz#b8a4825d5bdb1fc3f6f53c2bc33f81388681c7bc" - integrity sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg== - -reusify@^1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/reusify/-/reusify-1.0.4.tgz#90da382b1e126efc02146e90845a88db12925d76" - integrity sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw== - -rimraf@^2.2.8, rimraf@^2.5.4, rimraf@^2.6.1, rimraf@^2.6.2, rimraf@^2.6.3: - version "2.7.1" - resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.7.1.tgz#35797f13a7fdadc566142c29d4f07ccad483e3ec" - integrity sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w== - dependencies: - glob "^7.1.3" - -ripemd160@^2.0.0, ripemd160@^2.0.1: - version "2.0.2" - resolved "https://registry.yarnpkg.com/ripemd160/-/ripemd160-2.0.2.tgz#a1c1a6f624751577ba5d07914cbc92850585890c" - integrity sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA== - dependencies: - hash-base "^3.0.0" - inherits "^2.0.1" - -rlp@^2.0.0, rlp@^2.2.1, rlp@^2.2.2, rlp@^2.2.3: - version "2.2.4" - resolved "https://registry.yarnpkg.com/rlp/-/rlp-2.2.4.tgz#d6b0e1659e9285fc509a5d169a9bd06f704951c1" - integrity sha512-fdq2yYCWpAQBhwkZv+Z8o/Z4sPmYm1CUq6P7n6lVTOdb949CnqA0sndXal5C1NleSVSZm6q5F3iEbauyVln/iw== - dependencies: - bn.js "^4.11.1" - -rsvp@^4.8.4: - version "4.8.5" - resolved "https://registry.yarnpkg.com/rsvp/-/rsvp-4.8.5.tgz#c8f155311d167f68f21e168df71ec5b083113734" - integrity sha512-nfMOlASu9OnRJo1mbEk2cz0D56a1MBNrJ7orjRZQG10XDyuvwksKbuXNp6qa+kbn839HwjwhBzhFmdsaEAfauA== - -run-parallel@^1.1.9: - version "1.1.9" - resolved "https://registry.yarnpkg.com/run-parallel/-/run-parallel-1.1.9.tgz#c9dd3a7cf9f4b2c4b6244e173a6ed866e61dd679" - integrity sha512-DEqnSRTDw/Tc3FXf49zedI638Z9onwUotBMiUFKmrO2sdFKIbXamXGQ3Axd4qgphxKB4kw/qP1w5kTxnfU1B9Q== - -run-queue@^1.0.0, run-queue@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/run-queue/-/run-queue-1.0.3.tgz#e848396f057d223f24386924618e25694161ec47" - integrity sha1-6Eg5bwV9Ij8kOGkkYY4laUFh7Ec= - dependencies: - aproba "^1.1.1" - -rustbn.js@~0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/rustbn.js/-/rustbn.js-0.2.0.tgz#8082cb886e707155fd1cb6f23bd591ab8d55d0ca" - integrity sha512-4VlvkRUuCJvr2J6Y0ImW7NvTCriMi7ErOAqWk1y69vAdoNIzCF3yPmgeNzx+RQTLEDFq5sHfscn1MwHxP9hNfA== - -rxjs@^6.5.3: - version "6.5.3" - resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-6.5.3.tgz#510e26317f4db91a7eb1de77d9dd9ba0a4899a3a" - integrity sha512-wuYsAYYFdWTAnAaPoKGNhfpWwKZbJW+HgAJ+mImp+Epl7BG8oNWBCTyRM8gba9k4lk8BgWdoYm21Mo/RYhhbgA== - dependencies: - tslib "^1.9.0" - -safe-buffer@5.1.2, safe-buffer@~5.1.0, safe-buffer@~5.1.1: - version "5.1.2" - resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d" - integrity sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g== - -safe-buffer@^5.0.1, safe-buffer@^5.1.0, safe-buffer@^5.1.1, safe-buffer@^5.1.2, safe-buffer@^5.2.0, safe-buffer@~5.2.0: - version "5.2.0" - resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.0.tgz#b74daec49b1148f88c64b68d49b1e815c1f2f519" - integrity sha512-fZEwUGbVl7kouZs1jCdMLdt95hdIv0ZeHg6L7qPeciMZhZ+/gdesW4wgTARkrFWEpspjEATAzUGPG8N2jJiwbg== - -safe-event-emitter@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/safe-event-emitter/-/safe-event-emitter-1.0.1.tgz#5b692ef22329ed8f69fdce607e50ca734f6f20af" - integrity sha512-e1wFe99A91XYYxoQbcq2ZJUWurxEyP8vfz7A7vuUe1s95q8r5ebraVaA1BukYJcpM6V16ugWoD9vngi8Ccu5fg== - dependencies: - events "^3.0.0" - -safe-regex@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/safe-regex/-/safe-regex-1.1.0.tgz#40a3669f3b077d1e943d44629e157dd48023bf2e" - integrity sha1-QKNmnzsHfR6UPURinhV91IAjvy4= - dependencies: - ret "~0.1.10" - -"safer-buffer@>= 2.1.2 < 3", safer-buffer@^2.0.2, safer-buffer@^2.1.0, safer-buffer@~2.1.0: - version "2.1.2" - resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" - integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg== - -sane@^4.0.3: - version "4.1.0" - resolved "https://registry.yarnpkg.com/sane/-/sane-4.1.0.tgz#ed881fd922733a6c461bc189dc2b6c006f3ffded" - integrity sha512-hhbzAgTIX8O7SHfp2c8/kREfEn4qO/9q8C9beyY6+tvZ87EpoZ3i1RIEvp27YBswnNbY9mWd6paKVmKbAgLfZA== - dependencies: - "@cnakazawa/watch" "^1.0.3" - anymatch "^2.0.0" - capture-exit "^2.0.0" - exec-sh "^0.3.2" - execa "^1.0.0" - fb-watchman "^2.0.0" - micromatch "^3.1.4" - minimist "^1.1.1" - walker "~1.0.5" - -sax@^1.2.4: - version "1.2.4" - resolved "https://registry.yarnpkg.com/sax/-/sax-1.2.4.tgz#2816234e2378bddc4e5354fab5caa895df7100d9" - integrity sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw== - -schema-utils@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/schema-utils/-/schema-utils-1.0.0.tgz#0b79a93204d7b600d4b2850d1f66c2a34951c770" - integrity sha512-i27Mic4KovM/lnGsy8whRCHhc7VicJajAjTrYg11K9zfZXnYIt4k5F+kZkwjnrhKzLic/HLU4j11mjsz2G/75g== - dependencies: - ajv "^6.1.0" - ajv-errors "^1.0.0" - ajv-keywords "^3.1.0" - -scrypt-js@2.0.3: - version "2.0.3" - resolved "https://registry.yarnpkg.com/scrypt-js/-/scrypt-js-2.0.3.tgz#bb0040be03043da9a012a2cea9fc9f852cfc87d4" - integrity sha1-uwBAvgMEPamgEqLOqfyfhSz8h9Q= - -scrypt-js@2.0.4: - version "2.0.4" - resolved "https://registry.yarnpkg.com/scrypt-js/-/scrypt-js-2.0.4.tgz#32f8c5149f0797672e551c07e230f834b6af5f16" - integrity sha512-4KsaGcPnuhtCZQCxFxN3GVYIhKFPTdLd8PLC552XwbMndtD0cjRFAhDuuydXQ0h08ZfPgzqe6EKHozpuH74iDw== - -scrypt-js@3.0.1, scrypt-js@^3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/scrypt-js/-/scrypt-js-3.0.1.tgz#d314a57c2aef69d1ad98a138a21fe9eafa9ee312" - integrity sha512-cdwTTnqPu0Hyvf5in5asVdZocVDTNRmR7XEcJuIzMjJeSHybHl7vpB66AzwTaIg6CLSbtjcxc8fqcySfnTkccA== - -scrypt.js@^0.3.0, "scrypt.js@https://registry.npmjs.org/@compound-finance/ethereumjs-wallet/-/ethereumjs-wallet-0.6.3.tgz": - version "0.6.3" - resolved "https://registry.npmjs.org/@compound-finance/ethereumjs-wallet/-/ethereumjs-wallet-0.6.3.tgz#707128975a68333df615f4098b51f82d983f7416" - dependencies: - aes-js "^3.1.1" - bs58check "^2.1.2" - ethereumjs-util "^6.0.0" - hdkey "^1.1.1" - randombytes "^2.0.6" - safe-buffer "^5.1.2" - utf8 "^3.0.0" - uuid "^3.3.2" - -scryptsy@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/scryptsy/-/scryptsy-2.1.0.tgz#8d1e8d0c025b58fdd25b6fa9a0dc905ee8faa790" - integrity sha512-1CdSqHQowJBnMAFyPEBRfqag/YP9OF394FV+4YREIJX4ljD7OxvQRDayyoyyCk+senRjSkP6VnUNQmVQqB6g7w== - -secp256k1@^3.0.1: - version "3.7.1" - resolved "https://registry.yarnpkg.com/secp256k1/-/secp256k1-3.7.1.tgz#12e473e0e9a7c2f2d4d4818e722ad0e14cc1e2f1" - integrity sha512-1cf8sbnRreXrQFdH6qsg2H71Xw91fCCS9Yp021GnUNJzWJS/py96fS4lHbnTnouLp08Xj6jBoBB6V78Tdbdu5g== - dependencies: - bindings "^1.5.0" - bip66 "^1.1.5" - bn.js "^4.11.8" - create-hash "^1.2.0" - drbg.js "^1.0.1" - elliptic "^6.4.1" - nan "^2.14.0" - safe-buffer "^5.1.2" - -seedrandom@3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/seedrandom/-/seedrandom-3.0.1.tgz#eb3dde015bcf55df05a233514e5df44ef9dce083" - integrity sha512-1/02Y/rUeU1CJBAGLebiC5Lbo5FnB22gQbIFFYTLkwvp1xdABZJH1sn4ZT1MzXmPpzv+Rf/Lu2NcsLJiK4rcDg== - -seek-bzip@^1.0.5: - version "1.0.5" - resolved "https://registry.yarnpkg.com/seek-bzip/-/seek-bzip-1.0.5.tgz#cfe917cb3d274bcffac792758af53173eb1fabdc" - integrity sha1-z+kXyz0nS8/6x5J1ivUxc+sfq9w= - dependencies: - commander "~2.8.1" - -semaphore-async-await@^1.5.1: - version "1.5.1" - resolved "https://registry.yarnpkg.com/semaphore-async-await/-/semaphore-async-await-1.5.1.tgz#857bef5e3644601ca4b9570b87e9df5ca12974fa" - integrity sha1-hXvvXjZEYBykuVcLh+nfXKEpdPo= - -semaphore@>=1.0.1, semaphore@^1.0.3, semaphore@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/semaphore/-/semaphore-1.1.0.tgz#aaad8b86b20fe8e9b32b16dc2ee682a8cd26a8aa" - integrity sha512-O4OZEaNtkMd/K0i6js9SL+gqy0ZCBMgUvlSqHKi4IBdjhe7wB8pwztUk1BbZ1fmrvpwFrPbHzqd2w5pTcJH6LA== - -semver-greatest-satisfied-range@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/semver-greatest-satisfied-range/-/semver-greatest-satisfied-range-1.1.0.tgz#13e8c2658ab9691cb0cd71093240280d36f77a5b" - integrity sha1-E+jCZYq5aRywzXEJMkAoDTb3els= - dependencies: - sver-compat "^1.5.0" - -"semver@2 || 3 || 4 || 5", semver@^5.3.0, semver@^5.4.1, semver@^5.5, semver@^5.5.0, semver@^5.5.1, semver@^5.6.0: - version "5.7.1" - resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.1.tgz#a954f931aeba508d307bbf069eff0c01c96116f7" - integrity sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ== - -semver@5.5.0: - version "5.5.0" - resolved "https://registry.yarnpkg.com/semver/-/semver-5.5.0.tgz#dc4bbc7a6ca9d916dee5d43516f0092b58f7b8ab" - integrity sha512-4SJ3dm0WAwWy/NVeioZh5AntkdJoWKxHxcmyP622fOkgHa4z3R0TdBJICINyaSDE6uNwVc8gZr+ZinwZAH4xIA== - -semver@^6.0.0, semver@^6.2.0, semver@^6.3.0: - version "6.3.0" - resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d" - integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw== - -semver@~5.4.1: - version "5.4.1" - resolved "https://registry.yarnpkg.com/semver/-/semver-5.4.1.tgz#e059c09d8571f0540823733433505d3a2f00b18e" - integrity sha512-WfG/X9+oATh81XtllIo/I8gOiY9EXRdv1cQdyykeXK17YcUW3EXUAi2To4pcH6nZtJPr7ZOpM5OMyWJZm+8Rsg== - -send@0.17.1: - version "0.17.1" - resolved "https://registry.yarnpkg.com/send/-/send-0.17.1.tgz#c1d8b059f7900f7466dd4938bdc44e11ddb376c8" - integrity sha512-BsVKsiGcQMFwT8UxypobUKyv7irCNRHk1T0G680vk88yf6LBByGcZJOTJCrTP2xVN6yI+XjPJcNuE3V4fT9sAg== - dependencies: - debug "2.6.9" - depd "~1.1.2" - destroy "~1.0.4" - encodeurl "~1.0.2" - escape-html "~1.0.3" - etag "~1.8.1" - fresh "0.5.2" - http-errors "~1.7.2" - mime "1.6.0" - ms "2.1.1" - on-finished "~2.3.0" - range-parser "~1.2.1" - statuses "~1.5.0" - -serialize-javascript@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-4.0.0.tgz#b525e1238489a5ecfc42afacc3fe99e666f4b1aa" - integrity sha512-GaNA54380uFefWghODBWEGisLZFj00nS5ACs6yHa9nLqlLpVLO8ChDGeKRjZnV4Nh4n0Qi7nhYZD/9fCPzEqkw== - dependencies: - randombytes "^2.1.0" - -serve-static@1.14.1: - version "1.14.1" - resolved "https://registry.yarnpkg.com/serve-static/-/serve-static-1.14.1.tgz#666e636dc4f010f7ef29970a88a674320898b2f9" - integrity sha512-JMrvUwE54emCYWlTI+hGrGv5I8dEwmco/00EvkzIIsR7MqrHonbD9pO2MOfFnpFntl7ecpZs+3mW+XbQZu9QCg== - dependencies: - encodeurl "~1.0.2" - escape-html "~1.0.3" - parseurl "~1.3.3" - send "0.17.1" - -servify@^0.1.12: - version "0.1.12" - resolved "https://registry.yarnpkg.com/servify/-/servify-0.1.12.tgz#142ab7bee1f1d033b66d0707086085b17c06db95" - integrity sha512-/xE6GvsKKqyo1BAY+KxOWXcLpPsUUyji7Qg3bVD7hh1eRze5bR1uYiuDA/k3Gof1s9BTzQZEJK8sNcNGFIzeWw== - dependencies: - body-parser "^1.16.0" - cors "^2.8.1" - express "^4.14.0" - request "^2.79.0" - xhr "^2.3.3" - -set-blocking@^2.0.0, set-blocking@~2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/set-blocking/-/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7" - integrity sha1-BF+XgtARrppoA93TgrJDkrPYkPc= - -set-immediate-shim@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/set-immediate-shim/-/set-immediate-shim-1.0.1.tgz#4b2b1b27eb808a9f8dcc481a58e5e56f599f3f61" - integrity sha1-SysbJ+uAip+NzEgaWOXlb1mfP2E= - -set-value@^2.0.0, set-value@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/set-value/-/set-value-2.0.1.tgz#a18d40530e6f07de4228c7defe4227af8cad005b" - integrity sha512-JxHc1weCN68wRY0fhCoXpyK55m/XPHafOmK4UWD7m2CI14GMcFypt4w/0+NV5f/ZMby2F6S2wwA7fgynh9gWSw== - dependencies: - extend-shallow "^2.0.1" - is-extendable "^0.1.1" - is-plain-object "^2.0.3" - split-string "^3.0.1" - -setimmediate@1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/setimmediate/-/setimmediate-1.0.4.tgz#20e81de622d4a02588ce0c8da8973cbcf1d3138f" - integrity sha1-IOgd5iLUoCWIzgyNqJc8vPHTE48= - -setimmediate@^1.0.4, setimmediate@^1.0.5: - version "1.0.5" - resolved "https://registry.yarnpkg.com/setimmediate/-/setimmediate-1.0.5.tgz#290cbb232e306942d7d7ea9b83732ab7856f8285" - integrity sha1-KQy7Iy4waULX1+qbg3Mqt4VvgoU= - -setprototypeof@1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/setprototypeof/-/setprototypeof-1.1.1.tgz#7e95acb24aa92f5885e0abef5ba131330d4ae683" - integrity sha512-JvdAWfbXeIGaZ9cILp38HntZSFSo3mWg6xGcJJsd+d4aRMOqauag1C63dJfDw7OaMYwEbHMOxEZ1lqVRYP2OAw== - -sha.js@^2.4.0, sha.js@^2.4.8: - version "2.4.11" - resolved "https://registry.yarnpkg.com/sha.js/-/sha.js-2.4.11.tgz#37a5cf0b81ecbc6943de109ba2960d1b26584ae7" - integrity sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ== - dependencies: - inherits "^2.0.1" - safe-buffer "^5.0.1" - -sha3@^1.2.2: - version "1.2.6" - resolved "https://registry.yarnpkg.com/sha3/-/sha3-1.2.6.tgz#102aa3e47dc793e2357902c3cce8760822f9e905" - integrity sha512-KgLGmJGrmNB4JWVsAV11Yk6KbvsAiygWJc7t5IebWva/0NukNrjJqhtKhzy3Eiv2AKuGvhZZt7dt1mDo7HkoiQ== - dependencies: - nan "2.13.2" - -shebang-command@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-1.2.0.tgz#44aac65b695b03398968c39f363fee5deafdf1ea" - integrity sha1-RKrGW2lbAzmJaMOfNj/uXer98eo= - dependencies: - shebang-regex "^1.0.0" - -shebang-regex@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-1.0.0.tgz#da42f49740c0b42db2ca9728571cb190c98efea3" - integrity sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM= - -shellwords@^0.1.1: - version "0.1.1" - resolved "https://registry.yarnpkg.com/shellwords/-/shellwords-0.1.1.tgz#d6b9181c1a48d397324c84871efbcfc73fc0654b" - integrity sha512-vFwSUfQvqybiICwZY5+DAWIPLKsWO31Q91JSKl3UYv+K5c2QRPzn0qzec6QPu1Qc9eHYItiP3NdJqNVqetYAww== - -signal-exit@^3.0.0, signal-exit@^3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.2.tgz#b5fdc08f1287ea1178628e415e25132b73646c6d" - integrity sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0= - -simple-concat@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/simple-concat/-/simple-concat-1.0.0.tgz#7344cbb8b6e26fb27d66b2fc86f9f6d5997521c6" - integrity sha1-c0TLuLbib7J9ZrL8hvn21Zl1IcY= - -simple-get@^2.7.0: - version "2.8.1" - resolved "https://registry.yarnpkg.com/simple-get/-/simple-get-2.8.1.tgz#0e22e91d4575d87620620bc91308d57a77f44b5d" - integrity sha512-lSSHRSw3mQNUGPAYRqo7xy9dhKmxFXIjLjp4KHpf99GEH2VH7C3AM+Qfx6du6jhfUi6Vm7XnbEVEf7Wb6N8jRw== - dependencies: - decompress-response "^3.3.0" - once "^1.3.1" - simple-concat "^1.0.0" - -simple-get@^3.0.3: - version "3.1.0" - resolved "https://registry.yarnpkg.com/simple-get/-/simple-get-3.1.0.tgz#b45be062435e50d159540b576202ceec40b9c6b3" - integrity sha512-bCR6cP+aTdScaQCnQKbPKtJOKDp/hj9EDLJo3Nw4y1QksqaovlW/bnptB6/c1e+qmNIDHRK+oXFDdEqBT8WzUA== - dependencies: - decompress-response "^4.2.0" - once "^1.3.1" - simple-concat "^1.0.0" - -sisteransi@^1.0.3: - version "1.0.4" - resolved "https://registry.yarnpkg.com/sisteransi/-/sisteransi-1.0.4.tgz#386713f1ef688c7c0304dc4c0632898941cad2e3" - integrity sha512-/ekMoM4NJ59ivGSfKapeG+FWtrmWvA1p6FBZwXrqojw90vJu8lBmrTxCMuBCydKtkaUe2zt4PlxeTKpjwMbyig== - -slash@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/slash/-/slash-1.0.0.tgz#c41f2f6c39fc16d1cd17ad4b5d896114ae470d55" - integrity sha1-xB8vbDn8FtHNF61LXYlhFK5HDVU= - -slash@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/slash/-/slash-2.0.0.tgz#de552851a1759df3a8f206535442f5ec4ddeab44" - integrity sha512-ZYKh3Wh2z1PpEXWr0MpSBZ0V6mZHAQfYevttO11c51CaWjGTaadiKZ+wVt1PbMlDV5qhMFslpZCemhwOK7C89A== - -snapdragon-node@^2.0.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/snapdragon-node/-/snapdragon-node-2.1.1.tgz#6c175f86ff14bdb0724563e8f3c1b021a286853b" - integrity sha512-O27l4xaMYt/RSQ5TR3vpWCAB5Kb/czIcqUFOM/C4fYcLnbZUc1PkjTAMjof2pBWaSTwOUd6qUHcFGVGj7aIwnw== - dependencies: - define-property "^1.0.0" - isobject "^3.0.0" - snapdragon-util "^3.0.1" - -snapdragon-util@^3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/snapdragon-util/-/snapdragon-util-3.0.1.tgz#f956479486f2acd79700693f6f7b805e45ab56e2" - integrity sha512-mbKkMdQKsjX4BAL4bRYTj21edOf8cN7XHdYUJEe+Zn99hVEYcMvKPct1IqNe7+AZPirn8BCDOQBHQZknqmKlZQ== - dependencies: - kind-of "^3.2.0" - -snapdragon@^0.8.1: - version "0.8.2" - resolved "https://registry.yarnpkg.com/snapdragon/-/snapdragon-0.8.2.tgz#64922e7c565b0e14204ba1aa7d6964278d25182d" - integrity sha512-FtyOnWN/wCHTVXOMwvSv26d+ko5vWlIDD6zoUJ7LW8vh+ZBC8QdljveRP+crNrtBwioEUWy/4dMtbBjA4ioNlg== - dependencies: - base "^0.11.1" - debug "^2.2.0" - define-property "^0.2.5" - extend-shallow "^2.0.1" - map-cache "^0.2.2" - source-map "^0.5.6" - source-map-resolve "^0.5.0" - use "^3.1.0" - -solc@^0.5.5: - version "0.5.13" - resolved "https://registry.yarnpkg.com/solc/-/solc-0.5.13.tgz#2a5ba2b7681898c6293759441e0a768fb6955def" - integrity sha512-osybDVPGjAqcmSKLU3vh5iHuxbhGlJjQI5ZvI7nRDR0fgblQqYte4MGvNjbew8DPvCrmoH0ZBiz/KBBLlPxfMg== - dependencies: - command-exists "^1.2.8" - commander "3.0.2" - fs-extra "^0.30.0" - js-sha3 "0.8.0" - memorystream "^0.3.1" - require-from-string "^2.0.0" - semver "^5.5.0" - tmp "0.0.33" - -"solidity-parser-antlr@https://github.com/solidity-parser/parser": - version "0.7.0" - resolved "https://github.com/solidity-parser/parser#013764c850294460d51c6f227cc150c152a01338" - -solparse@^2.2.8: - version "2.2.8" - resolved "https://registry.yarnpkg.com/solparse/-/solparse-2.2.8.tgz#d13e42dbed95ce32f43894f5ec53f00d14cf9f11" - integrity sha512-Tm6hdfG72DOxD40SD+T5ddbekWglNWjzDRSNq7ZDIOHVsyaJSeeunUuWNj4DE7uDrJK3tGQuX0ZTDZWNYsGPMA== - dependencies: - mocha "^4.0.1" - pegjs "^0.10.0" - yargs "^10.0.3" - -source-list-map@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/source-list-map/-/source-list-map-2.0.1.tgz#3993bd873bfc48479cca9ea3a547835c7c154b34" - integrity sha512-qnQ7gVMxGNxsiL4lEuJwe/To8UnK7fAnmbGEEH8RpLouuKbeEm0lhbQVFIrNSuB+G7tVrAlVsZgETT5nljf+Iw== - -source-map-resolve@^0.5.0: - version "0.5.2" - resolved "https://registry.yarnpkg.com/source-map-resolve/-/source-map-resolve-0.5.2.tgz#72e2cc34095543e43b2c62b2c4c10d4a9054f259" - integrity sha512-MjqsvNwyz1s0k81Goz/9vRBe9SZdB09Bdw+/zYyO+3CuPk6fouTaxscHkgtE8jKvf01kVfl8riHzERQ/kefaSA== - dependencies: - atob "^2.1.1" - decode-uri-component "^0.2.0" - resolve-url "^0.2.1" - source-map-url "^0.4.0" - urix "^0.1.0" - -source-map-support@0.5.12: - version "0.5.12" - resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.12.tgz#b4f3b10d51857a5af0138d3ce8003b201613d599" - integrity sha512-4h2Pbvyy15EE02G+JOZpUCmqWJuqrs+sEkzewTm++BPi7Hvn/HwcqLAcNxYAyI0x13CpPPn+kMjl+hplXMHITQ== - dependencies: - buffer-from "^1.0.0" - source-map "^0.6.0" - -source-map-support@^0.4.15: - version "0.4.18" - resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.4.18.tgz#0286a6de8be42641338594e97ccea75f0a2c585f" - integrity sha512-try0/JqxPLF9nOjvSta7tVondkP5dwgyLDjVoyMDlmjugT2lRZ1OfsrYTkCd2hkDnJTKRbO/Rl3orm8vlsUzbA== - dependencies: - source-map "^0.5.6" - -source-map-support@^0.5.0, source-map-support@^0.5.6, source-map-support@~0.5.12: - version "0.5.16" - resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.16.tgz#0ae069e7fe3ba7538c64c98515e35339eac5a042" - integrity sha512-efyLRJDr68D9hBBNIPWFjhpFzURh+KJykQwvMyW5UiZzYwoF6l4YMMDIJJEyFWxWCqfyxLzz6tSfUFR+kXXsVQ== - dependencies: - buffer-from "^1.0.0" - source-map "^0.6.0" - -source-map-url@^0.4.0: - version "0.4.0" - resolved "https://registry.yarnpkg.com/source-map-url/-/source-map-url-0.4.0.tgz#3e935d7ddd73631b97659956d55128e87b5084a3" - integrity sha1-PpNdfd1zYxuXZZlW1VEo6HtQhKM= - -source-map@^0.5.0, source-map@^0.5.6, source-map@^0.5.7: - version "0.5.7" - resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.7.tgz#8a039d2d1021d22d1ea14c80d8ea468ba2ef3fcc" - integrity sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w= - -source-map@^0.6.0, source-map@^0.6.1, source-map@~0.6.1: - version "0.6.1" - resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263" - integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g== - -source-map@~0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.2.0.tgz#dab73fbcfc2ba819b4de03bd6f6eaa48164b3f9d" - integrity sha1-2rc/vPwrqBm03gO9b26qSBZLP50= - dependencies: - amdefine ">=0.0.4" - -sparkles@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/sparkles/-/sparkles-1.0.1.tgz#008db65edce6c50eec0c5e228e1945061dd0437c" - integrity sha512-dSO0DDYUahUt/0/pD/Is3VIm5TGJjludZ0HVymmhYF6eNA53PVLhnUk0znSYbH8IYBuJdCE+1luR22jNLMaQdw== - -spdx-correct@^3.0.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/spdx-correct/-/spdx-correct-3.1.0.tgz#fb83e504445268f154b074e218c87c003cd31df4" - integrity sha512-lr2EZCctC2BNR7j7WzJ2FpDznxky1sjfxvvYEyzxNyb6lZXHODmEoJeFu4JupYlkfha1KZpJyoqiJ7pgA1qq8Q== - dependencies: - spdx-expression-parse "^3.0.0" - spdx-license-ids "^3.0.0" - -spdx-exceptions@^2.1.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/spdx-exceptions/-/spdx-exceptions-2.2.0.tgz#2ea450aee74f2a89bfb94519c07fcd6f41322977" - integrity sha512-2XQACfElKi9SlVb1CYadKDXvoajPgBVPn/gOQLrTvHdElaVhr7ZEbqJaRnJLVNeaI4cMEAgVCeBMKF6MWRDCRA== - -spdx-expression-parse@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/spdx-expression-parse/-/spdx-expression-parse-3.0.0.tgz#99e119b7a5da00e05491c9fa338b7904823b41d0" - integrity sha512-Yg6D3XpRD4kkOmTpdgbUiEJFKghJH03fiC1OPll5h/0sO6neh2jqRDVHOQ4o/LMea0tgCkbMgea5ip/e+MkWyg== - dependencies: - spdx-exceptions "^2.1.0" - spdx-license-ids "^3.0.0" - -spdx-license-ids@^3.0.0: - version "3.0.5" - resolved "https://registry.yarnpkg.com/spdx-license-ids/-/spdx-license-ids-3.0.5.tgz#3694b5804567a458d3c8045842a6358632f62654" - integrity sha512-J+FWzZoynJEXGphVIS+XEh3kFSjZX/1i9gFBaWQcB+/tmpe2qUsSBABpcxqxnAxFdiUFEgAX1bjYGQvIZmoz9Q== - -split-string@^3.0.1, split-string@^3.0.2: - version "3.1.0" - resolved "https://registry.yarnpkg.com/split-string/-/split-string-3.1.0.tgz#7cb09dda3a86585705c64b39a6466038682e8fe2" - integrity sha512-NzNVhJDYpwceVVii8/Hu6DKfD2G+NrQHlS/V/qgv763EYudVwEcMQNxd2lh+0VrUByXN/oJkl5grOhYWvQUYiw== - dependencies: - extend-shallow "^3.0.0" - -sprintf-js@~1.0.2: - version "1.0.3" - resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c" - integrity sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw= - -sshpk@^1.7.0: - version "1.16.1" - resolved "https://registry.yarnpkg.com/sshpk/-/sshpk-1.16.1.tgz#fb661c0bef29b39db40769ee39fa70093d6f6877" - integrity sha512-HXXqVUq7+pcKeLqqZj6mHFUMvXtOJt1uoUx09pFW6011inTMxqI8BA8PM95myrIyyKwdnzjdFjLiE6KBPVtJIg== - dependencies: - asn1 "~0.2.3" - assert-plus "^1.0.0" - bcrypt-pbkdf "^1.0.0" - dashdash "^1.12.0" - ecc-jsbn "~0.1.1" - getpass "^0.1.1" - jsbn "~0.1.0" - safer-buffer "^2.0.2" - tweetnacl "~0.14.0" - -ssri@^6.0.1: - version "6.0.1" - resolved "https://registry.yarnpkg.com/ssri/-/ssri-6.0.1.tgz#2a3c41b28dd45b62b63676ecb74001265ae9edd8" - integrity sha512-3Wge10hNcT1Kur4PDFwEieXSCMCJs/7WvSACcrMYrNp+b8kDL1/0wJch5Ni2WrtwEa2IO8OsVfeKIciKCDx/QA== - dependencies: - figgy-pudding "^3.5.1" - -stack-trace@0.0.10: - version "0.0.10" - resolved "https://registry.yarnpkg.com/stack-trace/-/stack-trace-0.0.10.tgz#547c70b347e8d32b4e108ea1a2a159e5fdde19c0" - integrity sha1-VHxws0fo0ytOEI6hoqFZ5f3eGcA= - -stack-utils@^1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/stack-utils/-/stack-utils-1.0.2.tgz#33eba3897788558bebfc2db059dc158ec36cebb8" - integrity sha512-MTX+MeG5U994cazkjd/9KNAapsHnibjMLnfXodlkXw76JEea0UiNzrqidzo1emMwk7w5Qhc9jd4Bn9TBb1MFwA== - -static-extend@^0.1.1: - version "0.1.2" - resolved "https://registry.yarnpkg.com/static-extend/-/static-extend-0.1.2.tgz#60809c39cbff55337226fd5e0b520f341f1fb5c6" - integrity sha1-YICcOcv/VTNyJv1eC1IPNB8ftcY= - dependencies: - define-property "^0.2.5" - object-copy "^0.1.0" - -"statuses@>= 1.5.0 < 2", statuses@~1.5.0: - version "1.5.0" - resolved "https://registry.yarnpkg.com/statuses/-/statuses-1.5.0.tgz#161c7dac177659fd9811f43771fa99381478628c" - integrity sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow= - -stealthy-require@^1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/stealthy-require/-/stealthy-require-1.1.1.tgz#35b09875b4ff49f26a777e509b3090a3226bf24b" - integrity sha1-NbCYdbT/SfJqd35QmzCQoyJr8ks= - -stream-browserify@^2.0.1: - version "2.0.2" - resolved "https://registry.yarnpkg.com/stream-browserify/-/stream-browserify-2.0.2.tgz#87521d38a44aa7ee91ce1cd2a47df0cb49dd660b" - integrity sha512-nX6hmklHs/gr2FuxYDltq8fJA1GDlxKQCz8O/IM4atRqBH8OORmBNgfvW5gG10GT/qQ9u0CzIvr2X5Pkt6ntqg== - dependencies: - inherits "~2.0.1" - readable-stream "^2.0.2" - -stream-each@^1.1.0: - version "1.2.3" - resolved "https://registry.yarnpkg.com/stream-each/-/stream-each-1.2.3.tgz#ebe27a0c389b04fbcc233642952e10731afa9bae" - integrity sha512-vlMC2f8I2u/bZGqkdfLQW/13Zihpej/7PmSiMQsbYddxuTsJp8vRe2x2FvVExZg7FaOds43ROAuFJwPR4MTZLw== - dependencies: - end-of-stream "^1.1.0" - stream-shift "^1.0.0" - -stream-exhaust@^1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/stream-exhaust/-/stream-exhaust-1.0.2.tgz#acdac8da59ef2bc1e17a2c0ccf6c320d120e555d" - integrity sha512-b/qaq/GlBK5xaq1yrK9/zFcyRSTNxmcZwFLGSTG0mXgZl/4Z6GgiyYOXOvY7N3eEvFRAG1bkDRz5EPGSvPYQlw== - -stream-http@^2.7.2: - version "2.8.3" - resolved "https://registry.yarnpkg.com/stream-http/-/stream-http-2.8.3.tgz#b2d242469288a5a27ec4fe8933acf623de6514fc" - integrity sha512-+TSkfINHDo4J+ZobQLWiMouQYB+UVYFttRA94FpEzzJ7ZdqcL4uUUQ7WkdkI4DSozGmgBUE/a47L+38PenXhUw== - dependencies: - builtin-status-codes "^3.0.0" - inherits "^2.0.1" - readable-stream "^2.3.6" - to-arraybuffer "^1.0.0" - xtend "^4.0.0" - -stream-shift@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/stream-shift/-/stream-shift-1.0.0.tgz#d5c752825e5367e786f78e18e445ea223a155952" - integrity sha1-1cdSgl5TZ+eG944Y5EXqIjoVWVI= - -stream-to-pull-stream@^1.7.1: - version "1.7.3" - resolved "https://registry.yarnpkg.com/stream-to-pull-stream/-/stream-to-pull-stream-1.7.3.tgz#4161aa2d2eb9964de60bfa1af7feaf917e874ece" - integrity sha512-6sNyqJpr5dIOQdgNy/xcDWwDuzAsAwVzhzrWlAPAQ7Lkjx/rv0wgvxEyKwTq6FmNd5rjTrELt/CLmaSw7crMGg== - dependencies: - looper "^3.0.0" - pull-stream "^3.2.3" - -strict-uri-encode@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/strict-uri-encode/-/strict-uri-encode-1.1.0.tgz#279b225df1d582b1f54e65addd4352e18faa0713" - integrity sha1-J5siXfHVgrH1TmWt3UNS4Y+qBxM= - -string-length@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/string-length/-/string-length-2.0.0.tgz#d40dbb686a3ace960c1cffca562bf2c45f8363ed" - integrity sha1-1A27aGo6zpYMHP/KVivyxF+DY+0= - dependencies: - astral-regex "^1.0.0" - strip-ansi "^4.0.0" - -string-width@^1.0.1, string-width@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/string-width/-/string-width-1.0.2.tgz#118bdf5b8cdc51a2a7e70d211e07e2b0b9b107d3" - integrity sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M= - dependencies: - code-point-at "^1.0.0" - is-fullwidth-code-point "^1.0.0" - strip-ansi "^3.0.0" - -"string-width@^1.0.2 || 2", string-width@^2.0.0, string-width@^2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/string-width/-/string-width-2.1.1.tgz#ab93f27a8dc13d28cac815c462143a6d9012ae9e" - integrity sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw== - dependencies: - is-fullwidth-code-point "^2.0.0" - strip-ansi "^4.0.0" - -string-width@^3.0.0, string-width@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/string-width/-/string-width-3.1.0.tgz#22767be21b62af1081574306f69ac51b62203961" - integrity sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w== - dependencies: - emoji-regex "^7.0.1" - is-fullwidth-code-point "^2.0.0" - strip-ansi "^5.1.0" - -string.prototype.trim@~1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/string.prototype.trim/-/string.prototype.trim-1.1.2.tgz#d04de2c89e137f4d7d206f086b5ed2fae6be8cea" - integrity sha1-0E3iyJ4Tf019IG8Ia17S+ua+jOo= - dependencies: - define-properties "^1.1.2" - es-abstract "^1.5.0" - function-bind "^1.0.2" - -string.prototype.trimleft@^2.1.0, string.prototype.trimleft@^2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/string.prototype.trimleft/-/string.prototype.trimleft-2.1.1.tgz#9bdb8ac6abd6d602b17a4ed321870d2f8dcefc74" - integrity sha512-iu2AGd3PuP5Rp7x2kEZCrB2Nf41ehzh+goo8TV7z8/XDBbsvc6HQIlUl9RjkZ4oyrW1XM5UwlGl1oVEaDjg6Ag== - dependencies: - define-properties "^1.1.3" - function-bind "^1.1.1" - -string.prototype.trimright@^2.1.0, string.prototype.trimright@^2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/string.prototype.trimright/-/string.prototype.trimright-2.1.1.tgz#440314b15996c866ce8a0341894d45186200c5d9" - integrity sha512-qFvWL3/+QIgZXVmJBfpHmxLB7xsUXz6HsUmP8+5dRaC3Q7oKUv9Vo6aMCRZC1smrtyECFsIT30PqBJ1gTjAs+g== - dependencies: - define-properties "^1.1.3" - function-bind "^1.1.1" - -string_decoder@^1.0.0, string_decoder@^1.1.1: - version "1.3.0" - resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.3.0.tgz#42f114594a46cf1a8e30b0a84f56c78c3edac21e" - integrity sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA== - dependencies: - safe-buffer "~5.2.0" - -string_decoder@~0.10.x: - version "0.10.31" - resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-0.10.31.tgz#62e203bc41766c6c28c9fc84301dab1c5310fa94" - integrity sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ= - -string_decoder@~1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.1.1.tgz#9cf1611ba62685d7030ae9e4ba34149c3af03fc8" - integrity sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg== - dependencies: - safe-buffer "~5.1.0" - -strip-ansi@^3.0.0, strip-ansi@^3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-3.0.1.tgz#6a385fb8853d952d5ff05d0e8aaf94278dc63dcf" - integrity sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8= - dependencies: - ansi-regex "^2.0.0" - -strip-ansi@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-4.0.0.tgz#a8479022eb1ac368a871389b635262c505ee368f" - integrity sha1-qEeQIusaw2iocTibY1JixQXuNo8= - dependencies: - ansi-regex "^3.0.0" - -strip-ansi@^5.0.0, strip-ansi@^5.1.0, strip-ansi@^5.2.0: - version "5.2.0" - resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-5.2.0.tgz#8c9a536feb6afc962bdfa5b104a5091c1ad9c0ae" - integrity sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA== - dependencies: - ansi-regex "^4.1.0" - -strip-bom@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-2.0.0.tgz#6219a85616520491f35788bdbf1447a99c7e6b0e" - integrity sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4= - dependencies: - is-utf8 "^0.2.0" - -strip-bom@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-3.0.0.tgz#2334c18e9c759f7bdd56fdef7e9ae3d588e68ed3" - integrity sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM= - -strip-dirs@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/strip-dirs/-/strip-dirs-2.1.0.tgz#4987736264fc344cf20f6c34aca9d13d1d4ed6c5" - integrity sha512-JOCxOeKLm2CAS73y/U4ZeZPTkE+gNVCzKt7Eox84Iej1LT/2pTWYpZKJuxwQpvX1LiZb1xokNR7RLfuBAa7T3g== - dependencies: - is-natural-number "^4.0.1" - -strip-eof@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/strip-eof/-/strip-eof-1.0.0.tgz#bb43ff5598a6eb05d89b59fcd129c983313606bf" - integrity sha1-u0P/VZim6wXYm1n80SnJgzE2Br8= - -strip-hex-prefix@1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/strip-hex-prefix/-/strip-hex-prefix-1.0.0.tgz#0c5f155fef1151373377de9dbb588da05500e36f" - integrity sha1-DF8VX+8RUTczd96du1iNoFUA428= - dependencies: - is-hex-prefixed "1.0.0" - -strip-json-comments@~2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a" - integrity sha1-PFMZQukIwml8DsNEhYwobHygpgo= - -supports-color@4.4.0: - version "4.4.0" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-4.4.0.tgz#883f7ddabc165142b2a61427f3352ded195d1a3e" - integrity sha512-rKC3+DyXWgK0ZLKwmRsrkyHVZAjNkfzeehuFWdGGcqGDTZFH73+RH6S/RDAAxl9GusSjZSUWYLmT9N5pzXFOXQ== - dependencies: - has-flag "^2.0.0" - -supports-color@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-2.0.0.tgz#535d045ce6b6363fa40117084629995e9df324c7" - integrity sha1-U10EXOa2Nj+kARcIRimZXp3zJMc= - -supports-color@^3.1.0: - version "3.2.3" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-3.2.3.tgz#65ac0504b3954171d8a64946b2ae3cbb8a5f54f6" - integrity sha1-ZawFBLOVQXHYpklGsq48u4pfVPY= - dependencies: - has-flag "^1.0.0" - -supports-color@^5.3.0: - version "5.5.0" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.5.0.tgz#e2e69a44ac8772f78a1ec0b35b689df6530efc8f" - integrity sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow== - dependencies: - has-flag "^3.0.0" - -supports-color@^6.1.0: - version "6.1.0" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-6.1.0.tgz#0764abc69c63d5ac842dd4867e8d025e880df8f3" - integrity sha512-qe1jfm1Mg7Nq/NSh6XE24gPXROEVsWHxC1LIx//XNlD9iw7YZQGjZNjYN7xGaEG6iKdA8EtNFW6R0gjnVXp+wQ== - dependencies: - has-flag "^3.0.0" - -supports-color@^7.1.0: - version "7.1.0" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-7.1.0.tgz#68e32591df73e25ad1c4b49108a2ec507962bfd1" - integrity sha512-oRSIpR8pxT1Wr2FquTNnGet79b3BWljqOuoW/h4oBhxJ/HUbX5nX6JSruTkvXDCFMwDPvsaTTbvMLKZWSy0R5g== - dependencies: - has-flag "^4.0.0" - -sver-compat@^1.5.0: - version "1.5.0" - resolved "https://registry.yarnpkg.com/sver-compat/-/sver-compat-1.5.0.tgz#3cf87dfeb4d07b4a3f14827bc186b3fd0c645cd8" - integrity sha1-PPh9/rTQe0o/FIJ7wYaz/QxkXNg= - dependencies: - es6-iterator "^2.0.1" - es6-symbol "^3.1.1" - -swarm-js@0.1.39: - version "0.1.39" - resolved "https://registry.yarnpkg.com/swarm-js/-/swarm-js-0.1.39.tgz#79becb07f291d4b2a178c50fee7aa6e10342c0e8" - integrity sha512-QLMqL2rzF6n5s50BptyD6Oi0R1aWlJC5Y17SRIVXRj6OR1DRIPM7nepvrxxkjA1zNzFz6mUOMjfeqeDaWB7OOg== - dependencies: - bluebird "^3.5.0" - buffer "^5.0.5" - decompress "^4.0.0" - eth-lib "^0.1.26" - fs-extra "^4.0.2" - got "^7.1.0" - mime-types "^2.1.16" - mkdirp-promise "^5.0.1" - mock-fs "^4.1.0" - setimmediate "^1.0.5" - tar "^4.0.2" - xhr-request-promise "^0.1.2" - -swarm-js@^0.1.40: - version "0.1.40" - resolved "https://registry.yarnpkg.com/swarm-js/-/swarm-js-0.1.40.tgz#b1bc7b6dcc76061f6c772203e004c11997e06b99" - integrity sha512-yqiOCEoA4/IShXkY3WKwP5PvZhmoOOD8clsKA7EEcRILMkTEYHCQ21HDCAcVpmIxZq4LyZvWeRJ6quIyHk1caA== - dependencies: - bluebird "^3.5.0" - buffer "^5.0.5" - eth-lib "^0.1.26" - fs-extra "^4.0.2" - got "^7.1.0" - mime-types "^2.1.16" - mkdirp-promise "^5.0.1" - mock-fs "^4.1.0" - setimmediate "^1.0.5" - tar "^4.0.2" - xhr-request "^1.0.1" - -symbol-tree@^3.2.2: - version "3.2.4" - resolved "https://registry.yarnpkg.com/symbol-tree/-/symbol-tree-3.2.4.tgz#430637d248ba77e078883951fb9aa0eed7c63fa2" - integrity sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw== - -tapable@^1.0.0, tapable@^1.1.3: - version "1.1.3" - resolved "https://registry.yarnpkg.com/tapable/-/tapable-1.1.3.tgz#a1fccc06b58db61fd7a45da2da44f5f3a3e67ba2" - integrity sha512-4WK/bYZmj8xLr+HUCODHGF1ZFzsYffasLUgEiMBY4fgtltdO6B4WJtlSbPaDTLpYTcGVwM2qLnFTICEcNxs3kA== - -tape@^4.4.0, tape@^4.6.3: - version "4.11.0" - resolved "https://registry.yarnpkg.com/tape/-/tape-4.11.0.tgz#63d41accd95e45a23a874473051c57fdbc58edc1" - integrity sha512-yixvDMX7q7JIs/omJSzSZrqulOV51EC9dK8dM0TzImTIkHWfe2/kFyL5v+d9C+SrCMaICk59ujsqFAVidDqDaA== - dependencies: - deep-equal "~1.0.1" - defined "~1.0.0" - for-each "~0.3.3" - function-bind "~1.1.1" - glob "~7.1.4" - has "~1.0.3" - inherits "~2.0.4" - minimist "~1.2.0" - object-inspect "~1.6.0" - resolve "~1.11.1" - resumer "~0.0.0" - string.prototype.trim "~1.1.2" - through "~2.3.8" - -tar-fs@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/tar-fs/-/tar-fs-2.0.0.tgz#677700fc0c8b337a78bee3623fdc235f21d7afad" - integrity sha512-vaY0obB6Om/fso8a8vakQBzwholQ7v5+uy+tF3Ozvxv1KNezmVQAiWtcNmMHFSFPqL3dJA8ha6gdtFbfX9mcxA== - dependencies: - chownr "^1.1.1" - mkdirp "^0.5.1" - pump "^3.0.0" - tar-stream "^2.0.0" - -tar-stream@^1.5.2: - version "1.6.2" - resolved "https://registry.yarnpkg.com/tar-stream/-/tar-stream-1.6.2.tgz#8ea55dab37972253d9a9af90fdcd559ae435c555" - integrity sha512-rzS0heiNf8Xn7/mpdSVVSMAWAoy9bfb1WOTYC78Z0UQKeKa/CWS8FOq0lKGNa8DWKAn9gxjCvMLYc5PGXYlK2A== - dependencies: - bl "^1.0.0" - buffer-alloc "^1.2.0" - end-of-stream "^1.0.0" - fs-constants "^1.0.0" - readable-stream "^2.3.0" - to-buffer "^1.1.1" - xtend "^4.0.0" - -tar-stream@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/tar-stream/-/tar-stream-2.1.0.tgz#d1aaa3661f05b38b5acc9b7020efdca5179a2cc3" - integrity sha512-+DAn4Nb4+gz6WZigRzKEZl1QuJVOLtAwwF+WUxy1fJ6X63CaGaUAxJRD2KEn1OMfcbCjySTYpNC6WmfQoIEOdw== - dependencies: - bl "^3.0.0" - end-of-stream "^1.4.1" - fs-constants "^1.0.0" - inherits "^2.0.3" - readable-stream "^3.1.1" - -tar@^4, tar@^4.0.2: - version "4.4.13" - resolved "https://registry.yarnpkg.com/tar/-/tar-4.4.13.tgz#43b364bc52888d555298637b10d60790254ab525" - integrity sha512-w2VwSrBoHa5BsSyH+KxEqeQBAllHhccyMFVHtGtdMpF4W7IRWfZjFiQceJPChOeTsSDVUpER2T8FA93pr0L+QA== - dependencies: - chownr "^1.1.1" - fs-minipass "^1.2.5" - minipass "^2.8.6" - minizlib "^1.2.1" - mkdirp "^0.5.0" - safe-buffer "^5.1.2" - yallist "^3.0.3" - -terser-webpack-plugin@^1.4.3: - version "1.4.5" - resolved "https://registry.yarnpkg.com/terser-webpack-plugin/-/terser-webpack-plugin-1.4.5.tgz#a217aefaea330e734ffacb6120ec1fa312d6040b" - integrity sha512-04Rfe496lN8EYruwi6oPQkG0vo8C+HT49X687FZnpPF0qMAIHONI6HEXYPKDOE8e5HjXTyKfqRd/agHtH0kOtw== - dependencies: - cacache "^12.0.2" - find-cache-dir "^2.1.0" - is-wsl "^1.1.0" - schema-utils "^1.0.0" - serialize-javascript "^4.0.0" - source-map "^0.6.1" - terser "^4.1.2" - webpack-sources "^1.4.0" - worker-farm "^1.7.0" - -terser@^4.1.2: - version "4.4.2" - resolved "https://registry.yarnpkg.com/terser/-/terser-4.4.2.tgz#448fffad0245f4c8a277ce89788b458bfd7706e8" - integrity sha512-Uufrsvhj9O1ikwgITGsZ5EZS6qPokUOkCegS7fYOdGTv+OA90vndUbU6PEjr5ePqHfNUbGyMO7xyIZv2MhsALQ== - dependencies: - commander "^2.20.0" - source-map "~0.6.1" - source-map-support "~0.5.12" - -test-exclude@^5.2.3: - version "5.2.3" - resolved "https://registry.yarnpkg.com/test-exclude/-/test-exclude-5.2.3.tgz#c3d3e1e311eb7ee405e092dac10aefd09091eac0" - integrity sha512-M+oxtseCFO3EDtAaGH7iiej3CBkzXqFMbzqYAACdzKui4eZA+pq3tZEwChvOdNfa7xxy8BfbmgJSIr43cC/+2g== - dependencies: - glob "^7.1.3" - minimatch "^3.0.4" - read-pkg-up "^4.0.0" - require-main-filename "^2.0.0" - -throat@^4.0.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/throat/-/throat-4.1.0.tgz#89037cbc92c56ab18926e6ba4cbb200e15672a6a" - integrity sha1-iQN8vJLFarGJJua6TLsgDhVnKmo= - -through2-filter@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/through2-filter/-/through2-filter-3.0.0.tgz#700e786df2367c2c88cd8aa5be4cf9c1e7831254" - integrity sha512-jaRjI2WxN3W1V8/FMZ9HKIBXixtiqs3SQSX4/YGIiP3gL6djW48VoZq9tDqeCWs3MT8YY5wb/zli8VW8snY1CA== - dependencies: - through2 "~2.0.0" - xtend "~4.0.0" - -through2@^2.0.0, through2@^2.0.3, through2@~2.0.0: - version "2.0.5" - resolved "https://registry.yarnpkg.com/through2/-/through2-2.0.5.tgz#01c1e39eb31d07cb7d03a96a70823260b23132cd" - integrity sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ== - dependencies: - readable-stream "~2.3.6" - xtend "~4.0.1" - -through@^2.3.8, through@~2.3.4, through@~2.3.8: - version "2.3.8" - resolved "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5" - integrity sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU= - -time-stamp@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/time-stamp/-/time-stamp-1.1.0.tgz#764a5a11af50561921b133f3b44e618687e0f5c3" - integrity sha1-dkpaEa9QVhkhsTPztE5hhofg9cM= - -timed-out@^4.0.0, timed-out@^4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/timed-out/-/timed-out-4.0.1.tgz#f32eacac5a175bea25d7fab565ab3ed8741ef56f" - integrity sha1-8y6srFoXW+ol1/q1Zas+2HQe9W8= - -timers-browserify@^2.0.4: - version "2.0.11" - resolved "https://registry.yarnpkg.com/timers-browserify/-/timers-browserify-2.0.11.tgz#800b1f3eee272e5bc53ee465a04d0e804c31211f" - integrity sha512-60aV6sgJ5YEbzUdn9c8kYGIqOubPoUdqQCul3SBAsRCZ40s6Y5cMcrW4dt3/k/EsbLVJNl9n6Vz3fTc+k2GeKQ== - dependencies: - setimmediate "^1.0.4" - -tmp@0.0.33: - version "0.0.33" - resolved "https://registry.yarnpkg.com/tmp/-/tmp-0.0.33.tgz#6d34335889768d21b2bcda0aa277ced3b1bfadf9" - integrity sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw== - dependencies: - os-tmpdir "~1.0.2" - -tmp@0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/tmp/-/tmp-0.1.0.tgz#ee434a4e22543082e294ba6201dcc6eafefa2877" - integrity sha512-J7Z2K08jbGcdA1kkQpJSqLF6T0tdQqpR2pnSUXsIchbPdTI9v3e85cLW0d6WDhwuAleOV71j2xWs8qMPfK7nKw== - dependencies: - rimraf "^2.6.3" - -tmpl@1.0.x: - version "1.0.4" - resolved "https://registry.yarnpkg.com/tmpl/-/tmpl-1.0.4.tgz#23640dd7b42d00433911140820e5cf440e521dd1" - integrity sha1-I2QN17QtAEM5ERQIIOXPRA5SHdE= - -to-absolute-glob@^2.0.0: - version "2.0.2" - resolved "https://registry.yarnpkg.com/to-absolute-glob/-/to-absolute-glob-2.0.2.tgz#1865f43d9e74b0822db9f145b78cff7d0f7c849b" - integrity sha1-GGX0PZ50sIItufFFt4z/fQ98hJs= - dependencies: - is-absolute "^1.0.0" - is-negated-glob "^1.0.0" - -to-arraybuffer@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/to-arraybuffer/-/to-arraybuffer-1.0.1.tgz#7d229b1fcc637e466ca081180836a7aabff83f43" - integrity sha1-fSKbH8xjfkZsoIEYCDanqr/4P0M= - -to-buffer@^1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/to-buffer/-/to-buffer-1.1.1.tgz#493bd48f62d7c43fcded313a03dcadb2e1213a80" - integrity sha512-lx9B5iv7msuFYE3dytT+KE5tap+rNYw+K4jVkb9R/asAb+pbBSM17jtunHplhBe6RRJdZx3Pn2Jph24O32mOVg== - -to-fast-properties@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/to-fast-properties/-/to-fast-properties-1.0.3.tgz#b83571fa4d8c25b82e231b06e3a3055de4ca1a47" - integrity sha1-uDVx+k2MJbguIxsG46MFXeTKGkc= - -to-fast-properties@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/to-fast-properties/-/to-fast-properties-2.0.0.tgz#dc5e698cbd079265bc73e0377681a4e4e83f616e" - integrity sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4= - -to-object-path@^0.3.0: - version "0.3.0" - resolved "https://registry.yarnpkg.com/to-object-path/-/to-object-path-0.3.0.tgz#297588b7b0e7e0ac08e04e672f85c1f4999e17af" - integrity sha1-KXWIt7Dn4KwI4E5nL4XB9JmeF68= - dependencies: - kind-of "^3.0.2" - -to-readable-stream@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/to-readable-stream/-/to-readable-stream-1.0.0.tgz#ce0aa0c2f3df6adf852efb404a783e77c0475771" - integrity sha512-Iq25XBt6zD5npPhlLVXGFN3/gyR2/qODcKNNyTMd4vbm39HUaOiAM4PMq0eMVC/Tkxz+Zjdsc55g9yyz+Yq00Q== - -to-regex-range@^2.1.0: - version "2.1.1" - resolved "https://registry.yarnpkg.com/to-regex-range/-/to-regex-range-2.1.1.tgz#7c80c17b9dfebe599e27367e0d4dd5590141db38" - integrity sha1-fIDBe53+vlmeJzZ+DU3VWQFB2zg= - dependencies: - is-number "^3.0.0" - repeat-string "^1.6.1" - -to-regex-range@^5.0.1: - version "5.0.1" - resolved "https://registry.yarnpkg.com/to-regex-range/-/to-regex-range-5.0.1.tgz#1648c44aae7c8d988a326018ed72f5b4dd0392e4" - integrity sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ== - dependencies: - is-number "^7.0.0" - -to-regex@^3.0.1, to-regex@^3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/to-regex/-/to-regex-3.0.2.tgz#13cfdd9b336552f30b51f33a8ae1b42a7a7599ce" - integrity sha512-FWtleNAtZ/Ki2qtqej2CXTOayOH9bHDQF+Q48VpWyDXjbYxA4Yz8iDB31zXOBUlOHHKidDbqGVrTUvQMPmBGBw== - dependencies: - define-property "^2.0.2" - extend-shallow "^3.0.2" - regex-not "^1.0.2" - safe-regex "^1.1.0" - -to-through@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/to-through/-/to-through-2.0.0.tgz#fc92adaba072647bc0b67d6b03664aa195093af6" - integrity sha1-/JKtq6ByZHvAtn1rA2ZKoZUJOvY= - dependencies: - through2 "^2.0.3" - -toidentifier@1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/toidentifier/-/toidentifier-1.0.0.tgz#7e1be3470f1e77948bc43d94a3c8f4d7752ba553" - integrity sha512-yaOH/Pk/VEhBWWTlhI+qXxDFXlejDGcQipMlyxda9nthulaxLZUNcUqFxokp0vcYnvteJln5FNQDRrxj3YcbVw== - -tough-cookie@^2.3.3, tough-cookie@^2.3.4, tough-cookie@~2.5.0: - version "2.5.0" - resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.5.0.tgz#cd9fb2a0aa1d5a12b473bd9fb96fa3dcff65ade2" - integrity sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g== - dependencies: - psl "^1.1.28" - punycode "^2.1.1" - -tough-cookie@~2.4.3: - version "2.4.3" - resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.4.3.tgz#53f36da3f47783b0925afa06ff9f3b165280f781" - integrity sha512-Q5srk/4vDM54WJsJio3XNn6K2sCG+CQ8G5Wz6bZhRZoAe/+TxjWB/GlFAnYEbkYVlON9FMk/fE3h2RLpPXo4lQ== - dependencies: - psl "^1.1.24" - punycode "^1.4.1" - -tr46@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/tr46/-/tr46-1.0.1.tgz#a8b13fd6bfd2489519674ccde55ba3693b706d09" - integrity sha1-qLE/1r/SSJUZZ0zN5VujaTtwbQk= - dependencies: - punycode "^2.1.0" - -trim-right@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/trim-right/-/trim-right-1.0.1.tgz#cb2e1203067e0c8de1f614094b9fe45704ea6003" - integrity sha1-yy4SAwZ+DI3h9hQJS5/kVwTqYAM= - -truffle-flattener@^1.4.4: - version "1.4.4" - resolved "https://registry.yarnpkg.com/truffle-flattener/-/truffle-flattener-1.4.4.tgz#747a99204001f7d6dce43ea92771e1ff6ac3eafb" - integrity sha512-S/WmvubzlUj1mn56wEI6yo1bmPpKDNdEe5rtyVC1C5iNfZWobD/V69pAYI15IBDJrDqUyh+iXgpTkzov50zpQw== - dependencies: - "@resolver-engine/imports-fs" "^0.2.2" - "@solidity-parser/parser" "^0.6.0" - find-up "^2.1.0" - mkdirp "^1.0.4" - tsort "0.0.1" - -tryer@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/tryer/-/tryer-1.0.1.tgz#f2c85406800b9b0f74c9f7465b81eaad241252f8" - integrity sha512-c3zayb8/kWWpycWYg87P71E1S1ZL6b6IJxfb5fvsUgsf0S2MVGaDhDXXjDMpdCpfWXqptc+4mXwmiy1ypXqRAA== - -ts-jest@^24.0.2: - version "24.3.0" - resolved "https://registry.yarnpkg.com/ts-jest/-/ts-jest-24.3.0.tgz#b97814e3eab359ea840a1ac112deae68aa440869" - integrity sha512-Hb94C/+QRIgjVZlJyiWwouYUF+siNJHJHknyspaOcZ+OQAIdFG/UrdQVXw/0B8Z3No34xkUXZJpOTy9alOWdVQ== - dependencies: - bs-logger "0.x" - buffer-from "1.x" - fast-json-stable-stringify "2.x" - json5 "2.x" - lodash.memoize "4.x" - make-error "1.x" - mkdirp "0.x" - resolve "1.x" - semver "^5.5" - yargs-parser "10.x" - -ts-loader@^8.0.3: - version "8.0.3" - resolved "https://registry.yarnpkg.com/ts-loader/-/ts-loader-8.0.3.tgz#56858f4296edf1ed55e01f8520552984d3f0911c" - integrity sha512-wsqfnVdB7xQiqhqbz2ZPLGHLPZbHVV5Qn/MNFZkCFxRU1miDyxKORucDGxKtsQJ63Rfza0udiUxWF5nHY6bpdQ== - dependencies: - chalk "^2.3.0" - enhanced-resolve "^4.0.0" - loader-utils "^1.0.2" - micromatch "^4.0.0" - semver "^6.0.0" - -ts-pegjs@^0.2.7: - version "0.2.7" - resolved "https://registry.yarnpkg.com/ts-pegjs/-/ts-pegjs-0.2.7.tgz#2b97bbf65898d7296ae59ebc53e68436b5752826" - integrity sha512-pB+lqVyPWEUDy8w4E53Yu8V6w20No75J6lHUD+sFzogGW/Qn/QtkdR+vYYfMVEsDpz7LEKUOU5Rqf6dgVA3qsQ== - dependencies: - pegjs "^0.10.0" - -tslib@^1.9.0: - version "1.10.0" - resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.10.0.tgz#c3c19f95973fb0a62973fb09d90d961ee43e5c8a" - integrity sha512-qOebF53frne81cf0S9B41ByenJ3/IuH8yJKngAX35CmiZySA0khhkovshKK+jGCaMnVomla7gVlIcc3EvKPbTQ== - -tsort@0.0.1: - version "0.0.1" - resolved "https://registry.yarnpkg.com/tsort/-/tsort-0.0.1.tgz#e2280f5e817f8bf4275657fd0f9aebd44f5a2786" - integrity sha1-4igPXoF/i/QnVlf9D5rr1E9aJ4Y= - -tty-browserify@0.0.0: - version "0.0.0" - resolved "https://registry.yarnpkg.com/tty-browserify/-/tty-browserify-0.0.0.tgz#a157ba402da24e9bf957f9aa69d524eed42901a6" - integrity sha1-oVe6QC2iTpv5V/mqadUk7tQpAaY= - -tunnel-agent@^0.6.0: - version "0.6.0" - resolved "https://registry.yarnpkg.com/tunnel-agent/-/tunnel-agent-0.6.0.tgz#27a5dea06b36b04a0a9966774b290868f0fc40fd" - integrity sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0= - dependencies: - safe-buffer "^5.0.1" - -tweetnacl-util@^0.15.0: - version "0.15.0" - resolved "https://registry.yarnpkg.com/tweetnacl-util/-/tweetnacl-util-0.15.0.tgz#4576c1cee5e2d63d207fee52f1ba02819480bc75" - integrity sha1-RXbBzuXi1j0gf+5S8boCgZSAvHU= - -tweetnacl@^0.14.3, tweetnacl@~0.14.0: - version "0.14.5" - resolved "https://registry.yarnpkg.com/tweetnacl/-/tweetnacl-0.14.5.tgz#5ae68177f192d4456269d108afa93ff8743f4f64" - integrity sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q= - -tweetnacl@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/tweetnacl/-/tweetnacl-1.0.1.tgz#2594d42da73cd036bd0d2a54683dd35a6b55ca17" - integrity sha512-kcoMoKTPYnoeS50tzoqjPY3Uv9axeuuFAZY9M/9zFnhoVvRfxz9K29IMPD7jGmt2c8SW7i3gT9WqDl2+nV7p4A== - -type-check@~0.3.2: - version "0.3.2" - resolved "https://registry.yarnpkg.com/type-check/-/type-check-0.3.2.tgz#5884cab512cf1d355e3fb784f30804b2b520db72" - integrity sha1-WITKtRLPHTVeP7eE8wgEsrUg23I= - dependencies: - prelude-ls "~1.1.2" - -type-detect@^4.0.0, type-detect@^4.0.5: - version "4.0.8" - resolved "https://registry.yarnpkg.com/type-detect/-/type-detect-4.0.8.tgz#7646fb5f18871cfbb7749e69bd39a6388eb7450c" - integrity sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g== - -type-is@~1.6.17, type-is@~1.6.18: - version "1.6.18" - resolved "https://registry.yarnpkg.com/type-is/-/type-is-1.6.18.tgz#4e552cd05df09467dcbc4ef739de89f2cf37c131" - integrity sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g== - dependencies: - media-typer "0.3.0" - mime-types "~2.1.24" - -type@^1.0.1: - version "1.2.0" - resolved "https://registry.yarnpkg.com/type/-/type-1.2.0.tgz#848dd7698dafa3e54a6c479e759c4bc3f18847a0" - integrity sha512-+5nt5AAniqsCnu2cEQQdpzCAh33kVx8n0VoFidKpB1dVVLAN/F+bgVOqOJqOnEnrhp222clB5p3vUlD+1QAnfg== - -type@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/type/-/type-2.0.0.tgz#5f16ff6ef2eb44f260494dae271033b29c09a9c3" - integrity sha512-KBt58xCHry4Cejnc2ISQAF7QY+ORngsWfxezO68+12hKV6lQY8P/psIkcbjeHWn7MqcgciWJyCCevFMJdIXpow== - -typedarray-to-buffer@^3.1.5: - version "3.1.5" - resolved "https://registry.yarnpkg.com/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz#a97ee7a9ff42691b9f783ff1bc5112fe3fca9080" - integrity sha512-zdu8XMNEDepKKR+XYOXAVPtWui0ly0NtohUscw+UmaHiAWT8hrV1rr//H6V+0DvJ3OQ19S979M0laLfX8rm82Q== - dependencies: - is-typedarray "^1.0.0" - -typedarray@^0.0.6: - version "0.0.6" - resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" - integrity sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c= - -typescript@^3.5.1: - version "3.7.4" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.7.4.tgz#1743a5ec5fef6a1fa9f3e4708e33c81c73876c19" - integrity sha512-A25xv5XCtarLwXpcDNZzCGvW2D1S3/bACratYBx2sax8PefsFhlYmkQicKHvpYflFS8if4zne5zT5kpJ7pzuvw== - -typescript@^4.0.2: - version "4.0.2" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.0.2.tgz#7ea7c88777c723c681e33bf7988be5d008d05ac2" - integrity sha512-e4ERvRV2wb+rRZ/IQeb3jm2VxBsirQLpQhdxplZ2MEzGvDkkMmPglecnNDfSUBivMjP93vRbngYYDQqQ/78bcQ== - -typewise-core@^1.2, typewise-core@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/typewise-core/-/typewise-core-1.2.0.tgz#97eb91805c7f55d2f941748fa50d315d991ef195" - integrity sha1-l+uRgFx/VdL5QXSPpQ0xXZke8ZU= - -typewise@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/typewise/-/typewise-1.0.3.tgz#1067936540af97937cc5dcf9922486e9fa284651" - integrity sha1-EGeTZUCvl5N8xdz5kiSG6fooRlE= - dependencies: - typewise-core "^1.2.0" - -typewiselite@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/typewiselite/-/typewiselite-1.0.0.tgz#c8882fa1bb1092c06005a97f34ef5c8508e3664e" - integrity sha1-yIgvobsQksBgBal/NO9chQjjZk4= - -u2f-api@0.2.7: - version "0.2.7" - resolved "https://registry.yarnpkg.com/u2f-api/-/u2f-api-0.2.7.tgz#17bf196b242f6bf72353d9858e6a7566cc192720" - integrity sha512-fqLNg8vpvLOD5J/z4B6wpPg4Lvowz1nJ9xdHcCzdUPKcFE/qNCceV2gNZxSJd5vhAZemHr/K/hbzVA0zxB5mkg== - -uglify-js@^3.1.4: - version "3.7.1" - resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.7.1.tgz#35c7de17971a4aa7689cd2eae0a5b39bb838c0c5" - integrity sha512-pnOF7jY82wdIhATVn87uUY/FHU+MDUdPLkmGFvGoclQmeu229eTkbG5gjGGBi3R7UuYYSEeYXY/TTY5j2aym2g== - dependencies: - commander "~2.20.3" - source-map "~0.6.1" - -ultron@~1.1.0: - version "1.1.1" - resolved "https://registry.yarnpkg.com/ultron/-/ultron-1.1.1.tgz#9fe1536a10a664a65266a1e3ccf85fd36302bc9c" - integrity sha512-UIEXBNeYmKptWH6z8ZnqTeS8fV74zG0/eRU9VGkpzz+LIJNs8W/zM/L+7ctCkRrgbNnnR0xxw4bKOr0cW0N0Og== - -unbzip2-stream@^1.0.9: - version "1.3.3" - resolved "https://registry.yarnpkg.com/unbzip2-stream/-/unbzip2-stream-1.3.3.tgz#d156d205e670d8d8c393e1c02ebd506422873f6a" - integrity sha512-fUlAF7U9Ah1Q6EieQ4x4zLNejrRvDWUYmxXUpN3uziFYCHapjWFaCAnreY9bGgxzaMCFAPPpYNng57CypwJVhg== - dependencies: - buffer "^5.2.1" - through "^2.3.8" - -unc-path-regex@^0.1.2: - version "0.1.2" - resolved "https://registry.yarnpkg.com/unc-path-regex/-/unc-path-regex-0.1.2.tgz#e73dd3d7b0d7c5ed86fbac6b0ae7d8c6a69d50fa" - integrity sha1-5z3T17DXxe2G+6xrCufYxqadUPo= - -underscore@1.9.1: - version "1.9.1" - resolved "https://registry.yarnpkg.com/underscore/-/underscore-1.9.1.tgz#06dce34a0e68a7babc29b365b8e74b8925203961" - integrity sha512-5/4etnCkd9c8gwgowi5/om/mYO5ajCaOgdzj/oW+0eQV9WxKBDZw5+ycmKmeaTXjInS/W0BzpGLo2xR2aBwZdg== - -undertaker-registry@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/undertaker-registry/-/undertaker-registry-1.0.1.tgz#5e4bda308e4a8a2ae584f9b9a4359a499825cc50" - integrity sha1-XkvaMI5KiirlhPm5pDWaSZglzFA= - -undertaker@^1.2.1: - version "1.2.1" - resolved "https://registry.yarnpkg.com/undertaker/-/undertaker-1.2.1.tgz#701662ff8ce358715324dfd492a4f036055dfe4b" - integrity sha512-71WxIzDkgYk9ZS+spIB8iZXchFhAdEo2YU8xYqBYJ39DIUIqziK78ftm26eecoIY49X0J2MLhG4hr18Yp6/CMA== - dependencies: - arr-flatten "^1.0.1" - arr-map "^2.0.0" - bach "^1.0.0" - collection-map "^1.0.0" - es6-weak-map "^2.0.1" - last-run "^1.1.0" - object.defaults "^1.0.0" - object.reduce "^1.0.0" - undertaker-registry "^1.0.0" - -union-value@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/union-value/-/union-value-1.0.1.tgz#0b6fe7b835aecda61c6ea4d4f02c14221e109847" - integrity sha512-tJfXmxMeWYnczCVs7XAEvIV7ieppALdyepWMkHkwciRpZraG/xwT+s2JN8+pr1+8jCRf80FFzvr+MpQeeoF4Xg== - dependencies: - arr-union "^3.1.0" - get-value "^2.0.6" - is-extendable "^0.1.1" - set-value "^2.0.1" - -unique-filename@^1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/unique-filename/-/unique-filename-1.1.1.tgz#1d69769369ada0583103a1e6ae87681b56573230" - integrity sha512-Vmp0jIp2ln35UTXuryvjzkjGdRyf9b2lTXuSYUiPmzRcl3FDtYqAwOnTJkAngD9SWhnoJzDbTKwaOrZ+STtxNQ== - dependencies: - unique-slug "^2.0.0" - -unique-slug@^2.0.0: - version "2.0.2" - resolved "https://registry.yarnpkg.com/unique-slug/-/unique-slug-2.0.2.tgz#baabce91083fc64e945b0f3ad613e264f7cd4e6c" - integrity sha512-zoWr9ObaxALD3DOPfjPSqxt4fnZiWblxHIgeWqW8x7UqDzEtHEQLzji2cuJYQFCU6KmoJikOYAZlrTHHebjx2w== - dependencies: - imurmurhash "^0.1.4" - -unique-stream@^2.0.2: - version "2.3.1" - resolved "https://registry.yarnpkg.com/unique-stream/-/unique-stream-2.3.1.tgz#c65d110e9a4adf9a6c5948b28053d9a8d04cbeac" - integrity sha512-2nY4TnBE70yoxHkDli7DMazpWiP7xMdCYqU2nBRO0UB+ZpEkGsSija7MvmvnZFUeC+mrgiUfcHSr3LmRFIg4+A== - dependencies: - json-stable-stringify-without-jsonify "^1.0.1" - through2-filter "^3.0.0" - -universalify@^0.1.0: - version "0.1.2" - resolved "https://registry.yarnpkg.com/universalify/-/universalify-0.1.2.tgz#b646f69be3942dabcecc9d6639c80dc105efaa66" - integrity sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg== - -unorm@^1.3.3: - version "1.6.0" - resolved "https://registry.yarnpkg.com/unorm/-/unorm-1.6.0.tgz#029b289661fba714f1a9af439eb51d9b16c205af" - integrity sha512-b2/KCUlYZUeA7JFUuRJZPUtr4gZvBh7tavtv4fvk4+KV9pfGiR6CQAQAWl49ZpR3ts2dk4FYkP7EIgDJoiOLDA== - -unpipe@1.0.0, unpipe@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/unpipe/-/unpipe-1.0.0.tgz#b2bf4ee8514aae6165b4817829d21b2ef49904ec" - integrity sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw= - -unset-value@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/unset-value/-/unset-value-1.0.0.tgz#8376873f7d2335179ffb1e6fc3a8ed0dfc8ab559" - integrity sha1-g3aHP30jNRef+x5vw6jtDfyKtVk= - dependencies: - has-value "^0.3.1" - isobject "^3.0.0" - -upath@^1.1.1: - version "1.2.0" - resolved "https://registry.yarnpkg.com/upath/-/upath-1.2.0.tgz#8f66dbcd55a883acdae4408af8b035a5044c1894" - integrity sha512-aZwGpamFO61g3OlfT7OQCHqhGnW43ieH9WZeP7QxN/G/jS4jfqUkZxoryvJgVPEcrl5NL/ggHsSmLMHuH64Lhg== - -uri-js@^4.2.2: - version "4.2.2" - resolved "https://registry.yarnpkg.com/uri-js/-/uri-js-4.2.2.tgz#94c540e1ff772956e2299507c010aea6c8838eb0" - integrity sha512-KY9Frmirql91X2Qgjry0Wd4Y+YTdrdZheS8TFwvkbLWf/G5KNJDCh6pKL5OZctEW4+0Baa5idK2ZQuELRwPznQ== - dependencies: - punycode "^2.1.0" - -urix@^0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/urix/-/urix-0.1.0.tgz#da937f7a62e21fec1fd18d49b35c2935067a6c72" - integrity sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI= - -url-parse-lax@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/url-parse-lax/-/url-parse-lax-1.0.0.tgz#7af8f303645e9bd79a272e7a14ac68bc0609da73" - integrity sha1-evjzA2Rem9eaJy56FKxovAYJ2nM= - dependencies: - prepend-http "^1.0.1" - -url-parse-lax@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/url-parse-lax/-/url-parse-lax-3.0.0.tgz#16b5cafc07dbe3676c1b1999177823d6503acb0c" - integrity sha1-FrXK/Afb42dsGxmZF3gj1lA6yww= - dependencies: - prepend-http "^2.0.0" - -url-set-query@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/url-set-query/-/url-set-query-1.0.0.tgz#016e8cfd7c20ee05cafe7795e892bd0702faa339" - integrity sha1-AW6M/Xwg7gXK/neV6JK9BwL6ozk= - -url-to-options@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/url-to-options/-/url-to-options-1.0.1.tgz#1505a03a289a48cbd7a434efbaeec5055f5633a9" - integrity sha1-FQWgOiiaSMvXpDTvuu7FBV9WM6k= - -url@^0.11.0: - version "0.11.0" - resolved "https://registry.yarnpkg.com/url/-/url-0.11.0.tgz#3838e97cfc60521eb73c525a8e55bfdd9e2e28f1" - integrity sha1-ODjpfPxgUh63PFJajlW/3Z4uKPE= - dependencies: - punycode "1.3.2" - querystring "0.2.0" - -usb@^1.6.0: - version "1.6.2" - resolved "https://registry.yarnpkg.com/usb/-/usb-1.6.2.tgz#4ed7f0d8631c70192b33635f6a4e700d9e6bfe62" - integrity sha512-KcovLXRQuH63iEtnqXyDQGOi5dXHpLM5lZBIUsqSJQToua8nL2sVCieQTkzQBfLe5mCuvk40MgKciI61lgevWw== - dependencies: - bindings "^1.4.0" - nan "2.13.2" - prebuild-install "^5.3.3" - -use@^3.1.0: - version "3.1.1" - resolved "https://registry.yarnpkg.com/use/-/use-3.1.1.tgz#d50c8cac79a19fbc20f2911f56eb973f4e10070f" - integrity sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ== - -utf8@3.0.0, utf8@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/utf8/-/utf8-3.0.0.tgz#f052eed1364d696e769ef058b183df88c87f69d1" - integrity sha512-E8VjFIQ/TyQgp+TZfS6l8yp/xWppSAHzidGiRrqe4bK4XP9pTRyKFgGJpO3SN7zdX4DeomTrwaseCHovfpFcqQ== - -util-deprecate@^1.0.1, util-deprecate@~1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" - integrity sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8= - -util.promisify@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/util.promisify/-/util.promisify-1.0.0.tgz#440f7165a459c9a16dc145eb8e72f35687097030" - integrity sha512-i+6qA2MPhvoKLuxnJNpXAGhg7HphQOSUq2LKMZD0m15EiskXUkMvKdF4Uui0WYeCUGea+o2cw/ZuwehtfsrNkA== - dependencies: - define-properties "^1.1.2" - object.getownpropertydescriptors "^2.0.3" - -util@0.10.3: - version "0.10.3" - resolved "https://registry.yarnpkg.com/util/-/util-0.10.3.tgz#7afb1afe50805246489e3db7fe0ed379336ac0f9" - integrity sha1-evsa/lCAUkZInj23/g7TeTNqwPk= - dependencies: - inherits "2.0.1" - -util@^0.11.0: - version "0.11.1" - resolved "https://registry.yarnpkg.com/util/-/util-0.11.1.tgz#3236733720ec64bb27f6e26f421aaa2e1b588d61" - integrity sha512-HShAsny+zS2TZfaXxD9tYj4HQGlBezXZMZuM/S5PKLLoZkShZiGk9o5CzukI1LVHZvjdvZ2Sj1aW/Ndn2NB/HQ== - dependencies: - inherits "2.0.3" - -utils-merge@1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/utils-merge/-/utils-merge-1.0.1.tgz#9f95710f50a267947b2ccc124741c1028427e713" - integrity sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM= - -uuid@2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/uuid/-/uuid-2.0.1.tgz#c2a30dedb3e535d72ccf82e343941a50ba8533ac" - integrity sha1-wqMN7bPlNdcsz4LjQ5QaULqFM6w= - -uuid@3.3.2: - version "3.3.2" - resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.3.2.tgz#1b4af4955eb3077c501c23872fc6513811587131" - integrity sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA== - -uuid@^3.3.2: - version "3.3.3" - resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.3.3.tgz#4568f0216e78760ee1dbf3a4d2cf53e224112866" - integrity sha512-pW0No1RGHgzlpHJO1nsVrHKpOEIxkGg1xB+v0ZmdNH5OAeAwzAVrCnI2/6Mtx+Uys6iaylxa+D3g4j63IKKjSQ== - -v8-compile-cache@^2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/v8-compile-cache/-/v8-compile-cache-2.1.1.tgz#54bc3cdd43317bca91e35dcaf305b1a7237de745" - integrity sha512-8OQ9CL+VWyt3JStj7HX7/ciTL2V3Rl1Wf5OL+SNTm0yK1KvtReVulksyeRnCANHHuUxHlQig+JJDlUhBt1NQDQ== - -v8flags@^3.0.1: - version "3.1.3" - resolved "https://registry.yarnpkg.com/v8flags/-/v8flags-3.1.3.tgz#fc9dc23521ca20c5433f81cc4eb9b3033bb105d8" - integrity sha512-amh9CCg3ZxkzQ48Mhcb8iX7xpAfYJgePHxWMQCBWECpOSqJUXgY26ncA61UTV0BkPqfhcy6mzwCIoP4ygxpW8w== - dependencies: - homedir-polyfill "^1.0.1" - -valid-url@^1.0.9: - version "1.0.9" - resolved "https://registry.yarnpkg.com/valid-url/-/valid-url-1.0.9.tgz#1c14479b40f1397a75782f115e4086447433a200" - integrity sha1-HBRHm0DxOXp1eC8RXkCGRHQzogA= - -validate-npm-package-license@^3.0.1: - version "3.0.4" - resolved "https://registry.yarnpkg.com/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz#fc91f6b9c7ba15c857f4cb2c5defeec39d4f410a" - integrity sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew== - dependencies: - spdx-correct "^3.0.0" - spdx-expression-parse "^3.0.0" - -value-or-function@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/value-or-function/-/value-or-function-3.0.0.tgz#1c243a50b595c1be54a754bfece8563b9ff8d813" - integrity sha1-HCQ6ULWVwb5Up1S/7OhWO5/42BM= - -varint@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/varint/-/varint-5.0.0.tgz#d826b89f7490732fabc0c0ed693ed475dcb29ebf" - integrity sha1-2Ca4n3SQcy+rwMDtaT7Uddyynr8= - -vary@^1, vary@~1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/vary/-/vary-1.1.2.tgz#2299f02c6ded30d4a5961b0b9f74524a18f634fc" - integrity sha1-IpnwLG3tMNSllhsLn3RSShj2NPw= - -verror@1.10.0: - version "1.10.0" - resolved "https://registry.yarnpkg.com/verror/-/verror-1.10.0.tgz#3a105ca17053af55d6e270c1f8288682e18da400" - integrity sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA= - dependencies: - assert-plus "^1.0.0" - core-util-is "1.0.2" - extsprintf "^1.2.0" - -vinyl-fs@^3.0.0: - version "3.0.3" - resolved "https://registry.yarnpkg.com/vinyl-fs/-/vinyl-fs-3.0.3.tgz#c85849405f67428feabbbd5c5dbdd64f47d31bc7" - integrity sha512-vIu34EkyNyJxmP0jscNzWBSygh7VWhqun6RmqVfXePrOwi9lhvRs//dOaGOTRUQr4tx7/zd26Tk5WeSVZitgng== - dependencies: - fs-mkdirp-stream "^1.0.0" - glob-stream "^6.1.0" - graceful-fs "^4.0.0" - is-valid-glob "^1.0.0" - lazystream "^1.0.0" - lead "^1.0.0" - object.assign "^4.0.4" - pumpify "^1.3.5" - readable-stream "^2.3.3" - remove-bom-buffer "^3.0.0" - remove-bom-stream "^1.2.0" - resolve-options "^1.1.0" - through2 "^2.0.0" - to-through "^2.0.0" - value-or-function "^3.0.0" - vinyl "^2.0.0" - vinyl-sourcemap "^1.1.0" - -vinyl-sourcemap@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/vinyl-sourcemap/-/vinyl-sourcemap-1.1.0.tgz#92a800593a38703a8cdb11d8b300ad4be63b3e16" - integrity sha1-kqgAWTo4cDqM2xHYswCtS+Y7PhY= - dependencies: - append-buffer "^1.0.2" - convert-source-map "^1.5.0" - graceful-fs "^4.1.6" - normalize-path "^2.1.1" - now-and-later "^2.0.0" - remove-bom-buffer "^3.0.0" - vinyl "^2.0.0" - -vinyl@^2.0.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/vinyl/-/vinyl-2.2.0.tgz#d85b07da96e458d25b2ffe19fece9f2caa13ed86" - integrity sha512-MBH+yP0kC/GQ5GwBqrTPTzEfiiLjta7hTtvQtbxBgTeSXsmKQRQecjibMbxIXzVT3Y9KJK+drOz1/k+vsu8Nkg== - dependencies: - clone "^2.1.1" - clone-buffer "^1.0.0" - clone-stats "^1.0.0" - cloneable-readable "^1.0.0" - remove-trailing-separator "^1.0.1" - replace-ext "^1.0.0" - -vm-browserify@^1.0.1: - version "1.1.2" - resolved "https://registry.yarnpkg.com/vm-browserify/-/vm-browserify-1.1.2.tgz#78641c488b8e6ca91a75f511e7a3b32a86e5dda0" - integrity sha512-2ham8XPWTONajOR0ohOKOHXkm3+gaBmGut3SRuu75xLd/RRaY6vqgh8NBYYk7+RW3u5AtzPQZG8F10LHkl0lAQ== - -w3c-hr-time@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/w3c-hr-time/-/w3c-hr-time-1.0.1.tgz#82ac2bff63d950ea9e3189a58a65625fedf19045" - integrity sha1-gqwr/2PZUOqeMYmlimViX+3xkEU= - dependencies: - browser-process-hrtime "^0.1.2" - -walker@^1.0.7, walker@~1.0.5: - version "1.0.7" - resolved "https://registry.yarnpkg.com/walker/-/walker-1.0.7.tgz#2f7f9b8fd10d677262b18a884e28d19618e028fb" - integrity sha1-L3+bj9ENZ3JisYqITijRlhjgKPs= - dependencies: - makeerror "1.0.x" - -watchpack-chokidar2@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/watchpack-chokidar2/-/watchpack-chokidar2-2.0.0.tgz#9948a1866cbbd6cb824dea13a7ed691f6c8ddff0" - integrity sha512-9TyfOyN/zLUbA288wZ8IsMZ+6cbzvsNyEzSBp6e/zkifi6xxbl8SmQ/CxQq32k8NNqrdVEVUVSEf56L4rQ/ZxA== - dependencies: - chokidar "^2.1.8" - -watchpack@^1.7.4: - version "1.7.4" - resolved "https://registry.yarnpkg.com/watchpack/-/watchpack-1.7.4.tgz#6e9da53b3c80bb2d6508188f5b200410866cd30b" - integrity sha512-aWAgTW4MoSJzZPAicljkO1hsi1oKj/RRq/OJQh2PKI2UKL04c2Bs+MBOB+BBABHTXJpf9mCwHN7ANCvYsvY2sg== - dependencies: - graceful-fs "^4.1.2" - neo-async "^2.5.0" - optionalDependencies: - chokidar "^3.4.1" - watchpack-chokidar2 "^2.0.0" - -web3-bzz@1.2.11: - version "1.2.11" - resolved "https://registry.yarnpkg.com/web3-bzz/-/web3-bzz-1.2.11.tgz#41bc19a77444bd5365744596d778b811880f707f" - integrity sha512-XGpWUEElGypBjeFyUhTkiPXFbDVD6Nr/S5jznE3t8cWUA0FxRf1n3n/NuIZeb0H9RkN2Ctd/jNma/k8XGa3YKg== - dependencies: - "@types/node" "^12.12.6" - got "9.6.0" - swarm-js "^0.1.40" - underscore "1.9.1" - -web3-bzz@1.2.4: - version "1.2.4" - resolved "https://registry.yarnpkg.com/web3-bzz/-/web3-bzz-1.2.4.tgz#a4adb7a8cba3d260de649bdb1f14ed359bfb3821" - integrity sha512-MqhAo/+0iQSMBtt3/QI1rU83uvF08sYq8r25+OUZ+4VtihnYsmkkca+rdU0QbRyrXY2/yGIpI46PFdh0khD53A== - dependencies: - "@types/node" "^10.12.18" - got "9.6.0" - swarm-js "0.1.39" - underscore "1.9.1" - -web3-core-helpers@1.2.11: - version "1.2.11" - resolved "https://registry.yarnpkg.com/web3-core-helpers/-/web3-core-helpers-1.2.11.tgz#84c681ed0b942c0203f3b324a245a127e8c67a99" - integrity sha512-PEPoAoZd5ME7UfbnCZBdzIerpe74GEvlwT4AjOmHeCVZoIFk7EqvOZDejJHt+feJA6kMVTdd0xzRNN295UhC1A== - dependencies: - underscore "1.9.1" - web3-eth-iban "1.2.11" - web3-utils "1.2.11" - -web3-core-helpers@1.2.4: - version "1.2.4" - resolved "https://registry.yarnpkg.com/web3-core-helpers/-/web3-core-helpers-1.2.4.tgz#ffd425861f4d66b3f38df032afdb39ea0971fc0f" - integrity sha512-U7wbsK8IbZvF3B7S+QMSNP0tni/6VipnJkB0tZVEpHEIV2WWeBHYmZDnULWcsS/x/jn9yKhJlXIxWGsEAMkjiw== - dependencies: - underscore "1.9.1" - web3-eth-iban "1.2.4" - web3-utils "1.2.4" - -web3-core-method@1.2.11: - version "1.2.11" - resolved "https://registry.yarnpkg.com/web3-core-method/-/web3-core-method-1.2.11.tgz#f880137d1507a0124912bf052534f168b8d8fbb6" - integrity sha512-ff0q76Cde94HAxLDZ6DbdmKniYCQVtvuaYh+rtOUMB6kssa5FX0q3vPmixi7NPooFnbKmmZCM6NvXg4IreTPIw== - dependencies: - "@ethersproject/transactions" "^5.0.0-beta.135" - underscore "1.9.1" - web3-core-helpers "1.2.11" - web3-core-promievent "1.2.11" - web3-core-subscriptions "1.2.11" - web3-utils "1.2.11" - -web3-core-method@1.2.4: - version "1.2.4" - resolved "https://registry.yarnpkg.com/web3-core-method/-/web3-core-method-1.2.4.tgz#a0fbc50b8ff5fd214021435cc2c6d1e115807aed" - integrity sha512-8p9kpL7di2qOVPWgcM08kb+yKom0rxRCMv6m/K+H+yLSxev9TgMbCgMSbPWAHlyiF3SJHw7APFKahK5Z+8XT5A== - dependencies: - underscore "1.9.1" - web3-core-helpers "1.2.4" - web3-core-promievent "1.2.4" - web3-core-subscriptions "1.2.4" - web3-utils "1.2.4" - -web3-core-promievent@1.2.11: - version "1.2.11" - resolved "https://registry.yarnpkg.com/web3-core-promievent/-/web3-core-promievent-1.2.11.tgz#51fe97ca0ddec2f99bf8c3306a7a8e4b094ea3cf" - integrity sha512-il4McoDa/Ox9Agh4kyfQ8Ak/9ABYpnF8poBLL33R/EnxLsJOGQG2nZhkJa3I067hocrPSjEdlPt/0bHXsln4qA== - dependencies: - eventemitter3 "4.0.4" - -web3-core-promievent@1.2.4: - version "1.2.4" - resolved "https://registry.yarnpkg.com/web3-core-promievent/-/web3-core-promievent-1.2.4.tgz#75e5c0f2940028722cdd21ba503ebd65272df6cb" - integrity sha512-gEUlm27DewUsfUgC3T8AxkKi8Ecx+e+ZCaunB7X4Qk3i9F4C+5PSMGguolrShZ7Zb6717k79Y86f3A00O0VAZw== - dependencies: - any-promise "1.3.0" - eventemitter3 "3.1.2" - -web3-core-requestmanager@1.2.11: - version "1.2.11" - resolved "https://registry.yarnpkg.com/web3-core-requestmanager/-/web3-core-requestmanager-1.2.11.tgz#fe6eb603fbaee18530293a91f8cf26d8ae28c45a" - integrity sha512-oFhBtLfOiIbmfl6T6gYjjj9igOvtyxJ+fjS+byRxiwFJyJ5BQOz4/9/17gWR1Cq74paTlI7vDGxYfuvfE/mKvA== - dependencies: - underscore "1.9.1" - web3-core-helpers "1.2.11" - web3-providers-http "1.2.11" - web3-providers-ipc "1.2.11" - web3-providers-ws "1.2.11" - -web3-core-requestmanager@1.2.4: - version "1.2.4" - resolved "https://registry.yarnpkg.com/web3-core-requestmanager/-/web3-core-requestmanager-1.2.4.tgz#0a7020a23fb91c6913c611dfd3d8c398d1e4b4a8" - integrity sha512-eZJDjyNTDtmSmzd3S488nR/SMJtNnn/GuwxnMh3AzYCqG3ZMfOylqTad2eYJPvc2PM5/Gj1wAMQcRpwOjjLuPg== - dependencies: - underscore "1.9.1" - web3-core-helpers "1.2.4" - web3-providers-http "1.2.4" - web3-providers-ipc "1.2.4" - web3-providers-ws "1.2.4" - -web3-core-subscriptions@1.2.11: - version "1.2.11" - resolved "https://registry.yarnpkg.com/web3-core-subscriptions/-/web3-core-subscriptions-1.2.11.tgz#beca908fbfcb050c16f45f3f0f4c205e8505accd" - integrity sha512-qEF/OVqkCvQ7MPs1JylIZCZkin0aKK9lDxpAtQ1F8niEDGFqn7DT8E/vzbIa0GsOjL2fZjDhWJsaW+BSoAW1gg== - dependencies: - eventemitter3 "4.0.4" - underscore "1.9.1" - web3-core-helpers "1.2.11" - -web3-core-subscriptions@1.2.4: - version "1.2.4" - resolved "https://registry.yarnpkg.com/web3-core-subscriptions/-/web3-core-subscriptions-1.2.4.tgz#0dc095b5cfd82baa527a39796e3515a846b21b99" - integrity sha512-3D607J2M8ymY9V+/WZq4MLlBulwCkwEjjC2U+cXqgVO1rCyVqbxZNCmHyNYHjDDCxSEbks9Ju5xqJxDSxnyXEw== - dependencies: - eventemitter3 "3.1.2" - underscore "1.9.1" - web3-core-helpers "1.2.4" - -web3-core@1.2.11: - version "1.2.11" - resolved "https://registry.yarnpkg.com/web3-core/-/web3-core-1.2.11.tgz#1043cacc1becb80638453cc5b2a14be9050288a7" - integrity sha512-CN7MEYOY5ryo5iVleIWRE3a3cZqVaLlIbIzDPsvQRUfzYnvzZQRZBm9Mq+ttDi2STOOzc1MKylspz/o3yq/LjQ== - dependencies: - "@types/bn.js" "^4.11.5" - "@types/node" "^12.12.6" - bignumber.js "^9.0.0" - web3-core-helpers "1.2.11" - web3-core-method "1.2.11" - web3-core-requestmanager "1.2.11" - web3-utils "1.2.11" - -web3-core@1.2.4: - version "1.2.4" - resolved "https://registry.yarnpkg.com/web3-core/-/web3-core-1.2.4.tgz#2df13b978dcfc59c2abaa887d27f88f21ad9a9d6" - integrity sha512-CHc27sMuET2cs1IKrkz7xzmTdMfZpYswe7f0HcuyneTwS1yTlTnHyqjAaTy0ZygAb/x4iaVox+Gvr4oSAqSI+A== - dependencies: - "@types/bignumber.js" "^5.0.0" - "@types/bn.js" "^4.11.4" - "@types/node" "^12.6.1" - web3-core-helpers "1.2.4" - web3-core-method "1.2.4" - web3-core-requestmanager "1.2.4" - web3-utils "1.2.4" - -web3-eth-abi@1.2.11: - version "1.2.11" - resolved "https://registry.yarnpkg.com/web3-eth-abi/-/web3-eth-abi-1.2.11.tgz#a887494e5d447c2926d557a3834edd66e17af9b0" - integrity sha512-PkRYc0+MjuLSgg03QVWqWlQivJqRwKItKtEpRUaxUAeLE7i/uU39gmzm2keHGcQXo3POXAbOnMqkDvOep89Crg== - dependencies: - "@ethersproject/abi" "5.0.0-beta.153" - underscore "1.9.1" - web3-utils "1.2.11" - -web3-eth-abi@1.2.4, web3-eth-abi@^1.0.0-beta.24: - version "1.2.4" - resolved "https://registry.yarnpkg.com/web3-eth-abi/-/web3-eth-abi-1.2.4.tgz#5b73e5ef70b03999227066d5d1310b168845e2b8" - integrity sha512-8eLIY4xZKoU3DSVu1pORluAw9Ru0/v4CGdw5so31nn+7fR8zgHMgwbFe0aOqWQ5VU42PzMMXeIJwt4AEi2buFg== - dependencies: - ethers "4.0.0-beta.3" - underscore "1.9.1" - web3-utils "1.2.4" - -web3-eth-accounts@1.2.11: - version "1.2.11" - resolved "https://registry.yarnpkg.com/web3-eth-accounts/-/web3-eth-accounts-1.2.11.tgz#a9e3044da442d31903a7ce035a86d8fa33f90520" - integrity sha512-6FwPqEpCfKIh3nSSGeo3uBm2iFSnFJDfwL3oS9pyegRBXNsGRVpgiW63yhNzL0796StsvjHWwQnQHsZNxWAkGw== - dependencies: - crypto-browserify "3.12.0" - eth-lib "0.2.8" - ethereumjs-common "^1.3.2" - ethereumjs-tx "^2.1.1" - scrypt-js "^3.0.1" - underscore "1.9.1" - uuid "3.3.2" - web3-core "1.2.11" - web3-core-helpers "1.2.11" - web3-core-method "1.2.11" - web3-utils "1.2.11" - -web3-eth-accounts@1.2.4: - version "1.2.4" - resolved "https://registry.yarnpkg.com/web3-eth-accounts/-/web3-eth-accounts-1.2.4.tgz#ada6edc49542354328a85cafab067acd7f88c288" - integrity sha512-04LzT/UtWmRFmi4hHRewP5Zz43fWhuHiK5XimP86sUQodk/ByOkXQ3RoXyGXFMNoRxdcAeRNxSfA2DpIBc9xUw== - dependencies: - "@web3-js/scrypt-shim" "^0.1.0" - any-promise "1.3.0" - crypto-browserify "3.12.0" - eth-lib "0.2.7" - ethereumjs-common "^1.3.2" - ethereumjs-tx "^2.1.1" - underscore "1.9.1" - uuid "3.3.2" - web3-core "1.2.4" - web3-core-helpers "1.2.4" - web3-core-method "1.2.4" - web3-utils "1.2.4" - -web3-eth-contract@1.2.11: - version "1.2.11" - resolved "https://registry.yarnpkg.com/web3-eth-contract/-/web3-eth-contract-1.2.11.tgz#917065902bc27ce89da9a1da26e62ef663663b90" - integrity sha512-MzYuI/Rq2o6gn7vCGcnQgco63isPNK5lMAan2E51AJLknjSLnOxwNY3gM8BcKoy4Z+v5Dv00a03Xuk78JowFow== - dependencies: - "@types/bn.js" "^4.11.5" - underscore "1.9.1" - web3-core "1.2.11" - web3-core-helpers "1.2.11" - web3-core-method "1.2.11" - web3-core-promievent "1.2.11" - web3-core-subscriptions "1.2.11" - web3-eth-abi "1.2.11" - web3-utils "1.2.11" - -web3-eth-contract@1.2.4: - version "1.2.4" - resolved "https://registry.yarnpkg.com/web3-eth-contract/-/web3-eth-contract-1.2.4.tgz#68ef7cc633232779b0a2c506a810fbe903575886" - integrity sha512-b/9zC0qjVetEYnzRA1oZ8gF1OSSUkwSYi5LGr4GeckLkzXP7osEnp9lkO/AQcE4GpG+l+STnKPnASXJGZPgBRQ== - dependencies: - "@types/bn.js" "^4.11.4" - underscore "1.9.1" - web3-core "1.2.4" - web3-core-helpers "1.2.4" - web3-core-method "1.2.4" - web3-core-promievent "1.2.4" - web3-core-subscriptions "1.2.4" - web3-eth-abi "1.2.4" - web3-utils "1.2.4" - -web3-eth-ens@1.2.11: - version "1.2.11" - resolved "https://registry.yarnpkg.com/web3-eth-ens/-/web3-eth-ens-1.2.11.tgz#26d4d7f16d6cbcfff918e39832b939edc3162532" - integrity sha512-dbW7dXP6HqT1EAPvnniZVnmw6TmQEKF6/1KgAxbo8iBBYrVTMDGFQUUnZ+C4VETGrwwaqtX4L9d/FrQhZ6SUiA== - dependencies: - content-hash "^2.5.2" - eth-ens-namehash "2.0.8" - underscore "1.9.1" - web3-core "1.2.11" - web3-core-helpers "1.2.11" - web3-core-promievent "1.2.11" - web3-eth-abi "1.2.11" - web3-eth-contract "1.2.11" - web3-utils "1.2.11" - -web3-eth-ens@1.2.4: - version "1.2.4" - resolved "https://registry.yarnpkg.com/web3-eth-ens/-/web3-eth-ens-1.2.4.tgz#b95b3aa99fb1e35c802b9e02a44c3046a3fa065e" - integrity sha512-g8+JxnZlhdsCzCS38Zm6R/ngXhXzvc3h7bXlxgKU4coTzLLoMpgOAEz71GxyIJinWTFbLXk/WjNY0dazi9NwVw== - dependencies: - eth-ens-namehash "2.0.8" - underscore "1.9.1" - web3-core "1.2.4" - web3-core-helpers "1.2.4" - web3-core-promievent "1.2.4" - web3-eth-abi "1.2.4" - web3-eth-contract "1.2.4" - web3-utils "1.2.4" - -web3-eth-iban@1.2.11: - version "1.2.11" - resolved "https://registry.yarnpkg.com/web3-eth-iban/-/web3-eth-iban-1.2.11.tgz#f5f73298305bc7392e2f188bf38a7362b42144ef" - integrity sha512-ozuVlZ5jwFC2hJY4+fH9pIcuH1xP0HEFhtWsR69u9uDIANHLPQQtWYmdj7xQ3p2YT4bQLq/axKhZi7EZVetmxQ== - dependencies: - bn.js "^4.11.9" - web3-utils "1.2.11" - -web3-eth-iban@1.2.4: - version "1.2.4" - resolved "https://registry.yarnpkg.com/web3-eth-iban/-/web3-eth-iban-1.2.4.tgz#8e0550fd3fd8e47a39357d87fe27dee9483ee476" - integrity sha512-D9HIyctru/FLRpXakRwmwdjb5bWU2O6UE/3AXvRm6DCOf2e+7Ve11qQrPtaubHfpdW3KWjDKvlxV9iaFv/oTMQ== - dependencies: - bn.js "4.11.8" - web3-utils "1.2.4" - -web3-eth-personal@1.2.11: - version "1.2.11" - resolved "https://registry.yarnpkg.com/web3-eth-personal/-/web3-eth-personal-1.2.11.tgz#a38b3942a1d87a62070ce0622a941553c3d5aa70" - integrity sha512-42IzUtKq9iHZ8K9VN0vAI50iSU9tOA1V7XU2BhF/tb7We2iKBVdkley2fg26TxlOcKNEHm7o6HRtiiFsVK4Ifw== - dependencies: - "@types/node" "^12.12.6" - web3-core "1.2.11" - web3-core-helpers "1.2.11" - web3-core-method "1.2.11" - web3-net "1.2.11" - web3-utils "1.2.11" - -web3-eth-personal@1.2.4: - version "1.2.4" - resolved "https://registry.yarnpkg.com/web3-eth-personal/-/web3-eth-personal-1.2.4.tgz#3224cca6851c96347d9799b12c1b67b2a6eb232b" - integrity sha512-5Russ7ZECwHaZXcN3DLuLS7390Vzgrzepl4D87SD6Sn1DHsCZtvfdPIYwoTmKNp69LG3mORl7U23Ga5YxqkICw== - dependencies: - "@types/node" "^12.6.1" - web3-core "1.2.4" - web3-core-helpers "1.2.4" - web3-core-method "1.2.4" - web3-net "1.2.4" - web3-utils "1.2.4" - -web3-eth@1.2.11: - version "1.2.11" - resolved "https://registry.yarnpkg.com/web3-eth/-/web3-eth-1.2.11.tgz#4c81fcb6285b8caf544058fba3ae802968fdc793" - integrity sha512-REvxW1wJ58AgHPcXPJOL49d1K/dPmuw4LjPLBPStOVkQjzDTVmJEIsiLwn2YeuNDd4pfakBwT8L3bz1G1/wVsQ== - dependencies: - underscore "1.9.1" - web3-core "1.2.11" - web3-core-helpers "1.2.11" - web3-core-method "1.2.11" - web3-core-subscriptions "1.2.11" - web3-eth-abi "1.2.11" - web3-eth-accounts "1.2.11" - web3-eth-contract "1.2.11" - web3-eth-ens "1.2.11" - web3-eth-iban "1.2.11" - web3-eth-personal "1.2.11" - web3-net "1.2.11" - web3-utils "1.2.11" - -web3-eth@1.2.4: - version "1.2.4" - resolved "https://registry.yarnpkg.com/web3-eth/-/web3-eth-1.2.4.tgz#24c3b1f1ac79351bbfb808b2ab5c585fa57cdd00" - integrity sha512-+j+kbfmZsbc3+KJpvHM16j1xRFHe2jBAniMo1BHKc3lho6A8Sn9Buyut6odubguX2AxoRArCdIDCkT9hjUERpA== - dependencies: - underscore "1.9.1" - web3-core "1.2.4" - web3-core-helpers "1.2.4" - web3-core-method "1.2.4" - web3-core-subscriptions "1.2.4" - web3-eth-abi "1.2.4" - web3-eth-accounts "1.2.4" - web3-eth-contract "1.2.4" - web3-eth-ens "1.2.4" - web3-eth-iban "1.2.4" - web3-eth-personal "1.2.4" - web3-net "1.2.4" - web3-utils "1.2.4" - -web3-net@1.2.11: - version "1.2.11" - resolved "https://registry.yarnpkg.com/web3-net/-/web3-net-1.2.11.tgz#eda68ef25e5cdb64c96c39085cdb74669aabbe1b" - integrity sha512-sjrSDj0pTfZouR5BSTItCuZ5K/oZPVdVciPQ6981PPPIwJJkCMeVjD7I4zO3qDPCnBjBSbWvVnLdwqUBPtHxyg== - dependencies: - web3-core "1.2.11" - web3-core-method "1.2.11" - web3-utils "1.2.11" - -web3-net@1.2.4: - version "1.2.4" - resolved "https://registry.yarnpkg.com/web3-net/-/web3-net-1.2.4.tgz#1d246406d3aaffbf39c030e4e98bce0ca5f25458" - integrity sha512-wKOsqhyXWPSYTGbp7ofVvni17yfRptpqoUdp3SC8RAhDmGkX6irsiT9pON79m6b3HUHfLoBilFQyt/fTUZOf7A== - dependencies: - web3-core "1.2.4" - web3-core-method "1.2.4" - web3-utils "1.2.4" - -web3-provider-engine@14.0.6: - version "14.0.6" - resolved "https://registry.yarnpkg.com/web3-provider-engine/-/web3-provider-engine-14.0.6.tgz#cbdd66fe20c0136a3a495cbe40d18b6c4160d5f0" - integrity sha512-tr5cGSyxfSC/JqiUpBlJtfZpwQf1yAA8L/zy1C6fDFm0ntR974pobJ4v4676atpZne4Ze5VFy3kPPahHe9gQiQ== - dependencies: - async "^2.5.0" - backoff "^2.5.0" - clone "^2.0.0" - cross-fetch "^2.1.0" - eth-block-tracker "^3.0.0" - eth-json-rpc-infura "^3.1.0" - eth-sig-util "^1.4.2" - ethereumjs-block "^1.2.2" - ethereumjs-tx "^1.2.0" - ethereumjs-util "^5.1.5" - ethereumjs-vm "^2.3.4" - json-rpc-error "^2.0.0" - json-stable-stringify "^1.0.1" - promise-to-callback "^1.0.0" - readable-stream "^2.2.9" - request "^2.67.0" - semaphore "^1.0.3" - tape "^4.4.0" - ws "^5.1.1" - xhr "^2.2.0" - xtend "^4.0.1" - -web3-provider-engine@14.2.1: - version "14.2.1" - resolved "https://registry.yarnpkg.com/web3-provider-engine/-/web3-provider-engine-14.2.1.tgz#ef351578797bf170e08d529cb5b02f8751329b95" - integrity sha512-iSv31h2qXkr9vrL6UZDm4leZMc32SjWJFGOp/D92JXfcEboCqraZyuExDkpxKw8ziTufXieNM7LSXNHzszYdJw== - dependencies: - async "^2.5.0" - backoff "^2.5.0" - clone "^2.0.0" - cross-fetch "^2.1.0" - eth-block-tracker "^3.0.0" - eth-json-rpc-infura "^3.1.0" - eth-sig-util "^1.4.2" - ethereumjs-block "^1.2.2" - ethereumjs-tx "^1.2.0" - ethereumjs-util "^5.1.5" - ethereumjs-vm "^2.3.4" - json-rpc-error "^2.0.0" - 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" - -web3-provider-engine@^15.0.4: - version "15.0.4" - resolved "https://registry.yarnpkg.com/web3-provider-engine/-/web3-provider-engine-15.0.4.tgz#5c336bcad2274dff5218bc8db003fa4e9e464c24" - integrity sha512-Ob9oK0TUZfVC7NXkB7CQSWAiCdCD/Xnlh2zTnV8NdJR8LCrMAy2i6JedU70JHaxw59y7mM4GnsYOTTGkquFnNQ== - dependencies: - 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-errors "^1.0.1" - eth-json-rpc-filters "^4.1.1" - eth-json-rpc-infura "^4.0.1" - eth-json-rpc-middleware "^4.1.5" - eth-sig-util "^1.4.2" - ethereumjs-block "^1.2.2" - ethereumjs-tx "^1.2.0" - 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" - -web3-providers-http@1.2.11: - version "1.2.11" - resolved "https://registry.yarnpkg.com/web3-providers-http/-/web3-providers-http-1.2.11.tgz#1cd03442c61670572d40e4dcdf1faff8bd91e7c6" - integrity sha512-psh4hYGb1+ijWywfwpB2cvvOIMISlR44F/rJtYkRmQ5jMvG4FOCPlQJPiHQZo+2cc3HbktvvSJzIhkWQJdmvrA== - dependencies: - web3-core-helpers "1.2.11" - xhr2-cookies "1.1.0" - -web3-providers-http@1.2.4: - version "1.2.4" - resolved "https://registry.yarnpkg.com/web3-providers-http/-/web3-providers-http-1.2.4.tgz#514fcad71ae77832c2c15574296282fbbc5f4a67" - integrity sha512-dzVCkRrR/cqlIrcrWNiPt9gyt0AZTE0J+MfAu9rR6CyIgtnm1wFUVVGaxYRxuTGQRO4Dlo49gtoGwaGcyxqiTw== - dependencies: - web3-core-helpers "1.2.4" - xhr2-cookies "1.1.0" - -web3-providers-ipc@1.2.11: - version "1.2.11" - resolved "https://registry.yarnpkg.com/web3-providers-ipc/-/web3-providers-ipc-1.2.11.tgz#d16d6c9be1be6e0b4f4536c4acc16b0f4f27ef21" - integrity sha512-yhc7Y/k8hBV/KlELxynWjJDzmgDEDjIjBzXK+e0rHBsYEhdCNdIH5Psa456c+l0qTEU2YzycF8VAjYpWfPnBpQ== - dependencies: - oboe "2.1.4" - underscore "1.9.1" - web3-core-helpers "1.2.11" - -web3-providers-ipc@1.2.4: - version "1.2.4" - resolved "https://registry.yarnpkg.com/web3-providers-ipc/-/web3-providers-ipc-1.2.4.tgz#9d6659f8d44943fb369b739f48df09092be459bd" - integrity sha512-8J3Dguffin51gckTaNrO3oMBo7g+j0UNk6hXmdmQMMNEtrYqw4ctT6t06YOf9GgtOMjSAc1YEh3LPrvgIsR7og== - dependencies: - oboe "2.1.4" - underscore "1.9.1" - web3-core-helpers "1.2.4" - -web3-providers-ws@1.2.11: - version "1.2.11" - resolved "https://registry.yarnpkg.com/web3-providers-ws/-/web3-providers-ws-1.2.11.tgz#a1dfd6d9778d840561d9ec13dd453046451a96bb" - integrity sha512-ZxnjIY1Er8Ty+cE4migzr43zA/+72AF1myzsLaU5eVgdsfV7Jqx7Dix1hbevNZDKFlSoEyq/3j/jYalh3So1Zg== - dependencies: - eventemitter3 "4.0.4" - underscore "1.9.1" - web3-core-helpers "1.2.11" - websocket "^1.0.31" - -web3-providers-ws@1.2.4: - version "1.2.4" - resolved "https://registry.yarnpkg.com/web3-providers-ws/-/web3-providers-ws-1.2.4.tgz#099ee271ee03f6ea4f5df9cfe969e83f4ce0e36f" - integrity sha512-F/vQpDzeK+++oeeNROl1IVTufFCwCR2hpWe5yRXN0ApLwHqXrMI7UwQNdJ9iyibcWjJf/ECbauEEQ8CHgE+MYQ== - dependencies: - "@web3-js/websocket" "^1.0.29" - underscore "1.9.1" - web3-core-helpers "1.2.4" - -web3-shh@1.2.11: - version "1.2.11" - resolved "https://registry.yarnpkg.com/web3-shh/-/web3-shh-1.2.11.tgz#f5d086f9621c9a47e98d438010385b5f059fd88f" - integrity sha512-B3OrO3oG1L+bv3E1sTwCx66injW1A8hhwpknDUbV+sw3fehFazA06z9SGXUefuFI1kVs4q2vRi0n4oCcI4dZDg== - dependencies: - web3-core "1.2.11" - web3-core-method "1.2.11" - web3-core-subscriptions "1.2.11" - web3-net "1.2.11" - -web3-shh@1.2.4: - version "1.2.4" - resolved "https://registry.yarnpkg.com/web3-shh/-/web3-shh-1.2.4.tgz#5c8ff5ab624a3b14f08af0d24d2b16c10e9f70dd" - integrity sha512-z+9SCw0dE+69Z/Hv8809XDbLj7lTfEv9Sgu8eKEIdGntZf4v7ewj5rzN5bZZSz8aCvfK7Y6ovz1PBAu4QzS4IQ== - dependencies: - web3-core "1.2.4" - web3-core-method "1.2.4" - web3-core-subscriptions "1.2.4" - web3-net "1.2.4" - -web3-utils@1.2.11: - version "1.2.11" - resolved "https://registry.yarnpkg.com/web3-utils/-/web3-utils-1.2.11.tgz#af1942aead3fb166ae851a985bed8ef2c2d95a82" - integrity sha512-3Tq09izhD+ThqHEaWYX4VOT7dNPdZiO+c/1QMA0s5X2lDFKK/xHJb7cyTRRVzN2LvlHbR7baS1tmQhSua51TcQ== - dependencies: - bn.js "^4.11.9" - eth-lib "0.2.8" - ethereum-bloom-filters "^1.0.6" - ethjs-unit "0.1.6" - number-to-bn "1.7.0" - randombytes "^2.1.0" - underscore "1.9.1" - utf8 "3.0.0" - -web3-utils@1.2.4: - version "1.2.4" - resolved "https://registry.yarnpkg.com/web3-utils/-/web3-utils-1.2.4.tgz#96832a39a66b05bf8862a5b0bdad2799d709d951" - integrity sha512-+S86Ip+jqfIPQWvw2N/xBQq5JNqCO0dyvukGdJm8fEWHZbckT4WxSpHbx+9KLEWY4H4x9pUwnoRkK87pYyHfgQ== - dependencies: - bn.js "4.11.8" - eth-lib "0.2.7" - ethereum-bloom-filters "^1.0.6" - ethjs-unit "0.1.6" - number-to-bn "1.7.0" - randombytes "^2.1.0" - underscore "1.9.1" - utf8 "3.0.0" - -web3@1.2.4: - version "1.2.4" - resolved "https://registry.yarnpkg.com/web3/-/web3-1.2.4.tgz#6e7ab799eefc9b4648c2dab63003f704a1d5e7d9" - integrity sha512-xPXGe+w0x0t88Wj+s/dmAdASr3O9wmA9mpZRtixGZxmBexAF0MjfqYM+MS4tVl5s11hMTN3AZb8cDD4VLfC57A== - dependencies: - "@types/node" "^12.6.1" - web3-bzz "1.2.4" - web3-core "1.2.4" - web3-eth "1.2.4" - web3-eth-personal "1.2.4" - web3-net "1.2.4" - web3-shh "1.2.4" - web3-utils "1.2.4" - -web3@^1.2.11: - version "1.2.11" - resolved "https://registry.yarnpkg.com/web3/-/web3-1.2.11.tgz#50f458b2e8b11aa37302071c170ed61cff332975" - integrity sha512-mjQ8HeU41G6hgOYm1pmeH0mRAeNKJGnJEUzDMoerkpw7QUQT4exVREgF1MYPvL/z6vAshOXei25LE/t/Bxl8yQ== - dependencies: - web3-bzz "1.2.11" - web3-core "1.2.11" - web3-eth "1.2.11" - web3-eth-personal "1.2.11" - web3-net "1.2.11" - web3-shh "1.2.11" - web3-utils "1.2.11" - -webidl-conversions@^4.0.2: - version "4.0.2" - resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-4.0.2.tgz#a855980b1f0b6b359ba1d5d9fb39ae941faa63ad" - integrity sha512-YQ+BmxuTgd6UXZW3+ICGfyqRyHXVlD5GtQr5+qjiNW7bF0cqrzX500HVXPBOvgXb5YnzDd+h0zqyv61KUD7+Sg== - -webpack-bundle-analyzer@^3.8.0: - version "3.8.0" - resolved "https://registry.yarnpkg.com/webpack-bundle-analyzer/-/webpack-bundle-analyzer-3.8.0.tgz#ce6b3f908daf069fd1f7266f692cbb3bded9ba16" - integrity sha512-PODQhAYVEourCcOuU+NiYI7WdR8QyELZGgPvB1y2tjbUpbmcQOt5Q7jEK+ttd5se0KSBKD9SXHCEozS++Wllmw== - dependencies: - acorn "^7.1.1" - acorn-walk "^7.1.1" - bfj "^6.1.1" - chalk "^2.4.1" - commander "^2.18.0" - ejs "^2.6.1" - express "^4.16.3" - filesize "^3.6.1" - gzip-size "^5.0.0" - lodash "^4.17.15" - mkdirp "^0.5.1" - opener "^1.5.1" - ws "^6.0.0" - -webpack-cli@^3.3.12: - version "3.3.12" - resolved "https://registry.yarnpkg.com/webpack-cli/-/webpack-cli-3.3.12.tgz#94e9ada081453cd0aa609c99e500012fd3ad2d4a" - integrity sha512-NVWBaz9k839ZH/sinurM+HcDvJOTXwSjYp1ku+5XKeOC03z8v5QitnK/x+lAxGXFyhdayoIf/GOpv85z3/xPag== - dependencies: - chalk "^2.4.2" - cross-spawn "^6.0.5" - enhanced-resolve "^4.1.1" - findup-sync "^3.0.0" - global-modules "^2.0.0" - import-local "^2.0.0" - interpret "^1.4.0" - loader-utils "^1.4.0" - supports-color "^6.1.0" - v8-compile-cache "^2.1.1" - yargs "^13.3.2" - -webpack-sources@^1.4.0, webpack-sources@^1.4.1: - version "1.4.3" - resolved "https://registry.yarnpkg.com/webpack-sources/-/webpack-sources-1.4.3.tgz#eedd8ec0b928fbf1cbfe994e22d2d890f330a933" - integrity sha512-lgTS3Xhv1lCOKo7SA5TjKXMjpSM4sBjNV5+q2bqesbSPs5FjGmU6jjtBSkX9b4qW87vDIsCIlUPOEhbZrMdjeQ== - dependencies: - source-list-map "^2.0.0" - source-map "~0.6.1" - -webpack@^4.44.1: - version "4.44.1" - resolved "https://registry.yarnpkg.com/webpack/-/webpack-4.44.1.tgz#17e69fff9f321b8f117d1fda714edfc0b939cc21" - integrity sha512-4UOGAohv/VGUNQJstzEywwNxqX417FnjZgZJpJQegddzPmTvph37eBIRbRTfdySXzVtJXLJfbMN3mMYhM6GdmQ== - dependencies: - "@webassemblyjs/ast" "1.9.0" - "@webassemblyjs/helper-module-context" "1.9.0" - "@webassemblyjs/wasm-edit" "1.9.0" - "@webassemblyjs/wasm-parser" "1.9.0" - acorn "^6.4.1" - ajv "^6.10.2" - ajv-keywords "^3.4.1" - chrome-trace-event "^1.0.2" - enhanced-resolve "^4.3.0" - eslint-scope "^4.0.3" - json-parse-better-errors "^1.0.2" - loader-runner "^2.4.0" - loader-utils "^1.2.3" - memory-fs "^0.4.1" - micromatch "^3.1.10" - mkdirp "^0.5.3" - neo-async "^2.6.1" - node-libs-browser "^2.2.1" - schema-utils "^1.0.0" - tapable "^1.1.3" - terser-webpack-plugin "^1.4.3" - watchpack "^1.7.4" - webpack-sources "^1.4.1" - -websocket@1.0.29: - version "1.0.29" - resolved "https://registry.yarnpkg.com/websocket/-/websocket-1.0.29.tgz#3f83e49d3279657c58b02a22d90749c806101b98" - integrity sha512-WhU8jKXC8sTh6ocLSqpZRlOKMNYGwUvjA5+XcIgIk/G3JCaDfkZUr0zA19sVSxJ0TEvm0i5IBzr54RZC4vzW7g== - dependencies: - debug "^2.2.0" - gulp "^4.0.2" - nan "^2.11.0" - typedarray-to-buffer "^3.1.5" - yaeti "^0.0.6" - -websocket@^1.0.31: - version "1.0.31" - resolved "https://registry.yarnpkg.com/websocket/-/websocket-1.0.31.tgz#e5d0f16c3340ed87670e489ecae6144c79358730" - integrity sha512-VAouplvGKPiKFDTeCCO65vYHsyay8DqoBSlzIO3fayrfOgU94lQN5a1uWVnFrMLceTJw/+fQXR5PGbUVRaHshQ== - dependencies: - debug "^2.2.0" - es5-ext "^0.10.50" - nan "^2.14.0" - typedarray-to-buffer "^3.1.5" - yaeti "^0.0.6" - -whatwg-encoding@^1.0.1, whatwg-encoding@^1.0.3: - version "1.0.5" - resolved "https://registry.yarnpkg.com/whatwg-encoding/-/whatwg-encoding-1.0.5.tgz#5abacf777c32166a51d085d6b4f3e7d27113ddb0" - integrity sha512-b5lim54JOPN9HtzvK9HFXvBma/rnfFeqsic0hSpjtDbVxR3dJKLc+KB4V6GgiGOvl7CY/KNh8rxSo9DKQrnUEw== - dependencies: - iconv-lite "0.4.24" - -whatwg-fetch@2.0.4: - version "2.0.4" - resolved "https://registry.yarnpkg.com/whatwg-fetch/-/whatwg-fetch-2.0.4.tgz#dde6a5df315f9d39991aa17621853d720b85566f" - integrity sha512-dcQ1GWpOD/eEQ97k66aiEVpNnapVj90/+R+SXTPYGHpYBBypfKJEQjLrvMZ7YXbKm21gXd4NcuxUTjiv1YtLng== - -whatwg-fetch@>=0.10.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/whatwg-fetch/-/whatwg-fetch-3.0.0.tgz#fc804e458cc460009b1a2b966bc8817d2578aefb" - integrity sha512-9GSJUgz1D4MfyKU7KRqwOjXCXTqWdFNvEr7eUBYchQiVc744mqK/MzXPNR2WsPkmkOa4ywfg8C2n8h+13Bey1Q== - -whatwg-mimetype@^2.1.0, whatwg-mimetype@^2.2.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/whatwg-mimetype/-/whatwg-mimetype-2.3.0.tgz#3d4b1e0312d2079879f826aff18dbeeca5960fbf" - integrity sha512-M4yMwr6mAnQz76TbJm914+gPpB/nCwvZbJU28cUD6dR004SAxDLOOSUaB1JDRqLtaOV/vi0IC5lEAGFgrjGv/g== - -whatwg-url@^6.4.1: - version "6.5.0" - resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-6.5.0.tgz#f2df02bff176fd65070df74ad5ccbb5a199965a8" - integrity sha512-rhRZRqx/TLJQWUpQ6bmrt2UV4f0HCQ463yQuONJqC6fO2VoEb1pTYddbe59SkYq87aoM5A3bdhMZiUiVws+fzQ== - dependencies: - lodash.sortby "^4.7.0" - tr46 "^1.0.1" - webidl-conversions "^4.0.2" - -whatwg-url@^7.0.0: - version "7.1.0" - resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-7.1.0.tgz#c2c492f1eca612988efd3d2266be1b9fc6170d06" - integrity sha512-WUu7Rg1DroM7oQvGWfOiAK21n74Gg+T4elXEQYkOhtyLeWiJFoOGLXPKI/9gzIie9CtwVLm8wtw6YJdKyxSjeg== - dependencies: - lodash.sortby "^4.7.0" - tr46 "^1.0.1" - webidl-conversions "^4.0.2" - -which-module@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/which-module/-/which-module-1.0.0.tgz#bba63ca861948994ff307736089e3b96026c2a4f" - integrity sha1-u6Y8qGGUiZT/MHc2CJ47lgJsKk8= - -which-module@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/which-module/-/which-module-2.0.0.tgz#d9ef07dce77b9902b8a3a8fa4b31c3e3f7e6e87a" - integrity sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho= - -which-pm-runs@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/which-pm-runs/-/which-pm-runs-1.0.0.tgz#670b3afbc552e0b55df6b7780ca74615f23ad1cb" - integrity sha1-Zws6+8VS4LVd9rd4DKdGFfI60cs= - -which@^1.1.1, which@^1.2.14, which@^1.2.9, which@^1.3.0, which@^1.3.1: - version "1.3.1" - resolved "https://registry.yarnpkg.com/which/-/which-1.3.1.tgz#a45043d54f5805316da8d62f9f50918d3da70b0a" - integrity sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ== - dependencies: - isexe "^2.0.0" - -wide-align@^1.1.0: - version "1.1.3" - resolved "https://registry.yarnpkg.com/wide-align/-/wide-align-1.1.3.tgz#ae074e6bdc0c14a431e804e624549c633b000457" - integrity sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA== - dependencies: - string-width "^1.0.2 || 2" - -word-wrap@~1.2.3: - version "1.2.3" - resolved "https://registry.yarnpkg.com/word-wrap/-/word-wrap-1.2.3.tgz#610636f6b1f703891bd34771ccb17fb93b47079c" - integrity sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ== - -wordwrap@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-1.0.0.tgz#27584810891456a4171c8d0226441ade90cbcaeb" - integrity sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus= - -wordwrap@~0.0.2: - version "0.0.3" - resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-0.0.3.tgz#a3d5da6cd5c0bc0008d37234bbaf1bed63059107" - integrity sha1-o9XabNXAvAAI03I0u68b7WMFkQc= - -worker-farm@^1.7.0: - version "1.7.0" - resolved "https://registry.yarnpkg.com/worker-farm/-/worker-farm-1.7.0.tgz#26a94c5391bbca926152002f69b84a4bf772e5a8" - integrity sha512-rvw3QTZc8lAxyVrqcSGVm5yP/IJ2UcB3U0graE3LCFoZ0Yn2x4EoVSqJKdB/T5M+FLcRPjz4TDacRf3OCfNUzw== - dependencies: - errno "~0.1.7" - -wrap-ansi@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-2.1.0.tgz#d8fc3d284dd05794fe84973caecdd1cf824fdd85" - integrity sha1-2Pw9KE3QV5T+hJc8rs3Rz4JP3YU= - dependencies: - string-width "^1.0.1" - strip-ansi "^3.0.1" - -wrap-ansi@^5.1.0: - version "5.1.0" - resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-5.1.0.tgz#1fd1f67235d5b6d0fee781056001bfb694c03b09" - integrity sha512-QC1/iN/2/RPVJ5jYK8BGttj5z83LmSKmvbvrXPNCLZSEb32KKVDJDl/MOt2N01qU2H/FkzEa9PKto1BqDjtd7Q== - dependencies: - ansi-styles "^3.2.0" - string-width "^3.0.0" - strip-ansi "^5.0.0" - -wrappy@1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" - integrity sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8= - -write-file-atomic@2.4.1: - version "2.4.1" - resolved "https://registry.yarnpkg.com/write-file-atomic/-/write-file-atomic-2.4.1.tgz#d0b05463c188ae804396fd5ab2a370062af87529" - integrity sha512-TGHFeZEZMnv+gBFRfjAcxL5bPHrsGKtnb4qsFAws7/vlh+QfwAaySIw4AXP9ZskTTh5GWu3FLuJhsWVdiJPGvg== - dependencies: - graceful-fs "^4.1.11" - imurmurhash "^0.1.4" - signal-exit "^3.0.2" - -ws@7.4.6: - version "7.4.6" - resolved "https://registry.yarnpkg.com/ws/-/ws-7.4.6.tgz#5654ca8ecdeee47c33a9a4bf6d28e2be2980377c" - integrity sha512-YmhHDO4MzaDLB+M9ym/mDA5z0naX8j7SIlT8f8z+I0VtzsRbekxEutHSme7NPS2qE8StCYQNUnfWdXta/Yu85A== - -ws@^3.0.0: - version "3.3.3" - resolved "https://registry.yarnpkg.com/ws/-/ws-3.3.3.tgz#f1cf84fe2d5e901ebce94efaece785f187a228f2" - integrity sha512-nnWLa/NwZSt4KQJu51MYlCcSQ5g7INpOrOMt4XV8j4dqTXdmlUmSHQ8/oLC069ckre0fRsgfvsKwbTdtKLCDkA== - dependencies: - async-limiter "~1.0.0" - safe-buffer "~5.1.0" - ultron "~1.1.0" - -ws@^5.1.1, ws@^5.2.0: - version "5.2.2" - resolved "https://registry.yarnpkg.com/ws/-/ws-5.2.2.tgz#dffef14866b8e8dc9133582514d1befaf96e980f" - integrity sha512-jaHFD6PFv6UgoIVda6qZllptQsMlDEJkTQcybzzXDYM1XO9Y8em691FGMPmM46WGyLU4z9KMgQN+qrux/nhlHA== - dependencies: - async-limiter "~1.0.0" - -ws@^6.0.0: - version "6.2.1" - resolved "https://registry.yarnpkg.com/ws/-/ws-6.2.1.tgz#442fdf0a47ed64f59b6a5d8ff130f4748ed524fb" - integrity sha512-GIyAXC2cB7LjvpgMt9EKS2ldqr0MTrORaleiOno6TweZ6r3TKtoFQWay/2PceJ3RuBasOHzXNn5Lrw1X0bEjqA== - dependencies: - async-limiter "~1.0.0" - -xhr-request-promise@^0.1.2: - version "0.1.2" - resolved "https://registry.yarnpkg.com/xhr-request-promise/-/xhr-request-promise-0.1.2.tgz#343c44d1ee7726b8648069682d0f840c83b4261d" - integrity sha1-NDxE0e53JrhkgGloLQ+EDIO0Jh0= - dependencies: - xhr-request "^1.0.1" - -xhr-request@^1.0.1: - version "1.1.0" - resolved "https://registry.yarnpkg.com/xhr-request/-/xhr-request-1.1.0.tgz#f4a7c1868b9f198723444d82dcae317643f2e2ed" - integrity sha512-Y7qzEaR3FDtL3fP30k9wO/e+FBnBByZeybKOhASsGP30NIkRAAkKD/sCnLvgEfAIEC1rcmK7YG8f4oEnIrrWzA== - dependencies: - buffer-to-arraybuffer "^0.0.5" - object-assign "^4.1.1" - query-string "^5.0.1" - simple-get "^2.7.0" - timed-out "^4.0.1" - url-set-query "^1.0.0" - xhr "^2.0.4" - -xhr2-cookies@1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/xhr2-cookies/-/xhr2-cookies-1.1.0.tgz#7d77449d0999197f155cb73b23df72505ed89d48" - integrity sha1-fXdEnQmZGX8VXLc7I99yUF7YnUg= - dependencies: - cookiejar "^2.1.1" - -xhr@^2.0.4, xhr@^2.2.0, xhr@^2.3.3: - version "2.5.0" - resolved "https://registry.yarnpkg.com/xhr/-/xhr-2.5.0.tgz#bed8d1676d5ca36108667692b74b316c496e49dd" - integrity sha512-4nlO/14t3BNUZRXIXfXe+3N6w3s1KoxcJUUURctd64BLRe67E4gRwp4PjywtDY72fXpZ1y6Ch0VZQRY/gMPzzQ== - dependencies: - global "~4.3.0" - is-function "^1.0.1" - parse-headers "^2.0.0" - xtend "^4.0.0" - -xml-name-validator@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/xml-name-validator/-/xml-name-validator-3.0.0.tgz#6ae73e06de4d8c6e47f9fb181f78d648ad457c6a" - integrity sha512-A5CUptxDsvxKJEU3yO6DuWBSJz/qizqzJKOMIfUJHETbBw/sFaDxgd6fxm1ewUaM0jZ444Fc5vC5ROYurg/4Pw== - -xml@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/xml/-/xml-1.0.1.tgz#78ba72020029c5bc87b8a81a3cfcd74b4a2fc1e5" - integrity sha1-eLpyAgApxbyHuKgaPPzXS0ovweU= - -xmlhttprequest@1.8.0: - version "1.8.0" - resolved "https://registry.yarnpkg.com/xmlhttprequest/-/xmlhttprequest-1.8.0.tgz#67fe075c5c24fef39f9d65f5f7b7fe75171968fc" - integrity sha1-Z/4HXFwk/vOfnWX197f+dRcZaPw= - -xtend@^4.0.0, xtend@^4.0.1, xtend@~4.0.0, xtend@~4.0.1: - version "4.0.2" - resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.2.tgz#bb72779f5fa465186b1f438f674fa347fdb5db54" - integrity sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ== - -xtend@~2.1.1: - version "2.1.2" - resolved "https://registry.yarnpkg.com/xtend/-/xtend-2.1.2.tgz#6efecc2a4dad8e6962c4901b337ce7ba87b5d28b" - integrity sha1-bv7MKk2tjmlixJAbM3znuoe10os= - dependencies: - object-keys "~0.4.0" - -y18n@^3.2.1: - version "3.2.1" - resolved "https://registry.yarnpkg.com/y18n/-/y18n-3.2.1.tgz#6d15fba884c08679c0d77e88e7759e811e07fa41" - integrity sha1-bRX7qITAhnnA136I53WegR4H+kE= - -y18n@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/y18n/-/y18n-4.0.0.tgz#95ef94f85ecc81d007c264e190a120f0a3c8566b" - integrity sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w== - -yaeti@^0.0.6: - version "0.0.6" - resolved "https://registry.yarnpkg.com/yaeti/-/yaeti-0.0.6.tgz#f26f484d72684cf42bedfb76970aa1608fbf9577" - integrity sha1-8m9ITXJoTPQr7ft2lwqhYI+/lXc= - -yallist@^2.1.2: - version "2.1.2" - resolved "https://registry.yarnpkg.com/yallist/-/yallist-2.1.2.tgz#1c11f9218f076089a47dd512f93c6699a6a81d52" - integrity sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI= - -yallist@^3.0.0, yallist@^3.0.2, yallist@^3.0.3: - version "3.1.1" - resolved "https://registry.yarnpkg.com/yallist/-/yallist-3.1.1.tgz#dbb7daf9bfd8bac9ab45ebf602b8cbad0d5d08fd" - integrity sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g== - -yargs-parser@10.x: - version "10.1.0" - resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-10.1.0.tgz#7202265b89f7e9e9f2e5765e0fe735a905edbaa8" - integrity sha512-VCIyR1wJoEBZUqk5PA+oOBF6ypbwh5aNB3I50guxAL/quggdfs4TtNHQrSazFA3fYZ+tEqfs0zIGlv0c/rgjbQ== - dependencies: - camelcase "^4.1.0" - -yargs-parser@^13.1.1: - version "13.1.1" - resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-13.1.1.tgz#d26058532aa06d365fe091f6a1fc06b2f7e5eca0" - integrity sha512-oVAVsHz6uFrg3XQheFII8ESO2ssAf9luWuAd6Wexsu4F3OtIW0o8IribPXYrD4WC24LWtPrJlGy87y5udK+dxQ== - dependencies: - camelcase "^5.0.0" - decamelize "^1.2.0" - -yargs-parser@^13.1.2: - version "13.1.2" - resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-13.1.2.tgz#130f09702ebaeef2650d54ce6e3e5706f7a4fb38" - integrity sha512-3lbsNRf/j+A4QuSZfDRA7HRSfWrzO0YjqTJd5kjAq37Zep1CEgaYmrH9Q3GwPiB9cHyd1Y1UwggGhJGoxipbzg== - dependencies: - camelcase "^5.0.0" - decamelize "^1.2.0" - -yargs-parser@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-5.0.0.tgz#275ecf0d7ffe05c77e64e7c86e4cd94bf0e1228a" - integrity sha1-J17PDX/+Bcd+ZOfIbkzZS/DhIoo= - dependencies: - camelcase "^3.0.0" - -yargs-parser@^8.1.0: - version "8.1.0" - resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-8.1.0.tgz#f1376a33b6629a5d063782944da732631e966950" - integrity sha512-yP+6QqN8BmrgW2ggLtTbdrOyBNSI7zBa4IykmiV5R1wl1JWNxQvWhMfMdmzIYtKU7oP3OOInY/tl2ov3BDjnJQ== - dependencies: - camelcase "^4.1.0" - -yargs@^10.0.3: - version "10.1.2" - resolved "https://registry.yarnpkg.com/yargs/-/yargs-10.1.2.tgz#454d074c2b16a51a43e2fb7807e4f9de69ccb5c5" - integrity sha512-ivSoxqBGYOqQVruxD35+EyCFDYNEFL/Uo6FcOnz+9xZdZzK0Zzw4r4KhbrME1Oo2gOggwJod2MnsdamSG7H9ig== - dependencies: - cliui "^4.0.0" - decamelize "^1.1.1" - find-up "^2.1.0" - get-caller-file "^1.0.1" - os-locale "^2.0.0" - require-directory "^2.1.1" - require-main-filename "^1.0.1" - set-blocking "^2.0.0" - string-width "^2.0.0" - which-module "^2.0.0" - y18n "^3.2.1" - yargs-parser "^8.1.0" - -yargs@^13.2.4, yargs@^13.3.0: - version "13.3.0" - resolved "https://registry.yarnpkg.com/yargs/-/yargs-13.3.0.tgz#4c657a55e07e5f2cf947f8a366567c04a0dedc83" - integrity sha512-2eehun/8ALW8TLoIl7MVaRUrg+yCnenu8B4kBlRxj3GJGDKU1Og7sMXPNm1BYyM1DOJmTZ4YeN/Nwxv+8XJsUA== - dependencies: - cliui "^5.0.0" - find-up "^3.0.0" - get-caller-file "^2.0.1" - require-directory "^2.1.1" - require-main-filename "^2.0.0" - set-blocking "^2.0.0" - string-width "^3.0.0" - which-module "^2.0.0" - y18n "^4.0.0" - yargs-parser "^13.1.1" - -yargs@^13.3.2: - version "13.3.2" - resolved "https://registry.yarnpkg.com/yargs/-/yargs-13.3.2.tgz#ad7ffefec1aa59565ac915f82dccb38a9c31a2dd" - integrity sha512-AX3Zw5iPruN5ie6xGRIDgqkT+ZhnRlZMLMHAs8tg7nRruy2Nb+i5o9bwghAogtM08q1dpr2LVoS8KSTMYpWXUw== - dependencies: - cliui "^5.0.0" - find-up "^3.0.0" - get-caller-file "^2.0.1" - require-directory "^2.1.1" - require-main-filename "^2.0.0" - set-blocking "^2.0.0" - string-width "^3.0.0" - which-module "^2.0.0" - y18n "^4.0.0" - yargs-parser "^13.1.2" - -yargs@^7.1.0: - version "7.1.0" - resolved "https://registry.yarnpkg.com/yargs/-/yargs-7.1.0.tgz#6ba318eb16961727f5d284f8ea003e8d6154d0c8" - integrity sha1-a6MY6xaWFyf10oT46gA+jWFU0Mg= - dependencies: - camelcase "^3.0.0" - cliui "^3.2.0" - decamelize "^1.1.1" - get-caller-file "^1.0.1" - os-locale "^1.4.0" - read-pkg-up "^1.0.1" - require-directory "^2.1.1" - require-main-filename "^1.0.1" - set-blocking "^2.0.0" - string-width "^1.0.2" - which-module "^1.0.0" - y18n "^3.2.1" - yargs-parser "^5.0.0" - -yauzl@^2.4.2: - version "2.10.0" - resolved "https://registry.yarnpkg.com/yauzl/-/yauzl-2.10.0.tgz#c7eb17c93e112cb1086fa6d8e51fb0667b79a5f9" - integrity sha1-x+sXyT4RLLEIb6bY5R+wZnt5pfk= - dependencies: - buffer-crc32 "~0.2.3" - fd-slicer "~1.1.0" diff --git a/script/README.md b/script/README.md deleted file mode 100644 index 01c920da1..000000000 --- a/script/README.md +++ /dev/null @@ -1 +0,0 @@ -Scripts to make common developer tasks easy to type. diff --git a/script/comptroller-abi b/script/comptroller-abi deleted file mode 100755 index 436bf7b99..000000000 --- a/script/comptroller-abi +++ /dev/null @@ -1,33 +0,0 @@ -#!/usr/bin/env node - -const fs = require('fs') - -function mergeInterface(into, from) { - const key = (item) => item.inputs ? `${item.name}/${item.inputs.length}` : item.name; - const existing = into.reduce((acc, item) => { - acc[key(item)] = true; - return acc; - }, {}); - const extended = from.reduce((acc, item) => { - if (!(key(item) in existing)) - acc.push(item) - return acc; - }, into.slice()); - return into.concat(from) -} - -function mergeComptroller(abi) { - abi.Comptroller = mergeInterface(abi.Unitroller, abi[`Comptroller`]) - return abi; -} - -function format(abi) { - return JSON.stringify(abi, null, 4).replace(/^( {4}".*?)$/mg, '\n$1') -} - -function main(path) { - const abi = JSON.parse(fs.readFileSync(path)) - fs.writeFileSync(path, format(mergeComptroller(abi))) -} - -main('networks/mainnet-abi.json') diff --git a/spec/certora/CErc20/accrueInterest.cvl b/spec/certora/CErc20/accrueInterest.cvl deleted file mode 100644 index 7ab1517b5..000000000 --- a/spec/certora/CErc20/accrueInterest.cvl +++ /dev/null @@ -1,66 +0,0 @@ - -accrueInterest(uint result) -description "Break accrueInterest with result=$result, block delta is $delta" { - // Pre/action/post environments - env e0; - env e1; - - require e1.block.number >= e0.block.number; - - // fetch pre - uint256 cTokenCashPre = sinvoke getCash(e0); - - uint256 borrowRateMaxMantissa = 5000000000000; - uint256 borrowRateMantissaPre = sinvoke borrowRatePerBlock(e0); - bool interestRateModelReverted = lastReverted; - - uint256 accrualBlockNumberPre = sinvoke accrualBlockNumber(e0); - uint256 borrowIndexPre = sinvoke borrowIndex(e0); - uint256 totalBorrowsPre = sinvoke totalBorrows(e0); - uint256 totalReservesPre = sinvoke totalReserves(e0); - uint256 reserveFactorPre = sinvoke reserveFactorMantissa(e0); - - // internal computations - uint256 delta = e0.block.number - accrualBlockNumberPre; - require delta >= 0; - - uint256 simpleInterestFactor = delta * borrowRateMantissaPre; - uint256 interestAccumulated = (totalBorrowsPre * simpleInterestFactor) / 1000000000000000000; - - // post expected - uint256 borrowIndexPostExpected = borrowIndexPre + (borrowIndexPre*simpleInterestFactor) / 1000000000000000000; - uint256 totalBorrowsPostExpected = totalBorrowsPre + interestAccumulated; - uint256 totalReservesPostExpected = totalReservesPre + (interestAccumulated*reserveFactorPre) / 1000000000000000000; - - // Action! - require result == invoke accrueInterest(e0); - bool accrueInterestReverted = lastReverted; - - // fetch post - uint256 accrualBlockNumberPost = sinvoke accrualBlockNumber(e1); - uint256 borrowIndexPostActual = sinvoke borrowIndex(e1); - uint256 totalBorrowsPostActual = sinvoke totalBorrows(e1); - uint256 totalReservesPostActual = sinvoke totalReserves(e1); - - uint256 NO_ERROR = 0; - uint256 MATH_ERROR = 9; - - // Guarantee return values - assert (accrueInterestReverted <=> (interestRateModelReverted || borrowRateMantissaPre > borrowRateMaxMantissa)), "Reverted for unexpected reason"; - - assert (!accrueInterestReverted) => (result == NO_ERROR || result == MATH_ERROR), "Got unexpected error code"; - - assert (!accrueInterestReverted => - ((result != 0 || delta == 0) <=> - (accrualBlockNumberPost == accrualBlockNumberPre && - borrowIndexPostActual == borrowIndexPre && - totalBorrowsPostActual == totalBorrowsPre && - totalReservesPostActual == totalReservesPre))), "Mismatch in static case"; - - assert (!accrueInterestReverted => - ((result == 0) <=> - (accrualBlockNumberPost == e0.block.number && - borrowIndexPostActual == borrowIndexPostExpected && - totalBorrowsPostActual == totalBorrowsPostExpected && - totalReservesPostActual == totalReservesPostExpected))), "Mismatch in no error case"; -} diff --git a/spec/certora/CErc20/admin.cvl b/spec/certora/CErc20/admin.cvl deleted file mode 100644 index 404ec3461..000000000 --- a/spec/certora/CErc20/admin.cvl +++ /dev/null @@ -1,101 +0,0 @@ -_setPendingAdmin(address currentAdmin, address currentPendingAdmin, address newPendingAdmin) -description "Failed to set new pending admin $currentPendingAdmin to $newPendingAdmin (admin=$currentAdmin)" -{ - // Free Variables - env e0; - env e1; - env e2; - - require currentAdmin == sinvoke admin(e0); - require currentPendingAdmin == sinvoke pendingAdmin(e0); - - // Invoke set new pending admin - uint256 result = sinvoke _setPendingAdmin(e1, newPendingAdmin); - - // pendingAdmin changes <=> msg.sender == currentAdmin - assert ( - ( - e1.msg.sender == currentAdmin && - result == 0 && - sinvoke pendingAdmin(e2) == newPendingAdmin - ) - || - ( - e1.msg.sender != currentAdmin && - result != 0 && - sinvoke pendingAdmin(e2) == currentPendingAdmin - ) - ); -} - -_acceptAdmin(address currentAdmin, address currentPendingAdmin, address newAdmin, address newPendingAdmin) -description "Failed to accept pending admin currentAdmin=$currentAdmin, currentPendingAdmin=$currentPendingAdmin, newPendingAdmin=$newPendingAdmin, newAdmin=$newAdmin" -{ - // Free Variables - env e0; - env e1; - env e2; - - require currentAdmin == sinvoke admin(e0); - require currentPendingAdmin == sinvoke pendingAdmin(e0); - - // Invoke accept admin - uint256 result = sinvoke _acceptAdmin(e1); - - require newAdmin == sinvoke admin(e2); - require newPendingAdmin == sinvoke pendingAdmin(e2); - - // admin == pendingAdmin <=> msg.sender == pendingAdmin - assert ( - ( - e1.msg.sender == currentPendingAdmin && - currentPendingAdmin != 0 && - result == 0 && - newAdmin == currentPendingAdmin && - newPendingAdmin == 0 - ) - || - ( - ( - e1.msg.sender != currentPendingAdmin || - currentPendingAdmin == 0 - ) && - result != 0 && - newAdmin == currentAdmin && - newPendingAdmin == currentPendingAdmin - ) - ); -} - -// Invariant: To change admin or currentPendingAdmin, must come from current admin -invariantRequireAdminToChangeAdmin(address caller, address currentAdmin, address currentPendingAdmin, address desiredAdmin, address newAdmin, address newPendingAdmin) - description "Failed to prove that required to be admin to change admin (caller=$caller, currentAdmin=$currentAdmin, currentPendingAdmin=$currentPendingAdmin, desiredAdmin=$desiredAdmin, newAdmin=$newAdmin, newPendingAdmin=$newPendingAdmin)" -{ - // Free Variables - env e0; - env e1; - env e2; - env e3; - - require currentAdmin == sinvoke admin(e0); - require currentPendingAdmin == sinvoke pendingAdmin(e0); - - // Start with a zero admin - require currentPendingAdmin == 0; - - require caller == e1.msg.sender; - - // Invoke set new pending admin - uint256 result0 = sinvoke _setPendingAdmin(e1, desiredAdmin); - uint256 result1 = sinvoke _acceptAdmin(e2); - - require newAdmin == sinvoke admin(e3); - require newPendingAdmin == sinvoke pendingAdmin(e3); - - assert (e1.msg.sender == currentAdmin || - ( - newAdmin == currentAdmin && - newPendingAdmin == currentPendingAdmin - ) - ); -} diff --git a/spec/certora/CErc20/borrowAndRepayFresh.cvl b/spec/certora/CErc20/borrowAndRepayFresh.cvl deleted file mode 100644 index ddaf89f7c..000000000 --- a/spec/certora/CErc20/borrowAndRepayFresh.cvl +++ /dev/null @@ -1,238 +0,0 @@ - -borrowFresh(uint result, address borrower, uint256 borrowAmount) -description "Break borrow with result=$result borrower=$borrower borrowAmount=$borrowAmount" { - // Pre/action/post environments - env e0; - env e1; - env e2; - - require e1.block.number >= e0.block.number; - require e2.block.number >= e1.block.number; - - // Any other account - address other; - require other != borrower && other != currentContract; - - /* - - exchange rate should not change - - errors should have no effect - - no *other* storage should change - XXX can we specify this? - - |----------+--------+----------+-------| - | | CToken | Borrower | Other | - |----------+--------+----------+-------| - | cash | -A | +A | 0 | - | borrows | +A | +A | 0 | - | tokens | 0 | 0 | 0 | - | reserves | 0 | | | - |----------+--------+----------+-------| - */ - - /* Pre */ - - uint256 exchangeRatePre = sinvoke exchangeRateStored(e0); - - uint256 cTokenCashPre = sinvoke getCash(e0); - uint256 borrowerCashPre = sinvoke getCashOf(e0, borrower); - uint256 otherCashPre = sinvoke getCashOf(e0, other); - - uint256 cTokenBorrowsPre = sinvoke totalBorrows(e0); - uint256 borrowerBorrowsPre = sinvoke borrowBalanceStored(e0, borrower); - uint256 otherBorrowsPre = sinvoke borrowBalanceStored(e0, other); - - uint256 cTokenTokensPre = sinvoke totalSupply(e0); - uint256 borrowerTokensPre = sinvoke balanceOf(e0, borrower); - uint256 otherTokensPre = sinvoke balanceOf(e0, other); - - uint256 cTokenReservesPre = sinvoke totalReserves(e0); - - // Just Do It - require result == invoke borrowFreshPub(e1, borrower, borrowAmount); - bool borrowFreshReverted = lastReverted; - - /* Post */ - - uint256 exchangeRatePost = sinvoke exchangeRateStored(e2); - - uint256 cTokenCashPost = sinvoke getCash(e2); - uint256 borrowerCashPost = sinvoke getCashOf(e2, borrower); - uint256 otherCashPost = sinvoke getCashOf(e2, other); - - uint256 cTokenBorrowsPost = sinvoke totalBorrows(e2); - uint256 borrowerBorrowsPost = sinvoke borrowBalanceStored(e2, borrower); - uint256 otherBorrowsPost = sinvoke borrowBalanceStored(e2, other); - - uint256 cTokenTokensPost = sinvoke totalSupply(e2); - uint256 borrowerTokensPost = sinvoke balanceOf(e2, borrower); - uint256 otherTokensPost = sinvoke balanceOf(e2, other); - - uint256 cTokenReservesPost = sinvoke totalReserves(e2); - - // Measure - bool staticBalance = - (exchangeRatePost == exchangeRatePre) && - (cTokenCashPost == cTokenCashPre) && - (cTokenBorrowsPost == cTokenBorrowsPre) && - (cTokenTokensPost == cTokenTokensPre) && - (cTokenReservesPost == cTokenReservesPre) && - (borrowerCashPost == borrowerCashPre) && - (borrowerBorrowsPost == borrowerBorrowsPre) && - (borrowerTokensPost == borrowerTokensPre) && - (otherCashPost == otherCashPre) && - (otherBorrowsPost == otherBorrowsPre) && - (otherTokensPost == otherTokensPre); - - bool dynamicBalance = - (borrowAmount != 0) && - (exchangeRatePost == exchangeRatePre) && - (cTokenCashPost == cTokenCashPre - borrowAmount) && - (cTokenBorrowsPost == cTokenBorrowsPre + borrowAmount) && - (cTokenTokensPost == cTokenTokensPre) && - (cTokenReservesPost == cTokenReservesPre) && - (borrowerCashPost == borrowerCashPre + borrowAmount) && - (borrowerBorrowsPost == borrowerBorrowsPre + borrowAmount) && - (borrowerTokensPost == borrowerTokensPre) && - (otherCashPost == otherCashPre) && - (otherBorrowsPost == otherBorrowsPre) && - (otherTokensPost == otherTokensPre); - - assert (!borrowFreshReverted => - ((result != 0 || borrowAmount == 0) <=> staticBalance)), "Mismatch in static case"; - assert (!borrowFreshReverted => - ((result == 0 && borrowAmount != 0 && borrower != currentContract) <=> dynamicBalance)), "Mismatch in dynamic case"; -} - -repayBorrowFresh(uint result, address payer, address borrower, uint256 repayAmount) -description "Break repay borrow with realRepayAmount=$realRepayAmount borrowerBorrowsPre=$borrowerBorrowsPre" { - // Pre/action/post environments - env e0; - env e1; - env e2; - - require e1.block.number >= e0.block.number; - require e2.block.number >= e1.block.number; - - // Any other account - address other; - require other != payer && other != borrower && other != currentContract; - - // We assume this cannot happen - // OQ: should we enforce in the code such that it need not be assumed? - require borrower != currentContract; - require payer != currentContract; - - /* - |----------+--------+-------+----------+-------| - | | CToken | Payer | Borrower | Other | - |----------+--------+-------+----------+-------| - | cash | +A | -A | -A/0 | 0 | - | borrows | -A | -A/0 | -A | 0 | - | tokens | 0 | 0 | 0 | 0 | - | reserves | 0 | | | | - |----------+--------+-------+----------+-------| - */ - - /* Pre */ - - uint256 exchangeRatePre = sinvoke exchangeRateStored(e0); - - uint256 cTokenCashPre = sinvoke getCash(e0); - uint256 payerCashPre = sinvoke getCashOf(e0, payer); - uint256 borrowerCashPre = sinvoke getCashOf(e0, borrower); - uint256 otherCashPre = sinvoke getCashOf(e0, other); - - uint256 cTokenBorrowsPre = sinvoke totalBorrows(e0); - uint256 payerBorrowsPre = sinvoke borrowBalanceStored(e0, payer); - uint256 borrowerBorrowsPre = sinvoke borrowBalanceStored(e0, borrower); - uint256 otherBorrowsPre = sinvoke borrowBalanceStored(e0, other); - - uint256 cTokenTokensPre = sinvoke totalSupply(e0); - uint256 payerTokensPre = sinvoke balanceOf(e0, payer); - uint256 borrowerTokensPre = sinvoke balanceOf(e0, borrower); - uint256 otherTokensPre = sinvoke balanceOf(e0, other); - - uint256 cTokenReservesPre = sinvoke totalReserves(e0); - - // Just Do It - require result == invoke repayBorrowFreshPub(e1, payer, borrower, repayAmount); - bool repayBorrowFreshReverted = lastReverted; - - /* Post */ - - uint256 exchangeRatePost = sinvoke exchangeRateStored(e2); - - uint256 cTokenCashPost = sinvoke getCash(e2); - uint256 payerCashPost = sinvoke getCashOf(e2, payer); - uint256 borrowerCashPost = sinvoke getCashOf(e2, borrower); - uint256 otherCashPost = sinvoke getCashOf(e2, other); - - uint256 cTokenBorrowsPost = sinvoke totalBorrows(e2); - uint256 payerBorrowsPost = sinvoke borrowBalanceStored(e2, payer); - uint256 borrowerBorrowsPost = sinvoke borrowBalanceStored(e2, borrower); - uint256 otherBorrowsPost = sinvoke borrowBalanceStored(e2, other); - - uint256 cTokenTokensPost = sinvoke totalSupply(e2); - uint256 payerTokensPost = sinvoke balanceOf(e2, payer); - uint256 borrowerTokensPost = sinvoke balanceOf(e2, borrower); - uint256 otherTokensPost = sinvoke balanceOf(e2, other); - - uint256 cTokenReservesPost = sinvoke totalReserves(e2); - - // Measure - bool staticBalance = - (exchangeRatePost == exchangeRatePre) && - (cTokenCashPost == cTokenCashPre) && - (cTokenBorrowsPost == cTokenBorrowsPre) && - (cTokenTokensPost == cTokenTokensPre) && - (cTokenReservesPost == cTokenReservesPre) && - (payerCashPost == payerCashPre) && - (payerBorrowsPost == payerBorrowsPre) && - (payerTokensPost == payerTokensPre) && - (borrowerCashPost == borrowerCashPre) && - (borrowerBorrowsPost == borrowerBorrowsPre) && - (borrowerTokensPost == borrowerTokensPre) && - (otherCashPost == otherCashPre) && - (otherBorrowsPost == otherBorrowsPre) && - (otherTokensPost == otherTokensPre); - - // XXX more convenient way to represent uint max? - uint256 UINT_MAX = 115792089237316195423570985008687907853269984665640564039457584007913129639935; - uint256 realRepayAmount; - require - ((repayAmount == UINT_MAX) => - (realRepayAmount == borrowerBorrowsPre)) && - ((repayAmount != UINT_MAX) => - (realRepayAmount == repayAmount)); - - uint256 payerBorrowsExpected; - uint256 borrowerCashExpected; - require - ((payer == borrower) => - (payerBorrowsExpected == payerBorrowsPre - realRepayAmount) && - (borrowerCashExpected == borrowerCashPre - realRepayAmount)) && - ((payer != borrower) => - (payerBorrowsExpected == payerBorrowsPre) && - (borrowerCashExpected == borrowerCashPre)); - - bool dynamicBalance = - (realRepayAmount != 0) && - (exchangeRatePost == exchangeRatePre) && - (cTokenCashPost == cTokenCashPre + realRepayAmount) && - (cTokenBorrowsPost == cTokenBorrowsPre - realRepayAmount) && - (cTokenTokensPost == cTokenTokensPre) && - (cTokenReservesPost == cTokenReservesPre) && - (payerCashPost == payerCashPre - realRepayAmount) && - (payerBorrowsPost == payerBorrowsExpected) && - (payerTokensPost == payerTokensPre) && - (borrowerCashPost == borrowerCashExpected) && - (borrowerBorrowsPost == borrowerBorrowsPre - realRepayAmount) && - (borrowerTokensPost == borrowerTokensPre) && - (otherCashPost == otherCashPre) && - (otherBorrowsPost == otherBorrowsPre) && - (otherTokensPost == otherTokensPre); - - assert (!repayBorrowFreshReverted => - ((result != 0 || realRepayAmount == 0) <=> staticBalance)), "Mismatch in static case"; - assert (!repayBorrowFreshReverted => - ((result == 0 && realRepayAmount != 0 && payer != currentContract) <=> dynamicBalance)), "Mismatch in dynamic case"; -} diff --git a/spec/certora/CErc20/eip20.cvl b/spec/certora/CErc20/eip20.cvl deleted file mode 100644 index 385098816..000000000 --- a/spec/certora/CErc20/eip20.cvl +++ /dev/null @@ -1,137 +0,0 @@ -transferFrom(bool success, address src, address dst, uint256 amount) -description "Break transferFrom" { - // Pre/action/post environments - env e0; - env e1a; - env e1b; - env e2; - - require e1a.block.number >= e0.block.number; - require e1b.block.number >= e1a.block.number; - require e2.block.number >= e1b.block.number; - - // Any other account - address other; - require other != src && other != dst; - - /* - - no effect on exchange rate - - no more than approved - |----------+--------+-----+-----+-------| - | | CToken | Src | Dst | Other | - |----------+--------+-----+-----+-------| - | cash | 0 | 0 | 0 | 0 | - | borrows | 0 | 0 | 0 | 0 | - | tokens | 0 | -T | +T | 0 | - | reserves | 0 | | | | - |----------+--------+-----+-----+-------| - */ - - /* Pre */ - - uint256 exchangeRatePre = sinvoke exchangeRateStored(e0); - - uint256 cTokenCashPre = sinvoke getCash(e0); - uint256 srcCashPre = sinvoke getCashOf(e0, src); - uint256 dstCashPre = sinvoke getCashOf(e0, dst); - uint256 otherCashPre = sinvoke getCashOf(e0, other); - - uint256 cTokenBorrowsPre = sinvoke totalBorrows(e0); - uint256 srcBorrowsPre = sinvoke borrowBalanceStored(e0, src); - uint256 dstBorrowsPre = sinvoke borrowBalanceStored(e0, dst); - uint256 otherBorrowsPre = sinvoke borrowBalanceStored(e0, other); - - uint256 cTokenSupplyPre = sinvoke totalSupply(e0); - uint256 srcTokensPre = sinvoke balanceOf(e0, src); - uint256 dstTokensPre = sinvoke balanceOf(e0, dst); - uint256 otherTokensPre = sinvoke balanceOf(e0, other); - - uint256 cTokenReservesPre = sinvoke totalReserves(e0); - - // Approve - bool doApprove; - uint256 approvedAmount; - if (doApprove) { - require e1a.msg.sender == src; - sinvoke approve(e1a, e1b.msg.sender, approvedAmount); - } else {} - - uint256 allowancePre = sinvoke allowance(e1a, src, e1b.msg.sender); - - // Just Do It - require success == invoke transferFrom(e1b, src, dst, amount); - bool transferReverted = lastReverted; - - /* Post */ - - uint256 exchangeRatePost = sinvoke exchangeRateStored(e2); - - uint256 cTokenCashPost = sinvoke getCash(e2); - uint256 srcCashPost = sinvoke getCashOf(e2, src); - uint256 dstCashPost = sinvoke getCashOf(e2, dst); - uint256 otherCashPost = sinvoke getCashOf(e2, other); - - uint256 cTokenBorrowsPost = sinvoke totalBorrows(e2); - uint256 srcBorrowsPost = sinvoke borrowBalanceStored(e2, src); - uint256 dstBorrowsPost = sinvoke borrowBalanceStored(e2, dst); - uint256 otherBorrowsPost = sinvoke borrowBalanceStored(e2, other); - - uint256 cTokenSupplyPost = sinvoke totalSupply(e2); - uint256 srcTokensPost = sinvoke balanceOf(e2, src); - uint256 dstTokensPost = sinvoke balanceOf(e2, dst); - uint256 otherTokensPost = sinvoke balanceOf(e2, other); - - uint256 cTokenReservesPost = sinvoke totalReserves(e2); - - uint256 allowancePost = sinvoke allowance(e2, src, e1b.msg.sender); - - // Measure - bool staticBalance = - (exchangeRatePost == exchangeRatePre) && - (cTokenCashPost == cTokenCashPre) && - (cTokenBorrowsPost == cTokenBorrowsPre) && - (cTokenSupplyPost == cTokenSupplyPre) && - (cTokenReservesPost == cTokenReservesPre) && - (srcCashPost == srcCashPre) && - (srcBorrowsPost == srcBorrowsPre) && - (srcTokensPost == srcTokensPre) && - (dstCashPost == dstCashPre) && - (dstBorrowsPost == dstBorrowsPre) && - (dstTokensPost == dstTokensPre) && - (otherCashPost == otherCashPre) && - (otherBorrowsPost == otherBorrowsPre) && - (otherTokensPost == otherTokensPre); - - bool dynamicBalance = - (amount != 0) && - (exchangeRatePost == exchangeRatePre) && - (cTokenCashPost == cTokenCashPre) && - (cTokenBorrowsPost == cTokenBorrowsPre) && - (cTokenSupplyPost == cTokenSupplyPre) && - (cTokenReservesPost == cTokenReservesPre) && - (srcCashPost == srcCashPre) && - (srcBorrowsPost == srcBorrowsPre) && - (srcTokensPost == srcTokensPre - amount) && - (dstCashPost == dstCashPre) && - (dstBorrowsPost == dstBorrowsPre) && - (dstTokensPost == dstTokensPre + amount) && - (otherCashPost == otherCashPre) && - (otherBorrowsPost == otherBorrowsPre) && - (otherTokensPost == otherTokensPre); - - // XXX better way to write uint max? - uint256 UINT_MAX = 115792089237316195423570985008687907853269984665640564039457584007913129639935; - - assert (!transferReverted => - ((!success || amount == 0 || src == dst) <=> staticBalance)), "Mismatch in static case"; - assert (!transferReverted => - ((success && amount != 0) <=> dynamicBalance)), "Mismatch in dynamic case"; - assert (!transferReverted && success => - (amount > allowancePre => e1b.msg.sender == src)), "Only owner can transfer > allowance"; - assert (!transferReverted && success => - (doApprove => allowancePre >= approvedAmount)), "Approval must increase the allowance"; - assert (!transferReverted && success => - (allowancePre == UINT_MAX || e1b.msg.sender == src || amount == 0) <=> allowancePost == allowancePre), "Mismatch not touching allowance"; - assert (!transferReverted && success && e1b.msg.sender != src && amount != 0 => - (allowancePre != UINT_MAX <=> allowancePost == allowancePre - amount)), "Spender transfer uses allowance"; -} \ No newline at end of file diff --git a/spec/certora/CErc20/exchangeRate.cvl b/spec/certora/CErc20/exchangeRate.cvl deleted file mode 100644 index 4860d8d5e..000000000 --- a/spec/certora/CErc20/exchangeRate.cvl +++ /dev/null @@ -1,53 +0,0 @@ - -exchangeRateDecreases(uint result, address minter, uint256 mintAmount, uint256 mintTokens) { - // Pre/action/post environments - env e0; - env e1; - env e2; - - require e1.block.number >= e0.block.number; - require e2.block.number >= e1.block.number; - - // Any other account - address other; - require other != minter && other != currentContract; - require minter != currentContract; - - uint256 exchangeRatePre = sinvoke exchangeRateCurrent(e0); - - uint256 cTokenCashPre = sinvoke getCash(e0); - uint256 cTokenBorrowsPre = sinvoke totalBorrows(e0); - uint256 cTokenTokensPre = sinvoke totalSupply(e0); - uint256 cTokenReservesPre = sinvoke totalReserves(e0); - uint256 cTokenSupplyPre = cTokenCashPre + cTokenBorrowsPre - cTokenReservesPre; - - // Simplifying assumptions to analyze the vulnerability - require cTokenBorrowsPre == 0; // XXX not necessary, simplifies analysis - require cTokenSupplyPre >= 0; // XXX not necessary, should underflow - require cTokenTokensPre > 0; // XXX not necessary - require exchangeRatePre * cTokenTokensPre == cTokenSupplyPre * 1000000000000000000; // XXX - - // XXX why does this have to be after require? - uint256 implicitExchangeRatePre = cTokenSupplyPre * 1000000000000000000 / cTokenTokensPre; - - require result == invoke mintFreshPub(e1, minter, mintAmount); - bool mintFreshReverted = lastReverted; - - uint256 exchangeRatePost = sinvoke exchangeRateCurrent(e2); - - uint256 cTokenCashPost = sinvoke getCash(e2); - uint256 cTokenBorrowsPost = sinvoke totalBorrows(e2); - uint256 cTokenTokensPost = sinvoke totalSupply(e2); - uint256 cTokenReservesPost = sinvoke totalReserves(e2); - uint256 cTokenSupplyPost = cTokenCashPost + cTokenBorrowsPost - cTokenReservesPost; - - require mintTokens == cTokenTokensPost - cTokenTokensPre; - require exchangeRatePre * mintTokens == mintAmount * 1000000000000000000; // XXX why would this need to be assumed? should be proven - - uint256 implicitExchangeRatePost = cTokenSupplyPost * 1000000000000000000 / cTokenTokensPost; - - assert (!mintFreshReverted => - ((result != 0) => (exchangeRatePost == exchangeRatePre))), "Mismatch in failure case"; - assert (!mintFreshReverted => (exchangeRatePost >= exchangeRatePre)), "Exchange rate decreased"; - assert (!mintFreshReverted => (implicitExchangeRatePost >= implicitExchangeRatePre)), "Implicit exchange rate decreased"; -} diff --git a/spec/certora/CErc20/frame.cvl b/spec/certora/CErc20/frame.cvl deleted file mode 100644 index 10605b923..000000000 --- a/spec/certora/CErc20/frame.cvl +++ /dev/null @@ -1,257 +0,0 @@ - -frame_balanceOf(address a, method f) -description "$f may change value of balanceOf($a)" -{ - env e0; - env e1; - env e2; - require e1.block.number >= e0.block.number; - require e2.block.number >= e1.block.number; - - uint256 old = sinvoke balanceOf(e0, a); - calldataarg arg; - invoke f(e1, arg); - uint256 new = sinvoke balanceOf(e2, a); - - assert old == new; -} - -frame_borrowBalanceStored(address a, method f) -description "$f may change value of borrowBalanceStored($a)" -{ - env e0; - env e1; - env e2; - require e1.block.number >= e0.block.number; - require e2.block.number >= e1.block.number; - - uint256 old = sinvoke borrowBalanceStored(e0, a); - calldataarg arg; - invoke f(e1, arg); - uint256 new = sinvoke borrowBalanceStored(e2, a); - - assert old == new; -} - -frame_borrowIndex(method f) -description "$f may change value of borrowIndex()" -{ - env e0; - env e1; - env e2; - require e1.block.number >= e0.block.number; - require e2.block.number >= e1.block.number; - - uint256 old = sinvoke borrowIndex(e0); - calldataarg arg; - invoke f(e1, arg); - uint256 new = sinvoke borrowIndex(e2); - - assert old == new; -} - -frame_borrowRatePerBlock(method f) -description "$f may change value of borrowRatePerBlock()" -{ - env e0; - env e1; - env e2; - require e1.block.number >= e0.block.number; - require e2.block.number >= e1.block.number; - - uint256 old = sinvoke borrowRatePerBlock(e0); - calldataarg arg; - invoke f(e1, arg); - uint256 new = sinvoke borrowRatePerBlock(e2); - - assert old == new; -} - -frame_comptroller(method f) -description "$f may change value of comptroller()" -{ - env e0; - env e1; - env e2; - require e1.block.number >= e0.block.number; - require e2.block.number >= e1.block.number; - - address old = sinvoke comptroller(e0); - calldataarg arg; - invoke f(e1, arg); - address new = sinvoke comptroller(e2); - - assert old == new; -} - -frame_exchangeRateStored(address a, method f) -description "$f may change value of exchangeRateStored()" -{ - env e0; - env e1; - env e2; - require e1.block.number >= e0.block.number; - require e2.block.number >= e1.block.number; - - uint256 old = sinvoke exchangeRateStored(e0); - calldataarg arg; - invoke f(e1, arg); - uint256 new = sinvoke exchangeRateStored(e2); - - assert old == new; -} - -frame_getAccountSnapshot(address a, method f) -description "$f may change value of getAccountSnapshot($a)" -{ - env e0; - env e1; - env e2; - require e1.block.number >= e0.block.number; - require e2.block.number >= e1.block.number; - - uint256 old1; uint256 old2; uint256 old3; uint256 old4; - old1,old2,old3,old4 = sinvoke getAccountSnapshot(e0, a); - calldataarg arg; - invoke f(e1, arg); - uint256 new1; uint256 new2; uint256 new3; uint256 new4; - new1,new2,new3,new4 = sinvoke getAccountSnapshot(e2, a); - - assert old1 == new1 && old2 == new2 && old3 == new3 && old4 == new4; -} - -frame_getCash(method f) -description "$f may change value of getCash()" -{ - env e0; - env e1; - env e2; - require e1.block.number >= e0.block.number; - require e2.block.number >= e1.block.number; - - uint256 old = sinvoke getCash(e0); - calldataarg arg; - invoke f(e1, arg); - uint256 new = sinvoke getCash(e2); - - assert old == new; -} - -frame_interestRateModel(method f) -description "$f may change value of interestRateModel()" -{ - env e0; - env e1; - env e2; - require e1.block.number >= e0.block.number; - require e2.block.number >= e1.block.number; - - address old = sinvoke interestRateModel(e0); - calldataarg arg; - invoke f(e1, arg); - address new = sinvoke interestRateModel(e2); - - assert old == new; -} - -frame_pendingAdmin(method f) -description "$f may change value of pendingAdmin()" -{ - env e0; - env e1; - env e2; - require e1.block.number >= e0.block.number; - require e2.block.number >= e1.block.number; - - address old = sinvoke pendingAdmin(e0); - calldataarg arg; - invoke f(e1, arg); - address new = sinvoke pendingAdmin(e2); - - assert old == new; -} - -frame_reserveFactorMantissa(method f) -description "$f may change value of reserveFactorMantissa()" -{ - env e0; - env e1; - env e2; - require e1.block.number >= e0.block.number; - require e2.block.number >= e1.block.number; - - uint256 old = sinvoke reserveFactorMantissa(e0); - calldataarg arg; - invoke f(e1, arg); - uint256 new = sinvoke reserveFactorMantissa(e2); - - assert old == new; -} - -frame_supplyRatePerBlock(method f) -description "$f may change value of supplyRatePerBlock()" -{ - env e0; - env e1; - env e2; - require e1.block.number >= e0.block.number; - require e2.block.number >= e1.block.number; - - uint256 old = sinvoke supplyRatePerBlock(e0); - calldataarg arg; - invoke f(e1, arg); - uint256 new = sinvoke supplyRatePerBlock(e2); - - assert old == new; -} - -frame_totalBorrows(method f) -description "$f may change value of totalBorrows()" -{ - env e0; - env e1; - env e2; - require e1.block.number >= e0.block.number; - require e2.block.number >= e1.block.number; - - uint256 old = sinvoke totalBorrows(e0); - calldataarg arg; - invoke f(e1, arg); - uint256 new = sinvoke totalBorrows(e2); - - assert old == new; -} - -frame_totalReserves(address a, method f) -description "$f may change value of totalReserves()" -{ - env e0; - env e1; - env e2; - require e1.block.number >= e0.block.number; - require e2.block.number >= e1.block.number; - - uint256 old = sinvoke totalReserves(e0); - calldataarg arg; - invoke f(e1, arg); - uint256 new = sinvoke totalReserves(e2); - - assert old == new; -} - -frame_totalSupply(method f) -description "$f may change value of totalSupply()" -{ - env e0; - env e1; - env e2; - require e1.block.number >= e0.block.number; - require e2.block.number >= e1.block.number; - - uint256 old = sinvoke totalSupply(e0); - calldataarg arg; - invoke f(e1, arg); - uint256 new = sinvoke totalSupply(e2); - - assert old == new; -} \ No newline at end of file diff --git a/spec/certora/CErc20/liquidateFresh.cvl b/spec/certora/CErc20/liquidateFresh.cvl deleted file mode 100644 index 6565b67b6..000000000 --- a/spec/certora/CErc20/liquidateFresh.cvl +++ /dev/null @@ -1,315 +0,0 @@ - -liquidateBorrowFresh(uint result, address liquidator, address borrower, uint256 repayAmount) -description "Break liquidate" { - // Pre/action/post environments - env e0; - env e1; - env e2; - - require e1.block.number >= e0.block.number; - require e2.block.number >= e1.block.number; - - // Any other account - address other; - require other != liquidator && other != borrower && other != currentContract; - - // We assume this cannot happen - // OQ: should we enforce in the code such that it need not be assumed? - require borrower != currentContract; - require liquidator != currentContract; - require borrower != sinvoke otherToken(e0); - require liquidator != sinvoke otherToken(e0); - - // We check if the borrowed token and the collateral token have the same underlying - // which affects whether or not collateral cash should have changed or not - bool borrowCashIsCollateralCash = sinvoke underlying(e0) == sinvoke underlyingInOther(e0); - - /* - - no effect on exchange rate - - self-liquidate has no effect - |---------------------+--------+------------+----------+-------| - | | CToken | Liquidator | Borrower | Other | - |---------------------+--------+------------+----------+-------| - | cash | +A | -A | 0 | 0 | - | borrows | -A | 0 | -A | 0 | - | tokens | 0 | 0 | 0 | 0 | - | reserves | 0 | | | | - | collateral cash | 0 | -A/0 | 0 | 0 | - | collateral borrows | 0 | 0 | 0 | 0 | - | collateral tokens | 0 | +T | -T | 0 | - | collateral reserves | 0 | | | | - |---------------------+--------+------------+----------+-------| - */ - - /* Pre */ - - // borrowed - uint256 exchangeRatePre = sinvoke exchangeRateStored(e0); - - uint256 cTokenCashPre = sinvoke getCash(e0); - uint256 liquidatorCashPre = sinvoke getCashOf(e0, liquidator); - uint256 borrowerCashPre = sinvoke getCashOf(e0, borrower); - uint256 otherCashPre = sinvoke getCashOf(e0, other); - - uint256 cTokenBorrowsPre = sinvoke totalBorrows(e0); - uint256 liquidatorBorrowsPre = sinvoke borrowBalanceStored(e0, liquidator); - uint256 borrowerBorrowsPre = sinvoke borrowBalanceStored(e0, borrower); - uint256 otherBorrowsPre = sinvoke borrowBalanceStored(e0, other); - - uint256 cTokenTokensPre = sinvoke totalSupply(e0); - uint256 liquidatorTokensPre = sinvoke balanceOf(e0, liquidator); - uint256 borrowerTokensPre = sinvoke balanceOf(e0, borrower); - uint256 otherTokensPre = sinvoke balanceOf(e0, other); - - uint256 cTokenReservesPre = sinvoke totalReserves(e0); - - // collateral - uint256 collateralExchangeRatePre = sinvoke exchangeRateStoredInOther(e0); - - uint256 collateralCashPre = sinvoke getCashInOther(e0); - uint256 liquidatorCollateralCashPre = sinvoke getCashOfInOther(e0, liquidator); - uint256 borrowerCollateralCashPre = sinvoke getCashOfInOther(e0, borrower); - uint256 otherCollateralCashPre = sinvoke getCashOfInOther(e0, other); - - uint256 collateralBorrowsPre = sinvoke totalBorrowsInOther(e0); - uint256 liquidatorCollateralBorrowsPre = sinvoke borrowBalanceStoredInOther(e0, liquidator); - uint256 borrowerCollateralBorrowsPre = sinvoke borrowBalanceStoredInOther(e0, borrower); - uint256 otherCollateralBorrowsPre = sinvoke borrowBalanceStoredInOther(e0, other); - - uint256 collateralTokensPre = sinvoke totalSupplyInOther(e0); - uint256 liquidatorCollateralTokensPre = sinvoke balanceOfInOther(e0, liquidator); - uint256 borrowerCollateralTokensPre = sinvoke balanceOfInOther(e0, borrower); - uint256 otherCollateralTokensPre = sinvoke balanceOfInOther(e0, other); - - uint256 collateralReservesPre = sinvoke totalReservesInOther(e0); - - // Just Do It - // Note: cTokenCollateral is linked via Compound.spclnk in order to support checking its balances - // not perfect since it only proves the balance sheet is safe for a particular token configuration - require result == invoke liquidateBorrowFreshPub(e1, liquidator, borrower, repayAmount); - bool liquidateBorrowFreshReverted = lastReverted; - - /* Post */ - - // borrowed - uint256 exchangeRatePost = sinvoke exchangeRateStored(e2); - - uint256 cTokenCashPost = sinvoke getCash(e2); - uint256 liquidatorCashPost = sinvoke getCashOf(e2, liquidator); - uint256 borrowerCashPost = sinvoke getCashOf(e2, borrower); - uint256 otherCashPost = sinvoke getCashOf(e2, other); - - uint256 cTokenBorrowsPost = sinvoke totalBorrows(e2); - uint256 liquidatorBorrowsPost = sinvoke borrowBalanceStored(e2, liquidator); - uint256 borrowerBorrowsPost = sinvoke borrowBalanceStored(e2, borrower); - uint256 otherBorrowsPost = sinvoke borrowBalanceStored(e2, other); - - uint256 cTokenTokensPost = sinvoke totalSupply(e2); - uint256 liquidatorTokensPost = sinvoke balanceOf(e2, liquidator); - uint256 borrowerTokensPost = sinvoke balanceOf(e2, borrower); - uint256 otherTokensPost = sinvoke balanceOf(e2, other); - - uint256 cTokenReservesPost = sinvoke totalReserves(e2); - - // collateral - uint256 collateralExchangeRatePost = sinvoke exchangeRateStoredInOther(e2); - - uint256 collateralCashPost = sinvoke getCashInOther(e2); - uint256 liquidatorCollateralCashPost = sinvoke getCashOfInOther(e2, liquidator); - uint256 borrowerCollateralCashPost = sinvoke getCashOfInOther(e2, borrower); - uint256 otherCollateralCashPost = sinvoke getCashOfInOther(e2, other); - - uint256 collateralBorrowsPost = sinvoke totalBorrowsInOther(e2); - uint256 liquidatorCollateralBorrowsPost = sinvoke borrowBalanceStoredInOther(e2, liquidator); - uint256 borrowerCollateralBorrowsPost = sinvoke borrowBalanceStoredInOther(e2, borrower); - uint256 otherCollateralBorrowsPost = sinvoke borrowBalanceStoredInOther(e2, other); - - uint256 collateralTokensPost = sinvoke totalSupplyInOther(e2); - uint256 liquidatorCollateralTokensPost = sinvoke balanceOfInOther(e2, liquidator); - uint256 borrowerCollateralTokensPost = sinvoke balanceOfInOther(e2, borrower); - uint256 otherCollateralTokensPost = sinvoke balanceOfInOther(e2, other); - - uint256 collateralReservesPost = sinvoke totalReservesInOther(e2); - - // Measure - bool staticBalance = - (exchangeRatePost == exchangeRatePre) && - (cTokenCashPost == cTokenCashPre) && - (cTokenBorrowsPost == cTokenBorrowsPre) && - (cTokenTokensPost == cTokenTokensPre) && - (cTokenReservesPost == cTokenReservesPre) && - (liquidatorCashPost == liquidatorCashPre) && - (liquidatorBorrowsPost == liquidatorBorrowsPre) && - (liquidatorTokensPost == liquidatorTokensPre) && - (borrowerCashPost == borrowerCashPre) && - (borrowerBorrowsPost == borrowerBorrowsPre) && - (borrowerTokensPost == borrowerTokensPre) && - (otherCashPost == otherCashPre) && - (otherBorrowsPost == otherBorrowsPre) && - (otherTokensPost == otherTokensPre) && - - (collateralExchangeRatePost == collateralExchangeRatePre) && - (collateralCashPost == collateralCashPre) && - (collateralBorrowsPost == collateralBorrowsPre) && - (collateralTokensPost == collateralTokensPre) && - (collateralReservesPost == collateralReservesPre) && - (liquidatorCollateralCashPost == liquidatorCollateralCashPre) && - (liquidatorCollateralBorrowsPost == liquidatorCollateralBorrowsPre) && - (liquidatorCollateralTokensPost == liquidatorCollateralTokensPre) && - (borrowerCollateralCashPost == borrowerCollateralCashPre) && - (borrowerCollateralBorrowsPost == borrowerCollateralBorrowsPre) && - (borrowerCollateralTokensPost == borrowerCollateralTokensPre) && - (otherCollateralCashPost == otherCollateralCashPre) && - (otherCollateralBorrowsPost == otherCollateralBorrowsPre) && - (otherCollateralTokensPost == otherCollateralTokensPre); - - bool dynamicBalance = - (repayAmount != 0) && - (exchangeRatePost == exchangeRatePre) && - (cTokenCashPost == cTokenCashPre + repayAmount) && - (cTokenBorrowsPost == cTokenBorrowsPre - repayAmount) && - (cTokenTokensPost == cTokenTokensPre) && - (cTokenReservesPost == cTokenReservesPre) && - (liquidatorCashPost == liquidatorCashPre - repayAmount) && - (liquidatorBorrowsPost == liquidatorBorrowsPre) && - (liquidatorTokensPost == liquidatorTokensPre) && - (borrowerCashPost == borrowerCashPre) && - (borrowerBorrowsPost == borrowerBorrowsPre - repayAmount) && - (borrowerTokensPost == borrowerTokensPre) && - (otherCashPost == otherCashPre) && - (otherBorrowsPost == otherBorrowsPre) && - (otherTokensPost == otherTokensPre) && - (borrowerCollateralCashPost == borrowerCollateralCashPre) && - - (collateralExchangeRatePost == collateralExchangeRatePre) && - (collateralCashPost == collateralCashPre) && - (collateralBorrowsPost == collateralBorrowsPre) && - (collateralTokensPost == collateralTokensPre) && - (collateralReservesPost == collateralReservesPre) && - (liquidatorCollateralCashPost == liquidatorCollateralCashPre || (borrowCashIsCollateralCash && liquidatorCollateralCashPost == liquidatorCollateralCashPre - repayAmount)) && - (liquidatorCollateralBorrowsPost == liquidatorCollateralBorrowsPre) && - (liquidatorCollateralTokensPost - liquidatorCollateralTokensPre == borrowerCollateralTokensPre - borrowerCollateralTokensPost) && - (borrowerCollateralCashPost == borrowerCollateralCashPre) && - (borrowerCollateralBorrowsPost == borrowerCollateralBorrowsPre) && - (otherCollateralCashPost == otherCollateralCashPre) && - (otherCollateralBorrowsPost == otherCollateralBorrowsPre) && - (otherCollateralTokensPost == otherCollateralTokensPre); - - - assert (!liquidateBorrowFreshReverted => - ((result != 0 || repayAmount == 0 || liquidator == borrower) <=> staticBalance)), "Mismatch in static case"; - assert (!liquidateBorrowFreshReverted => - ((result == 0 && repayAmount != 0 && liquidator != currentContract) <=> dynamicBalance)), "Mismatch in dynamic case"; -} - -seize(uint result, address liquidator, address borrower, uint256 seizeTokens) -description "Break seize" { - // Pre/action/post environments - env e0; - env e1; - env e2; - - require e1.block.number >= e0.block.number; - require e2.block.number >= e1.block.number; - - // Any other account - address other; - require other != liquidator && other != borrower && other != currentContract; - - /* - - no effect on exchange rate - |----------+--------+------------+----------+-------| - | | CToken | Liquidator | Borrower | Other | - |----------+--------+------------+----------+-------| - | cash | 0 | 0 | 0 | 0 | - | borrows | 0 | 0 | 0 | 0 | - | tokens | 0 | +T | -T | 0 | - | reserves | 0 | | | | - |----------+--------+------------+----------+-------| - */ - - /* Pre */ - - uint256 exchangeRatePre = sinvoke exchangeRateStored(e0); - - uint256 cTokenCashPre = sinvoke getCash(e0); - uint256 liquidatorCashPre = sinvoke getCashOf(e0, liquidator); - uint256 borrowerCashPre = sinvoke getCashOf(e0, borrower); - uint256 otherCashPre = sinvoke getCashOf(e0, other); - - uint256 cTokenBorrowsPre = sinvoke totalBorrows(e0); - uint256 liquidatorBorrowsPre = sinvoke borrowBalanceStored(e0, liquidator); - uint256 borrowerBorrowsPre = sinvoke borrowBalanceStored(e0, borrower); - uint256 otherBorrowsPre = sinvoke borrowBalanceStored(e0, other); - - uint256 cTokenTokensPre = sinvoke totalSupply(e0); - uint256 liquidatorTokensPre = sinvoke balanceOf(e0, liquidator); - uint256 borrowerTokensPre = sinvoke balanceOf(e0, borrower); - uint256 otherTokensPre = sinvoke balanceOf(e0, other); - - uint256 cTokenReservesPre = sinvoke totalReserves(e0); - - // Just Do It - require result == invoke seize(e1, liquidator, borrower, seizeTokens); - bool seizeReverted = lastReverted; - - /* Post */ - - uint256 exchangeRatePost = sinvoke exchangeRateStored(e2); - - uint256 cTokenCashPost = sinvoke getCash(e2); - uint256 liquidatorCashPost = sinvoke getCashOf(e2, liquidator); - uint256 borrowerCashPost = sinvoke getCashOf(e2, borrower); - uint256 otherCashPost = sinvoke getCashOf(e2, other); - - uint256 cTokenBorrowsPost = sinvoke totalBorrows(e2); - uint256 liquidatorBorrowsPost = sinvoke borrowBalanceStored(e2, liquidator); - uint256 borrowerBorrowsPost = sinvoke borrowBalanceStored(e2, borrower); - uint256 otherBorrowsPost = sinvoke borrowBalanceStored(e2, other); - - uint256 cTokenTokensPost = sinvoke totalSupply(e2); - uint256 liquidatorTokensPost = sinvoke balanceOf(e2, liquidator); - uint256 borrowerTokensPost = sinvoke balanceOf(e2, borrower); - uint256 otherTokensPost = sinvoke balanceOf(e2, other); - - uint256 cTokenReservesPost = sinvoke totalReserves(e2); - - // Measure - bool staticBalance = - (exchangeRatePost == exchangeRatePre) && - (cTokenCashPost == cTokenCashPre) && - (cTokenBorrowsPost == cTokenBorrowsPre) && - (cTokenTokensPost == cTokenTokensPre) && - (cTokenReservesPost == cTokenReservesPre) && - (liquidatorCashPost == liquidatorCashPre) && - (liquidatorBorrowsPost == liquidatorBorrowsPre) && - (liquidatorTokensPost == liquidatorTokensPre) && - (borrowerCashPost == borrowerCashPre) && - (borrowerBorrowsPost == borrowerBorrowsPre) && - (borrowerTokensPost == borrowerTokensPre) && - (otherCashPost == otherCashPre) && - (otherBorrowsPost == otherBorrowsPre) && - (otherTokensPost == otherTokensPre); - - bool dynamicBalance = - (seizeTokens != 0) && - (exchangeRatePost == exchangeRatePre) && - (cTokenCashPost == cTokenCashPre) && - (cTokenBorrowsPost == cTokenBorrowsPre) && - (cTokenTokensPost == cTokenTokensPre) && - (cTokenReservesPost == cTokenReservesPre) && - (liquidatorCashPost == liquidatorCashPre) && - (liquidatorBorrowsPost == liquidatorBorrowsPre) && - (liquidatorTokensPost == liquidatorTokensPre + seizeTokens) && - (borrowerCashPost == borrowerCashPre) && - (borrowerBorrowsPost == borrowerBorrowsPre) && - (borrowerTokensPost == borrowerTokensPre - seizeTokens) && - (otherCashPost == otherCashPre) && - (otherBorrowsPost == otherBorrowsPre) && - (otherTokensPost == otherTokensPre); - - assert (!seizeReverted => - ((result != 0 || seizeTokens == 0 || liquidator == borrower) <=> staticBalance)), "Mismatch in static case"; - assert (!seizeReverted => - ((result == 0 && seizeTokens != 0) <=> dynamicBalance)), "Mismatch in dynamic case"; -} \ No newline at end of file diff --git a/spec/certora/CErc20/mintAndRedeemFresh.cvl b/spec/certora/CErc20/mintAndRedeemFresh.cvl deleted file mode 100644 index 0cb927711..000000000 --- a/spec/certora/CErc20/mintAndRedeemFresh.cvl +++ /dev/null @@ -1,244 +0,0 @@ - -mintFresh(uint result, address minter, uint256 mintAmount, uint256 mintTokens) -description "Break mint with result=$result minter=$minter mintAmount=$mintAmount" { - // Pre/action/post environments - env e0; - env e1; - env e2; - - require e1.block.number >= e0.block.number; - require e2.block.number >= e1.block.number; - - // Any other account - address other; - require other != minter && other != currentContract; - require minter != currentContract; - - /* - - exchange rate should not change - - errors should have no effect - - no *other* storage should change - XXX can we specify this? - - |----------+--------+--------+-------| - | | CToken | Minter | Other | - |----------+--------+--------+-------| - | cash | +A | -A | 0 | - | borrows | 0 | 0 | 0 | - | tokens | +T | +T | 0 | - | reserves | 0 | | | - |----------+--------+--------+-------| - */ - - /* Pre */ - - uint256 exchangeRatePre = sinvoke exchangeRateStored(e0); - - uint256 cTokenCashPre = sinvoke getCash(e0); - uint256 minterCashPre = sinvoke getCashOf(e0, minter); - uint256 otherCashPre = sinvoke getCashOf(e0, other); - - uint256 cTokenBorrowsPre = sinvoke totalBorrows(e0); - uint256 minterBorrowsPre = sinvoke borrowBalanceStored(e0, minter); - uint256 otherBorrowsPre = sinvoke borrowBalanceStored(e0, other); - - uint256 cTokenTokensPre = sinvoke totalSupply(e0); - uint256 minterTokensPre = sinvoke balanceOf(e0, minter); - uint256 otherTokensPre = sinvoke balanceOf(e0, other); - - uint256 cTokenReservesPre = sinvoke totalReserves(e0); - - uint256 cTokenSupplyPre = cTokenCashPre + cTokenBorrowsPre - cTokenReservesPre; // XXX - - // A few constraints - /* require cTokenBorrowsPre == 0; // XXX */ - /* require cTokenSupplyPre >= 0; // XXX shouldn't be necessary, should underflow */ - /* require cTokenTokensPre > 0; // XXX shouldn't be necessary */ - //require exchangeRatePre == 2000000000000000000; // XXX - /* require exchangeRatePre * cTokenTokensPre == cTokenSupplyPre; // XXX */ - require minterTokensPre + otherTokensPre <= cTokenTokensPre; // XXX shouldn't be necessary, though weird - /* require mintAmount == mintTokens * exchangeRatePre; */ - - // Just do it - require result == invoke mintFreshPub(e1, minter, mintAmount); - bool mintFreshReverted = lastReverted; - - /* Post */ - - uint256 exchangeRatePost = sinvoke exchangeRateStored(e2); - - uint256 cTokenCashPost = sinvoke getCash(e2); - uint256 minterCashPost = sinvoke getCashOf(e2, minter); - uint256 otherCashPost = sinvoke getCashOf(e2, other); - - uint256 cTokenBorrowsPost = sinvoke totalBorrows(e2); - uint256 minterBorrowsPost = sinvoke borrowBalanceStored(e2, minter); - uint256 otherBorrowsPost = sinvoke borrowBalanceStored(e2, other); - - uint256 cTokenTokensPost = sinvoke totalSupply(e2); - uint256 minterTokensPost = sinvoke balanceOf(e2, minter); - uint256 otherTokensPost = sinvoke balanceOf(e2, other); - - uint256 cTokenReservesPost = sinvoke totalReserves(e2); - - // Measure - bool staticBalance = - /* (exchangeRatePost == exchangeRatePre) && */ - (cTokenCashPost == cTokenCashPre) && - (cTokenBorrowsPost == cTokenBorrowsPre) && - (cTokenTokensPost == cTokenTokensPre) && - (cTokenReservesPost == cTokenReservesPre) && - (minterCashPost == minterCashPre) && - (minterBorrowsPost == minterBorrowsPre) && - (minterTokensPost == minterTokensPre) && - (otherCashPost == otherCashPre) && - (otherBorrowsPost == otherBorrowsPre) && - (otherTokensPost == otherTokensPre); - - bool dynamicBalance = - (mintAmount != 0) && - /* (exchangeRatePost >= exchangeRatePre) && // XXX ugh */ - (cTokenCashPost == cTokenCashPre + mintAmount) && - (cTokenBorrowsPost == cTokenBorrowsPre) && - //XXX(cTokenTokensPost == cTokenTokensPre + mintTokens) && - (cTokenReservesPost == cTokenReservesPre) && - (minterCashPost == minterCashPre - mintAmount) && - (minterBorrowsPost == minterBorrowsPre) && - //XXX(minterTokensPost == minterTokensPre + mintTokens) && - (otherCashPost == otherCashPre) && - (otherBorrowsPost == otherBorrowsPre) && - (otherTokensPost == otherTokensPre); - - assert (!mintFreshReverted => - ((result != 0 || mintAmount == 0) <=> staticBalance)), "Mismatch in static case"; - assert (!mintFreshReverted => - ((result == 0 && mintAmount != 0) <=> dynamicBalance)), "Mismatch in dynamic case"; -} - -redeemFresh(uint result, address redeemer, uint256 redeemAmount, uint256 redeemTokens) -description "Break redeem with result=$result redeemer=$redeemer redeemAmount=$redeemAmount" { - // Pre/action/post environments - env e0; - env e1; - env e2; - - require e1.block.number >= e0.block.number; - require e2.block.number >= e1.block.number; - - // Any other account - address other; - require other != redeemer && other != currentContract; - require redeemer != currentContract; - - /* - - exchange rate should not change - - errors should have no effect - - no *other* storage should change - XXX can we specify this? - - |----------+--------+----------+-------| - | | CToken | Redeemer | Other | - |----------+--------+----------+-------| - | cash | -A | +A | 0 | - | borrows | 0 | 0 | 0 | - | tokens | -T | -T | 0 | - | reserves | 0 | | | - |----------+--------+----------+-------| - */ - - /* Pre */ - - uint256 exchangeRatePre = sinvoke exchangeRateStored(e0); - - uint256 cTokenCashPre = sinvoke getCash(e0); - uint256 redeemerCashPre = sinvoke getCashOf(e0, redeemer); - uint256 otherCashPre = sinvoke getCashOf(e0, other); - - uint256 cTokenBorrowsPre = sinvoke totalBorrows(e0); - uint256 redeemerBorrowsPre = sinvoke borrowBalanceStored(e0, redeemer); - uint256 otherBorrowsPre = sinvoke borrowBalanceStored(e0, other); - - uint256 cTokenTokensPre = sinvoke totalSupply(e0); - uint256 redeemerTokensPre = sinvoke balanceOf(e0, redeemer); - uint256 otherTokensPre = sinvoke balanceOf(e0, other); - - uint256 cTokenReservesPre = sinvoke totalReserves(e0); - - uint256 cTokenSupplyPre = cTokenCashPre + cTokenBorrowsPre - cTokenReservesPre; // XXX - - // Just do it - require result == invoke redeemFreshPub(e1, redeemer, 0, redeemAmount); - bool redeemFreshReverted = lastReverted; - - /* Post */ - - uint256 exchangeRatePost = sinvoke exchangeRateStored(e2); - - uint256 cTokenCashPost = sinvoke getCash(e2); - uint256 redeemerCashPost = sinvoke getCashOf(e2, redeemer); - uint256 otherCashPost = sinvoke getCashOf(e2, other); - - uint256 cTokenBorrowsPost = sinvoke totalBorrows(e2); - uint256 redeemerBorrowsPost = sinvoke borrowBalanceStored(e2, redeemer); - uint256 otherBorrowsPost = sinvoke borrowBalanceStored(e2, other); - - uint256 cTokenTokensPost = sinvoke totalSupply(e2); - uint256 redeemerTokensPost = sinvoke balanceOf(e2, redeemer); - uint256 otherTokensPost = sinvoke balanceOf(e2, other); - - uint256 cTokenReservesPost = sinvoke totalReserves(e2); - - // Measure - bool staticBalance = - /* (exchangeRatePost == exchangeRatePre) && */ - (cTokenCashPost == cTokenCashPre) && - (cTokenBorrowsPost == cTokenBorrowsPre) && - (cTokenTokensPost == cTokenTokensPre) && - (cTokenReservesPost == cTokenReservesPre) && - (redeemerCashPost == redeemerCashPre) && - (redeemerBorrowsPost == redeemerBorrowsPre) && - (redeemerTokensPost == redeemerTokensPre) && - (otherCashPost == otherCashPre) && - (otherBorrowsPost == otherBorrowsPre) && - (otherTokensPost == otherTokensPre); - - bool dynamicBalance = - (redeemAmount != 0) && - /* (exchangeRatePost >= exchangeRatePre) && // XXX ugh */ - (cTokenCashPost == cTokenCashPre - redeemAmount) && - (cTokenBorrowsPost == cTokenBorrowsPre) && - //XXX(cTokenTokensPost == cTokenTokensPre - redeemTokens) && - (cTokenReservesPost == cTokenReservesPre) && - (redeemerCashPost == redeemerCashPre + redeemAmount) && - (redeemerBorrowsPost == redeemerBorrowsPre) && - //XXX(redeemerTokensPost == redeemerTokensPre - redeemTokens) && - (otherCashPost == otherCashPre) && - (otherBorrowsPost == otherBorrowsPre) && - (otherTokensPost == otherTokensPre); - - assert (!redeemFreshReverted => - ((result != 0 || redeemAmount == 0) <=> staticBalance)), "Mismatch in static case"; - assert (!redeemFreshReverted => - ((result == 0 && redeemAmount != 0) <=> dynamicBalance)), "Mismatch in dynamic case"; -} - -mintThenRedeem(address account, uint256 amountUnderlying) -description "Mint and redeem are not inverses for account $account, amount $amountUnderlying" -{ - env e0; - - uint origCash = sinvoke getCash(e0); - - // both calls are "fresh" - uint mintResult = invoke mintFreshPub(e0, account, amountUnderlying); - bool mintReverted = lastReverted; - - uint redeemResult = invoke redeemFreshPub(e0, account, 0, amountUnderlying); - bool redeemReverted = lastReverted; - - uint newCash = sinvoke getCash(e0); - - assert (mintResult == 0 && !mintReverted && redeemResult == 0 && !redeemReverted) => newCash == origCash; - - // check that exchange rate is the same, check all the 4 variables that affect the exchange rate are retained. - // check that accounts balances are the same. - // the only thing that changes is the interest index. rounding errors. -} diff --git a/spec/certora/CErc20/rounding.cvl b/spec/certora/CErc20/rounding.cvl deleted file mode 100644 index 180ea78ef..000000000 --- a/spec/certora/CErc20/rounding.cvl +++ /dev/null @@ -1,29 +0,0 @@ - -rule redeemRounding(uint256 redeemTokensIn, uint256 redeemAmountIn) -description "Redeemer can withdraw tokens for free" { - env e0; - env e1; - require e1.block.number >= e0.block.number; - - uint256 exchangeRate = sinvoke exchangeRateStored(e0); - require exchangeRate > 0; - uint256 redeemTokens = redeemAmountIn / exchangeRate / 1000000000000000000; - uint256 redeemAmount = redeemTokensIn * exchangeRate / 1000000000000000000; - bool tokensTruncated = redeemAmountIn > 0 && redeemTokens == 0; - bool amountTruncated = redeemTokensIn > 0 && redeemAmount == 0; - - address redeemer = e0.msg.sender; - - uint256 preTokens = sinvoke balanceOf(e0, redeemer); - uint256 preCash = sinvoke getCash(e0); - - uint256 error = sinvoke redeemFreshPub(e0, redeemer, redeemTokensIn, redeemAmountIn); - bool redeemReverted = lastReverted; - bool redeemSucceeded = !redeemReverted && error == 0; - - uint256 postTokens = sinvoke balanceOf(e1, redeemer); - uint256 postCash = sinvoke getCash(e1); - - assert (redeemSucceeded => (!tokensTruncated <=> (postCash < preCash => postTokens < preTokens))), "Cash decreased but redeemer tokens did not"; - assert (redeemSucceeded => (!amountTruncated <=> (postTokens < preTokens => postCash < preCash))), "Redeemer tokens decreased but cash did not"; -} \ No newline at end of file diff --git a/spec/certora/CErc20Delegator b/spec/certora/CErc20Delegator deleted file mode 120000 index 639e88c87..000000000 --- a/spec/certora/CErc20Delegator +++ /dev/null @@ -1 +0,0 @@ -CErc20 \ No newline at end of file diff --git a/spec/certora/Comp/search.cvl b/spec/certora/Comp/search.cvl deleted file mode 100644 index a3b43bded..000000000 --- a/spec/certora/Comp/search.cvl +++ /dev/null @@ -1,23 +0,0 @@ -binarySearch(address account, uint blockNumber, uint futureBlock) { - env e0; - require e0.msg.value == 0; - require blockNumber < e0.block.number; - require futureBlock >= e0.block.number; - - uint nCheckpoints; - require nCheckpoints <= 4; - require invoke numCheckpoints(e0, account) == nCheckpoints; - - require invoke certoraOrdered(e0, account); - - invoke getPriorVotes(e0, account, futureBlock); - assert lastReverted, "Must revert for future blocks"; - - uint votesLinear = invoke certoraScan(e0, account, blockNumber); - assert !lastReverted, "Linear scan should not revert for any valid block number"; - - uint votesBinary = invoke getPriorVotes(e0, account, blockNumber); - assert !lastReverted, "Query should not revert for any valid block number"; - - assert votesLinear == votesBinary, "Linear search and binary search disagree"; -} diff --git a/spec/certora/Comp/transfer.cvl b/spec/certora/Comp/transfer.cvl deleted file mode 100644 index 0cb38fd95..000000000 --- a/spec/certora/Comp/transfer.cvl +++ /dev/null @@ -1,44 +0,0 @@ -transferDelegates(address src, address dst, uint amount) { - env e0; - env e1; - require e1.block.number > e0.block.number; - - address srcRep = sinvoke delegates(e0, src); - address dstRep = sinvoke delegates(e0, dst); - - uint srcBalancePrior = sinvoke balanceOf(e0, src); - uint dstBalancePrior = sinvoke balanceOf(e0, dst); - - uint srcVotesPrior = sinvoke getCurrentVotes(e0, srcRep); - uint dstVotesPrior = sinvoke getCurrentVotes(e0, dstRep); - - // Bound the number of checkpoints to prevent solver timeout / unwinding assertion violation - uint32 nCheckpoints; - require nCheckpoints == 1; // XXX - require invoke numCheckpoints(e0, srcRep) == nCheckpoints && invoke numCheckpoints(e0, dstRep) == nCheckpoints; - - // Ensure the checkpoints are sane - require sinvoke certoraOrdered(e0, src); - require sinvoke certoraOrdered(e0, dst); - require srcVotesPrior >= srcBalancePrior; - require dstVotesPrior >= dstBalancePrior; - - require amount <= 79228162514264337593543950335; // UInt96 Max - bool didTransfer = invoke transferFrom(e0, src, dst, amount); - bool transferReverted = lastReverted; - assert didTransfer || transferReverted, "Transfer either succeeds or reverts"; - - uint srcBalancePost = sinvoke balanceOf(e1, src); - uint dstBalancePost = sinvoke balanceOf(e1, dst); - assert !transferReverted => ( - (src != dst) => ((dstBalancePost == dstBalancePrior + amount) && (srcBalancePost == srcBalancePrior - amount)) && - (src == dst) => ((dstBalancePost == dstBalancePrior) && (srcBalancePost == srcBalancePrior)) - ), "Transfers right amount"; - - uint srcVotesPost = sinvoke getCurrentVotes(e1, srcRep); - uint dstVotesPost = sinvoke getCurrentVotes(e1, dstRep); - - assert (srcRep == 0 && dstRep != 0 && !transferReverted) => (dstVotesPost == dstVotesPrior + amount), "Votes are created from the abyss"; - assert (srcRep != 0 && dstRep == 0 && !transferReverted) => (srcVotesPost + amount == srcVotesPrior), "Votes are destroyed into the abyss"; - assert (srcRep != 0 && dstRep != 0) => (srcVotesPrior + dstVotesPrior == srcVotesPost + dstVotesPost), "Votes are neither created nor destroyed"; -} \ No newline at end of file diff --git a/spec/certora/Comptroller/comptroller.cvl b/spec/certora/Comptroller/comptroller.cvl deleted file mode 100644 index f1c0befd0..000000000 --- a/spec/certora/Comptroller/comptroller.cvl +++ /dev/null @@ -1,157 +0,0 @@ -_setPendingAdmin(address currentAdmin, address currentPendingAdmin, address newPendingAdmin) -description "Failed to set new pending admin $currentPendingAdmin to $newPendingAdmin (admin=$currentAdmin)" -{ - // Free Variables - env e0; - env e1; - env e2; - - require currentAdmin == sinvoke admin(e0); - require currentPendingAdmin == sinvoke pendingAdmin(e0); - - // Invoke set new pending admin - uint256 result = sinvoke _setPendingAdmin(e1, newPendingAdmin); - - // pendingAdmin changes <=> msg.sender == currentAdmin - assert ( - ( - e1.msg.sender == currentAdmin && - result == 0 && - sinvoke pendingAdmin(e2) == newPendingAdmin - ) - || - ( - e1.msg.sender != currentAdmin && - result != 0 && - sinvoke pendingAdmin(e2) == currentPendingAdmin - ) - ); -} - -_acceptAdmin(address currentAdmin, address currentPendingAdmin, address newAdmin, address newPendingAdmin) -description "Failed to accept pending admin currentAdmin=$currentAdmin, currentPendingAdmin=$currentPendingAdmin, newPendingAdmin=$newPendingAdmin, newAdmin=$newAdmin" -{ - // Free Variables - env e0; - env e1; - env e2; - - require currentAdmin == sinvoke admin(e0); - require currentPendingAdmin == sinvoke pendingAdmin(e0); - - // Invoke accept admin - uint256 result = sinvoke _acceptAdmin(e1); - - require newAdmin == sinvoke admin(e2); - require newPendingAdmin == sinvoke pendingAdmin(e2); - - // admin == pendingAdmin <=> msg.sender == pendingAdmin - assert ( - ( - e1.msg.sender == currentPendingAdmin && - currentPendingAdmin != 0 && - result == 0 && - newAdmin == currentPendingAdmin && - newPendingAdmin == 0 - ) - || - ( - ( - e1.msg.sender != currentPendingAdmin || - currentPendingAdmin == 0 - ) && - result != 0 && - newAdmin == currentAdmin && - newPendingAdmin == currentPendingAdmin - ) - ); -} - -// Invariant: To change admin or currentPendingAdmin, must come from current admin -invariantRequireAdminToChangeAdmin(address caller, address currentAdmin, address currentPendingAdmin, address desiredAdmin, address newAdmin, address newPendingAdmin) - description "Failed to prove that required to be admin to change admin (caller=$caller, currentAdmin=$currentAdmin, currentPendingAdmin=$currentPendingAdmin, desiredAdmin=$desiredAdmin, newAdmin=$newAdmin, newPendingAdmin=$newPendingAdmin)" -{ - // Free Variables - env e0; - env e1; - env e2; - env e3; - - require currentAdmin == sinvoke admin(e0); - require currentPendingAdmin == sinvoke pendingAdmin(e0); - - // Start with a zero admin - require currentPendingAdmin == 0; - - require caller == e1.msg.sender; - - // Invoke set new pending admin - uint256 result0 = sinvoke _setPendingAdmin(e1, desiredAdmin); - uint256 result1 = sinvoke _acceptAdmin(e2); - - require newAdmin == sinvoke admin(e3); - require newPendingAdmin == sinvoke pendingAdmin(e3); - - assert ( - e1.msg.sender == currentAdmin || - ( - newAdmin == currentAdmin && - newPendingAdmin == currentPendingAdmin - ) - ); -} - -_setComptroller(address desiredComptroller) -description "Failed to set comptroller: result=$result (currAdmin=$currAdmin, currComptroller=$currComptroller, desiredComptroller=$desiredComptroller, nextComptroller=$nextComptroller)" { - - // Free Variables - env e0; - env e_set; - env e1; - env e_accept; - env e2; - - address currAdmin = sinvoke admin(e0); - address currComptroller = sinvoke comptrollerImplementation(e0); - - // Step 1: Invoke set new pending comptroller - uint256 result_set = sinvoke _setPendingImplementation(e1,desiredComptroller); - - // Results and checks: - address updated_pending = sinvoke pendingComptrollerImplementation(e1); - assert (result_set == 0 <=> (e1.msg.sender == currAdmin && desiredComptroller == updated_pending)), "Mismatch in success case: result of setting pending implementation ${result_set}. Sent by ${e1.msg.sender}, current admin ${currAdmin}, wanted to set to ${desiredComptroller} with updated pending comptroller implementation is ${updated_pending}."; - assert (result_set == 1 <=> e1.msg.sender != currAdmin), "Mismatch in unauthorized case: result is ${result_set} and sender is ${e1.msg.sender} when current admin is ${currAdmin}."; - - // Step 2: Invoke accept new comptroller - uint256 result_accept = sinvoke _acceptImplementation(e_accept, desiredComptroller); - - // Results and checks: - address nextComptroller = sinvoke comptrollerImplementation(e2); - address finalPendingComptroller = sinvoke pendingComptrollerImplementation(e2); - - // if succeeded setting: nextComptroller == desiredComptroller <=> msg.sender == desiredComptroller - assert result_set == 0 => - (result_accept == 0 <=> - (e_accept.msg.sender == desiredComptroller && - nextComptroller == desiredComptroller && - nextComptroller != 0 && // Cannot set new comptroller to 0 - finalPendingComptroller == 0)), - "If setting pending implementation succeeded, accept will succeed (got ${result_accept}) only if desired comptroller $desiredComptroller sent the request (sent by ${e_accept.msg.sender}, and set next comptroller as ${nextComptroller}"; - assert result_set == 0 => - (result_accept == 1 <=> - ((e_accept.msg.sender != desiredComptroller || desiredComptroller == 0) && // fails if bad sender, or trying to effectively erase desired comptroller - nextComptroller == currComptroller && - finalPendingComptroller == desiredComptroller)), - "If setting pending implementation succeeded, will fail with unauthorized (got ${result_accept}) only if different implementation tried to accept on behalf of ${desiredComptroller} (sent by ${e_accept.msg.sender}) and did not change the next comptroller: ${nextComptroller} from current one ${currComptroller}."; -} - -rule mustEnterMarkets(address cToken, address borrower, uint256 borrowAmount) { - env e0; - - bool inMarketPre = sinvoke checkMembership(e0, borrower, cToken); - bool canBorrow = sinvoke borrowAllowed(e0, cToken, borrower, borrowAmount) == 0; - bool inMarketPost = sinvoke checkMembership(e0, borrower, cToken); - // We used to require you to be in the market to borrow, now trying to borrow will enter - // assert canBorrow => inMarketPre, "Must be in market before being allowed to borrow"; - assert canBorrow => inMarketPost, "Must be in market if allowed to borrow"; - } diff --git a/spec/certora/Governor/alpha.cvl b/spec/certora/Governor/alpha.cvl deleted file mode 100644 index cc87171d5..000000000 --- a/spec/certora/Governor/alpha.cvl +++ /dev/null @@ -1,123 +0,0 @@ -validStatesAndTransitions(env e0, env e1) { - // Possible states - uint PENDING = 0; - uint ACTIVE = 1; - uint CANCELED = 2; - uint DEFEATED = 3; - uint SUCCEEDED = 4; - uint QUEUED = 5; - uint EXPIRED = 6; - uint EXECUTED = 7; - - uint proposalId = sinvoke certoraPropose(e0); - - uint startBlock = invoke certoraProposalStart(e0, proposalId); - uint endBlock = invoke certoraProposalEnd(e0, proposalId); - uint state = invoke certoraProposalState(e0, proposalId); - - // XXX simulate calling any other (sequence of?) functions in between? - // do more specific paths of transitions based on this sequence? - - uint startBlockNext = invoke certoraProposalStart(e1, proposalId); - uint endBlockNext = invoke certoraProposalEnd(e1, proposalId); - uint stateNext = invoke certoraProposalState(e1, proposalId); - - require e1.block.number == e0.block.number + 1; - assert startBlockNext == startBlock, "Start block may not change"; - assert endBlockNext == endBlock, "End block may not change"; - - // Possibilities based on time - - assert (e0.block.number <= startBlock) => ( - state == CANCELED || - state == PENDING - ), "Prior to voting, may only be pending or canceled"; - - assert (e0.block.number > startBlock && e0.block.number <= endBlock) => ( - state == CANCELED || - state == ACTIVE - ), "During voting, may only be active or canceled"; - - assert (e0.block.number > endBlock) => ( - state == CANCELED || - state == DEFEATED || - state == SUCCEEDED || - state == QUEUED || - state == EXPIRED || - state == EXECUTED - ), "After voting, must be in a viable state"; - - // Allowed transitions - - assert (state == PENDING) => ( - (stateNext == CANCELED) || - (stateNext == ACTIVE && e1.block.number > startBlock) || - (stateNext == PENDING) - ), "From pending, must either become canceled, active, or remain pending"; - - assert (state == ACTIVE) => ( - (stateNext == CANCELED) || - (( - stateNext == DEFEATED || - stateNext == SUCCEEDED || - stateNext == QUEUED || - stateNext == EXPIRED || - stateNext == EXECUTED - ) && e1.block.number > endBlock) || - (stateNext == ACTIVE) - ), "From active, must either become canceled, a viable next statem or remain active"; - - assert (state == CANCELED) => (stateNext == CANCELED), "Once canceled, always canceled"; - - assert (state == DEFEATED) => ( - stateNext == CANCELED || - stateNext == DEFEATED - ), "From defeated, must either become canceled, or remain defeated"; - - assert (state == SUCCEEDED) => ( - stateNext == CANCELED || - stateNext == QUEUED || - stateNext == SUCCEEDED - ), "From succeeded, must either become canceled, queued, or remain expired"; - - assert (state == QUEUED) => ( - stateNext == CANCELED || - stateNext == EXPIRED || - stateNext == EXECUTED || - stateNext == QUEUED - ), "From queued, must either become canceled, expired, executed, or remain queued"; - - assert (state == EXPIRED) => ( - stateNext == CANCELED || - stateNext == EXPIRED - ), "From expired, must either become canceled, or remain expired"; - - assert (state == EXECUTED) => (stateNext == EXECUTED), "Once executed, always executed"; -} - -voteOnce(uint proposalId, bool support) { - env e0; - env e1; - require e0.msg.sender == e1.msg.sender; - - invoke castVote(e0, proposalId, support); - bool firstVoteReverted = lastReverted; - - invoke castVote(e1, proposalId, support); - bool secondVoteReverted = lastReverted; - - assert !firstVoteReverted => secondVoteReverted, "Second vote succeeded after first"; -} - -votesSum(uint proposalId, bool support, address voterA, address voterB) { - // XXX I guess we can't really havoc proposalId? - env e0; - env e1; - require e0.msg.sender == voterA; - require e1.msg.sender == voterB; - - sinvoke castVote(e0, proposalId, support); - sinvoke castVote(e1, proposalId, support); - - assert true; // XXX Shh -} \ No newline at end of file diff --git a/spec/certora/Governor/state.cvl b/spec/certora/Governor/state.cvl deleted file mode 100644 index 59417e194..000000000 --- a/spec/certora/Governor/state.cvl +++ /dev/null @@ -1,118 +0,0 @@ -validStatesAndTransitions() { - // Possible states - uint PENDING = 0; - uint ACTIVE = 1; - uint CANCELED = 2; - uint DEFEATED = 3; - uint SUCCEEDED = 4; - uint QUEUED = 5; - uint EXPIRED = 6; - uint EXECUTED = 7; - - env e0; - env e1; - require e1.block.number == e0.block.number + 1; - require e1.block.timestamp > e0.block.timestamp; - require e1.block.timestamp - e0.block.timestamp < sinvoke certoraTimelockGracePeriod(e0); - require sinvoke certoraTimelockDelay(e0) > 0; - - // XXX cannot propose - /* uint proposalId = sinvoke certoraPropose(e0); */ - /* require invoke certoraProposalLength(e0, proposalId) <= 5; */ - uint proposalId; - uint nProposals = sinvoke proposalCount(e0); - require proposalId < nProposals; - - // Ensure the executed flag is not (arbitrarily) set if eta has not been set yet - require sinvoke certoraProposalEta(e0, proposalId) == 0 => !sinvoke certoraProposalExecuted(e0, proposalId); - - uint startBlock = sinvoke certoraProposalStart(e0, proposalId); - uint endBlock = sinvoke certoraProposalEnd(e0, proposalId); - uint stateNow = sinvoke certoraProposalState(e0, proposalId); - require startBlock < endBlock; // i.e. votingPeriod > 0 - - // Do something - method fun1; calldataarg arg1; - invoke fun1(e0, arg1); - - // Do something else - // XXX takes days to run, but catches violations in queue-execute - // but also thinks timelock delay = 0 according to output report - /* method fun2; calldataarg arg2; */ - /* invoke fun2(e0, arg2); */ - - uint startBlockNext = sinvoke certoraProposalStart(e1, proposalId); - uint endBlockNext = sinvoke certoraProposalEnd(e1, proposalId); - uint stateNext = sinvoke certoraProposalState(e1, proposalId); - - assert startBlockNext == startBlock, "Start block may not change"; - assert endBlockNext == endBlock, "End block may not change"; - - // Possibilities based on time - - assert (e0.block.number <= startBlock) => ( - stateNow == CANCELED || - stateNow == PENDING - ), "Prior to voting, may only be pending or canceled"; - - assert (e0.block.number > startBlock && e0.block.number <= endBlock) => ( - stateNow == CANCELED || - stateNow == ACTIVE - ), "During voting, may only be active or canceled"; - - assert (e0.block.number > endBlock) => ( - stateNow == CANCELED || - stateNow == DEFEATED || - stateNow == SUCCEEDED || - stateNow == QUEUED || - stateNow == EXPIRED || - stateNow == EXECUTED - ), "After voting, must be in a viable state"; - - /* // Allowed transitions */ - - assert (stateNow == PENDING) => ( - (stateNext == CANCELED) || - (stateNext == ACTIVE && e1.block.number > startBlock) || - (stateNext == PENDING) - ), "From pending, must either become canceled, active, or remain pending"; - - assert (stateNow == ACTIVE) => ( - (stateNext == CANCELED) || - (( - stateNext == DEFEATED || - stateNext == SUCCEEDED || - stateNext == QUEUED || - stateNext == EXPIRED || - stateNext == EXECUTED - ) && e1.block.number > endBlock) || - (stateNext == ACTIVE) - ), "From active, must either become canceled, a viable next statem or remain active"; - - assert (stateNow == CANCELED) => (stateNext == CANCELED), "Once canceled, always canceled"; - - assert (stateNow == DEFEATED) => ( - stateNext == CANCELED || - stateNext == DEFEATED - ), "From defeated, must either become canceled, or remain defeated"; - - assert (stateNow == SUCCEEDED) => ( - stateNext == CANCELED || - stateNext == QUEUED || - stateNext == SUCCEEDED - ), "From succeeded, must either become canceled, queued, or remain succeeded"; - - assert (stateNow == QUEUED) => ( - stateNext == CANCELED || - stateNext == EXPIRED || - stateNext == EXECUTED || - stateNext == QUEUED - ), "From queued, must either become canceled, expired, executed, or remain queued"; - - assert (stateNow == EXPIRED) => ( - stateNext == CANCELED || - stateNext == EXPIRED - ), "From expired, must either become canceled, or remain expired"; - - assert (stateNow == EXECUTED) => (stateNext == EXECUTED), "Once executed, always executed"; -} diff --git a/spec/certora/Governor/votes.cvl b/spec/certora/Governor/votes.cvl deleted file mode 100644 index 937ccc578..000000000 --- a/spec/certora/Governor/votes.cvl +++ /dev/null @@ -1,43 +0,0 @@ -voteOnce(uint proposalId, bool support) { - env e0; - env e1; - require e0.msg.sender == e1.msg.sender; - - uint nProposals = sinvoke proposalCount(e0); - require proposalId < nProposals; - - invoke castVote(e0, proposalId, support); - bool firstVoteReverted = lastReverted; - - invoke castVote(e1, proposalId, support); - bool secondVoteReverted = lastReverted; - - assert !firstVoteReverted => secondVoteReverted, "Second vote succeeded after first"; -} - -votesSum(uint proposalId, bool support, address voterA, address voterB) { - env e0; - env e1; - require e0.msg.sender == voterA; - require e1.msg.sender == voterB; - - uint nProposals = sinvoke proposalCount(e0); - require proposalId < nProposals; - - uint preVotesFor = sinvoke certoraProposalVotesFor(e0, proposalId); - uint preVotesAgainst = sinvoke certoraProposalVotesAgainst(e0, proposalId); - - sinvoke castVote(e0, proposalId, support); - sinvoke castVote(e1, proposalId, support); - - uint postVotesFor = sinvoke certoraProposalVotesFor(e1, proposalId); - uint postVotesAgainst = sinvoke certoraProposalVotesAgainst(e1, proposalId); - - uint voterAVotes = sinvoke certoraVoterVotes(e1, proposalId, voterA); - uint voterBVotes = sinvoke certoraVoterVotes(e1, proposalId, voterB); - - // XXX violates? - assert postVotesFor >= preVotesFor, "Cannot reduce votes for"; - assert postVotesAgainst >= preVotesAgainst, "Cannot reduce votes against"; - assert postVotesFor - preVotesFor + postVotesAgainst - preVotesAgainst == voterAVotes + voterBVotes, "Delta votes equals voter votes"; -} diff --git a/spec/certora/Math/int.cvl b/spec/certora/Math/int.cvl deleted file mode 100644 index 05c8265d3..000000000 --- a/spec/certora/Math/int.cvl +++ /dev/null @@ -1,24 +0,0 @@ - -basicDiv(uint a, uint b) { - require b > 0; - - uint c = a + 1; - uint d = a / b; - uint e = c / b; - - assert c >= a, "Failed to prove ${c} >= ${a}"; - assert e >= d, "Failed to prove: ${e} >= ${d}"; -} - -atLeastEnough(uint256 chi, uint256 amount) { - uint256 WAD = 1000000000000000000; - uint256 RAY = 1000000000000000000000000000; - uint256 MAX = 115792089237316195423570985008687907853269984665640564039457584007913129639935; - - require chi >= RAY; - require amount <= MAX; - - assert (amount + 1) >= amount, "Failed (${amount} + 1) >= ${amount}"; - assert (amount + 1) / chi >= amount / chi, "Failed: (${amount} + 1) / ${chi} >= ${amount} / ${chi}"; - assert ((((amount + 1) * RAY) / chi) * chi / RAY) >= amount, "Not enough DAI"; -} \ No newline at end of file diff --git a/spec/certora/Maximillion/maximillion.cvl b/spec/certora/Maximillion/maximillion.cvl deleted file mode 100644 index 3160e3927..000000000 --- a/spec/certora/Maximillion/maximillion.cvl +++ /dev/null @@ -1,26 +0,0 @@ -repayBehalf(uint256 repayAmount, address borrower) -description "Break repayBehalf" { - env e0; - env e1; - env e2; - - require e1.block.number == e0.block.number; - require e2.block.number == e1.block.number; - - require e0.msg.value == 0; - uint256 borrowed = sinvoke borrowBalance(e0, borrower); - - require repayAmount == e1.msg.value; - invoke repayBehalf(e1, borrower); - bool repayReverted = lastReverted; - - require e2.msg.value == 0; - uint256 borrows = sinvoke borrowBalance(e2, borrower); - uint256 balance = sinvoke etherBalance(e2, e1.msg.sender); - - assert (!repayReverted => - ((repayAmount >= borrowed) => (balance >= repayAmount - borrowed))), "Mismatch in refund"; - assert (!repayReverted => - ((repayAmount >= borrowed) => (borrows == 0)) && - ((repayAmount < borrowed) => (borrows == borrowed - repayAmount))), "Mismatch in borrows repaid"; -} \ No newline at end of file diff --git a/spec/certora/Timelock/timelock.cvl b/spec/certora/Timelock/timelock.cvl deleted file mode 100644 index 1c5be4fbe..000000000 --- a/spec/certora/Timelock/timelock.cvl +++ /dev/null @@ -1,91 +0,0 @@ - -rule queueTransaction(address target, uint256 value, uint256 eta) { - env e0; - - address admin_ = sinvoke admin(e0); - uint256 delay_ = sinvoke delay(e0); - - bytes32 txHash = invoke queueTransactionStatic(e0, target, value, eta); - bool queueReverted = lastReverted; - bool queued = sinvoke queuedTransactions(e0, txHash); - - assert (!queueReverted => queued), "Did not revert but not queued"; - assert ((eta < (e0.block.timestamp + delay_)) => queueReverted), "ETA too soon but did not revert"; - assert (!queueReverted => (queued <=> ((eta >= e0.block.timestamp + delay_) && admin_ == e0.msg.sender))), "Bad queue"; -} - -rule cancelTransaction(address target, uint256 value, uint256 eta) { - env e0; - env e1; - env e2; - - bytes32 txHash = sinvoke queueTransactionStatic(e0, target, value, eta); - bool queuedPre = sinvoke queuedTransactions(e0, txHash); - assert queuedPre, "Queue did not revert, but not queued"; - - sinvoke cancelTransactionStatic(e1, target, value, eta); - bool queuedPost = sinvoke queuedTransactions(e1, txHash); - assert !queuedPost, "Cancel did not revert, but queued"; - - invoke executeTransactionStatic(e1, target, value, eta); - bool executeReverted = lastReverted; - assert executeReverted, "Transaction was canceled, must not be able to execute"; -} - -rule executeTransaction(address target, uint256 value, uint256 eta) { - env e0; - env e1; - - uint256 deltaT = e1.block.timestamp - e0.block.timestamp; - require deltaT >= 0; // Certora does not infer this from block number - - address admin_ = sinvoke admin(e0); - uint256 delay_ = sinvoke delay(e0); - uint256 grace_ = sinvoke grace(e0); - - bytes32 txHash = sinvoke queueTransactionStatic(e0, target, value, eta); - bool queuedPre = sinvoke queuedTransactions(e0, txHash); - assert queuedPre, "Queue did not revert, but not queued"; - - invoke executeTransactionStatic(e1, target, value, eta); - bool executeReverted = lastReverted; - bool queuedPost = sinvoke queuedTransactions(e1, txHash); - - assert (!executeReverted => !queuedPost), "Did not revert, should no longer be queued"; - assert (!executeReverted => deltaT >= delay_), "Did not revert, must not execute before Timelock minimum delay"; - assert (!executeReverted => - (deltaT >= eta - e0.block.timestamp && - deltaT <= eta - e0.block.timestamp + grace_)), - "Did not revert, should only execute within grace period of eta"; - assert ((e1.msg.sender != admin_) => executeReverted), "Must revert if not admin"; -} - -rule cannotExecuteTransaction(address target, uint256 value, uint256 eta) { - env e0; - env e1; - - bytes32 txHash = sinvoke queueTransactionStatic(e0, target, value, eta); - bool queuedPre = sinvoke queuedTransactions(e0, txHash); - assert queuedPre, "Queue did not revert, but not queued"; - - address target_; - require target_ != target; - - uint256 value_; - require value_ != value; - - uint256 eta_; - require eta_ != eta; - - invoke executeTransactionStatic(e1, target_, value, eta); - assert lastReverted, "Executed tx with different target"; - - invoke executeTransactionStatic(e1, target, value_, eta); - assert lastReverted, "Executed tx with different value"; - - invoke executeTransactionStatic(e1, target, value, eta_); - assert lastReverted, "Executed tx with different eta"; - - bool queuedPost = sinvoke queuedTransactions(e1, txHash); - assert queuedPost, "Dequeued the transaction, but not canceled or executed"; -} \ No newline at end of file diff --git a/spec/certora/cDAI/mcd.cvl b/spec/certora/cDAI/mcd.cvl deleted file mode 100644 index 839a81cf6..000000000 --- a/spec/certora/cDAI/mcd.cvl +++ /dev/null @@ -1,14 +0,0 @@ - -rule alwaysHasDai(uint256 amount) { - env e0; - - require amount == sinvoke getCashOf(e0, e0.msg.sender); - uint256 mintError = sinvoke mint(e0, amount); - uint256 redeemError = invoke redeemUnderlying(e0, amount); - bool redeemReverted = lastReverted; - uint256 redeemedAmount = sinvoke getCashOf(e0, e0.msg.sender); - - // XXX what if it reverts? cannot fix until specs can run again - assert !redeemReverted, "Redeem reverted"; - assert !redeemReverted => redeemedAmount == amount, "Redeemed amount other than specified"; -} \ No newline at end of file diff --git a/spec/certora/contracts/CDaiDelegateCertora.sol b/spec/certora/contracts/CDaiDelegateCertora.sol deleted file mode 100644 index 637805fdf..000000000 --- a/spec/certora/contracts/CDaiDelegateCertora.sol +++ /dev/null @@ -1,9 +0,0 @@ -pragma solidity ^0.8.10; - -import "../../../contracts/CDaiDelegate.sol"; - -contract CDaiDelegateCertora is CDaiDelegate { - function getCashOf(address account) public view returns (uint256) { - return EIP20Interface(underlying).balanceOf(account); - } -} diff --git a/spec/certora/contracts/CErc20DelegateCertora.sol b/spec/certora/contracts/CErc20DelegateCertora.sol deleted file mode 100644 index 11ac936e9..000000000 --- a/spec/certora/contracts/CErc20DelegateCertora.sol +++ /dev/null @@ -1,41 +0,0 @@ -pragma solidity ^0.8.10; - -import "../../../contracts/VBep20Delegate.sol"; -import "../../../contracts/EIP20Interface.sol"; - -import "./VTokenCollateral.sol"; - -contract VBep20DelegateCertora is VBep20Delegate { - VTokenCollateral public otherToken; - - function mintFreshPub(address minter, uint256 mintAmount) public returns (uint256) { - (uint256 error, ) = mintFresh(minter, mintAmount); - return error; - } - - function redeemFreshPub( - address payable redeemer, - uint256 redeemTokens, - uint256 redeemUnderlying - ) public returns (uint256) { - return redeemFresh(redeemer, redeemTokens, redeemUnderlying); - } - - function borrowFreshPub(address payable borrower, uint256 borrowAmount) public returns (uint256) { - return borrowFresh(borrower, borrowAmount); - } - - function repayBorrowFreshPub(address payer, address borrower, uint256 repayAmount) public returns (uint256) { - (uint256 error, ) = repayBorrowFresh(payer, borrower, repayAmount); - return error; - } - - function liquidateBorrowFreshPub( - address liquidator, - address borrower, - uint256 repayAmount - ) public returns (uint256) { - (uint256 error, ) = liquidateBorrowFresh(liquidator, borrower, repayAmount, otherToken); - return error; - } -} diff --git a/spec/certora/contracts/CErc20DelegatorCertora.sol b/spec/certora/contracts/CErc20DelegatorCertora.sol deleted file mode 100644 index dccde1712..000000000 --- a/spec/certora/contracts/CErc20DelegatorCertora.sol +++ /dev/null @@ -1,133 +0,0 @@ -pragma solidity ^0.8.10; - -import "../../../contracts/VBep20Delegator.sol"; -import "../../../contracts/EIP20Interface.sol"; - -import "./VTokenCollateral.sol"; - -contract VBep20DelegatorCertora is VBep20Delegator { - VTokenCollateral public otherToken; - - constructor( - address underlying_, - ComptrollerInterface comptroller_, - InterestRateModel interestRateModel_, - uint256 initialExchangeRateMantissa_, - string memory name_, - string memory symbol_, - uint8 decimals_, - address payable admin_, - address implementation_, - bytes memory becomeImplementationData - ) - public - VBep20Delegator( - underlying_, - comptroller_, - interestRateModel_, - initialExchangeRateMantissa_, - name_, - symbol_, - decimals_, - admin_, - implementation_, - becomeImplementationData - ) - { - comptroller; // touch for Certora slot deduction - interestRateModel; // touch for Certora slot deduction - } - - function balanceOfInOther(address account) public view returns (uint256) { - return otherToken.balanceOf(account); - } - - function borrowBalanceStoredInOther(address account) public view returns (uint256) { - return otherToken.borrowBalanceStored(account); - } - - function exchangeRateStoredInOther() public view returns (uint256) { - return otherToken.exchangeRateStored(); - } - - function getCashInOther() public view returns (uint256) { - return otherToken.getCash(); - } - - function getCashOf(address account) public view returns (uint256) { - return EIP20Interface(underlying).balanceOf(account); - } - - function getCashOfInOther(address account) public view returns (uint256) { - return otherToken.getCashOf(account); - } - - function totalSupplyInOther() public view returns (uint256) { - return otherToken.totalSupply(); - } - - function totalBorrowsInOther() public view returns (uint256) { - return otherToken.totalBorrows(); - } - - function totalReservesInOther() public view returns (uint256) { - return otherToken.totalReserves(); - } - - function underlyingInOther() public view returns (address) { - return otherToken.underlying(); - } - - function mintFreshPub(address minter, uint256 mintAmount) public returns (uint256) { - bytes memory data = delegateToImplementation( - abi.encodeWithSignature("_mintFreshPub(address,uint256)", minter, mintAmount) - ); - return abi.decode(data, (uint256)); - } - - function redeemFreshPub( - address payable redeemer, - uint256 redeemTokens, - uint256 redeemUnderlying - ) public returns (uint256) { - bytes memory data = delegateToImplementation( - abi.encodeWithSignature( - "_redeemFreshPub(address,uint256,uint256)", - redeemer, - redeemTokens, - redeemUnderlying - ) - ); - return abi.decode(data, (uint256)); - } - - function borrowFreshPub(address payable borrower, uint256 borrowAmount) public returns (uint256) { - bytes memory data = delegateToImplementation( - abi.encodeWithSignature("_borrowFreshPub(address,uint256)", borrower, borrowAmount) - ); - return abi.decode(data, (uint256)); - } - - function repayBorrowFreshPub(address payer, address borrower, uint256 repayAmount) public returns (uint256) { - bytes memory data = delegateToImplementation( - abi.encodeWithSignature("_repayBorrowFreshPub(address,address,uint256)", payer, borrower, repayAmount) - ); - return abi.decode(data, (uint256)); - } - - function liquidateBorrowFreshPub( - address liquidator, - address borrower, - uint256 repayAmount - ) public returns (uint256) { - bytes memory data = delegateToImplementation( - abi.encodeWithSignature( - "_liquidateBorrowFreshPub(address,address,uint256)", - liquidator, - borrower, - repayAmount - ) - ); - return abi.decode(data, (uint256)); - } -} diff --git a/spec/certora/contracts/CErc20ImmutableCertora.sol b/spec/certora/contracts/CErc20ImmutableCertora.sol deleted file mode 100644 index 7136a5a94..000000000 --- a/spec/certora/contracts/CErc20ImmutableCertora.sol +++ /dev/null @@ -1,104 +0,0 @@ -pragma solidity ^0.8.10; - -import "../../../contracts/VBep20Immutable.sol"; -import "../../../contracts/EIP20Interface.sol"; - -import "./VTokenCollateral.sol"; - -contract VBep20ImmutableCertora is VBep20Immutable { - VTokenCollateral public otherToken; - - constructor( - address underlying_, - ComptrollerInterface comptroller_, - InterestRateModel interestRateModel_, - uint256 initialExchangeRateMantissa_, - string memory name_, - string memory symbol_, - uint8 decimals_, - address payable admin_ - ) - public - VBep20Immutable( - underlying_, - comptroller_, - interestRateModel_, - initialExchangeRateMantissa_, - name_, - symbol_, - decimals_, - admin_ - ) - {} - - function balanceOfInOther(address account) public view returns (uint256) { - return otherToken.balanceOf(account); - } - - function borrowBalanceStoredInOther(address account) public view returns (uint256) { - return otherToken.borrowBalanceStored(account); - } - - function exchangeRateStoredInOther() public view returns (uint256) { - return otherToken.exchangeRateStored(); - } - - function getCashInOther() public view returns (uint256) { - return otherToken.getCash(); - } - - function getCashOf(address account) public view returns (uint256) { - return EIP20Interface(underlying).balanceOf(account); - } - - function getCashOfInOther(address account) public view returns (uint256) { - return otherToken.getCashOf(account); - } - - function totalSupplyInOther() public view returns (uint256) { - return otherToken.totalSupply(); - } - - function totalBorrowsInOther() public view returns (uint256) { - return otherToken.totalBorrows(); - } - - function totalReservesInOther() public view returns (uint256) { - return otherToken.totalReserves(); - } - - function underlyingInOther() public view returns (address) { - return otherToken.underlying(); - } - - function mintFreshPub(address minter, uint256 mintAmount) public returns (uint256) { - (uint256 error, ) = mintFresh(minter, mintAmount); - return error; - } - - function redeemFreshPub( - address payable redeemer, - uint256 redeemTokens, - uint256 redeemUnderlying - ) public returns (uint256) { - return redeemFresh(redeemer, redeemTokens, redeemUnderlying); - } - - function borrowFreshPub(address payable borrower, uint256 borrowAmount) public returns (uint256) { - return borrowFresh(borrower, borrowAmount); - } - - function repayBorrowFreshPub(address payer, address borrower, uint256 repayAmount) public returns (uint256) { - (uint256 error, ) = repayBorrowFresh(payer, borrower, repayAmount); - return error; - } - - function liquidateBorrowFreshPub( - address liquidator, - address borrower, - uint256 repayAmount - ) public returns (uint256) { - (uint256 error, ) = liquidateBorrowFresh(liquidator, borrower, repayAmount, otherToken); - return error; - } -} diff --git a/spec/certora/contracts/CEtherCertora.sol b/spec/certora/contracts/CEtherCertora.sol deleted file mode 100644 index bac88f5aa..000000000 --- a/spec/certora/contracts/CEtherCertora.sol +++ /dev/null @@ -1,18 +0,0 @@ -pragma solidity ^0.8.10; - -import "../../../contracts/CEther.sol"; - -contract CEtherCertora is CEther { - constructor( - ComptrollerInterface comptroller_, - InterestRateModel interestRateModel_, - uint256 initialExchangeRateMantissa_, - string memory name_, - string memory symbol_, - uint8 decimals_, - address payable admin_ - ) - public - CEther(comptroller_, interestRateModel_, initialExchangeRateMantissa_, name_, symbol_, decimals_, admin_) - {} -} diff --git a/spec/certora/contracts/CTokenCollateral.sol b/spec/certora/contracts/CTokenCollateral.sol deleted file mode 100644 index 5fc655830..000000000 --- a/spec/certora/contracts/CTokenCollateral.sol +++ /dev/null @@ -1,33 +0,0 @@ -pragma solidity ^0.8.10; - -import "../../../contracts/VBep20Immutable.sol"; -import "../../../contracts/EIP20Interface.sol"; - -contract VTokenCollateral is VBep20Immutable { - constructor( - address underlying_, - ComptrollerInterface comptroller_, - InterestRateModel interestRateModel_, - uint256 initialExchangeRateMantissa_, - string memory name_, - string memory symbol_, - uint8 decimals_, - address payable admin_ - ) - public - VBep20Immutable( - underlying_, - comptroller_, - interestRateModel_, - initialExchangeRateMantissa_, - name_, - symbol_, - decimals_, - admin_ - ) - {} - - function getCashOf(address account) public view returns (uint256) { - return EIP20Interface(underlying).balanceOf(account); - } -} diff --git a/spec/certora/contracts/CompCertora.sol b/spec/certora/contracts/CompCertora.sol deleted file mode 100644 index f56dabf52..000000000 --- a/spec/certora/contracts/CompCertora.sol +++ /dev/null @@ -1,36 +0,0 @@ -pragma solidity ^0.8.10; - -import "../../../contracts/Governance/Comp.sol"; - -contract CompCertora is Comp { - constructor(address grantor) public Comp(grantor) {} - - function certoraOrdered(address account) external view returns (bool) { - uint32 nCheckpoints = numCheckpoints[account]; - for (uint32 i = 1; i < nCheckpoints; i++) { - if (checkpoints[account][i - 1].fromBlock >= checkpoints[account][i].fromBlock) { - return false; - } - } - - // make sure the checkpoints are also all before the current block - if (nCheckpoints > 0 && checkpoints[account][nCheckpoints - 1].fromBlock > block.number) { - return false; - } - - return true; - } - - function certoraScan(address account, uint256 blockNumber) external view returns (uint256) { - // find most recent checkpoint from before blockNumber - for (uint32 i = numCheckpoints[account]; i != 0; i--) { - Checkpoint memory cp = checkpoints[account][i - 1]; - if (cp.fromBlock <= blockNumber) { - return cp.votes; - } - } - - // blockNumber is from before first checkpoint (or list is empty) - return 0; - } -} diff --git a/spec/certora/contracts/ComptrollerCertora.sol b/spec/certora/contracts/ComptrollerCertora.sol deleted file mode 100644 index 498fc2836..000000000 --- a/spec/certora/contracts/ComptrollerCertora.sol +++ /dev/null @@ -1,21 +0,0 @@ -pragma solidity ^0.8.10; - -import "../../../contracts/Comptroller.sol"; - -contract ComptrollerCertora is Comptroller { - uint8 switcher; - uint256 liquidityOrShortfall; - - function getHypotheticalAccountLiquidityInternal( - address account, - VToken vTokenModify, - uint256 redeemTokens, - uint256 borrowAmount - ) internal view override returns (Error, uint256, uint256) { - if (switcher == 0) return (Error.NO_ERROR, liquidityOrShortfall, 0); - if (switcher == 1) return (Error.NO_ERROR, 0, liquidityOrShortfall); - if (switcher == 2) return (Error.SNAPSHOT_ERROR, 0, 0); - if (switcher == 3) return (Error.PRICE_ERROR, 0, 0); - return (Error.MATH_ERROR, 0, 0); - } -} diff --git a/spec/certora/contracts/GovernorAlphaCertora.sol b/spec/certora/contracts/GovernorAlphaCertora.sol deleted file mode 100644 index 436ea17bc..000000000 --- a/spec/certora/contracts/GovernorAlphaCertora.sol +++ /dev/null @@ -1,63 +0,0 @@ -pragma solidity ^0.8.10; -pragma experimental ABIEncoderV2; - -import "../../../contracts/Governance/GovernorAlpha.sol"; - -contract GovernorAlphaCertora is GovernorAlpha { - Proposal proposal; - - constructor( - address timelock_, - address comp_, - address guardian_ - ) public GovernorAlpha(timelock_, comp_, guardian_) {} - - // XXX breaks solver - /* function certoraPropose() public returns (uint) { */ - /* return propose(proposal.targets, proposal.values, proposal.signatures, proposal.calldatas, "Motion to do something"); */ - /* } */ - - /* function certoraProposalLength(uint proposalId) public returns (uint) { */ - /* return proposals[proposalId].targets.length; */ - /* } */ - - function certoraProposalStart(uint256 proposalId) public returns (uint256) { - return proposals[proposalId].startBlock; - } - - function certoraProposalEnd(uint256 proposalId) public returns (uint256) { - return proposals[proposalId].endBlock; - } - - function certoraProposalEta(uint256 proposalId) public returns (uint256) { - return proposals[proposalId].eta; - } - - function certoraProposalExecuted(uint256 proposalId) public returns (bool) { - return proposals[proposalId].executed; - } - - function certoraProposalState(uint256 proposalId) public returns (uint256) { - return uint256(state(proposalId)); - } - - function certoraProposalVotesFor(uint256 proposalId) public returns (uint256) { - return proposals[proposalId].forVotes; - } - - function certoraProposalVotesAgainst(uint256 proposalId) public returns (uint256) { - return proposals[proposalId].againstVotes; - } - - function certoraVoterVotes(uint256 proposalId, address voter) public returns (uint256) { - return proposals[proposalId].receipts[voter].votes; - } - - function certoraTimelockDelay() public returns (uint256) { - return timelock.delay(); - } - - function certoraTimelockGracePeriod() public returns (uint256) { - return timelock.GRACE_PERIOD(); - } -} diff --git a/spec/certora/contracts/InterestRateModelModel.sol b/spec/certora/contracts/InterestRateModelModel.sol deleted file mode 100644 index 042e5aae6..000000000 --- a/spec/certora/contracts/InterestRateModelModel.sol +++ /dev/null @@ -1,29 +0,0 @@ -pragma solidity ^0.8.10; - -import "../../../contracts/InterestRateModel.sol"; - -contract InterestRateModelModel is InterestRateModel { - uint256 borrowDummy; - uint256 supplyDummy; - - function isInterestRateModel() external pure override returns (bool) { - return true; - } - - function getBorrowRate( - uint256 _cash, - uint256 _borrows, - uint256 _reserves - ) external view override returns (uint256) { - return borrowDummy; - } - - function getSupplyRate( - uint256 _cash, - uint256 _borrows, - uint256 _reserves, - uint256 _reserveFactorMantissa - ) external view override returns (uint256) { - return supplyDummy; - } -} diff --git a/spec/certora/contracts/MathCertora.sol b/spec/certora/contracts/MathCertora.sol deleted file mode 100644 index a3f250c9f..000000000 --- a/spec/certora/contracts/MathCertora.sol +++ /dev/null @@ -1,3 +0,0 @@ -pragma solidity ^0.8.10; - -contract MathCertora {} diff --git a/spec/certora/contracts/MaximillionCertora.sol b/spec/certora/contracts/MaximillionCertora.sol deleted file mode 100644 index 923f4ebea..000000000 --- a/spec/certora/contracts/MaximillionCertora.sol +++ /dev/null @@ -1,19 +0,0 @@ -pragma solidity ^0.8.10; - -import "../../../contracts/Maximillion.sol"; - -contract MaximillionCertora is Maximillion { - constructor(CEther cEther_) public Maximillion(cEther_) {} - - function borrowBalance(address account) external returns (uint256) { - return cEther.borrowBalanceCurrent(account); - } - - function etherBalance(address account) external returns (uint256) { - return account.balance; - } - - function repayBehalf(address borrower) public payable override { - return super.repayBehalf(borrower); - } -} diff --git a/spec/certora/contracts/PriceOracleModel.sol b/spec/certora/contracts/PriceOracleModel.sol deleted file mode 100644 index 071d2f006..000000000 --- a/spec/certora/contracts/PriceOracleModel.sol +++ /dev/null @@ -1,15 +0,0 @@ -pragma solidity ^0.8.10; - -import "@venusprotocol/oracle/contracts/PriceOracle.sol"; - -contract PriceOracleModel is PriceOracle { - uint256 dummy; - - function isPriceOracle() external pure override returns (bool) { - return true; - } - - function getUnderlyingPrice(VToken vToken) external view override returns (uint256) { - return dummy; - } -} diff --git a/spec/certora/contracts/SimulationInterface.sol b/spec/certora/contracts/SimulationInterface.sol deleted file mode 100644 index 034ea2e55..000000000 --- a/spec/certora/contracts/SimulationInterface.sol +++ /dev/null @@ -1,5 +0,0 @@ -pragma solidity ^0.8.10; - -interface SimulationInterface { - function dummy() external; -} diff --git a/spec/certora/contracts/TimelockCertora.sol b/spec/certora/contracts/TimelockCertora.sol deleted file mode 100644 index dafb2429f..000000000 --- a/spec/certora/contracts/TimelockCertora.sol +++ /dev/null @@ -1,23 +0,0 @@ -pragma solidity ^0.8.10; - -import "../../../contracts/Timelock.sol"; - -contract TimelockCertora is Timelock { - constructor(address admin_, uint256 delay_) public Timelock(admin_, delay_) {} - - function grace() public pure returns (uint256) { - return GRACE_PERIOD; - } - - function queueTransactionStatic(address target, uint256 value, uint256 eta) public returns (bytes32) { - return queueTransaction(target, value, "setCounter()", "", eta); - } - - function cancelTransactionStatic(address target, uint256 value, uint256 eta) public { - return cancelTransaction(target, value, "setCounter()", "", eta); - } - - function executeTransactionStatic(address target, uint256 value, uint256 eta) public { - executeTransaction(target, value, "setCounter()", "", eta); // NB: cannot return dynamic types (will hang solver) - } -} diff --git a/spec/certora/contracts/UnderlyingModelNonStandard.sol b/spec/certora/contracts/UnderlyingModelNonStandard.sol deleted file mode 100644 index 827fe0601..000000000 --- a/spec/certora/contracts/UnderlyingModelNonStandard.sol +++ /dev/null @@ -1,50 +0,0 @@ -pragma solidity ^0.8.10; - -import "../../../contracts/EIP20NonStandardInterface.sol"; - -import "./SimulationInterface.sol"; - -contract UnderlyingModelNonStandard is EIP20NonStandardInterface, SimulationInterface { - uint256 _totalSupply; - mapping(address => uint256) balances; - mapping(address => mapping(address => uint256)) allowances; - - function totalSupply() external view override returns (uint256) { - return _totalSupply; - } - - function balanceOf(address owner) external view override returns (uint256 balance) { - balance = balances[owner]; - } - - function transfer(address dst, uint256 amount) external override { - address src = msg.sender; - require(balances[src] >= amount); - require(balances[dst] + amount >= balances[dst]); - - balances[src] -= amount; - balances[dst] += amount; - } - - function transferFrom(address src, address dst, uint256 amount) external override { - require(allowances[src][msg.sender] >= amount); - require(balances[src] >= amount); - require(balances[dst] + amount >= balances[dst]); - - allowances[src][msg.sender] -= amount; - balances[src] -= amount; - balances[dst] += amount; - } - - function approve(address spender, uint256 amount) external override returns (bool success) { - allowances[msg.sender][spender] = amount; - } - - function allowance(address owner, address spender) external view override returns (uint256 remaining) { - remaining = allowances[owner][spender]; - } - - function dummy() external override { - return; - } -} diff --git a/spec/certora/contracts/UnderlyingModelWithFee.sol b/spec/certora/contracts/UnderlyingModelWithFee.sol deleted file mode 100644 index ec70e632f..000000000 --- a/spec/certora/contracts/UnderlyingModelWithFee.sol +++ /dev/null @@ -1,55 +0,0 @@ -pragma solidity ^0.8.10; - -import "../../../contracts/EIP20NonStandardInterface.sol"; - -import "./SimulationInterface.sol"; - -contract UnderlyingModelWithFee is EIP20NonStandardInterface, SimulationInterface { - uint256 _totalSupply; - uint256 fee; - mapping(address => uint256) balances; - mapping(address => mapping(address => uint256)) allowances; - - function totalSupply() external view override returns (uint256) { - return _totalSupply; - } - - function balanceOf(address owner) external view override returns (uint256 balance) { - balance = balances[owner]; - } - - function transfer(address dst, uint256 amount) external override { - address src = msg.sender; - uint256 actualAmount = amount + fee; - require(actualAmount >= amount); - require(balances[src] >= actualAmount); - require(balances[dst] + actualAmount >= balances[dst]); - - balances[src] -= actualAmount; - balances[dst] += actualAmount; - } - - function transferFrom(address src, address dst, uint256 amount) external override { - uint256 actualAmount = amount + fee; - require(actualAmount > fee); - require(allowances[src][msg.sender] >= actualAmount); - require(balances[src] >= actualAmount); - require(balances[dst] + actualAmount >= balances[dst]); - - allowances[src][msg.sender] -= actualAmount; - balances[src] -= actualAmount; - balances[dst] += actualAmount; - } - - function approve(address spender, uint256 amount) external override returns (bool success) { - allowances[msg.sender][spender] = amount; - } - - function allowance(address owner, address spender) external view override returns (uint256 remaining) { - remaining = allowances[owner][spender]; - } - - function dummy() external override { - return; - } -} diff --git a/spec/certora/contracts/mcd/Dai.sol b/spec/certora/contracts/mcd/Dai.sol deleted file mode 100644 index 7708645af..000000000 --- a/spec/certora/contracts/mcd/Dai.sol +++ /dev/null @@ -1,158 +0,0 @@ -// Copyright (C) 2017, 2018, 2019 dbrock, rain, mrchico - -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU Affero General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU Affero General Public License for more details. -// -// You should have received a copy of the GNU Affero General Public License -// along with this program. If not, see . - -pragma solidity ^0.8.10; - -import "./lib.sol"; - -contract Dai is LibNote { - // --- Auth --- - mapping(address => uint256) public wards; - - function rely(address guy) external note auth { - wards[guy] = 1; - } - - function deny(address guy) external note auth { - wards[guy] = 0; - } - - modifier auth() { - require(wards[msg.sender] == 1, "Dai/not-authorized"); - _; - } - - // --- ERC20 Data --- - string public constant name = "Dai Stablecoin"; - string public constant symbol = "DAI"; - string public constant version = "1"; - uint8 public constant decimals = 18; - uint256 public totalSupply; - - mapping(address => uint256) public balanceOf; - mapping(address => mapping(address => uint256)) public allowance; - mapping(address => uint256) public nonces; - - event Approval(address indexed src, address indexed guy, uint256 wad); - event Transfer(address indexed src, address indexed dst, uint256 wad); - - // --- Math --- - function add(uint256 x, uint256 y) internal pure returns (uint256 z) { - require((z = x + y) >= x); - } - - function sub(uint256 x, uint256 y) internal pure returns (uint256 z) { - require((z = x - y) <= x); - } - - // --- EIP712 niceties --- - bytes32 public DOMAIN_SEPARATOR; - // bytes32 public constant PERMIT_TYPEHASH = keccak256("Permit(address holder,address spender,uint256 nonce,uint256 expiry,bool allowed)"); - bytes32 public constant PERMIT_TYPEHASH = 0xea2aa0a1be11a07ed86d755c93467f4f82362b452371d1ba94d1715123511acb; - - constructor(uint256 chainId_) public { - wards[msg.sender] = 1; - DOMAIN_SEPARATOR = keccak256( - abi.encode( - keccak256("EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)"), - keccak256(bytes(name)), - keccak256(bytes(version)), - chainId_, - address(this) - ) - ); - } - - // --- Token --- - function transfer(address dst, uint256 wad) external returns (bool) { - return transferFrom(msg.sender, dst, wad); - } - - function transferFrom(address src, address dst, uint256 wad) public returns (bool) { - require(balanceOf[src] >= wad, "Dai/insufficient-balance"); - if (src != msg.sender && allowance[src][msg.sender] != uint256(-1)) { - require(allowance[src][msg.sender] >= wad, "Dai/insufficient-allowance"); - allowance[src][msg.sender] = sub(allowance[src][msg.sender], wad); - } - balanceOf[src] = sub(balanceOf[src], wad); - balanceOf[dst] = add(balanceOf[dst], wad); - emit Transfer(src, dst, wad); - return true; - } - - function mint(address usr, uint256 wad) external auth { - balanceOf[usr] = add(balanceOf[usr], wad); - totalSupply = add(totalSupply, wad); - emit Transfer(address(0), usr, wad); - } - - function burn(address usr, uint256 wad) external { - require(balanceOf[usr] >= wad, "Dai/insufficient-balance"); - if (usr != msg.sender && allowance[usr][msg.sender] != uint256(-1)) { - require(allowance[usr][msg.sender] >= wad, "Dai/insufficient-allowance"); - allowance[usr][msg.sender] = sub(allowance[usr][msg.sender], wad); - } - balanceOf[usr] = sub(balanceOf[usr], wad); - totalSupply = sub(totalSupply, wad); - emit Transfer(usr, address(0), wad); - } - - function approve(address usr, uint256 wad) external returns (bool) { - allowance[msg.sender][usr] = wad; - emit Approval(msg.sender, usr, wad); - return true; - } - - // --- Alias --- - function push(address usr, uint256 wad) external { - transferFrom(msg.sender, usr, wad); - } - - function pull(address usr, uint256 wad) external { - transferFrom(usr, msg.sender, wad); - } - - function move(address src, address dst, uint256 wad) external { - transferFrom(src, dst, wad); - } - - // --- Approve by signature --- - function permit( - address holder, - address spender, - uint256 nonce, - uint256 expiry, - bool allowed, - uint8 v, - bytes32 r, - bytes32 s - ) external { - bytes32 digest = keccak256( - abi.encodePacked( - "\x19\x01", - DOMAIN_SEPARATOR, - keccak256(abi.encode(PERMIT_TYPEHASH, holder, spender, nonce, expiry, allowed)) - ) - ); - - require(holder != address(0), "Dai/invalid-address-0"); - require(holder == ecrecover(digest, v, r, s), "Dai/invalid-permit"); - require(expiry == 0 || now <= expiry, "Dai/permit-expired"); - require(nonce == nonces[holder]++, "Dai/invalid-nonce"); - uint256 wad = allowed ? uint256(-1) : 0; - allowance[holder][spender] = wad; - emit Approval(holder, spender, wad); - } -} diff --git a/spec/certora/contracts/mcd/Lib.sol b/spec/certora/contracts/mcd/Lib.sol deleted file mode 100644 index 3f67782db..000000000 --- a/spec/certora/contracts/mcd/Lib.sol +++ /dev/null @@ -1,45 +0,0 @@ -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . - -pragma solidity ^0.8.10; - -contract LibNote { - event LogNote( - bytes4 indexed sig, - address indexed usr, - bytes32 indexed arg1, - bytes32 indexed arg2, - bytes data - ) anonymous; - - modifier note() { - _; - assembly { - // log an 'anonymous' event with a constant 6 words of calldata - // and four indexed topics: selector, caller, arg1 and arg2 - let mark := msize // end of memory ensures zero - mstore(0x40, add(mark, 288)) // update free memory pointer - mstore(mark, 0x20) // bytes type data offset - mstore(add(mark, 0x20), 224) // bytes size (padded) - calldatacopy(add(mark, 0x40), 0, 224) // bytes payload - log4( - mark, - 288, // calldata - shl(224, shr(224, calldataload(0))), // msg.sig - caller, // msg.sender - calldataload(4), // arg1 - calldataload(36) // arg2 - ) - } - } -} diff --git a/spec/certora/contracts/mcd/Pot.sol b/spec/certora/contracts/mcd/Pot.sol deleted file mode 100644 index 9d1663c26..000000000 --- a/spec/certora/contracts/mcd/Pot.sol +++ /dev/null @@ -1,198 +0,0 @@ -/// pot.sol -- Dai Savings Rate - -// Copyright (C) 2018 Rain -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU Affero General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU Affero General Public License for more details. -// -// You should have received a copy of the GNU Affero General Public License -// along with this program. If not, see . - -pragma solidity ^0.8.10; - -import "./lib.sol"; - -/* - "Savings Dai" is obtained when Dai is deposited into - this contract. Each "Savings Dai" accrues Dai interest - at the "Dai Savings Rate". - - This contract does not implement a user tradeable token - and is intended to be used with adapters. - - --- `save` your `dai` in the `pot` --- - - - `dsr`: the Dai Savings Rate - - `pie`: user balance of Savings Dai - - - `join`: start saving some dai - - `exit`: remove some dai - - `drip`: perform rate collection - -*/ - -contract VatLike { - function move(address, address, uint256) external; - - function suck(address, address, uint256) external; -} - -contract Pot is LibNote { - // --- Auth --- - mapping(address => uint256) public wards; - - function rely(address guy) external note auth { - wards[guy] = 1; - } - - function deny(address guy) external note auth { - wards[guy] = 0; - } - - modifier auth() { - require(wards[msg.sender] == 1, "Pot/not-authorized"); - _; - } - - // --- Data --- - mapping(address => uint256) public pie; // user Savings Dai - - uint256 public Pie; // total Savings Dai - uint256 public dsr; // the Dai Savings Rate - uint256 public chi; // the Rate Accumulator - - VatLike public vat; // CDP engine - address public vow; // debt engine - uint256 public rho; // time of last drip - - uint256 public live; // Access Flag - - // --- Init --- - constructor(address vat_) public { - wards[msg.sender] = 1; - vat = VatLike(vat_); - dsr = ONE; - chi = ONE; - rho = now; - live = 1; - } - - // --- Math --- - uint256 constant ONE = 10 ** 27; - - function rpow(uint256 x, uint256 n, uint256 base) internal pure returns (uint256 z) { - assembly { - switch x - case 0 { - switch n - case 0 { - z := base - } - default { - z := 0 - } - } - default { - switch mod(n, 2) - case 0 { - z := base - } - default { - z := x - } - let half := div(base, 2) // for rounding. - for { - n := div(n, 2) - } n { - n := div(n, 2) - } { - let xx := mul(x, x) - if iszero(eq(div(xx, x), x)) { - revert(0, 0) - } - let xxRound := add(xx, half) - if lt(xxRound, xx) { - revert(0, 0) - } - x := div(xxRound, base) - if mod(n, 2) { - let zx := mul(z, x) - if and(iszero(iszero(x)), iszero(eq(div(zx, x), z))) { - revert(0, 0) - } - let zxRound := add(zx, half) - if lt(zxRound, zx) { - revert(0, 0) - } - z := div(zxRound, base) - } - } - } - } - } - - function rmul(uint256 x, uint256 y) internal pure returns (uint256 z) { - z = mul(x, y) / ONE; - } - - function add(uint256 x, uint256 y) internal pure returns (uint256 z) { - require((z = x + y) >= x); - } - - function sub(uint256 x, uint256 y) internal pure returns (uint256 z) { - require((z = x - y) <= x); - } - - function mul(uint256 x, uint256 y) internal pure returns (uint256 z) { - require(y == 0 || (z = x * y) / y == x); - } - - // --- Administration --- - function file(bytes32 what, uint256 data) external note auth { - require(live == 1, "Pot/not-live"); - require(now == rho, "Pot/rho-not-updated"); - if (what == "dsr") dsr = data; - else revert("Pot/file-unrecognized-param"); - } - - function file(bytes32 what, address addr) external note auth { - if (what == "vow") vow = addr; - else revert("Pot/file-unrecognized-param"); - } - - function cage() external note auth { - live = 0; - dsr = ONE; - } - - // --- Savings Rate Accumulation --- - function drip() external note returns (uint256 tmp) { - require(now >= rho, "Pot/invalid-now"); - tmp = rmul(rpow(dsr, now - rho, ONE), chi); - uint256 chi_ = sub(tmp, chi); - chi = tmp; - rho = now; - vat.suck(address(vow), address(this), mul(Pie, chi_)); - } - - // --- Savings Dai Management --- - function join(uint256 wad) external note { - require(now == rho, "Pot/rho-not-updated"); - pie[msg.sender] = add(pie[msg.sender], wad); - Pie = add(Pie, wad); - vat.move(msg.sender, address(this), mul(chi, wad)); - } - - function exit(uint256 wad) external note { - pie[msg.sender] = sub(pie[msg.sender], wad); - Pie = sub(Pie, wad); - vat.move(address(this), msg.sender, mul(chi, wad)); - } -} diff --git a/spec/certora/contracts/mcd/Vat.sol b/spec/certora/contracts/mcd/Vat.sol deleted file mode 100644 index 28616e205..000000000 --- a/spec/certora/contracts/mcd/Vat.sol +++ /dev/null @@ -1,304 +0,0 @@ -/// vat.sol -- Dai CDP database - -// Copyright (C) 2018 Rain -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU Affero General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU Affero General Public License for more details. -// -// You should have received a copy of the GNU Affero General Public License -// along with this program. If not, see . - -pragma solidity ^0.8.10; - -contract Vat { - // --- Auth --- - mapping(address => uint256) public wards; - - function rely(address usr) external note auth { - require(live == 1, "Vat/not-live"); - wards[usr] = 1; - } - - function deny(address usr) external note auth { - require(live == 1, "Vat/not-live"); - wards[usr] = 0; - } - - modifier auth() { - require(wards[msg.sender] == 1, "Vat/not-authorized"); - _; - } - - mapping(address => mapping(address => uint256)) public can; - - function hope(address usr) external note { - can[msg.sender][usr] = 1; - } - - function nope(address usr) external note { - can[msg.sender][usr] = 0; - } - - function wish(address bit, address usr) internal view returns (bool) { - return either(bit == usr, can[bit][usr] == 1); - } - - // --- Data --- - struct Ilk { - uint256 Art; // Total Normalised Debt [wad] - uint256 rate; // Accumulated Rates [ray] - uint256 spot; // Price with Safety Margin [ray] - uint256 line; // Debt Ceiling [rad] - uint256 dust; // Urn Debt Floor [rad] - } - struct Urn { - uint256 ink; // Locked Collateral [wad] - uint256 art; // Normalised Debt [wad] - } - - mapping(bytes32 => Ilk) public ilks; - mapping(bytes32 => mapping(address => Urn)) public urns; - mapping(bytes32 => mapping(address => uint256)) public gem; // [wad] - mapping(address => uint256) public dai; // [rad] - mapping(address => uint256) public sin; // [rad] - - uint256 public debt; // Total Dai Issued [rad] - uint256 public vice; // Total Unbacked Dai [rad] - uint256 public Line; // Total Debt Ceiling [rad] - uint256 public live; // Access Flag - - // --- Logs --- - event LogNote( - bytes4 indexed sig, - bytes32 indexed arg1, - bytes32 indexed arg2, - bytes32 indexed arg3, - bytes data - ) anonymous; - - modifier note() { - _; - assembly { - // log an 'anonymous' event with a constant 6 words of calldata - // and four indexed topics: the selector and the first three args - let mark := msize // end of memory ensures zero - mstore(0x40, add(mark, 288)) // update free memory pointer - mstore(mark, 0x20) // bytes type data offset - mstore(add(mark, 0x20), 224) // bytes size (padded) - calldatacopy(add(mark, 0x40), 0, 224) // bytes payload - log4( - mark, - 288, // calldata - shl(224, shr(224, calldataload(0))), // msg.sig - calldataload(4), // arg1 - calldataload(36), // arg2 - calldataload(68) // arg3 - ) - } - } - - // --- Init --- - constructor() public { - wards[msg.sender] = 1; - live = 1; - } - - // --- Math --- - function add(uint256 x, int256 y) internal pure returns (uint256 z) { - z = x + uint256(y); - require(y >= 0 || z <= x); - require(y <= 0 || z >= x); - } - - function sub(uint256 x, int256 y) internal pure returns (uint256 z) { - z = x - uint256(y); - require(y <= 0 || z <= x); - require(y >= 0 || z >= x); - } - - function mul(uint256 x, int256 y) internal pure returns (int256 z) { - z = int256(x) * y; - require(int256(x) >= 0); - require(y == 0 || z / y == int256(x)); - } - - function add(uint256 x, uint256 y) internal pure returns (uint256 z) { - require((z = x + y) >= x); - } - - function sub(uint256 x, uint256 y) internal pure returns (uint256 z) { - require((z = x - y) <= x); - } - - function mul(uint256 x, uint256 y) internal pure returns (uint256 z) { - require(y == 0 || (z = x * y) / y == x); - } - - // --- Administration --- - function init(bytes32 ilk) external note auth { - require(ilks[ilk].rate == 0, "Vat/ilk-already-init"); - ilks[ilk].rate = 10 ** 27; - } - - function file(bytes32 what, uint256 data) external note auth { - require(live == 1, "Vat/not-live"); - if (what == "Line") Line = data; - else revert("Vat/file-unrecognized-param"); - } - - function file(bytes32 ilk, bytes32 what, uint256 data) external note auth { - require(live == 1, "Vat/not-live"); - if (what == "spot") ilks[ilk].spot = data; - else if (what == "line") ilks[ilk].line = data; - else if (what == "dust") ilks[ilk].dust = data; - else revert("Vat/file-unrecognized-param"); - } - - function cage() external note auth { - live = 0; - } - - // --- Fungibility --- - function slip(bytes32 ilk, address usr, int256 wad) external note auth { - gem[ilk][usr] = add(gem[ilk][usr], wad); - } - - function flux(bytes32 ilk, address src, address dst, uint256 wad) external note { - require(wish(src, msg.sender), "Vat/not-allowed"); - gem[ilk][src] = sub(gem[ilk][src], wad); - gem[ilk][dst] = add(gem[ilk][dst], wad); - } - - function move(address src, address dst, uint256 rad) external note { - require(wish(src, msg.sender), "Vat/not-allowed"); - dai[src] = sub(dai[src], rad); - dai[dst] = add(dai[dst], rad); - } - - function either(bool x, bool y) internal pure returns (bool z) { - assembly { - z := or(x, y) - } - } - - function both(bool x, bool y) internal pure returns (bool z) { - assembly { - z := and(x, y) - } - } - - // --- CDP Manipulation --- - function frob(bytes32 i, address u, address v, address w, int256 dink, int256 dart) external note { - // system is live - require(live == 1, "Vat/not-live"); - - Urn memory urn = urns[i][u]; - Ilk memory ilk = ilks[i]; - // ilk has been initialised - require(ilk.rate != 0, "Vat/ilk-not-init"); - - urn.ink = add(urn.ink, dink); - urn.art = add(urn.art, dart); - ilk.Art = add(ilk.Art, dart); - - int256 dtab = mul(ilk.rate, dart); - uint256 tab = mul(ilk.rate, urn.art); - debt = add(debt, dtab); - - // either debt has decreased, or debt ceilings are not exceeded - require(either(dart <= 0, both(mul(ilk.Art, ilk.rate) <= ilk.line, debt <= Line)), "Vat/ceiling-exceeded"); - // urn is either less risky than before, or it is safe - require(either(both(dart <= 0, dink >= 0), tab <= mul(urn.ink, ilk.spot)), "Vat/not-safe"); - - // urn is either more safe, or the owner consents - require(either(both(dart <= 0, dink >= 0), wish(u, msg.sender)), "Vat/not-allowed-u"); - // collateral src consents - require(either(dink <= 0, wish(v, msg.sender)), "Vat/not-allowed-v"); - // debt dst consents - require(either(dart >= 0, wish(w, msg.sender)), "Vat/not-allowed-w"); - - // urn has no debt, or a non-dusty amount - require(either(urn.art == 0, tab >= ilk.dust), "Vat/dust"); - - gem[i][v] = sub(gem[i][v], dink); - dai[w] = add(dai[w], dtab); - - urns[i][u] = urn; - ilks[i] = ilk; - } - - // --- CDP Fungibility --- - function fork(bytes32 ilk, address src, address dst, int256 dink, int256 dart) external note { - Urn storage u = urns[ilk][src]; - Urn storage v = urns[ilk][dst]; - Ilk storage i = ilks[ilk]; - - u.ink = sub(u.ink, dink); - u.art = sub(u.art, dart); - v.ink = add(v.ink, dink); - v.art = add(v.art, dart); - - uint256 utab = mul(u.art, i.rate); - uint256 vtab = mul(v.art, i.rate); - - // both sides consent - require(both(wish(src, msg.sender), wish(dst, msg.sender)), "Vat/not-allowed"); - - // both sides safe - require(utab <= mul(u.ink, i.spot), "Vat/not-safe-src"); - require(vtab <= mul(v.ink, i.spot), "Vat/not-safe-dst"); - - // both sides non-dusty - require(either(utab >= i.dust, u.art == 0), "Vat/dust-src"); - require(either(vtab >= i.dust, v.art == 0), "Vat/dust-dst"); - } - - // --- CDP Confiscation --- - function grab(bytes32 i, address u, address v, address w, int256 dink, int256 dart) external note auth { - Urn storage urn = urns[i][u]; - Ilk storage ilk = ilks[i]; - - urn.ink = add(urn.ink, dink); - urn.art = add(urn.art, dart); - ilk.Art = add(ilk.Art, dart); - - int256 dtab = mul(ilk.rate, dart); - - gem[i][v] = sub(gem[i][v], dink); - sin[w] = sub(sin[w], dtab); - vice = sub(vice, dtab); - } - - // --- Settlement --- - function heal(uint256 rad) external note { - address u = msg.sender; - sin[u] = sub(sin[u], rad); - dai[u] = sub(dai[u], rad); - vice = sub(vice, rad); - debt = sub(debt, rad); - } - - function suck(address u, address v, uint256 rad) external note auth { - sin[u] = add(sin[u], rad); - dai[v] = add(dai[v], rad); - vice = add(vice, rad); - debt = add(debt, rad); - } - - // --- Rates --- - function fold(bytes32 i, address u, int256 rate) external note auth { - require(live == 1, "Vat/not-live"); - Ilk storage ilk = ilks[i]; - ilk.rate = add(ilk.rate, rate); - int256 rad = mul(ilk.Art, rate); - dai[u] = add(dai[u], rad); - debt = add(debt, rad); - } -} diff --git a/spec/certora/contracts/mcd/join.sol b/spec/certora/contracts/mcd/join.sol deleted file mode 100644 index ff443970e..000000000 --- a/spec/certora/contracts/mcd/join.sol +++ /dev/null @@ -1,209 +0,0 @@ -/// join.sol -- Basic token adapters - -// Copyright (C) 2018 Rain -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU Affero General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU Affero General Public License for more details. -// -// You should have received a copy of the GNU Affero General Public License -// along with this program. If not, see . - -pragma solidity ^0.8.10; - -import "./lib.sol"; - -contract GemLike { - function decimals() public view returns (uint256); - - function transfer(address, uint256) external returns (bool); - - function transferFrom(address, address, uint256) external returns (bool); -} - -contract DSTokenLike { - function mint(address, uint256) external; - - function burn(address, uint256) external; -} - -contract VatLike { - function slip(bytes32, address, int256) external; - - function move(address, address, uint256) external; -} - -/* - Here we provide *adapters* to connect the Vat to arbitrary external - token implementations, creating a bounded context for the Vat. The - adapters here are provided as working examples: - - - `GemJoin`: For well behaved ERC20 tokens, with simple transfer - semantics. - - - `ETHJoin`: For native Ether. - - - `DaiJoin`: For connecting internal Dai balances to an external - `DSToken` implementation. - - In practice, adapter implementations will be varied and specific to - individual collateral types, accounting for different transfer - semantics and token standards. - - Adapters need to implement two basic methods: - - - `join`: enter collateral into the system - - `exit`: remove collateral from the system - -*/ - -contract GemJoin is LibNote { - // --- Auth --- - mapping(address => uint256) public wards; - - function rely(address usr) external note auth { - wards[usr] = 1; - } - - function deny(address usr) external note auth { - wards[usr] = 0; - } - - modifier auth() { - require(wards[msg.sender] == 1, "GemJoin/not-authorized"); - _; - } - - VatLike public vat; - bytes32 public ilk; - GemLike public gem; - uint256 public dec; - uint256 public live; // Access Flag - - constructor(address vat_, bytes32 ilk_, address gem_) public { - wards[msg.sender] = 1; - live = 1; - vat = VatLike(vat_); - ilk = ilk_; - gem = GemLike(gem_); - dec = gem.decimals(); - } - - function cage() external note auth { - live = 0; - } - - function join(address usr, uint256 wad) external note { - require(live == 1, "GemJoin/not-live"); - require(int256(wad) >= 0, "GemJoin/overflow"); - vat.slip(ilk, usr, int256(wad)); - require(gem.transferFrom(msg.sender, address(this), wad), "GemJoin/failed-transfer"); - } - - function exit(address usr, uint256 wad) external note { - require(wad <= 2 ** 255, "GemJoin/overflow"); - vat.slip(ilk, msg.sender, -int256(wad)); - require(gem.transfer(usr, wad), "GemJoin/failed-transfer"); - } -} - -contract ETHJoin is LibNote { - // --- Auth --- - mapping(address => uint256) public wards; - - function rely(address usr) external note auth { - wards[usr] = 1; - } - - function deny(address usr) external note auth { - wards[usr] = 0; - } - - modifier auth() { - require(wards[msg.sender] == 1, "ETHJoin/not-authorized"); - _; - } - - VatLike public vat; - bytes32 public ilk; - uint256 public live; // Access Flag - - constructor(address vat_, bytes32 ilk_) public { - wards[msg.sender] = 1; - live = 1; - vat = VatLike(vat_); - ilk = ilk_; - } - - function cage() external note auth { - live = 0; - } - - function join(address usr) external payable note { - require(live == 1, "ETHJoin/not-live"); - require(int256(msg.value) >= 0, "ETHJoin/overflow"); - vat.slip(ilk, usr, int256(msg.value)); - } - - function exit(address payable usr, uint256 wad) external note { - require(int256(wad) >= 0, "ETHJoin/overflow"); - vat.slip(ilk, msg.sender, -int256(wad)); - usr.transfer(wad); - } -} - -contract DaiJoin is LibNote { - // --- Auth --- - mapping(address => uint256) public wards; - - function rely(address usr) external note auth { - wards[usr] = 1; - } - - function deny(address usr) external note auth { - wards[usr] = 0; - } - - modifier auth() { - require(wards[msg.sender] == 1, "DaiJoin/not-authorized"); - _; - } - - VatLike public vat; - DSTokenLike public dai; - uint256 public live; // Access Flag - - constructor(address vat_, address dai_) public { - wards[msg.sender] = 1; - live = 1; - vat = VatLike(vat_); - dai = DSTokenLike(dai_); - } - - function cage() external note auth { - live = 0; - } - - uint256 constant ONE = 10 ** 27; - - function mul(uint256 x, uint256 y) internal pure returns (uint256 z) { - require(y == 0 || (z = x * y) / y == x); - } - - function join(address usr, uint256 wad) external note { - vat.move(address(this), usr, mul(ONE, wad)); - dai.burn(msg.sender, wad); - } - - function exit(address usr, uint256 wad) external note { - require(live == 1, "DaiJoin/not-live"); - vat.move(msg.sender, address(this), mul(ONE, wad)); - dai.mint(usr, wad); - } -} diff --git a/spec/scenario/AddReserves.scen b/spec/scenario/AddReserves.scen deleted file mode 100644 index fee870fa0..000000000 --- a/spec/scenario/AddReserves.scen +++ /dev/null @@ -1,138 +0,0 @@ -Test "Add all reserves and verify effects" - NewComptroller - ListedCToken ZRX cZRX initialExchangeRate:1e9 - Comptroller SetMarketSupplyCaps (cZRX) (2e30) - Prep Geoff 50e18 ZRX cZRX - Mint Geoff 50e18 cZRX - Assert Equal (Erc20 cZRX TokenBalance Geoff) (Exactly 500e8) -- 50e18 / 1e9 - Assert Equal (CToken cZRX UnderlyingBalance Geoff) (Exactly 50e18) - Assert Equal (CToken cZRX ExchangeRate) (Exactly 1e9) - -- Get some brah to borrow then repay - BorrowAndRepayWithInterest ZRX cZRX 10e18 5e18 interestRate:0.000001 blocks:500000 reserveRate:0.2 - -- We've accrued .0001% interest for 500000 blocks, or 50% of the principal (10e18), - -- thus, we should have accrued 5e18 of interest for the protocol - -- The reserves should get 20% of this, or 1e18, and the rest - -- is due pro-rata to all suppliers. We just have one, so - -- let's check that account is given correct new balance. - Assert Equal (Erc20 ZRX TokenBalance cZRX) (Exactly 55e18) - Assert Equal (Erc20 ZRX TokenBalance Root) (Exactly 0e18) - Assert Equal (Erc20 cZRX TokenBalance Geoff) (Exactly 500e8) - Assert Equal (CToken cZRX Reserves) (Exactly 1e18) - Assert Equal (CToken cZRX UnderlyingBalance Geoff) (Exactly 54e18) - -- (55.0e18+0.0e18-1.0e18)/500.0e8 - Assert Equal (CToken cZRX ExchangeRate) (Exactly 1.08e9) - -- Now, let's pull out add some our reserves (1e18) - Erc20 ZRX Faucet Root 3e18 - From Root (Erc20 ZRX Approve cZRX 6e18) - AddReserves 1e18 cZRX - Assert Equal (Erc20 ZRX TokenBalance cZRX) (Exactly 56e18) - Assert Equal (Erc20 ZRX TokenBalance Root) (Exactly 2e18) - Assert Equal (Erc20 cZRX TokenBalance Geoff) (Exactly 500e8) - Assert Equal (CToken cZRX Reserves) (Exactly 2e18) - Assert Equal (CToken cZRX UnderlyingBalance Geoff) (Exactly 54e18) - -- (54.0e18+0.0e18-0.0e18)/500.0e8 - -- unchanged - Assert Equal (CToken cZRX ExchangeRate) (Exactly 1.08e9) - -Test "Remove and re add reserves and remove again" - NewComptroller - ListedCToken ZRX cZRX initialExchangeRate:1e9 - Comptroller SetMarketSupplyCaps (cZRX) (2e30) - Prep Geoff 50e18 ZRX cZRX - Mint Geoff 50e18 cZRX - Assert Equal (Erc20 cZRX TokenBalance Geoff) (Exactly 500e8) - Assert Equal (CToken cZRX UnderlyingBalance Geoff) (Exactly 50e18) - Assert Equal (CToken cZRX ExchangeRate) (Exactly 1e9) - -- Get some brah to borrow then repay - BorrowAndRepayWithInterest ZRX cZRX 10e18 5e18 interestRate:0.000001 blocks:500000 reserveRate:0.2 - -- We've accrued .0001% interest for 500000 blocks, or 50% of the principal (10e18), - -- thus, we should have accrued 5e18 of interest for the protocol - -- The reserves should get 20% of this, or 1e18, and the rest - -- is due pro-rata to all suppliers. We just have one, so - -- let's check that account is given correct new balance. - Assert Equal (Erc20 ZRX TokenBalance cZRX) (Exactly 55e18) - Assert Equal (Erc20 ZRX TokenBalance Root) (Exactly 0e18) - Assert Equal (Erc20 cZRX TokenBalance Geoff) (Exactly 500e8) - Assert Equal (CToken cZRX Reserves) (Exactly 1e18) - Assert Equal (CToken cZRX UnderlyingBalance Geoff) (Exactly 54e18) - -- (55.0e18+0.0e18-1.0e18)/500.0e8 - Assert Equal (CToken cZRX ExchangeRate) (Exactly 1.08e9) - -- Now, let's pull out half of reserves (0.5e18) - ReduceReserves 0.5e18 cZRX - Assert Equal (Erc20 ZRX TokenBalance cZRX) (Exactly 54.5e18) - Assert Equal (Erc20 ZRX TokenBalance Root) (Exactly 0.5e18) - Assert Equal (Erc20 cZRX TokenBalance Geoff) (Exactly 500e8) - Assert Equal (CToken cZRX Reserves) (Exactly 0.5e18) - Assert Equal (CToken cZRX UnderlyingBalance Geoff) (Exactly 54e18) - -- (54.5e18+0.5e18-0.0e18)/500.0e8 - Assert Equal (CToken cZRX ExchangeRate) (Exactly 1.08e9) - -- Now, let's put back reserves (1e18) - From Root (Erc20 ZRX Approve cZRX 6e18) - AddReserves 0.5e18 cZRX - Assert Equal (Erc20 ZRX TokenBalance cZRX) (Exactly 55e18) - Assert Equal (Erc20 ZRX TokenBalance Root) (Exactly 0e18) - Assert Equal (Erc20 cZRX TokenBalance Geoff) (Exactly 500e8) - Assert Equal (CToken cZRX Reserves) (Exactly 1e18) - Assert Equal (CToken cZRX UnderlyingBalance Geoff) (Exactly 54e18) - -- (54.5e18+0.5e18-0.0e18)/500.0e8 - Assert Equal (CToken cZRX ExchangeRate) (Exactly 1.08e9) - -Test "add reserves to empty contract" - NewComptroller - ListedCToken ZRX cZRX initialExchangeRate:1e9 - Comptroller SetMarketSupplyCaps (cZRX) (2e30) - Assert Equal (CToken cZRX ExchangeRate) (Exactly 1e9) - Erc20 ZRX Faucet Root 3e18 - From Root (Erc20 ZRX Approve cZRX 6e18) - AddReserves 2e18 cZRX - Assert Equal (Erc20 ZRX TokenBalance cZRX) (Exactly 2e18) - Assert Equal (Erc20 ZRX TokenBalance Root) (Exactly 1e18) - Assert Equal (CToken cZRX Reserves) (Exactly 2e18) - -- unchanged - Assert Equal (CToken cZRX ExchangeRate) (Exactly 1e9) - -Test "add reserves failures" - NewComptroller - ListedCToken ZRX cZRX initialExchangeRate:1e9 - Comptroller SetMarketSupplyCaps (cZRX) (1000000e18) - Assert Equal (CToken cZRX ExchangeRate) (Exactly 1e9) - Assert Equal (CToken cZRX Reserves) (Exactly 0e18) - Erc20 ZRX Faucet Root 2e18 - AllowFailures - AddReserves 2e18 cZRX - Assert Revert "revert Insufficient allowance" - Assert Equal (Erc20 ZRX TokenBalance cZRX) (Exactly 0e18) - Assert Equal (Erc20 ZRX TokenBalance Root) (Exactly 2e18) - Assert Equal (CToken cZRX Reserves) (Exactly 0e18) - -- unchanged - Assert Equal (CToken cZRX ExchangeRate) (Exactly 1e9) - -Test "Add reserves WBTC when paused" - NewComptroller - ListedCToken WBTC cWBTC initialExchangeRate:1e9 tokenType:WBTC - Comptroller SetMarketSupplyCaps (cWBTC) (2e30) - Prep Geoff 50e18 WBTC cWBTC - Mint Geoff 50e18 cWBTC - Assert Equal (Erc20 cWBTC TokenBalance Geoff) (Exactly 500e8) - Assert Equal (CToken cWBTC UnderlyingBalance Geoff) (Exactly 50e18) - Assert Equal (CToken cWBTC ExchangeRate) (Exactly 1e9) - -- Get some brah to borrow then repay - BorrowAndRepayWithInterest WBTC cWBTC 10e18 5e18 interestRate:0.000001 blocks:500000 reserveRate:0.2 - -- We've accrued .0001% interest for 500000 blocks, or 50% of the principal (10e18), - -- thus, we should have accrued 5e18 of interest for the protocol - -- The reserves should get 20% of this, or 1e18, and the rest - -- is due pro-rata to all suppliers. We just have one, so - -- let's check that account is given correct new balance. - Erc20 WBTC Faucet Root 3e18 - Invariant Remains (Erc20 WBTC TokenBalance cWBTC) (Exactly 55e18) - Invariant Remains (Erc20 WBTC TokenBalance Root) (Exactly 3e18) - Invariant Remains (Erc20 cWBTC TokenBalance Geoff) (Exactly 500e8) - Invariant Remains (CToken cWBTC Reserves) (Exactly 1e18) - Invariant Remains (CToken cWBTC UnderlyingBalance Geoff) (Exactly 54e18) - -- (55.0e18+0.0e18-1.0e18)/500.0e8 - Invariant Remains (CToken cWBTC ExchangeRate) (Exactly 1.08e9) - From Root (Erc20 WBTC Approve cWBTC 6e18) - Erc20 WBTC Pause - AllowFailures - AddReserves 1e18 cWBTC - Assert Revert diff --git a/spec/scenario/Borrow.scen b/spec/scenario/Borrow.scen deleted file mode 100644 index d6d18c88d..000000000 --- a/spec/scenario/Borrow.scen +++ /dev/null @@ -1,116 +0,0 @@ - -Test "Borrow some BAT and enters BAT if BAT not entered" - NewComptroller price:1.0 - NewCToken ZRX cZRX - NewCToken BAT cBAT - Comptroller SetMarketSupplyCaps (cZRX) (1000e18) - Comptroller SetMarketSupplyCaps (cZRX) (1000e18) - Give cBAT 10e18 BAT -- Faucet some bat to borrow - Support cZRX collateralFactor:0.5 - Support cBAT collateralFactor:0.5 - Prep Geoff Some ZRX cZRX - Mint Geoff 100e18 cZRX - EnterMarkets Geoff cZRX - Borrow Geoff 1e18 cBAT - Assert Equal (cToken cBAT BorrowBalance Geoff) (Exactly 1e18) - Assert Equal (Erc20 BAT TokenBalance Geoff) (Exactly 1e18) - Assert Equal (Erc20 BAT TokenBalance cBAT) (Exactly 9e18) - Assert Equal (Comptroller MembershipLength Geoff) (Exactly 2) - Assert True (Comptroller CheckMembership Geoff cZRX) - Assert True (Comptroller CheckMembership Geoff cBAT) - --- Now that we revert instead of returning failures, the user does not get marked as entered -Test "Borrow some BAT fails, user not entered" - NewComptroller price:1.0 - NewCToken ZRX cZRX - NewCToken BAT cBAT - Comptroller SetMarketSupplyCaps (cBAT) (1000e18) - Comptroller SetMarketSupplyCaps (cZRX) (1000e18) - Support cZRX collateralFactor:0.5 - Support cBAT collateralFactor:0.5 - Prep Geoff Some ZRX cZRX - Mint Geoff 100e18 cZRX - EnterMarkets Geoff cZRX - Invariant Static (Erc20 BAT TokenBalance Geoff) - Invariant Static (Erc20 BAT TokenBalance cBAT) - AllowFailures - Borrow Geoff 1e18 cBAT - Assert RevertCustomError BorrowCashNotAvailable - Assert Equal (Comptroller MembershipLength Geoff) (Exactly 1) - Assert True (Comptroller CheckMembership Geoff cZRX) - Assert False (Comptroller CheckMembership Geoff cBAT) - -Test "Borrow some BAT fails when no BAT available" - NewComptroller price:1.0 - NewCToken ZRX cZRX - NewCToken BAT cBAT - Comptroller SetMarketSupplyCaps (cBAT) (1000e18) - Comptroller SetMarketSupplyCaps (cZRX) (1000e18) - Support cZRX collateralFactor:0.5 - Support cBAT collateralFactor:0.5 - Prep Geoff Some ZRX cZRX - Mint Geoff 100e18 cZRX - EnterMarkets Geoff cZRX cBAT - Invariant Static (CToken cZRX ExchangeRateStored) - AllowFailures - Borrow Geoff 1e18 cBAT - Assert RevertCustomError BorrowCashNotAvailable - -Test "Borrow fails if market not listed" - NewComptroller price:1.0 - NewCToken ZRX cZRX - NewCToken BAT cBAT - Comptroller SetMarketSupplyCaps (cBAT) (1000e18) - Comptroller SetMarketSupplyCaps (cZRX) (1000e18) - Give cBAT 10e18 BAT -- Faucet some bat to borrow - Support cZRX collateralFactor:0.5 - Prep Geoff Some ZRX cZRX - Mint Geoff 100e18 cZRX - EnterMarkets Geoff cZRX - AllowFailures - Borrow Geoff 1e18 cBAT - Assert RevertCustomError BorrowComptrollerRejection 9 - -Test "Borrow some BAT from Excess Cash" - Invariant Success - NewComptroller price:1.0 - NewCToken ZRX cZRX - NewCToken BAT cBAT - Comptroller SetMarketSupplyCaps (cBAT) (1000e18) - Comptroller SetMarketSupplyCaps (cZRX) (1000e18) - Give cBAT 10e18 BAT -- Faucet some bat to borrow - Support cZRX collateralFactor:0.5 - Support cBAT collateralFactor:0.5 - Prep Geoff Some ZRX cZRX - Mint Geoff 100e18 cZRX - EnterMarkets Geoff cZRX cBAT - Borrow Geoff 1e18 cBAT - Assert Equal (cToken cBAT BorrowBalance Geoff) (Exactly 1e18) - Assert Equal (Erc20 BAT TokenBalance Geoff) (Exactly 1e18) - Assert Equal (Erc20 BAT TokenBalance cBAT) (Exactly 9e18) - -Test "Borrow some BAT reverts if borrow is paused" - NewComptroller price:1.0 - Comptroller SetPauseGuardian Coburn - NewCToken ZRX cZRX - NewCToken BAT cBAT - Comptroller SetMarketSupplyCaps (cBAT) (1000e18) - Comptroller SetMarketSupplyCaps (cZRX) (1000e18) - Give cBAT 10e18 BAT -- Faucet some bat to borrow - Support cZRX collateralFactor:0.5 - Support cBAT collateralFactor:0.5 - Prep Geoff Some ZRX cZRX - Mint Geoff 100e18 cZRX - EnterMarkets Geoff cZRX cBAT - From Coburn (Comptroller SetGuardianMarketPaused cBAT "Borrow" True) - AllowFailures - Borrow Geoff 1e18 cBAT - Assert Revert "revert borrow is paused" - Assert Equal (cToken cBAT BorrowBalance Geoff) 0 - Assert Equal (Erc20 BAT TokenBalance Geoff) 0 - Assert Equal (Erc20 BAT TokenBalance cBAT) (Exactly 10e18) - Comptroller SetGuardianMarketPaused cBAT "Borrow" False - Borrow Geoff 1e18 cBAT - Assert Equal (cToken cBAT BorrowBalance Geoff) (Exactly 1e18) - Assert Equal (Erc20 BAT TokenBalance Geoff) (Exactly 1e18) - Assert Equal (Erc20 BAT TokenBalance cBAT) (Exactly 9e18) diff --git a/spec/scenario/BorrowBalance.scen b/spec/scenario/BorrowBalance.scen deleted file mode 100644 index 530a1b173..000000000 --- a/spec/scenario/BorrowBalance.scen +++ /dev/null @@ -1,88 +0,0 @@ --- Tests for the current borrow balance in a number of scenarios - -Macro NewBorrow borrowAmount borrowRate user=Geoff - NewComptroller price:1.0 -- TODO: This should really be a price for a specific asset - NewCToken ZRX cZRX - NewCToken BAT cBAT borrowRate -- note: cannot use macros with named args right now - Comptroller SetMarketSupplyCaps (vBAT) (1000e18) - Comptroller SetMarketSupplyCaps (vZRX) (1000e18) - Give cBAT 10e18 BAT -- Faucet some bat to borrow - Support cZRX collateralFactor:0.5 - Support cBAT collateralFactor:0.5 - SimpleBorrow user borrowAmount - -Macro SimpleBorrow user borrowAmount - Prep user Some ZRX cZRX - Mint user 100e18 cZRX - EnterMarkets user cZRX cBAT - Borrow user borrowAmount cBAT - -Test "Borrow Balance after 300000 blocks" - NewBorrow borrowAmount:1e18 borrowRate:0.000005 - Assert Equal (cToken cBAT BorrowBalance Geoff) (Exactly 1e18) - Assert Equal (cToken cBAT TotalBorrowsCurrent) (Exactly 1e18) - Assert Equal (Erc20 BAT TokenBalance Geoff) (Exactly 1e18) - Assert Equal (Erc20 BAT TokenBalance cBAT) (Exactly 9e18) - -- Now let's add some blocks and see what happs - FastForward 300000 Blocks -- 1e18 * (1 + 300000 * 0.000005) - Assert Equal (cToken cBAT BorrowBalance Geoff) (Exactly 2.5e18) - Assert Equal (cToken cBAT TotalBorrowsCurrent) (Exactly 2.5e18) - -Test "Borrow Balance after 300000 blocks and then 600000 blocks" - NewBorrow borrowAmount:1e18 borrowRate:0.000005 - Assert Equal (cToken cBAT BorrowBalance Geoff) (Exactly 1e18) - Assert Equal (cToken cBAT TotalBorrowsCurrent) (Exactly 1e18) - Assert Equal (Erc20 BAT TokenBalance Geoff) (Exactly 1e18) - Assert Equal (Erc20 BAT TokenBalance cBAT) (Exactly 9e18) - -- Now let's add some blocks and see what happs - FastForward 300000 Blocks -- 1e18 * (1 + 300000 * 0.000005) - AccrueInterest cBAT - Assert Equal (cToken cBAT BorrowBalance Geoff) (Exactly 2.5e18) - Assert Equal (cToken cBAT TotalBorrowsCurrent) (Exactly 2.5e18) - FastForward 600000 Blocks -- 1e18 * (1 + 300000 * 0.000005) * (1 + 600000 * 0.000005) - Assert Equal (cToken cBAT BorrowBalance Geoff) (Exactly 10e18) - Assert Equal (cToken cBAT TotalBorrowsCurrent) (Exactly 10e18) - -Test "Borrow Balance after accrual then changed interest rate" - NewBorrow borrowAmount:1e18 borrowRate:0.000005 - Assert Equal (cToken cBAT BorrowBalance Geoff) (Exactly 1e18) - Assert Equal (cToken cBAT TotalBorrowsCurrent) (Exactly 1e18) - Assert Equal (Erc20 BAT TokenBalance Geoff) (Exactly 1e18) - Assert Equal (Erc20 BAT TokenBalance cBAT) (Exactly 9e18) - -- Now let's add some blocks and see what happs - FastForward 300000 Blocks -- Current: 1e18 * (1 + 300000 * 0.000005) - -- Note: this should accrue interest - InterestRateModel Deploy Fixed Std 0.000004 - CToken cBAT SetInterestRateModel (InterestRateModel Std Address) - Comptroller SetMarketSupplyCaps (cBAT) (1000e18) - -- Check borrow balance still based on old figure (with previous interest accrual) - Assert Equal (cToken cBAT BorrowBalance Geoff) (Exactly 2.5e18) - Assert Equal (cToken cBAT TotalBorrowsCurrent) (Exactly 2.5e18) - -- Now accrue with new rate - FastForward 800000 Blocks -- 1e18 * (1 + 300000 * 0.000005) * (1 + 800000 * 0.000004) - Assert Equal (cToken cBAT BorrowBalance Geoff) (Exactly 10.5e18) - Assert Equal (cToken cBAT TotalBorrowsCurrent) (Exactly 10.5e18) - -Test "Total Borrow Balance with Two Borrowers" - NewBorrow borrowAmount:1e18 borrowRate:0.000005 user:Geoff - FastForward 300000 Blocks - InterestRateModel Deploy Fixed Std 0.000004 - CToken cBAT SetInterestRateModel (InterestRateModel Std Address) - Comptroller SetMarketSupplyCaps (cBAT) (1000e18) - -- Check borrow balance still based on old figure (with previous interest accrual) - Assert Equal (cToken cBAT BorrowBalance Geoff) (Exactly 2.5e18) - Assert Equal (cToken cBAT TotalBorrowsCurrent) (Exactly 2.5e18) - SimpleBorrow user:Torrey borrowAmount:5e18 - -- Now accrue with new rate - FastForward 800000 Blocks - -- Geoff: 1e18 * (1 + 300000 * 0.000005) * (1 + 800000 * 0.000004) - Assert Equal (cToken cBAT BorrowBalance Geoff) (Exactly 10.5e18) - -- Torrey: 5e18 * (1 + 800000 * 0.000004) - Assert Equal (cToken cBAT BorrowBalance Torrey) (Exactly 21e18) - Assert Equal (cToken cBAT TotalBorrowsCurrent) (Exactly 31.5e18) - -- And test some repayment - From Torrey (Erc20 BAT Approve cBAT 2.0e18) - RepayBorrow Torrey 2.0e18 cBAT - Assert Equal (cToken cBAT BorrowBalance Geoff) (Exactly 10.5e18) - Assert Equal (cToken cBAT BorrowBalance Torrey) (Exactly 19e18) - Assert Equal (cToken cBAT TotalBorrowsCurrent) (Exactly 29.5e18) diff --git a/spec/scenario/BorrowCap.scen b/spec/scenario/BorrowCap.scen deleted file mode 100644 index 4501b7527..000000000 --- a/spec/scenario/BorrowCap.scen +++ /dev/null @@ -1,182 +0,0 @@ - -Test "Attempt to borrow over set cap ERC20" - NewComptroller price:1.0 - NewCToken ZRX cZRX - NewCToken BAT cBAT - Comptroller SetMarketSupplyCaps (vBAT) (1000e18) - Comptroller SetMarketSupplyCaps (vZRX) (1000e18) - Comptroller SetMarketBorrowCaps (cBAT) (0.5e18) - Assert Equal (Comptroller BorrowCaps cBAT) (Exactly 0.5e18) - Give cBAT 10e18 BAT -- Faucet some bat to borrow - Support cZRX collateralFactor:0.5 - Support cBAT collateralFactor:0.5 - Prep Geoff Some ZRX cZRX - Mint Geoff 100e18 cZRX - EnterMarkets Geoff cZRX - AllowFailures - Borrow Geoff 1e18 cBAT - Assert Revert - Assert Equal (cToken cBAT BorrowBalance Geoff) (Exactly 0) - Assert Equal (Erc20 BAT TokenBalance Geoff) (Exactly 0) - Assert Equal (Erc20 BAT TokenBalance cBAT) (Exactly 10e18) - -Test "Attempt to borrow at set cap ERC20" - NewComptroller price:1.0 - NewCToken ZRX cZRX - NewCToken BAT cBAT - Comptroller SetMarketSupplyCaps (cBAT) (1000e18) - Comptroller SetMarketSupplyCaps (cZRX) (1000e18) - Comptroller SetMarketBorrowCaps (cBAT) (1000000000000000001) - Give cBAT 10e18 BAT -- Faucet some bat to borrow - Support cZRX collateralFactor:0.5 - Support cBAT collateralFactor:0.5 - Prep Geoff Some ZRX cZRX - Mint Geoff 100e18 cZRX - EnterMarkets Geoff cZRX - Borrow Geoff 1e18 cBAT - Assert Equal (cToken cBAT BorrowBalance Geoff) (Exactly 1e18) - Assert Equal (Erc20 BAT TokenBalance Geoff) (Exactly 1e18) - Assert Equal (Erc20 BAT TokenBalance cBAT) (Exactly 9e18) - Assert Equal (Comptroller MembershipLength Geoff) (Exactly 2) - Assert True (Comptroller CheckMembership Geoff cZRX) - Assert True (Comptroller CheckMembership Geoff cBAT) - -Test "Attempt to borrow below set cap ERC20" - NewComptroller price:1.0 - NewCToken ZRX cZRX - NewCToken BAT cBAT - Comptroller SetMarketSupplyCaps (cBAT) (1000e18) - Comptroller SetMarketSupplyCaps (cZRX) (1000e18) - Comptroller SetMarketBorrowCaps (cBAT) (10e18) - Give cBAT 10e18 BAT -- Faucet some bat to borrow - Support cZRX collateralFactor:0.5 - Support cBAT collateralFactor:0.5 - Prep Geoff Some ZRX cZRX - Mint Geoff 100e18 cZRX - EnterMarkets Geoff cZRX - Borrow Geoff 1e18 cBAT - Assert Equal (cToken cBAT BorrowBalance Geoff) (Exactly 1e18) - Assert Equal (Erc20 BAT TokenBalance Geoff) (Exactly 1e18) - Assert Equal (Erc20 BAT TokenBalance cBAT) (Exactly 9e18) - Assert Equal (Comptroller MembershipLength Geoff) (Exactly 2) - Assert True (Comptroller CheckMembership Geoff cZRX) - Assert True (Comptroller CheckMembership Geoff cBAT) - -Test "Borrow some Eth over cap" - NewComptroller price:1.0 - ListedCToken ZRX cZRX - ListedEtherToken cETH initialExchangeRate:0.005e9 - SetCollateralFactor cZRX collateralFactor:0.5 - SetCollateralFactor cETH collateralFactor:0.5 - Comptroller SetMarketSupplyCaps (cZRX) (1000e18) - Comptroller SetMarketSupplyCaps (cETH) (0.01e18) - Comptroller SetMarketBorrowCaps (cETH) (0.0001e18) - Donate cETH 0.003e18 - Prep Geoff Some ZRX cZRX - Mint Geoff 1e18 cZRX - EnterMarkets Geoff cZRX - AllowFailures - BorrowEth Geoff 0.001e18 cETH - Assert Revert - Assert Equal (EtherBalance cETH) 0.003e18 - -Test "Borrow some Eth enters Eth and succeeds when Eth not entered. At borrow cap" - NewComptroller price:1.0 - ListedCToken ZRX cZRX - ListedEtherToken cETH initialExchangeRate:0.005e9 - SetCollateralFactor cZRX collateralFactor:0.5 - SetCollateralFactor cETH collateralFactor:0.5 - Comptroller SetMarketBorrowCaps (cETH) (1000000000000001) - Donate cETH 0.003e18 - Prep Geoff Some ZRX cZRX - Mint Geoff 1e18 cZRX - EnterMarkets Geoff cZRX - Expect Changes (EtherBalance Geoff) +0.001e18 - BorrowEth Geoff 0.001e18 cETH - Assert Equal (EtherBalance cETH) 0.002e18 - Assert Equal (Comptroller Liquidity Geoff) 4.99e17 - Assert Equal (Comptroller MembershipLength Geoff) (Exactly 2) - Assert True (Comptroller CheckMembership Geoff cETH) - -Test "Borrow some Eth enters Eth and succeeds when Eth not entered. At under borrow cap" - NewComptroller price:1.0 - ListedCToken ZRX cZRX - ListedEtherToken cETH initialExchangeRate:0.005e9 - SetCollateralFactor cZRX collateralFactor:0.5 - SetCollateralFactor cETH collateralFactor:0.5 - Comptroller SetMarketSupplyCaps (cZRX) (1000e18) - Comptroller SetMarketBorrowCaps (cETH) (0.01e18) - Comptroller SetMarketSupplyCaps (cETH) (1000e18) - Donate cETH 0.003e18 - Prep Geoff Some ZRX cZRX - Mint Geoff 1e18 cZRX - EnterMarkets Geoff cZRX - Expect Changes (EtherBalance Geoff) +0.001e18 - BorrowEth Geoff 0.001e18 cETH - Assert Equal (EtherBalance cETH) 0.002e18 - Assert Equal (Comptroller Liquidity Geoff) 4.99e17 - Assert Equal (Comptroller MembershipLength Geoff) (Exactly 2) - Assert True (Comptroller CheckMembership Geoff cETH) - -Test "Setting borrow cap restricted to admin" - NewComptroller price:1.0 - ListedCToken ZRX cZRX - ListedEtherToken cETH initialExchangeRate:0.005e9 - SetCollateralFactor cZRX collateralFactor:0.5 - SetCollateralFactor cETH collateralFactor:0.5 - AllowFailures - From Robert (Comptroller SetMarketBorrowCaps (cETH) (0.01e18)) - Assert Revert - -Test "Borrow cap guardian can set borrow caps" - NewComptroller price:1.0 - ListedCToken ZRX cZRX - ListedEtherToken cETH initialExchangeRate:0.005e9 - SetCollateralFactor cZRX collateralFactor:0.5 - SetCollateralFactor cETH collateralFactor:0.5 - Comptroller SetBorrowCapGuardian Geoff - From Geoff (Comptroller SetMarketBorrowCaps (cZRX) (0.5e18)) - AllowFailures - From Robert (Comptroller SetMarketBorrowCaps (cZRX) (0.01e18)) -- Robert still can't... - Assert Revert - From Robert (Comptroller SetMarketBorrowCaps (cZRX) (0.01e18)) - Assert Revert - Assert Equal (Comptroller BorrowCaps cZRX) (Exactly 0.5e18) - Assert Equal (Comptroller BorrowCapGuardian) (User Geoff Address) - -Test "Only admin can set Borrow Cap Guardian" - NewComptroller price:1.0 - AllowFailures - From Robert (Comptroller SetBorrowCapGuardian Robert) -- Robert has really gone rogue - Assert Revert - -Test "SetBorrowCaps works correctly too" - NewComptroller price:1.0 - NewCToken ZRX cZRX - NewCToken BAT cBAT - Comptroller SetMarketSupplyCaps (cBAT) (1000e18) - Comptroller SetMarketSupplyCaps (cZRX) (1000e18) - NewCToken USDC cUSDC - Comptroller SetMarketBorrowCaps (cBAT cUSDC) (0.5e18 1000001) - Assert Equal (Comptroller BorrowCaps cBAT) (Exactly 0.5e18) - Assert Equal (Comptroller BorrowCaps cUSDC) (Exactly 1000001) - Give cBAT 10e18 BAT -- Faucet some bat to borrow - Give cUSDC 20e6 USDC - Support cZRX collateralFactor:0.5 - Support cBAT collateralFactor:0.5 - Support cUSDC collateralFactor:0.5 - Prep Geoff Some ZRX cZRX - Mint Geoff 100e18 cZRX - EnterMarkets Geoff cZRX - AllowFailures - Borrow Geoff 1e18 cBAT - Assert Revert - Borrow Geoff 2e6 cUSDC - Assert Revert - Successfully - Borrow Geoff 1e6 cUSDC - Assert Equal (cToken cBAT BorrowBalance Geoff) (Exactly 0) - Assert Equal (Erc20 BAT TokenBalance Geoff) (Exactly 0) - Assert Equal (Erc20 BAT TokenBalance cBAT) (Exactly 10e18) - Assert Equal (Erc20 USDC TokenBalance Geoff) (Exactly 1e6) - diff --git a/spec/scenario/BorrowEth.scen b/spec/scenario/BorrowEth.scen deleted file mode 100644 index 64a36663b..000000000 --- a/spec/scenario/BorrowEth.scen +++ /dev/null @@ -1,52 +0,0 @@ - -Test "Borrow some Eth enters Eth and succeeds when Eth not entered" - NewComptroller price:1.0 - ListedCToken ZRX cZRX - Comptroller SetMarketSupplyCaps (cZRX) (1000e18) - ListedEtherToken cETH initialExchangeRate:0.005e9 - SetCollateralFactor cZRX collateralFactor:0.5 - SetCollateralFactor cETH collateralFactor:0.5 - Donate cETH 0.003e18 - Prep Geoff Some ZRX cZRX - Mint Geoff 1e18 cZRX - EnterMarkets Geoff cZRX - Expect Changes (EtherBalance Geoff) +0.001e18 - BorrowEth Geoff 0.001e18 cETH - Assert Equal (EtherBalance cETH) 0.002e18 - Assert Equal (Comptroller Liquidity Geoff) 4.99e17 - Assert Equal (Comptroller MembershipLength Geoff) (Exactly 2) - Assert True (Comptroller CheckMembership Geoff cETH) - -Test "Borrow some ETH fails when no ETH available" - NewComptroller price:1.0 - ListedCToken ZRX cZRX - Comptroller SetMarketSupplyCaps (cZRX) (1000e18) - ListedEtherToken cETH initialExchangeRate:0.005e9 - SetCollateralFactor cZRX collateralFactor:0.5 - SetCollateralFactor cETH collateralFactor:0.5 - Prep Geoff Some ZRX cZRX - Mint Geoff 100e18 cZRX - EnterMarkets Geoff cZRX cETH - AllowFailures - Invariant Static (CToken cZRX ExchangeRateStored) - Invariant Static (CToken cETH ExchangeRateStored) - Invariant Static (Comptroller Liquidity Geoff) - Invariant Static (EtherBalance Geoff) - BorrowEth Geoff 1e18 cETH - Assert RevertCustomError BorrowCashNotAvailable - -Test "Borrow some ETH from excess cash" - NewComptroller price:1.0 - ListedCToken ZRX cZRX - Comptroller SetMarketSupplyCaps (cZRX) (1000e18) - ListedEtherToken cETH initialExchangeRate:0.005e9 - SetCollateralFactor cZRX collateralFactor:0.5 - SetCollateralFactor cETH collateralFactor:0.5 - Donate cETH 0.003e18 - Prep Geoff Some ZRX cZRX - Mint Geoff 1e18 cZRX - EnterMarkets Geoff cZRX cETH - Expect Changes (EtherBalance Geoff) +0.001e18 - BorrowEth Geoff 0.001e18 cETH - Assert Equal (EtherBalance cETH) 0.002e18 - Assert Equal (Comptroller Liquidity Geoff) 4.99e17 diff --git a/spec/scenario/BorrowWBTC.scen b/spec/scenario/BorrowWBTC.scen deleted file mode 100644 index 8a67c9914..000000000 --- a/spec/scenario/BorrowWBTC.scen +++ /dev/null @@ -1,71 +0,0 @@ - -Test "Borrow some WBTC enters WBTC and succeeds when not entered" - Invariant Success - NewComptroller price:1.0 - NewCToken ZRX cZRX - NewCToken WBTC cWBTC tokenType:WBTC - Comptroller SetMarketSupplyCaps (cWBTC) (1000e18) - Comptroller SetMarketSupplyCaps (cZRX) (1000e18) - Give cWBTC 10e8 WBTC -- Faucet some WBTC to borrow - Support cZRX collateralFactor:0.5 - Support cWBTC collateralFactor:0.5 - Prep Geoff Some ZRX cZRX - Mint Geoff 100e18 cZRX - EnterMarkets Geoff cZRX - Borrow Geoff 1e8 cWBTC - Assert Equal (cToken cWBTC BorrowBalance Geoff) (Exactly 1e8) - Assert Equal (Erc20 WBTC TokenBalance Geoff) (Exactly 1e8) - Assert Equal (Erc20 WBTC TokenBalance cWBTC) (Exactly 9e8) - -Test "Borrow some WBTC fails when no WBTC available" - NewComptroller price:1.0 - NewCToken ZRX cZRX - NewCToken WBTC cWBTC tokenType:WBTC - Comptroller SetMarketSupplyCaps (cZRX) (1000e18) - Comptroller SetMarketSupplyCaps (cWBTC) (1000e18) - Support cZRX collateralFactor:0.5 - Support cWBTC collateralFactor:0.5 - Prep Geoff Some ZRX cZRX - Mint Geoff 100e18 cZRX - EnterMarkets Geoff cZRX cWBTC - Invariant Static (CToken cZRX ExchangeRateStored) - AllowFailures - Borrow Geoff 1e8 cWBTC - Assert RevertCustomError BorrowCashNotAvailable - -Test "Borrow some WBTC fails when WBTC paused" - NewComptroller price:1.0 - NewCToken ZRX cZRX - NewCToken WBTC cWBTC tokenType:WBTC - Comptroller SetMarketSupplyCaps (vWBTC) (1000e18) - Comptroller SetMarketSupplyCaps (vZRX) (1000e18) - Give cWBTC 10e8 WBTC -- Faucet some WBTC to borrow - Support cZRX collateralFactor:0.5 - Support cWBTC collateralFactor:0.5 - Prep Geoff Some ZRX cZRX - Mint Geoff 100e18 cZRX - EnterMarkets Geoff cZRX cWBTC - Invariant Static (CToken cZRX ExchangeRateStored) - Erc20 WBTC Pause - AllowFailures - Borrow Geoff 1e8 cWBTC - Assert Revert - -Test "Borrow some WBTC from Excess Cash" - Invariant Success - NewComptroller price:1.0 - NewCToken ZRX cZRX - NewCToken WBTC cWBTC tokenType:WBTC - Comptroller SetMarketSupplyCaps (vWBTC) (1000e18) - Comptroller SetMarketSupplyCaps (vZRX) (1000e18) - Give cWBTC 10e8 WBTC -- Faucet some WBTC to borrow - Support cZRX collateralFactor:0.5 - Support cWBTC collateralFactor:0.5 - Prep Geoff Some ZRX cZRX - Mint Geoff 100e18 cZRX - EnterMarkets Geoff cZRX cWBTC - Borrow Geoff 1e8 cWBTC - EnterMarkets Geoff cZRX cWBTC - Assert Equal (cToken cWBTC BorrowBalance Geoff) (Exactly 1e8) - Assert Equal (Erc20 WBTC TokenBalance Geoff) (Exactly 1e8) - Assert Equal (Erc20 WBTC TokenBalance cWBTC) (Exactly 9e8) diff --git a/spec/scenario/BreakLiquidate.scen b/spec/scenario/BreakLiquidate.scen deleted file mode 100644 index 75d2ed3f8..000000000 --- a/spec/scenario/BreakLiquidate.scen +++ /dev/null @@ -1,84 +0,0 @@ - -Macro NewBorrow borrowAmount mintAmount borrowRate=0.000005 user=Geoff collateralPrice=1.0 borrowPrice=1.0 liquidationIncentive=1.1 - PricedComptroller closeFactor:0.9 -- Set the close factor high to reduce number of steps to demonstrate - Comptroller LiquidationIncentive liquidationIncentive - NewCToken ZRX cZRX - NewCToken BAT cBAT borrowRate - Comptroller SetMarketSupplyCaps (cBAT) (1000e18) - Comptroller SetMarketSupplyCaps (cZRX) (1000e18) - Give cBAT 10e18 BAT -- Faucet some bat to borrow - PriceOracle SetPrice cZRX collateralPrice - Support cZRX collateralFactor:0.7 - PriceOracle SetPrice cBAT borrowPrice - Support cBAT collateralFactor:0 - SimpleBorrow user borrowAmount mintAmount - -Macro SimpleBorrow user borrowAmount mintAmount - Prep user mintAmount ZRX cZRX - Mint user mintAmount cZRX - EnterMarkets user cZRX cBAT - Borrow user borrowAmount cBAT - -Test "When account goes further underwater than the liquidation incentive and cannot pay down debt fully" - -- Happens whenever collateral ratio > liquidation discount (i.e. 1 / liquidation incentive) - -- - -- Start right around the liquidity threshold - NewBorrow borrowAmount:1e18 mintAmount:1.43e18 liquidationIncentive:1.1 - -- - -- Verify that the borrow results in the correct state - Assert Equal (CToken cBAT BorrowBalance Geoff) 1e18 - Assert Equal (CToken cZRX UnderlyingBalance Geoff) 1.43e18 - -- - -- Put the account underwater s.t. 0.91 < Borrow/Supply - -- i.e. (1 / liquidationIncentive) < Borrow/Supply - PriceOracle SetPrice cZRX 0.76 - -- - -- Pay back a bunch of debt by liquidating - Prep Jared 10e18 BAT cBAT - Liquidate Jared "->" Geoff 0.9e18 cBAT "Seizing" cZRX - Assert Equal (CToken cBAT BorrowBalance Geoff) 0.1e18 - Assert Equal (CToken cZRX UnderlyingBalance Geoff) 0.127368422e18 - -- Do it again, and note that the collateral is gone but borrows remain - -- if we had set the close factor lower, it would just take more steps - Liquidate Jared "->" Geoff 0.0880000008e18 cBAT "Seizing" cZRX - Assert Equal (CToken cBAT BorrowBalance Geoff) 0.0119999992e18 - Assert Equal (CToken cZRX UnderlyingBalance Geoff) 0 - -Test "When liquidation incentive is too high to be effective" - -- Happens whenever liquidation discount < collateral factor - -- - -- Start right around the liquidity threshold - NewBorrow borrowAmount:1e18 mintAmount:1.43e18 liquidationIncentive:1.5 - -- - -- Verify that the borrow results in the correct state - Assert Equal (CToken cBAT BorrowBalance Geoff) 1e18 - Assert Equal (CToken cZRX UnderlyingBalance Geoff) 1.43e18 - -- - -- Put the account underwater s.t. 0.7 < Borrow/Supply - -- i.e. collateral factor < Borrow/Supply - PriceOracle SetPrice cZRX 0.87 - -- - -- Now any amount of debt that we pay back by liquidating will make liquidity worse - -- - -- First, prepare to liquidate - Prep Jared 10e18 BAT cBAT - Expect Changes (Comptroller Liquidity Geoff) -0.024999999076e18 - -- Note that the account collateral ratio will become worse than before - -- although shortfall decreases in absolute terms - -- had Supply/Borrow = 1.430000000 * 0.87 / 1.0 = 1.244100000 - -- now Supply/Borrow = 0.567931036 * 0.87 / 0.5 = 1.135862072 - -- - -- Now perform the liquidation - Liquidate Jared "->" Geoff 0.5e18 cBAT "Seizing" cZRX - -- - -- Verify that the liquidation went through - Assert Equal (CToken cBAT BorrowBalance Geoff) 0.5e18 - Assert Equal (CToken cZRX UnderlyingBalance Geoff) 0.567931036e18 - -- - -- Test succeeded which means our expectation was correct - -- liquidity went down after a liquidation! - -- - -- Now lets see that lowering the incentive and liquidating improves the situation - Comptroller LiquidationIncentive 1.2 - Expect Changes (Comptroller Liquidity Geoff) 0.016000000294e18 - Liquidate Jared "->" Geoff 0.1e18 cBAT "Seizing" cZRX diff --git a/spec/scenario/CTokenAdmin.scen b/spec/scenario/CTokenAdmin.scen deleted file mode 100644 index 807725a97..000000000 --- a/spec/scenario/CTokenAdmin.scen +++ /dev/null @@ -1,43 +0,0 @@ - -Test "Set admin" - NewComptroller - NewCToken ZRX cZRX - Assert Equal (CToken cZRX Admin) (Address Root) - Assert Equal (CToken cZRX PendingAdmin) (Address Zero) - From Root (CToken cZRX SetPendingAdmin Geoff) - Assert Equal (CToken cZRX Admin) (Address Root) - Assert Equal (CToken cZRX PendingAdmin) (Address Geoff) - From Geoff (CToken cZRX AcceptAdmin) - Assert Equal (CToken cZRX Admin) (Address Geoff) - Assert Equal (CToken cZRX PendingAdmin) (Address Zero) - -Test "Set admin to contructor argument" - NewComptroller - NewCToken ZRX cZRX admin:Torrey - Assert Equal (CToken cZRX Admin) (Address Torrey) - Assert Equal (CToken cZRX PendingAdmin) (Address Zero) - From Torrey (CToken cZRX SetPendingAdmin Geoff) - Assert Equal (CToken cZRX Admin) (Address Torrey) - Assert Equal (CToken cZRX PendingAdmin) (Address Geoff) - From Geoff (CToken cZRX AcceptAdmin) - Assert Equal (CToken cZRX Admin) (Address Geoff) - Assert Equal (CToken cZRX PendingAdmin) (Address Zero) - - -Test "Fail to set pending admin" - NewComptroller - NewCToken ZRX cZRX - Invariant Remains (CToken cZRX Admin) (Address Root) - Invariant Remains (CToken cZRX PendingAdmin) (Address Zero) - AllowFailures - From Geoff (CToken cZRX SetPendingAdmin Geoff) - Assert RevertCustomError SetPendingAdminOwnerCheck - -Test "Fail to accept admin" - NewComptroller - NewCToken ZRX cZRX - Invariant Remains (CToken cZRX Admin) (Address Root) - Invariant Remains (CToken cZRX PendingAdmin) (Address Zero) - AllowFailures - From Geoff (CToken cZRX AcceptAdmin) - Assert RevertCustomError AcceptAdminPendingAdminCheck diff --git a/spec/scenario/ChangeDelegate.scen b/spec/scenario/ChangeDelegate.scen deleted file mode 100644 index 0921de4e2..000000000 --- a/spec/scenario/ChangeDelegate.scen +++ /dev/null @@ -1,12 +0,0 @@ --- Delegate upgrade tests - -Test "Change the delegate" - NewComptroller - NewCToken DEL cDEL - Comptroller SetMarketSupplyCaps (cDEL) (1000e18) - Support cDEL collateralFactor:0.5 - Prep Jared Some DEL cDEL - Mint Jared 100e18 cDEL - CTokenDelegate Deploy CErc20Delegate cErc20Delegate2 - CToken cDEL SetImplementation (CTokenDelegate cErc20Delegate2 Address) True "0x0" - Redeem Jared 50e9 cDEL diff --git a/spec/scenario/Comp/Comp.scen b/spec/scenario/Comp/Comp.scen deleted file mode 100644 index db51ee9f1..000000000 --- a/spec/scenario/Comp/Comp.scen +++ /dev/null @@ -1,300 +0,0 @@ - -Test "Check Name" - Comp Deploy Geoff - Assert Equal (Comp Name) "Compound" - -Test "Check Symbol" - Comp Deploy Geoff - Assert Equal (Comp Symbol) "COMP" - -Test "Check Decimals" - Comp Deploy Geoff - Assert Equal (Comp Decimals) 18 - -Test "Check Total Supply" - Comp Deploy Geoff - Assert Equal (Comp TotalSupply) 10000000e18 - -Test "Check account receives Total Supply after deploy and emits Transfer event" - Comp Deploy Geoff - Assert Equal (Comp TokenBalance Geoff) 10000000e18 - Assert Log Transfer (from (Address Zero)) (to (Address Geoff)) (amount "10000000000000000000000000") - -Test "Check approve sets correct approval and emits Approval event" - Comp Deploy Geoff - From Geoff (Comp Approve Jared 10) - Assert Equal (Comp Allowance Geoff Jared) 10 - Assert Log Approval (owner (Address Geoff)) (spender (Address Jared)) (amount "10") - -Test "Check approve with bad allowance reverts" - Comp Deploy Geoff - AllowFailures - From Geoff (Comp Approve Jared 1e70) - Assert Revert "revert Comp::approve: amount exceeds 96 bits" - -Test "Check transfer updates balances correctly, emits Transfer event, and returns true" - Comp Deploy Geoff - From Geoff (Comp Transfer Jared 10) - Assert Equal (Comp TokenBalance Geoff) 9999999999999999999999990 - Assert Equal (Comp TokenBalance Jared) 10 - Assert Log Transfer (from (Address Geoff)) (to (Address Jared)) (amount "10") - -Test "Check self-transfer updates balances correctly, emits Transfer event, and returns true" - Comp Deploy Geoff - Expect Changes (Comp VotesLength Geoff) Zero - Expect Changes (Comp TokenBalance Geoff) Zero - From Geoff (Comp Transfer Geoff 10) - Assert Log Transfer (from (Address Geoff)) (to (Address Geoff)) (amount "10") - Expect Changes (Comp VotesLength Geoff) Zero - Expect Changes (Comp TokenBalance Geoff) Zero - From Geoff (Comp Transfer Geoff 0) - Assert Log Transfer (from (Address Geoff)) (to (Address Geoff)) (amount "0") - -Test "Check transferFrom with unlimited allowance updates balances correctly, emits Transfer event, and returns true" - Comp Deploy Geoff - From Geoff (Comp Approve Jared UInt256Max) - From Jared (Comp TransferFrom Geoff Jared 10) - Assert Equal (Comp TokenBalance Geoff) 9999999999999999999999990 - Assert Equal (Comp TokenBalance Jared) 10 - Assert Equal (Comp Allowance Geoff Jared) UInt96Max - Assert Log Transfer (from (Address Geoff)) (to (Address Jared)) (amount "10") - -Test "Check transferFrom with unlimited allowance updates balances correctly, emits Transfer event, and returns true" - Comp Deploy Geoff - From Geoff (Comp Approve Jared UInt96Max) - From Jared (Comp TransferFrom Geoff Jared 10) - Assert Equal (Comp TokenBalance Geoff) 9999999999999999999999990 - Assert Equal (Comp TokenBalance Jared) 10 - Assert Equal (Comp Allowance Geoff Jared) UInt96Max - Assert Log Transfer (from (Address Geoff)) (to (Address Jared)) (amount "10") - -Test "Check transferFrom with allowance updates balances correctly, emits Transfer event, and returns true" - Comp Deploy Geoff - From Geoff (Comp Approve Jared 10) - From Jared (Comp TransferFrom Geoff Jared 9) - Assert Equal (Comp TokenBalance Geoff) 9999999999999999999999991 - Assert Equal (Comp TokenBalance Jared) 9 - Assert Equal (Comp Allowance Geoff Jared) 1 - Assert Log Transfer (from (Address Geoff)) (to (Address Jared)) (amount "9") - Assert Log Approval (owner (Address Geoff)) (spender (Address Jared)) (amount "1") - -Test "Check transferFrom reverts with not sufficient allowance" - Comp Deploy Geoff - From Geoff (Comp Approve Jared 10) - AllowFailures - From Jared (Comp TransferFrom Geoff Jared 11) - Assert Revert "revert Comp::transferFrom: transfer amount exceeds spender allowance" - -Test "Check transfer reverts when transferring too much" - Comp Deploy Geoff - AllowFailures - From Geoff (Comp Transfer Jared 10000001e18) - Assert Revert "revert Comp::_transferTokens: transfer amount exceeds balance" - -Test "Check transfer reverts when transferring to address 0" - Comp Deploy Geoff - AllowFailures - From Geoff (Comp Transfer (Address Zero) 10000000e18) - Assert Revert "revert Comp::_transferTokens: cannot transfer to the zero address" - -Test "Delegate with zero balance doesn't change votes checkpoints" - Comp Deploy Geoff - Assert Equal (Comp VotesLength Geoff) 0 - From Jared (Comp Delegate Geoff) - Assert Equal (Comp VotesLength Geoff) 0 - Assert Log DelegateChanged (delegator (Address Jared)) (fromDelegate (Address Zero)) (toDelegate (Address Geoff)) - -Test "Delegate from address(0) to account with zero checkpoints" - Comp Deploy Geoff - From Geoff (Comp Transfer Jared 10) - Assert Equal (Comp VotesLength Geoff) 0 - From Jared (Comp Delegate Geoff) - Assert Equal (Comp VotesLength Geoff) 1 - Assert Equal (Comp GetCurrentVotes Geoff) 10 - Assert Equal (Comp GetCurrentVotesBlock Geoff) LastBlock - Assert Equal (Comp VotesLength Zero) 0 - Assert Log DelegateChanged (delegator (Address Jared)) (fromDelegate (Address Zero)) (toDelegate (Address Geoff)) - Assert Log DelegateVotesChanged (delegate (Address Geoff)) (previousBalance "0") (newBalance "10") - -Test "Delegate from address(0) to account with existing checkpoints" - Comp Deploy Geoff - From Geoff (Comp Transfer Jared 10) - From Geoff (Comp Transfer Torrey 14) - Assert Equal (Comp VotesLength Geoff) 0 - From Jared (Comp Delegate Geoff) - Assert Equal (Comp VotesLength Geoff) 1 - Assert Equal (Comp GetCurrentVotes Geoff) 10 - Assert Equal (Comp GetCurrentVotesBlock Geoff) LastBlock - Assert Log DelegateChanged (delegator (Address Jared)) (fromDelegate (Address Zero)) (toDelegate (Address Geoff)) - Assert Log DelegateVotesChanged (delegate (Address Geoff)) (previousBalance "0") (newBalance "10") - From Torrey (Comp Delegate Geoff) - Assert Equal (Comp VotesLength Geoff) 2 - Assert Equal (Comp GetCurrentVotes Geoff) 24 - Assert Equal (Comp GetCurrentVotesBlock Geoff) LastBlock - Assert Equal (Comp VotesLength Zero) 0 - Assert Log DelegateChanged (delegator (Address Torrey)) (fromDelegate (Address Zero)) (toDelegate (Address Geoff)) - Assert Log DelegateVotesChanged (delegate (Address Geoff)) (previousBalance "10") (newBalance "24") - -Test "Delegate to address(0)" - Comp Deploy Geoff - From Geoff (Comp Transfer Jared 10) - From Geoff (Comp Transfer Torrey 14) - Assert Equal (Comp VotesLength Geoff) 0 - From Jared (Comp Delegate Geoff) - Assert Equal (Comp VotesLength Geoff) 1 - Assert Equal (Comp GetCurrentVotes Geoff) 10 - Assert Equal (Comp GetCurrentVotesBlock Geoff) LastBlock - Assert Log DelegateChanged (delegator (Address Jared)) (fromDelegate (Address Zero)) (toDelegate (Address Geoff)) - Assert Log DelegateVotesChanged (delegate (Address Geoff)) (previousBalance "0") (newBalance "10") - From Torrey (Comp Delegate Geoff) - Assert Equal (Comp VotesLength Geoff) 2 - Assert Equal (Comp GetCurrentVotes Geoff) 24 - Assert Equal (Comp GetCurrentVotesBlock Geoff) LastBlock - Assert Log DelegateChanged (delegator (Address Torrey)) (fromDelegate (Address Zero)) (toDelegate (Address Geoff)) - Assert Log DelegateVotesChanged (delegate (Address Geoff)) (previousBalance "10") (newBalance "24") - From Torrey (Comp Delegate Zero) - Assert Equal (Comp VotesLength Geoff) 3 - Assert Equal (Comp GetCurrentVotes Geoff) 10 - Assert Equal (Comp GetCurrentVotesBlock Geoff) LastBlock - Assert Log DelegateChanged (delegator (Address Torrey)) (fromDelegate (Address Geoff)) (toDelegate (Address Zero)) - Assert Log DelegateVotesChanged (delegate (Address Geoff)) (previousBalance "24") (newBalance "10") - Assert Equal (Comp VotesLength Zero) 0 - -Test "Delegate from one account to another account with zero checkpoints" - Comp Deploy Geoff - From Geoff (Comp Transfer Jared 10) - From Geoff (Comp Transfer Torrey 14) - Assert Equal (Comp VotesLength Geoff) 0 - From Jared (Comp Delegate Geoff) - Assert Equal (Comp VotesLength Geoff) 1 - Assert Equal (Comp GetCurrentVotes Geoff) 10 - Assert Equal (Comp GetCurrentVotesBlock Geoff) LastBlock - Assert Log DelegateChanged (delegator (Address Jared)) (fromDelegate (Address Zero)) (toDelegate (Address Geoff)) - Assert Log DelegateVotesChanged (delegate (Address Geoff)) (previousBalance "0") (newBalance "10") - From Torrey (Comp Delegate Geoff) - Assert Equal (Comp VotesLength Geoff) 2 - Assert Equal (Comp GetCurrentVotes Geoff) 24 - Assert Equal (Comp GetCurrentVotesBlock Geoff) LastBlock - Assert Equal (Comp VotesLength Coburn) 0 - Assert Log DelegateChanged (delegator (Address Torrey)) (fromDelegate (Address Zero)) (toDelegate (Address Geoff)) - Assert Log DelegateVotesChanged (delegate (Address Geoff)) (previousBalance "10") (newBalance "24") - From Torrey (Comp Delegate Coburn) - Assert Equal (Comp VotesLength Coburn) 1 - Assert Equal (Comp GetCurrentVotes Coburn) 14 - Assert Equal (Comp GetCurrentVotesBlock Coburn) LastBlock - Assert Equal (Comp VotesLength Geoff) 3 - Assert Equal (Comp GetCurrentVotes Geoff) 10 - Assert Equal (Comp GetCurrentVotesBlock Geoff) LastBlock - Assert Log DelegateChanged (delegator (Address Torrey)) (fromDelegate (Address Geoff)) (toDelegate (Address Coburn)) - Assert Log DelegateVotesChanged (delegate (Address Geoff)) (previousBalance "24") (newBalance "10") - Assert Log DelegateVotesChanged (delegate (Address Coburn)) (previousBalance "0") (newBalance "14") - -Test "Delegate from one account to another account with multiple checkpoints" - Comp Deploy Geoff - From Geoff (Comp Transfer Jared 10) - From Geoff (Comp Transfer Torrey 14) - From Geoff (Comp Transfer Coburn 2) - Assert Equal (Comp VotesLength Geoff) 0 - From Jared (Comp Delegate Geoff) - Assert Equal (Comp VotesLength Geoff) 1 - Assert Equal (Comp GetCurrentVotes Geoff) 10 - Assert Equal (Comp GetCurrentVotesBlock Geoff) LastBlock - Assert Log DelegateChanged (delegator (Address Jared)) (fromDelegate (Address Zero)) (toDelegate (Address Geoff)) - Assert Log DelegateVotesChanged (delegate (Address Geoff)) (previousBalance "0") (newBalance "10") - From Torrey (Comp Delegate Geoff) - Assert Equal (Comp VotesLength Geoff) 2 - Assert Equal (Comp GetCurrentVotes Geoff) 24 - Assert Equal (Comp GetCurrentVotesBlock Geoff) LastBlock - Assert Equal (Comp VotesLength Coburn) 0 - Assert Log DelegateChanged (delegator (Address Torrey)) (fromDelegate (Address Zero)) (toDelegate (Address Geoff)) - Assert Log DelegateVotesChanged (delegate (Address Geoff)) (previousBalance "10") (newBalance "24") - From Coburn (Comp Delegate Coburn) - Assert Equal (Comp VotesLength Coburn) 1 - Assert Equal (Comp GetCurrentVotes Coburn) 2 - Assert Equal (Comp GetCurrentVotesBlock Coburn) LastBlock - Assert Log DelegateChanged (delegator (Address Coburn)) (fromDelegate (Address Zero)) (toDelegate (Address Coburn)) - Assert Log DelegateVotesChanged (delegate (Address Coburn)) (previousBalance "0") (newBalance "2") - From Torrey (Comp Delegate Coburn) - Assert Equal (Comp VotesLength Coburn) 2 - Assert Equal (Comp GetCurrentVotes Coburn) 16 - Assert Equal (Comp GetCurrentVotesBlock Coburn) LastBlock - Assert Equal (Comp VotesLength Geoff) 3 - Assert Equal (Comp GetCurrentVotes Geoff) 10 - Assert Equal (Comp GetCurrentVotesBlock Geoff) LastBlock - Assert Log DelegateChanged (delegator (Address Torrey)) (fromDelegate (Address Geoff)) (toDelegate (Address Coburn)) - Assert Log DelegateVotesChanged (delegate (Address Geoff)) (previousBalance "24") (newBalance "10") - Assert Log DelegateVotesChanged (delegate (Address Coburn)) (previousBalance "2") (newBalance "16") - -Test "Vote checkpoints don't change on transfer when to and from accounts delegate to same account" - Comp Deploy Geoff - From Geoff (Comp Transfer Jared 10) - From Geoff (Comp Transfer Torrey 14) - Assert Equal (Comp VotesLength Geoff) 0 - From Jared (Comp Delegate Geoff) - Assert Equal (Comp VotesLength Geoff) 1 - Assert Equal (Comp GetCurrentVotes Geoff) 10 - Assert Equal (Comp GetCurrentVotesBlock Geoff) LastBlock - Assert Log DelegateChanged (delegator (Address Jared)) (fromDelegate (Address Zero)) (toDelegate (Address Geoff)) - Assert Log DelegateVotesChanged (delegate (Address Geoff)) (previousBalance "0") (newBalance "10") - From Torrey (Comp Delegate Geoff) - Assert Equal (Comp VotesLength Geoff) 2 - Assert Equal (Comp GetCurrentVotes Geoff) 24 - Assert Equal (Comp GetCurrentVotesBlock Geoff) LastBlock - Assert Log DelegateChanged (delegator (Address Torrey)) (fromDelegate (Address Zero)) (toDelegate (Address Geoff)) - Assert Log DelegateVotesChanged (delegate (Address Geoff)) (previousBalance "10") (newBalance "24") - Invariant Static (Comp VotesLength Geoff) - Invariant Static (Comp GetCurrentVotes Geoff) - Invariant Static (Comp GetCurrentVotesBlock Geoff) - From Torrey (Comp Transfer Jared 14) - -Test "Only one checkpoint is added per block for multiple increased balance updates" - Comp Deploy Scenario Geoff - Assert Equal (Comp VotesLength Geoff) 0 - Assert Equal (Comp GetCurrentVotes Geoff) 0 - From Jared (Comp Delegate Geoff) - Assert Log DelegateChanged (delegator (Address Jared)) (fromDelegate (Address Zero)) (toDelegate (Address Geoff)) - From Torrey (Comp Delegate Geoff) - Assert Log DelegateChanged (delegator (Address Torrey)) (fromDelegate (Address Zero)) (toDelegate (Address Geoff)) - From Geoff (Comp TransferScenario (Jared Torrey) 10) - Assert Equal (Comp VotesLength Geoff) 1 - Assert Equal (Comp GetCurrentVotes Geoff) 20 - Assert Equal (Comp GetCurrentVotesBlock Geoff) LastBlock - Assert Equal (Comp VotesLength Zero) 0 - Assert Log DelegateVotesChanged (delegate (Address Geoff)) (previousBalance "0") (newBalance "10") - Assert Log DelegateVotesChanged (delegate (Address Geoff)) (previousBalance "10") (newBalance "20") - -Test "Only one checkpoint is added per block for multiple decreased balance updates" - Comp Deploy Scenario Geoff - From Geoff (Comp Transfer Jared 10) - From Geoff (Comp Transfer Torrey 10) - Assert Equal (Comp VotesLength Geoff) 0 - Assert Equal (Comp GetCurrentVotes Geoff) 0 - From Jared (Comp Delegate Geoff) - Assert Equal (Comp VotesLength Geoff) 1 - Assert Equal (Comp GetCurrentVotes Geoff) 10 - Assert Equal (Comp GetCurrentVotesBlock Geoff) LastBlock - Assert Log DelegateChanged (delegator (Address Jared)) (fromDelegate (Address Zero)) (toDelegate (Address Geoff)) - Assert Log DelegateVotesChanged (delegate (Address Geoff)) (previousBalance "0") (newBalance "10") - From Torrey (Comp Delegate Geoff) - Assert Equal (Comp VotesLength Geoff) 2 - Assert Equal (Comp GetCurrentVotes Geoff) 20 - Assert Equal (Comp GetCurrentVotesBlock Geoff) LastBlock - Assert Log DelegateChanged (delegator (Address Torrey)) (fromDelegate (Address Zero)) (toDelegate (Address Geoff)) - Assert Log DelegateVotesChanged (delegate (Address Geoff)) (previousBalance "10") (newBalance "20") - From Jared (Comp Approve Geoff 10) - From Torrey (Comp Approve Geoff 10) - From Geoff (Comp TransferFromScenario (Jared Torrey) 10) - Assert Equal (Comp VotesLength Geoff) 3 - Assert Equal (Comp GetCurrentVotes Geoff) 0 - Assert Equal (Comp GetCurrentVotesBlock Geoff) LastBlock - Assert Equal (Comp VotesLength Zero) 0 - Assert Log DelegateVotesChanged (delegate (Address Geoff)) (previousBalance "20") (newBalance "10") - Assert Log DelegateVotesChanged (delegate (Address Geoff)) (previousBalance "10") (newBalance "0") - -Test "Check transfer reverts when block number exceeds 32 bits" - Comp Deploy Geoff - From Jared (Comp Delegate Geoff) - AllowFailures - SetBlockNumber 5000000000 - From Geoff (Comp Transfer Jared 10000000e18) - Assert Revert "revert Comp::_writeCheckpoint: block number exceeds 32 bits" diff --git a/spec/scenario/CoreMacros b/spec/scenario/CoreMacros deleted file mode 100644 index cc5238c8d..000000000 --- a/spec/scenario/CoreMacros +++ /dev/null @@ -1,258 +0,0 @@ --- These are included in each scenario - -Macro Successfully - Invariant Success - -Macro AllowFailures - ClearInvariants Success - -Macro PricedComptroller closeFactor=0.1 maxAssets=20 - Unitroller Deploy - PriceOracle Deploy Simple - ComptrollerImpl Deploy ScenarioG1 ScenComptrollerG1 - Unitroller SetPendingImpl ScenComptrollerG1 - PriceOracleProxy Deploy Admin (PriceOracle Address) (Address Zero) (Address Zero) (Address Zero) (Address Zero) (Address Zero) -- if listing cEther use ListedEtherToken to replace proxy - ComptrollerImpl ScenComptrollerG1 BecomeG1 (PriceOracleProxy Address) closeFactor maxAssets - ComptrollerImpl Deploy Scenario ScenComptroller - Unitroller SetPendingImpl ScenComptroller - ComptrollerImpl ScenComptroller Become - -Macro NewComptroller price=1.0 closeFactor=0.1 maxAssets=20 - --g1 - Unitroller Deploy - PriceOracle Deploy Fixed price - ComptrollerImpl Deploy ScenarioG1 ScenComptrollerG1 - Unitroller SetPendingImpl ScenComptrollerG1 - PriceOracleProxy Deploy Admin (PriceOracle Address) (Address Zero) (Address Zero) (Address Zero) (Address Zero) (Address Zero) -- if listing cEther use ListedEtherToken to replace proxy - ComptrollerImpl ScenComptrollerG1 BecomeG1 (PriceOracleProxy Address) closeFactor maxAssets - --g2 - ComptrollerImpl Deploy StandardG2 ComptrollerG2 - Unitroller SetPendingImpl ComptrollerG2 - ComptrollerImpl ComptrollerG2 BecomeG2 - --g3 - ComptrollerImpl Deploy StandardG3 ComptrollerG3 - Unitroller SetPendingImpl ComptrollerG3 - ComptrollerImpl ComptrollerG3 BecomeG3 1e18 [] - --g4 - ComptrollerImpl Deploy StandardG4 ComptrollerG4 - Unitroller SetPendingImpl ComptrollerG4 - ComptrollerImpl ComptrollerG4 BecomeG4 - --g5 - ComptrollerImpl Deploy ScenarioG5 ComptrollerG5 - Unitroller SetPendingImpl ComptrollerG5 - ComptrollerImpl ComptrollerG5 BecomeG5 - --g6 - ComptrollerImpl Deploy ScenarioG6 ComptrollerG6 - Unitroller SetPendingImpl ComptrollerG6 - ComptrollerImpl ComptrollerG6 BecomeG6 - --current - ComptrollerImpl Deploy Scenario ComptrollerScen - Unitroller SetPendingImpl ComptrollerScen - ComptrollerImpl ComptrollerScen Become - -Macro NewCToken erc20 cToken borrowRate=0.000005 initialExchangeRate=2e9 decimals=8 tokenType=Standard delegatorType=CErc20DelegatorScenario cTokenType=CErc20DelegateScenario admin=Admin becomeImplementationData="0x0" - Erc20 Deploy tokenType erc20 erc20 - InterestRateModel Deploy Fixed StdInterest borrowRate -- Note: interest rate model probably shouldn't be global - CTokenDelegate Deploy cTokenType cErc20Delegate - CToken Deploy delegatorType cToken cToken (Erc20 erc20 Address) (Comptroller Address) (InterestRateModel StdInterest Address) initialExchangeRate decimals admin (CTokenDelegate cErc20Delegate Address) becomeImplementationData - --- Same as NewCToken but does not deploy an ERC20. Used for special ERC20s that are initialized differently -Macro NewCTokenBringERC20 erc20 cToken borrowRate=0.000005 initialExchangeRate=2e9 decimals=8 delegatorType=CErc20DelegatorScenario cTokenType=CErc20DelegateScenario admin=Admin becomeImplementationData="0x0" - InterestRateModel Deploy Fixed StdInterest borrowRate -- Note: interest rate model probably shouldn't be global - CTokenDelegate Deploy cTokenType cErc20Delegate - CToken Deploy delegatorType cToken cToken (Erc20 erc20 Address) (Comptroller Address) (InterestRateModel StdInterest Address) initialExchangeRate decimals admin (CTokenDelegate cErc20Delegate Address) becomeImplementationData - Comptroller SetMarketSupplyCaps (cToken) (2000e18) - -Macro NewCTokenImmutable erc20 cToken borrowRate=0.000005 initialExchangeRate=2e9 decimals=8 tokenType=Standard cTokenType=Scenario admin=Admin - Erc20 Deploy tokenType erc20 erc20 - InterestRateModel Deploy Fixed StdInterest borrowRate -- Note: interest rate model probably shouldn't be global - CToken Deploy cTokenType cToken cToken (Erc20 erc20 Address) (Comptroller Address) (InterestRateModel StdInterest Address) initialExchangeRate decimals admin - -Macro NewEtherToken cToken borrowRate=0.000005 initialExchangeRate=2e9 decimals=8 admin=Admin - InterestRateModel Deploy Fixed StdInterest borrowRate -- Note: interest rate model probably shouldn't be global - CToken Deploy CEtherScenario cToken cToken (Comptroller Address) (InterestRateModel StdInterest Address) initialExchangeRate decimals admin - -Macro ListedCToken erc20 cToken borrowRate=0.000005 initialExchangeRate=2e9 decimals=8 tokenType=Standard delegatorType=CErc20DelegatorScenario cTokenType=CErc20DelegateScenario admin=Admin - NewCToken erc20 cToken borrowRate initialExchangeRate decimals tokenType delegatorType cTokenType admin - Comptroller SupportMarket cToken - Comptroller SetMarketSupplyCaps (cToken) (2000e18) - -Macro ListedCTokenImmutable erc20 cToken borrowRate=0.000005 initialExchangeRate=2e9 decimals=8 tokenType=Standard cTokenType=Scenario admin=Admin - NewCTokenImmutable erc20 cToken borrowRate initialExchangeRate decimals tokenType cTokenType admin - Comptroller SupportMarket cToken - -Macro ListedEtherToken cToken borrowRate=0.000005 initialExchangeRate=2e9 decimals=8 admin=Admin - NewEtherToken cToken borrowRate initialExchangeRate decimals admin - Comptroller SupportMarket cToken - PriceOracleProxy Deploy Admin (PriceOracle Address) (Address cETH) (Address Zero) (Address Zero) (Address Zero) (Address Zero) - Comptroller SetPriceOracle (PriceOracleProxy Address) - -Macro ListedEtherTokenMinted cToken borrowRate=0.000005 initialExchangeRate=2e9 decimals=8 admin=Admin - NewEtherToken cToken borrowRate initialExchangeRate decimals admin - Comptroller SupportMarket cToken - Comptroller SetMarketSupplyCaps (cToken) (2000e18) - CallMintEth Root 1e18 cToken - -Macro SetPriceCF cToken price collateralFactor - PriceOracle SetPrice cToken price - Comptroller SetCollateralFactor cToken collateralFactor - Comptroller SetMarketSupplyCaps (cToken) (2e30) - -Macro Give user amount erc20 - Erc20 erc20 Faucet user amount - -Macro Donate token amount - (Trx Value amount (CToken token Donate)) - -Macro Prep user amount erc20 token allowanceAmount=Nothing - Erc20 erc20 Faucet user amount - From user (Erc20 erc20 Approve token (Default allowanceAmount amount)) - -Macro Allow user token - From user (Erc20 (CToken token Underlying) Approve token UInt256Max) - -Macro AccrueInterest token - CToken token AccrueInterest - -Macro Mint user amount token - From user (CToken token Mint amount) - -Macro SendMintEth user amount token - From user (Trx GasPrice 0 (Trx Value amount (Send token amount))) - -Macro CallMintEth user amount token - From user (Trx GasPrice 0 (Trx Value amount (CToken token Mint))) - -Macro Redeem user amount token - From user (CToken token Redeem amount) - -Macro RedeemEth user amount token - Trx GasPrice 0 (From user (CToken token Redeem amount)) - -Macro RedeemUnderlying user amount token - From user (CToken token RedeemUnderlying amount) - -Macro RedeemUnderlyingEth user amount token - Trx GasPrice 0 (From user (CToken token RedeemUnderlying amount)) - -Macro BorrowEth user amount token - Trx GasPrice 0 (From user (CToken token Borrow amount)) - -Macro Borrow user amount token - From user (CToken token Borrow amount) - -Macro RepayBorrow user amount token - From user (CToken token RepayBorrow amount) - -Macro RepayBorrowEth user amount token - From user (Trx GasPrice 0 (Trx Value amount (CToken token RepayBorrow))) - -Macro RepayBorrowBehalf user behalf amount token - From user (CToken token RepayBorrowBehalf behalf amount) - -Macro RepayBorrowEthBehalf user behalf amount token - From user (Trx GasPrice 0 (Trx Value amount (CToken token RepayBorrowBehalf behalf))) - -Macro Liquidate liquidator _ borrower amount token _ collateral - From liquidator (CToken token Liquidate borrower collateral amount) - -Macro LiquidateEthColl liquidator _ borrower amount token _ collateral - From liquidator (Trx GasPrice 0 (CToken token Liquidate borrower collateral amount)) - -Macro LiquidateEthBorrow liquidator _ borrower amount token _ collateral - From liquidator (Trx GasPrice 0 (Trx Value amount (CToken token Liquidate borrower collateral))) - -Macro Seize amount token caller liquidator borrower - From caller (CToken token Seize liquidator borrower amount) - -Macro EvilSeize token amount treasure seizer seizee - CToken token EvilSeize treasure seizer seizee amount - -Macro Support cToken collateralFactor=0.5 - Comptroller SupportMarket cToken - Comptroller SetCollateralFactor cToken collateralFactor - -Macro SetCollateralFactor cToken collateralFactor=0.5 - Comptroller SetCollateralFactor cToken collateralFactor - -Macro AddReserves amount token user=Root - From user (CToken token AddReserves amount) - -Macro ReduceReserves amount token - CToken token ReduceReserves amount - -Macro FastForward n blocks - Comptroller FastForward n blocks - -Macro EnterMarkets user ...markets - From user (Comptroller EnterMarkets markets) - -Macro ExitMarket user market - From user (Comptroller ExitMarket market) - -Macro Transfer from to amount token - From from (Erc20 token Transfer to amount) - -Macro Cash cToken - Read Erc20 (CToken cToken Underlying) TokenBalance cToken - -Macro QuickMint amount cToken from=Me - Give from amount (CToken cToken Underlying) - Allow from cToken - From from (CToken cToken Mint amount) - -Macro QuickBorrow amount cToken ...collateral - From Me (Comptroller EnterMarkets collateral) - From Me (Comptroller EnterMarkets (cToken)) - From Me (CToken cToken Borrow amount) - --- Macro for performing a borrow with the sole --- purpose of adding interest to the erc20 market -Macro BorrowAndRepayWithInterest erc20 cToken amount interestAmount interestRate blocks reserveRate=0 - -- TODO: Make invariant success for these? - -- TODO: Named args as macros - InterestRateModel Deploy Fixed Std interestRate - CToken cToken SetInterestRateModel (InterestRateModel Std Address) - CToken cToken SetReserveFactor reserveRate - ListedCToken COLLAT cCOLLAT - Comptroller SetCollateralFactor cCOLLAT 0.9 - Comptroller SetMarketSupplyCaps (cCOLLAT) (2e30) - Prep Torrey 1e30 COLLAT cCOLLAT - Mint Torrey 1e30 cCOLLAT - EnterMarkets Torrey cCOLLAT cToken - Assert True (Comptroller CheckMembership Torrey cCOLLAT) - Assert True (Comptroller CheckMembership Torrey cToken) - Borrow Torrey amount cToken - -- Cool, we've borrowed, now let's accrue interest then repay all - FastForward blocks Blocks - -- RepayBorrow Torrey (CToken BorrowBalance Torrey) cToken - From Torrey (Erc20 erc20 Approve cToken amount) - RepayBorrow Torrey amount cToken - From Torrey (Erc20 erc20 Approve cToken interestAmount) - Give Torrey interestAmount erc20 - RepayBorrow Torrey interestAmount cToken - Assert Equal (CToken cToken BorrowBalance Torrey) Zero - --- Macro for performing a borrow with the sole --- purpose of adding interest to the ether market -Macro BorrowAndRepayEthWithInterest cEther amount interestAmount interestRate blocks reserveRate=0 - -- TODO: Make invariant success for these? - -- TODO: Named args as macros - InterestRateModel Deploy Fixed Std interestRate - CToken cEther SetInterestRateModel (InterestRateModel Std Address) - CToken cEther SetReserveFactor reserveRate - ListedCToken COLLAT cCOLLAT - Comptroller SetCollateralFactor cCOLLAT 0.9 - Comptroller SetMarketSupplyCaps (cCOLLAT) (2e30) - Prep Torrey 1e30 COLLAT cCOLLAT - Mint Torrey 1e30 cCOLLAT - EnterMarkets Torrey cCOLLAT cEther - Assert True (Comptroller CheckMembership Torrey cCOLLAT) - Assert True (Comptroller CheckMembership Torrey cEther) - Borrow Torrey amount cEther - -- Cool, we've borrowed, now let's accrue interest then repay all - FastForward blocks Blocks - -- RepayBorrow Torrey (CToken BorrowBalance Torrey) cEther - RepayBorrowEth Torrey amount cEther - RepayBorrowEth Torrey interestAmount cEther - Assert Equal (CToken cEther BorrowBalance Torrey) Zero diff --git a/spec/scenario/EnterExitMarkets.scen b/spec/scenario/EnterExitMarkets.scen deleted file mode 100644 index 3fbb608e1..000000000 --- a/spec/scenario/EnterExitMarkets.scen +++ /dev/null @@ -1,142 +0,0 @@ --- Enter and Exit Markets Tests - -Test "Enter Markets Idempotent" - NewComptroller - Assert Equal (Comptroller MembershipLength Geoff) Zero - Assert Equal (Comptroller AssetsIn Geoff) [] - ListedCToken ZRX cZRX - EnterMarkets Geoff cZRX - Assert Log MarketEntered (cToken (Address cZRX)) (account (Address Geoff)) - Assert Equal (Comptroller MembershipLength Geoff) (Exactly 1) - Assert True (Comptroller CheckMembership Geoff cZRX) - ListedCToken OMG cOMG - EnterMarkets Geoff cZRX cOMG - Assert Equal (Comptroller MembershipLength Geoff) (Exactly 2) - Assert True (Comptroller CheckMembership Geoff cZRX) - Assert True (Comptroller CheckMembership Geoff cOMG) - Assert Equal (Comptroller AssetsIn Geoff) [(Address cZRX) (Address cOMG)] - -Test "Entered Market Must Be Supported" - NewComptroller - Assert Equal (Comptroller MembershipLength Geoff) Zero - ListedCToken ZRX cZRX - EnterMarkets Geoff cZRX - Assert Equal (Comptroller MembershipLength Geoff) (Exactly 1) - NewCToken OMG cOMG - EnterMarkets Geoff cZRX cOMG - Assert Equal (Comptroller MembershipLength Geoff) (Exactly 1) - Assert True (Comptroller CheckMembership Geoff cZRX) - Assert False (Comptroller CheckMembership Geoff cOMG) - Support cOMG - EnterMarkets Geoff cZRX cOMG - Assert Equal (Comptroller MembershipLength Geoff) (Exactly 2) - Assert True (Comptroller CheckMembership Geoff cZRX) - Assert True (Comptroller CheckMembership Geoff cOMG) - -Test "Exit single market" - NewComptroller - ListedCToken ZRX cZRX - EnterMarkets Geoff cZRX - Assert Equal (Comptroller AssetsIn Geoff) [(Address cZRX)] - ExitMarket Geoff cZRX - Assert Equal (Comptroller AssetsIn Geoff) [] - -Test "Exit non-entered market" - NewComptroller - ListedCToken ZRX cZRX - ExitMarket Geoff cZRX - Assert Equal (Comptroller AssetsIn Geoff) [] - -Test "Exit one of two market from the front" - NewComptroller - ListedCToken ZRX cZRX - ListedCToken OMG cOMG - EnterMarkets Geoff cZRX cOMG - Assert Equal (Comptroller AssetsIn Geoff) [(Address cZRX) (Address cOMG)] - ExitMarket Geoff cZRX - Assert Equal (Comptroller AssetsIn Geoff) [(Address cOMG)] - -Test "Exit one of two market from the back" - NewComptroller - ListedCToken ZRX cZRX - ListedCToken OMG cOMG - EnterMarkets Geoff cZRX cOMG - Assert Equal (Comptroller AssetsIn Geoff) [(Address cZRX) (Address cOMG)] - ExitMarket Geoff cOMG - Assert Equal (Comptroller AssetsIn Geoff) [(Address cZRX)] - -Test "Exit multiple markets" - NewComptroller - ListedCToken ZRX cZRX - ListedCToken OMG cOMG - ListedCToken BAT cBAT - ListedCToken REP cREP - ListedCToken DAI cDAI - EnterMarkets Geoff cZRX cOMG cBAT cREP cDAI - Assert Equal (Comptroller AssetsIn Geoff) [(Address cZRX) (Address cOMG) (Address cBAT) (Address cREP) (Address cDAI)] - ExitMarket Geoff cZRX - Assert Equal (Comptroller AssetsIn Geoff) [(Address cDAI) (Address cOMG) (Address cBAT) (Address cREP)] - ExitMarket Geoff cREP - Assert Equal (Comptroller AssetsIn Geoff) [(Address cDAI) (Address cOMG) (Address cBAT)] - ExitMarket Geoff cOMG - Assert Equal (Comptroller AssetsIn Geoff) [(Address cDAI) (Address cBAT)] - ExitMarket Geoff cDAI - Assert Equal (Comptroller AssetsIn Geoff) [(Address cBAT)] - ExitMarket Geoff cBAT - Assert Equal (Comptroller AssetsIn Geoff) [] - -Test "Realistic Market Scenario" - PricedComptroller - ListedCToken ZRX cZRX - SetPriceCF cZRX 0.002 0.4 - ListedEtherToken cETH - Comptroller SetCollateralFactor cEth 0.8 - ListedCToken BAT cBAT - SetPriceCF cBAT 0.0015 0.3 - Comptroller SetMarketSupplyCaps (cZRX) (2000e18) - Comptroller SetMarketSupplyCaps (cETH) (2000e18) - -- Mint some cZRX and cETH - Prep Geoff 1250e18 ZRX cZRX - Mint Geoff 1250e18 cZRX -- Liquidity -> 0.4 * 0.002 * 1250e18 = 1.0e18 - SendMintEth Geoff 2.5e18 cETH -- Liqiuidity -> 0.8 * 1.0 * 2.5e18 = 2.0e18 - -- Check liquidity is zero when not in any markets - Assert Equal (Comptroller Liquidity Geoff) Zero - -- Enter ZRX and check liquidity - EnterMarkets Geoff cZRX - Assert Equal (Comptroller Liquidity Geoff) 1.0e18 - -- Fail to borrow BAT due to liquidity - Give cBAT 1000e18 BAT - HoldInvariants - Borrow Geoff 1000e18 cBAT -- 1000e18 * 0.0015 = 1.5e18 required liquidity - -- But since we're only in ZRX, we only have 1.0e18 liquidity - Assert RevertCustomError BorrowComptrollerRejection 4 - -- Enter cETH and check liquidity - EnterMarkets Geoff cETH - Assert Equal (Comptroller Liquidity Geoff) 3.0e18 -- Sum of cETH and cZRX liquidity from above - -- Borrow previous BAT amount given liquidity - Borrow Geoff 1000e18 cBAT - Assert Equal (Comptroller Liquidity Geoff) 1.5e18 -- Less the borrow amount's toll - -- Try to exit a eth market but fail due to given borrow requiring eth as collateral - HoldInvariants - ExitMarket Geoff cETH - Assert Failure REJECTION EXIT_MARKET_REJECTION INSUFFICIENT_LIQUIDITY -- Liquidity check fails - Assert Equal (Comptroller AssetsIn Geoff) [(Address cZRX) (Address cETH) (Address cBAT)] - -- Repay some borrow and exit market OMG - Allow Geoff cBAT - RepayBorrow Geoff 500e18 cBAT - Assert Equal (Comptroller Liquidity Geoff) 2.25e18 -- With 0.75e18 repaid - ExitMarket Geoff cETH - Assert Equal (Comptroller AssetsIn Geoff) [(Address cZRX) (Address cBAT)] - Assert Equal (Comptroller Liquidity Geoff) 0.25e18 -- Less Eth's 2.0e18 collateral weight - -- Try and exit cBAT (firist without, then after, repaying) - HoldInvariants - ExitMarket Geoff cBAT - Assert Failure NONZERO_BORROW_BALANCE EXIT_MARKET_BALANCE_OWED - RepayBorrow Geoff UInt256Max cBAT - ExitMarket Geoff cBAT - Assert Equal (Comptroller AssetsIn Geoff) [(Address cZRX)] - Assert Equal (Comptroller Liquidity Geoff) 1.0e18 -- Back to just cZRX - -- Exit cZRX - ExitMarket Geoff cZRX - Assert Equal (Comptroller AssetsIn Geoff) [] - Assert Equal (Comptroller Liquidity Geoff) 0e18 -- Back to nothing diff --git a/spec/scenario/ExchangeRate.scen b/spec/scenario/ExchangeRate.scen deleted file mode 100644 index 5299e55f4..000000000 --- a/spec/scenario/ExchangeRate.scen +++ /dev/null @@ -1,76 +0,0 @@ - -Test "Initial Exchange Rate" - NewComptroller - NewCToken ZRX cZRX initialExchangeRate:2e9 - Assert Equal (CToken cZRX ExchangeRateStored) (Exp 2e9) - -Test "Initial Exchange Rate with Mint" - NewComptroller - ListedCToken ZRX cZRX initialExchangeRate:5e9 - Comptroller SetMarketSupplyCaps (cZRX) (2000e18) - -- Check initial exchange holds - Invariant Remains (CToken cZRX ExchangeRateStored) (Exp 5e9) - -- Mint some tokens and verify invariant still holds - Prep Geoff Some ZRX cZRX - Mint Geoff 50e18 cZRX - -- Also, verify token was minted at given exchange rate - Assert Equal (Erc20 cZRX TotalSupply) (Exactly 10e9) - Assert Equal (Erc20 cZRX TokenBalance Geoff) (Exactly 10e9) - -- Let's mint again and verify it's still good. - Prep Torrey Some ZRX cZRX - Mint Torrey 50e18 cZRX - -- Also, verify token was minted at given exchange rate - Assert Equal (Erc20 cZRX TotalSupply) (Exactly 20e9) - Assert Equal (Erc20 cZRX TokenBalance Torrey) (Exactly 10e9) - -Test "ZRX: Exch. Rate:2e9, Cash(51e18) + Borrows(2.0e18) - Reserves(0.5e18) / Tokens(2.5e10)" - NewComptroller - -- Decimals You=18, Decimals Us=8 -> 2e9 Exchange Rate - ListedCToken ZRX cZRX initialExchangeRate:2e9 decimals:8 - Comptroller SetMarketSupplyCaps (cZRX) (2000e18) - Assert Equal (CToken cZRX ExchangeRateStored) (Exp 2e9) - -- Mint 50.0 ZRX at given exchange rate - Prep Geoff Some ZRX cZRX - Assert Equal (Erc20 cZRX TotalSupply) Zero - Mint Geoff 50e18 cZRX - -- 50e18 / 2e9 = 2.5e10 - Assert Equal (Erc20 cZRX TotalSupply) (Exactly 2.5e10) - Assert Equal (Erc20 cZRX TokenBalance Geoff) (Exactly 2.5e10) - -- Set cash - Erc20 ZRX Faucet cZRX 1.0e18 - Assert Equal (Erc20 ZRX TokenBalance cZRX) (Exactly 51.0e18) - -- Mock total borrows - CToken cZRX Mock totalBorrows 2.0e18 - Assert Equal (CToken cZRX TotalBorrows) (Exactly 2.0e18) - -- Mock total reserves - CToken cZRX Mock totalReserves 0.5e18 - Assert Equal (CToken cZRX Reserves) (Exactly 0.5e18) - -- Okay, we're all set, let's check the exchange rate - -- (51+2-0.5)e18/2.5e10 = 52.5e18/2.5e10 = 21e8 -> 21e26 (Exp) - Assert Equal (CToken cZRX ExchangeRateStored) (Exp 2.1e9) - -Test "USDC: Exch. Rate:2e-3, Cash(51e18) + Borrows(2.0e18) - Reserves(0.5e18) / Tokens(2.5e10)" - NewComptroller - -- Decimals You=6, Decimals Us=8 -> 2e-3 Exchange Rate - ListedCToken USDC cUSDC initialExchangeRate:2e-3 decimals:8 - Comptroller SetMarketSupplyCaps (cUSDC) (2000e18) - Assert Equal (CToken cUSDC ExchangeRateStored) (Exp 2e-3) - -- Mint 50.0 USDC at given exchange rate - Prep Geoff Little USDC cUSDC - Assert Equal (Erc20 cUSDC TotalSupply) (Exactly 0.0) - Mint Geoff 50e6 cUSDC - -- 5.0e7 / 2e-3 = 2.5e10 - Assert Equal (Erc20 cUSDC TotalSupply) (Exactly 2.5e10) - Assert Equal (Erc20 cUSDC TokenBalance Geoff) (Exactly 2.5e10) - -- Set cash - Erc20 USDC Faucet cUSDC 2.0e6 - Assert Equal (Erc20 USDC TokenBalance cUSDC) (Exactly 52.0e6) - -- Mock total borrows - CToken cUSDC Mock totalBorrows 5.0e6 - Assert Equal (CToken cUSDC TotalBorrows) (Exactly 5.0e6) - -- Mock total reserves - CToken cUSDC Mock totalReserves 1.5e6 - Assert Equal (CToken cUSDC Reserves) (Exactly 1.5e6) - -- Okay, we're all set, let's check the exchange rate - -- (52+5-1.5)e6/2.5e10 = 55.5e6/2.5e10 = 2.22e-3 -> 2.22e15 (Exp) - Assert Equal (CToken cUSDC ExchangeRateStored) (Exp 2.22e-3) diff --git a/spec/scenario/Fee.scen b/spec/scenario/Fee.scen deleted file mode 100644 index b4005a289..000000000 --- a/spec/scenario/Fee.scen +++ /dev/null @@ -1,102 +0,0 @@ - -Test "Transfer fee goes to admin" - Erc20 Deploy Fee USDT USDT 18 100 Admin - Give Torrey 1e18 USDT - From Torrey (Erc20 USDT Transfer Coburn 1e18) - Assert Equal (ERC20 USDT TokenBalance Torrey) 0e18 - Assert Equal (ERC20 USDT TokenBalance Coburn) 0.99e18 - Assert Equal (ERC20 USDT TokenBalance Admin) 0.01e18 - -Test "Mint should work and not change exchange rate" - NewComptroller price:1.0 - Erc20 Deploy Fee USDT USDT 18 100 Admin - NewCTokenBringERC20 USDT cUSDT - Support cUSDT collateralFactor:0.5 - Invariant Static (CToken cUSDT ExchangeRate) - Prep Torrey 1e18 USDT cUSDT - Mint Torrey 1e18 cUSDT - Assert Equal (ERC20 USDT TokenBalance cUSDT) 0.99e18 - -Test "Repay borrow should work and not change exchange rate" - PricedComptroller - Erc20 Deploy Fee USDT USDT 18 100 Admin - NewCTokenBringERC20 USDT cUSDT - NewCToken ZRX cZRX 0.000005 2e9 8 Standard - Comptroller SetMarketSupplyCaps (cUSDT) (2000e18) - Comptroller SetMarketSupplyCaps (cZRX) (2000e18) - PriceOracle SetPrice cZRX 1.0 - PriceOracle SetPrice cUSDT 1.0 - Support cZRX 0.5 - Support cUSDT 0.5 - Give cUSDT 10e18 USDT -- Faucet some Tether to borrow - Invariant Static (CToken cUSDT ExchangeRate) - Prep Torrey 100e18 ZRX cZRX - Mint Torrey 100e18 cZRX - EnterMarkets Torrey cUSDT - EnterMarkets Torrey cZRX - Borrow Torrey 1e18 cUSDT -- we only received 0.99 tether bc of fee - Assert Equal (ERC20 USDT TokenBalance Torrey) 0.99e18 - FastForward 196000 Blocks -- 1e18 * 196000 * 0.000005 = 0.98e18 interest accrued - Assert Equal (CToken cUSDT TotalBorrowsCurrent) 1.98e18 - Prep Torrey 1.01e18 USDT cUSDT 2e18 -- so give 2 - 0.99 = 1.01, and approve 2e18 - RepayBorrow Torrey 2e18 cUSDT -- repay more than we owe to account for fee - Assert Equal (CToken cUSDT BorrowBalance Torrey) 0 - Assert Equal (CToken cUSDT TotalBorrowsCurrent) 0 - Assert Equal (ERC20 USDT TokenBalance Torrey) 0 - -Test "Should be able to liquidate fee token borrow" - PricedComptroller - Comptroller LiquidationIncentive 1.1 - Erc20 Deploy Fee USDT USDT 18 100 Admin - NewCTokenBringERC20 USDT cUSDT - Comptroller SetMarketSupplyCaps (cUSDT) (2000e18) - NewCToken ZRX cZRX 0.000005 2e9 8 Standard - Comptroller SetMarketSupplyCaps (cZRX) (2000e18) - PriceOracle SetPrice cZRX 1.0 - PriceOracle SetPrice cUSDT 1.0 - Support cZRX 0.5 - Support cUSDT 0.5 - Give cUSDT 10e18 USDT -- Faucet some Tether to borrow - Invariant Static (CToken cUSDT ExchangeRate) - Invariant Static (CToken cZRX ExchangeRate) - Prep Torrey 2e18 ZRX cZRX - Mint Torrey 2e18 cZRX - EnterMarkets Torrey cUSDT - EnterMarkets Torrey cZRX - Borrow Torrey 1e18 cUSDT -- we only received 0.99 tether bc of fee - Assert Equal (ERC20 USDT TokenBalance Torrey) 0.99e18 - FastForward 196000 Blocks -- 1e18 * 196000 * 0.000005 = 0.98e18 interest accrued - Assert Equal (CToken cUSDT TotalBorrowsCurrent) 1.98e18 - -- OK! should be ready to liquidate, so lets do that - Prep Coburn 2e18 USDT cUSDT - Liquidate Coburn "->" Torrey 0.1e18 cUSDT "Seizing" cZRX - -- effective liquidation incentive after deducting protocolSeizeShare is 1.1 * (1-.028) = 1.0692 - -- 5.29254e7 = 0.1e18 (amount liquidated) * 1.0692 (liq discount) * .99 (fee) / 2e9 (exchange rate) - Assert Equal (Erc20 cZRX TokenBalance Coburn) 5.29254e7 - Assert Equal (CToken cUSDT BorrowBalance Torrey) 1.881e18 -- 1.98 - (0.1 * .99) was liquidated - Assert Equal (Erc20 USDT TokenBalance Coburn) 1.9e18 - -Test "Should be able to redeem a fee CToken, exchange Rate should not change" - NewComptroller price:1.0 - Erc20 Deploy Fee USDT USDT 18 100 Admin - NewCTokenBringERC20 USDT cUSDT - Comptroller SetMarketSupplyCaps (cUSDT) (2000e18) - Support cUSDT collateralFactor:0.5 - Invariant Static (CToken cUSDT ExchangeRate) - Prep Torrey 1e18 USDT cUSDT - Mint Torrey 1e18 cUSDT - Redeem Torrey (Erc20 cUSDT TokenBalance Torrey) cUSDT - -Test "Order of redeems should not matter if no interest accrued" - NewComptroller price:1.0 - Erc20 Deploy Fee USDT USDT 18 100 Admin - NewCTokenBringERC20 USDT cUSDT - Comptroller SetMarketSupplyCaps (cUSDT) (2000e18) - Support cUSDT collateralFactor:0.5 - Invariant Static (CToken cUSDT ExchangeRate) - Prep Torrey 1e18 USDT cUSDT - Mint Torrey 1e18 cUSDT - Prep Coburn 1e18 USDT cUSDT - Mint Coburn 1e18 cUSDT - Redeem Torrey (Erc20 cUSDT TokenBalance Torrey) cUSDT - Redeem Coburn (Erc20 cUSDT TokenBalance Coburn) cUSDT diff --git a/spec/scenario/HypotheticalAccountLiquidity.scen b/spec/scenario/HypotheticalAccountLiquidity.scen deleted file mode 100644 index f8bb148c6..000000000 --- a/spec/scenario/HypotheticalAccountLiquidity.scen +++ /dev/null @@ -1,53 +0,0 @@ - -Test "Calculates hypothetical account liquidity" - -- Note, this comes a bit from `EnterExitMarkets` Scenario - PricedComptroller - ListedCToken ZRX cZRX initialExchangeRate:1e9 - Comptroller SetMarketSupplyCaps (cZRX) (2000e18) - SetPriceCF cZRX 0.002 0.4 - ListedEtherToken cETH initialExchangeRate:1e9 - Comptroller SetMarketSupplyCaps (cETH) (2000e18) - Comptroller SetCollateralFactor cEth 0.8 - ListedCToken BAT cBAT initialExchangeRate:1e9 - Comptroller SetMarketSupplyCaps (cOMG) (2000e18) - SetPriceCF cBAT 0.0015 0.3 - ListedCToken OMG cOMG initialExchangeRate:1e9 - NewCToken REP cREP - -- Mint some cZRX and cETH - Prep Geoff 1250e18 ZRX cZRX - Comptroller SetMarketSupplyCaps (cREP) (2000e18) - Mint Geoff 1250e18 cZRX -- Liquidity -> 0.4 * 0.002 * 1250e18 = 1.0e18 - SendMintEth Geoff 2.5e18 cETH -- Liqiuidity -> 0.8 * 1.0 * 2.5e18 = 2.0e18 - -- Check liquidity is zero when not in any markets - Assert Equal (Comptroller Liquidity Geoff) Zero - -- Enter ZRX and check liquidity - EnterMarkets Geoff cZRX - Assert Equal (Comptroller Liquidity Geoff) 1.0e18 - -- Now let's look at some hypotheticals - Assert Equal (Comptroller Hypothetical Geoff Redeems 1000e9 cZRX) 0.2e18 -- 0.4 * 0.002 * -1000e18 = -0.8e18 - Assert Equal (Comptroller Hypothetical Geoff Borrows 1000e18 cZRX) -1e18 -- 0.002 * -1000e18 = -2e18 - -- Note, if you're not in an asset, this function returns no effect - Assert Equal (Comptroller Hypothetical Geoff Redeems 0.002e9 cETH) 1.0e18 -- 0.8 * 1000.0 * -0.002e18 = -1.6e18 - Assert Equal (Comptroller Hypothetical Geoff Borrows 0.002e18 cETH) 1.0e18 -- 1000.0 * -0.002e18 = -2e18 - EnterMarkets Geoff cETH - Assert Equal (Comptroller Liquidity Geoff) 3.0e18 - Assert Equal (Comptroller Hypothetical Geoff Redeems 1000e9 cZRX) 2.2e18 -- 0.4 * 0.002 * -1000e18 = -0.8e18 - Assert Equal (Comptroller Hypothetical Geoff Borrows 1000e18 cZRX) 1e18 -- 0.002 * -1000e18 = -2e18 - Assert Equal (Comptroller Hypothetical Geoff Redeems 2e9 cETH) 1.4e18 -- 0.8 * 1.0 * -2e18 = -1.6e18 - Assert Equal (Comptroller Hypothetical Geoff Borrows 2e18 cETH) 1.0e18 -- 1.0 * -2e18 = -2e18 - EnterMarkets Geoff cBAT - Assert Equal (Comptroller Hypothetical Geoff Redeems 1000e9 cBAT) 2.55e18 -- 0.3 * 0.0015 * -1000e18 = -0.45e18e18 - Assert Equal (Comptroller Hypothetical Geoff Borrows 1000e18 cBAT) 1.5e18 -- 0.0015 * -1000e18 = -1.5e18 - EnterMarkets Geoff cOMG - -- Fails if the given asset doesn't have a price - Assert ReadError (Comptroller Hypothetical Geoff Redeems 1e20 cOMG) "Failed to compute account hypothetical liquidity: error code = 13" - Assert ReadError (Comptroller Hypothetical Geoff Borrows 1e20 cOMG) "Failed to compute account hypothetical liquidity: error code = 13" - PriceOracle SetPrice cOMG 0.01 - -- Has a price and now is listed - Assert Equal (Comptroller Hypothetical Geoff Redeems 100e9 cOMG) 3.0e18 -- No collateral factor - Assert Equal (Comptroller Hypothetical Geoff Borrows 100e18 cOMG) 2.0e18 -- 0.01 * -100e18 = -1e18 - -- For a token has no price and isn't listed - -- Note: we can't actually enter the unlisted market without some harness function - -- we could consider testing this, but it would be out of the scope of scenarios - Assert Equal (Comptroller Hypothetical Geoff Redeems 100e18 cREP) 3.0e18 -- No effect - Assert Equal (Comptroller Hypothetical Geoff Borrows 100e18 cREP) 3.0e18 -- No effect diff --git a/spec/scenario/InKindLiquidation.scen b/spec/scenario/InKindLiquidation.scen deleted file mode 100644 index 6ef95a521..000000000 --- a/spec/scenario/InKindLiquidation.scen +++ /dev/null @@ -1,443 +0,0 @@ - -Macro InKindBorrow borrowAmount borrowRate user=Geoff borrowPrice=1.0 mintAmount=100e18 giveAmount=0e18 borrowTokenType=Standard - PricedComptroller - Comptroller LiquidationIncentive 1.1 - NewCToken BAT cBAT borrowRate 2e9 8 borrowTokenType -- note: cannot use macros with named args right now - Comptroller SetMarketSupplyCaps (cBAT) (2000e18) - Give cBAT giveAmount BAT -- Faucet some bat - PriceOracle SetPrice cBAT borrowPrice - Support cBAT collateralFactor:0.5 - Prep user mintAmount BAT cBAT - Mint user mintAmount cBAT - EnterMarkets user cBAT - Borrow user borrowAmount cBAT - -Test "Insufficient in-kind shortfall" - InKindBorrow borrowAmount:1e18 borrowRate:0.000005 - Assert Equal (CToken cBAT BorrowBalance Geoff) 1e18 - Assert Equal (CToken cBAT TotalBorrows) 1e18 - Comptroller SetMarketSupplyCaps (cBAT) (2000e18) - Assert Equal (Erc20 BAT TokenBalance Geoff) 1e18 - Assert Equal (Erc20 BAT TokenBalance cBAT) 99e18 - Assert Equal (Comptroller Liquidity Geoff) 49e18 -- ( ( 1.0 * 100e18 * 0.5 ) - ( 1.0 * 51e18 ) ) / 1e18 - -- Prices are 1:1 (in-kind) and collateral factor is 0.5, - -- thus supplying 100e18 cBAT gives the user 50e18 - -- capacity of BAT. User only borrowed 1BAT, but after - -- a lot blocks at a 0.0005% interest rate, he'll be - -- underwater. Note: with a reserve rate of zero, that - -- interest will be paid back to himself as supply - -- but that will be discounted by 50% by the collateral factor. - -- Thus, we will need to accumulate for twice as many blocks - -- to end up where we'd usually be underwater - FastForward 19600000 Blocks -- 1e18 * (1 + 19600000 * 0.000005) - AccrueInterest cBAT -- Note: we have to accrue interest - -- since it's not automatic for liquidity - Assert Equal (CToken cBAT BorrowBalanceStored Geoff) 99e18 - Assert Equal (CToken cBAT TotalBorrows) 99e18 - -- Check user liquidity and verify equals 0 - Assert Equal (Comptroller Liquidity Geoff) 0e18 -- ( ( 1.0 * ( 100e18 + 98e18 ) * 0.5 ) - ( ( 98 + 1 ) * 1e18 ) ) / 1e18 - -- At exactly zero, should not be able to liquidate - Prep Torrey 10e18 BAT cBAT - AllowFailures - Liquidate Torrey "->" Geoff 10e18 cBAT "Seizing" cBAT - Assert RevertCustomError LiquidateComptrollerRejection 3 - -Test "Cannot self-in-kind-liquidate" - InKindBorrow borrowAmount:1e18 borrowRate:0.000005 - Assert Equal (CToken cBAT BorrowBalance Geoff) 1e18 - Assert Equal (CToken cBAT TotalBorrows) 1e18 - Assert Equal (Erc20 BAT TokenBalance Geoff) 1e18 - Assert Equal (Erc20 BAT TokenBalance cBAT) 99e18 - Assert Equal (Comptroller Liquidity Geoff) 49e18 -- ( ( 1.0 * 100e18 * 0.5 ) - ( 1.0 * 51e18 ) ) / 1e18 - -- Prices are 1:1 (in-kind) and collateral factor is 0.5, - -- thus supplying 100e18 cBAT gives the user 50e18 - -- capacity of BAT. User only borrowed 1BAT, but after - -- a lot blocks at a 0.0005% interest rate, he'll be - -- underwater. Note: with a reserve rate of zero, that - -- interest will be paid back to himself as supply - -- but that will be discounted by 50% by the collateral factor. - -- Thus, we will need to accumulate for twice as many blocks - -- to end up where we'd usually be underwater - FastForward 20000000 Blocks -- 1e18 * (1 + 20000000 * 0.000005) - AccrueInterest cBAT -- Note: we have to accrue interest - -- since it's not automatic for liquidity - Assert Equal (CToken cBAT BorrowBalanceStored Geoff) 101e18 - Assert Equal (CToken cBAT TotalBorrows) 101e18 - -- Check user liquidity and verify < 0 - Assert Equal (Comptroller Liquidity Geoff) -1e18 - -- Okay, so we should be able to liquidate, so let's do that. - Prep Geoff 10e18 BAT cBAT - AllowFailures - Liquidate Geoff "->" Geoff 2e18 cBAT "Seizing" cBAT - Assert RevertCustomError LiquidateLiquidatorIsBorrower - -Test "Liqidate in-kind beyond max close" - InKindBorrow borrowAmount:1e18 borrowRate:0.000005 - Assert Equal (CToken cBAT BorrowBalance Geoff) 1e18 - Assert Equal (CToken cBAT TotalBorrows) 1e18 - Assert Equal (Erc20 BAT TokenBalance Geoff) 1e18 - Assert Equal (Erc20 BAT TokenBalance cBAT) 99e18 - Assert Equal (Comptroller Liquidity Geoff) 49e18 -- ( ( 1.0 * 100e18 * 0.5 ) - ( 1.0 * 51e18 ) ) / 1e18 - -- Prices are 1:1 (in-kind) and collateral factor is 0.5, - -- thus supplying 100e18 cBAT gives the user 50e18 - -- capacity of BAT. User only borrowed 1BAT, but after - -- a lot blocks at a 0.0005% interest rate, he'll be - -- underwater. Note: with a reserve rate of zero, that - -- interest will be paid back to himself as supply - -- but that will be discounted by 50% by the collateral factor. - -- Thus, we will need to accumulate for twice as many blocks - -- to end up where we'd usually be underwater - FastForward 20000000 Blocks -- 1e18 * (1 + 20000000 * 0.000005) - AccrueInterest cBAT -- Note: we have to accrue interest - -- since it's not automatic for liquidity - Assert Equal (CToken cBAT BorrowBalanceStored Geoff) 101e18 - Assert Equal (CToken cBAT TotalBorrows) 101e18 - -- Check user liquidity and verify < 0 - Assert Equal (Comptroller Liquidity Geoff) -1e18 - -- Okay, so we should be able to liquidate, so let's do that. - Prep Torrey 20e18 BAT cBAT - AllowFailures - Liquidate Torrey "->" Geoff 20e18 cBAT "Seizing" cBAT - Assert RevertCustomError LiquidateComptrollerRejection 17 - -Test "Proper In-Kind Liquidation" - InKindBorrow borrowAmount:1e18 borrowRate:0.000005 - Assert Equal (CToken cBAT BorrowBalance Geoff) 1e18 - Assert Equal (CToken cBAT TotalBorrows) 1e18 - Assert Equal (Erc20 BAT TokenBalance Geoff) 1e18 - Assert Equal (Erc20 BAT TokenBalance cBAT) 99e18 - Assert Equal (Comptroller Liquidity Geoff) 49e18 -- ( ( 1.0 * 100e18 * 0.5 ) - ( 1.0 * 1e18 ) ) / 1e18 - -- Prices are 1:1 (in-kind) and collateral factor is 0.5, - -- thus supplying 100e18 cBAT gives the user 50e18 - -- capacity of BAT. User only borrowed 1BAT, but after - -- a lot blocks at a 0.0005% interest rate, he'll be - -- underwater. Note: with a reserve rate of zero, that - -- interest will be paid back to himself as supply - -- but that will be discounted by 50% by the collateral factor. - -- Thus, we will need to accumulate for twice as many blocks - -- to end up where we'd usually be underwater - FastForward 20000000 Blocks -- 1e18 * (1 + 20000000 * 0.000005) - AccrueInterest cBAT -- Note: we have to accrue interest - -- since it's not automatic for liquidity - Assert Equal (CToken cBAT BorrowBalanceStored Geoff) 101e18 - Assert Equal (CToken cBAT TotalBorrows) 101e18 - -- Check user liquidity and verify < 0 - Assert Equal (Comptroller Liquidity Geoff) -1e18 -- ( ( 1.0 * ( 100e18 + 100e18 ) * 0.5 ) - ( 101 * 1e18 ) ) / 1e18 - -- Okay, so we should be able to liquidate, so let's do that. - Prep Torrey 2e18 BAT cBAT - -- - -- Let's check how values start before liquidation - -- Note: we're going to be some-what exhausive in what we check - Invariant Remains (Erc20 BAT TokenBalance Geoff) 1e18 -- all was minted, this is what was borrowed - Assert Equal (Erc20 BAT TokenBalance Torrey) 2e18 -- from prep above - Assert Equal (Erc20 BAT TokenBalance cBAT) 99e18 -- from minting minus 1e18 lent to geoff - Assert Equal (Erc20 cBAT TokenBalance Geoff) 50e9 -- from minting - Assert Equal (Erc20 cBAT TokenBalance Torrey) 0e9 -- never had any - Invariant Remains (Erc20 BAT TokenBalance Geoff) 1e18 -- original amount borrowed - Assert Equal (CToken cBAT BorrowBalanceStored Geoff) 101e18 -- all that interest - Assert Equal (CToken cBAT TotalBorrows) 101e18 -- all those borrowers - Assert Equal (CToken cBAT ExchangeRate) 4e9 --- XXX: Verify this - -- Do the liquidation - Liquidate Torrey "->" Geoff 2e18 cBAT "Seizing" cBAT -- should now take twice as much collateral - -- - -- And see what they are now - Assert Equal (CToken cBAT ExchangeRate) 4e9 --- XXX: Verify this - -- effective liquidation incentive after deducting protocolSeizeShare is 1.1 * (1-.028) = 1.0692 - Assert Equal (Erc20 cBAT TokenBalance Geoff) 49.45e9 -- 1:1 -> 1 x 2e18 x 1.0692 ÷ 4e9 [exchange rate] = 0.55e9 -> Torrey - Assert Equal (Erc20 cBAT TokenBalance Torrey) 0.5346e9 -- didn't have any beforehand XXX - Assert Equal (Erc20 BAT TokenBalance Torrey) 0e18 -- repaid - Assert Equal (Erc20 BAT TokenBalance cBAT) 101e18 -- had 100e18, lent 1e18 to geoff, repaid 2 - Assert Equal (CToken cBAT BorrowBalanceStored Geoff) 99e18 -- less closed amount - Assert Equal (CToken cBAT TotalBorrows) 99e18 -- - -- Prices are 1:1 and collateral factor is 0.5 - -- User now has 49.45e9 outstanding supply (yielding 98.9 borrowing capacity due - -- to the collateral factor (0.5) and exchange rate (4e9)). - -- The user also has a 99e18 borrow outstanding which is weighted 1:1. - -- Thus the liquidity is (98.9-99)e18 or -0.1e18. - Assert Equal (Comptroller Liquidity Geoff) -0.1e18 - -Test "Liquidate exactly zero" - InKindBorrow borrowAmount:1e18 borrowRate:0.000005 - Assert Equal (CToken cBAT BorrowBalance Geoff) 1e18 - Assert Equal (CToken cBAT TotalBorrows) 1e18 - Assert Equal (Erc20 BAT TokenBalance Geoff) 1e18 - Assert Equal (Erc20 BAT TokenBalance cBAT) 99e18 - Assert Equal (Comptroller Liquidity Geoff) 49e18 -- ( ( 1.0 * 100e18 * 0.5 ) - ( 1.0 * 1e18 ) ) / 1e18 - -- Prices are 1:1 (in-kind) and collateral factor is 0.5, - -- thus supplying 100e18 cBAT gives the user 50e18 - -- capacity of BAT. User only borrowed 1BAT, but after - -- a lot blocks at a 0.0005% interest rate, he'll be - -- underwater. Note: with a reserve rate of zero, that - -- interest will be paid back to himself as supply - -- but that will be discounted by 50% by the collateral factor. - -- Thus, we will need to accumulate for twice as many blocks - -- to end up where we'd usually be underwater - FastForward 20000000 Blocks -- 1e18 * (1 + 20000000 * 0.000005) - AccrueInterest cBAT -- Note: we have to accrue interest - -- since it's not automatic for liquidity - Invariant Remains (CToken cBAT BorrowBalanceStored Geoff) 101e18 - Invariant Remains (CToken cBAT TotalBorrows) 101e18 - -- Check user liquidity and verify < 0 - Invariant Remains (Comptroller Liquidity Geoff) -1e18 - -- Okay, so we should be able to liquidate, so let's do that. - Prep Torrey 10e18 BAT cBAT - AllowFailures - Liquidate Torrey "->" Geoff 0e18 cBAT "Seizing" cBAT - Assert RevertCustomError LiquidateCloseAmountIsZero - -Test "When price oracle for collateral token is zero" - InKindBorrow borrowAmount:1e18 borrowRate:0.000005 - Assert Equal (CToken cBAT BorrowBalance Geoff) 1e18 - Assert Equal (CToken cBAT TotalBorrows) 1e18 - Assert Equal (Erc20 BAT TokenBalance Geoff) 1e18 - Assert Equal (Erc20 BAT TokenBalance cBAT) 99e18 - Assert Equal (Comptroller Liquidity Geoff) 49e18 -- ( ( 1.0 * 100e18 * 0.5 ) - ( 1.0 * 1e18 ) ) / 1e18 - -- Prices are 1:1 (in-kind) and collateral factor is 0.5, - -- thus supplying 100e18 cBAT gives the user 50e18 - -- capacity of BAT. User only borrowed 1BAT, but after - -- a lot blocks at a 0.0005% interest rate, he'll be - -- underwater. Note: with a reserve rate of zero, that - -- interest will be paid back to himself as supply - -- but that will be discounted by 50% by the collateral factor. - -- Thus, we will need to accumulate for twice as many blocks - -- to end up where we'd usually be underwater - FastForward 20000000 Blocks -- 1e18 * (1 + 20000000 * 0.000005) - AccrueInterest cBAT -- Note: we have to accrue interest - -- since it's not automatic for liquidity - Invariant Remains (CToken cBAT BorrowBalanceStored Geoff) 101e18 - Invariant Remains (CToken cBAT TotalBorrows) 101e18 - -- Check user liquidity and verify < 0 - Assert Equal (Comptroller Liquidity Geoff) -1e18 - -- Okay, so we should be able to liquidate, so let's do that. - Prep Torrey 10e18 BAT cBAT - PriceOracle SetPrice cBAT 0 - AllowFailures - Liquidate Torrey "->" Geoff 2e18 cBAT "Seizing" cBAT - Assert RevertCustomError LiquidateComptrollerRejection 13 - -Test "When price oracle for collateral token is whack" - InKindBorrow borrowAmount:1e18 borrowRate:0.000005 - Assert Equal (CToken cBAT BorrowBalance Geoff) 1e18 - Assert Equal (CToken cBAT TotalBorrows) 1e18 - Assert Equal (Erc20 BAT TokenBalance Geoff) 1e18 - Assert Equal (Erc20 BAT TokenBalance cBAT) 99e18 - Assert Equal (Comptroller Liquidity Geoff) 49e18 -- ( ( 1.0 * 100e18 * 0.5 ) - ( 1.0 * 1e18 ) ) / 1e18 - -- Prices are 1:1 (in-kind) and collateral factor is 0.5, - -- thus supplying 100e18 cBAT gives the user 50e18 - -- capacity of BAT. User only borrowed 1BAT, but after - -- a lot blocks at a 0.0005% interest rate, he'll be - -- underwater. Note: with a reserve rate of zero, that - -- interest will be paid back to himself as supply - -- but that will be discounted by 50% by the collateral factor. - -- Thus, we will need to accumulate for twice as many blocks - -- to end up where we'd usually be underwater - FastForward 20000000 Blocks -- 1e18 * (1 + 20000000 * 0.000005) - AccrueInterest cBAT -- Note: we have to accrue interest - -- since it's not automatic for liquidity - Invariant Remains (CToken cBAT BorrowBalanceStored Geoff) 101e18 - Invariant Remains (CToken cBAT TotalBorrows) 101e18 - -- Check user liquidity and verify < 0 - Assert Equal (Comptroller Liquidity Geoff) -1e18 - -- Okay, so we should be able to liquidate, so let's do that. - Prep Torrey 10e18 BAT cBAT - PriceOracle SetPrice cBAT 1.15792e59 - AllowFailures - Liquidate Torrey "->" Geoff 2e18 cBAT "Seizing" cBAT - Assert Revert -- Multiplication Overflow - -Test "When repay borrow fails" - InKindBorrow borrowAmount:1e18 borrowRate:0.000005 - Assert Equal (CToken cBAT BorrowBalance Geoff) 1e18 - Assert Equal (CToken cBAT TotalBorrows) 1e18 - Assert Equal (Erc20 BAT TokenBalance Geoff) 1e18 - Assert Equal (Erc20 BAT TokenBalance cBAT) 99e18 - Assert Equal (Comptroller Liquidity Geoff) 49e18 -- ( ( 1.0 * 100e18 * 0.5 ) - ( 1.0 * 1e18 ) ) / 1e18 - -- Prices are 1:1 (in-kind) and collateral factor is 0.5, - -- thus supplying 100e18 cBAT gives the user 50e18 - -- capacity of BAT. User only borrowed 1BAT, but after - -- a lot blocks at a 0.0005% interest rate, he'll be - -- underwater. Note: with a reserve rate of zero, that - -- interest will be paid back to himself as supply - -- but that will be discounted by 50% by the collateral factor. - -- Thus, we will need to accumulate for twice as many blocks - -- to end up where we'd usually be underwater - FastForward 20000000 Blocks -- 1e18 * (1 + 20000000 * 0.000005) - AccrueInterest cBAT -- Note: we have to accrue interest - -- since it's not automatic for liquidity - Invariant Remains (CToken cBAT BorrowBalanceStored Geoff) 101e18 - Invariant Remains (CToken cBAT TotalBorrows) 101e18 - -- Check user liquidity and verify < 0 - Invariant Remains (Comptroller Liquidity Geoff) -1e18 - -- Okay, so we should be able to liquidate, so let's do that. - Prep Torrey 10e18 BAT cBAT allowanceAmount:0.1e18 - AllowFailures - Liquidate Torrey "->" Geoff 2e18 cBAT "Seizing" cBAT - Assert Revert "revert Insufficient allowance" - -Test "Proper liquidation of paused WBTC as collateral" - InKindBorrow borrowAmount:1e18 borrowRate:0.000005 borrowTokenType:WBTC - Assert Equal (CToken cBAT BorrowBalance Geoff) 1e18 - Assert Equal (CToken cBAT TotalBorrows) 1e18 - Assert Equal (Erc20 BAT TokenBalance Geoff) 1e18 - Assert Equal (Erc20 BAT TokenBalance cBAT) 99e18 - Assert Equal (Comptroller Liquidity Geoff) 49e18 -- ( ( 1.0 * 100e18 * 0.5 ) - ( 1.0 * 1e18 ) ) / 1e18 - -- Prices are 1:1 (in-kind) and collateral factor is 0.5, - -- thus supplying 100e18 cBAT gives the user 50e18 - -- capacity of BAT. User only borrowed 1BAT, but after - -- a lot blocks at a 0.0005% interest rate, he'll be - -- underwater. Note: with a reserve rate of zero, that - -- interest will be paid back to himself as supply - -- but that will be discounted by 50% by the collateral factor. - -- Thus, we will need to accumulate for twice as many blocks - -- to end up where we'd usually be underwater - FastForward 20000000 Blocks -- 1e18 * (1 + 20000000 * 0.000005) - AccrueInterest cBAT -- Note: we have to accrue interest - -- since it's not automatic for liquidity - Assert Equal (CToken cBAT BorrowBalanceStored Geoff) 101e18 - Assert Equal (CToken cBAT TotalBorrows) 101e18 - -- Check user liquidity and verify < 0 - Assert Equal (Comptroller Liquidity Geoff) -1e18 -- recheck - -- Okay, so we should be able to liquidate, so let's do that. - Prep Torrey 2e18 BAT cBAT - -- - -- Let's check how values start before liquidation - -- Note: we're going to be some-what exhausive in what we check - Invariant Remains (Erc20 BAT TokenBalance Geoff) 1e18 -- all was minted, this is what was borrowed - Assert Equal (Erc20 BAT TokenBalance Torrey) 2e18 -- from prep above - Assert Equal (Erc20 BAT TokenBalance cBAT) 99e18 -- from minting minus 1e18 lent to geoff - Assert Equal (Erc20 cBAT TokenBalance Geoff) 50e9 -- from minting - Assert Equal (Erc20 cBAT TokenBalance Torrey) 0e9 -- never had any - Invariant Remains (Erc20 BAT TokenBalance Geoff) 1e18 -- original amount borrowed - Assert Equal (CToken cBAT BorrowBalanceStored Geoff) 101e18 -- all that interest - Assert Equal (CToken cBAT TotalBorrows) 101e18 -- all those borrowers - Assert Equal (CToken cBAT ExchangeRate) 4e9 --- XXX: Verify this - -- - -- Pause "WBTC" - Erc20 BAT Pause -- Actually a WBTC token - -- Do the liquidation - AllowFailures - Liquidate Torrey "->" Geoff 2e18 cBAT "Seizing" cBAT -- should now take twice as much collateral - Assert Revert -- Reverts since we can't transfer the BAT in due to pause - -Test "When seize not allowed due to unlisted collateral" - InKindBorrow borrowAmount:1e18 borrowRate:0.000005 - Assert Equal (CToken cBAT BorrowBalance Geoff) 1e18 - Assert Equal (CToken cBAT TotalBorrows) 1e18 - Assert Equal (Erc20 BAT TokenBalance Geoff) 1e18 - Assert Equal (Erc20 BAT TokenBalance cBAT) 99e18 - Assert Equal (Comptroller Liquidity Geoff) 49e18 -- ( ( 1.0 * 100e18 * 0.5 ) - ( 1.0 * 1e18 ) ) / 1e18 - -- Prices are 1:1 (in-kind) and collateral factor is 0.5, - -- thus supplying 100e18 cBAT gives the user 50e18 - -- capacity of BAT. User only borrowed 1BAT, but after - -- a lot blocks at a 0.0005% interest rate, he'll be - -- underwater. Note: with a reserve rate of zero, that - -- interest will be paid back to himself as supply - -- but that will be discounted by 50% by the collateral factor. - -- Thus, we will need to accumulate for twice as many blocks - -- to end up where we'd usually be underwater - FastForward 20000000 Blocks -- 1e18 * (1 + 20000000 * 0.000005) - AccrueInterest cBAT -- Note: we have to accrue interest - -- since it's not automatic for liquidity - Invariant Remains (CToken cBAT BorrowBalanceStored Geoff) 101e18 - Invariant Remains (CToken cBAT TotalBorrows) 101e18 - -- Okay, so we should be able to liquidate, so let's do that. - Prep Torrey 10e18 BAT cBAT - Comptroller UnList cBAT -- Mock unlist collateral - AllowFailures - Liquidate Torrey "->" Geoff 2e18 cBAT "Seizing" cBAT - Assert RevertCustomError LiquidateComptrollerRejection 9 - -Test "When seize not allowed due to unlisted borrow" - InKindBorrow borrowAmount:1e18 borrowRate:0.000005 - Assert Equal (CToken cBAT BorrowBalance Geoff) 1e18 - Assert Equal (CToken cBAT TotalBorrows) 1e18 - Assert Equal (Erc20 BAT TokenBalance Geoff) 1e18 - Assert Equal (Erc20 BAT TokenBalance cBAT) 99e18 - Assert Equal (Comptroller Liquidity Geoff) 49e18 -- ( ( 1.0 * 100e18 * 0.5 ) - ( 1.0 * 1e18 ) ) / 1e18 - -- Prices are 1:1 (in-kind) and collateral factor is 0.5, - -- thus supplying 100e18 cBAT gives the user 50e18 - -- capacity of BAT. User only borrowed 1BAT, but after - -- a lot blocks at a 0.0005% interest rate, he'll be - -- underwater. Note: with a reserve rate of zero, that - -- interest will be paid back to himself as supply - -- but that will be discounted by 50% by the collateral factor. - -- Thus, we will need to accumulate for twice as many blocks - -- to end up where we'd usually be underwater - FastForward 20000000 Blocks -- 1e18 * (1 + 20000000 * 0.000005) - AccrueInterest cBAT -- Note: we have to accrue interest - -- since it's not automatic for liquidity - Invariant Remains (CToken cBAT BorrowBalanceStored Geoff) 101e18 - Invariant Remains (CToken cBAT TotalBorrows) 101e18 - -- Okay, so we should be able to liquidate, so let's do that. - Prep Torrey 10e18 BAT cBAT - Comptroller UnList cBAT -- Mock unlist borrow - AllowFailures - Liquidate Torrey "->" Geoff 2e18 cBAT "Seizing" cBAT - Assert RevertCustomError LiquidateComptrollerRejection 9 - -Test "When there's insufficient collateral" - InKindBorrow borrowAmount:1e18 borrowRate:0.000005 - Comptroller SetCloseFactor 0.9 - Comptroller LiquidationIncentive 1.5 - Assert Equal (CToken cBAT BorrowBalance Geoff) 1e18 - Assert Equal (CToken cBAT TotalBorrows) 1e18 - Assert Equal (Erc20 BAT TokenBalance Geoff) 1e18 - Assert Equal (Erc20 BAT TokenBalance cBAT) 99e18 - Assert Equal (Comptroller Liquidity Geoff) 49e18 -- ( ( 1.0 * 100e18 * 0.5 ) - ( 1.0 * 1e18 ) ) / 1e18 - -- Prices are 1:1 (in-kind) and collateral factor is 0.5, - -- thus supplying 100e18 cBAT gives the user 50e18 - -- capacity of BAT. User only borrowed 1BAT, but after - -- a lot blocks at a 0.0005% interest rate, he'll be - -- underwater. Note: with a reserve rate of zero, that - -- interest will be paid back to himself as supply - -- but that will be discounted by 50% by the collateral factor. - -- Thus, we will need to accumulate for twice as many blocks - -- to end up where we'd usually be underwater - FastForward 200000000 Blocks -- 1e18 * (1 + 200000000 * 0.000005) - AccrueInterest cBAT -- Note: we have to accrue interest - -- since it's not automatic for liquidity - Invariant Remains (CToken cBAT BorrowBalanceStored Geoff) 1001e18 - Invariant Remains (CToken cBAT TotalBorrows) 1001e18 - Comptroller SetCollateralFactor cBAT 0 - -- Check user liquidity and verify < 0 - Invariant Remains (Comptroller Liquidity Geoff) -1001e18 - -- Okay, so we should be able to liquidate, so let's do that. - Prep Torrey 900e18 BAT cBAT - AllowFailures - Liquidate Torrey "->" Geoff 900e18 cBAT "Seizing" cBAT - Assert Revert "revert LIQUIDATE_SEIZE_TOO_MUCH" - -Test "when seize is paused" - InKindBorrow borrowAmount:1e18 borrowRate:0.000005 - Assert Equal (CToken cBAT BorrowBalance Geoff) 1e18 - Assert Equal (CToken cBAT TotalBorrows) 1e18 - Assert Equal (Erc20 BAT TokenBalance Geoff) 1e18 - Assert Equal (Erc20 BAT TokenBalance cBAT) 99e18 - Assert Equal (Comptroller Liquidity Geoff) 49e18 -- ( ( 1.0 * 100e18 * 0.5 ) - ( 1.0 * 1e18 ) ) / 1e18 - -- Prices are 1:1 (in-kind) and collateral factor is 0.5, - -- thus supplying 100e18 cBAT gives the user 50e18 - -- capacity of BAT. User only borrowed 1BAT, but after - -- a lot blocks at a 0.0005% interest rate, he'll be - -- underwater. Note: with a reserve rate of zero, that - -- interest will be paid back to himself as supply - -- but that will be discounted by 50% by the collateral factor. - -- Thus, we will need to accumulate for twice as many blocks - -- to end up where we'd usually be underwater - FastForward 20000000 Blocks -- 1e18 * (1 + 20000000 * 0.000005) - AccrueInterest cBAT -- Note: we have to accrue interest - -- since it's not automatic for liquidity - Assert Equal (CToken cBAT BorrowBalanceStored Geoff) 101e18 - Assert Equal (CToken cBAT TotalBorrows) 101e18 - -- Check user liquidity and verify < 0 - Assert Equal (Comptroller Liquidity Geoff) -1e18 - -- Okay, so we should be able to liquidate, so let's do that. - Prep Torrey 2e18 BAT cBAT - Comptroller SetPauseGuardian Coburn - From Coburn (Comptroller SetGuardianPaused "Seize" True) - AllowFailures - Liquidate Torrey "->" Geoff 2e18 cBAT "Seizing" cBAT - Assert Revert "revert seize is paused" - -- unpause and check correct values - Invariant Success - Comptroller SetGuardianPaused "Seize" False - Liquidate Torrey "->" Geoff 2e18 cBAT "Seizing" cBAT diff --git a/spec/scenario/MCDai.scen b/spec/scenario/MCDai.scen deleted file mode 100644 index 2a97cb535..000000000 --- a/spec/scenario/MCDai.scen +++ /dev/null @@ -1,168 +0,0 @@ --- Multi-collateral DAI tests --- These fork tests are very slow and highly dependent on ganache version, so we mark them pending - -Macro ForkMCD - -- Uses MakerDAO 0.2.16 Release https://changelog.makerdao.com/releases/kovan/0.2.16/index.html - Alias CTokenAdmin "0x9C1856636d78C051deAd6CAB9c5699e4E25549e9" - Alias DaiHolder "0x9Bffd1579bd6760a186fFf1A720f2a5dB35dE0f4" - Alias DaiAddress "0xc27a24e60a89a03bd2f1ffb4ea59076fd8385fe6" - Alias DaiJoinAddress "0x3a3cc501d46b84f310067ef7c5df4ae1f05810ea" - Alias PotAddress "0x1c11810b1f8551d543f33a48ba88dcb0e8002b0f" - Alias VatAddress "0x2d9fad7795f0658f5931b75845d14250aecc81ee" - Web3Fork "https://kovan.infura.io/v3/e1a5d4d2c06a4e81945fca56d0d5d8ea@14760012" (CTokenAdmin DaiHolder) - Erc20 Deploy Existing DAI DaiAddress DAI - Assert Equal (EtherBalance CTokenAdmin) 1.680448935e18 -- Ensure the fork works as expected - -Macro ForkMCD101 - -- Uses MakerDAO 1.0.1 Release https://changelog.makerdao.com/releases/kovan/1.0.1/index.html - Alias CTokenAdmin "0xA776184Fd6F545DAe5f51361dBcC9018549a9749" - Alias DaiHolder "0x72776bb917751225d24c07d0663b3780b2ada67c" - Alias DaiJoinAddress "0x5aa71a3ae1c0bd6ac27a1f28e1415fffb6f15b8c" - Alias PotAddress "0xea190dbdc7adf265260ec4da6e9675fd4f5a78bb" - Alias VatAddress "0xba987bdb501d131f766fee8180da5d81b34b69d9" - Alias JugAddress "0xcbb7718c9f39d05aeede1c472ca8bf804b2f1ead" - Web3Fork "https://kovan.infura.io/v3/e1a5d4d2c06a4e81945fca56d0d5d8ea@15090204" (CTokenAdmin DaiHolder) - -Macro DeployCDAIWithDSR - ForkMCD - NewComptroller - InterestRateModel Deploy Fixed StdInterest 0.000005 - CTokenDelegate Deploy CDaiDelegate cDaiDelegate - From CTokenAdmin (CToken Deploy CErc20Delegator cDAI cDAI (Erc20 DAI Address) (Comptroller Address) (InterestRateModel StdInterest Address) 1e9 8 CTokenAdmin (CTokenDelegate cDaiDelegate Address) (EncodeParameters ("address" "address") (DaiJoinAddress PotAddress))) - Comptroller SupportMarket cDAI - -Macro DeployCDAI - ForkMCD - NewComptroller - InterestRateModel Deploy Fixed StdInterest 0.000005 - CTokenDelegate Deploy CErc20Delegate cErc20Delegate - From CTokenAdmin (CToken Deploy CErc20Delegator cDAI cDAI (Erc20 DAI Address) (Comptroller Address) (InterestRateModel StdInterest Address) 1e9 8 CTokenAdmin (CTokenDelegate cErc20Delegate Address) "0x0") - Comptroller SupportMarket cDAI - -Macro UpgradeToDSR - CTokenDelegate Deploy CDaiDelegate cDaiDelegate - From CTokenAdmin (CToken cDAI SetImplementation (CTokenDelegate cDaiDelegate Address) True (EncodeParameters ("address" "address") (DaiJoinAddress PotAddress))) - -Macro CheckBasicMintRedeem - From DaiHolder (Erc20 DAI Transfer Jared 2e18) - From Jared (Erc20 DAI Approve (CToken cDAI Address) 2e18) - Mint Jared 1e18 cDAI - Assert Equal (Erc20 cDAI TokenBalance Jared) (Exactly 1e9) - Expect Changes (Erc20 cDAI TokenBalance Jared) -1e9 - Redeem Jared 1e9 cDAI - -Macro CheckBasicMintRedeemWithDSR - -- Note: we cannot tightly control time for evm calls in ganache, so we approximate time-based values - -- Approve and mint cDAI from DAI - From DaiHolder (Erc20 DAI Approve (CToken cDAI Address) 1e30) - Mint DaiHolder 1e18 cDAI - Assert Equal (Erc20 cDAI TokenBalance DaiHolder) (Exactly 1e9) - -- Sanity check the DSR - Assert Equal (MCD PotAt PotAddress "dsr") (Exactly 1000000000627937192491029810) - -- Check that the funds are in the pot and not the vat - Assert Approx (MCD PotAt PotAddress "pie" (CToken cDAI Address)) 999784970332262855 -- pot is a wad (1e18), check for ~ 1 DAI - Assert (MCD VatAt VatAddress "dai" (CToken cDAI Address)) LessThan 1e27 -- vat is a rad (1e45), check for ~ dust - -- Time passes - IncreaseTime 100000 - -- Check that holder earns the DSR on 1 DAI after redeeming (1 DAI * (dsr ** seconds)) - Expect Changes (Erc20 DAI TokenBalance DaiHolder) 1000006279390070400 0.0001 - Redeem DaiHolder 1e9 cDAI - -- Check that the funds are not in the pot nor the vat - -- Note: we always move a little too much into vat on transfer out, so it might be extra dusty - Assert Equal (MCD PotAt PotAddress "pie" (CToken cDAI Address)) 0 -- pot is a wad (1e18), check for ~ dust - Assert (MCD VatAt VatAddress "dai" (CToken cDAI Address)) LessThan 2e27 -- vat is a rad (1e45), check for ~ dust - -Macro CheckBasicBorrowRepayWithDSR repayAmount=1000015000000000000 - -- Note: we cannot tightly control time for evm calls in ganache, so we approximate time-based values - NewCToken BAT cBAT - Support cBAT collateralFactor:0.5 - -- Add some DAI to borrow - From DaiHolder (Erc20 DAI Approve (CToken cDAI Address) 1e30) - Mint DaiHolder 1e18 cDAI - -- Get some collateral and borrow - EnterMarkets Geoff cBAT - Prep Geoff Some BAT cBAT - Mint Geoff 100e18 cBAT - Expect Changes (Erc20 DAI TokenBalance Geoff) (Exactly 1e18) - Borrow Geoff 1e18 cDAI - -- Check that the funds are not in the pot nor the vat - -- Note: we always move a little too much into vat on transfer out, so it might be extra dusty - Assert (MCD PotAt PotAddress "pie" (CToken cDAI Address)) LessThan 5e10 -- pot is a wad (1e18), check for ~ dust + DSR - Assert (MCD VatAt VatAddress "dai" (CToken cDAI Address)) LessThan 2e27 -- vat is a rad (1e45), check for ~ dust - -- Repay the principal + interest after 3 blocks (i.e. 3 transactions since) - From DaiHolder (Erc20 DAI Transfer Geoff 1e18) - From Geoff (Erc20 DAI Approve (CToken cDAI Address) 1e30) - RepayBorrow Geoff repayAmount cDAI - Assert Equal (cToken cDAI BorrowBalance Geoff) 0 - -- Check that the funds are in the pot and not the vat - -- Note: we always move a little too much into vat on transfer out, so it might be extra dusty - Assert Approx (MCD PotAt PotAddress "pie" (CToken cDAI Address)) repayAmount -- pot is a wad (1e18), check for ~ 1 DAI + interest - Assert (MCD VatAt VatAddress "dai" (CToken cDAI Address)) LessThan 2e27 -- vat is a rad (1e45), check for ~ dust - -Pending "Basic mint and redeem cDAI2 (directly to swept DSR)" - DeployCDAIWithDSR - CheckBasicMintRedeemWithDSR - -Pending "Basic borrow and repay cDAI2 (directly to swept DSR)" - DeployCDAIWithDSR - CheckBasicBorrowRepayWithDSR - -Pending "Basic mint and redeem cDAI2 (upgrade to swept DSR)" - DeployCDAI - CheckBasicMintRedeem - UpgradeToDSR - CheckBasicMintRedeemWithDSR - -Pending "Basic borrow and repay cDAI2 (upgrade to swept DSR)" - DeployCDAI - CheckBasicMintRedeem - UpgradeToDSR - CheckBasicBorrowRepayWithDSR repayAmount:1000014999999999999 -- real block numbers can get nasty - -Pending "Mint, upgrade to DSR and then downgrade to vanilla delegate" - DeployCDAI - From DaiHolder (Erc20 DAI Approve (CToken cDAI Address) 1e18) - Mint DaiHolder 1e18 cDAI - Assert Equal (Erc20 DAI TokenBalance cDAI) 1e18 - Assert Equal (CToken cDAI Cash) 1e18 - -- Upgrade - UpgradeToDSR - Assert Equal (Erc20 DAI TokenBalance cDAI) 0 - Assert Approx (CToken cDAI Cash) 1e18 - Assert Approx (MCD PotAt PotAddress "pie" (CToken cDAI Address)) 1e18 - -- Downgrade - From CTokenAdmin (CToken cDAI SetImplementation (CTokenDelegate cErc20Delegate Address) True "0x0") - Assert Approx (Erc20 DAI TokenBalance cDAI) 1e18 - Assert Approx (CToken cDAI Cash) 1e18 - -Pending "Mint, upgrade to DSR, mint, and then reupgrade to a new cdai delegate" - DeployCDAI - From DaiHolder (Erc20 DAI Approve (CToken cDAI Address) 2e18) - Mint DaiHolder 1e18 cDAI - Assert Equal (Erc20 DAI TokenBalance cDAI) 1e18 - Assert Equal (CToken cDAI Cash) 1e18 - -- Upgrade - UpgradeToDSR - Mint DaiHolder 1e18 cDAI - Assert Equal (Erc20 DAI TokenBalance cDAI) 0 - Assert Approx (CToken cDAI Cash) 2e18 - Assert Approx (MCD PotAt PotAddress "pie" (CToken cDAI Address)) 2e18 - -- Reupgrade to a new cDaiDelegate - CTokenDelegate Deploy CDaiDelegate cDaiDelegate2 - From CTokenAdmin (CToken cDAI SetImplementation (CTokenDelegate cDaiDelegate2 Address) True (EncodeParameters ("address" "address") (DaiJoinAddress PotAddress))) - Assert Equal (Erc20 DAI TokenBalance cDAI) 0 - Assert Approx (CToken cDAI Cash) 2e18 - Assert Approx (MCD PotAt PotAddress "pie" (CToken cDAI Address)) 2e18 - -Pending "Test resigning implementation" - ForkMCD101 - UseConfigs kovan - Assert Approx (Erc20 DAI TokenBalance cDAI) 0 - Assert Equal (MCD PotAt PotAddress "pie" (CToken cDAI Address)) 137889496810499277888 - From CTokenAdmin (CToken cDAI ResignImplementation) - Assert Approx (Erc20 DAI TokenBalance cDAI) 137889496810499277888 - Assert Approx (MCD PotAt PotAddress "pie" (CToken cDAI Address)) 0 - -Pending "DAI interest rate model" - ForkMCD101 - InterestRateModel Deploy DAIInterestRateModel DSR_Kink_9000bps_Jump_12000bps_AssumedRF_500bps 120e16 90e16 PotAddress JugAddress CTokenAdmin diff --git a/spec/scenario/Mint.scen b/spec/scenario/Mint.scen deleted file mode 100644 index 3149da121..000000000 --- a/spec/scenario/Mint.scen +++ /dev/null @@ -1,114 +0,0 @@ --- Mint Tests - -Test "Mint 1 cZRX" - NewComptroller - ListedCToken ZRX cZRX initialExchangeRate:1e9 - Comptroller SetMarketSupplyCaps (cZRX) (2000e18) - Prep Geoff Some ZRX cZRX - Mint Geoff 50e18 cZRX - Assert Equal (Erc20 cZRX TokenBalance Geoff) (Exactly 50e9) - -- Assert Equal (CToken cZRX UnderlyingBalance Geoff) (Exactly 1.0e18) - -Test "Mint with insufficient allowance" - NewComptroller - ListedCToken ZRX cZRX initialExchangeRate:1e9 - Comptroller SetMarketSupplyCaps (cZRX) (2000e18) - Prep Geoff 50e18 ZRX cZRX allowanceAmount:49e18 - AllowFailures - Mint Geoff 50e18 cZRX - Assert Revert "revert Insufficient allowance" - Assert Equal (Erc20 cZRX TokenBalance Geoff) (Exactly 0e9) - -Test "Mint with insufficient balance" - NewComptroller - ListedCToken ZRX cZRX initialExchangeRate:1e9 - Comptroller SetMarketSupplyCaps (cZRX) (2000e18) - Prep Geoff 49e18 ZRX cZRX allowanceAmount:50e18 - AllowFailures - Mint Geoff 50e18 cZRX - Assert Revert "revert Insufficient balance" - Assert Equal (Erc20 cZRX TokenBalance Geoff) (Exactly 0e9) - -Test "Mint two ZRX after minting two ZRX, and then I mint two more" - NewComptroller - ListedCToken ZRX cZRX initialExchangeRate:1e9 - Comptroller SetMarketSupplyCaps (cZRX) (2000e18) - Prep Geoff Some ZRX cZRX - Mint Geoff 2e18 cZRX - Assert Equal (Erc20 cZRX TokenBalance Geoff) (Exactly 2e9) - Assert Equal (Erc20 cZRX TotalSupply) (Exactly 2e9) - Mint Geoff 2e18 cZRX - Assert Equal (Erc20 cZRX TokenBalance Geoff) (Exactly 4e9) - Assert Equal (Erc20 cZRX TotalSupply) (Exactly 4e9) - Mint Geoff 2e18 cZRX - Assert Equal (Erc20 cZRX TokenBalance Geoff) (Exactly 6e9) - Assert Equal (Erc20 cZRX TotalSupply) (Exactly 6e9) - -Test "Two users Mint" - NewComptroller - ListedCToken ZRX cZRX initialExchangeRate:1e9 - Comptroller SetMarketSupplyCaps (cZRX) (2000e18) - Prep Geoff Some ZRX cZRX - Prep Torrey Some ZRX cZRX - Mint Geoff 2e18 cZRX - Assert Equal (Erc20 cZRX TokenBalance Geoff) (Exactly 2e9) - Assert Equal (Erc20 cZRX TotalSupply) (Exactly 2e9) - Mint Torrey 2e18 cZRX - Assert Equal (Erc20 cZRX TokenBalance Geoff) (Exactly 2e9) - Assert Equal (Erc20 cZRX TokenBalance Torrey) (Exactly 2e9) - Assert Equal (Erc20 cZRX TotalSupply) (Exactly 4e9) - -Test "Mint accrues no interest without borrows" - NewComptroller - ListedCToken ZRX cZRX initialExchangeRate:1e9 - Comptroller SetMarketSupplyCaps (cZRX) (2000e18) - Prep Geoff Some ZRX cZRX - Prep Torrey Some ZRX cZRX - Mint Geoff 2e18 cZRX - Assert Equal (Erc20 cZRX TokenBalance Geoff) (Exactly 2e9) - Assert Equal (Erc20 cZRX TotalSupply) (Exactly 2e9) - FastForward 1000 Blocks - Assert Equal (Erc20 cZRX TokenBalance Geoff) (Exactly 2e9) - Assert Equal (Erc20 cZRX TotalSupply) (Exactly 2e9) - -Test "Mint transfer in fails" - NewComptroller - ListedCToken EVL cEVL tokenType:Evil - Comptroller SetMarketSupplyCaps (cEVL) (2000e18) - Prep Geoff Some EVL cEVL - Prep Torrey Some EVL cEVL - Invariant Static (Erc20 cEVL TokenBalance Geoff) - Invariant Static (Erc20 cEVL TotalSupply) - Invariant Static (Erc20 EVL TotalSupply) - AllowFailures - Mint Geoff 2e18 cEVL - Assert Revert "revert TOKEN_TRANSFER_IN_FAILED" - -Test "Denied by comptroller because unlisted" - NewComptroller - NewCToken ZRX cZRX - Comptroller SetMarketSupplyCaps (cZRX) (2000e18) - Prep Geoff Some ZRX cZRX - Prep Torrey Some ZRX cZRX - Invariant Static (Erc20 cZRX TokenBalance Geoff) - Invariant Static (Erc20 cZRX TotalSupply) - Invariant Static (Erc20 ZRX TotalSupply) - AllowFailures - Mint Geoff 2e18 cZRX - Assert RevertCustomError MintComptrollerRejection 9 - -Test "mint reverts if mint is paused" - NewComptroller - ListedCToken ZRX cZRX - Comptroller SetMarketSupplyCaps (cZRX) (2000e18) - Prep Geoff Some ZRX cZRX - Prep Torrey Some ZRX cZRX - Invariant Static (Erc20 cZRX TokenBalance Geoff) - Invariant Static (Erc20 cZRX TotalSupply) - Invariant Static (Erc20 ZRX TotalSupply) - Comptroller SetPauseGuardian Coburn - From Coburn (Comptroller SetGuardianMarketPaused cZRX "Mint" True) - AllowFailures - Mint Geoff 2e18 cZRX - Assert Revert "revert mint is paused" - Comptroller SetGuardianMarketPaused cZRX "Mint" False diff --git a/spec/scenario/MintEth.scen b/spec/scenario/MintEth.scen deleted file mode 100644 index 2039c053a..000000000 --- a/spec/scenario/MintEth.scen +++ /dev/null @@ -1,72 +0,0 @@ --- Mint Tests - -GasTest "Send Mint 1 cETH" - NewComptroller - ListedEtherTokenMinted cETH initialExchangeRate:0.005e9 - Comptroller SetMarketSupplyCaps (cETH) (2000e18) - Expect Changes (EtherBalance Geoff) -0.005e18 - Expect Changes (CToken cETH UnderlyingBalance Geoff) +0.005e18 - SendMintEth Geoff 0.005e18 cETH - Assert Equal (Erc20 cETH TokenBalance Geoff) 10e8 - Assert LastGas LessThan 1.2e5 - -GasTest "Call Mint 1 cETH" - NewComptroller - ListedEtherTokenMinted cETH initialExchangeRate:0.005e9 - Comptroller SetMarketSupplyCaps (cETH) (2000e18) - Expect Changes (EtherBalance Geoff) -0.005e18 - Expect Changes (CToken cETH UnderlyingBalance Geoff) +0.005e18 - CallMintEth Geoff 0.005e18 cETH - Assert Equal (Erc20 cETH TokenBalance Geoff) 10e8 - Assert LastGas LessThan 1.2e5 - -Test "Mint with insufficient eth balance" - NewComptroller - ListedEtherTokenMinted cETH initialExchangeRate:0.005e9 - Comptroller SetMarketSupplyCaps (cETH) (2000e18) - AllowFailures - Invariant Remains (CToken cETH UnderlyingBalance Geoff) 0e18 - Invariant Remains (Erc20 cETH TokenBalance Geoff) 0e8 - Invariant Static (EtherBalance Geoff) - CallMintEth Geoff 1e20 cETH - Assert Error "sender doesn't have enough funds to send tx. The upfront cost is" - -Test "Mint two Eth after minting two Eth, and then I mint two more" - NewComptroller - ListedEtherToken cETH initialExchangeRate:0.005e9 - Comptroller SetMarketSupplyCaps (cETH) (2000e18) - Expect Changes (EtherBalance Geoff) -0.002e18 - CallMintEth Geoff 0.002e18 cETH - Assert Equal (Erc20 cETH TokenBalance Geoff) 4e8 - Assert Equal (Erc20 cETH TotalSupply) 4e8 - Expect Changes (EtherBalance Geoff) -0.002e18 - SendMintEth Geoff 0.002e18 cETH - Assert Equal (Erc20 cETH TokenBalance Geoff) 8e8 - Assert Equal (Erc20 cETH TotalSupply) 8e8 - Expect Changes (EtherBalance Geoff) -0.002e18 - CallMintEth Geoff 0.002e18 cETH - Assert Equal (Erc20 cETH TokenBalance Geoff) 12e8 - Assert Equal (Erc20 cETH TotalSupply) 12e8 - -Test "Two users Mint" - NewComptroller - ListedEtherToken cETH initialExchangeRate:0.005e9 - Comptroller SetMarketSupplyCaps (cETH) (2000e18) - CallMintEth Geoff 0.002e18 cETH - Assert Equal (Erc20 cETH TokenBalance Geoff) 4e8 - Assert Equal (Erc20 cETH TotalSupply) 4e8 - CallMintEth Torrey 0.004e18 cETH - Assert Equal (Erc20 cETH TokenBalance Geoff) 4e8 - Assert Equal (Erc20 cETH TokenBalance Torrey) 8e8 - Assert Equal (Erc20 cETH TotalSupply) 12e8 - -Test "Mint accrues no interest without borrows" - NewComptroller - ListedEtherToken cETH initialExchangeRate:0.005e9 - Comptroller SetMarketSupplyCaps (cETH) (2000e18) - CallMintEth Geoff 0.002e18 cETH - Assert Equal (Erc20 cETH TokenBalance Geoff) 4e8 - Assert Equal (Erc20 cETH TotalSupply) 4e8 - FastForward 1000 Blocks - Assert Equal (Erc20 cETH TokenBalance Geoff) 4e8 - Assert Equal (Erc20 cETH TotalSupply) 4e8 diff --git a/spec/scenario/MintWBTC.scen b/spec/scenario/MintWBTC.scen deleted file mode 100644 index 4279889b9..000000000 --- a/spec/scenario/MintWBTC.scen +++ /dev/null @@ -1,101 +0,0 @@ --- Mint Tests - -Test "Mint 1 cWBTC" - NewComptroller - ListedCToken WBTC cWBTC initialExchangeRate:0.2 tokenType:WBTC - Comptroller SetMarketSupplyCaps (cWBTC) (2000e18) - Prep Geoff Some WBTC cWBTC - Mint Geoff 10e8 cWBTC - Assert Equal (Erc20 cWBTC TokenBalance Geoff) (Exactly 50e8) - Assert Equal (CToken cWBTC UnderlyingBalance Geoff) (Exactly 10e8) - -Test "Mint WBTC with insufficient allowance" - NewComptroller - ListedCToken WBTC cWBTC initialExchangeRate:0.2 tokenType:WBTC - Comptroller SetMarketSupplyCaps (cWBTC) (2000e18) - Prep Geoff 5e8 WBTC cWBTC allowanceAmount:4.9e8 - AllowFailures - Mint Geoff 5e8 cWBTC - --wbtc does not revert with reason in transfer from - Assert Revert "revert" - Assert Equal (Erc20 cWBTC TokenBalance Geoff) (Exactly 0e8) - -Test "Mint WBTC with insufficient balance" - NewComptroller - ListedCToken WBTC cWBTC initialExchangeRate:0.2 tokenType:WBTC - Comptroller SetMarketSupplyCaps (cWBTC) (2000e18) - Prep Geoff 4.9e8 WBTC cWBTC allowanceAmount:5e8 - AllowFailures - Mint Geoff 5e8 cWBTC - --wbtc does not revert with reason in transfer from - Assert Revert "revert" - Assert Equal (Erc20 cWBTC TokenBalance Geoff) (Exactly 0e8) - -Test "Mint two WBTC after minting two WBTC, and then I mint two more" - NewComptroller - ListedCToken WBTC cWBTC initialExchangeRate:0.2 tokenType:WBTC - Comptroller SetMarketSupplyCaps (cWBTC) (2000e18) - Prep Geoff Some WBTC cWBTC - Mint Geoff 2e8 cWBTC - Assert Equal (Erc20 cWBTC TokenBalance Geoff) (Exactly 10e8) - Assert Equal (Erc20 cWBTC TotalSupply) (Exactly 10e8) - Mint Geoff 2e8 cWBTC - Assert Equal (Erc20 cWBTC TokenBalance Geoff) (Exactly 20e8) - Assert Equal (Erc20 cWBTC TotalSupply) (Exactly 20e8) - Mint Geoff 2e8 cWBTC - Assert Equal (Erc20 cWBTC TokenBalance Geoff) (Exactly 30e8) - Assert Equal (Erc20 cWBTC TotalSupply) (Exactly 30e8) - -Test "Two users Mint WBTC" - NewComptroller - ListedCToken WBTC cWBTC initialExchangeRate:0.2 tokenType:WBTC - Comptroller SetMarketSupplyCaps (cWBTC) (2000e18) - Prep Geoff Some WBTC cWBTC - Prep Torrey Some WBTC cWBTC - Mint Geoff 2e8 cWBTC - Assert Equal (Erc20 cWBTC TokenBalance Geoff) (Exactly 10e8) - Assert Equal (Erc20 cWBTC TotalSupply) (Exactly 10e8) - Mint Torrey 2e8 cWBTC - Assert Equal (Erc20 cWBTC TokenBalance Geoff) (Exactly 10e8) - Assert Equal (Erc20 cWBTC TokenBalance Torrey) (Exactly 10e8) - Assert Equal (Erc20 cWBTC TotalSupply) (Exactly 20e8) - -Test "Mint WBTC accrues no interest without borrows" - NewComptroller - ListedCToken WBTC cWBTC initialExchangeRate:0.2 tokenType:WBTC - Comptroller SetMarketSupplyCaps (cWBTC) (2000e18) - Prep Geoff Some WBTC cWBTC - Prep Torrey Some WBTC cWBTC - Mint Geoff 2e8 cWBTC - Assert Equal (Erc20 cWBTC TokenBalance Geoff) (Exactly 10e8) - Assert Equal (Erc20 cWBTC TotalSupply) (Exactly 10e8) - FastForward 1000 Blocks - Assert Equal (Erc20 cWBTC TokenBalance Geoff) (Exactly 10e8) - Assert Equal (Erc20 cWBTC TotalSupply) (Exactly 10e8) - -Test "Mint WBTC transfer in fails due to paused" - NewComptroller - ListedCToken WBTC cWBTC initialExchangeRate:0.2 tokenType:WBTC - Comptroller SetMarketSupplyCaps (cWBTC) (2000e18) - Prep Geoff Some WBTC cWBTC - Prep Torrey Some WBTC cWBTC - Invariant Static (Erc20 cWBTC TokenBalance Geoff) - Invariant Static (Erc20 cWBTC TotalSupply) - Invariant Static (Erc20 WBTC TotalSupply) - Erc20 WBTC Pause - AllowFailures - Mint Geoff 2e8 cWBTC - Assert Revert - -Test "Denied by comptroller because WBTC unlisted" - NewComptroller - NewCToken WBTC cWBTC tokenType:WBTC - Comptroller SetMarketSupplyCaps (cWBTC) (2000e18) - Prep Geoff Some WBTC cWBTC - Prep Torrey Some WBTC cWBTC - Invariant Static (Erc20 cWBTC TokenBalance Geoff) - Invariant Static (Erc20 cWBTC TotalSupply) - Invariant Static (Erc20 WBTC TotalSupply) - AllowFailures - Mint Geoff 2e8 cWBTC - Assert RevertCustomError MintComptrollerRejection 9 diff --git a/spec/scenario/PriceOracleProxy.scen b/spec/scenario/PriceOracleProxy.scen deleted file mode 100644 index 600d0536a..000000000 --- a/spec/scenario/PriceOracleProxy.scen +++ /dev/null @@ -1,53 +0,0 @@ -Macro SetupPriceOracleProxy - Unitroller Deploy - PriceOracle Deploy Simple - -- Update to G1 - ComptrollerImpl Deploy ScenarioG1 ScenComptrollerG1 - Unitroller SetPendingImpl ScenComptrollerG1 - PriceOracleProxy Deploy Admin (PriceOracle Address) (Address Zero) (Address Zero) (Address Zero) (Address Zero) (Address Zero) - ComptrollerImpl ScenComptrollerG1 BecomeG1 (PriceOracleProxy Address) 0.1 20 - -- Update to G2 - ComptrollerImpl Deploy StandardG2 ComptrollerG2 - Unitroller SetPendingImpl ComptrollerG2 - ComptrollerImpl ComptrollerG2 BecomeG2 - -- Update to G3 - ComptrollerImpl Deploy StandardG3 ComptrollerG3 - Unitroller SetPendingImpl ComptrollerG3 - ComptrollerImpl ComptrollerG3 BecomeG3 1e18 [] - -- Update to G* - ComptrollerImpl Deploy Scenario ScenComptroller - Unitroller SetPendingImpl ScenComptroller - ComptrollerImpl ScenComptroller Become - NewEtherToken cETH - NewCToken USDC cUSDC - NewCToken SAI cSAI - NewCToken DAI cDAI - NewCToken USDT cUSDT - Comptroller SupportMarket cETH - Comptroller SupportMarket cUSDC - Comptroller SupportMarket cSAI - Comptroller SupportMarket cDAI - Comptroller SupportMarket cUSDT - PriceOracleProxy Deploy Admin (PriceOracle Address) (Address cETH) (Address cUSDC) (Address cSAI) (Address cDAI) (Address cUSDT) - Comptroller SetPriceOracle (PriceOracleProxy Address) - -Test "uses address(2) for dai and address(1) for usdc" - SetupPriceOracleProxy - PriceOracle SetDirectPrice (Address 0x0000000000000000000000000000000000000001) 5740564708.572881 - PriceOracle SetDirectPrice (Address 0x0000000000000000000000000000000000000002) 0.005842307360923634 - Assert Equal (PriceOracleProxy Price cUSDC) 5740564708572881000000000000 - Assert Equal (PriceOracleProxy Price cDAI) 5842307360923634 - -Test "sai price is dai price until set" - SetupPriceOracleProxy - PriceOracle SetDirectPrice (Address 0x0000000000000000000000000000000000000002) 0.005842307360923634 - Assert Equal (PriceOracleProxy Price cSAI) 5842307360923634 - PriceOracleProxy SetSaiPrice 0.006842307360923634 - Assert Equal (PriceOracleProxy Price cSAI) 6842307360923634 - -Test "gets tether and usdc prices" - SetupPriceOracleProxy - PriceOracle SetDirectPrice (Address 0x0000000000000000000000000000000000000001) 5740564708.572881 - -- scaled to 1e30 bc both tokens have 6 decimals - Assert Equal (PriceOracleProxy Price cUSDT) 5740564708572881000000000000 - Assert Equal (PriceOracleProxy Price cUSDC) 5740564708572881000000000000 diff --git a/spec/scenario/ReEntry.scen b/spec/scenario/ReEntry.scen deleted file mode 100644 index 5aab1c41c..000000000 --- a/spec/scenario/ReEntry.scen +++ /dev/null @@ -1,13 +0,0 @@ - -Test "ReEntry Mint @no-cov" - NewComptroller - Erc20 Deploy ReEntrant PHREAK PHREAK "transferFrom" "mint(uint256)" "0" - InterestRateModel Deploy Fixed Std 0.000001 - CToken Deploy Scenario cPHREAK cPHREAK (Erc20 PHREAK Address) (Comptroller Address) (InterestRateModel Std Address) 1e9 8 Admin - Comptroller SetMarketSupplyCaps (cPHREAK) (2e30) - Comptroller SupportMarket cPHREAK - Prep Geoff Some PHREAK cPHREAK - AllowFailures - Mint Geoff 50e18 cPHREAK - Assert Revert "revert re-entered" - Assert Equal (Erc20 cPHREAK TokenBalance Geoff) Zero diff --git a/spec/scenario/Redeem.scen b/spec/scenario/Redeem.scen deleted file mode 100644 index 3f74e680d..000000000 --- a/spec/scenario/Redeem.scen +++ /dev/null @@ -1,239 +0,0 @@ --- Redeem Tests - -Test "Mint then Redeem All" - NewComptroller - ListedCToken ZRX cZRX initialExchangeRate:1e9 - Comptroller SetMarketSupplyCaps (cZRX) (2000e18) - Prep Geoff 70e18 ZRX cZRX - Mint Geoff 50e18 cZRX - -- Check current affairs - Assert Equal (Erc20 cZRX TokenBalance Geoff) 500e8 - Assert Equal (Erc20 ZRX TokenBalance Geoff) 20e18 - -- Any other good invariants? - Invariant Static (CToken cZRX ExchangeRateStored) - -- Now redeem after some time - FastForward 2 Blocks - Redeem Geoff 500e8 cZRX - Assert Equal (Erc20 cZRX TokenBalance Geoff) Zero - Assert Equal (Erc20 ZRX TokenBalance Geoff) 70e18 - -Test "Mint, Enter and then Redeem All" - NewComptroller - ListedCToken ZRX cZRX initialExchangeRate:1e9 - Comptroller SetMarketSupplyCaps (cZRX) (2000e18) - Prep Geoff 70e18 ZRX cZRX - Mint Geoff 50e18 cZRX - -- Check current affairs - Assert Equal (Erc20 cZRX TokenBalance Geoff) 500e8 - Assert Equal (Erc20 ZRX TokenBalance Geoff) 20e18 - -- Any other good invariants? - Invariant Static (CToken cZRX ExchangeRateStored) - -- Now redeem after some time - FastForward 2 Blocks - EnterMarkets Geoff cZRX - Redeem Geoff 500e8 cZRX - Assert Equal (Erc20 cZRX TokenBalance Geoff) Zero - Assert Equal (Erc20 ZRX TokenBalance Geoff) 70e18 - -Test "Mint then Redeem Part" - NewComptroller - ListedCToken ZRX cZRX initialExchangeRate:1e9 - Comptroller SetMarketSupplyCaps (cZRX) (2000e18) - Prep Geoff 70e18 ZRX cZRX - Mint Geoff 50e18 cZRX - -- Check current affairs - Assert Equal (Erc20 cZRX TokenBalance Geoff) 500e8 - Assert Equal (Erc20 ZRX TokenBalance Geoff) 20e18 - -- Any other good invariants? - Invariant Static (CToken cZRX ExchangeRateStored) - -- Now redeem after some time - FastForward 2 Blocks - Redeem Geoff 250e8 cZRX - Assert Equal (Erc20 cZRX TokenBalance Geoff) 250e8 - Assert Equal (Erc20 ZRX TokenBalance Geoff) 45e18 - -Test "Mint then Redeem Too Much" - NewComptroller - ListedCToken ZRX cZRX initialExchangeRate:1e9 - Comptroller SetMarketSupplyCaps (cZRX) (2000e18) - Prep Geoff 70e18 ZRX cZRX - Mint Geoff 50e18 cZRX - -- Check and hold static - Invariant Static (CToken cZRX ExchangeRateStored) - Invariant Remains (Erc20 cZRX TokenBalance Geoff) 500e8 - Invariant Remains (Erc20 ZRX TokenBalance Geoff) 20e18 - -- Now redeem after some time - FastForward 2 Blocks - AllowFailures - Redeem Geoff 501e8 cZRX - Assert Revert - -Test "Mint then Redeem Zero" - NewComptroller - ListedCToken ZRX cZRX initialExchangeRate:1e9 - Comptroller SetMarketSupplyCaps (cZRX) (2000e18) - Prep Geoff 70e18 ZRX cZRX - Mint Geoff 50e18 cZRX - -- Check current affairs - Assert Equal (Erc20 cZRX TokenBalance Geoff) 500e8 - Assert Equal (Erc20 ZRX TokenBalance Geoff) 20e18 - -- Any other good invariants? - Invariant Static (CToken cZRX ExchangeRateStored) - -- Now redeem after some time - FastForward 2 Blocks - Redeem Geoff 0e18 cZRX - Assert Equal (Erc20 cZRX TokenBalance Geoff) 500e8 - Assert Equal (Erc20 ZRX TokenBalance Geoff) 20e18 - -Test "Mint then redeem with interest - no reserves" - NewComptroller - ListedCToken ZRX cZRX initialExchangeRate:1e9 - Comptroller SetMarketSupplyCaps (cZRX) (2000e18) - Invariant Remains (CToken cZRX Reserves) Zero - Prep Geoff 50e18 ZRX cZRX - Mint Geoff 50e18 cZRX - Assert Equal (Erc20 cZRX TokenBalance Geoff) 500e8 - Assert Equal (CToken cZRX UnderlyingBalance Geoff) 50e18 - Assert Equal (CToken cZRX ExchangeRate) 1e9 - -- Get some brah to borrow then repay - BorrowAndRepayWithInterest ZRX cZRX 10e18 5e18 interestRate:0.000001 blocks:500000 - -- We've accrued .001% interest for 500000 blocks, or 50% of the principal, - -- thus, we should have accrued 5e18 of interest for the protocol - -- This is due pro-rata to all suppliers, but we just have one, so - -- let's check that account is given correct new balance. - Assert Equal (Erc20 cZRX TokenBalance Geoff) 500e8 - Assert Equal (CToken cZRX UnderlyingBalance Geoff) 55e18 - Assert Equal (CToken cZRX ExchangeRate) 1.1e9 - -- Now redeem all with interest - Redeem Geoff 500e8 cZRX - Assert Equal (Erc20 ZRX TokenBalance Geoff) 55e18 - Assert Equal (Erc20 ZRX TokenBalance cZRX) 0e18 - Assert Equal (Erc20 cZRX TokenBalance Geoff) 0e8 - Assert Equal (CToken cZRX UnderlyingBalance Geoff) 0e18 - Assert Equal (CToken cZRX ExchangeRate) 1e9 - -Test "Mint then redeem part with interest - no reserves" - NewComptroller - ListedCToken ZRX cZRX initialExchangeRate:1e9 - Comptroller SetMarketSupplyCaps (cZRX) (2000e18) - Invariant Remains (CToken cZRX Reserves) Zero - Prep Geoff 50e18 ZRX cZRX - Mint Geoff 50e18 cZRX - Assert Equal (Erc20 cZRX TokenBalance Geoff) 500e8 - Assert Equal (CToken cZRX UnderlyingBalance Geoff) 50e18 - Assert Equal (CToken cZRX ExchangeRate) 1e9 - -- Get some brah to borrow then repay - BorrowAndRepayWithInterest ZRX cZRX 10e18 5e18 interestRate:0.000001 blocks:500000 - -- We've accrued .001% interest for 500000 blocks, or 50% of the principal, - -- thus, we should have accrued 5e18 of interest for the protocol - -- This is due pro-rata to all suppliers, but we just have one, so - -- let's check that account is given correct new balance. - Assert Equal (Erc20 cZRX TokenBalance Geoff) 500e8 - Assert Equal (CToken cZRX UnderlyingBalance Geoff) 55e18 - Assert Equal (CToken cZRX ExchangeRate) 1.1e9 - -- Now redeem all with interest - Redeem Geoff 499e8 cZRX - Assert Equal (Erc20 cZRX TokenBalance Geoff) 1e8 - Assert Equal (CToken cZRX UnderlyingBalance Geoff) 0.11e18 - Assert Equal (CToken cZRX ExchangeRate) 1.1e9 - -Test "Mint then redeem with reserves and interest" - NewComptroller - ListedCToken ZRX cZRX initialExchangeRate:1e9 - Comptroller SetMarketSupplyCaps (cZRX) (2000e18) - Prep Geoff 50e18 ZRX cZRX - Mint Geoff 50e18 cZRX - Assert Equal (Erc20 cZRX TokenBalance Geoff) 500e8 - Assert Equal (CToken cZRX UnderlyingBalance Geoff) 50e18 - Assert Equal (CToken cZRX ExchangeRate) 1e9 - -- Get some brah to borrow then repay - BorrowAndRepayWithInterest ZRX cZRX 10e18 5e18 interestRate:0.000001 blocks:500000 reserveRate:0.2 - -- We've accrued .001% interest for 500000 blocks, or 50% of the principal, - -- thus, we should have accrued 5e18 of interest for the protocol - -- The reserves should get 20% of this, or 1e18, and the rest - -- is due pro-rata to all holders. We just have one, so - -- let's check that account is given correct new balance. - Assert Equal (Erc20 cZRX TokenBalance Geoff) 500e8 - Assert Equal (CToken cZRX Reserves) 1e18 - Assert Equal (CToken cZRX UnderlyingBalance Geoff) 54e18 - -- 55e18 + 0e18 - 1e18 / 500 - Assert Equal (CToken cZRX ExchangeRate) 1.08e9 - -- Now redeem all with interest - Redeem Geoff 500e8 cZRX - Assert Equal (Erc20 ZRX TokenBalance Geoff) 54e18 - Assert Equal (Erc20 ZRX TokenBalance cZRX) 1e18 - Assert Equal (Erc20 cZRX TokenBalance Geoff) 0e8 - Assert Equal (CToken cZRX Reserves) 1e18 - Assert Equal (CToken cZRX UnderlyingBalance Geoff) 0e18 - Assert Equal (CToken cZRX ExchangeRate) 1e9 - -Test "Two users Mint, one redeems" - NewComptroller - ListedCToken ZRX cZRX initialExchangeRate:1e9 - Comptroller SetMarketSupplyCaps (cZRX) (2000e18) - Prep Geoff Some ZRX cZRX - Prep Torrey Some ZRX cZRX - Mint Geoff 2e18 cZRX - Assert Equal (Erc20 cZRX TokenBalance Geoff) 20e8 - Assert Equal (Erc20 cZRX TotalSupply) 20e8 - Mint Torrey 2e18 cZRX - Assert Equal (Erc20 cZRX TokenBalance Geoff) 20e8 - Assert Equal (Erc20 cZRX TokenBalance Torrey) 20e8 - Assert Equal (Erc20 cZRX TotalSupply) 40e8 - Redeem Torrey 10e8 cZRX - Assert Equal (Erc20 cZRX TokenBalance Geoff) 20e8 - Assert Equal (Erc20 cZRX TokenBalance Torrey) 10e8 - Assert Equal (Erc20 cZRX TotalSupply) 30e8 - -Test "Redeem transfer out fails" - NewComptroller - ListedCToken EVL cEVL initialExchangeRate:1e9 tokenType:Evil - Comptroller SetMarketSupplyCaps (cEVL) (2000e18) - Erc20 EVL SetFail False - Prep Geoff 70e18 EVL cEVL - Mint Geoff 50e18 cEVL - -- Check current affairs - Invariant Remains (Erc20 cEVL TokenBalance Geoff) 500e8 - Invariant Remains (Erc20 EVL TokenBalance Geoff) 20e18 - Invariant Static (CToken cEVL ExchangeRateStored) - -- Now redeem after some time - FastForward 2 Blocks - Erc20 EVL SetFail True - AllowFailures - Redeem Geoff 500e8 cEVL - Assert Revert "revert TOKEN_TRANSFER_OUT_FAILED" - -Test "Mint, Enter, then Redeem Too Much (collateral factor: 0)" - NewComptroller - ListedCToken ZRX cZRX initialExchangeRate:1e9 - Comptroller SetMarketSupplyCaps (cZRX) (2000e18) - Prep Geoff 70e18 ZRX cZRX - Mint Geoff 50e18 cZRX - -- Check and hold static - Invariant Static (CToken cZRX ExchangeRateStored) - Invariant Remains (Erc20 cZRX TokenBalance Geoff) 500e8 - Invariant Remains (Erc20 ZRX TokenBalance Geoff) 20e18 - -- Now redeem after some time - FastForward 2 Blocks - EnterMarkets Geoff cZRX - AllowFailures - Redeem Geoff 501e8 cZRX - Assert Revert - -Test "Mint, Enter, then Redeem Too Much (collateral factor: 0.1)" - NewComptroller - ListedCToken ZRX cZRX initialExchangeRate:1e9 - Comptroller SetMarketSupplyCaps (cZRX) (2000e18) - Comptroller SetCollateralFactor cZRX 0.1 - Prep Geoff 70e18 ZRX cZRX - Mint Geoff 50e18 cZRX - -- Check and hold static - Invariant Static (CToken cZRX ExchangeRateStored) - Invariant Remains (Erc20 cZRX TokenBalance Geoff) 500e8 - Invariant Remains (Erc20 ZRX TokenBalance Geoff) 20e18 - -- Now redeem after some time - FastForward 2 Blocks - EnterMarkets Geoff cZRX - AllowFailures - Redeem Geoff 501e8 cZRX - Assert RevertCustomError RedeemComptrollerRejection 4 diff --git a/spec/scenario/RedeemEth.scen b/spec/scenario/RedeemEth.scen deleted file mode 100644 index 49bbd9f6a..000000000 --- a/spec/scenario/RedeemEth.scen +++ /dev/null @@ -1,164 +0,0 @@ --- Redeem Tests - -Test "Mint then Redeem All" - NewComptroller - ListedEtherToken cETH initialExchangeRate:0.005e9 - Comptroller SetMarketSupplyCaps (cETH) (2000e18) - CallMintEth Geoff 0.005e18 cETH - -- Check current affairs - Assert Equal (Erc20 cETH TokenBalance Geoff) 10e8 - Assert Equal (CToken cETH UnderlyingBalance Geoff) 0.005e18 - Invariant Static (CToken cETH ExchangeRateStored) - -- Now redeem after some time - FastForward 2 Blocks - Expect Changes (EtherBalance Geoff) +0.005e18 - RedeemEth Geoff 10e8 cETH - Assert Equal (Erc20 cETH TokenBalance Geoff) Zero - Assert Equal (CToken cETH UnderlyingBalance Geoff) Zero - -Test "Mint then Redeem Part" - NewComptroller - ListedEtherToken cETH initialExchangeRate:0.005e9 - Comptroller SetMarketSupplyCaps (cETH) (2000e18) - CallMintEth Geoff 0.005e18 cETH - -- Check current affairs - Assert Equal (Erc20 cETH TokenBalance Geoff) 10e8 - Assert Equal (CToken cETH UnderlyingBalance Geoff) 0.005e18 - Invariant Static (CToken cETH ExchangeRateStored) - -- Now redeem after some time - FastForward 2 Blocks - Expect Changes (EtherBalance Geoff) +0.001e18 - RedeemEth Geoff 2e8 cETH - Assert Equal (Erc20 cETH TokenBalance Geoff) 8e8 - Assert Equal (CToken cETH UnderlyingBalance Geoff) 0.004e18 - -Test "Mint then Redeem Too Much" - NewComptroller - ListedEtherToken cETH initialExchangeRate:0.005e9 - Comptroller SetMarketSupplyCaps (cETH) (2000e18) - CallMintEth Geoff 0.005e18 cETH - AllowFailures - -- Check and hold static - Invariant Static (CToken cETH ExchangeRateStored) - Invariant Remains (Erc20 cETH TokenBalance Geoff) 10e8 - Invariant Static (EtherBalance Geoff) - -- Now redeem after some time - FastForward 2 Blocks - RedeemEth Geoff 11e8 cETH - -- TODO: This should really be REDEEM_NEW_ACCOUNT_BALANCE_CALCULATION_FAILED, but based on - -- the order of subtractions, total supply comes before account supply. - Assert Revert - -Test "Mint then Redeem Zero" - NewComptroller - ListedEtherToken cETH initialExchangeRate:0.005e9 - Comptroller SetMarketSupplyCaps (cETH) (2000e18) - CallMintEth Geoff 0.005e18 cETH - -- Check and hold static - Invariant Static (CToken cETH ExchangeRateStored) - Invariant Remains (Erc20 cETH TokenBalance Geoff) 10e8 - Invariant Static (EtherBalance Geoff) - -- Now redeem after some time - FastForward 2 Blocks - RedeemEth Geoff 0e9 cETH - -Pending "Mint then redeem with interest - no reserves" - Invariant Success - NewComptroller - ListedCToken ZRX cETH initialExchangeRate:1e9 - Comptroller SetMarketSupplyCaps (cETH) (2000e18) - Invariant Remains (CToken cETH Reserves) Zero - Prep Geoff 50e18 ZRX cETH - Mint Geoff 50e18 cETH - Assert Equal (Erc20 cETH TokenBalance Geoff) 500e8 - Assert Equal (CToken cETH UnderlyingBalance Geoff) 50e18 - Assert Equal (CToken cETH ExchangeRate) 1e9 - -- Get some brah to borrow then repay - BorrowAndRepayWithInterest ZRX cETH 10e18 5e18 interestRate:0.0001 blocks:5000 - -- We've accrued 10% interest for 5 blocks, or 50% of the amount, - -- thus, we should have accrued 5e18 of interest for the protocol - -- This is due pro-rata to all holders, but we just have one, so - -- let's check that account is given correct new balance. - Assert Equal (Erc20 cETH TokenBalance Geoff) 500e8 - Assert Equal (CToken cETH UnderlyingBalance Geoff) 55e18 - Assert Equal (CToken cETH ExchangeRate) 1.1e9 - -- Now redeem all with interest - Redeem Geoff 500e8 cETH - Assert Equal (Erc20 ZRX TokenBalance Geoff) 55e18 - Assert Equal (Erc20 ZRX TokenBalance cETH) 0e18 - Assert Equal (Erc20 cETH TokenBalance Geoff) 0e8 - Assert Equal (CToken cETH UnderlyingBalance Geoff) 0e18 - Assert Equal (CToken cETH ExchangeRate) 1e9 - -Pending "Mint then redeem part with interest - no reserves" - Invariant Success - NewComptroller - ListedCToken ZRX cETH initialExchangeRate:1e9 - Comptroller SetMarketSupplyCaps (cETH) (2000e18) - Invariant Remains (CToken cETH Reserves) Zero - Prep Geoff 50e18 ZRX cETH - Mint Geoff 50e18 cETH - Assert Equal (Erc20 cETH TokenBalance Geoff) 500e8 - Assert Equal (CToken cETH UnderlyingBalance Geoff) 50e18 - Assert Equal (CToken cETH ExchangeRate) 1e9 - -- Get some brah to borrow then repay - BorrowAndRepayWithInterest ZRX cETH 10e18 5e18 interestRate:0.0001 blocks:5000 - -- We've accrued 10% interest for 5 blocks, or 50% of the amount, - -- thus, we should have accrued 5e18 of interest for the protocol - -- This is due pro-rata to all holders, but we just have one, so - -- let's check that account is given correct new balance. - Assert Equal (Erc20 cETH TokenBalance Geoff) 500e8 - Assert Equal (CToken cETH UnderlyingBalance Geoff) 55e18 - Assert Equal (CToken cETH ExchangeRate) 1.1e9 - -- Now redeem all with interest - Redeem Geoff 499e8 cETH - Assert Equal (Erc20 cETH TokenBalance Geoff) 1e8 - Assert Equal (CToken cETH UnderlyingBalance Geoff) 0.11e18 - Assert Equal (CToken cETH ExchangeRate) 1.1e9 - -Pending "Mint then redeem with reserves and interest" - Invariant Success - NewComptroller - ListedCToken ZRX cETH initialExchangeRate:1e9 - Comptroller SetMarketSupplyCaps (cETH) (2000e18) - Prep Geoff 50e18 ZRX cETH - Mint Geoff 50e18 cETH - Assert Equal (Erc20 cETH TokenBalance Geoff) 500e8 - Assert Equal (CToken cETH UnderlyingBalance Geoff) 50e18 - Assert Equal (CToken cETH ExchangeRate) 1e9 - -- Get some brah to borrow then repay - BorrowAndRepayWithInterest ZRX cETH 10e18 5e18 interestRate:0.0001 blocks:5000 reserveRate:0.2 - -- We've accrued 10% interest for 5 blocks, or 50% of the amount, - -- thus, we should have accrued 5e18 of interest for the protocol - -- The reserves should get 20% of this, or 1e18, and the rest - -- is due pro-rata to all holders. We just have one, so - -- let's check that account is given correct new balance. - Assert Equal (Erc20 cETH TokenBalance Geoff) 500e8 - Assert Equal (CToken cETH Reserves) 1e18 - Assert Equal (CToken cETH UnderlyingBalance Geoff) 54e18 - -- 55e18 + 0e18 - 1e18 / 500 - Assert Equal (CToken cETH ExchangeRate) 1.08e9 - -- Now redeem all with interest - Redeem Geoff 500e8 cETH - Assert Equal (Erc20 ZRX TokenBalance Geoff) 54e18 - Assert Equal (Erc20 ZRX TokenBalance cETH) 1e18 - Assert Equal (Erc20 cETH TokenBalance Geoff) 0e8 - Assert Equal (CToken cETH Reserves) 1e18 - Assert Equal (CToken cETH UnderlyingBalance Geoff) 0e18 - Assert Equal (CToken cETH ExchangeRate) 1e9 - -Test "Two users Mint, one redeems" - NewComptroller - ListedEtherToken cETH initialExchangeRate:0.005e9 - Comptroller SetMarketSupplyCaps (cETH) (2000e18) - CallMintEth Geoff 0.002e18 cETH - Assert Equal (Erc20 cETH TokenBalance Geoff) 4e8 - Assert Equal (Erc20 cETH TotalSupply) 4e8 - CallMintEth Torrey 0.004e18 cETH - Assert Equal (Erc20 cETH TokenBalance Geoff) 4e8 - Assert Equal (Erc20 cETH TokenBalance Torrey) 8e8 - Assert Equal (Erc20 cETH TotalSupply) 12e8 - RedeemEth Torrey 3e8 cETH - Assert Equal (Erc20 cETH TokenBalance Geoff) 4e8 - Assert Equal (Erc20 cETH TokenBalance Torrey) 5e8 - Assert Equal (Erc20 cETH TotalSupply) 9e8 diff --git a/spec/scenario/RedeemUnderlying.scen b/spec/scenario/RedeemUnderlying.scen deleted file mode 100644 index 028e162bf..000000000 --- a/spec/scenario/RedeemUnderlying.scen +++ /dev/null @@ -1,191 +0,0 @@ --- Redeem Tests - -Test "Mint then Redeem All" - NewComptroller - ListedCToken ZRX cZRX initialExchangeRate:1e9 - Comptroller SetMarketSupplyCaps (cZRX) (2000e18) - Prep Geoff 70e18 ZRX cZRX - Mint Geoff 50e18 cZRX - -- Check current affairs - Assert Equal (Erc20 cZRX TokenBalance Geoff) 500e8 - Assert Equal (Erc20 ZRX TokenBalance Geoff) 20e18 - -- Any other good invariants? - Invariant Static (CToken cZRX ExchangeRateStored) - -- Now redeem after some time - FastForward 2 Blocks - RedeemUnderlying Geoff 50e18 cZRX - Assert Equal (Erc20 cZRX TokenBalance Geoff) Zero - Assert Equal (Erc20 ZRX TokenBalance Geoff) 70e18 - -Test "Mint then Redeem Part" - NewComptroller - ListedCToken ZRX cZRX initialExchangeRate:1e9 - Comptroller SetMarketSupplyCaps (cZRX) (2000e18) - Prep Geoff 70e18 ZRX cZRX - Mint Geoff 50e18 cZRX - -- Check current affairs - Assert Equal (Erc20 cZRX TokenBalance Geoff) 500e8 - Assert Equal (Erc20 ZRX TokenBalance Geoff) 20e18 - -- Any other good invariants? - Invariant Static (CToken cZRX ExchangeRateStored) - -- Now redeem after some time - FastForward 2 Blocks - RedeemUnderlying Geoff 25e18 cZRX - Assert Equal (Erc20 cZRX TokenBalance Geoff) 250e8 - Assert Equal (Erc20 ZRX TokenBalance Geoff) 45e18 - -Test "Mint then Redeem Too Much" - NewComptroller - ListedCToken ZRX cZRX initialExchangeRate:1e9 - Comptroller SetMarketSupplyCaps (cZRX) (2000e18) - Prep Geoff 70e18 ZRX cZRX - Mint Geoff 50e18 cZRX - -- Check and hold static - Invariant Static (CToken cZRX ExchangeRateStored) - Invariant Remains (Erc20 cZRX TokenBalance Geoff) 500e8 - Invariant Remains (Erc20 ZRX TokenBalance Geoff) 20e18 - -- Now redeem after some time - FastForward 2 Blocks - AllowFailures - RedeemUnderlying Geoff 50.1e18 cZRX - Assert Revert - -Test "Mint then Redeem Zero" - NewComptroller - ListedCToken ZRX cZRX initialExchangeRate:1e9 - Comptroller SetMarketSupplyCaps (cZRX) (2000e18) - Prep Geoff 70e18 ZRX cZRX - Mint Geoff 50e18 cZRX - -- Check current affairs - Assert Equal (Erc20 cZRX TokenBalance Geoff) 500e8 - Assert Equal (Erc20 ZRX TokenBalance Geoff) 20e18 - -- Any other good invariants? - Invariant Static (CToken cZRX ExchangeRateStored) - -- Now redeem after some time - FastForward 2 Blocks - RedeemUnderlying Geoff 0e18 cZRX - Assert Equal (Erc20 cZRX TokenBalance Geoff) 500e8 - Assert Equal (Erc20 ZRX TokenBalance Geoff) 20e18 - -Test "Mint then redeem with interest - no reserves" - NewComptroller - ListedCToken ZRX cZRX initialExchangeRate:1e9 - Comptroller SetMarketSupplyCaps (cZRX) (2000e18) - Invariant Remains (CToken cZRX Reserves) Zero - Prep Geoff 50e18 ZRX cZRX - Mint Geoff 50e18 cZRX - Assert Equal (Erc20 cZRX TokenBalance Geoff) 500e8 - Assert Equal (CToken cZRX UnderlyingBalance Geoff) 50e18 - Assert Equal (CToken cZRX ExchangeRate) 1e9 - -- Get some brah to borrow then repay - BorrowAndRepayWithInterest ZRX cZRX 10e18 5e18 interestRate:0.000001 blocks:500000 - -- We've accrued .001% interest for 500000 blocks, or 50% of the principal, - -- thus, we should have accrued 5e18 of interest for the protocol - -- This is due pro-rata to all suppliers, but we just have one, so - -- let's check that account is given correct new balance. - Assert Equal (Erc20 cZRX TokenBalance Geoff) 500e8 - Assert Equal (CToken cZRX UnderlyingBalance Geoff) 55e18 - Assert Equal (CToken cZRX ExchangeRate) 1.1e9 - -- Now redeem all with interest - -- Exchange rate is now 55e18 ÷ 50e9 = 1.1e9 - -- 500e9 * 1.1e9 = 55e18 - RedeemUnderlying Geoff 55e18 cZRX - Assert Equal (Erc20 ZRX TokenBalance Geoff) 55e18 - Assert Equal (Erc20 ZRX TokenBalance cZRX) 0e18 - Assert Equal (Erc20 cZRX TokenBalance Geoff) 0e8 - Assert Equal (CToken cZRX UnderlyingBalance Geoff) 0e18 - Assert Equal (CToken cZRX ExchangeRate) 1e9 - -Test "Mint then redeem part with interest - no reserves" - NewComptroller - ListedCToken ZRX cZRX initialExchangeRate:1e9 - Comptroller SetMarketSupplyCaps (cZRX) (2000e18) - Invariant Remains (CToken cZRX Reserves) Zero - Prep Geoff 50e18 ZRX cZRX - Mint Geoff 50e18 cZRX - Assert Equal (Erc20 cZRX TokenBalance Geoff) 500e8 - Assert Equal (CToken cZRX UnderlyingBalance Geoff) 50e18 - Assert Equal (CToken cZRX ExchangeRate) 1e9 - -- Get some brah to borrow then repay - BorrowAndRepayWithInterest ZRX cZRX 10e18 5e18 interestRate:0.000001 blocks:500000 - -- We've accrued .001% interest for 500000 blocks, or 50% of the principal, - -- thus, we should have accrued 5e18 of interest for the protocol - -- This is due pro-rata to all suppliers, but we just have one, so - -- let's check that account is given correct new balance. - Assert Equal (Erc20 cZRX TokenBalance Geoff) 500e8 - Assert Equal (CToken cZRX UnderlyingBalance Geoff) 55e18 - Assert Equal (CToken cZRX ExchangeRate) 1.1e9 - -- Now redeem all with interest - -- Exchange rate is now 55e18 ÷ 50e9 = 1.1e9 - -- 499e9 * 1.1e9 = 54.89e18 - RedeemUnderlying Geoff 54.89e18 cZRX - Assert Equal (Erc20 cZRX TokenBalance Geoff) 1e8 - Assert Equal (CToken cZRX UnderlyingBalance Geoff) 0.11e18 - Assert Equal (CToken cZRX ExchangeRate) 1.1e9 - -Test "Mint then redeem with reserves and interest" - NewComptroller - ListedCToken ZRX cZRX initialExchangeRate:1e9 - Comptroller SetMarketSupplyCaps (cZRX) (2000e18) - Prep Geoff 50e18 ZRX cZRX - Mint Geoff 50e18 cZRX - Assert Equal (Erc20 cZRX TokenBalance Geoff) 500e8 - Assert Equal (CToken cZRX UnderlyingBalance Geoff) 50e18 - Assert Equal (CToken cZRX ExchangeRate) 1e9 - -- Get some brah to borrow then repay - BorrowAndRepayWithInterest ZRX cZRX 10e18 5e18 interestRate:0.000001 blocks:500000 reserveRate:0.2 - -- We've accrued .001% interest for 500000 blocks, or 50% of the principal, - -- thus, we should have accrued 5e18 of interest for the protocol - -- The reserves should get 20% of this, or 1e18, and the rest - -- is due pro-rata to all suppliers. We just have one, so - -- let's check that account is given correct new balance. - Assert Equal (Erc20 cZRX TokenBalance Geoff) 500e8 - Assert Equal (CToken cZRX Reserves) 1e18 - Assert Equal (CToken cZRX UnderlyingBalance Geoff) 54e18 - -- 55e18 + 0e18 - 1e18 / 500 - Assert Equal (CToken cZRX ExchangeRate) 1.08e9 - -- Now redeem all with interest - -- Exchange rate is 1.08e9 - -- 500e8 * 1.08e9 = 54e18 - RedeemUnderlying Geoff 54e18 cZRX - Assert Equal (Erc20 ZRX TokenBalance Geoff) 54e18 - Assert Equal (Erc20 ZRX TokenBalance cZRX) 1e18 - Assert Equal (Erc20 cZRX TokenBalance Geoff) 0e8 - Assert Equal (CToken cZRX Reserves) 1e18 - Assert Equal (CToken cZRX UnderlyingBalance Geoff) 0e18 - Assert Equal (CToken cZRX ExchangeRate) 1e9 - -Test "Two users Mint, one redeems" - NewComptroller - ListedCToken ZRX cZRX initialExchangeRate:1e9 - Comptroller SetMarketSupplyCaps (cZRX) (2000e18) - Prep Geoff Some ZRX cZRX - Prep Torrey Some ZRX cZRX - Mint Geoff 2e18 cZRX - Assert Equal (Erc20 cZRX TokenBalance Geoff) 20e8 - Assert Equal (Erc20 cZRX TotalSupply) 20e8 - Mint Torrey 2e18 cZRX - Assert Equal (Erc20 cZRX TokenBalance Geoff) 20e8 - Assert Equal (Erc20 cZRX TokenBalance Torrey) 20e8 - Assert Equal (Erc20 cZRX TotalSupply) 40e8 - RedeemUnderlying Torrey 1e18 cZRX - Assert Equal (Erc20 cZRX TokenBalance Geoff) 20e8 - Assert Equal (Erc20 cZRX TokenBalance Torrey) 10e8 - Assert Equal (Erc20 cZRX TotalSupply) 30e8 - -Test "Mint then Redeem 1 wei of underlying" - NewComptroller - ListedCToken ZRX cZRX initialExchangeRate:1e9 - Comptroller SetMarketSupplyCaps (cZRX) (2000e18) - Prep Geoff 70e18 ZRX cZRX - Mint Geoff 50e18 cZRX - AllowFailures - -- Check current affairs - Invariant Remains (Erc20 cZRX TokenBalance Geoff) 500e8 - Invariant Remains (Erc20 ZRX TokenBalance Geoff) 20e18 - -- Any other good invariants? - Invariant Static (CToken cZRX ExchangeRateStored) - -- Now redeem after some time - FastForward 2 Blocks - RedeemUnderlying Geoff 1 cZRX - Assert Revert "revert redeemTokens zero" diff --git a/spec/scenario/RedeemUnderlyingEth.scen b/spec/scenario/RedeemUnderlyingEth.scen deleted file mode 100644 index 260ac3640..000000000 --- a/spec/scenario/RedeemUnderlyingEth.scen +++ /dev/null @@ -1,179 +0,0 @@ --- Redeem Tests - -Test "Mint then Redeem All" - NewComptroller - ListedEtherToken cETH initialExchangeRate:0.005e9 - Comptroller SetMarketSupplyCaps (cETH) (2000e18) - CallMintEth Geoff 0.005e18 cETH - -- Check current affairs - Assert Equal (Erc20 cETH TokenBalance Geoff) 10e8 - Assert Equal (CToken cETH UnderlyingBalance Geoff) 0.005e18 - Invariant Static (CToken cETH ExchangeRateStored) - -- Now redeem after some time - FastForward 2 Blocks - Expect Changes (EtherBalance Geoff) +0.005e18 - RedeemUnderlyingEth Geoff 0.005e18 cETH - Assert Equal (Erc20 cETH TokenBalance Geoff) Zero - Assert Equal (CToken cETH UnderlyingBalance Geoff) Zero - -Test "Mint then Redeem Part" - NewComptroller - ListedEtherToken cETH initialExchangeRate:0.005e9 - Comptroller SetMarketSupplyCaps (cETH) (2000e18) - CallMintEth Geoff 0.005e18 cETH - -- Check current affairs - Assert Equal (Erc20 cETH TokenBalance Geoff) 10e8 - Assert Equal (CToken cETH UnderlyingBalance Geoff) 0.005e18 - Invariant Static (CToken cETH ExchangeRateStored) - -- Now redeem after some time - FastForward 2 Blocks - Expect Changes (EtherBalance Geoff) +0.001e18 - RedeemUnderlyingEth Geoff 0.001e18 cETH - Assert Equal (Erc20 cETH TokenBalance Geoff) 8e8 - Assert Equal (CToken cETH UnderlyingBalance Geoff) 0.004e18 - -Test "Mint then Redeem Too Much" - NewComptroller - ListedEtherToken cETH initialExchangeRate:0.005e9 - Comptroller SetMarketSupplyCaps (cETH) (2000e18) - CallMintEth Geoff 0.005e18 cETH - AllowFailures - -- Check and hold static - Invariant Static (CToken cETH ExchangeRateStored) - Invariant Remains (Erc20 cETH TokenBalance Geoff) 10e8 - Invariant Static (EtherBalance Geoff) - -- Now redeem after some time - FastForward 2 Blocks - RedeemUnderlyingEth Geoff 0.0055e18 cETH - -- TODO: This should really be REDEEM_NEW_ACCOUNT_BALANCE_CALCULATION_FAILED, but based on - -- the order of subtractions, total supply comes before account supply. - Assert Revert - -Test "Mint then Redeem Zero" - NewComptroller - ListedEtherToken cETH initialExchangeRate:0.005e9 - Comptroller SetMarketSupplyCaps (cETH) (2000e18) - CallMintEth Geoff 0.005e18 cETH - -- Check and hold static - Invariant Static (CToken cETH ExchangeRateStored) - Invariant Remains (Erc20 cETH TokenBalance Geoff) 10e8 - Invariant Static (EtherBalance Geoff) - -- Now redeem after some time - FastForward 2 Blocks - RedeemUnderlyingEth Geoff 0e18 cETH - -Test "Mint then redeem with interest - no reserves" - Invariant Success - NewComptroller - ListedEtherToken cETH initialExchangeRate:1e9 - Comptroller SetMarketSupplyCaps (cETH) (2000e18) - Invariant Remains (CToken cETH Reserves) Zero - CallMintEth Geoff 50e18 cETH - Assert Equal (Erc20 cETH TokenBalance Geoff) 500e8 - Assert Equal (CToken cETH UnderlyingBalance Geoff) 50e18 - Assert Equal (CToken cETH ExchangeRate) 1e9 - -- Get some brah to borrow then repay - BorrowAndRepayEthWithInterest cETH 10e18 5e18 interestRate:0.000001 blocks:500000 - -- We've accrued 10% interest for 5 blocks, or 50% of the amount, - -- thus, we should have accrued 5e18 of interest for the protocol - -- This is due pro-rata to all holders, but we just have one, so - -- let's check that account is given correct new balance. - Assert Equal (Erc20 cETH TokenBalance Geoff) 500e8 - Assert Equal (CToken cETH UnderlyingBalance Geoff) 55e18 - Assert Equal (CToken cETH ExchangeRate) 1.1e9 - -- Now redeem all with interest - Expect Changes (EtherBalance Geoff) 55e18 - RedeemUnderlyingEth Geoff 55e18 cETH - Assert Equal (EtherBalance cETH) 0e18 - Assert Equal (Erc20 cETH TokenBalance Geoff) 0e8 - Assert Equal (CToken cETH UnderlyingBalance Geoff) 0e18 - Assert Equal (CToken cETH ExchangeRate) 1e9 - -Pending "Mint then redeem part with interest - no reserves" - Invariant Success - NewComptroller - ListedCToken ZRX cETH initialExchangeRate:1e9 - Comptroller SetMarketSupplyCaps (cETH) (2000e18) - Invariant Remains (CToken cETH Reserves) Zero - Prep Geoff 50e18 ZRX cETH - Mint Geoff 50e18 cETH - Assert Equal (Erc20 cETH TokenBalance Geoff) 500e8 - Assert Equal (CToken cETH UnderlyingBalance Geoff) 50e18 - Assert Equal (CToken cETH ExchangeRate) 1e9 - -- Get some brah to borrow then repay - BorrowAndRepayWithInterest ZRX cETH 10e18 5e18 interestRate:0.000001 blocks:500000 - -- We've accrued 10% interest for 5 blocks, or 50% of the amount, - -- thus, we should have accrued 5e18 of interest for the protocol - -- This is due pro-rata to all holders, but we just have one, so - -- let's check that account is given correct new balance. - Assert Equal (Erc20 cETH TokenBalance Geoff) 500e8 - Assert Equal (CToken cETH UnderlyingBalance Geoff) 55e18 - Assert Equal (CToken cETH ExchangeRate) 1.1e9 - -- Now redeem all with interest - Redeem Geoff 499e8 cETH - Assert Equal (Erc20 cETH TokenBalance Geoff) 1e8 - Assert Equal (CToken cETH UnderlyingBalance Geoff) 0.11e18 - Assert Equal (CToken cETH ExchangeRate) 1.1e9 - -Pending "Mint then redeem with reserves and interest" - Invariant Success - NewComptroller - ListedCToken ZRX cETH initialExchangeRate:1e9 - Comptroller SetMarketSupplyCaps (cETH) (2000e18) - Prep Geoff 50e18 ZRX cETH - Mint Geoff 50e18 cETH - Assert Equal (Erc20 cETH TokenBalance Geoff) 500e8 - Assert Equal (CToken cETH UnderlyingBalance Geoff) 50e18 - Assert Equal (CToken cETH ExchangeRate) 1e9 - -- Get some brah to borrow then repay - BorrowAndRepayWithInterest ZRX cETH 10e18 5e18 interestRate:0.000001 blocks:500000 reserveRate:0.2 - -- We've accrued 10% interest for 5 blocks, or 50% of the amount, - -- thus, we should have accrued 5e18 of interest for the protocol - -- The reserves should get 20% of this, or 1e18, and the rest - -- is due pro-rata to all holders. We just have one, so - -- let's check that account is given correct new balance. - Assert Equal (Erc20 cETH TokenBalance Geoff) 500e8 - Assert Equal (CToken cETH Reserves) 1e18 - Assert Equal (CToken cETH UnderlyingBalance Geoff) 54e18 - -- 55e18 + 0e18 - 1e18 / 500 - Assert Equal (CToken cETH ExchangeRate) 1.08e9 - -- Now redeem all with interest - Redeem Geoff 500e8 cETH - Assert Equal (Erc20 ZRX TokenBalance Geoff) 54e18 - Assert Equal (Erc20 ZRX TokenBalance cETH) 1e18 - Assert Equal (Erc20 cETH TokenBalance Geoff) 0e8 - Assert Equal (CToken cETH Reserves) 1e18 - Assert Equal (CToken cETH UnderlyingBalance Geoff) 0e18 - Assert Equal (CToken cETH ExchangeRate) 1e9 - -Test "Two users Mint, one redeems" - NewComptroller - ListedEtherToken cETH initialExchangeRate:0.005e9 - Comptroller SetMarketSupplyCaps (cETH) (2000e18) - CallMintEth Geoff 0.002e18 cETH - Assert Equal (Erc20 cETH TokenBalance Geoff) 4e8 - Assert Equal (Erc20 cETH TotalSupply) 4e8 - CallMintEth Torrey 0.004e18 cETH - Assert Equal (Erc20 cETH TokenBalance Geoff) 4e8 - Assert Equal (Erc20 cETH TokenBalance Torrey) 8e8 - Assert Equal (Erc20 cETH TotalSupply) 12e8 - RedeemUnderlyingEth Torrey 0.0015e18 cETH - Assert Equal (Erc20 cETH TokenBalance Geoff) 4e8 - Assert Equal (Erc20 cETH TokenBalance Torrey) 5e8 - Assert Equal (Erc20 cETH TotalSupply) 9e8 - -Test "Mint then redeem 1 wei" - NewComptroller - ListedEtherToken cETH initialExchangeRate:0.005e9 - Comptroller SetMarketSupplyCaps (cETH) (2000e18) - CallMintEth Geoff 0.005e18 cETH - AllowFailures - -- Check current affairs - Assert Equal (Erc20 cETH TokenBalance Geoff) 10e8 - Assert Equal (CToken cETH UnderlyingBalance Geoff) 0.005e18 - Invariant Static (CToken cETH ExchangeRateStored) - Invariant Static (EtherBalance Geoff) - -- Now redeem after some time - FastForward 2 Blocks - RedeemUnderlyingEth Geoff 1 cETH - Assert Revert "revert redeemTokens zero" diff --git a/spec/scenario/RedeemUnderlyingWBTC.scen b/spec/scenario/RedeemUnderlyingWBTC.scen deleted file mode 100644 index f1f275721..000000000 --- a/spec/scenario/RedeemUnderlyingWBTC.scen +++ /dev/null @@ -1,192 +0,0 @@ --- Redeem Tests - -Test "Mint then Redeem All" - NewComptroller - ListedCToken WBTC cWBTC initialExchangeRate:0.1 tokenType:WBTC - Comptroller SetMarketSupplyCaps (cWBTC) (2e30) - Prep Geoff 70e8 WBTC cWBTC - Mint Geoff 50e8 cWBTC - -- Check current affairs - Assert Equal (Erc20 cWBTC TokenBalance Geoff) 500e8 - Assert Equal (Erc20 WBTC TokenBalance Geoff) 20e8 - -- Any other good invariants? - Invariant Static (CToken cWBTC ExchangeRateStored) - -- Now redeem after some time - FastForward 2 Blocks - RedeemUnderlying Geoff 50e8 cWBTC - Assert Equal (Erc20 cWBTC TokenBalance Geoff) Zero - Assert Equal (Erc20 WBTC TokenBalance Geoff) 70e8 - -Test "Mint then Redeem Part" - NewComptroller - ListedCToken WBTC cWBTC initialExchangeRate:0.1 tokenType:WBTC - Comptroller SetMarketSupplyCaps (cWBTC) (2e30) - Prep Geoff 70e8 WBTC cWBTC - Mint Geoff 50e8 cWBTC - -- Check current affairs - Assert Equal (Erc20 cWBTC TokenBalance Geoff) 500e8 - Assert Equal (Erc20 WBTC TokenBalance Geoff) 20e8 - -- Any other good invariants? - Invariant Static (CToken cWBTC ExchangeRateStored) - -- Now redeem after some time - FastForward 2 Blocks - RedeemUnderlying Geoff 25e8 cWBTC - Assert Equal (Erc20 cWBTC TokenBalance Geoff) 250e8 - Assert Equal (Erc20 WBTC TokenBalance Geoff) 45e8 - -Test "Mint then Redeem Too Much" - NewComptroller - ListedCToken WBTC cWBTC initialExchangeRate:0.1 tokenType:WBTC - Comptroller SetMarketSupplyCaps (cWBTC) (2e30) - Prep Geoff 70e8 WBTC cWBTC - Mint Geoff 50e8 cWBTC - -- Check and hold static - Invariant Static (CToken cWBTC ExchangeRateStored) - Invariant Remains (Erc20 cWBTC TokenBalance Geoff) 500e8 - Invariant Remains (Erc20 WBTC TokenBalance Geoff) 20e8 - -- Now redeem after some time - FastForward 2 Blocks - AllowFailures - RedeemUnderlying Geoff 50.1e8 cWBTC - Assert Revert - -Test "Mint then Redeem Zero" - NewComptroller - ListedCToken WBTC cWBTC initialExchangeRate:0.1 tokenType:WBTC - Comptroller SetMarketSupplyCaps (cWBTC) (2e30) - Prep Geoff 70e8 WBTC cWBTC - Mint Geoff 50e8 cWBTC - -- Check current affairs - Assert Equal (Erc20 cWBTC TokenBalance Geoff) 500e8 - Assert Equal (Erc20 WBTC TokenBalance Geoff) 20e8 - -- Any other good invariants? - Invariant Static (CToken cWBTC ExchangeRateStored) - -- Now redeem after some time - FastForward 2 Blocks - RedeemUnderlying Geoff 0e8 cWBTC - Assert Equal (Erc20 cWBTC TokenBalance Geoff) 500e8 - Assert Equal (Erc20 WBTC TokenBalance Geoff) 20e8 - -Test "Mint then redeem with interest - no reserves" - NewComptroller - ListedCToken WBTC cWBTC initialExchangeRate:0.1 tokenType:WBTC - Comptroller SetMarketSupplyCaps (cWBTC) (2e30) - Invariant Remains (CToken cWBTC Reserves) Zero - Prep Geoff 50e8 WBTC cWBTC - Mint Geoff 50e8 cWBTC - Assert Equal (Erc20 cWBTC TokenBalance Geoff) 500e8 - Assert Equal (CToken cWBTC UnderlyingBalance Geoff) 50e8 - Assert Equal (CToken cWBTC ExchangeRate) 0.1 - -- Get some brah to borrow then repay - BorrowAndRepayWithInterest WBTC cWBTC 10e8 5e8 interestRate:0.000001 blocks:500000 - -- We've accrued .001% interest for 500000 blocks, or 50% of the principal, - -- thus, we should have accrued 5e8 of interest for the protocol - -- This is due pro-rata to all suppliers, but we just have one, so - -- let's check that account is given correct new balance. - Assert Equal (Erc20 cWBTC TokenBalance Geoff) 500e8 - Assert Equal (CToken cWBTC UnderlyingBalance Geoff) 55e8 - Assert Equal (CToken cWBTC ExchangeRate) 0.11 - -- Now redeem all with interest - -- Exchange rate is now 55e8 ÷ 50e-1 = 1.1e-1 - -- 500e-1 * 1.1e-1 = 55e8 - RedeemUnderlying Geoff 55e8 cWBTC - Assert Equal (Erc20 WBTC TokenBalance Geoff) 55e8 - Assert Equal (Erc20 WBTC TokenBalance cWBTC) 0e8 - Assert Equal (Erc20 cWBTC TokenBalance Geoff) 0e8 - Assert Equal (CToken cWBTC UnderlyingBalance Geoff) 0e8 - Assert Equal (CToken cWBTC ExchangeRate) 0.1 - -Test "Mint then redeem part with interest - no reserves" - NewComptroller - ListedCToken WBTC cWBTC initialExchangeRate:0.1 tokenType:WBTC - Comptroller SetMarketSupplyCaps (cWBTC) (2e30) - Invariant Remains (CToken cWBTC Reserves) Zero - Prep Geoff 50e8 WBTC cWBTC - Mint Geoff 50e8 cWBTC - Assert Equal (Erc20 cWBTC TokenBalance Geoff) 500e8 - Assert Equal (CToken cWBTC UnderlyingBalance Geoff) 50e8 - Assert Equal (CToken cWBTC ExchangeRate) 0.1 - -- Get some brah to borrow then repay - BorrowAndRepayWithInterest WBTC cWBTC 10e8 5e8 interestRate:0.000001 blocks:500000 - -- We've accrued .001% interest for 500000 blocks, or 50% of the principal, - -- thus, we should have accrued 5e8 of interest for the protocol - -- This is due pro-rata to all suppliers, but we just have one, so - -- let's check that account is given correct new balance. - Assert Equal (Erc20 cWBTC TokenBalance Geoff) 500e8 - Assert Equal (CToken cWBTC UnderlyingBalance Geoff) 55e8 - Assert Equal (CToken cWBTC ExchangeRate) 0.11 - -- Now redeem all with interest - -- Exchange rate is now 55e8 ÷ 50e-1 = 1.1e-1 - -- 499e-1 * 1.1e-1 = 54.89e8 - RedeemUnderlying Geoff 54.89e8 cWBTC - Assert Equal (Erc20 cWBTC TokenBalance Geoff) 1e8 - Assert Equal (CToken cWBTC UnderlyingBalance Geoff) 0.11e8 - Assert Equal (CToken cWBTC ExchangeRate) 0.11 - -Test "Mint then redeem with reserves and interest" - NewComptroller - ListedCToken WBTC cWBTC initialExchangeRate:0.1 tokenType:WBTC - Comptroller SetMarketSupplyCaps (cWBTC) (2e30) - Prep Geoff 50e8 WBTC cWBTC - Mint Geoff 50e8 cWBTC - Assert Equal (Erc20 cWBTC TokenBalance Geoff) 500e8 - Assert Equal (CToken cWBTC UnderlyingBalance Geoff) 50e8 - Assert Equal (CToken cWBTC ExchangeRate) 0.1 - -- Get some brah to borrow then repay - BorrowAndRepayWithInterest WBTC cWBTC 10e8 5e8 interestRate:0.000001 blocks:500000 reserveRate:0.2 - -- We've accrued .001% interest for 500000 blocks, or 50% of the principal, - -- thus, we should have accrued 5e8 of interest for the protocol - -- The reserves should get 20% of this, or 1e8, and the rest - -- is due pro-rata to all suppliers. We just have one, so - -- let's check that account is given correct new balance. - Assert Equal (Erc20 cWBTC TokenBalance Geoff) 500e8 - Assert Equal (CToken cWBTC Reserves) 1e8 - Assert Equal (CToken cWBTC UnderlyingBalance Geoff) 54e8 - -- 55e8 + 0e8 - 1e8 / 500 - Assert Equal (CToken cWBTC ExchangeRate) 0.108 - -- Now redeem all with interest - -- Exchange rate is 1.08e-1 - -- 500e8 * 1.08e-1 = 54e8 - RedeemUnderlying Geoff 54e8 cWBTC - Assert Equal (Erc20 WBTC TokenBalance Geoff) 54e8 - Assert Equal (Erc20 WBTC TokenBalance cWBTC) 1e8 - Assert Equal (Erc20 cWBTC TokenBalance Geoff) 0e8 - Assert Equal (CToken cWBTC Reserves) 1e8 - Assert Equal (CToken cWBTC UnderlyingBalance Geoff) 0e8 - Assert Equal (CToken cWBTC ExchangeRate) 0.1 - -Test "Two users Mint, one redeems" - NewComptroller - ListedCToken WBTC cWBTC initialExchangeRate:0.1 tokenType:WBTC - Comptroller SetMarketSupplyCaps (cWBTC) (2e30) - Prep Geoff Some WBTC cWBTC - Prep Torrey Some WBTC cWBTC - Mint Geoff 2e8 cWBTC - Assert Equal (Erc20 cWBTC TokenBalance Geoff) 20e8 - Assert Equal (Erc20 cWBTC TotalSupply) 20e8 - Mint Torrey 2e8 cWBTC - Assert Equal (Erc20 cWBTC TokenBalance Geoff) 20e8 - Assert Equal (Erc20 cWBTC TokenBalance Torrey) 20e8 - Assert Equal (Erc20 cWBTC TotalSupply) 40e8 - RedeemUnderlying Torrey 1e8 cWBTC - Assert Equal (Erc20 cWBTC TokenBalance Geoff) 20e8 - Assert Equal (Erc20 cWBTC TokenBalance Torrey) 10e8 - Assert Equal (Erc20 cWBTC TotalSupply) 30e8 - -Test "Mint then Redeem 1 wei of underlying is allowed for 1:1 assets" - NewComptroller - ListedCToken WBTC cWBTC initialExchangeRate:0.1 tokenType:WBTC - Comptroller SetMarketSupplyCaps (cWBTC) (2e30) - Prep Geoff 70e8 WBTC cWBTC - Mint Geoff 50e8 cWBTC - -- Check current affairs - Assert Equal (Erc20 cWBTC TokenBalance Geoff) 500e8 - Assert Equal (Erc20 WBTC TokenBalance Geoff) 20e8 - -- Any other good invariants? - Invariant Static (CToken cWBTC ExchangeRateStored) - -- Now redeem after some time - FastForward 2 Blocks - RedeemUnderlying Geoff 1 cWBTC - -- After affairs - Assert Equal (Erc20 cWBTC TokenBalance Geoff) 49999999990 - Assert Equal (Erc20 WBTC TokenBalance Geoff) 2000000001 diff --git a/spec/scenario/RedeemWBTC.scen b/spec/scenario/RedeemWBTC.scen deleted file mode 100644 index 6884ef733..000000000 --- a/spec/scenario/RedeemWBTC.scen +++ /dev/null @@ -1,238 +0,0 @@ --- Redeem Tests - -Test "Mint WBTC then Redeem All" - NewComptroller - ListedCToken WBTC cWBTC initialExchangeRate:0.1 tokenType:WBTC - Comptroller SetMarketSupplyCaps (cWBTC) (2e30) - Prep Geoff 70e8 WBTC cWBTC - Mint Geoff 50e8 cWBTC - -- Check current affairs - Assert Equal (Erc20 cWBTC TokenBalance Geoff) 500e8 - Assert Equal (Erc20 WBTC TokenBalance Geoff) 20e8 - -- Any other good invariants? - Invariant Static (CToken cWBTC ExchangeRateStored) - -- Now redeem after some time - FastForward 2 Blocks - Redeem Geoff 500e8 cWBTC - Assert Equal (Erc20 cWBTC TokenBalance Geoff) Zero - Assert Equal (Erc20 WBTC TokenBalance Geoff) 70e8 - -Test "Mint WBTC, Enter and then Redeem All" - NewComptroller - ListedCToken WBTC cWBTC initialExchangeRate:0.1 tokenType:WBTC - Comptroller SetMarketSupplyCaps (cWBTC) (2e30) - Prep Geoff 70e8 WBTC cWBTC - Mint Geoff 50e8 cWBTC - -- Check current affairs - Assert Equal (Erc20 cWBTC TokenBalance Geoff) 500e8 - Assert Equal (Erc20 WBTC TokenBalance Geoff) 20e8 - -- Any other good invariants? - Invariant Static (CToken cWBTC ExchangeRateStored) - -- Now redeem after some time - FastForward 2 Blocks - EnterMarkets Geoff cWBTC - Redeem Geoff 500e8 cWBTC - Assert Equal (Erc20 cWBTC TokenBalance Geoff) Zero - Assert Equal (Erc20 WBTC TokenBalance Geoff) 70e8 - -Test "Mint WBTC then Redeem Part" - NewComptroller - ListedCToken WBTC cWBTC initialExchangeRate:0.1 tokenType:WBTC - Comptroller SetMarketSupplyCaps (cWBTC) (2e30) - Prep Geoff 70e8 WBTC cWBTC - Mint Geoff 50e8 cWBTC - -- Check current affairs - Assert Equal (Erc20 cWBTC TokenBalance Geoff) 500e8 - Assert Equal (Erc20 WBTC TokenBalance Geoff) 20e8 - -- Any other good invariants? - Invariant Static (CToken cWBTC ExchangeRateStored) - -- Now redeem after some time - FastForward 2 Blocks - Redeem Geoff 250e8 cWBTC - Assert Equal (Erc20 cWBTC TokenBalance Geoff) 250e8 - Assert Equal (Erc20 WBTC TokenBalance Geoff) 45e8 - -Test "Mint WBTC then Redeem Too Much" - NewComptroller - ListedCToken WBTC cWBTC initialExchangeRate:0.1 tokenType:WBTC - Comptroller SetMarketSupplyCaps (cWBTC) (2e30) - Prep Geoff 70e8 WBTC cWBTC - Mint Geoff 50e8 cWBTC - -- Check and hold static - Invariant Static (CToken cWBTC ExchangeRateStored) - Invariant Remains (Erc20 cWBTC TokenBalance Geoff) 500e8 - Invariant Remains (Erc20 WBTC TokenBalance Geoff) 20e8 - -- Now redeem after some time - FastForward 2 Blocks - AllowFailures - Redeem Geoff 501e8 cWBTC - Assert Revert - -Test "Mint WBTC then Redeem Zero" - NewComptroller - ListedCToken WBTC cWBTC initialExchangeRate:0.1 tokenType:WBTC - Comptroller SetMarketSupplyCaps (cWBTC) (2e30) - Prep Geoff 70e8 WBTC cWBTC - Mint Geoff 50e8 cWBTC - -- Check current affairs - Assert Equal (Erc20 cWBTC TokenBalance Geoff) 500e8 - Assert Equal (Erc20 WBTC TokenBalance Geoff) 20e8 - -- Any other good invariants? - Invariant Static (CToken cWBTC ExchangeRateStored) - -- Now redeem after some time - FastForward 2 Blocks - Redeem Geoff 0e8 cWBTC - Assert Equal (Erc20 cWBTC TokenBalance Geoff) 500e8 - Assert Equal (Erc20 WBTC TokenBalance Geoff) 20e8 - -Test "Mint WBTC then redeem with interest - no reserves" - NewComptroller - ListedCToken WBTC cWBTC initialExchangeRate:0.1 tokenType:WBTC - Comptroller SetMarketSupplyCaps (cWBTC) (2e30) - Invariant Remains (CToken cWBTC Reserves) Zero - Prep Geoff 50e8 WBTC cWBTC - Mint Geoff 50e8 cWBTC - Assert Equal (Erc20 cWBTC TokenBalance Geoff) 500e8 - Assert Equal (CToken cWBTC UnderlyingBalance Geoff) 50e8 - Assert Equal (CToken cWBTC ExchangeRate) 0.1 - -- Get some brah to borrow then repay - BorrowAndRepayWithInterest WBTC cWBTC 10e8 5e8 interestRate:0.000001 blocks:500000 - -- We've accrued .001% interest for 500000 blocks, or 50% of the principal, - -- thus, we should have accrued 5e8 of interest for the protocol - -- This is due pro-rata to all suppliers, but we just have one, so - -- let's check that account is given correct new balance. - Assert Equal (Erc20 cWBTC TokenBalance Geoff) 500e8 - Assert Equal (CToken cWBTC UnderlyingBalance Geoff) 55e8 - Assert Equal (CToken cWBTC ExchangeRate) 0.11 - -- Now redeem all with interest - Redeem Geoff 500e8 cWBTC - Assert Equal (Erc20 WBTC TokenBalance Geoff) 55e8 - Assert Equal (Erc20 WBTC TokenBalance cWBTC) 0e8 - Assert Equal (Erc20 cWBTC TokenBalance Geoff) 0e8 - Assert Equal (CToken cWBTC UnderlyingBalance Geoff) 0e8 - Assert Equal (CToken cWBTC ExchangeRate) 0.1 - -Test "Mint WBTC then redeem part with interest - no reserves" - NewComptroller - ListedCToken WBTC cWBTC initialExchangeRate:0.1 tokenType:WBTC - Comptroller SetMarketSupplyCaps (cWBTC) (2e30) - Invariant Remains (CToken cWBTC Reserves) Zero - Prep Geoff 50e8 WBTC cWBTC - Mint Geoff 50e8 cWBTC - Assert Equal (Erc20 cWBTC TokenBalance Geoff) 500e8 - Assert Equal (CToken cWBTC UnderlyingBalance Geoff) 50e8 - Assert Equal (CToken cWBTC ExchangeRate) 0.1 - -- Get some brah to borrow then repay - BorrowAndRepayWithInterest WBTC cWBTC 10e8 5e8 interestRate:0.000001 blocks:500000 - -- We've accrued .001% interest for 500000 blocks, or 50% of the principal, - -- thus, we should have accrued 5e8 of interest for the protocol - -- This is due pro-rata to all suppliers, but we just have one, so - -- let's check that account is given correct new balance. - Assert Equal (Erc20 cWBTC TokenBalance Geoff) 500e8 - Assert Equal (CToken cWBTC UnderlyingBalance Geoff) 55e8 - Assert Equal (CToken cWBTC ExchangeRate) 0.11 - -- Now redeem all with interest - Redeem Geoff 499e8 cWBTC - Assert Equal (Erc20 cWBTC TokenBalance Geoff) 1e8 - Assert Equal (CToken cWBTC UnderlyingBalance Geoff) 0.11e8 - Assert Equal (CToken cWBTC ExchangeRate) 0.11 - -Test "Mint WBTC then redeem with reserves and interest" - NewComptroller - ListedCToken WBTC cWBTC initialExchangeRate:0.1 tokenType:WBTC - Comptroller SetMarketSupplyCaps (cWBTC) (2e30) - Prep Geoff 50e8 WBTC cWBTC - Mint Geoff 50e8 cWBTC - Assert Equal (Erc20 cWBTC TokenBalance Geoff) 500e8 - Assert Equal (CToken cWBTC UnderlyingBalance Geoff) 50e8 - Assert Equal (CToken cWBTC ExchangeRate) 0.1 - -- Get some brah to borrow then repay - BorrowAndRepayWithInterest WBTC cWBTC 10e8 5e8 interestRate:0.000001 blocks:500000 reserveRate:0.2 - -- We've accrued .001% interest for 500000 blocks, or 50% of the principal, - -- thus, we should have accrued 5e8 of interest for the protocol - -- The reserves should get 20% of this, or 1e8, and the rest - -- is due pro-rata to all suppliers. We just have one, so - -- let's check that account is given correct new balance. - Assert Equal (Erc20 cWBTC TokenBalance Geoff) 500e8 - Assert Equal (CToken cWBTC Reserves) 1e8 - Assert Equal (CToken cWBTC UnderlyingBalance Geoff) 54e8 - -- 55e8 + 0e8 - 1e8 / 500 - Assert Equal (CToken cWBTC ExchangeRate) 0.108 - -- Now redeem all with interest - Redeem Geoff 500e8 cWBTC - Assert Equal (Erc20 WBTC TokenBalance Geoff) 54e8 - Assert Equal (Erc20 WBTC TokenBalance cWBTC) 1e8 - Assert Equal (Erc20 cWBTC TokenBalance Geoff) 0e8 - Assert Equal (CToken cWBTC Reserves) 1e8 - Assert Equal (CToken cWBTC UnderlyingBalance Geoff) 0e8 - Assert Equal (CToken cWBTC ExchangeRate) 0.1 - -Test "Two users Mint WBTC, one redeems" - NewComptroller - ListedCToken WBTC cWBTC initialExchangeRate:0.1 tokenType:WBTC - Comptroller SetMarketSupplyCaps (cWBTC) (2e30) - Prep Geoff Some WBTC cWBTC - Prep Torrey Some WBTC cWBTC - Mint Geoff 2e8 cWBTC - Assert Equal (Erc20 cWBTC TokenBalance Geoff) 20e8 - Assert Equal (Erc20 cWBTC TotalSupply) 20e8 - Mint Torrey 2e8 cWBTC - Assert Equal (Erc20 cWBTC TokenBalance Geoff) 20e8 - Assert Equal (Erc20 cWBTC TokenBalance Torrey) 20e8 - Assert Equal (Erc20 cWBTC TotalSupply) 40e8 - Redeem Torrey 10e8 cWBTC - Assert Equal (Erc20 cWBTC TokenBalance Geoff) 20e8 - Assert Equal (Erc20 cWBTC TokenBalance Torrey) 10e8 - Assert Equal (Erc20 cWBTC TotalSupply) 30e8 - -Test "Redeem WBTC transfer out fails" - NewComptroller - ListedCToken WBTC cWBTC initialExchangeRate:0.1 tokenType:WBTC - Comptroller SetMarketSupplyCaps (cWBTC) (2e30) - Prep Geoff 70e8 WBTC cWBTC - Mint Geoff 50e8 cWBTC - -- Check current affairs - Invariant Remains (Erc20 cWBTC TokenBalance Geoff) 500e8 - Invariant Remains (Erc20 WBTC TokenBalance Geoff) 20e8 - Invariant Static (CToken cWBTC ExchangeRateStored) - -- Now redeem after some time - FastForward 2 Blocks - Erc20 WBTC Pause - AllowFailures - Redeem Geoff 500e8 cWBTC - Assert Revert - -Test "Mint WBTC, Enter, then Redeem Too Much (collateral factor: 0)" - NewComptroller - ListedCToken WBTC cWBTC initialExchangeRate:0.1 tokenType:WBTC - Comptroller SetMarketSupplyCaps (cWBTC) (2e30) - Prep Geoff 70e8 WBTC cWBTC - Mint Geoff 50e8 cWBTC - -- Check and hold static - Invariant Static (CToken cWBTC ExchangeRateStored) - Invariant Remains (Erc20 cWBTC TokenBalance Geoff) 500e8 - Invariant Remains (Erc20 WBTC TokenBalance Geoff) 20e8 - -- Now redeem after some time - FastForward 2 Blocks - EnterMarkets Geoff cWBTC - AllowFailures - Redeem Geoff 501e8 cWBTC - Assert Revert - -Test "Mint WBTC, Enter, then Redeem Too Much (collateral factor: 0.1)" - NewComptroller - ListedCToken WBTC cWBTC initialExchangeRate:0.1 tokenType:WBTC - Comptroller SetMarketSupplyCaps (cWBTC) (2e30) - Comptroller SetCollateralFactor cWBTC 0.1 - Prep Geoff 70e8 WBTC cWBTC - Mint Geoff 50e8 cWBTC - -- Check and hold static - Invariant Static (CToken cWBTC ExchangeRateStored) - Invariant Remains (Erc20 cWBTC TokenBalance Geoff) 500e8 - Invariant Remains (Erc20 WBTC TokenBalance Geoff) 20e8 - -- Now redeem after some time - FastForward 2 Blocks - EnterMarkets Geoff cWBTC - AllowFailures - Redeem Geoff 501e8 cWBTC - Assert RevertCustomError RedeemComptrollerRejection 4 diff --git a/spec/scenario/ReduceReserves.scen b/spec/scenario/ReduceReserves.scen deleted file mode 100644 index e2d598f26..000000000 --- a/spec/scenario/ReduceReserves.scen +++ /dev/null @@ -1,140 +0,0 @@ - -Test "Reduce all reserves and verify effects" - NewComptroller - ListedCToken ZRX cZRX initialExchangeRate:1e9 - Comptroller SetMarketSupplyCaps (cZRX) (2e30) - Prep Geoff 50e18 ZRX cZRX - Mint Geoff 50e18 cZRX - Assert Equal (Erc20 cZRX TokenBalance Geoff) (Exactly 500e8) -- 50e18 / 1e9 - Assert Equal (CToken cZRX UnderlyingBalance Geoff) (Exactly 50e18) - Assert Equal (CToken cZRX ExchangeRate) (Exactly 1e9) - -- Get some brah to borrow then repay - BorrowAndRepayWithInterest ZRX cZRX 10e18 5e18 interestRate:0.000001 blocks:500000 reserveRate:0.2 - -- We've accrued .0001% interest for 500000 blocks, or 50% of the principal (10e18), - -- thus, we should have accrued 5e18 of interest for the protocol - -- The reserves should get 20% of this, or 1e18, and the rest - -- is due pro-rata to all suppliers. We just have one, so - -- let's check that account is given correct new balance. - Assert Equal (Erc20 ZRX TokenBalance cZRX) (Exactly 55e18) - Assert Equal (Erc20 ZRX TokenBalance Root) (Exactly 0e18) - Assert Equal (Erc20 cZRX TokenBalance Geoff) (Exactly 500e8) - Assert Equal (CToken cZRX Reserves) (Exactly 1e18) - Assert Equal (CToken cZRX UnderlyingBalance Geoff) (Exactly 54e18) - -- (55.0e18+0.0e18-1.0e18)/500.0e8 - Assert Equal (CToken cZRX ExchangeRate) (Exactly 1.08e9) - -- Now, let's pull out all of our reserves (1e18) - ReduceReserves 1e18 cZRX - Assert Equal (Erc20 ZRX TokenBalance cZRX) (Exactly 54e18) - Assert Equal (Erc20 ZRX TokenBalance Root) (Exactly 1e18) - Assert Equal (Erc20 cZRX TokenBalance Geoff) (Exactly 500e8) - Assert Equal (CToken cZRX Reserves) (Exactly 0e18) - Assert Equal (CToken cZRX UnderlyingBalance Geoff) (Exactly 54e18) - -- (54.0e18+0.0e18-0.0e18)/500.0e8 - Assert Equal (CToken cZRX ExchangeRate) (Exactly 1.08e9) - -Test "Reduce partial reserves and verify effects" - NewComptroller - ListedCToken ZRX cZRX initialExchangeRate:1e9 - Comptroller SetMarketSupplyCaps (cZRX) (2e30) - Prep Geoff 50e18 ZRX cZRX - Mint Geoff 50e18 cZRX - Assert Equal (Erc20 cZRX TokenBalance Geoff) (Exactly 500e8) - Assert Equal (CToken cZRX UnderlyingBalance Geoff) (Exactly 50e18) - Assert Equal (CToken cZRX ExchangeRate) (Exactly 1e9) - -- Get some brah to borrow then repay - BorrowAndRepayWithInterest ZRX cZRX 10e18 5e18 interestRate:0.000001 blocks:500000 reserveRate:0.2 - -- We've accrued .0001% interest for 500000 blocks, or 50% of the principal (10e18), - -- thus, we should have accrued 5e18 of interest for the protocol - -- The reserves should get 20% of this, or 1e18, and the rest - -- is due pro-rata to all suppliers. We just have one, so - -- let's check that account is given correct new balance. - Assert Equal (Erc20 ZRX TokenBalance cZRX) (Exactly 55e18) - Assert Equal (Erc20 ZRX TokenBalance Root) (Exactly 0e18) - Assert Equal (Erc20 cZRX TokenBalance Geoff) (Exactly 500e8) - Assert Equal (CToken cZRX Reserves) (Exactly 1e18) - Assert Equal (CToken cZRX UnderlyingBalance Geoff) (Exactly 54e18) - -- (55.0e18+0.0e18-1.0e18)/500.0e8 - Assert Equal (CToken cZRX ExchangeRate) (Exactly 1.08e9) - -- Now, let's pull out all of our reserves (1e18) - ReduceReserves 0.5e18 cZRX - Assert Equal (Erc20 ZRX TokenBalance cZRX) (Exactly 54.5e18) - Assert Equal (Erc20 ZRX TokenBalance Root) (Exactly 0.5e18) - Assert Equal (Erc20 cZRX TokenBalance Geoff) (Exactly 500e8) - Assert Equal (CToken cZRX Reserves) (Exactly 0.5e18) - Assert Equal (CToken cZRX UnderlyingBalance Geoff) (Exactly 54e18) - -- (54.5e18+0.5e18-0.0e18)/500.0e8 - Assert Equal (CToken cZRX ExchangeRate) (Exactly 1.08e9) - -Test "Redeem all and then reduce all reserves" - NewComptroller - ListedCToken ZRX cZRX initialExchangeRate:1e9 - Comptroller SetMarketSupplyCaps (cZRX) (2e30) - Prep Geoff 50e18 ZRX cZRX - Mint Geoff 50e18 cZRX - Assert Equal (Erc20 cZRX TokenBalance Geoff) (Exactly 500e8) - Assert Equal (CToken cZRX UnderlyingBalance Geoff) (Exactly 50e18) - Assert Equal (CToken cZRX ExchangeRate) (Exactly 1e9) - -- Get some brah to borrow then repay - BorrowAndRepayWithInterest ZRX cZRX 10e18 5e18 interestRate:0.000001 blocks:500000 reserveRate:0.2 - -- We've accrued .0001% interest for 500000 blocks, or 50% of the principal (10e18), - -- thus, we should have accrued 5e18 of interest for the protocol - -- The reserves should get 20% of this, or 1e18, and the rest - -- is due pro-rata to all suppliers. We just have one, so - -- let's check that account is given correct new balance. - Assert Equal (Erc20 ZRX TokenBalance cZRX) (Exactly 55e18) - Assert Equal (Erc20 ZRX TokenBalance Root) (Exactly 0e18) - Assert Equal (Erc20 cZRX TokenBalance Geoff) (Exactly 500e8) - Assert Equal (CToken cZRX Reserves) (Exactly 1e18) - Assert Equal (CToken cZRX UnderlyingBalance Geoff) (Exactly 54e18) - -- (55.0e18+0.0e18-1.0e18)/500.0e8 - Assert Equal (CToken cZRX ExchangeRate) (Exactly 1.08e9) - -- Now let's redeem all - Redeem Geoff 500e8 cZRX - -- Check our values - Assert Equal (Erc20 ZRX TokenBalance Geoff) (Exactly 54e18) - Assert Equal (Erc20 ZRX TokenBalance cZRX) (Exactly 1e18) - Assert Equal (Erc20 ZRX TokenBalance Root) (Exactly 0e18) - Assert Equal (Erc20 cZRX TokenBalance Geoff) (Exactly 0e8) - Assert Equal (CToken cZRX Reserves) (Exactly 1e18) - Assert Equal (CToken cZRX UnderlyingBalance Geoff) (Exactly 0e18) - -- 0 tokens implies initial exchange rate - Assert Equal (CToken cZRX ExchangeRate) (Exactly 1e9) - -- Then now, let's pull out all of our reserves (1e18) - ReduceReserves 1e18 cZRX - Assert Equal (Erc20 ZRX TokenBalance Geoff) (Exactly 54e18) - Assert Equal (Erc20 ZRX TokenBalance cZRX) (Exactly 0e18) - Assert Equal (Erc20 ZRX TokenBalance Root) (Exactly 1e18) - Assert Equal (Erc20 cZRX TokenBalance Geoff) (Exactly 0e8) - Assert Equal (CToken cZRX Reserves) (Exactly 0e18) - Assert Equal (CToken cZRX UnderlyingBalance Geoff) (Exactly 0e18) - -- 0 tokens implies initial exchange rate - Assert Equal (CToken cZRX ExchangeRate) (Exactly 1e9) - -Test "Reduce reserves WBTC when paused" - NewComptroller - ListedCToken WBTC cWBTC initialExchangeRate:1e9 tokenType:WBTC - Comptroller SetMarketSupplyCaps (cWBTC) (2e30) - Prep Geoff 50e18 WBTC cWBTC - Mint Geoff 50e18 cWBTC - Assert Equal (Erc20 cWBTC TokenBalance Geoff) (Exactly 500e8) - Assert Equal (CToken cWBTC UnderlyingBalance Geoff) (Exactly 50e18) - Assert Equal (CToken cWBTC ExchangeRate) (Exactly 1e9) - -- Get some brah to borrow then repay - BorrowAndRepayWithInterest WBTC cWBTC 10e18 5e18 interestRate:0.000001 blocks:500000 reserveRate:0.2 - -- We've accrued .0001% interest for 500000 blocks, or 50% of the principal (10e18), - -- thus, we should have accrued 5e18 of interest for the protocol - -- The reserves should get 20% of this, or 1e18, and the rest - -- is due pro-rata to all suppliers. We just have one, so - -- let's check that account is given correct new balance. - Invariant Remains (Erc20 WBTC TokenBalance cWBTC) (Exactly 55e18) - Invariant Remains (Erc20 WBTC TokenBalance Root) (Exactly 0e18) - Invariant Remains (Erc20 cWBTC TokenBalance Geoff) (Exactly 500e8) - Invariant Remains (CToken cWBTC Reserves) (Exactly 1e18) - Invariant Remains (CToken cWBTC UnderlyingBalance Geoff) (Exactly 54e18) - -- (55.0e18+0.0e18-1.0e18)/500.0e8 - Invariant Remains (CToken cWBTC ExchangeRate) (Exactly 1.08e9) - -- Now, let's pull out all of our reserves (1e18) - Erc20 WBTC Pause - AllowFailures - ReduceReserves 1e18 cWBTC - Assert Revert diff --git a/spec/scenario/RepayBorrow.scen b/spec/scenario/RepayBorrow.scen deleted file mode 100644 index 4504740ad..000000000 --- a/spec/scenario/RepayBorrow.scen +++ /dev/null @@ -1,175 +0,0 @@ --- Tests for repaying borrows - -Macro NewBorrow borrowAmount borrowRate - NewComptroller price:1.0 -- TODO: This should really be a price for a specific asset - NewCToken ZRX cZRX - Comptroller SetMarketSupplyCaps (cZRX) (2e30) - NewCToken BAT cBAT borrowRate -- note: cannot use macros with named args right now - Comptroller SetMarketSupplyCaps (cBAT) (2e30) - Give cBAT 10e18 BAT -- Faucet some bat to borrow - Support cZRX collateralFactor:0.5 - Support cBAT collateralFactor:0.5 - Prep Geoff Some ZRX cZRX - Mint Geoff 100e18 cZRX - EnterMarkets Geoff cZRX cBAT - Borrow Geoff borrowAmount cBAT - -Test "Borrow, hold a few blocks, and repay part" - NewBorrow borrowAmount:1e18 borrowRate:0.000005 - Assert Equal (CToken cBAT BorrowBalance Geoff) 1e18 - Assert Equal (CToken cBAT TotalBorrowsCurrent) 1e18 - Assert Equal (Erc20 BAT TokenBalance Geoff) 1e18 - Assert Equal (Erc20 BAT TokenBalance cBAT) 9e18 - -- Now let's add some blocks and see what happs - FastForward 300000 Blocks -- 1e18 * (1 + 300000 * 0.000005) - Assert Equal (CToken cBAT BorrowBalance Geoff) 2.5e18 - -- Now let's repay one full token - From Geoff (Erc20 BAT Approve cBAT 1.0e18) - RepayBorrow Geoff 1.0e18 cBAT - Assert Equal (CToken cBAT BorrowBalance Geoff) 1.5e18 - -- Let's check the overall numbers - Assert Equal (Erc20 BAT TokenBalance Geoff) Zero - Assert Equal (Erc20 BAT TokenBalance cBAT) 10e18 - Assert Equal (CToken cBAT TotalBorrowsCurrent) 1.5e18 - FastForward 200000 Blocks -- 1.5e18 * (1 + 200000 * 0.000005) - Assert Equal (CToken cBAT BorrowBalance Geoff) 3e18 - Assert Equal (CToken cBAT TotalBorrowsCurrent) 3e18 - -Test "Borrow, hold a few blocks, and repay full" - NewBorrow borrowAmount:1e18 borrowRate:0.000005 - Assert Equal (CToken cBAT BorrowBalance Geoff) 1e18 - Assert Equal (CToken cBAT TotalBorrowsCurrent) 1e18 - Assert Equal (Erc20 BAT TokenBalance Geoff) 1e18 - Assert Equal (Erc20 BAT TokenBalance cBAT) 9e18 - -- Now let's add some blocks and see what happs - FastForward 300000 Blocks -- 1e18 * (1 + 300000 * 0.000005) - Assert Equal (CToken cBAT BorrowBalance Geoff) 2.5e18 - -- Now let's repay fully - Give Geoff 1.5e18 BAT -- Geoff had the 1.0e18 borrowed BAT - From Geoff (Erc20 BAT Approve cBAT 2.5e18) - RepayBorrow Geoff 2.5e18 cBAT - Assert Equal (CToken cBAT BorrowBalance Geoff) 0e18 - -- Let's check the overall numbers - Assert Equal (Erc20 BAT TokenBalance Geoff) 0e18 - Assert Equal (Erc20 BAT TokenBalance cBAT) 11.5e18 - Assert Equal (CToken cBAT TotalBorrowsCurrent) 0e18 - FastForward 200000 Blocks -- 0e18 * (1 + 200000 * 0.000005) - Assert Equal (CToken cBAT BorrowBalance Geoff) 0e18 - Assert Equal (CToken cBAT TotalBorrowsCurrent) 0e18 - -Test "Borrow, hold a few blocks, and repay too much" - NewBorrow borrowAmount:1e18 borrowRate:0.000005 - Assert Equal (CToken cBAT BorrowBalance Geoff) 1e18 - Assert Equal (CToken cBAT TotalBorrowsCurrent) 1e18 - -- Now let's add some blocks and see what happs - FastForward 300000 Blocks -- 0.001e18 * (1 + 300000 * 0.000005) - Assert Equal (CToken cBAT BorrowBalance Geoff) 2.5e18 - -- Now let's repay fully - AllowFailures - Prep Geoff 10e18 BAT cBAT - Expect Changes (Erc20 BAT TokenBalance Geoff) Zero - Expect Changes (Erc20 BAT TokenBalance cBAT) Zero - RepayBorrow Geoff 10e18 cBAT - Assert Revert - -- Let's check the overall numbers - Assert Equal (CToken cBAT BorrowBalance Geoff) 2.5e18 - Assert Equal (CToken cBAT TotalBorrowsCurrent) 2.5e18 - -Test "Borrow, and get a negative total cash situation" - Invariant Success - NewBorrow borrowAmount:1e18 borrowRate:0.000005 - Assert Equal (CToken cBAT BorrowBalance Geoff) 1e18 - Assert Equal (CToken cBAT TotalBorrowsCurrent) 1e18 - Assert Equal (Erc20 BAT TokenBalance Geoff) 1e18 - Assert Equal (Erc20 BAT TokenBalance cBAT) 9e18 - -- Let's zoom way forward into the future - FastForward 9800000 Blocks -- 1e18 * (1 + 9800000 * 0.000005) - Assert Equal (CToken cBAT BorrowBalance Geoff) 50e18 - Assert Equal (CToken cBAT TotalBorrowsCurrent) 50e18 - -- Now let's repay one full token - From Geoff (Erc20 BAT Approve cBAT 1.0e18) - RepayBorrow Geoff 1.0e18 cBAT - Assert Equal (CToken cBAT BorrowBalance Geoff) 49e18 - Assert Equal (CToken cBAT TotalBorrowsCurrent) 49e18 - Assert Equal (Erc20 BAT TokenBalance Geoff) 0e18 - Assert Equal (Erc20 BAT TokenBalance cBAT) 10e18 - -Test "Borrow, hold a few blocks, and repay behalf part" - Invariant Success - NewBorrow borrowAmount:1e18 borrowRate:0.000005 - Assert Equal (CToken cBAT BorrowBalance Geoff) 1e18 - Assert Equal (CToken cBAT TotalBorrowsCurrent) 1e18 - Assert Equal (Erc20 BAT TokenBalance Geoff) 1e18 - Assert Equal (Erc20 BAT TokenBalance cBAT) 9e18 - -- Now let's add some blocks and see what happs - FastForward 300000 Blocks -- 1e18 * (1 + 300000 * 0.000005) - Assert Equal (CToken cBAT BorrowBalance Geoff) 2.5e18 - -- Now let's repay one full token from another user - Prep Torrey 1.0e18 BAT cBAT - RepayBorrowBehalf Torrey Geoff 1.0e18 cBAT - Assert Equal (CToken cBAT BorrowBalance Torrey) Zero - Assert Equal (CToken cBAT BorrowBalance Geoff) 1.5e18 - -- Let's check the overall numbers - Assert Equal (Erc20 BAT TokenBalance Torrey) 0e18 - Assert Equal (Erc20 BAT TokenBalance Geoff) 1e18 - Assert Equal (Erc20 BAT TokenBalance cBAT) 10e18 - Assert Equal (CToken cBAT TotalBorrowsCurrent) 1.5e18 - FastForward 200000 Blocks -- 1.5e18 * (1 + 200000 * 0.000005) - Assert Equal (CToken cBAT BorrowBalance Torrey) Zero - Assert Equal (CToken cBAT BorrowBalance Geoff) 3e18 - Assert Equal (CToken cBAT TotalBorrowsCurrent) 3e18 - -Test "Prohibit repay by comptroller rejection due to mock unlist" - NewBorrow borrowAmount:1e18 borrowRate:0.000005 - Assert Equal (CToken cBAT BorrowBalance Geoff) 1e18 - Assert Equal (CToken cBAT TotalBorrowsCurrent) 1e18 - -- Now let's add some blocks and see what happs - FastForward 300000 Blocks -- 1e18 * (1 + 300000 * 0.000005) - Assert Equal (CToken cBAT BorrowBalance Geoff) 2.5e18 - -- Now let's repay fully - AllowFailures - Prep Geoff 10e18 BAT cBAT - Expect Changes (Erc20 BAT TokenBalance Geoff) Zero - Expect Changes (Erc20 BAT TokenBalance cBAT) Zero - Comptroller UnList cZRX -- Mock unlist ZRX - RepayBorrow Geoff 2.5e18 cZRX - Assert RevertCustomError RepayBorrowComptrollerRejection 9 - -- Let's check the overall numbers - Assert Equal (CToken cBAT BorrowBalance Geoff) 2.5e18 - Assert Equal (CToken cBAT TotalBorrowsCurrent) 2.5e18 - -Test "Repay fails with insufficient allowance" - NewBorrow borrowAmount:1e18 borrowRate:0.000005 - Assert Equal (CToken cBAT BorrowBalance Geoff) 1e18 - Assert Equal (CToken cBAT TotalBorrowsCurrent) 1e18 - -- Now let's add some blocks and see what happs - FastForward 300000 Blocks -- 1e18 * (1 + 300000 * 0.000005) - Assert Equal (CToken cBAT BorrowBalance Geoff) 2.5e18 - -- Now let's repay fully - AllowFailures - Prep Geoff 100e18 BAT cBAT allowanceAmount:1.5e18 - Expect Changes (Erc20 BAT TokenBalance Geoff) Zero - Expect Changes (Erc20 BAT TokenBalance cBAT) Zero - RepayBorrow Geoff 2.5e18 cBAT - Assert Revert "revert Insufficient allowance" - -- Let's check the overall numbers - Assert Equal (CToken cBAT BorrowBalance Geoff) 2.5e18 - Assert Equal (CToken cBAT TotalBorrowsCurrent) 2.5e18 - -Test "Repay fails with insufficient balance" - NewBorrow borrowAmount:1e18 borrowRate:0.000005 - Assert Equal (CToken cBAT BorrowBalance Geoff) 1e18 - Assert Equal (CToken cBAT TotalBorrowsCurrent) 1e18 - -- Now let's add some blocks and see what happs - FastForward 300000 Blocks -- 1e18 * (1 + 300000 * 0.000005) - Assert Equal (CToken cBAT BorrowBalance Geoff) 2.5e18 - -- Now let's repay fully - AllowFailures - Prep Geoff 0e18 BAT cBAT allowanceAmount:2.5e18 - Expect Changes (Erc20 BAT TokenBalance Geoff) Zero - Expect Changes (Erc20 BAT TokenBalance cBAT) Zero - RepayBorrow Geoff 2.5e18 cBAT - Assert Revert "revert Insufficient balance" - -- Let's check the overall numbers - Assert Equal (CToken cBAT BorrowBalance Geoff) 2.5e18 - Assert Equal (CToken cBAT TotalBorrowsCurrent) 2.5e18 diff --git a/spec/scenario/RepayBorrowEth.scen b/spec/scenario/RepayBorrowEth.scen deleted file mode 100644 index 7e2b69168..000000000 --- a/spec/scenario/RepayBorrowEth.scen +++ /dev/null @@ -1,135 +0,0 @@ --- Tests for repaying borrows - -Macro SetupBorrow borrowRate - NewComptroller price:1.0 -- TODO: This should really be a price for a specific asset - ListedCToken ZRX cZRX borrowRate - Comptroller SetMarketSupplyCaps (cZRX) (2e30) - ListedEtherToken cETH borrowRate 0.005e9 - Comptroller SetMarketSupplyCaps (cETH) (2e30) - SetCollateralFactor cZRX collateralFactor:0.5 - SetCollateralFactor cETH collateralFactor:0.5 - Donate cETH 0.003e18 - Prep Geoff Some ZRX cZRX - Mint Geoff 100e18 cZRX - EnterMarkets Geoff cZRX cETH - -Macro NewBorrowEth borrowAmount borrowRate - SetupBorrow borrowRate - Borrow Geoff borrowAmount cETH - -Test "Borrow, hold a few blocks, and repay part" - NewBorrowEth borrowAmount:0.001e18 borrowRate:0.000005 - Assert Equal (CToken cETH BorrowBalance Geoff) 0.001e18 - Assert Equal (CToken cETH TotalBorrowsCurrent) 0.001e18 - -- Now let's add some blocks and see what happs - FastForward 300000 Blocks -- 0.001e18 * (1 + 300000 * 0.000005) - Assert Equal (CToken cETH BorrowBalance Geoff) 0.0025e18 - -- Now let's repay one full token - Expect Changes (EtherBalance Geoff) -0.001e18 - Expect Changes (EtherBalance cETH) +0.001e18 - RepayBorrowEth Geoff 0.001e18 cETH - ---- Let's check the overall numbers - Assert Equal (CToken cETH BorrowBalance Geoff) 0.0015e18 - Assert Equal (CToken cETH TotalBorrowsCurrent) 0.0015e18 - FastForward 200000 Blocks -- 0.0015e18 * (1 + 2000 * 0.000005) - Assert Equal (CToken cETH BorrowBalance Geoff) 0.003e18 - Assert Equal (CToken cETH TotalBorrowsCurrent) 0.003e18 - -Test "Don't borrow and then do repay" - SetupBorrow borrowRate:0.000005 - Assert Equal (CToken cETH BorrowBalance Geoff) Zero - Assert Equal (CToken cETH TotalBorrowsCurrent) Zero - -- Now let's add some blocks and see what happs - FastForward 300000 Blocks -- 0 * (1 + 300000 * 0.000005) - Assert Equal (CToken cETH BorrowBalance Geoff) Zero - -- Now let's repay one full token - Expect Changes (EtherBalance Geoff) Zero - Expect Changes (EtherBalance cETH) Zero - RepayBorrowEth Geoff 0 cETH - ---- Let's check the overall numbers - Assert Equal (CToken cETH BorrowBalance Geoff) Zero - Assert Equal (CToken cETH TotalBorrowsCurrent) Zero - -Test "Borrow, hold a few blocks, and repay full" - NewBorrowEth borrowAmount:0.001e18 borrowRate:0.000005 - Assert Equal (CToken cETH BorrowBalance Geoff) 0.001e18 - Assert Equal (CToken cETH TotalBorrowsCurrent) 0.001e18 - -- Now let's add some blocks and see what happs - FastForward 300000 Blocks -- 0.001e18 * (1 + 300000 * 0.000005) - Assert Equal (CToken cETH BorrowBalance Geoff) 0.0025e18 - -- Now let's repay fully - Expect Changes (EtherBalance Geoff) -0.0025e18 - Expect Changes (EtherBalance cETH) +0.0025e18 - RepayBorrowEth Geoff 0.0025e18 cETH - -- Let's check the overall numbers - Assert Equal (CToken cETH BorrowBalance Geoff) Zero - Assert Equal (CToken cETH TotalBorrowsCurrent) Zero - FastForward 200000 Blocks -- 0e18 * (1 + 200000 * 0.000005) - Assert Equal (CToken cETH BorrowBalance Geoff) Zero - Assert Equal (CToken cETH TotalBorrowsCurrent) Zero - -Test "Borrow, hold a few blocks, and repay too much" - NewBorrowEth borrowAmount:0.001e18 borrowRate:0.000005 - Assert Equal (CToken cETH BorrowBalance Geoff) 0.001e18 - Assert Equal (CToken cETH TotalBorrowsCurrent) 0.001e18 - -- Now let's add some blocks and see what happs - FastForward 300000 Blocks -- 0.001e18 * (1 + 300000 * 0.000005) - Assert Equal (CToken cETH BorrowBalance Geoff) 0.0025e18 - -- Now let's repay fully - Expect Changes (EtherBalance Geoff) Zero - Expect Changes (EtherBalance cETH) Zero - -- TODO: This currently drains the sent-eth - AllowFailures - RepayBorrowEth Geoff 1.0e18 cETH - Assert Revert - -- Let's check the overall numbers - Assert Equal (CToken cETH BorrowBalance Geoff) 0.0025e18 - Assert Equal (CToken cETH TotalBorrowsCurrent) 0.0025e18 - -Test "Borrow, and get a negative total cash situation" - NewBorrowEth borrowAmount:0.001e18 borrowRate:0.000005 - Assert Equal (CToken cETH BorrowBalance Geoff) 0.001e18 - Assert Equal (CToken cETH TotalBorrowsCurrent) 0.001e18 - -- Let's zoom way forward into the future - FastForward 9800000 Blocks -- 0.001e18 * (1 + 9800000 * 0.000005) - Assert Equal (CToken cETH BorrowBalance Geoff) 0.05e18 - Assert Equal (CToken cETH TotalBorrowsCurrent) 0.05e18 - -- Now let's repay one bit - RepayBorrowEth Geoff 0.001e18 cETH - Assert Equal (CToken cETH BorrowBalance Geoff) 0.049e18 - Assert Equal (CToken cETH TotalBorrowsCurrent) 0.049e18 - -Test "Borrow, hold a few blocks, and repay behalf part" - NewBorrowEth borrowAmount:0.001e18 borrowRate:0.000005 - Assert Equal (CToken cETH BorrowBalance Geoff) 0.001e18 - Assert Equal (CToken cETH TotalBorrowsCurrent) 0.001e18 - -- Now let's add some blocks and see what happs - FastForward 300000 Blocks -- 0.001e18 * (1 + 300000 * 0.000005) - Assert Equal (CToken cETH BorrowBalance Geoff) 0.0025e18 - -- Now let's repay one full token from another user - RepayBorrowEthBehalf Torrey Geoff 0.001e18 cETH - Assert Equal (CToken cETH BorrowBalance Torrey) Zero - Assert Equal (CToken cETH BorrowBalance Geoff) 0.0015e18 - Assert Equal (CToken cETH TotalBorrowsCurrent) 0.0015e18 - FastForward 200000 Blocks -- 0.0015e18 * (1 + 200000 * 0.000005) - Assert Equal (CToken cETH BorrowBalance Torrey) Zero - Assert Equal (CToken cETH BorrowBalance Geoff) 0.003e18 - Assert Equal (CToken cETH TotalBorrowsCurrent) 0.003e18 - -Test "Prohibit repay by comptroller hook" - NewBorrowEth borrowAmount:0.001e18 borrowRate:0.000005 - Assert Equal (CToken cETH BorrowBalance Geoff) 0.001e18 - Assert Equal (CToken cETH TotalBorrowsCurrent) 0.001e18 - -- Now let's add some blocks and see what happs - FastForward 300000 Blocks -- 0.001e18 * (1 + 300000 * 0.000005) - Assert Equal (CToken cETH BorrowBalance Geoff) 0.0025e18 - -- Now let's repay one full token - Expect Changes (EtherBalance Geoff) Zero - Expect Changes (EtherBalance cETH) Zero - Comptroller UnList cETH -- Mock unlist cETH - AllowFailures - RepayBorrowEth Geoff 0.001e18 cETH - Assert RevertCustomError RepayBorrowComptrollerRejection 9 - ---- Let's check the overall numbers - Assert Equal (CToken cETH BorrowBalance Geoff) 0.0025e18 - Assert Equal (CToken cETH TotalBorrowsCurrent) 0.0025e18 diff --git a/spec/scenario/RepayBorrowWBTC.scen b/spec/scenario/RepayBorrowWBTC.scen deleted file mode 100644 index d0f019bc9..000000000 --- a/spec/scenario/RepayBorrowWBTC.scen +++ /dev/null @@ -1,193 +0,0 @@ --- Tests for repaying borrows - -Macro NewBorrow borrowAmount borrowRate - NewComptroller price:1.0 -- TODO: This should really be a price for a specific asset - NewCToken ZRX cZRX - Comptroller SetMarketSupplyCaps (cZRX) (2e30) - NewCToken WBTC cWBTC borrowRate 0.1 8 WBTC -- note: cannot use macros with named args right now - Comptroller SetMarketSupplyCaps (cWBTC) (2e30) - Give cWBTC 10e8 WBTC -- Faucet some WBTC to borrow - Support cZRX collateralFactor:0.5 - Support cWBTC collateralFactor:0.5 - Prep Geoff Some ZRX cZRX - Mint Geoff 100e18 cZRX - EnterMarkets Geoff cZRX cWBTC - Borrow Geoff borrowAmount cWBTC - -Test "Borrow WBTC, hold a few blocks, and repay part" - NewBorrow borrowAmount:1e8 borrowRate:0.000005 - Assert Equal (CToken cWBTC BorrowBalance Geoff) 1e8 - Assert Equal (CToken cWBTC TotalBorrowsCurrent) 1e8 - Assert Equal (Erc20 WBTC TokenBalance Geoff) 1e8 - Assert Equal (Erc20 WBTC TokenBalance cWBTC) 9e8 - -- Now let's add some blocks and see what happs - FastForward 300000 Blocks -- 1e18 * (1 + 300000 * 0.000005) - Assert Equal (CToken cWBTC BorrowBalance Geoff) 2.5e8 - -- Now let's repay one full token - From Geoff (Erc20 WBTC Approve cWBTC 1.0e8) - RepayBorrow Geoff 1e8 cWBTC - Assert Equal (CToken cWBTC BorrowBalance Geoff) 1.5e8 - -- Let's check the overall numbers - Assert Equal (Erc20 WBTC TokenBalance Geoff) Zero - Assert Equal (Erc20 WBTC TokenBalance cWBTC) 10e8 - Assert Equal (CToken cWBTC TotalBorrowsCurrent) 1.5e8 - FastForward 200000 Blocks -- 1.5e8 * (1 + 200000 * 0.000005) - Assert Equal (CToken cWBTC BorrowBalance Geoff) 3e8 - Assert Equal (CToken cWBTC TotalBorrowsCurrent) 3e8 - -Test "Borrow, hold a few blocks, and repay full" - NewBorrow borrowAmount:1e8 borrowRate:0.000005 - Assert Equal (CToken cWBTC BorrowBalance Geoff) 1e8 - Assert Equal (CToken cWBTC TotalBorrowsCurrent) 1e8 - Assert Equal (Erc20 WBTC TokenBalance Geoff) 1e8 - Assert Equal (Erc20 WBTC TokenBalance cWBTC) 9e8 - -- Now let's add some blocks and see what happs - FastForward 300000 Blocks -- 1e8 * (1 + 300000 * 0.000005) - Assert Equal (CToken cWBTC BorrowBalance Geoff) 2.5e8 - -- Now let's repay fully - Give Geoff 1.5e8 WBTC -- Geoff had the 1.0e8 borrowed WBTC - From Geoff (Erc20 WBTC Approve cWBTC 2.5e8) - RepayBorrow Geoff 2.5e8 cWBTC - Assert Equal (CToken cWBTC BorrowBalance Geoff) 0e8 - -- Let's check the overall numbers - Assert Equal (Erc20 WBTC TokenBalance Geoff) 0e8 - Assert Equal (Erc20 WBTC TokenBalance cWBTC) 11.5e8 - Assert Equal (CToken cWBTC TotalBorrowsCurrent) 0e8 - FastForward 200000 Blocks -- 0e8 * (1 + 200000 * 0.000005) - Assert Equal (CToken cWBTC BorrowBalance Geoff) 0e8 - Assert Equal (CToken cWBTC TotalBorrowsCurrent) 0e8 - -Test "Borrow, hold a few blocks, and repay too much" - NewBorrow borrowAmount:1e8 borrowRate:0.000005 - Assert Equal (CToken cWBTC BorrowBalance Geoff) 1e8 - Assert Equal (CToken cWBTC TotalBorrowsCurrent) 1e8 - -- Now let's add some blocks and see what happs - FastForward 300000 Blocks -- 1e8 * (1 + 300000 * 0.000005) - Assert Equal (CToken cWBTC BorrowBalance Geoff) 2.5e8 - -- Now let's repay fully - AllowFailures - Prep Geoff 10e8 WBTC cWBTC - Expect Changes (Erc20 WBTC TokenBalance Geoff) Zero - Expect Changes (Erc20 WBTC TokenBalance cWBTC) Zero - RepayBorrow Geoff 10e8 cWBTC - Assert Revert - -- Let's check the overall numbers - Assert Equal (CToken cWBTC BorrowBalance Geoff) 2.5e8 - Assert Equal (CToken cWBTC TotalBorrowsCurrent) 2.5e8 - -Test "Borrow, and get a negative total cash situation" - Invariant Success - NewBorrow borrowAmount:1e8 borrowRate:0.000005 - Assert Equal (CToken cWBTC BorrowBalance Geoff) 1e8 - Assert Equal (CToken cWBTC TotalBorrowsCurrent) 1e8 - Assert Equal (Erc20 WBTC TokenBalance Geoff) 1e8 - Assert Equal (Erc20 WBTC TokenBalance cWBTC) 9e8 - -- Let's zoom way forward into the future - FastForward 9800000 Blocks -- 1e8 * (1 + 9800000 * 0.000005) - Assert Equal (CToken cWBTC BorrowBalance Geoff) 50e8 - Assert Equal (CToken cWBTC TotalBorrowsCurrent) 50e8 - -- Now let's repay one full token - From Geoff (Erc20 WBTC Approve cWBTC 1.0e8) - RepayBorrow Geoff 1.0e8 cWBTC - Assert Equal (CToken cWBTC BorrowBalance Geoff) 49e8 - Assert Equal (CToken cWBTC TotalBorrowsCurrent) 49e8 - Assert Equal (Erc20 WBTC TokenBalance Geoff) 0e8 - Assert Equal (Erc20 WBTC TokenBalance cWBTC) 10e8 - -Test "Borrow, hold a few blocks, and repay behalf part" - Invariant Success - NewBorrow borrowAmount:1e8 borrowRate:0.000005 - Assert Equal (CToken cWBTC BorrowBalance Geoff) 1e8 - Assert Equal (CToken cWBTC TotalBorrowsCurrent) 1e8 - Assert Equal (Erc20 WBTC TokenBalance Geoff) 1e8 - Assert Equal (Erc20 WBTC TokenBalance cWBTC) 9e8 - -- Now let's add some blocks and see what happs - FastForward 300000 Blocks -- 1e8 * (1 + 300000 * 0.000005) - Assert Equal (CToken cWBTC BorrowBalance Geoff) 2.5e8 - -- Now let's repay one full token from another user - Prep Torrey 1.0e8 WBTC cWBTC - RepayBorrowBehalf Torrey Geoff 1.0e8 cWBTC - Assert Equal (CToken cWBTC BorrowBalance Torrey) Zero - Assert Equal (CToken cWBTC BorrowBalance Geoff) 1.5e8 - -- Let's check the overall numbers - Assert Equal (Erc20 WBTC TokenBalance Torrey) 0e8 - Assert Equal (Erc20 WBTC TokenBalance Geoff) 1e8 - Assert Equal (Erc20 WBTC TokenBalance cWBTC) 10e8 - Assert Equal (CToken cWBTC TotalBorrowsCurrent) 1.5e8 - FastForward 200000 Blocks -- 1.5e8 * (1 + 200000 * 0.000005) - Assert Equal (CToken cWBTC BorrowBalance Torrey) Zero - Assert Equal (CToken cWBTC BorrowBalance Geoff) 3e8 - Assert Equal (CToken cWBTC TotalBorrowsCurrent) 3e8 - -Test "Prohibit repay by comptroller rejection due to mock unlist" - NewBorrow borrowAmount:1e8 borrowRate:0.000005 - Assert Equal (CToken cWBTC BorrowBalance Geoff) 1e8 - Assert Equal (CToken cWBTC TotalBorrowsCurrent) 1e8 - -- Now let's add some blocks and see what happs - FastForward 300000 Blocks -- 0.001e8 * (1 + 300000 * 0.000005) - Assert Equal (CToken cWBTC BorrowBalance Geoff) 2.5e8 - -- Now let's repay fully - AllowFailures - Prep Geoff 10e8 WBTC cWBTC - Expect Changes (Erc20 WBTC TokenBalance Geoff) Zero - Expect Changes (Erc20 WBTC TokenBalance cWBTC) Zero - Comptroller UnList cZRX -- Mock unlist ZRX - RepayBorrow Geoff 2.5e8 cZRX - Assert RevertCustomError RepayBorrowComptrollerRejection 9 - -- Let's check the overall numbers - Assert Equal (CToken cWBTC BorrowBalance Geoff) 2.5e8 - Assert Equal (CToken cWBTC TotalBorrowsCurrent) 2.5e8 - -Test "Borrow WBTC, can't repay when paused" - NewBorrow borrowAmount:1e8 borrowRate:0.000005 - Assert Equal (CToken cWBTC BorrowBalance Geoff) 1e8 - Assert Equal (CToken cWBTC TotalBorrowsCurrent) 1e8 - Assert Equal (Erc20 WBTC TokenBalance Geoff) 1e8 - Assert Equal (Erc20 WBTC TokenBalance cWBTC) 9e8 - -- Now let's add some blocks and see what happs - FastForward 300000 Blocks -- 1e18 * (1 + 300000 * 0.000005) - Invariant Remains (CToken cWBTC BorrowBalance Geoff) 2.5e8 - -- Now let's repay one full token - From Geoff (Erc20 WBTC Approve cWBTC 1.0e8) - Erc20 WBTC Pause - AllowFailures - RepayBorrow Geoff 1e8 cWBTC - Assert Revert - -Test "Repay fails with insufficient allowance" - NewBorrow borrowAmount:1e8 borrowRate:0.000005 - Assert Equal (CToken cWBTC BorrowBalance Geoff) 1e8 - Assert Equal (CToken cWBTC TotalBorrowsCurrent) 1e8 - -- Now let's add some blocks and see what happs - FastForward 300000 Blocks -- 1e8 * (1 + 300000 * 0.000005) - Assert Equal (CToken cWBTC BorrowBalance Geoff) 2.5e8 - -- Now let's repay fully - AllowFailures - Prep Geoff 100e8 WBTC cWBTC allowanceAmount:1.5e8 - Expect Changes (Erc20 WBTC TokenBalance Geoff) Zero - Expect Changes (Erc20 WBTC TokenBalance cWBTC) Zero - RepayBorrow Geoff 2.5e8 cWBTC - --wbtc does not revert with reason in transfer from - Assert Revert "revert" - -- Let's check the overall numbers - Assert Equal (CToken cWBTC BorrowBalance Geoff) 2.5e8 - Assert Equal (CToken cWBTC TotalBorrowsCurrent) 2.5e8 - -Test "Repay fails with insufficient balance" - NewBorrow borrowAmount:1e8 borrowRate:0.000005 - Assert Equal (CToken cWBTC BorrowBalance Geoff) 1e8 - Assert Equal (CToken cWBTC TotalBorrowsCurrent) 1e8 - -- Now let's add some blocks and see what happs - FastForward 300000 Blocks -- 1e8 * (1 + 300000 * 0.000005) - Assert Equal (CToken cWBTC BorrowBalance Geoff) 2.5e8 - -- Now let's repay fully - AllowFailures - Prep Geoff 0e8 WBTC cWBTC allowanceAmount:2.5e8 - Expect Changes (Erc20 WBTC TokenBalance Geoff) Zero - Expect Changes (Erc20 WBTC TokenBalance cWBTC) Zero - RepayBorrow Geoff 2.5e8 cWBTC - --wbtc does not revert with reason in transfer from - Assert Revert "revert" - -- Let's check the overall numbers - Assert Equal (CToken cWBTC BorrowBalance Geoff) 2.5e8 - Assert Equal (CToken cWBTC TotalBorrowsCurrent) 2.5e8 diff --git a/spec/scenario/Seize.scen b/spec/scenario/Seize.scen deleted file mode 100644 index bdcbe17d5..000000000 --- a/spec/scenario/Seize.scen +++ /dev/null @@ -1,59 +0,0 @@ - -Test "Fail to seize calling directly" - NewComptroller - ListedCToken ZRX cZRX initialExchangeRate:1e9 - Comptroller SetMarketSupplyCaps (cZRX) (2e30) - ListedCToken BAT cBAT initialExchangeRate:1e9 - Comptroller SetMarketSupplyCaps (cBAT) (2e30) - Prep Geoff Some ZRX cZRX - Mint Geoff 50e18 cZRX - Invariant Remains (Erc20 cZRX TokenBalance Geoff) 50e9 - AllowFailures - Seize 1e9 cZRX caller:Geoff liquidator:Geoff borrower:Torrey - -- The caller must be from another cToken market, thus this fails - Assert RevertCustomError LiquidateSeizeComptrollerRejection 9 - -Test "Seize tokens with a paused WBTC cToken-- like normal" - NewComptroller - ListedCToken ZRX cZRX initialExchangeRate:1e9 - Comptroller SetMarketSupplyCaps (cZRX) (2e30) - ListedCToken WBTC cWBTC initialExchangeRate:0.1 tokenType:WBTC - Comptroller SetMarketSupplyCaps (cWBTC) (2e30) - Prep Geoff Some ZRX cZRX - Mint Geoff 50e18 cZRX - Erc20 WBTC Pause - Invariant Remains (Erc20 cZRX TokenBalance Geoff) 50e9 - AllowFailures - Seize 1e9 cWBTC caller:Geoff liquidator:Geoff borrower:Torrey - -- The caller must be from another cToken market, thus this fails - Assert RevertCustomError LiquidateSeizeComptrollerRejection 9 - -Test "Not able to seize tokens with a malicious unlisted cToken" - NewComptroller - ListedCToken ZRX cZRX initialExchangeRate:1e9 - Comptroller SetMarketSupplyCaps (cZRX) (2e30) - NewCTokenImmutable EVL cEVL initialExchangeRate:1e9 cTokenType:CEvil - Comptroller SetMarketSupplyCaps (cEVL) (2e30) - Prep Geoff Some ZRX cZRX - Mint Geoff 50e18 cZRX - Invariant Remains (Erc20 cZRX TokenBalance Geoff) 50e9 - Invariant Static (Erc20 cZRX TokenBalance Geoff) - Invariant Static (Erc20 cZRX TokenBalance Torrey) - AllowFailures - EvilSeize cEVL 1e9 cZRX seizer:Geoff seizee:Torrey - -- The caller must be from another cToken market, thus this fails - Assert RevertCustomError LiquidateSeizeComptrollerRejection 9 - -Test "Able to seize tokens with a malicious listed cToken" - NewComptroller - ListedCToken ZRX cZRX initialExchangeRate:1e9 - Comptroller SetMarketSupplyCaps (cZRX) (2e30) - ListedCTokenImmutable EVL cEVL initialExchangeRate:1e9 cTokenType:CEvil - Comptroller SetMarketSupplyCaps (cEVL) (2e30) - Prep Geoff Some ZRX cZRX - Mint Geoff 50e18 cZRX - Assert Equal (Erc20 cZRX TokenBalance Geoff) 50e9 - Expect Changes (Erc20 cZRX TokenBalance Geoff) -1e9 - -- effective liquidation reward is 1-.028 = 0.972 after protocolSeizeShare (liq incentive = 1) - Expect Changes (Erc20 cZRX TokenBalance Torrey) +0.972e9 - EvilSeize cEVL 1e9 cZRX seizer:Torrey seizee:Geoff diff --git a/spec/scenario/SetComptroller.scen b/spec/scenario/SetComptroller.scen deleted file mode 100644 index 36b4560e3..000000000 --- a/spec/scenario/SetComptroller.scen +++ /dev/null @@ -1,29 +0,0 @@ --- Sets for `_setComptroller` Admin Function - -Test "Set Comptroller" - NewComptroller - NewCToken ZRX cZRX - Comptroller SetMarketSupplyCaps (cZRX) (2e30) - Assert Equal (CToken cZRX Comptroller) (Unitroller Address) - ComptrollerImpl Deploy Scenario NewComptroller - From Root (CToken cZRX SetComptroller (ComptrollerImpl NewComptroller Address)) - -- TODO: Fix log assertion - -- Assert Log "NewComptroller" ("oldComptroller" (Unitroller Address)) ("newComptroller" (ComptrollerImpl NewComptroller Address)) - Assert Equal (CToken cZRX Comptroller) (ComptrollerImpl NewComptroller Address) - -Test "Fail when is not a comptroller" - NewComptroller - NewCToken ZRX cZRX - Comptroller SetMarketSupplyCaps (cZRX) (2e30) - Invariant Remains (CToken cZRX Comptroller) (Unitroller Address) - AllowFailures - From Root (CToken cZRX SetComptroller (PriceOracle Address)) - Assert Revert - -Test "Fail to set comptroller as not admin" - NewComptroller - NewCToken ZRX cZRX - Comptroller SetMarketSupplyCaps (cZRX) (2e30) - AllowFailures - From Geoff (CToken cZRX SetComptroller (PriceOracle Address)) - Assert RevertCustomError SetComptrollerOwnerCheck diff --git a/spec/scenario/SweepToken.scen b/spec/scenario/SweepToken.scen deleted file mode 100644 index 584df1318..000000000 --- a/spec/scenario/SweepToken.scen +++ /dev/null @@ -1,32 +0,0 @@ - -Test "Attempt to sweep underlying token" - NewComptroller price:1.0 - NewCToken ZRX cZRX - Comptroller SetMarketSupplyCaps (cZRX) (2e30) - NewCToken BAT cBAT - Give cBAT 10e18 BAT -- Faucet some bat to sweep - Support cZRX collateralFactor:0.5 - Support cBAT collateralFactor:0.5 - AllowFailures - cToken cBAT SweepToken BAT - Assert Revert "revert CErc20::sweepToken: can not sweep underlying token" - -Test "Succesfully Sweep standard non-underlying token from CErc20" - NewComptroller price:1.0 - Erc20 Deploy Standard ZRX "ZRX" 18 - NewCToken BAT cBAT - Comptroller SetMarketSupplyCaps (cBAT) (2e30) - Give cBAT 10e18 ZRX -- Faucet some ZRX to sweep - Support cBAT collateralFactor:0.5 - cToken cBAT SweepToken ZRX - Assert Equal (Erc20 ZRX TokenBalance Admin) (10e18) - -Test "Succesfully Sweep non-standard non-underlying token from CErc20" - NewComptroller price:1.0 - Erc20 Deploy NonStandard USDT "USDT" 18 - NewCToken BAT cBAT - Comptroller SetMarketSupplyCaps (cBAT) (2e30) - Give cBAT 10e18 USDT -- Faucet some USDT to sweep - Support cBAT collateralFactor:0.5 - cToken cBAT SweepToken USDT - Assert Equal (Erc20 USDT TokenBalance Admin) (10e18) diff --git a/spec/scenario/TokenTransfer.scen b/spec/scenario/TokenTransfer.scen deleted file mode 100644 index f5feda9ad..000000000 --- a/spec/scenario/TokenTransfer.scen +++ /dev/null @@ -1,115 +0,0 @@ - -Test "Simple cToken Transfer" - NewComptroller - ListedCToken ZRX cZRX initialExchangeRate:1e9 - Comptroller SetMarketSupplyCaps (cZRX) (2e30) - Prep Geoff Some ZRX cZRX - Mint Geoff 50e18 cZRX - -- Just to be sure, check initial balances - Assert Equal (Erc20 cZRX TokenBalance Geoff) (Exactly 50e9) - Assert Equal (Erc20 cZRX TokenBalance Torrey) Zero - -- Just transfer - Transfer Geoff Torrey 10e9 cZRX - Assert Equal (Erc20 cZRX TokenBalance Geoff) (Exactly 40e9) - Assert Equal (Erc20 cZRX TokenBalance Torrey) (Exactly 10e9) - -Test "Simple cToken Transfer When Underlying Paused" - NewComptroller - ListedCToken WBTC cWBTC initialExchangeRate:0.1 tokenType:WBTC - Comptroller SetMarketSupplyCaps (cWBTC) (2e30) - Prep Geoff Some WBTC cWBTC - Mint Geoff 50e8 cWBTC - -- Just to be sure, check initial balances - Assert Equal (Erc20 cWBTC TokenBalance Geoff) (Exactly 50e9) - Assert Equal (Erc20 cWBTC TokenBalance Torrey) Zero - -- Just transfer - Erc20 WBTC Pause - Transfer Geoff Torrey 10e9 cWBTC - Assert Equal (Erc20 cWBTC TokenBalance Geoff) (Exactly 40e9) - Assert Equal (Erc20 cWBTC TokenBalance Torrey) (Exactly 10e9) - -Test "Simple cToken Transfer 1:1 Rate" - NewComptroller - ListedCToken ZRX cZRX initialExchangeRate:1e0 - Comptroller SetMarketSupplyCaps (cZRX) (2e30) - Prep Geoff Some ZRX cZRX - Mint Geoff 50e18 cZRX - -- Just to be sure, check initial balances - Assert Equal (Erc20 cZRX TokenBalance Geoff) (Exactly 50e18) - Assert Equal (Erc20 cZRX TokenBalance Torrey) Zero - -- Just transfer - Transfer Geoff Torrey 10e18 cZRX - Assert Equal (Erc20 cZRX TokenBalance Geoff) (Exactly 40e18) - Assert Equal (Erc20 cZRX TokenBalance Torrey) (Exactly 10e18) - -Test "Simple cToken Transfer Not Allowed by Comptroller" - NewComptroller - ListedCToken ZRX cZRX initialExchangeRate:1e0 - Comptroller SetMarketSupplyCaps (cZRX) (2e30) - Comptroller SetCollateralFactor cZRX 0.1 - EnterMarkets Geoff cZRX - Prep Geoff Some ZRX cZRX - Mint Geoff 50e18 cZRX - -- Just to be sure, check initial balances - Invariant Remains (Erc20 cZRX TokenBalance Geoff) (Exactly 50e18) - Invariant Remains (Erc20 cZRX TokenBalance Torrey) Zero - -- Just transfer - AllowFailures - Transfer Geoff Torrey 60e18 cZRX - Assert RevertCustomError TransferComptrollerRejection 4 - -Test "Simple cToken Transfer From" - NewComptroller - ListedCToken ZRX cZRX initialExchangeRate:1e9 - Comptroller SetMarketSupplyCaps (cZRX) (2e30) - Prep Geoff Some ZRX cZRX - Mint Geoff 50e18 cZRX - -- Just to be sure, check initial balances - Invariant Remains (Erc20 cZRX TokenBalance Torrey) Zero - Assert Equal (Erc20 cZRX TokenBalance Geoff) (Exactly 50e9) - Assert Equal (Erc20 cZRX TokenBalance Coburn) Zero - -- Add approval - From Geoff (Erc20 cZRX Approve Torrey 25e9) - Assert Equal (Erc20 cZRX Allowance Geoff Torrey) (Exactly 25e9) - -- Perform transfer from - From Torrey (Erc20 cZRX TransferFrom Geoff Coburn 10e9) - Assert Equal (Erc20 cZRX TokenBalance Geoff) (Exactly 40e9) - Assert Equal (Erc20 cZRX TokenBalance Coburn) (Exactly 10e9) - Assert Equal (Erc20 cZRX Allowance Geoff Torrey) (Exactly 15e9) - -Test "cToken Transfer From Not Allowed" - NewComptroller - ListedCToken ZRX cZRX initialExchangeRate:1e9 - Comptroller SetMarketSupplyCaps (cZRX) (2e30) - Prep Geoff Some ZRX cZRX - Mint Geoff 50e18 cZRX - -- - Invariant Remains (Erc20 cZRX TokenBalance Geoff) (Exactly 50e9) - Invariant Remains (Erc20 cZRX TokenBalance Torrey) (Exactly 0e9) - AllowFailures - Erc20 cZRX TransferFrom Geoff Torrey 10e9 - Assert Revert - -Test "cToken Transfer paused" - NewComptroller - ListedCToken ZRX cZRX initialExchangeRate:1e9 - Comptroller SetMarketSupplyCaps (cZRX) (2e30) - Prep Geoff Some ZRX cZRX - Mint Geoff 50e18 cZRX - -- Just to be sure, check initial balances - Assert Equal (Erc20 cZRX TokenBalance Geoff) (Exactly 50e9) - Assert Equal (Erc20 cZRX TokenBalance Coburn) Zero - -- Pause and attempt transfer - Comptroller SetPauseGuardian Coburn - From Coburn (Comptroller SetGuardianPaused "Transfer" True) - AllowFailures - Transfer Geoff Torrey 10e9 cZRX - Assert Revert "revert transfer is paused" - Assert Equal (Erc20 cZRX TokenBalance Geoff) (Exactly 50e9) - Assert Equal (Erc20 cZRX TokenBalance Coburn) Zero - -- unPause and complete transfer - Invariant Success - Comptroller SetGuardianPaused "Transfer" False - Transfer Geoff Coburn 10e9 cZRX - Assert Equal (Erc20 cZRX TokenBalance Geoff) (Exactly 40e9) - Assert Equal (Erc20 cZRX TokenBalance Coburn) (Exactly 10e9) diff --git a/spec/scenario/Unitroller.scen b/spec/scenario/Unitroller.scen deleted file mode 100644 index dc9576d22..000000000 --- a/spec/scenario/Unitroller.scen +++ /dev/null @@ -1,277 +0,0 @@ - -Test "Standard Upgrade" - Unitroller Deploy - PriceOracle Deploy Fixed 1.0 - -- Upgrade to G1 - ComptrollerImpl Deploy ScenarioG1 ScenComptrollerG1 - Unitroller SetPendingImpl ScenComptrollerG1 - ComptrollerImpl ScenComptrollerG1 BecomeG1 (PriceOracle Address) 0.2 20 - Assert Equal (Comptroller CloseFactor) 0.2 - Assert Equal (Comptroller MaxAssets) 20 - Assert Equal (Comptroller Implementation) (Address ScenComptrollerG1) - ListedCToken ZRX cZRX - Comptroller SetMarketSupplyCaps (cZRX) (2e30) - ListedCToken DAI cDAI - Comptroller SetMarketSupplyCaps (cDAI) (2e30) - -- Upgrade to G2 - ComptrollerImpl Deploy StandardG2 StandardComptrollerG2 - Unitroller SetPendingImpl StandardComptrollerG2 - ComptrollerImpl StandardComptrollerG2 BecomeG2 - Assert Equal (Comptroller CloseFactor) 0.2 - Assert Equal (Comptroller MaxAssets) 20 - Assert Equal (Comptroller Implementation) (Address StandardComptrollerG2) - -- Upgrade to G3 - ComptrollerImpl Deploy ScenarioG3 ScenComptrollerG3 - Unitroller SetPendingImpl ScenComptrollerG3 - ComptrollerImpl ScenComptrollerG3 BecomeG3 1e18 [cZRX cDAI] - Assert Equal (Comptroller CloseFactor) 0.2 - Assert Equal (Comptroller MaxAssets) 20 - Assert Equal (Comptroller Implementation) (Address ScenComptrollerG3) - -Test "Standard Upgrade, then downgrade then upgrade again" - Unitroller Deploy - PriceOracle Deploy Fixed 1.0 - -- Upgrade to G1 - ComptrollerImpl Deploy ScenarioG1 ScenComptrollerG1 - Unitroller SetPendingImpl ScenComptrollerG1 - ComptrollerImpl ScenComptrollerG1 BecomeG1 (PriceOracle Address) 0.2 20 - Assert Equal (Comptroller CloseFactor) 0.2 - Assert Equal (Comptroller MaxAssets) 20 - Assert Equal (Comptroller Implementation) (Address ScenComptrollerG1) - ListedCToken ZRX cZRX - ListedCToken DAI cDAI - -- Upgrade to G2 - ComptrollerImpl Deploy StandardG2 ComptrollerG2 - Unitroller SetPendingImpl ComptrollerG2 - ComptrollerImpl ComptrollerG2 BecomeG2 - Comptroller SetPauseGuardian Coburn - Assert Equal (Comptroller PauseGuardian) (Address Coburn) - Assert Equal (Comptroller CloseFactor) 0.2 - Assert Equal (Comptroller MaxAssets) 20 - Assert Equal (Comptroller Implementation) (Address ComptrollerG2) - -- Upgrade to G3 - ComptrollerImpl Deploy ScenarioG3 ScenComptrollerG3 - Unitroller SetPendingImpl ScenComptrollerG3 - ComptrollerImpl ScenComptrollerG3 BecomeG3 1e18 [cZRX cDAI] - Assert Equal (Comptroller PauseGuardian) (Address Coburn) - Assert Equal (Comptroller CloseFactor) 0.2 - Assert Equal (Comptroller MaxAssets) 20 - Assert Equal (Comptroller Implementation) (Address ScenComptrollerG3) - -- Downgrade to G2 - Unitroller SetPendingImpl ComptrollerG2 - ComptrollerImpl ComptrollerG2 BecomeG2 - Assert Equal (Comptroller CloseFactor) 0.2 - Assert Equal (Comptroller MaxAssets) 20 - Assert Equal (Comptroller Implementation) (Address ComptrollerG2) - -- Upgrade to G3 again - Unitroller SetPendingImpl ScenComptrollerG3 - ComptrollerImpl ScenComptrollerG3 BecomeG3 1e18 [] - Assert Equal (Comptroller GetCompMarkets) [(Address cZRX) (Address cDAI)] - Assert Equal (Comptroller PauseGuardian) (Address Coburn) - Assert Equal (Comptroller CloseFactor) 0.2 - Assert Equal (Comptroller MaxAssets) 20 - Assert Equal (Comptroller Implementation) (Address ScenComptrollerG3) - -Test "Once become, can become again" - -- TODO: See why ABI is broken here - Unitroller Deploy - PriceOracle Deploy Fixed 1.0 - ComptrollerImpl Deploy ScenarioG1 ScenComptrollerG1 - Unitroller SetPendingImpl ScenComptrollerG1 - ComptrollerImpl ScenComptrollerG1 BecomeG1 (PriceOracle Address) 0.2 20 - Assert Equal (Comptroller CloseFactor) 0.2 - Assert Equal (Comptroller MaxAssets) 20 - Assert Equal (Comptroller Implementation) (Address ScenComptrollerG1) - ComptrollerImpl Deploy ScenarioG1 ScenComptrollerG1_2 - Unitroller SetPendingImpl ScenComptrollerG1_2 - ComptrollerImpl ScenComptrollerG1_2 BecomeG1 (PriceOracle Address) 0.4 40 - Assert Equal (Comptroller CloseFactor) 0.4 - Assert Equal (Comptroller MaxAssets) 40 - Assert Equal (Comptroller Implementation) (Address ScenComptrollerG1_2) - ---G1 recome -Test "Recome has default values" - Unitroller Deploy - PriceOracle Deploy Fixed 1.0 - ComptrollerImpl Deploy ScenarioG1 ScenComptrollerG1 - Unitroller SetPendingImpl ScenComptrollerG1 - ComptrollerImpl ScenComptrollerG1 Recome - Assert Equal (Comptroller CloseFactor) 0.0 - Assert Equal (Comptroller MaxAssets) 0 - Assert Equal (Comptroller Implementation) (Address ScenComptrollerG1) - ---G1 bork -Test "Bork and unbork" - Unitroller Deploy - PriceOracle Deploy Fixed 1.0 - ComptrollerImpl Deploy ScenarioG1 ScenComptrollerG1 - -- Set a normal impl - Unitroller SetPendingImpl ScenComptrollerG1 - ComptrollerImpl ScenComptrollerG1 BecomeG1 (PriceOracle Address) 0.2 20 - Assert Equal (Comptroller CloseFactor) 0.2 - Assert Equal (Comptroller MaxAssets) 20 - Assert Equal (Comptroller Implementation) (Address ScenComptrollerG1) - -- Now move to a borked one that's bad - ComptrollerImpl Deploy Borked MyBork - Unitroller SetPendingImpl MyBork - ComptrollerImpl MyBork BecomeG1 (PriceOracle Address) 0.4 40 - Assert ReadRevert (Comptroller CloseFactor) "revert" - Assert Equal (Comptroller Implementation) (Address MyBork) - -- Now change back to the first good one - Unitroller SetPendingImpl ScenComptrollerG1 - ComptrollerImpl ScenComptrollerG1 Recome - Assert Equal (Comptroller CloseFactor) 0.2 - Assert Equal (Comptroller MaxAssets) 20 - Assert Equal (Comptroller Implementation) (Address ScenComptrollerG1) - -Macro CheckUnitrollerStorage implementation - -- Admin; 0 - Assert Equal (Comptroller Admin) (Address Root) - Assert Equal (StorageAt Comptroller 0 0 "address") (Address Root) - -- PendingAdmin; 1 - Assert Equal (Comptroller PendingAdmin) (Address Coburn) - Assert Equal (StorageAt Comptroller 1 0 "address") (Address Coburn) - -- ComptrollerImplementation; 2 - Assert Equal (Unitroller Implementation) implementation - Assert Equal (StorageAt Comptroller 2 0 "address") implementation - -- PendingComptrollerImplementation; 3 - -- check as number since casting address 0 is not defined - Assert Equal (StorageAt Comptroller 3 0 "number") 0 - -Macro CheckV1Storage - -- Oracle; 4 - Assert Equal (Comptroller PriceOracle) (Address PriceOracle) - Assert Equal (StorageAt Comptroller 4 0 "address") (Address PriceOracle) - -- CloseFactorMantissa; 5 - Assert Equal (Comptroller CloseFactor) 0.2 - Assert Equal (StorageAt Comptroller 5 0 "number") 0.2e18 - -- LiquidationIncentiveMantissa; 6 - Assert Equal (Comptroller LiquidationIncentive) 1 - Assert Equal (StorageAt Comptroller 6 0 "number") 1e18 - -- MaxAssets; 7 - Assert Equal (Comptroller MaxAssets) 20 - Assert Equal (StorageAt Comptroller 7 0 "number") 20 - -- AccountAssets; 8 * - Assert Equal (StorageAt Comptroller 8 0 "number") 0 - Assert Equal (StorageAtMapping Comptroller 8 (Address Geoff) "number") 2 - Assert Equal (StorageAtMapping Comptroller 8 (Address Geoff) "list(address)") [(Address cZRX) (Address cBAT)] - Assert Equal (Comptroller AssetsIn Geoff) [(Address cZRX) (Address cBAT)] - -- Markets; 9 * - Assert Equal (StorageAt Comptroller 9 0 "number") 0 - Assert Equal (StorageAtNestedMapping Comptroller 9 (Address cZRX) Geoff "marketStruct") [True 0.5 True] - Assert Equal (StorageAtNestedMapping Comptroller 9 (Address cBAT) Geoff "marketStruct") [True 0.4 True] - Assert Equal (StorageAtNestedMapping Comptroller 9 (Address cBAT) Coburn "marketStruct") [True 0.4 False] - Assert Equal (Comptroller CollateralFactor cZRX) 0.5 - Assert Equal (Comptroller CollateralFactor cBAT) 0.4 - Assert Equal (Comptroller CheckMembership Geoff cZRX) True - Assert Equal (Comptroller CheckMembership Geoff cBAT) True - -Macro CheckV2Storage - -- PauseGuardian; 10 - Assert Equal (Comptroller PauseGuardian) (Address Coburn) - Assert Equal (StorageAt Comptroller 10 0 "address") (Address Coburn) - -- MintGuardianPaused; 11 - Assert Equal (StorageAt Comptroller 10 40 "bool") False - Assert Equal (Comptroller _MintGuardianPaused) False - -- BorrowGuardianPaused; 12 - Assert Equal (StorageAt Comptroller 10 42 "bool") False - Assert Equal (Comptroller _BorrowGuardianPaused) False - -- TransferGuardianPaused; 13 - Assert Equal (StorageAt Comptroller 10 44 "bool") False - From Coburn (Comptroller SetGuardianPaused "Transfer" True) - Assert Equal (Comptroller TransferGuardianPaused) True - Assert Equal (StorageAt Comptroller 10 44 "bool") True - Comptroller SetGuardianPaused "Transfer" False - -- SeizeGuardianPaused; 14 - Assert Equal (StorageAt Comptroller 10 46 "bool") False - From Coburn (Comptroller SetGuardianPaused "Seize" True) - Assert Equal (Comptroller SeizeGuardianPaused) True - Assert Equal (StorageAt Comptroller 10 46 "bool") True - Comptroller SetGuardianPaused "Seize" False - -- - -- Pause by market storage - -- - -- MintGuardianPaused; 15 - Assert Equal (StorageAtMapping Comptroller 11 (Address cZRX) "bool") False - From Coburn (Comptroller SetGuardianMarketPaused cZRX "Mint" True) - Assert Equal (Comptroller MintGuardianMarketPaused cZRX) True - Assert Equal (StorageAtMapping Comptroller 11 (Address cZRX) "bool") True - Comptroller SetGuardianMarketPaused cZRX "Mint" False - -- BorrowGuardianPaused; 16 - Assert Equal (StorageAtMapping Comptroller 12 (Address cZRX) "bool") False - From Coburn (Comptroller SetGuardianMarketPaused cZRX "Borrow" True) - Assert Equal (Comptroller BorrowGuardianMarketPaused cZRX) True - Assert Equal (StorageAtMapping Comptroller 12 (Address cZRX) "bool") True - Comptroller SetGuardianMarketPaused cZRX "Borrow" False - -Macro CheckV3Storage - -- AllMarkets; 17 - Assert Equal (StorageAt Comptroller 13 0 "number") 2 - -- TODO: StorageAtArray Comptroller 13? - -- CompRate; 18 - Assert Equal (StorageAt Comptroller 14 0 "number") 1e18 - -- CompSpeeds; 19 - Assert Equal (StorageAt Comptroller 15 0 "number") 0 - -- CompSupplyState; 20 - Assert Equal (StorageAt Comptroller 16 0 "number") 0 - -- CompBorrowState; 21 - Assert Equal (StorageAt Comptroller 17 0 "number") 0 - -- CompSupplierIndex; 22 - Assert Equal (StorageAt Comptroller 18 0 "number") 0 - -- CompBorrowerIndex; 23 - Assert Equal (StorageAt Comptroller 19 0 "number") 0 - -- CompAccrued; 24 - Assert Equal (StorageAt Comptroller 20 0 "number") 0 - --- Times out coverage, disable for now - ideally set flag to not run in coverage -Pending "Keeps all storage" - Unitroller Deploy - PriceOracle Deploy Fixed 1.0 - ComptrollerImpl Deploy StandardG1 ComptrollerG1 - Unitroller SetPendingImpl ComptrollerG1 - ComptrollerImpl ComptrollerG1 BecomeG1 (PriceOracle Address) 0.2 20 - Comptroller SetPendingAdmin Coburn - --- - NewCToken ZRX cZRX delegatorType:CErc20Delegator cTokenType:CErc20Delegate - NewCToken BAT cBAT delegatorType:CErc20Delegator cTokenType:CErc20Delegate - Comptroller SetMarketSupplyCaps (cZRX) (2e30) - Comptroller SetMarketSupplyCaps (cBAT) (2e30) - Give cBAT 10e18 BAT -- Faucet some bat to borrow - Support cZRX collateralFactor:0.5 - Support cBAT collateralFactor:0.4 - Prep Geoff Some ZRX cZRX - Mint Geoff 100e18 cZRX - EnterMarkets Geoff cZRX cBAT - Borrow Geoff 1e18 cBAT - -- - CheckUnitrollerStorage (Address ComptrollerG1) - CheckV1Storage - -- - ComptrollerImpl Deploy StandardG2 ComptrollerG2 - Unitroller SetPendingImpl ComptrollerG2 - Assert Equal (Unitroller PendingImplementation) (Address ComptrollerG2) - Assert Equal (StorageAt Comptroller 3 0 "address") (Address ComptrollerG2) - ComptrollerImpl ComptrollerG2 BecomeG2 - Comptroller SetPauseGuardian Coburn - -- - CheckUnitrollerStorage (Address ComptrollerG2) - CheckV1Storage - CheckV2Storage - -- - ComptrollerImpl Deploy StandardG3 ComptrollerG3 - Unitroller SetPendingImpl ComptrollerG3 - ComptrollerImpl ComptrollerG3 BecomeG3 1e18 [cZRX cBAT] - -- - CheckUnitrollerStorage (Address ComptrollerG3) - CheckV1Storage - CheckV2Storage - CheckV3Storage - -- - ComptrollerImpl Deploy Standard ComptrollerG4 - Unitroller SetPendingImpl ComptrollerG4 - ComptrollerImpl ComptrollerG4 Become - -- - CheckUnitrollerStorage (Address ComptrollerG4) - CheckV1Storage - CheckV2Storage - CheckV3Storage diff --git a/spec/sim/0001-comp-distribution-patch/deploy.scen b/spec/sim/0001-comp-distribution-patch/deploy.scen deleted file mode 100755 index d7729b6f6..000000000 --- a/spec/sim/0001-comp-distribution-patch/deploy.scen +++ /dev/null @@ -1,8 +0,0 @@ -#!/usr/bin/env yarn repl -n mainnet -s - -PrintTransactionLogs - --- Deploy the flywheel impl -ComptrollerImpl Deploy Standard StdComptrollerG4 - -Print "Deployed OK!" diff --git a/spec/sim/0001-comp-distribution-patch/hypothetical_upgrade.scen b/spec/sim/0001-comp-distribution-patch/hypothetical_upgrade.scen deleted file mode 100755 index c65586c0b..000000000 --- a/spec/sim/0001-comp-distribution-patch/hypothetical_upgrade.scen +++ /dev/null @@ -1,176 +0,0 @@ -#!/usr/bin/env yarn repl -s - -PrintTransactionLogs -Alias CompHolder "0x19bc62ff7cd9ffd6bdced9802ff718f09f7259f1" -Alias USDCWhale "0x92d7796c04ee34d1d16c57fab92fc2bccf434468" -Alias cBATBorrower "0xe5f3dbcc3dcf75a6946822aae7df5160505d3069" -Web3Fork "https://mainnet-eth.compound.finance/@10331520" (CompHolder USDCWhale cBATBorrower) -UseConfigs mainnet - --- Deploy the flywheel impl - -ComptrollerImpl Deploy Standard ComptrollerG4 - --- Propose to apply the patch - -From CompHolder (Comp Delegate CompHolder) -From CompHolder (Governor GovernorAlpha Propose "COMP Distribution Patch" [(Address Unitroller) (Address ComptrollerG4)] [0 0] ["_setPendingImplementation(address)" "_become(address)"] [[(Address ComptrollerG4)] [(Address Unitroller)]]) - --- Vote for, queue, and execute the proposal - -MineBlock -From CompHolder (Governor GovernorAlpha Proposal LastProposal Vote For) -AdvanceBlocks 20000 -Governor GovernorAlpha Proposal LastProposal Queue -IncreaseTime 604910 -Governor GovernorAlpha Proposal LastProposal Execute - --- Sanity check the upgrade - -Assert Equal (Comptroller CompRate) 0.25e18 -Assert Equal (Comptroller CheckIsComped cBAT) True -Assert Equal (Comptroller CheckIsComped cDAI) True -Assert Equal (Comptroller CheckIsComped cETH) True -Assert Equal (Comptroller CheckIsComped cREP) True -Assert Equal (Comptroller CheckIsComped cSAI) False -Assert Equal (Comptroller CheckIsComped cUSDC) True -Assert Equal (Comptroller CheckIsComped cUSDT) True -Assert Equal (Comptroller CheckisComped cWBTC) True -Assert Equal (Comptroller CheckIsComped cZRX) True - --- Sanity check the speeds - -Assert Equal (Comptroller CompSpeed cBAT) 0.211801939788283286e18 -Assert Equal (Comptroller CompSpeed cDAI) 0.001175763573454607e18 -Assert Equal (Comptroller CompSpeed cETH) 0.000020887685831991e18 -Assert Equal (Comptroller CompSpeed cREP) 0.000007175802675015e18 -Assert Equal (Comptroller CompSpeed cSAI) 0 -Assert Equal (Comptroller CompSpeed cUSDC) 0.000884273506888560e18 -Assert Equal (Comptroller CompSpeed cUSDT) 0.020341204032904166e18 -Assert Equal (Comptroller CompSpeed cWBTC) 0.005869479211613005e18 -Assert Equal (Comptroller CompSpeed cZRX) 0.009899276398349366e18 - --- Check the market borrows - -Assert Equal (CToken cBAT TotalBorrows) 816167647101108360363936140 -Assert Equal (CToken cDAI TotalBorrows) 23521775646627969501566436 -Assert Equal (CToken cETH TotalBorrows) 1260824767124865834187 -Assert Equal (CToken cREP TotalBorrows) 5305791273320090270164 -Assert Equal (CToken cSAI TotalBorrows) 87120566019791136455808 -Assert Equal (CToken cUSDC TotalBorrows) 9369602511430 -Assert Equal (CToken cUSDT TotalBorrows) 51344064688134 -Assert Equal (CToken cWBTC TotalBorrows) 134858882039 -Assert Equal (CToken cZRX TotalBorrows) 54734120640511560139309871 - --- Check the market prices - -Assert Equal (PriceOracleProxy Price cBAT) 1057982500000000 -Assert Equal (PriceOracleProxy Price cDAI) 4296489354886929 -Assert Equal (PriceOracleProxy Price cETH) 1000000000000000000 -Assert Equal (PriceOracleProxy Price cREP) 71436527500000010 -Assert Equal (PriceOracleProxy Price cSAI) 5285551943761727 -Assert Equal (PriceOracleProxy Price cUSDC) 4261783149807061700000000000 -Assert Equal (PriceOracleProxy Price cUSDT) 4261783149807061700000000000 -Assert Equal (PriceOracleProxy Price cWBTC) 397626172108253540000000000000 -Assert Equal (PriceOracleProxy Price cZRX) 1464966666666666 - --- Refresh speeds - -Comptroller RefreshCompSpeeds - --- Check the new speeds match utility metric --- Total Utility = --- 816167647101108360363936140 * 1057982500000000 + --- 23521775646627969501566436 * 4296489354886929 + --- 1260824767124865834187 * 1000000000000000000 + --- 5305791273320090270164 * 71436527500000010 + --- 87120566019791136455808 * 5285551943761727 * 0 (cSAI not comped) + --- 9369602511430 * 4261783149807061700000000000 + --- 51344064688134 * 4261783149807061700000000000 + --- 134858882039 * 397626172108253540000000000000 + --- 54734120640511560139309871 * 1464966666666666 --- = 1358747565585977723277660096116431304676770 - --- .25e18 * 816167647101108360363936140 * 1057982500000000 / 1358747565585977723277660096116431304676770 --- = 158876289748264717 -Assert Equal (Comptroller CompSpeed cBAT) 158876289748264702 - --- .25e18 * 23521775646627969501566436 * 4296489354886929 / 1358747565585977723277660096116431304676770 --- = 18594524331344760 -Assert Equal (Comptroller CompSpeed cDAI) 18594524331344758 - --- .25e18 * 1260824767124865834187 * 1000000000000000000 / 1358747565585977723277660096116431304676770 --- = 231982893485648 -Assert Equal (Comptroller CompSpeed cETH) 231982893485648 - --- .25e18 * 5305791273320090270164 * 71436527500000010 / 1358747565585977723277660096116431304676770 --- = 69738359391711 -Assert Equal (Comptroller CompSpeed cREP) 69738359391711 - --- not comped -Assert Equal (Comptroller CompSpeed cSAI) 0 - --- .25e18 * 9369602511430 * 4261783149807061700000000000 / 1358747565585977723277660096116431304676770 --- = 7347062676498972 -Assert Equal (Comptroller CompSpeed cUSDC) 7347062676498971 - --- .25e18 * 51344064688134 * 4261783149807061700000000000 / 1358747565585977723277660096116431304676770 --- = 40260839333339567 -Assert Equal (Comptroller CompSpeed cUSDT) 40260839333339565 - --- .25e18 * 134858882039 * 397626172108253540000000000000 / 1358747565585977723277660096116431304676770 --- = 9866332495845221 -Assert Equal (Comptroller CompSpeed cWBTC) 9866332495845221 - --- .25e18 * 54734120640511560139309871 * 1464966666666666 / 1358747565585977723277660096116431304676770 --- = 14753230161829421 -Assert Equal (Comptroller CompSpeed cZRX) 14753230161829420 - --- Now sanity check that we can continue to use the market as usual - --- First check the USDC Whale, mint - -Assert Equal (Erc20 cUSDC TokenBalance USDCWhale) 0 - -From USDCWhale (Trx GasPrice 0 (Erc20 USDC Approve cUSDC UInt256Max)) -From USDCWhale (Trx GasPrice 0 (CToken cUSDC Mint 10000e6)) - -Assert Equal (Erc20 cUSDC TokenBalance USDCWhale) 47481980579468 -Assert Equal (Erc20 cUSDC TotalSupply) 927050045835492296 - --- Next check the BAT borrower, borrow a little more - -Assert Equal (Erc20 cETH TokenBalance cBATBorrower) 384765976900 -Assert Equal (Erc20 cETH TotalSupply) 4585405574577755 - -Assert Equal (CToken cBAT BorrowBalance cBATBorrower) 37550980777226218529804 -Assert Equal (CToken cBAT TotalBorrows) 816167647101108360363936140 - -Expect Changes (CToken cBAT BorrowBalance cBATBorrower) 6666005042256047300989 -From cBATBorrower (CToken cBAT Borrow 6666000000000000000000) - -Assert Equal (CToken cBAT BorrowBalance cBATBorrower) 44216985819482265830793 -Assert Equal (CToken cBAT TotalBorrows) 818374059192055804747435060 - --- Claim comp to true up their balances - -Comptroller ClaimComp USDCWhale -Comptroller ClaimComp cBATBorrower - --- Now move the clock forward - -AdvanceBlocks 1000000 - --- And check that they receive the right amount of COMP when claimed - --- cUSDC: 47481980579468 / 927050045835492296 * 7347062676498971 * 1e6 = 376304482038247230 -Expect Changes (Erc20 Comp TokenBalance USDCWhale) 0.376305610951693392e18 -Comptroller ClaimComp USDCWhale - --- cETH: 384765976900 / 4585405574577755 * 231982893485648 * 1e6 = 19465917067611490 --- cBAT: 44216985819482265830793 / 818374059192055804747435060 * 158876289748264702 * 1e6 = 8584131635094196000 --- = 0.01946591706761149 + 8.584131635094196000 = 8.603597552161807 -Expect Changes (Erc20 Comp TokenBalance cBATBorrower) 8.603623362954463581e18 -Comptroller ClaimComp cBATBorrower - -Print "COMP distribution patch OK!" diff --git a/spec/sim/0001-comp-distribution-patch/hypothetical_upgrade_post_deploy.scen b/spec/sim/0001-comp-distribution-patch/hypothetical_upgrade_post_deploy.scen deleted file mode 100755 index 2be610004..000000000 --- a/spec/sim/0001-comp-distribution-patch/hypothetical_upgrade_post_deploy.scen +++ /dev/null @@ -1,172 +0,0 @@ -#!/usr/bin/env yarn repl -s - -PrintTransactionLogs -Alias CompHolder "0x19bc62ff7cd9ffd6bdced9802ff718f09f7259f1" -Alias USDCWhale "0x92d7796c04ee34d1d16c57fab92fc2bccf434468" -Alias cBATBorrower "0xe5f3dbcc3dcf75a6946822aae7df5160505d3069" -Web3Fork "https://mainnet-eth.compound.finance/@10348955" (CompHolder USDCWhale cBATBorrower) -UseConfigs mainnet - --- Propose to apply the patch - -From CompHolder (Comp Delegate CompHolder) -From CompHolder (Governor GovernorAlpha Propose "COMP Distribution Patch" [(Address Unitroller) (Address StdComptrollerG4)] [0 0] ["_setPendingImplementation(address)" "_become(address)"] [[(Address StdComptrollerG4)] [(Address Unitroller)]]) - --- Vote for, queue, and execute the proposal - -MineBlock -From CompHolder (Governor GovernorAlpha Proposal LastProposal Vote For) -AdvanceBlocks 20000 -Governor GovernorAlpha Proposal LastProposal Queue -IncreaseTime 604910 -Governor GovernorAlpha Proposal LastProposal Execute - --- Sanity check the upgrade - -Assert Equal (Comptroller CompRate) 0.22e18 -Assert Equal (Comptroller CheckIsComped cBAT) True -Assert Equal (Comptroller CheckIsComped cDAI) True -Assert Equal (Comptroller CheckIsComped cETH) True -Assert Equal (Comptroller CheckIsComped cREP) True -Assert Equal (Comptroller CheckIsComped cSAI) False -Assert Equal (Comptroller CheckIsComped cUSDC) True -Assert Equal (Comptroller CheckIsComped cUSDT) True -Assert Equal (Comptroller CheckisComped cWBTC) True -Assert Equal (Comptroller CheckIsComped cZRX) True - --- Sanity check the speeds - -Assert Equal (Comptroller CompSpeed cBAT) 0.203121569295974918e18 -Assert Equal (Comptroller CompSpeed cDAI) 0.001103447907469680e18 -Assert Equal (Comptroller CompSpeed cETH) 0.000017970643503360e18 -Assert Equal (Comptroller CompSpeed cREP) 0.000127756157903774e18 -Assert Equal (Comptroller CompSpeed cSAI) 0 -Assert Equal (Comptroller CompSpeed cUSDC) 0.000940109498639776e18 -Assert Equal (Comptroller CompSpeed cUSDT) 0.008447487333746899e18 -Assert Equal (Comptroller CompSpeed cWBTC) 0.004841175362144006e18 -Assert Equal (Comptroller CompSpeed cZRX) 0.001400483800617582e18 - --- Check the market borrows - -Assert Equal (CToken cBAT TotalBorrows) 933675278927019769365181653 -Assert Equal (CToken cDAI TotalBorrows) 28288631632222856320436141 -Assert Equal (CToken cETH TotalBorrows) 1489418340783050403890 -Assert Equal (CToken cREP TotalBorrows) 83744752724324161827907 -Assert Equal (CToken cSAI TotalBorrows) 85694017918878755539524 -Assert Equal (CToken cUSDC TotalBorrows) 13559619925496 -Assert Equal (CToken cUSDT TotalBorrows) 34881672655224 -Assert Equal (CToken cWBTC TotalBorrows) 148448436871 -Assert Equal (CToken cZRX TotalBorrows) 17678865043142504899157201 - --- Check the market prices - -Assert Equal (PriceOracleProxy Price cBAT) 1241500000000000 -Assert Equal (PriceOracleProxy Price cDAI) 4429377994656539 -Assert Equal (PriceOracleProxy Price cETH) 1000000000000000000 -Assert Equal (PriceOracleProxy Price cREP) 73035785000000000 -Assert Equal (PriceOracleProxy Price cSAI) 5285551943761727 -Assert Equal (PriceOracleProxy Price cUSDC) 4442302859110025000000000000 -Assert Equal (PriceOracleProxy Price cUSDT) 4442302859110025000000000000 -Assert Equal (PriceOracleProxy Price cWBTC) 401937357611677730000000000000 -Assert Equal (PriceOracleProxy Price cZRX) 1506198333333333 - --- Refresh speeds - -Comptroller RefreshCompSpeeds - --- Check the new speeds match utility metric --- Total Utility = --- 933675278927019769365181653 * 1241500000000000 + --- 28288631632222856320436141 * 4429377994656539 + --- 1489418340783050403890 * 1000000000000000000 + --- 83744752724324161827907 * 73035785000000000 + --- 85694017918878755539524 * 5285551943761727 * 0 (cSAI not comped) + --- 13559619925496 * 4442302859110025000000000000 + --- 34881672655224 * 4442302859110025000000000000 + --- 148448436871 * 401937357611677730000000000000 + --- 17678865043142504899157201 * 1506198333333333 --- = 1593550425385280362248038892811635677856932 - --- .22e18 * 933675278927019769365181653 * 1241500000000000 / 1593550425385280362248038892811635677856932 --- = 160029281076361760 -Assert Equal (Comptroller CompSpeed cBAT) 0.160029281076361778e18 - --- .22e18 * 28288631632222856320436141 * 4429377994656539 / 1593550425385280362248038892811635677856932 --- = 17298623815115230 -Assert Equal (Comptroller CompSpeed cDAI) 0.017298623815115231e18 - --- .22e18 * 1489418340783050403890 * 1000000000000000000 / 1593550425385280362248038892811635677856932 --- = 205623888489784 -Assert Equal (Comptroller CompSpeed cETH) 0.000205623888489784e18 - --- .22e18 * 83744752724324161827907 * 73035785000000000 / 1593550425385280362248038892811635677856932 --- = 844403794590991 -Assert Equal (Comptroller CompSpeed cREP) 0.000844403794590990e18 - --- not comped -Assert Equal (Comptroller CompSpeed cSAI) 0 - --- .22e18 * 13559619925496 * 4442302859110025000000000000 / 1593550425385280362248038892811635677856932 --- = 8315963040053016 -Assert Equal (Comptroller CompSpeed cUSDC) 0.008315963040053015e18 - --- .22e18 * 34881672655224 * 4442302859110025000000000000 / 1593550425385280362248038892811635677856932 --- = 21392539183981588 -Assert Equal (Comptroller CompSpeed cUSDT) 0.021392539183981590e18 - --- .22e18 * 148448436871 * 401937357611677730000000000000 / 1593550425385280362248038892811635677856932 --- = 8237413596422151 -Assert Equal (Comptroller CompSpeed cWBTC) 0.008237413596422151e18 - --- .22e18 * 17678865043142504899157201 * 1506198333333333 / 1593550425385280362248038892811635677856932 --- = 3676151604985456 -Assert Equal (Comptroller CompSpeed cZRX) 0.003676151604985456e18 - --- Now sanity check that we can continue to use the market as usual - --- First check the USDC Whale, mint - -Assert Equal (Erc20 cUSDC TokenBalance USDCWhale) 0 - -From USDCWhale (Trx GasPrice 0 (Erc20 USDC Approve cUSDC UInt256Max)) -From USDCWhale (Trx GasPrice 0 (CToken cUSDC Mint 10000e6)) - -Assert Equal (Erc20 cUSDC TokenBalance USDCWhale) 47481175626857 -Assert Equal (Erc20 cUSDC TotalSupply) 1067945787269646173 - --- Next check the BAT borrower, borrow a little more - -Assert Equal (Erc20 cETH TokenBalance cBATBorrower) 1034370824418 -Assert Equal (Erc20 cETH TotalSupply) 5163948275203265 - -Assert Equal (CToken cBAT BorrowBalance cBATBorrower) 123004206941461188039104 -Assert Equal (CToken cBAT TotalBorrows) 933675278927019769365181653 - -Expect Changes (CToken cBAT BorrowBalance cBATBorrower) 6666016377088188607420 -From cBATBorrower (CToken cBAT Borrow 6666000000000000000000) - -Assert Equal (CToken cBAT BorrowBalance cBATBorrower) 129670223318549376646524 -Assert Equal (CToken cBAT TotalBorrows) 936176444748237020604963003 - --- Claim comp to true up their balances - -Comptroller ClaimComp USDCWhale -Comptroller ClaimComp cBATBorrower - --- Now move the clock forward - -AdvanceBlocks 1000000 - --- And check that they receive the right amount of COMP when claimed - --- cUSDC: 47481175626857 / 1067945787269646173 * 8315963040053015 * 1e6 = 369730098960081900 -Expect Changes (Erc20 Comp TokenBalance USDCWhale) 0.369731208150378785e18 -Comptroller ClaimComp USDCWhale - --- cETH: 1034370824418 / 5163948275203265 * 205623888489784 * 1e6 = 41187738474944500 --- cBAT: 123004206941461188039104 / 933675278927019769365181653 * 160029281076361778 * 1e6 = 21082570408023708000 --- = 0.041187738474944495 + 21.082570408023706 = 21.123758146498652 -Expect Changes (Erc20 Comp TokenBalance cBATBorrower) 22.576722556314661630e18 -Comptroller ClaimComp cBATBorrower - -Print "COMP distribution patch OK!" diff --git a/spec/sim/0001-comp-distribution-patch/hypothetical_upgrade_post_propose.scen b/spec/sim/0001-comp-distribution-patch/hypothetical_upgrade_post_propose.scen deleted file mode 100755 index fe6d33b18..000000000 --- a/spec/sim/0001-comp-distribution-patch/hypothetical_upgrade_post_propose.scen +++ /dev/null @@ -1,169 +0,0 @@ -#!/usr/bin/env yarn repl -s - -PrintTransactionLogs -Alias CompVoter1 "0xf25f26a42adcb153b1966a4bf5df6d0c9e27197f" -Alias CompVoter2 "0xed409c9ff60f3020abf9012bcd45fc294f5608ff" -Alias USDCWhale "0x92d7796c04ee34d1d16c57fab92fc2bccf434468" -Alias cBATBorrower "0xe5f3dbcc3dcf75a6946822aae7df5160505d3069" -Web3Fork "https://mainnet-eth.compound.finance/@10351502" (CompVoter1 CompVoter2 USDCWhale cBATBorrower) -UseConfigs mainnet - --- Vote for, queue, and execute the proposal - -MineBlock -From CompVoter1 (Governor GovernorAlpha Proposal 11 Vote For) -From CompVoter2 (Governor GovernorAlpha Proposal 11 Vote For) -AdvanceBlocks 20000 -Governor GovernorAlpha Proposal 11 Queue -IncreaseTime 604910 -Governor GovernorAlpha Proposal 11 Execute - --- Sanity check the upgrade - -Assert Equal (Comptroller CompRate) 0.22e18 -Assert Equal (Comptroller CheckIsComped cBAT) True -Assert Equal (Comptroller CheckIsComped cDAI) True -Assert Equal (Comptroller CheckIsComped cETH) True -Assert Equal (Comptroller CheckIsComped cREP) True -Assert Equal (Comptroller CheckIsComped cSAI) False -Assert Equal (Comptroller CheckIsComped cUSDC) True -Assert Equal (Comptroller CheckIsComped cUSDT) True -Assert Equal (Comptroller CheckisComped cWBTC) True -Assert Equal (Comptroller CheckIsComped cZRX) True - --- Sanity check the speeds - -Assert Equal (Comptroller CompSpeed cBAT) 0.203121569295974918e18 -Assert Equal (Comptroller CompSpeed cDAI) 0.001103447907469680e18 -Assert Equal (Comptroller CompSpeed cETH) 0.000017970643503360e18 -Assert Equal (Comptroller CompSpeed cREP) 0.000127756157903774e18 -Assert Equal (Comptroller CompSpeed cSAI) 0 -Assert Equal (Comptroller CompSpeed cUSDC) 0.000940109498639776e18 -Assert Equal (Comptroller CompSpeed cUSDT) 0.008447487333746899e18 -Assert Equal (Comptroller CompSpeed cWBTC) 0.004841175362144006e18 -Assert Equal (Comptroller CompSpeed cZRX) 0.001400483800617582e18 - --- Check the market borrows - -Assert Equal (CToken cBAT TotalBorrows) 994790805782510516637146235 -Assert Equal (CToken cDAI TotalBorrows) 28733415458831908292748520 -Assert Equal (CToken cETH TotalBorrows) 1423195009215949475714 -Assert Equal (CToken cREP TotalBorrows) 11741036506536325005938 -Assert Equal (CToken cSAI TotalBorrows) 85702639018129680274971 -Assert Equal (CToken cUSDC TotalBorrows) 13194641271913 -Assert Equal (CToken cUSDT TotalBorrows) 33842222695086 -Assert Equal (CToken cWBTC TotalBorrows) 166281366345 -Assert Equal (CToken cZRX TotalBorrows) 14602818278789368467659480 - --- Check the market prices - -Assert Equal (PriceOracleProxy Price cBAT) 1189627500000000 -Assert Equal (PriceOracleProxy Price cDAI) 4579024512369984 -Assert Equal (PriceOracleProxy Price cETH) 1000000000000000000 -Assert Equal (PriceOracleProxy Price cREP) 71700617500000010 -Assert Equal (PriceOracleProxy Price cSAI) 5285551943761727 -Assert Equal (PriceOracleProxy Price cUSDC) 4554587056912220000000000000 -Assert Equal (PriceOracleProxy Price cUSDT) 4554587056912220000000000000 -Assert Equal (PriceOracleProxy Price cWBTC) 410378476771980800000000000000 -Assert Equal (PriceOracleProxy Price cZRX) 1465310000000000 - --- Refresh speeds - -Comptroller RefreshCompSpeeds - --- Check the new speeds match utility metric --- Total Utility = --- 994790805782510516637146235 * 1189627500000000 + --- 28733415458831908292748520 * 4579024512369984 + --- 1423195009215949475714 * 1000000000000000000 + --- 11741036506536325005938 * 71700617500000010 + --- 85702639018129680274971 * 5285551943761727 * 0 (cSAI not comped) + --- 13194641271913 * 4554587056912220000000000000 + --- 33842222695086 * 4554587056912220000000000000 + --- 166281366345 * 410378476771980800000000000000 + --- 14602818278789368467659480 * 1465310000000000 --- = 1621135988903112202016711619617847258483060 - --- .22e18 * 994790805782510516637146235 * 1189627500000000 / 1621135988903112202016711619617847258483060 --- = 160600166568066720 -Assert Equal (Comptroller CompSpeed cBAT) 0.160600166568066716e18 - --- .22e18 * 28733415458831908292748520 * 4579024512369984 / 1621135988903112202016711619617847258483060 --- = 17855148003843600 -Assert Equal (Comptroller CompSpeed cDAI) 0.017855148003843601e18 - --- .22e18 * 1423195009215949475714 * 1000000000000000000 / 1621135988903112202016711619617847258483060 --- = 193137962620495 -Assert Equal (Comptroller CompSpeed cETH) 0.000193137962620495e18 - --- .22e18 * 11741036506536325005938 * 71700617500000010 / 1621135988903112202016711619617847258483060 --- = 114243780991640 -Assert Equal (Comptroller CompSpeed cREP) 0.000114243780991640e18 - --- not comped -Assert Equal (Comptroller CompSpeed cSAI) 0 - --- .22e18 * 13194641271913 * 4554587056912220000000000000 / 1621135988903112202016711619617847258483060 --- = 8155485665104318 -Assert Equal (Comptroller CompSpeed cUSDC) 0.008155485665104317e18 - --- .22e18 * 33842222695086 * 4554587056912220000000000000 / 1621135988903112202016711619617847258483060 --- = 20917564667146620 -Assert Equal (Comptroller CompSpeed cUSDT) 0.020917564667146617e18 - --- .22e18 * 166281366345 * 410378476771980800000000000000 / 1621135988903112202016711619617847258483060 --- = 9260435118787978 -Assert Equal (Comptroller CompSpeed cWBTC) 0.009260435118787978e18 - --- .22e18 * 14602818278789368467659480 * 1465310000000000 / 1621135988903112202016711619617847258483060 --- = 2903818233438633 -Assert Equal (Comptroller CompSpeed cZRX) 0.002903818233438633e18 - --- Now sanity check that we can continue to use the market as usual - --- First check the USDC Whale, mint - -Assert Equal (Erc20 cUSDC TokenBalance USDCWhale) 0 - -From USDCWhale (Trx GasPrice 0 (Erc20 USDC Approve cUSDC UInt256Max)) -From USDCWhale (Trx GasPrice 0 (CToken cUSDC Mint 10000e6)) - -Assert Equal (Erc20 cUSDC TokenBalance USDCWhale) 47481122314530 -Assert Equal (Erc20 cUSDC TotalSupply) 1080141236963466282 - --- Next check the BAT borrower, borrow a little more - -Assert Equal (Erc20 cETH TokenBalance cBATBorrower) 1034370824418 -Assert Equal (Erc20 cETH TotalSupply) 5134544277187300 - -Assert Equal (CToken cBAT BorrowBalance cBATBorrower) 123048404201235973562497 -Assert Equal (CToken cBAT TotalBorrows) 994790805782510516637146235 - -Expect Changes (CToken cBAT BorrowBalance cBATBorrower) 6666016503078751208324 -From cBATBorrower (CToken cBAT Borrow 6666000000000000000000) - -Assert Equal (CToken cBAT BorrowBalance cBATBorrower) 129714420704314724770821 -Assert Equal (CToken cBAT TotalBorrows) 997475461661266096431316572 - --- Claim comp to true up their balances - -Comptroller ClaimComp USDCWhale -Comptroller ClaimComp cBATBorrower - --- Now move the clock forward - -AdvanceBlocks 1000000 - --- And check that they receive the right amount of COMP when claimed - --- cUSDC: 47481122314530 / 1080141236963466282 * 8155485665104318 * 1e6 = 358500906314635600 -Expect Changes (Erc20 Comp TokenBalance USDCWhale) 0.358501981817354439e18 -Comptroller ClaimComp USDCWhale - --- cETH: 1034370824418 / 5134544277187300 * 193137962620495 * 1e6 = 38908277509608240 --- cBAT: 129714420704314724770821 / 997475461661266096431316572 * 160600166568066720 * 1e6 = 20884882257351856000 --- = 0.358500906314635600 + 20.884882257351856000 = 21.24338316366649 -Expect Changes (Erc20 Comp TokenBalance cBATBorrower) 21.282364219697601761e18 -Comptroller ClaimComp cBATBorrower - -Print "COMP distribution patch OK!" diff --git a/spec/sim/0001-comp-distribution-patch/kovan/execute.scen b/spec/sim/0001-comp-distribution-patch/kovan/execute.scen deleted file mode 100755 index b1e213489..000000000 --- a/spec/sim/0001-comp-distribution-patch/kovan/execute.scen +++ /dev/null @@ -1,8 +0,0 @@ -#!/usr/bin/env yarn repl -n kovan -s - -PrintTransactionLogs - --- Execute the proposal -Governor GovernorAlpha Proposal 8 Execute - -Print "Executed OK!" \ No newline at end of file diff --git a/spec/sim/0001-comp-distribution-patch/kovan/queue.scen b/spec/sim/0001-comp-distribution-patch/kovan/queue.scen deleted file mode 100755 index 8adb34035..000000000 --- a/spec/sim/0001-comp-distribution-patch/kovan/queue.scen +++ /dev/null @@ -1,8 +0,0 @@ -#!/usr/bin/env yarn repl -n queue -s - -PrintTransactionLogs - --- Queue the proposal -Governor GovernorAlpha Proposal 8 Queue - -Print "Queued OK!" \ No newline at end of file diff --git a/spec/sim/0001-comp-distribution-patch/ropsten/execute.scen b/spec/sim/0001-comp-distribution-patch/ropsten/execute.scen deleted file mode 100755 index b1ff668d6..000000000 --- a/spec/sim/0001-comp-distribution-patch/ropsten/execute.scen +++ /dev/null @@ -1,8 +0,0 @@ -#!/usr/bin/env yarn repl -n ropsten -s - -PrintTransactionLogs - --- Execute the proposal -Governor GovernorAlpha Proposal 9 Execute - -Print "Executed OK!" \ No newline at end of file diff --git a/spec/sim/0001-comp-distribution-patch/ropsten/queue.scen b/spec/sim/0001-comp-distribution-patch/ropsten/queue.scen deleted file mode 100755 index c6f856db5..000000000 --- a/spec/sim/0001-comp-distribution-patch/ropsten/queue.scen +++ /dev/null @@ -1,8 +0,0 @@ -#!/usr/bin/env yarn repl -n ropsten -s - -PrintTransactionLogs - --- Queue the proposal -Governor GovernorAlpha Proposal 9 Queue - -Print "Queued OK!" \ No newline at end of file diff --git a/spec/sim/0002-dai-irm-v3/hypothetical_upgrade.scen b/spec/sim/0002-dai-irm-v3/hypothetical_upgrade.scen deleted file mode 100755 index df4d45825..000000000 --- a/spec/sim/0002-dai-irm-v3/hypothetical_upgrade.scen +++ /dev/null @@ -1,52 +0,0 @@ -#!/usr/bin/env yarn repl -s - -PrintTransactionLogs - --- verify at https://changelog.makerdao.com/releases/mainnet/1.0.8/contracts.json -Alias PotAddress "0x197E90f9FAD81970bA7976f33CbD77088E5D7cf7" -Alias JugAddress "0x19c0976f590D67707E62397C87829d896Dc0f1F1" -Alias CompHolder "0x19bc62ff7cd9ffd6bdced9802ff718f09f7259f1" -Web3Fork "https://mainnet-eth.compound.finance/@10473211" (CompHolder) -UseConfigs mainnet - --- Deploy IRM contract -InterestRateModel Deploy DAIInterestRateModel UpdateableDaiInterestRateModel (Exp 1.09) (Exp 0.8) PotAddress JugAddress (Address Timelock) - --- Propose to apply the patch -From CompHolder (Comp Delegate CompHolder) -From CompHolder (Governor GovernorAlpha Propose "DAI IRM v3" [(Address cDAI)] [0] ["_setInterestRateModel(address)"] [[(InterestRateModel UpdateableDaiInterestRateModel Address)]]) - --- Vote for, queue, and execute the proposal -MineBlock -From CompHolder (Governor GovernorAlpha Proposal LastProposal Vote For) -AdvanceBlocks 20000 -Governor GovernorAlpha Proposal LastProposal Queue -IncreaseTime 604910 -Governor GovernorAlpha Proposal LastProposal Execute - --- Check model -Assert Equal (CToken cDAI InterestRateModel) (InterestRateModel UpdateableDaiInterestRateModel Address) - --- Propose to apply the update -From CompHolder (Governor GovernorAlpha Propose "DAI IRM v3 update" [(Address UpdateableDaiInterestRateModel)] [0] ["updateJumpRateModel(uint256,uint256,uint256,uint256)"] [[0 (Exp 0.4) (Exp 1.1) (Exp 0.7)]]) - --- Vote for, queue, and execute the proposal to update -MineBlock -From CompHolder (Governor GovernorAlpha Proposal LastProposal Vote For) -AdvanceBlocks 20000 -Governor GovernorAlpha Proposal LastProposal Queue -IncreaseTime 604910 - --- NOTE: checking the interest rate before the update currently returns 0, needs to be investigated! -Assert Equal (InterestRateModel UpdateableDaiInterestRateModel BorrowRate 1 10 1) (Zero) - -Governor GovernorAlpha Proposal LastProposal Execute - -Assert Equal (InterestRateModel UpdateableDaiInterestRateModel BorrowRate 1 10 1) (0.7299999999953279) - --- TODO: --- * additional tests that new cDAI interest rate matches expectations --- * no one else can propose rate update --- * get a non-zero initial interest rate! - -Print "Looking good!" diff --git a/spec/sim/0003-borrow-caps-patch/deploy.scen b/spec/sim/0003-borrow-caps-patch/deploy.scen deleted file mode 100755 index c9d62969f..000000000 --- a/spec/sim/0003-borrow-caps-patch/deploy.scen +++ /dev/null @@ -1,8 +0,0 @@ -#!/usr/bin/env yarn repl -n mainnet -s - -PrintTransactionLogs - --- Deploy the flywheel impl -ComptrollerImpl Deploy Standard StdComptrollerG5 - -Print "Deployed OK!" diff --git a/spec/sim/0003-borrow-caps-patch/hypothetical_upgrade.scen b/spec/sim/0003-borrow-caps-patch/hypothetical_upgrade.scen deleted file mode 100755 index 4d11a281a..000000000 --- a/spec/sim/0003-borrow-caps-patch/hypothetical_upgrade.scen +++ /dev/null @@ -1,48 +0,0 @@ -#!/usr/bin/env yarn repl -s - -PrintTransactionLogs -Alias CompHolder "0x19bc62ff7cd9ffd6bdced9802ff718f09f7259f1" -Alias USDCWhale "0x3dfd23a6c5e8bbcfc9581d2e864a68feb6a076d3" -Alias Arr00 "0x2b384212edc04ae8bb41738d05ba20e33277bf33" -Web3Fork "https://mainnet-eth.compound.finance/@10706095" (CompHolder USDCWhale) -UseConfigs mainnet - --- Deploy the flywheel impl - -ComptrollerImpl Deploy Standard ComptrollerG5 - --- Propose to apply the patch - -From CompHolder (Comp Delegate CompHolder) -From CompHolder (Governor GovernorAlpha Propose "Borrow Cap Comptroller Patch" [(Address Unitroller) (Address ComptrollerG5) (Address Unitroller) (Address cSAI) (Address SAI)] [0 0 0 0 0] ["_setPendingImplementation(address)" "_become(address)" "_setBorrowCapGuardian(address)" "_reduceReserves(uint256)" "transfer(address,uint256)"] [[(Address ComptrollerG5)] [(Address Unitroller)] [(Address CompHolder)] [2360000000000000000000] [(Address Arr00) 2360000000000000000000]]) - --- Vote for, queue, and execute the proposal - -MineBlock -From CompHolder (Governor GovernorAlpha Proposal LastProposal Vote For) -AdvanceBlocks 20000 -Governor GovernorAlpha Proposal LastProposal Queue -IncreaseTime 604910 -Governor GovernorAlpha Proposal LastProposal Execute -ComptrollerImpl ComptrollerG5 MergeABI - -Assert Equal (Address (Unitroller Implementation)) (Address ComptrollerG5) -Assert Equal (Erc20 SAI TokenBalance (Address Arr00)) (2360000000000000000000) - -From USDCWhale (Trx GasPrice 0 (Erc20 USDC Approve cUSDC UInt256Max)) -From USDCWhale (Trx GasPrice 0 (CToken cUSDC Mint 214000000e6)) -From USDCWhale (Trx GasPrice 0 (CToken cUSDC Borrow 1000000e6)) - -From CompHolder (Comptroller SetMarketBorrowCaps (cUSDC) (83000000e6)) - -AllowFailures -From USDCWhale (Trx GasPrice 0 (CToken cUSDC Borrow 1000000e6)) -Assert Revert - -Successfully -From USDCWhale (Trx GasPrice 0 (CToken cUSDC RepayBorrow 1000000e6)) -From USDCWhale (Trx GasPrice 0 (CToken cUSDC Borrow 10e6)) - - - -Print "Borrow Cap Comptroller Patch OK!" \ No newline at end of file diff --git a/spec/sim/0003-borrow-caps-patch/hypothetical_upgrade_post_deploy.scen b/spec/sim/0003-borrow-caps-patch/hypothetical_upgrade_post_deploy.scen deleted file mode 100755 index 679ec0261..000000000 --- a/spec/sim/0003-borrow-caps-patch/hypothetical_upgrade_post_deploy.scen +++ /dev/null @@ -1,46 +0,0 @@ -#!/usr/bin/env yarn repl -s - -PrintTransactionLogs -Alias CompHolder "0x19bc62ff7cd9ffd6bdced9802ff718f09f7259f1" -Alias USDCWhale "0x3dfd23a6c5e8bbcfc9581d2e864a68feb6a076d3" -Alias Arr00 "0x2b384212edc04ae8bb41738d05ba20e33277bf33" -Web3Fork "https://mainnet-eth.compound.finance/@10809638" (CompHolder USDCWhale) -UseConfigs mainnet - - --- Propose to apply the patch - -From CompHolder (Comp Delegate CompHolder) -From CompHolder (Governor GovernorAlpha Propose "Borrow Limit Comptroller Patch" [(Address Unitroller) (Address StdComptrollerG5) (Address Unitroller) (Address cSAI) (Address SAI)] [0 0 0 0 0] ["_setPendingImplementation(address)" "_become(address)" "_setBorrowCapGuardian(address)" "_reduceReserves(uint256)" "transfer(address,uint256)"] [[(Address StdComptrollerG5)] [(Address Unitroller)] [(Address CompHolder)] [2360000000000000000000] [(Address Arr00) 2360000000000000000000]]) - --- Vote for, queue, and execute the proposal - -MineBlock -From CompHolder (Governor GovernorAlpha Proposal LastProposal Vote For) -AdvanceBlocks 20000 -Governor GovernorAlpha Proposal LastProposal Queue -IncreaseTime 604910 -Governor GovernorAlpha Proposal LastProposal Execute -ComptrollerImpl StdComptrollerG5 MergeABI - -Assert Equal (Address (Unitroller Implementation)) (Address StdComptrollerG5) -Assert Equal (Erc20 SAI TokenBalance (Address Arr00)) (2360000000000000000000) - -From USDCWhale (Trx GasPrice 0 (Erc20 USDC Approve cUSDC UInt256Max)) -From USDCWhale (Trx GasPrice 0 (CToken cUSDC Mint 100000000e6)) -From USDCWhale (Trx GasPrice 0 (CToken cUSDC Borrow 1000000e6)) - --- Market borrows were just under 81M at this block -From CompHolder (Comptroller SetMarketBorrowCaps (cUSDC) (68000000e6)) - -AllowFailures -From USDCWhale (Trx GasPrice 0 (CToken cUSDC Borrow 1000000e6)) -Assert Revert - -Successfully -From USDCWhale (Trx GasPrice 0 (CToken cUSDC RepayBorrow 1000000e6)) -From USDCWhale (Trx GasPrice 0 (CToken cUSDC Borrow 10e6)) - - - -Print "Borrow Limit Comptroller Patch OK!" \ No newline at end of file diff --git a/spec/sim/0003-borrow-caps-patch/hypothetical_upgrade_post_propose.scen b/spec/sim/0003-borrow-caps-patch/hypothetical_upgrade_post_propose.scen deleted file mode 100755 index 5d777dfaa..000000000 --- a/spec/sim/0003-borrow-caps-patch/hypothetical_upgrade_post_propose.scen +++ /dev/null @@ -1,32 +0,0 @@ -#!/usr/bin/env yarn repl -s - -PrintTransactionLogs -Alias CompVoter1 "0x9aa835bc7b8ce13b9b0c9764a52fbf71ac62ccf1" -Alias CompVoter2 "0xed409c9ff60f3020abf9012bcd45fc294f5608ff" -Alias USDCWhale "0x3dfd23a6c5e8bbcfc9581d2e864a68feb6a076d3" -Alias Arr00 "0x2b384212edc04ae8bb41738d05ba20e33277bf33" -Web3Fork "https://mainnet-eth.compound.finance/@10823813" (USDCWhale CompVoter1 CompVoter2) -UseConfigs mainnet - - - --- Vote for, queue, and execute the proposal - -MineBlock -From CompVoter1 (Governor GovernorAlpha Proposal LastProposal Vote For) -From CompVoter2 (Governor GovernorAlpha Proposal LastProposal Vote For) -AdvanceBlocks 20000 -Governor GovernorAlpha Proposal LastProposal Queue -IncreaseTime 604910 -Governor GovernorAlpha Proposal LastProposal Execute -ComptrollerImpl StdComptrollerG5 MergeABI - -Assert Equal (Address (Unitroller Implementation)) (Address StdComptrollerG5) -Assert Equal (Erc20 SAI TokenBalance (Address Arr00)) (2800000000000000000000) - -From USDCWhale (Trx GasPrice 0 (Erc20 USDC Approve cUSDC UInt256Max)) -From USDCWhale (Trx GasPrice 0 (CToken cUSDC Mint 100000000e6)) -From USDCWhale (Trx GasPrice 0 (CToken cUSDC Borrow 1000000e6)) - - -Print "Borrow Limit Comptroller Patch OK!" \ No newline at end of file diff --git a/spec/sim/0004-cusdc-irm-update/hypothetical_upgrade.scen b/spec/sim/0004-cusdc-irm-update/hypothetical_upgrade.scen deleted file mode 100755 index bc0a53e5d..000000000 --- a/spec/sim/0004-cusdc-irm-update/hypothetical_upgrade.scen +++ /dev/null @@ -1,30 +0,0 @@ -#!/usr/bin/env yarn repl -s - -PrintTransactionLogs -Alias CompHolder "0x19bc62ff7cd9ffd6bdced9802ff718f09f7259f1" -Web3Fork "https://mainnet-eth.compound.finance/@10796407" (CompHolder) -UseConfigs mainnet - --- Deploy new interest rate model -InterestRateModel Deploy LegacyJumpRateModelV2 MyInterestRateModel 0 0.04 1.09 0.8 (Address Timelock) - --- Propose to apply the patch - -From CompHolder (Comp Delegate CompHolder) -From CompHolder (Governor GovernorAlpha Propose "Update cUSDC interest rate model" [(Address cUSDC)] [0] ["_setInterestRateModel(address)"] [[(Address MyInterestRateModel)]]) - --- Vote for, queue, and execute the proposal - -MineBlock -From CompHolder (Governor GovernorAlpha Proposal LastProposal Vote For) -AdvanceBlocks 20000 -Governor GovernorAlpha Proposal LastProposal Queue -IncreaseTime 604910 -Governor GovernorAlpha Proposal LastProposal Execute - - -Assert Equal (Address (CToken cUSDC InterestRateModel)) (Address MyInterestRateModel) -CToken cUSDC AccrueInterest - - -Print "cUSDC interest rate model upgrade ok" \ No newline at end of file diff --git a/spec/sim/0005-grants/deploy.scen b/spec/sim/0005-grants/deploy.scen deleted file mode 100755 index fec91042d..000000000 --- a/spec/sim/0005-grants/deploy.scen +++ /dev/null @@ -1,8 +0,0 @@ -#!/usr/bin/env yarn repl -n mainnet -s - -PrintTransactionLogs - --- Deploy the flywheel impl -ComptrollerImpl Deploy Standard StdComptrollerG6 - -Print "Deployed OK!" diff --git a/spec/sim/0005-grants/hypothetical_upgrade.scen b/spec/sim/0005-grants/hypothetical_upgrade.scen deleted file mode 100755 index 3c028a39b..000000000 --- a/spec/sim/0005-grants/hypothetical_upgrade.scen +++ /dev/null @@ -1,98 +0,0 @@ -#!/usr/bin/env yarn repl -s - --- This script tests a hypothetical upgrade with one time and streaming grants - -PrintTransactionLogs -Alias CompHolder "0x19bc62ff7cd9ffd6bdced9802ff718f09f7259f1" -Alias USDCWhale "0x3dfd23a6c5e8bbcfc9581d2e864a68feb6a076d3" -Alias Tarun "0x6626593c237f530d15ae9980a95ef938ac15c35c" -Web3Fork "https://mainnet-eth.compound.finance/@10706095" (CompHolder USDCWhale Tarun) -UseConfigs mainnet - --- Deploy the flywheel impl - -ComptrollerImpl Deploy Standard ComptrollerG6 - --- Propose to apply the patch - -Assert Equal (Erc20 COMP TokenBalance (Address Tarun)) (0) - -From CompHolder (Comp Delegate CompHolder) -From CompHolder (Governor GovernorAlpha Propose "Grants Comptroller Patch and both types of grants issued" [(Address Unitroller) (Address ComptrollerG6) (Address Unitroller) (Address Unitroller)] [0 0 0 0] ["_setPendingImplementation(address)" "_become(address)" "_grantComp(address,uint256)" "_setContributorCompSpeed(address,uint256)"] [[(Address ComptrollerG6)] [(Address Unitroller)] [(Address Tarun) 10000000] [(Address Tarun) 15]]) - --- Vote for, queue, and execute the proposal - -MineBlock -From CompHolder (Governor GovernorAlpha Proposal LastProposal Vote For) -AdvanceBlocks 20000 -Governor GovernorAlpha Proposal LastProposal Queue -IncreaseTime 604910 -Governor GovernorAlpha Proposal LastProposal Execute -ComptrollerImpl ComptrollerG6 MergeABI - --- Check initial grant amount was apportioned -Assert Equal (Address (Unitroller Implementation)) (Address ComptrollerG6) -Assert Equal (Erc20 COMP TokenBalance (Address Tarun)) (10e6) - --- Check contributor claim does not work without update -AdvanceBlocks 997 -From Tarun (Comptroller ClaimComp Tarun) -Assert Equal (Erc20 COMP TokenBalance (Address Tarun)) (10e6) - --- Check contributor claim amount is added -From Tarun (Comptroller UpdateContributorRewards Tarun) -From Tarun (Comptroller ClaimComp Tarun) -Assert Equal (Erc20 COMP TokenBalance (Address Tarun)) (10015000) - - --- Prepare second proposal -From CompHolder (Governor GovernorAlpha Propose "Contributor speed reduction and second grant" [(Address Unitroller) (Address ComptrollerG6) (Address Unitroller) (Address Unitroller)] [0 0 0 0] ["_setPendingImplementation(address)" "_become(address)" "_grantComp(address,uint256)" "_setContributorCompSpeed(address,uint256)"] [[(Address ComptrollerG6)] [(Address Unitroller)] [(Address Tarun) 20000000] [(Address Tarun) 5]]) - --- Vote for, queue, and execute the second proposal - -MineBlock -From CompHolder (Governor GovernorAlpha Proposal LastProposal Vote For) -AdvanceBlocks 20000 -Governor GovernorAlpha Proposal LastProposal Queue -IncreaseTime 604910 -Governor GovernorAlpha Proposal LastProposal Execute - -AdvanceBlocks 1000 - --- Check contributor claim amount is added -From Tarun (Comptroller UpdateContributorRewards Tarun) -From Tarun (Comptroller ClaimComp Tarun) - --- Initial value 10015000 = 10000000 grant + (997+3)*15 --- Second grant 20000000 --- Second proposal mining 300000 = 20000*15 --- Extra blocks 5000 = 1000*5 --- Extra proposal mining 130 --- Total = 30330130 -Assert Equal (Erc20 COMP TokenBalance (Address Tarun)) (30320130) - --- Prepare final proposal -From CompHolder (Governor GovernorAlpha Propose "Contributor speed elimination Patch" [(Address Unitroller)] [0] ["_setContributorCompSpeed(address,uint256)"] [[(Address Tarun) 0]]) - --- Vote for, queue, and execute the final proposal - -MineBlock -From CompHolder (Governor GovernorAlpha Proposal LastProposal Vote For) -AdvanceBlocks 20000 -Governor GovernorAlpha Proposal LastProposal Queue -IncreaseTime 604910 -Governor GovernorAlpha Proposal LastProposal Execute - -AdvanceBlocks 10000 - --- Check no more COMP was allocated -From Tarun (Comptroller UpdateContributorRewards Tarun) -From Tarun (Comptroller ClaimComp Tarun) --- Initial value 30320130 --- Third proposal mining 100000 = 20000*5 --- Extra blocks 0 = 1000*0 --- Extra proposal mining 40 --- Total = 30420170 -Assert Equal (Erc20 COMP TokenBalance (Address Tarun)) (30420170) - -Print "Upgrade OK!" diff --git a/spec/sim/0005-grants/hypothetical_upgrade_multiple_speed.scen b/spec/sim/0005-grants/hypothetical_upgrade_multiple_speed.scen deleted file mode 100755 index 92fa506d4..000000000 --- a/spec/sim/0005-grants/hypothetical_upgrade_multiple_speed.scen +++ /dev/null @@ -1,86 +0,0 @@ -#!/usr/bin/env yarn repl -s - --- This script tests a hypothetical upgrade with multiple speeds and has been subsumed in hypothetical_upgrade.scen --- It is left here as a faster test for development - -PrintTransactionLogs -Alias CompHolder "0x19bc62ff7cd9ffd6bdced9802ff718f09f7259f1" -Alias USDCWhale "0x3dfd23a6c5e8bbcfc9581d2e864a68feb6a076d3" -Alias Tarun "0x6626593c237f530d15ae9980a95ef938ac15c35c" -Web3Fork "https://mainnet-eth.compound.finance/@10706095" (CompHolder USDCWhale Tarun) -UseConfigs mainnet - --- Deploy the flywheel impl - -ComptrollerImpl Deploy Standard ComptrollerG6 - --- Propose to apply the patch - -Assert Equal (Erc20 COMP TokenBalance (Address Tarun)) (0) - -From CompHolder (Comp Delegate CompHolder) -From CompHolder (Governor GovernorAlpha Propose "Grants Comptroller Patch" [(Address Unitroller) (Address ComptrollerG6) (Address Unitroller)] [0 0 0] ["_setPendingImplementation(address)" "_become(address)" "_setContributorCompSpeed(address,uint256)"] [[(Address ComptrollerG6)] [(Address Unitroller)] [(Address Tarun) 15]]) - --- Vote for, queue, and execute the proposal - -MineBlock -From CompHolder (Governor GovernorAlpha Proposal LastProposal Vote For) -AdvanceBlocks 20000 -Governor GovernorAlpha Proposal LastProposal Queue -IncreaseTime 604910 -Governor GovernorAlpha Proposal LastProposal Execute -ComptrollerImpl ComptrollerG6 MergeABI - --- Round out blocks to 1000 before next patch -AdvanceBlocks 997 - --- Prepare second proposal -From CompHolder (Governor GovernorAlpha Propose "Contributor speed reduction Patch" [(Address Unitroller)] [0] ["_setContributorCompSpeed(address,uint256)"] [[(Address Tarun) 5]]) - --- Vote for, queue, and execute the second proposal - -MineBlock -From CompHolder (Governor GovernorAlpha Proposal LastProposal Vote For) -AdvanceBlocks 20000 -Governor GovernorAlpha Proposal LastProposal Queue -IncreaseTime 604910 -Governor GovernorAlpha Proposal LastProposal Execute - -AdvanceBlocks 1000 - --- Check contributor claim amount is added -From Tarun (Comptroller UpdateContributorRewards Tarun) -From Tarun (Comptroller ClaimComp Tarun) - --- Initial run 15000 = (997+3)*15 --- Second proposal mining 300000 = 20000*15 --- Extra blocks 5000 = 1000*5 --- Extra proposal mining 85 --- Total = 330080 -Assert Equal (Erc20 COMP TokenBalance (Address Tarun)) (320085) - --- Prepare final proposal -From CompHolder (Governor GovernorAlpha Propose "Contributor speed elimination Patch" [(Address Unitroller)] [0] ["_setContributorCompSpeed(address,uint256)"] [[(Address Tarun) 0]]) - --- Vote for, queue, and execute the final proposal - -MineBlock -From CompHolder (Governor GovernorAlpha Proposal LastProposal Vote For) -AdvanceBlocks 20000 -Governor GovernorAlpha Proposal LastProposal Queue -IncreaseTime 604910 -Governor GovernorAlpha Proposal LastProposal Execute - -AdvanceBlocks 10000 - --- Check no more COMP was allocated -From Tarun (Comptroller UpdateContributorRewards Tarun) -From Tarun (Comptroller ClaimComp Tarun) --- Initial value 320085 --- Third proposal mining 100000 = 20000*5 --- Extra blocks 0 = 1000*0 --- Extra proposal mining 40 --- Total = 420125 -Assert Equal (Erc20 COMP TokenBalance (Address Tarun)) (420125) - -Print "Upgrade OK!" diff --git a/spec/sim/0005-grants/hypothetical_upgrade_post_propose.scen b/spec/sim/0005-grants/hypothetical_upgrade_post_propose.scen deleted file mode 100755 index 0c7fb2e81..000000000 --- a/spec/sim/0005-grants/hypothetical_upgrade_post_propose.scen +++ /dev/null @@ -1,31 +0,0 @@ -#!/usr/bin/env yarn repl -s - --- This script tests a hypothetical upgrade with one time and streaming grants - -PrintTransactionLogs -Alias CompHolder "0x19bc62ff7cd9ffd6bdced9802ff718f09f7259f1" -Alias CompVoter1 "0x9aa835bc7b8ce13b9b0c9764a52fbf71ac62ccf1" -Alias CompVoter2 "0xed409c9ff60f3020abf9012bcd45fc294f5608ff" -Alias USDCWhale "0x3dfd23a6c5e8bbcfc9581d2e864a68feb6a076d3" -Alias Tarun "0x6626593c237f530d15ae9980a95ef938ac15c35c" -Web3Fork "https://mainnet-eth.compound.finance/@11395519" (CompHolder USDCWhale Tarun CompVoter1 CompVoter2) -UseConfigs mainnet - -Assert Equal (Erc20 COMP TokenBalance (Address Tarun)) (2e18) - --- Vote for, queue, and execute the proposal - -MineBlock -From CompVoter1 (Governor GovernorAlpha Proposal LastProposal Vote For) -From CompVoter2 (Governor GovernorAlpha Proposal LastProposal Vote For) -From CompHolder (Governor GovernorAlpha Proposal LastProposal Vote For) -AdvanceBlocks 20000 -Governor GovernorAlpha Proposal LastProposal Queue -IncreaseTime 604910 -Governor GovernorAlpha Proposal LastProposal Execute -ComptrollerImpl ComptrollerG6 MergeABI - --- Check grant amount was apportioned -Assert Equal (Erc20 COMP TokenBalance (Address Tarun)) (1002e18) - -Print "Upgrade OK!" diff --git a/spec/sim/0006-setspeed-manual-claims/deploy.scen b/spec/sim/0006-setspeed-manual-claims/deploy.scen deleted file mode 100755 index 46518d956..000000000 --- a/spec/sim/0006-setspeed-manual-claims/deploy.scen +++ /dev/null @@ -1,8 +0,0 @@ -#!/usr/bin/env yarn repl -n mainnet -s - -PrintTransactionLogs - --- Deploy the flywheel impl -ComptrollerImpl Deploy Standard StdComptrollerG7 - -Print "Deployed OK!" diff --git a/spec/sim/0006-setspeed-manual-claims/hypothetical_upgrade.scen b/spec/sim/0006-setspeed-manual-claims/hypothetical_upgrade.scen deleted file mode 100755 index 780ccee14..000000000 --- a/spec/sim/0006-setspeed-manual-claims/hypothetical_upgrade.scen +++ /dev/null @@ -1,102 +0,0 @@ -#!/usr/bin/env yarn repl -s - --- This script tests a hypothetical upgrade with manual COMP claims and manual COMP speed setting - -PrintTransactionLogs -Alias CompHolder "0xC89b6f0146642688bb254bF93C28fcCF1E182C81" -Alias USDCWhale "0x3dfd23a6c5e8bbcfc9581d2e864a68feb6a076d3" -Alias DAIWhale "0x47ac0Fb4F2D84898e4D9E7b4DaB3C24507a6D503" -Web3Fork "https://mainnet-eth.compound.finance/@11458477" (CompHolder USDCWhale DAIWhale) -UseConfigs mainnet - --- Deploy the flywheel impl -ComptrollerImpl Deploy Standard ComptrollerG7 - --- Baseline USDC comp speed before the patch -Assert Equal (Comptroller CompSpeed cUSDC) 5.3786477206671197e16 - --- Mint tokens -From DAIWhale (Trx GasPrice 0 (Erc20 DAI Approve cDAI UInt256Max)) -From DAIWhale (Trx GasPrice 0 (CToken cDAI Mint 10000e6)) -From USDCWhale (Trx GasPrice 0 (Erc20 USDC Approve cUSDC UInt256Max)) -From USDCWhale (Trx GasPrice 0 (CToken cUSDC Mint 10000e6)) - --- Baseline COMP claim speed -Assert Equal (Comptroller CheckIsComped cDAI) True - -Comptroller ClaimComp DAIWhale -AdvanceBlocks 1000 -Expect Changes (Erc20 Comp TokenBalance DAIWhale) 7.77e2 -Comptroller ClaimComp DAIWhale - --- Propose to apply the patch - -From CompHolder (Comp Delegate CompHolder) -From CompHolder (Governor GovernorAlpha Propose "Disable automatic comp speed refresh and automatic claims and change comp speed" [(Address Unitroller) (Address ComptrollerG7) (Address Unitroller)] [0 0 0] ["_setPendingImplementation(address)" "_become(address)" "_setCompSpeed(address,uint256)"] [[(Address ComptrollerG7)] [(Address Unitroller)] [(Address cUSDC) 30000000000000000]]) - --- Vote for, queue, and execute the proposal - -MineBlock -From CompHolder (Governor GovernorAlpha Proposal LastProposal Vote For) -AdvanceBlocks 20000 -Governor GovernorAlpha Proposal LastProposal Queue -IncreaseTime 604910 -Governor GovernorAlpha Proposal LastProposal Execute -ComptrollerImpl ComptrollerG7 MergeABI - --- Check that speed has changed -Assert Equal (Comptroller CompSpeed cUSDC) 3.0e16 - --- Check that COMP is still accruing at the same speed -Comptroller ClaimComp DAIWhale -AdvanceBlocks 1000 -Expect Changes (Erc20 Comp TokenBalance DAIWhale) 7.77e2 -Comptroller ClaimComp DAIWhale - --- Check that minting some USDC wont result in any automatic claims -AdvanceBlocks 1000000 -From USDCWhale (Trx GasPrice 0 (Erc20 USDC Approve cUSDC UInt256Max)) -Expect Changes (Erc20 Comp TokenBalance USDCWhale) 0 -From USDCWhale (Trx GasPrice 0 (CToken cUSDC Mint 10000e6)) - --- Prepare second proposal -From CompHolder (Governor GovernorAlpha Propose "Remove USDC market by setting comp speed to 0" [(Address Unitroller)] [0] ["_setCompSpeed(address,uint256)"] [[(Address cUSDC) 0]]) - --- Vote for, queue, and execute the second proposal - -MineBlock -From CompHolder (Governor GovernorAlpha Proposal LastProposal Vote For) -AdvanceBlocks 20000 -Governor GovernorAlpha Proposal LastProposal Queue -IncreaseTime 604910 -Governor GovernorAlpha Proposal LastProposal Execute - -AdvanceBlocks 1000 - --- Check speed is now 0 -Assert Equal (Comptroller CompSpeed cUSDC) 0 - --- True up balances -Comptroller ClaimComp USDCWhale - --- Check no more comp accrued -AdvanceBlocks 1000000 -Expect Changes (Erc20 Comp TokenBalance USDCWhale) 0 -Comptroller ClaimComp USDCWhale - --- Prepare final proposal -From CompHolder (Governor GovernorAlpha Propose "Reset USDC comp speed" [(Address Unitroller)] [0] ["_setCompSpeed(address,uint256)"] [[(Address cUSDC) 27000000000000000]]) - --- Vote for, queue, and execute the final proposal - -MineBlock -From CompHolder (Governor GovernorAlpha Proposal LastProposal Vote For) -AdvanceBlocks 20000 -Governor GovernorAlpha Proposal LastProposal Queue -IncreaseTime 604910 -Governor GovernorAlpha Proposal LastProposal Execute - --- Check new speed -Assert Equal (Comptroller CompSpeed cUSDC) 2.7e16 - -Print "Upgrade OK!" diff --git a/spec/sim/0006-setspeed-manual-claims/hypothetical_upgrade_borrower.scen b/spec/sim/0006-setspeed-manual-claims/hypothetical_upgrade_borrower.scen deleted file mode 100755 index 3dfa682b6..000000000 --- a/spec/sim/0006-setspeed-manual-claims/hypothetical_upgrade_borrower.scen +++ /dev/null @@ -1,53 +0,0 @@ -#!/usr/bin/env yarn repl -s - --- This script tests a hypothetical upgrade with manual COMP claims and manual COMP speed setting - -PrintTransactionLogs -Alias CompHolder "0xC89b6f0146642688bb254bF93C28fcCF1E182C81" -Alias USDCWhale "0x3dfd23a6c5e8bbcfc9581d2e864a68feb6a076d3" -Alias DAIWhale "0x47ac0Fb4F2D84898e4D9E7b4DaB3C24507a6D503" -Alias BigBorrower "0x847956f7f7ff49714fb2d70a0d0cd44a6376990f" -Web3Fork "https://mainnet-eth.compound.finance/@11458477" (CompHolder USDCWhale DAIWhale) -UseConfigs mainnet - --- Deploy the flywheel impl -ComptrollerImpl Deploy Standard ComptrollerG7 - --- Baseline USDC comp speed before the patch -Assert Equal (Comptroller CompSpeed cUSDC) 5.3786477206671197e16 - --- Mint tokens -From DAIWhale (Trx GasPrice 0 (Erc20 DAI Approve cDAI UInt256Max)) -From DAIWhale (Trx GasPrice 0 (CToken cDAI Mint 10000e6)) -From USDCWhale (Trx GasPrice 0 (Erc20 USDC Approve cUSDC UInt256Max)) -From USDCWhale (Trx GasPrice 0 (CToken cUSDC Mint 10000e6)) - --- Baseline COMP claim speed -Assert Equal (Comptroller CheckIsComped cDAI) True - -Comptroller ClaimComp BigBorrower -AdvanceBlocks 1000 -Expect Changes (Erc20 Comp TokenBalance BigBorrower) 2.893496802261224189e18 -Comptroller ClaimComp BigBorrower - --- Propose to apply the patch - -From CompHolder (Comp Delegate CompHolder) -From CompHolder (Governor GovernorAlpha Propose "Disable automatic comp speed refresh and automatic claims and change comp speed" [(Address Unitroller) (Address ComptrollerG7) (Address Unitroller)] [0 0 0] ["_setPendingImplementation(address)" "_become(address)" "_setCompSpeed(address,uint256)"] [[(Address ComptrollerG7)] [(Address Unitroller)] [(Address cUSDC) 30000000000000000]]) - --- Vote for, queue, and execute the proposal - -MineBlock -From CompHolder (Governor GovernorAlpha Proposal LastProposal Vote For) -AdvanceBlocks 20000 -Governor GovernorAlpha Proposal LastProposal Queue -IncreaseTime 604910 -Governor GovernorAlpha Proposal LastProposal Execute -ComptrollerImpl ComptrollerG7 MergeABI - -Comptroller ClaimComp BigBorrower -AdvanceBlocks 1000 -Expect Changes (Erc20 Comp TokenBalance BigBorrower) 2.893496802261224189e18 -Comptroller ClaimComp BigBorrower - -Print "Upgrade OK!" diff --git a/spec/sim/0006-setspeed-manual-claims/hypothetical_upgrade_post_deploy.scen b/spec/sim/0006-setspeed-manual-claims/hypothetical_upgrade_post_deploy.scen deleted file mode 100755 index f63b7a7a8..000000000 --- a/spec/sim/0006-setspeed-manual-claims/hypothetical_upgrade_post_deploy.scen +++ /dev/null @@ -1,95 +0,0 @@ -#!/usr/bin/env yarn repl -s - --- This script tests a hypothetical upgrade with manual COMP claims and manual COMP speed setting - -PrintTransactionLogs -Alias CompHolder "0xC89b6f0146642688bb254bF93C28fcCF1E182C81" -Alias USDCWhale "0x3dfd23a6c5e8bbcfc9581d2e864a68feb6a076d3" -Alias DAIWhale "0x47ac0Fb4F2D84898e4D9E7b4DaB3C24507a6D503" -Alias NewComptroller "0xbe7616B06f71e363A310Aa8CE8aD99654401ead7" -Web3Fork "https://mainnet-eth.compound.finance/@11499182" (CompHolder USDCWhale DAIWhale) -UseConfigs mainnet - --- Mint tokens -From DAIWhale (Trx GasPrice 0 (Erc20 DAI Approve cDAI UInt256Max)) -From DAIWhale (Trx GasPrice 0 (CToken cDAI Mint 10000e6)) -From USDCWhale (Trx GasPrice 0 (Erc20 USDC Approve cUSDC UInt256Max)) -From USDCWhale (Trx GasPrice 0 (CToken cUSDC Mint 10000e6)) - --- Baseline COMP claim speed -Assert Equal (Comptroller CheckIsComped cDAI) True - -Comptroller ClaimComp DAIWhale -AdvanceBlocks 1000 -Comptroller ClaimComp DAIWhale - --- Propose to apply the patch - -From CompHolder (Comp Delegate CompHolder) -From CompHolder (Governor GovernorAlpha Propose "Disable automatic comp speed refresh and automatic claims and change comp speed" [(Address Unitroller) (Address NewComptroller) (Address Unitroller)] [0 0 0] ["_setPendingImplementation(address)" "_become(address)" "_setCompSpeed(address,uint256)"] [[(Address NewComptroller)] [(Address Unitroller)] [(Address cUSDC) 30000000000000000]]) - --- Vote for, queue, and execute the proposal - -MineBlock -From CompHolder (Governor GovernorAlpha Proposal LastProposal Vote For) -AdvanceBlocks 20000 -Governor GovernorAlpha Proposal LastProposal Queue -IncreaseTime 604910 -Governor GovernorAlpha Proposal LastProposal Execute -ComptrollerImpl ComptrollerG7 MergeABI - --- Check that speed has changed -Assert Equal (Comptroller CompSpeed cUSDC) 3.0e16 - --- Check that COMP is still accruing at the same speed -Comptroller ClaimComp DAIWhale -AdvanceBlocks 1000 -Comptroller ClaimComp DAIWhale - --- Check that minting some USDC wont result in any automatic claims -AdvanceBlocks 1000000 -From USDCWhale (Trx GasPrice 0 (Erc20 USDC Approve cUSDC UInt256Max)) -Expect Changes (Erc20 Comp TokenBalance USDCWhale) 0 -From USDCWhale (Trx GasPrice 0 (CToken cUSDC Mint 10000e6)) - --- Prepare second proposal -From CompHolder (Governor GovernorAlpha Propose "Remove USDC market by setting comp speed to 0" [(Address Unitroller)] [0] ["_setCompSpeed(address,uint256)"] [[(Address cUSDC) 0]]) - --- Vote for, queue, and execute the second proposal - -MineBlock -From CompHolder (Governor GovernorAlpha Proposal LastProposal Vote For) -AdvanceBlocks 20000 -Governor GovernorAlpha Proposal LastProposal Queue -IncreaseTime 604910 -Governor GovernorAlpha Proposal LastProposal Execute - -AdvanceBlocks 1000 - --- Check speed is now 0 -Assert Equal (Comptroller CompSpeed cUSDC) 0 - --- True up balances -Comptroller ClaimComp USDCWhale - --- Check no more comp accrued -AdvanceBlocks 1000000 -Expect Changes (Erc20 Comp TokenBalance USDCWhale) 0 -Comptroller ClaimComp USDCWhale - --- Prepare final proposal -From CompHolder (Governor GovernorAlpha Propose "Reset USDC comp speed" [(Address Unitroller)] [0] ["_setCompSpeed(address,uint256)"] [[(Address cUSDC) 27000000000000000]]) - --- Vote for, queue, and execute the final proposal - -MineBlock -From CompHolder (Governor GovernorAlpha Proposal LastProposal Vote For) -AdvanceBlocks 20000 -Governor GovernorAlpha Proposal LastProposal Queue -IncreaseTime 604910 -Governor GovernorAlpha Proposal LastProposal Execute - --- Check new speed -Assert Equal (Comptroller CompSpeed cUSDC) 2.7e16 - -Print "Upgrade OK!" diff --git a/spec/sim/0006-setspeed-manual-claims/hypothetical_upgrade_post_propose.scen b/spec/sim/0006-setspeed-manual-claims/hypothetical_upgrade_post_propose.scen deleted file mode 100755 index 49b33c92a..000000000 --- a/spec/sim/0006-setspeed-manual-claims/hypothetical_upgrade_post_propose.scen +++ /dev/null @@ -1,86 +0,0 @@ -#!/usr/bin/env yarn repl -s - --- This script tests a hypothetical upgrade with manual COMP claims and manual COMP speed setting - -PrintTransactionLogs -Alias CompHolder1 "0xC89b6f0146642688bb254bF93C28fcCF1E182C81" -Alias CompHolder2 "0xed409c9ff60f3020abf9012bcd45fc294f5608ff" -Alias CompHolder3 "0x6626593c237f530d15ae9980a95ef938ac15c35c" -Alias USDCWhale "0x3dfd23a6c5e8bbcfc9581d2e864a68feb6a076d3" -Alias DAIWhale "0x47ac0Fb4F2D84898e4D9E7b4DaB3C24507a6D503" -Alias NewComptroller "0xbe7616B06f71e363A310Aa8CE8aD99654401ead7" -Web3Fork "https://mainnet-eth.compound.finance/@11499432" (CompHolder1 CompHolder2 CompHolder3 USDCWhale DAIWhale) -UseConfigs mainnet - --- Baseline the speed -Assert Equal (Comptroller CompSpeed cUSDC) 6.5604507401004006e16 - -MineBlock -From CompHolder1 (Governor GovernorAlpha Proposal LastProposal Vote For) -From CompHolder2 (Governor GovernorAlpha Proposal LastProposal Vote For) -From CompHolder3 (Governor GovernorAlpha Proposal LastProposal Vote For) -AdvanceBlocks 20000 -Governor GovernorAlpha Proposal LastProposal Queue -IncreaseTime 604910 -Governor GovernorAlpha Proposal LastProposal Execute -ComptrollerImpl ComptrollerG7 MergeABI - --- Check that speed has not changed -Assert Equal (Comptroller CompSpeed cUSDC) 6.5604507401004006e16 - --- Check that COMP is still accruing at the same speed -Comptroller ClaimComp DAIWhale -AdvanceBlocks 1000 -Comptroller ClaimComp DAIWhale - --- Check that minting some USDC wont result in any automatic claims -AdvanceBlocks 1000000 -From USDCWhale (Trx GasPrice 0 (Erc20 USDC Approve cUSDC UInt256Max)) -Expect Changes (Erc20 Comp TokenBalance USDCWhale) 0 -From USDCWhale (Trx GasPrice 0 (CToken cUSDC Mint 10000e6)) - --- Prepare second proposal -From CompHolder3 (Governor GovernorAlpha Propose "Remove USDC market by setting comp speed to 0" [(Address Unitroller)] [0] ["_setCompSpeed(address,uint256)"] [[(Address cUSDC) 0]]) - --- Vote for, queue, and execute the second proposal - -MineBlock -From CompHolder1 (Governor GovernorAlpha Proposal LastProposal Vote For) -From CompHolder2 (Governor GovernorAlpha Proposal LastProposal Vote For) -From CompHolder3 (Governor GovernorAlpha Proposal LastProposal Vote For) -AdvanceBlocks 20000 -Governor GovernorAlpha Proposal LastProposal Queue -IncreaseTime 604910 -Governor GovernorAlpha Proposal LastProposal Execute - -AdvanceBlocks 1000 - --- Check speed is now 0 -Assert Equal (Comptroller CompSpeed cUSDC) 0 - --- True up balances -Comptroller ClaimComp USDCWhale - --- Check no more comp accrued -AdvanceBlocks 1000000 -Expect Changes (Erc20 Comp TokenBalance USDCWhale) 0 -Comptroller ClaimComp USDCWhale - --- Prepare final proposal -From CompHolder3 (Governor GovernorAlpha Propose "Reset USDC comp speed" [(Address Unitroller)] [0] ["_setCompSpeed(address,uint256)"] [[(Address cUSDC) 27000000000000000]]) - --- Vote for, queue, and execute the final proposal - -MineBlock -From CompHolder1 (Governor GovernorAlpha Proposal LastProposal Vote For) -From CompHolder2 (Governor GovernorAlpha Proposal LastProposal Vote For) -From CompHolder3 (Governor GovernorAlpha Proposal LastProposal Vote For) -AdvanceBlocks 20000 -Governor GovernorAlpha Proposal LastProposal Queue -IncreaseTime 604910 -Governor GovernorAlpha Proposal LastProposal Execute - --- Check new speed -Assert Equal (Comptroller CompSpeed cUSDC) 2.7e16 - -Print "Upgrade OK!" diff --git a/spec/sim/0007-cdai-impl-migration/hypothetical_migration.scen b/spec/sim/0007-cdai-impl-migration/hypothetical_migration.scen deleted file mode 100755 index 9b5f9e9c1..000000000 --- a/spec/sim/0007-cdai-impl-migration/hypothetical_migration.scen +++ /dev/null @@ -1,44 +0,0 @@ -#!/usr/bin/env yarn repl -s - -PrintTransactionLogs -Alias CompHolder "0xC89b6f0146642688bb254bF93C28fcCF1E182C81" -Alias DaiHolder "0xf977814e90da44bfa03b6295a0616a897441acec" -Alias CUSDCHolder "0x5e34bc93a7506ecc8562ade4d5c8b090247a6349" -Alias CUsdtImplementation "0x976aa93ca5aaa569109f4267589c619a097f001d" -Alias CUsdtIRM "0xFB564da37B41b2F6B6EDcc3e56FbF523bD9F2012" -Web3Fork "https://mainnet-eth.compound.finance/@11447815" (CompHolder DaiHolder CUSDCHolder) -UseConfigs mainnet - - --- Delegate and propose update -From CompHolder (Comp Delegate CompHolder) -From CompHolder (Governor GovernorAlpha Propose "Update cDai implementation" [(Address cDai) (Address cDai)] [0 0] ["_setImplementation(address,bool,bytes)" "_setInterestRateModel(address)"] [[(address CUsdtImplementation) true "0x"] [(address CUsdtIRM)]]) - --- Fast forward, vote, queue, execute -MineBlock -From CompHolder (Governor GovernorAlpha Proposal LastProposal Vote For) -AdvanceBlocks 20000 -Governor GovernorAlpha Proposal LastProposal Queue -IncreaseTime 604910 -Governor GovernorAlpha Proposal LastProposal Execute - --- Assert Dai retrieved from DSR -Assert Equal (Erc20 Dai TokenBalance cDai) (284058478303890709049107567) - --- IRM changed correctly -Assert Equal (CToken cDai InterestRateModel) (Address CUsdtIRM) - --- Ensure accrue interest works -CToken cDai AccrueInterest - --- Mint Test -From DaiHolder (Erc20 Dai Approve (Address cDai) 10000000) -From DaiHolder (CToken cDai Mint 10000000) -Assert Equal (Erc20 Dai TokenBalance cDai) (284058478303890709059107567) - --- Borrow Test -From CUSDCHolder (CToken cDai Borrow 10000000) -Assert Equal (Erc20 Dai TokenBalance CUSDCHolder) (4235678125976069) -Assert Equal (Erc20 Dai TokenBalance cDai) (284058478303890709049107567) - -Print "cDai implementation migration ok" \ No newline at end of file diff --git a/spec/sim/0007-cdai-impl-migration/hypothetical_migration_post_propose.scen b/spec/sim/0007-cdai-impl-migration/hypothetical_migration_post_propose.scen deleted file mode 100755 index 242534611..000000000 --- a/spec/sim/0007-cdai-impl-migration/hypothetical_migration_post_propose.scen +++ /dev/null @@ -1,47 +0,0 @@ -#!/usr/bin/env yarn repl -s - -PrintTransactionLogs -Alias CompHolder "0xed409c9ff60f3020abf9012bcd45fc294f5608ff" -Alias CompHolder2 "0x6626593c237f530d15ae9980a95ef938ac15c35c" -Alias DaiHolder "0xf977814e90da44bfa03b6295a0616a897441acec" -Alias CUSDCHolder "0x5e34bc93a7506ecc8562ade4d5c8b090247a6349" -Alias CUsdtImplementation "0x976aa93ca5aaa569109f4267589c619a097f001d" -Alias CUsdtIRM "0xFB564da37B41b2F6B6EDcc3e56FbF523bD9F2012" -Web3Fork "https://mainnet-eth.compound.finance/@11499832" (CompHolder CompHolder2 DaiHolder CUSDCHolder) -UseConfigs mainnet - - - - --- Fast forward, vote, queue, execute -MineBlock -From CompHolder (Governor GovernorAlpha Proposal LastProposal Vote For) -From CompHolder2 (Governor GovernorAlpha Proposal LastProposal Vote For) -AdvanceBlocks 20000 -Governor GovernorAlpha Proposal LastProposal Queue -IncreaseTime 604910 -Governor GovernorAlpha Proposal LastProposal Execute - --- Assert Dai retrieved from DSR -Assert Equal (Erc20 Dai TokenBalance cDai) (247764889541500427246579984) - --- Assert Impl Changed Correctly -Assert Equal (CToken cDai Implementation) (Address CUsdtImplementation) - --- IRM changed correctly -Assert Equal (CToken cDai InterestRateModel) (Address CUsdtIRM) - --- Ensure accrue interest works -CToken cDai AccrueInterest - --- Mint Test -From DaiHolder (Erc20 Dai Approve (Address cDai) 10000000) -From DaiHolder (CToken cDai Mint 10000000) -Assert Equal (Erc20 Dai TokenBalance cDai) (247764889541500427256579984) - --- Borrow Test -From CUSDCHolder (CToken cDai Borrow 10000000) -Assert Equal (Erc20 Dai TokenBalance CUSDCHolder) (4235678125976069) -Assert Equal (Erc20 Dai TokenBalance cDai) (247764889541500427246579984) - -Print "cDai implementation migration ok" \ No newline at end of file diff --git a/spec/sim/0008-sweep-token/hypothetical_migration.scen b/spec/sim/0008-sweep-token/hypothetical_migration.scen deleted file mode 100755 index bfb35dac3..000000000 --- a/spec/sim/0008-sweep-token/hypothetical_migration.scen +++ /dev/null @@ -1,42 +0,0 @@ -#!/usr/bin/env yarn repl -s - -PrintTransactionLogs -Alias CompHolder "0xC89b6f0146642688bb254bF93C28fcCF1E182C81" -Alias cUNISender "0xf22c2e3475e4a066f4e9f44567c950dd36112d05" -Alias UniHolder "0x5518C31f4A22782E5a7046711FACF985985530c7" -Alias CUSDCHolder "0x926e78b8DF67e129011750Dd7b975f8E50D3d7Ad" -Web3Fork "https://mainnet-eth.compound.finance/@11746553" (CompHolder CUSDCHolder UniHolder) -UseConfigs mainnet - - --- Delegate and propose update -CTokenDelegate Deploy CErc20Delegate newCUNIImpl - -From CompHolder (Comp Delegate CompHolder) -From CompHolder (Governor GovernorAlpha Propose "Update cUNI implementation" [(Address cUNI) (Address cUNI) (Address cUNI)] [0 0 0] ["_setImplementation(address,bool,bytes)" "sweepToken(address)" "transfer(address,uint256)"] [[(address newCUNIImpl) false "0x"] [(address cUNI)] [(address cUNISender) 1]]) - --- Fast forward, vote, queue, execute -MineBlock -From CompHolder (Governor GovernorAlpha Proposal LastProposal Vote For) -AdvanceBlocks 20000 -Governor GovernorAlpha Proposal LastProposal Queue -IncreaseTime 604910 -Governor GovernorAlpha Proposal LastProposal Execute - -Assert Equal (Erc20 (Address cUNI) TokenBalance cUNISender) (1) -Assert Equal (Erc20 (Address cUNI) TokenBalance Timelock) (179874258721489) - --- Ensure accrue interest works -CToken cUNI AccrueInterest - --- Mint Test -Assert Equal (Erc20 Uni TokenBalance cUNI) (8841949597201167092831625) -From UniHolder (Erc20 Uni Approve cUNI 10000000) -From UniHolder (CToken cUNI Mint 10000000) -Assert Equal (Erc20 Uni TokenBalance cUNI) (8841949597201167102831625) - --- Borrow Test -From CUSDCHolder (CToken cUNI Borrow 10000000) -Assert Equal (Erc20 Uni TokenBalance CUSDCHolder) (10000000) - -Print "cUNI implementation migration ok" diff --git a/spec/sim/0008-sweep-token/hypothetical_migration_post_deploy.scen b/spec/sim/0008-sweep-token/hypothetical_migration_post_deploy.scen deleted file mode 100755 index 3d2619074..000000000 --- a/spec/sim/0008-sweep-token/hypothetical_migration_post_deploy.scen +++ /dev/null @@ -1,42 +0,0 @@ -#!/usr/bin/env yarn repl -s - -PrintTransactionLogs -Alias CompHolder "0xC89b6f0146642688bb254bF93C28fcCF1E182C81" -Alias cUNISender "0xf22c2e3475e4a066f4e9f44567c950dd36112d05" -Alias UniHolder "0x5518C31f4A22782E5a7046711FACF985985530c7" -Alias CUSDCHolder "0x926e78b8DF67e129011750Dd7b975f8E50D3d7Ad" -Alias NewcUNIImplementation "0xa1849880593E96d2f7dF77D0D38a7f2372aE10E0" -Web3Fork "https://mainnet-eth.compound.finance/@11805759" (CompHolder CUSDCHolder UniHolder) -UseConfigs mainnet - - - -From CompHolder (Comp Delegate CompHolder) -From CompHolder (Governor GovernorAlpha Propose "Update cUNI implementation" [(Address cUNI) (Address cUNI) (Address cUNI)] [0 0 0] ["_setImplementation(address,bool,bytes)" "sweepToken(address)" "transfer(address,uint256)"] [[(address NewcUNIImplementation) false "0x"] [(address cUNI)] [(address cUNISender) 1]]) - --- Fast forward, vote, queue, execute -MineBlock -From CompHolder (Governor GovernorAlpha Proposal LastProposal Vote For) -AdvanceBlocks 20000 -Governor GovernorAlpha Proposal LastProposal Queue -IncreaseTime 604910 -Governor GovernorAlpha Proposal LastProposal Execute - -Assert Equal (Erc20 (Address cUNI) TokenBalance cUNISender) (1) -Assert Equal (Erc20 (Address cUNI) TokenBalance Timelock) (179874258721489) - --- Ensure accrue interest works -MineBlock -CToken cUNI AccrueInterest - --- Mint Test -Assert Equal (Erc20 Uni TokenBalance cUNI) (9213234645306032140780326) -From UniHolder (Erc20 Uni Approve cUNI 10000000) -From UniHolder (CToken cUNI Mint 10000000) -Assert Equal (Erc20 Uni TokenBalance cUNI) (9213234645306032150780326) - --- Borrow Test -From CUSDCHolder (CToken cUNI Borrow 10000000) -Assert Equal (Erc20 Uni TokenBalance CUSDCHolder) (10000000) - -Print "cUNI implementation migration ok" diff --git a/spec/sim/0008-sweep-token/hypothetical_migration_post_propose.scen b/spec/sim/0008-sweep-token/hypothetical_migration_post_propose.scen deleted file mode 100755 index 7a20b0d9d..000000000 --- a/spec/sim/0008-sweep-token/hypothetical_migration_post_propose.scen +++ /dev/null @@ -1,48 +0,0 @@ -#!/usr/bin/env yarn repl -s - -PrintTransactionLogs -Alias CompVoter1 "0x6626593C237f530D15aE9980A95ef938Ac15c35c" -Alias CompVoter2 "0xA1b61405791170833070C0eA61eD28728A840241" -Alias CompVoter3 "0xAC5720d6EE2d7872b88914C9c5Fa9BF38e72FaF6" -Alias CompVoter4 "0x8169522c2C57883E8EF80C498aAB7820dA539806" -Alias Arr00 "0x2B384212EDc04Ae8bB41738D05BA20E33277bf33" -Alias NewcUNIImplementation "0xa1849880593E96d2f7dF77D0D38a7f2372aE10E0" -Alias UniHolder "0x5518C31f4A22782E5a7046711FACF985985530c7" -Alias CUSDCHolder "0x926e78b8DF67e129011750Dd7b975f8E50D3d7Ad" -Alias cUNISender "0xf22c2e3475e4a066f4e9f44567c950dd36112d05" -Web3Fork "https://mainnet-eth.compound.finance/@11820163" (CompVoter1 CompVoter2 CompVoter3 CompVoter4 UniHolder CUSDCHolder) -UseConfigs mainnet - - --- Vote for, queue, and execute the proposal -MineBlock -From CompVoter1 (Governor GovernorAlpha Proposal LastProposal Vote For) -From CompVoter2 (Governor GovernorAlpha Proposal LastProposal Vote For) -From CompVoter3 (Governor GovernorAlpha Proposal LastProposal Vote For) -From CompVoter4 (Governor GovernorAlpha Proposal LastProposal Vote For) -AdvanceBlocks 20000 -Governor GovernorAlpha Proposal LastProposal Queue -IncreaseTime 604910 -Governor GovernorAlpha Proposal LastProposal Execute - --- Check expected values -Assert Equal (CToken cUNI Implementation) (Address NewcUNIImplementation) -Assert Equal (Erc20 (Address cUNI) TokenBalance (Address Timelock)) (17987425872149) -Assert Equal (Erc20 (Address cUNI) TokenBalance cUNISender) (161886832849341) -Assert Equal (Erc20 (Address COMP) TokenBalance (Address Arr00)) (30040000000000000000) - --- Ensure accrue interest works -MineBlock -CToken cUNI AccrueInterest - --- Mint Test -Assert Equal (Erc20 Uni TokenBalance cUNI) (8974517540659969962306996) -From UniHolder (Erc20 Uni Approve cUNI 10000000) -From UniHolder (CToken cUNI Mint 10000000) -Assert Equal (Erc20 Uni TokenBalance cUNI) (8974517540659969972306996) - --- Borrow Test -From CUSDCHolder (CToken cUNI Borrow 10000000) -Assert Equal (Erc20 Uni TokenBalance CUSDCHolder) (10000000) - -Print "cUNI implementation migration ok" \ No newline at end of file diff --git a/spec/sim/0009-gov-bravo/hypothetical_upgrade.scen b/spec/sim/0009-gov-bravo/hypothetical_upgrade.scen deleted file mode 100755 index ca4a3d5d8..000000000 --- a/spec/sim/0009-gov-bravo/hypothetical_upgrade.scen +++ /dev/null @@ -1,43 +0,0 @@ -#!/usr/bin/env yarn repl -s - -PrintTransactionLogs - -Alias Arr00 "0x2B384212EDc04Ae8bB41738D05BA20E33277bf33" -Alias CompHolder "0xC89b6f0146642688bb254bF93C28fcCF1E182C81" - -Web3Fork "https://mainnet-eth.compound.finance/@11635311" (CompHolder) -UseConfigs mainnet - -GovernorBravo Deploy BravoDelegate BravoDelegate2 -GovernorBravo Deploy BravoDelegator BravoDelegator2 (Address Timelock) (Address Comp) (Address Timelock) (Address BravoDelegate2) 17280 1 100000e18 - -From CompHolder (Comp Delegate CompHolder) -From CompHolder (Governor GovernorAlpha Propose "Governor Bravo" [(Address Timelock) (Address BravoDelegator2)] [0 0] ["setPendingAdmin(address)" "_initiate(address)"] [[(Address BravoDelegator2)] [(Address GovernorAlpha)]]) - --- Vote for, queue, and execute the proposal -MineBlock -From CompHolder (Governor GovernorAlpha Proposal LastProposal Vote For) -AdvanceBlocks 20000 -Governor GovernorAlpha Proposal LastProposal Queue -IncreaseTime 604910 -Governor GovernorAlpha Proposal LastProposal Execute -GovernorBravo BravoDelegator2 MergeABI BravoDelegate2 - -From CompHolder (GovernorBravo BravoDelegator2 Propose "Grant Comp" [(Address Comptroller)] [0] ["_grantComp(address,uint256)"] [[(Address Arr00) 2]]) - --- Vote for, queue, and execute the proposal -MineBlock -From CompHolder (GovernorBravo BravoDelegator2 Proposal LastProposal Vote For) -AdvanceBlocks 20000 -GovernorBravo BravoDelegator2 Proposal LastProposal Queue -IncreaseTime 604910 -GovernorBravo BravoDelegator2 Proposal LastProposal Execute - -Assert Equal (50000000000000002) (Erc20 Comp TokenBalance (Address Arr00)) - --- Continuous proposal id count -Assert Equal (GovernorBravo BravoDelegator2 Proposal LastProposal Id) 37 - - -Print "Migration to GovernorBravo Ok!" - diff --git a/spec/sim/0009-gov-bravo/hypothetical_upgrade_post_deploy.scen b/spec/sim/0009-gov-bravo/hypothetical_upgrade_post_deploy.scen deleted file mode 100755 index d6d0596e4..000000000 --- a/spec/sim/0009-gov-bravo/hypothetical_upgrade_post_deploy.scen +++ /dev/null @@ -1,42 +0,0 @@ -#!/usr/bin/env yarn repl -s - -PrintTransactionLogs - -Alias Arr00 "0x2B384212EDc04Ae8bB41738D05BA20E33277bf33" -Alias CompHolder "0xC89b6f0146642688bb254bF93C28fcCF1E182C81" - -Web3Fork "https://mainnet-eth.compound.finance/@12006351" (CompHolder) -UseConfigs mainnet - -From CompHolder (Comp Delegate CompHolder) -From CompHolder (Governor GovernorAlpha Propose "Governor Bravo" [(Address Comptroller) (Address Timelock) (Address GovernorBravo)] [0 0 0] ["_grantComp(address,uint256)" "setPendingAdmin(address)" "_initiate(address)"] [[(Address Arr00) 2] [(Address GovernorBravo)] [(Address GovernorAlpha)]]) - --- Vote for, queue, and execute the proposal -MineBlock -From CompHolder (Governor GovernorAlpha Proposal LastProposal Vote For) -AdvanceBlocks 20000 -Governor GovernorAlpha Proposal LastProposal Queue -IncreaseTime 604910 -Governor GovernorAlpha Proposal LastProposal Execute - -Assert Equal (2) (Erc20 Comp TokenBalance (Address Arr00)) -Assert Equal (Timelock Admin) (Address GovernorBravo) - -From CompHolder (GovernorBravo GovernorBravo Propose "Grant Comp" [(Address Comptroller)] [0] ["_grantComp(address,uint256)"] [[(Address Arr00) 2]]) - --- Vote for, queue, and execute the proposal -MineBlock -From CompHolder (GovernorBravo GovernorBravo Proposal LastProposal Vote For) -AdvanceBlocks 20000 -GovernorBravo GovernorBravo Proposal LastProposal Queue -IncreaseTime 604910 -GovernorBravo GovernorBravo Proposal LastProposal Execute - -Assert Equal (4) (Erc20 Comp TokenBalance (Address Arr00)) - --- Continuous proposal id count -Assert Equal (GovernorBravo GovernorBravo Proposal LastProposal Id) 41 - - -Print "Migration to GovernorBravo Ok!" - diff --git a/spec/sim/0009-gov-bravo/hypothetical_upgrade_post_propose.scen b/spec/sim/0009-gov-bravo/hypothetical_upgrade_post_propose.scen deleted file mode 100755 index 9f3d42717..000000000 --- a/spec/sim/0009-gov-bravo/hypothetical_upgrade_post_propose.scen +++ /dev/null @@ -1,48 +0,0 @@ -#!/usr/bin/env yarn repl -s - -PrintTransactionLogs -Alias CompVoter1 "0x6626593C237f530D15aE9980A95ef938Ac15c35c" -Alias CompVoter2 "0xA1b61405791170833070C0eA61eD28728A840241" -Alias CompVoter3 "0xAC5720d6EE2d7872b88914C9c5Fa9BF38e72FaF6" -Alias CompVoter4 "0x8169522c2C57883E8EF80C498aAB7820dA539806" - -Alias Arr00 "0x2b384212edc04ae8bb41738d05ba20e33277bf33" -Web3Fork "https://mainnet-eth.compound.finance/@12109064" (CompVoter1 CompVoter2 CompVoter3 CompVoter4) -UseConfigs mainnet - - - --- Vote for, queue, and execute the proposal - -MineBlock -From CompVoter1 (Governor GovernorAlpha Proposal LastProposal Vote For) -From CompVoter2 (Governor GovernorAlpha Proposal LastProposal Vote For) -From CompVoter3 (Governor GovernorAlpha Proposal LastProposal Vote For) -AdvanceBlocks 20000 -Governor GovernorAlpha Proposal LastProposal Queue -IncreaseTime 604910 -Governor GovernorAlpha Proposal LastProposal Execute - -Assert Equal (Erc20 COMP TokenBalance (Address Arr00)) (160000000000000000000) -Assert Equal (Timelock Admin) (Address GovernorBravo) - -From CompVoter1 (GovernorBravo GovernorBravo Propose "Grant Comp" [(Address Comptroller)] [0] ["_grantComp(address,uint256)"] [[(Address Arr00) 2]]) - --- Vote for, queue, and execute the proposal -MineBlock -From CompVoter1 (GovernorBravo GovernorBravo Proposal LastProposal Vote For) -From CompVoter2 (GovernorBravo GovernorBravo Proposal LastProposal Vote For) -From CompVoter3 (GovernorBravo GovernorBravo Proposal LastProposal Vote For) -From CompVoter4 (GovernorBravo GovernorBravo Proposal LastProposal Vote For) -AdvanceBlocks 20000 -GovernorBravo GovernorBravo Proposal LastProposal Queue -IncreaseTime 604910 -GovernorBravo GovernorBravo Proposal LastProposal Execute - -Assert Equal (160000000000000000002) (Erc20 Comp TokenBalance (Address Arr00)) - --- Continuous proposal id count -Assert Equal (GovernorBravo GovernorBravo Proposal LastProposal Id) 43 - - -Print "Migration to GovernorBravo Ok!" \ No newline at end of file diff --git a/spec/sim/0009-gov-bravo/kovan/hypothetical_upgrade_kovan.scen b/spec/sim/0009-gov-bravo/kovan/hypothetical_upgrade_kovan.scen deleted file mode 100755 index a690a8756..000000000 --- a/spec/sim/0009-gov-bravo/kovan/hypothetical_upgrade_kovan.scen +++ /dev/null @@ -1,41 +0,0 @@ -#!/usr/bin/env yarn repl -s - -PrintTransactionLogs - -Alias Arr00 "0x2B384212EDc04Ae8bB41738D05BA20E33277bf33" - -Web3Fork "https://kovan-eth.compound.finance/@23053022" (Arr00) -UseConfigs kovan - -GovernorBravo Deploy BravoDelegate BravoDelegate2 -GovernorBravo Deploy BravoDelegator BravoDelegator2 (Address Timelock) (Address Comp) (Address Timelock) (Address BravoDelegate2) 17280 1 100000e18 - -From Arr00 (Governor GovernorAlpha Propose "Governor Bravo" [(Address Timelock) (Address BravoDelegator2)] [0 0] ["setPendingAdmin(address)" "_initiate(address)"] [[(Address BravoDelegator2)] [(Address GovernorAlpha)]]) - --- Vote for, queue, and execute the proposal -MineBlock -From Arr00 (Governor GovernorAlpha Proposal LastProposal Vote For) -AdvanceBlocks 20000 -Governor GovernorAlpha Proposal LastProposal Queue -IncreaseTime 604910 -Governor GovernorAlpha Proposal LastProposal Execute -GovernorBravo BravoDelegator2 MergeABI BravoDelegate2 - -From Arr00 (GovernorBravo BravoDelegator2 Propose "Grant Comp" [("0x5eAe89DC1C671724A672ff0630122ee834098657")] [0] ["_grantComp(address,uint256)"] [[(Address Arr00) 2]]) - --- Vote for, queue, and execute the proposal -MineBlock -From Arr00 (GovernorBravo BravoDelegator2 Proposal LastProposal Vote For) -AdvanceBlocks 20000 -GovernorBravo BravoDelegator2 Proposal LastProposal Queue -IncreaseTime 604910 -GovernorBravo BravoDelegator2 Proposal LastProposal Execute - -Assert Equal (2) (Erc20 Comp TokenBalance (Address Arr00)) - --- Continuous proposal id count -Assert Equal (GovernorBravo BravoDelegator2 Proposal LastProposal Id) 52 - - -Print "Migration to GovernorBravo on kovan Ok!" - diff --git a/spec/sim/0010-liq-incentive/hypothetical-ctoken-upgrade.scen b/spec/sim/0010-liq-incentive/hypothetical-ctoken-upgrade.scen deleted file mode 100755 index d28e70c9e..000000000 --- a/spec/sim/0010-liq-incentive/hypothetical-ctoken-upgrade.scen +++ /dev/null @@ -1,39 +0,0 @@ -#!/usr/bin/env yarn repl -s - -Alias CompHolder "0x7587cAefc8096f5F40ACB83A09Df031a018C66ec" -Alias Liquidator "0x7d6149ad9a573a6e2ca6ebf7d4897c1b766841b4" -Alias UniHolder "0x767ecb395def19ab8d1b2fcc89b3ddfbed28fd6b" -Web3Fork "https://mainnet-eth.compound.finance/@12466889" (CompHolder UniHolder Liquidator) -UseConfigs mainnet - -From CompHolder (Comp Delegate CompHolder) -From CompHolder (Governor GovernorBravo Propose "Update cERC20 Implementation" [(Address cCOMP) (Address cDAI) (Address cUNI) (Address cUSDT) (Address cWBTC2)] [0 0 0 0 0] ["_setImplementation(address,bool,bytes)" "_setImplementation(address,bool,bytes)" "_setImplementation(address,bool,bytes)" "_setImplementation(address,bool,bytes)" "_setImplementation(address,bool,bytes)"] [[(address cErc20ImplG2) false "0x"] [(address cErc20ImplG2) false "0x"][(address cErc20ImplG2) false "0x"][(address cErc20ImplG2) false "0x"][(address cErc20ImplG2) false "0x"]]) - --- upgrade to mainnet cerc20delegate deployment -From CompHolder (Governor GovernorBravo Propose "Update cERC20 Implementation" [(Address cDAI)] [0] ["_setImplementation(address,bool,bytes)"] [[(address cErc20ImplG2) false "0x"]]) - -AdvanceBlocks 13140 -From CompHolder (GovernorBravo GovernorBravo Proposal LastProposal Vote For) -AdvanceBlocks 20000 -Governor GovernorBravo Proposal LastProposal Queue -IncreaseTime 604910 -Governor GovernorBravo Proposal LastProposal Execute - --- Test basic actions -From Liquidator (CToken cDAI RedeemUnderlying 20000e18) -From UniHolder (CToken cUSDC Borrow 8e13) - -Print "Migration to reserve delegate is ok" - -From CompHolder (GovernorBravo GovernorBravo Propose "Update Comptroller implementation" [(Address Unitroller) (Address ComptrollerG8)] [0 0] ["_setPendingImplementation(address)" "_become(address)"] [[(Address ComptrollerG8)] [(Address Unitroller)]]) - -AdvanceBlocks 13140 -From CompHolder (GovernorBravo GovernorBravo Proposal LastProposal Vote For) -AdvanceBlocks 20000 -Governor GovernorBravo Proposal LastProposal Queue -IncreaseTime 604910 -Governor GovernorBravo Proposal LastProposal Execute - -From Root (Comptroller ClaimComp Root) - -Print "Migration to new comptroller ok" \ No newline at end of file diff --git a/spec/sim/0011-split-comp-rewards/hypothetical_mainnet_upgrade.scen b/spec/sim/0011-split-comp-rewards/hypothetical_mainnet_upgrade.scen deleted file mode 100755 index c2ee4cf98..000000000 --- a/spec/sim/0011-split-comp-rewards/hypothetical_mainnet_upgrade.scen +++ /dev/null @@ -1,269 +0,0 @@ -#!/usr/bin/env -S yarn repl -s - -PrintTransactionLogs - --- Token holder addresses for mocking -Alias CompHolder "0x7587caefc8096f5f40acb83a09df031a018c66ec" -Alias TokenHolder "0x05e793ce0c6027323ac150f6d45c2344d28b6019" -Alias CUSDCHolder "0x5e34bc93a7506ecc8562ade4d5c8b090247a6349" - -Web3Fork "https://mainnet-eth.compound.finance/@13057957" (CompHolder TokenHolder CUSDCHolder) -UseConfigs mainnet - --- Verify current borrow state indices -Assert Equal (Comptroller CompBorrowState cETH "index") (271900236502310314207275303654594550) -Assert Equal (Comptroller CompBorrowState cUSDC "index") (374249356944686866589343968372424802182093834) -Assert Equal (Comptroller CompBorrowState cDAI "index") (304681283805461047990696432440416) -Assert Equal (Comptroller CompBorrowState cWBTC "index") (57091242808581665886978349924495532483402440045) -Assert Equal (Comptroller CompBorrowState cWBTC2 "index") (4737883459778580214958447506665029825205802627436) -Assert Equal (Comptroller CompBorrowState cUSDT "index") (423043052052409576153627131768953764641085770) -Assert Equal (Comptroller CompBorrowState cCOMP "index") (1090703374692561421496444039421391844) -Assert Equal (Comptroller CompBorrowState cUNI "index") (1003224738961829505932781071832714863) -Assert Equal (Comptroller CompBorrowState cLINK "index") (1021334963447383149197229014847138287) -Assert Equal (Comptroller CompBorrowState cZRX "index") (276469710290458744488056479123899) -Assert Equal (Comptroller CompBorrowState cTUSD "index") (0) -Assert Equal (Comptroller CompBorrowState cBAT "index") (233011432934823645559082204456702) -Assert Equal (Comptroller CompBorrowState cAAVE "index") (0) -Assert Equal (Comptroller CompBorrowState cSAI "index") (0) -Assert Equal (Comptroller CompBorrowState cSUSHI "index") (0) -Assert Equal (Comptroller CompBorrowState cMKR "index") (0) -Assert Equal (Comptroller CompBorrowState cREP "index") (2887409755927065791842943220324690) -Assert Equal (Comptroller CompBorrowState cYFI "index") (0) - --- Verify current supply state indices -Assert Equal (Comptroller CompSupplyState cETH "index") (3266868720475524419878033121250905466535312) -Assert Equal (Comptroller CompSupplyState cUSDC "index") (32567188278514519540286631350261809001131) -Assert Equal (Comptroller CompSupplyState cDAI "index") (48523828872606782857477338624275950203274) -Assert Equal (Comptroller CompSupplyState cWBTC "index") (98873610159998754418561608689329824102859175) -Assert Equal (Comptroller CompSupplyState cWBTC2 "index") (551089483977648654874859795061443575084844994561) -Assert Equal (Comptroller CompSupplyState cUSDT "index") (50534796386054496931306603320108731513487) -Assert Equal (Comptroller CompSupplyState cCOMP "index") (3836027216477076374142846684153643830549513) -Assert Equal (Comptroller CompSupplyState cUNI "index") (57432610740828790697901777052414007754599) -Assert Equal (Comptroller CompSupplyState cLINK "index") (852011526290128056285332840775220381888746) -Assert Equal (Comptroller CompSupplyState cZRX "index") (11697528643270194078002497271204681811028) -Assert Equal (Comptroller CompSupplyState cTUSD "index") (0) -Assert Equal (Comptroller CompSupplyState cBAT "index") (9278159415477864616059533796790401482787) -Assert Equal (Comptroller CompSupplyState cAAVE "index") (0) -Assert Equal (Comptroller CompSupplyState cSAI "index") (0) -Assert Equal (Comptroller CompSupplyState cSUSHI "index") (0) -Assert Equal (Comptroller CompSupplyState cMKR "index") (0) -Assert Equal (Comptroller CompSupplyState cREP "index") (10822464444875983176893501598723703991037) -Assert Equal (Comptroller CompSupplyState cYFI "index") (0) - --- Verify current supply speeds -Assert Equal (Comptroller CompSpeed cETH) (10750000000000000) -Assert Equal (Comptroller CompSpeed cUSDC) (67000000000000000) -Assert Equal (Comptroller CompSpeed cDAI) (67000000000000000) -Assert Equal (Comptroller CompSpeed cWBTC) (0) -Assert Equal (Comptroller CompSpeed cWBTC2) (10750000000000000) -Assert Equal (Comptroller CompSpeed cUSDT) (9650000000000000) -Assert Equal (Comptroller CompSpeed cCOMP) (5000000000000000) -Assert Equal (Comptroller CompSpeed cUNI) (1462500000000000) -Assert Equal (Comptroller CompSpeed cLINK) (1462500000000000) -Assert Equal (Comptroller CompSpeed cZRX) (1462500000000000) -Assert Equal (Comptroller CompSpeed cTUSD) (0) -Assert Equal (Comptroller CompSpeed cBAT) (1462500000000000) -Assert Equal (Comptroller CompSpeed cAAVE) (0) -Assert Equal (Comptroller CompSpeed cSAI) (0) -Assert Equal (Comptroller CompSpeed cSUSHI) (0) -Assert Equal (Comptroller CompSpeed cMKR) (0) -Assert Equal (Comptroller CompSpeed cREP) (0) -Assert Equal (Comptroller CompSpeed cYFI) (0) - --- Deploy latest Comptroller -ComptrollerImpl Deploy Standard ComptrollerSplitCompRewards - --- Delegate and propose update -From CompHolder (Comp Delegate CompHolder) -From CompHolder (GovernorBravo GovernorBravo Propose "Upgrade Comptroller" [(Address Unitroller) (Address ComptrollerSplitCompRewards)] [0 0] ["_setPendingImplementation(address)" "_become(address)"] [[(Address ComptrollerSplitCompRewards)] [(Address Unitroller)]]) - --- Fast forward, vote, queue, execute -MineBlock -AdvanceBlocks 14000 -From CompHolder (GovernorBravo GovernorBravo Proposal LastProposal Vote For) -AdvanceBlocks 20000 -GovernorBravo GovernorBravo Proposal LastProposal Queue -IncreaseTime 604910 -GovernorBravo GovernorBravo Proposal LastProposal Execute -MineBlock - --- Merge ABIs so that we can call the newly introduced functions without an error -ComptrollerImpl ComptrollerSplitCompRewards MergeABI - --- Verify new borrow state indices -Assert Equal (Comptroller CompBorrowState cETH "index") (271900236502310314207275303654594550) -Assert Equal (Comptroller CompBorrowState cUSDC "index") (374249356944686866589343968372424802182093834) -Assert Equal (Comptroller CompBorrowState cDAI "index") (304681283805461047990696432440416) -Assert Equal (Comptroller CompBorrowState cWBTC "index") (57091242808581665886978349924495532483402440045) -Assert Equal (Comptroller CompBorrowState cWBTC2 "index") (4737883459778580214958447506665029825205802627436) -Assert Equal (Comptroller CompBorrowState cUSDT "index") (423043052052409576153627131768953764641085770) -Assert Equal (Comptroller CompBorrowState cCOMP "index") (1090703374692561421496444039421391844) -Assert Equal (Comptroller CompBorrowState cUNI "index") (1003224738961829505932781071832714863) -Assert Equal (Comptroller CompBorrowState cLINK "index") (1021334963447383149197229014847138287) -Assert Equal (Comptroller CompBorrowState cZRX "index") (276469710290458744488056479123899) -Assert Equal (Comptroller CompBorrowState cTUSD "index") (1e36) -Assert Equal (Comptroller CompBorrowState cBAT "index") (233011432934823645559082204456702) -Assert Equal (Comptroller CompBorrowState cAAVE "index") (1e36) -Assert Equal (Comptroller CompBorrowState cSAI "index") (1e36) -Assert Equal (Comptroller CompBorrowState cSUSHI "index") (1e36) -Assert Equal (Comptroller CompBorrowState cMKR "index") (1e36) -Assert Equal (Comptroller CompBorrowState cREP "index") (2887409755927065791842943220324690) -Assert Equal (Comptroller CompBorrowState cYFI "index") (1e36) - --- Verify new supply state indices -Assert Equal (Comptroller CompSupplyState cETH "index") (3266868720475524419878033121250905466535312) -Assert Equal (Comptroller CompSupplyState cUSDC "index") (32567188278514519540286631350261809001131) -Assert Equal (Comptroller CompSupplyState cDAI "index") (48523828872606782857477338624275950203274) -Assert Equal (Comptroller CompSupplyState cWBTC "index") (98873610159998754418561608689329824102859175) -Assert Equal (Comptroller CompSupplyState cWBTC2 "index") (551089483977648654874859795061443575084844994561) -Assert Equal (Comptroller CompSupplyState cUSDT "index") (50534796386054496931306603320108731513487) -Assert Equal (Comptroller CompSupplyState cCOMP "index") (3836027216477076374142846684153643830549513) -Assert Equal (Comptroller CompSupplyState cUNI "index") (57432610740828790697901777052414007754599) -Assert Equal (Comptroller CompSupplyState cLINK "index") (852011526290128056285332840775220381888746) -Assert Equal (Comptroller CompSupplyState cZRX "index") (11697528643270194078002497271204681811028) -Assert Equal (Comptroller CompSupplyState cTUSD "index") (1e36) -Assert Equal (Comptroller CompSupplyState cBAT "index") (9278159415477864616059533796790401482787) -Assert Equal (Comptroller CompSupplyState cAAVE "index") (1e36) -Assert Equal (Comptroller CompSupplyState cSAI "index") (1e36) -Assert Equal (Comptroller CompSupplyState cSUSHI "index") (1e36) -Assert Equal (Comptroller CompSupplyState cMKR "index") (1e36) -Assert Equal (Comptroller CompSupplyState cREP "index") (10822464444875983176893501598723703991037) -Assert Equal (Comptroller CompSupplyState cYFI "index") (1e36) - --- Verify old COMP speed storage deleted -Assert Equal (Comptroller CompSpeed cETH) (0) -Assert Equal (Comptroller CompSpeed cUSDC) (0) -Assert Equal (Comptroller CompSpeed cDAI) (0) -Assert Equal (Comptroller CompSpeed cWBTC) (0) -Assert Equal (Comptroller CompSpeed cWBTC2) (0) -Assert Equal (Comptroller CompSpeed cUSDT) (0) -Assert Equal (Comptroller CompSpeed cCOMP) (0) -Assert Equal (Comptroller CompSpeed cUNI) (0) -Assert Equal (Comptroller CompSpeed cLINK) (0) -Assert Equal (Comptroller CompSpeed cZRX) (0) -Assert Equal (Comptroller CompSpeed cTUSD) (0) -Assert Equal (Comptroller CompSpeed cBAT) (0) -Assert Equal (Comptroller CompSpeed cAAVE) (0) -Assert Equal (Comptroller CompSpeed cSAI) (0) -Assert Equal (Comptroller CompSpeed cSUSHI) (0) -Assert Equal (Comptroller CompSpeed cMKR) (0) -Assert Equal (Comptroller CompSpeed cREP) (0) -Assert Equal (Comptroller CompSpeed cYFI) (0) - --- Verify COMP supply speeds equal the previous speeds -Assert Equal (Comptroller CompSupplySpeed cETH) (10750000000000000) -Assert Equal (Comptroller CompSupplySpeed cUSDC) (67000000000000000) -Assert Equal (Comptroller CompSupplySpeed cDAI) (67000000000000000) -Assert Equal (Comptroller CompSupplySpeed cWBTC) (0) -Assert Equal (Comptroller CompSupplySpeed cWBTC2) (10750000000000000) -Assert Equal (Comptroller CompSupplySpeed cUSDT) (9650000000000000) -Assert Equal (Comptroller CompSupplySpeed cCOMP) (5000000000000000) -Assert Equal (Comptroller CompSupplySpeed cUNI) (1462500000000000) -Assert Equal (Comptroller CompSupplySpeed cLINK) (1462500000000000) -Assert Equal (Comptroller CompSupplySpeed cZRX) (1462500000000000) -Assert Equal (Comptroller CompSupplySpeed cTUSD) (0) -Assert Equal (Comptroller CompSupplySpeed cBAT) (1462500000000000) -Assert Equal (Comptroller CompSupplySpeed cAAVE) (0) -Assert Equal (Comptroller CompSupplySpeed cSAI) (0) -Assert Equal (Comptroller CompSupplySpeed cSUSHI) (0) -Assert Equal (Comptroller CompSupplySpeed cMKR) (0) -Assert Equal (Comptroller CompSupplySpeed cREP) (0) -Assert Equal (Comptroller CompSupplySpeed cYFI) (0) - --- Verify COMP borrow speeds equal the previous speeds -Assert Equal (Comptroller CompBorrowSpeed cETH) (10750000000000000) -Assert Equal (Comptroller CompBorrowSpeed cUSDC) (67000000000000000) -Assert Equal (Comptroller CompBorrowSpeed cDAI) (67000000000000000) -Assert Equal (Comptroller CompBorrowSpeed cWBTC) (0) -Assert Equal (Comptroller CompBorrowSpeed cWBTC2) (10750000000000000) -Assert Equal (Comptroller CompBorrowSpeed cUSDT) (9650000000000000) -Assert Equal (Comptroller CompBorrowSpeed cCOMP) (5000000000000000) -Assert Equal (Comptroller CompBorrowSpeed cUNI) (1462500000000000) -Assert Equal (Comptroller CompBorrowSpeed cLINK) (1462500000000000) -Assert Equal (Comptroller CompBorrowSpeed cZRX) (1462500000000000) -Assert Equal (Comptroller CompBorrowSpeed cTUSD) (0) -Assert Equal (Comptroller CompBorrowSpeed cBAT) (1462500000000000) -Assert Equal (Comptroller CompBorrowSpeed cAAVE) (0) -Assert Equal (Comptroller CompBorrowSpeed cSAI) (0) -Assert Equal (Comptroller CompBorrowSpeed cSUSHI) (0) -Assert Equal (Comptroller CompBorrowSpeed cMKR) (0) -Assert Equal (Comptroller CompBorrowSpeed cREP) (0) -Assert Equal (Comptroller CompBorrowSpeed cYFI) (0) - -Print "Upgrade ok" -Print "Verifying exploits/bugs are patched" - --- Mint test -From TokenHolder (Erc20 MKR Approve (Address cMKR) 1000e18) -From TokenHolder (CToken cMKR Mint 1000e18) - -Comptroller ClaimComp TokenHolder -Assert Equal (Erc20 COMP TokenBalance TokenHolder) (0) - --- Fast forward to make us accrue a ton of interest (1 year) -MineBlock -AdvanceBlocks 2354250 - --- Propose COMP speed update -From CompHolder (GovernorBravo GovernorBravo Propose "Exploit rewards bug 1" [(Address Comptroller)] [0] ["_setCompSpeeds(address[],uint256[],uint256[])"] [[[(address cMKR)] [1] [1]]]) - --- Fast forward, vote, queue, execute -MineBlock -AdvanceBlocks 14000 -From CompHolder (GovernorBravo GovernorBravo Proposal LastProposal Vote For) -AdvanceBlocks 20000 -GovernorBravo GovernorBravo Proposal LastProposal Queue -IncreaseTime 604910 -GovernorBravo GovernorBravo Proposal LastProposal Execute - --- Ensure accrue interest -CToken cMKR AccrueInterest - -From TokenHolder (Erc20 MKR Approve (Address cMKR) 1000e18) -From TokenHolder (CToken cMKR Mint 1000e18) - -Comptroller ClaimComp TokenHolder -Assert Equal (Erc20 COMP TokenBalance TokenHolder) (2) - --- Propose COMP speed update -From CompHolder (GovernorBravo GovernorBravo Propose "Exploit rewards bug 2" [(Address Comptroller)] [0] ["_setCompSpeeds(address[],uint256[],uint256[])"] [[[(address cMKR)] [0] [0]]]) - --- Fast forward, vote, queue, execute -MineBlock -AdvanceBlocks 14000 -From CompHolder (GovernorBravo GovernorBravo Proposal LastProposal Vote For) -AdvanceBlocks 20000 -GovernorBravo GovernorBravo Proposal LastProposal Queue -IncreaseTime 604910 -GovernorBravo GovernorBravo Proposal LastProposal Execute - -CToken cMKR AccrueInterest -Comptroller ClaimComp TokenHolder -Assert Equal (Erc20 COMP TokenBalance TokenHolder) (32056) - --- Fast forward to make us accrue a ton of interest - we shouldn't as the rate is 0 (1 year) -MineBlock -AdvanceBlocks 2354250 - --- Propose COMP speed update -From CompHolder (GovernorBravo GovernorBravo Propose "Exploit rewards bug 3" [(Address Comptroller)] [0] ["_setCompSpeeds(address[],uint256[],uint256[])"] [[[(address cMKR)] [1] [1]]]) - --- Fast forward, vote, queue, execute -MineBlock -AdvanceBlocks 14000 -From CompHolder (GovernorBravo GovernorBravo Proposal LastProposal Vote For) -AdvanceBlocks 20000 -GovernorBravo GovernorBravo Proposal LastProposal Queue -IncreaseTime 604910 -GovernorBravo GovernorBravo Proposal LastProposal Execute - --- Ensure accrue interest -CToken cMKR AccrueInterest - -From TokenHolder (Erc20 MKR Approve (Address cMKR) 1000e18) -From TokenHolder (CToken cMKR Mint 1000e18) - -Comptroller ClaimComp TokenHolder -Assert Equal (Erc20 COMP TokenBalance TokenHolder) (32058) - -Print "COMP rewards bug fix passed" \ No newline at end of file diff --git a/spec/sim/0011-whitelist-accounts/hypothetical_upgrade.scen b/spec/sim/0011-whitelist-accounts/hypothetical_upgrade.scen deleted file mode 100755 index 349a7e155..000000000 --- a/spec/sim/0011-whitelist-accounts/hypothetical_upgrade.scen +++ /dev/null @@ -1,40 +0,0 @@ -#!/usr/bin/env yarn repl -s - -PrintTransactionLogs - -Alias Arr00 "0x2B384212EDc04Ae8bB41738D05BA20E33277bf33" -Alias CompHolder "0x7587cAefc8096f5F40ACB83A09Df031a018C66ec" -Alias CommunityMultisig "0xbbf3f1421D886E9b2c5D716B5192aC998af2012c" - -Web3Fork "https://mainnet-eth.compound.finance/@12835588" (CompHolder Arr00 CommunityMultisig) -UseConfigs mainnet - -GovernorBravo Deploy BravoDelegate BravoDelegate2 - -From CompHolder (Comp Delegate CompHolder) -From CompHolder (GovernorBravo GovernorBravoDelegator Propose "Whitelist Accounts" [(Address GovernorBravoDelegator) (Address GovernorBravoDelegator) (Address GovernorBravoDelegator)] [0 0 0] ["_setImplementation(address)" "_setWhitelistAccountExpiration(address,uint256)" "_setWhitelistGuardian(address)"] [[(Address BravoDelegate2)] [(Address Arr00) (FromNow 604911)] [(Address CommunityMultisig)]]) - --- Vote for, queue, and execute the proposal -MineBlock -AdvanceBlocks 13140 -From CompHolder (GovernorBravo GovernorBravoDelegator Proposal LastProposal Vote For) -AdvanceBlocks 20000 -GovernorBravo GovernorBravoDelegator Proposal LastProposal Queue -IncreaseTime 604910 -GovernorBravo GovernorBravoDelegator Proposal LastProposal Execute -GovernorBravo GovernorBravoDelegator MergeABI BravoDelegate2 - -From Arr00 (GovernorBravo GovernorBravoDelegator Propose "Test Proposal" [(Address GovernorBravoDelegator)] [0] ["_setImplementation(address)"] [[(Address BravoDelegate2)]]) - -Send CommunityMultisig 1e18 - --- Use community multisig -From CommunityMultisig (GovernorBravo GovernorBravoDelegator Proposal LastProposal Cancel) -From CommunityMultisig (GovernorBravo GovernorBravoDelegator SetWhitelistAccountExpiration (Address Arr00) 0) - -AllowFailures -From Arr00 (GovernorBravo GovernorBravoDelegator Propose "Test Proposal" [(Address GovernorBravoDelegator)] [0] ["_setImplementation(address)"] [[(Address BravoDelegate2)]]) -Assert Revert "revert GovernorBravo::propose: proposer votes below proposal threshold" - - -Print "Setup whitelisted accounts ok!" diff --git a/spec/sim/0011-whitelist-accounts/hypothetical_upgrade_post_deploy.scen b/spec/sim/0011-whitelist-accounts/hypothetical_upgrade_post_deploy.scen deleted file mode 100755 index 7800b5bb8..000000000 --- a/spec/sim/0011-whitelist-accounts/hypothetical_upgrade_post_deploy.scen +++ /dev/null @@ -1,48 +0,0 @@ -#!/usr/bin/env yarn repl -s - -PrintTransactionLogs - -Alias Arr00 "0x2B384212EDc04Ae8bB41738D05BA20E33277bf33" -Alias CompHolder "0x7587cAefc8096f5F40ACB83A09Df031a018C66ec" -Alias CommunityMultisig "0xbbf3f1421D886E9b2c5D716B5192aC998af2012c" -Alias NewBravoDelegate "0x563a63d650a5d259abae9248dddc6867813d3f87" - -Web3Fork "https://mainnet-eth.compound.finance/@13170219" (CompHolder Arr00 CommunityMultisig) -UseConfigs mainnet - -GovernorBravo Deploy BravoDelegate BravoDelegate2 -- Just used to merge abi - -From CompHolder (Comp Delegate CompHolder) -From CompHolder (GovernorBravo GovernorBravoDelegator Propose "Whitelist Accounts" [(Address GovernorBravoDelegator) (Address GovernorBravoDelegator)] [0 0] ["_setImplementation(address)" "_setWhitelistGuardian(address)"] [[(Address NewBravoDelegate)] [(Address CommunityMultisig)]]) - --- Vote for, queue, and execute the proposal -MineBlock -AdvanceBlocks 13140 -From CompHolder (GovernorBravo GovernorBravoDelegator Proposal LastProposal Vote For) -AdvanceBlocks 20000 -GovernorBravo GovernorBravoDelegator Proposal LastProposal Queue -IncreaseTime 604910 -GovernorBravo GovernorBravoDelegator Proposal LastProposal Execute - -GovernorBravo GovernorBravoDelegator MergeABI BravoDelegate2 - -AllowFailures -From Arr00 (GovernorBravo GovernorBravoDelegator Propose "Test Proposal" [(Address GovernorBravoDelegator)] [0] ["_setImplementation(address)"] [[(Address NewBravoDelegate)]]) -Assert Revert "revert GovernorBravo::propose: proposer votes below proposal threshold" - -Successfully - -Send CommunityMultisig 1e18 --- Use community multisig -Assert False (GovernorBravo GovernorBravoDelegator IsWhitelisted (Address Arr00)) -SetTime 1 -From CommunityMultisig (GovernorBravo GovernorBravoDelegator SetWhitelistAccountExpiration (Address Arr00) 1000) -Assert True (GovernorBravo GovernorBravoDelegator IsWhitelisted (Address Arr00)) - -From Arr00 (GovernorBravo GovernorBravoDelegator Propose "Test Proposal" [(Address GovernorBravoDelegator)] [0] ["_setImplementation(address)"] [[(Address NewBravoDelegate)]]) - -From CommunityMultisig (GovernorBravo GovernorBravoDelegator Proposal LastProposal Cancel) -Assert Equal ("Canceled") (GovernorBravo GovernorBravoDelegator Proposal LastProposal State) - - -Print "Setup whitelisted accounts ok!" diff --git a/spec/sim/0011-whitelist-accounts/hypothetical_upgrade_post_propose.scen b/spec/sim/0011-whitelist-accounts/hypothetical_upgrade_post_propose.scen deleted file mode 100755 index 42bf5dd87..000000000 --- a/spec/sim/0011-whitelist-accounts/hypothetical_upgrade_post_propose.scen +++ /dev/null @@ -1,47 +0,0 @@ -#!/usr/bin/env yarn repl -s - -PrintTransactionLogs - -Alias Arr00 "0x2B384212EDc04Ae8bB41738D05BA20E33277bf33" -Alias CompHolder "0xd5447a7aa223268398cf7c38c2c580622cc98772" -Alias CompHolder2 "0x6626593c237f530d15ae9980a95ef938ac15c35c" -Alias CommunityMultisig "0xbbf3f1421D886E9b2c5D716B5192aC998af2012c" -Alias NewBravoDelegate "0x563a63d650a5d259abae9248dddc6867813d3f87" - -Web3Fork "https://mainnet-eth.compound.finance/@13201186" (CompHolder CompHolder2 Arr00 CommunityMultisig) -UseConfigs mainnet - -GovernorBravo Deploy BravoDelegate BravoDelegate2 -- Just used to merge abi - --- Vote for, queue, and execute the proposal -MineBlock -AdvanceBlocks 13140 -From CompHolder (GovernorBravo GovernorBravoDelegator Proposal LastProposal Vote For) -From CompHolder2 (GovernorBravo GovernorBravoDelegator Proposal LastProposal Vote For) -AdvanceBlocks 20000 -GovernorBravo GovernorBravoDelegator Proposal LastProposal Queue -IncreaseTime 604910 -GovernorBravo GovernorBravoDelegator Proposal LastProposal Execute - -GovernorBravo GovernorBravoDelegator MergeABI BravoDelegate2 - -AllowFailures -From Arr00 (GovernorBravo GovernorBravoDelegator Propose "Test Proposal" [(Address GovernorBravoDelegator)] [0] ["_setImplementation(address)"] [[(Address NewBravoDelegate)]]) -Assert Revert "revert GovernorBravo::propose: proposer votes below proposal threshold" - -Successfully - -Send CommunityMultisig 1e18 --- Use community multisig -Assert False (GovernorBravo GovernorBravoDelegator IsWhitelisted (Address Arr00)) -SetTime 1 -From CommunityMultisig (GovernorBravo GovernorBravoDelegator SetWhitelistAccountExpiration (Address Arr00) 1000) -Assert True (GovernorBravo GovernorBravoDelegator IsWhitelisted (Address Arr00)) - -From Arr00 (GovernorBravo GovernorBravoDelegator Propose "Test Proposal" [(Address GovernorBravoDelegator)] [0] ["_setImplementation(address)"] [[(Address NewBravoDelegate)]]) - -From CommunityMultisig (GovernorBravo GovernorBravoDelegator Proposal LastProposal Cancel) -Assert Equal ("Canceled") (GovernorBravo GovernorBravoDelegator Proposal LastProposal State) - - -Print "Setup whitelisted accounts ok!" diff --git a/spec/sim/0064-fix-comp-accruals/hypothetical_mainnet_upgrade.scen b/spec/sim/0064-fix-comp-accruals/hypothetical_mainnet_upgrade.scen deleted file mode 100755 index 64d6797ae..000000000 --- a/spec/sim/0064-fix-comp-accruals/hypothetical_mainnet_upgrade.scen +++ /dev/null @@ -1,109 +0,0 @@ -#!/usr/bin/env -S yarn repl -s - -PrintTransactionLogs - --- Token holder addresses for mocking -Alias CompHolder "0x7587caefc8096f5f40acb83a09df031a018c66ec" -Alias CUSDCHolder "0xF977814e90dA44bFA03b6295A0616a897441aceC" -- Binance 8 -Alias DaiHolder "0x5f65f7b609678448494De4C87521CdF6cEf1e932" -- Gemini 4 - -Alias Timelock "0x6d903f6003cca6255D85CcA4D3B5E5146dC33925" - --- Fork the block prior to proposal 62 executing -Web3Fork "https://mainnet-eth.compound.finance/@13322797" (CompHolder CUSDCHolder DaiHolder Timelock) -UseConfigs mainnet - --- Disable USDC COMP rewards so that these rewards won't mess with our results -Send Timelock 1e18 -From Timelock (Comptroller SetCompSpeed cUSDC 0) - --- Send USDC from CUSDCHolder to other accounts -From CUSDCHolder (Erc20 USDC Transfer Geoff 1000000e6) -From CUSDCHolder (Erc20 USDC Transfer Torrey 1000000e6) -From CUSDCHolder (Erc20 USDC Transfer Coburn 1000000e6) -From CUSDCHolder (Erc20 USDC Transfer Jared 1000000e6) - --- Send DAI from DaiHolder to other accounts -From DaiHolder (Erc20 DAI Transfer Coburn 1000000e18) -From DaiHolder (Erc20 DAI Transfer Jared 1000000e18) - --- Pre Proposal 62: Deposit collateral and borrow SUSHI -From Geoff (Erc20 USDC Approve (Address cUSDC) 1000000e6) -From Geoff (CToken cUSDC Mint 1000000e6) -From Geoff (Comptroller EnterMarkets (cUSDC)) -From Geoff (CToken cSUSHI Borrow 1000e18) - -From Torrey (Erc20 USDC Approve (Address cUSDC) 1000000e6) -From Torrey (CToken cUSDC Mint 1000000e6) -From Torrey (Comptroller EnterMarkets (cUSDC)) -From Torrey (CToken cSUSHI Borrow 1000e18) - --- Execute proposal 62 -GovernorBravo GovernorBravo Proposal LastProposal Execute -MineBlock - --- Claim COMP for Geoff -Comptroller ClaimComp Geoff - --- Check Geoff COMP rewards - invalid accrual & COMP sent -Assert Equal (Erc20 COMP TokenBalance Geoff) (988792275103122749560) -- Huge amount (988 COMP) -> Bug -Assert Equal (Comptroller CompAccrued Geoff) (0) - --- Cause Torrey to accrue COMP without claiming -From Torrey (CToken cSUSHI Borrow 1e18) -- Causes COMP to be distributed but not claimed - --- Deploy latest Comptroller -ComptrollerImpl Deploy Standard NewComptroller - --- Delegate and propose update (containing bug fix) -From CompHolder (Comp Delegate CompHolder) -From CompHolder (GovernorBravo GovernorBravo Propose "Upgrade Comptroller" [(Address Unitroller) (Address NewComptroller)] [0 0] ["_setPendingImplementation(address)" "_become(address)"] [[(Address NewComptroller)] [(Address Unitroller)]]) - --- Fast forward, vote, queue, execute -MineBlock -AdvanceBlocks 14000 -From CompHolder (GovernorBravo GovernorBravo Proposal LastProposal Vote For) -AdvanceBlocks 20000 -GovernorBravo GovernorBravo Proposal LastProposal Queue -IncreaseTime 604910 -GovernorBravo GovernorBravo Proposal LastProposal Execute -MineBlock - --- Claim COMP for Torrey -Comptroller ClaimComp Torrey - --- Check Torrey COMP balance changes - invalid accrual & COMP not sent -Assert Equal (Erc20 COMP TokenBalance Torrey) (0) -Assert Equal (Comptroller CompAccrued Torrey) (988792086947769887785) -- Huge amount (988 COMP) -> Bug - --- Post bug fix: Deposit collateral (DAI) and borrow SUSHI - block COMP sending -From Coburn (Erc20 DAI Approve (Address cDAI) 1000000e18) -From Coburn (CToken cDAI Mint 1000000e18) -From Coburn (Comptroller EnterMarkets (cDAI)) -From Coburn (CToken cSUSHI Borrow 1000e18) - --- Post bug fix: Deposit collateral (DAI) and borrow BAT - don't block COMP sending -From Jared (Erc20 DAI Approve (Address cDAI) 1000000e18) -From Jared (CToken cDAI Mint 1000000e18) -From Jared (Comptroller EnterMarkets (cDAI)) -From Jared (CToken cBAT Borrow 1000e18) - --- Accrue rewards (if any) -MineBlock -AdvanceBlocks 14000 - --- Claim COMP for Coburn -Comptroller ClaimCompInMarkets Coburn (cDAI cSUSHI) - --- Claim COMP for Jared -Comptroller ClaimCompInMarkets Jared (cDAI cBAT) - --- Check Coburn COMP balance changes - valid accrual & COMP not sent (claim in affected market) -Assert Equal (Erc20 COMP TokenBalance Coburn) (0) -Assert Equal (Comptroller CompAccrued Coburn) (211455443766873733) -- 0.21 COMP accrued - --- Check Jared COMP balance changes - valid accrual & COMP sent (no claim in affected market) -Assert Equal (Erc20 COMP TokenBalance Jared) (212379370589809042) -- 0.21 COMP claimed -Assert Equal (Comptroller CompAccrued Jared) (0) - -Print "Done" \ No newline at end of file diff --git a/spec/sim/0065-correct-bad-comp-accruals/hypothetical_mainnet_upgrade.scen b/spec/sim/0065-correct-bad-comp-accruals/hypothetical_mainnet_upgrade.scen deleted file mode 100755 index 4c85729e2..000000000 --- a/spec/sim/0065-correct-bad-comp-accruals/hypothetical_mainnet_upgrade.scen +++ /dev/null @@ -1,97 +0,0 @@ -#!/usr/bin/env -S yarn repl -s - -PrintTransactionLogs - --- Token holder addresses for mocking -Alias CompHolder "0x7587caefc8096f5f40acb83a09df031a018c66ec" - -Alias AffectedUser1 "0xb3bd459e0598dde1fe84b1d0a1430be175b5d5be" -Alias AffectedUser2 "0xc5119db28adde44a8e1453e733381025a2910f7d" -Alias AffectedUser3 "0x309d413391e975b553b7b8d19bc11f8a6c2eb889" -Alias AffectedUser4 "0x261fe0fc430c4ce4158ebe9258e7f9c646fea448" -Alias AffectedUser54 "0xb265ac5bc12a97bc359b0ca0870f8b1cec6369e9" -Alias AffectedUser74 "0xde122ae193f46d67c239ae0c7dae644f9931a772" -- The last affected user - -Web3Fork "https://mainnet-eth.compound.finance/@13380217" (CompHolder) -UseConfigs mainnet - --- Execute proposal 64 -IncreaseTime 604910 -GovernorBravo GovernorBravo Proposal LastProposal Execute - --- Verify compAccrued for select affected users -Assert Equal (Comptroller CompAccrued AffectedUser1) (70026235599882059838229769) -Assert Equal (Comptroller CompAccrued AffectedUser2) (99436286923591330401865) -Assert Equal (Comptroller CompAccrued AffectedUser3) (0343336911491348169) -Assert Equal (Comptroller CompAccrued AffectedUser4) (0) -Assert Equal (Comptroller CompAccrued AffectedUser54) (4989881308103) -Assert Equal (Comptroller CompAccrued AffectedUser74) (934955697489397386) - --- Deploy latest Comptroller -ComptrollerImpl Deploy Standard NewComptroller - --- Delegate and propose - proposal 65 -From CompHolder (Comp Delegate CompHolder) -From CompHolder (GovernorBravo GovernorBravo Propose "Upgrade Comptroller" [(Address Unitroller) (Address NewComptroller) (Address Unitroller)] [0 0 0] ["_setPendingImplementation(address)" "_become(address)" "fixBadAccruals(address[],uint256[])"] [[(Address NewComptroller)] [(Address Unitroller)] [[0xb3bd459e0598dde1fe84b1d0a1430be175b5d5be 0xc5119db28adde44a8e1453e733381025a2910f7d 0x309d413391e975b553b7b8d19bc11f8a6c2eb889 0x261fe0fc430c4ce4158ebe9258e7f9c646fea448 0xdf6fada48f5963a8977ec2bcd7b264434ce294f6 0x2e4ae4d3bd0af45040b4f17e0bb7e6dc548626b1 0x3af015f6e3ac79d217198f00ef36af099d223e29 0xab5a193a11f779fe105e8edf9815a0b514b013ca 0xf3f5c252e8acd60671f92c7f72cf33661221ef42 0x01b037084eba7e4519dbfc9ba026ae696746e033 0x9657bd100802434797d0fb21c356b0871c24485b 0x712d0f306956a6a4b4f9319ad9b9de48c5345996 0x98d105874052ddef7150afb661190df5f8c3a719 0xf946cdaecf5a15440e500e61a0c1d179a93652ad 0x8e9c0ea7e72531ba2f7014f3b39783ac4a26e34a 0xa7b95d2a2d10028cc4450e453151181cbcac74fc 0x3b3f3ea865293f004e01c35b9e8ba80daabc8a72 0x0246c1e74ee54af89c50bfeffdddbad0f0d63da2 0xe68176a9d8a4323ea3fab649b30e00d0a6a87d15 0xfa24de5410581625ca749d615191bd33e0366a8f 0x75e4c0ffb05c07798e22605b607e2c8717a1e885 0x26a6dc267e276fded7b40251c8fc08b1b40df367 0x621ec0b18317049583ac828461cdb4031ad2a76a 0x8f4138b15a1eb898380d29b677b417dcafd2bbfe 0x34bbc9a46b09283698ba7aa1c273e8b4e9f7bcc3 0x25b651a210f0cd42d1540f885489cae8c9ff0fcc 0xff628b747c4e70825af24e3d59748bac477dcbf6 0x5d6dc617d38655254ea718044d37451e75144357 0x10bf1dcb5ab7860bab1c3320163c6dddf8dcc0e4 0x60a71287353f3ac632f3e75fd1be532850aa5f4d 0x53f79a391c638d03e9ed0823df82e1e72e5f616a 0x90f7fe74192f18e0020eb04de550cb2bdbc7cd4f 0x093599e111a14aaefef98573f26a7aa2cc58ebff 0xa5d223c176daab154a3134369d1c0478c5e6fecf 0x6c9eda0c8ce90ccaf6f88c0fb7511447fb92b3fe 0x7f9d39de53a3036463146e91e921cc9fbfcb2de4 0x8fd2515a5b29e61220ee080d484d1f2ea4c46e6b 0xb35e71b6a5aebb07dfc3aa705968411ebdbc003f 0x107e78d87005a76b1dc787c2e3dd7986bb47568b 0x94aaf5ceb457057ac4d1588257988d487272984f 0x3ddfa8ec3052539b6c9549f12cea2c295cff5296 0xe03ffe4cce71b39ae1a8580aa94aa40ba611c820 0x11690b00fef3091f37dd0f88e36c838cd344547f 0x7d6149ad9a573a6e2ca6ebf7d4897c1b766841b4 0xf6c3c3621f42ec1f1cd1207bb1571d93646ab29a 0xd19b7946621fe75ba15ce23ed90d0af8c962e6d8 0x8de962fdc6521a426389aad89e1c067c8f816004 0x212d3c9ad48926ed3e7ef538caaddb5d10e8eb9e 0xa92766340b0742d4af8c065443640efdfd18a9a3 0x6ddca709e0d29fdd03be35553c77c08f81a3f9e1 0x83b8987b2f48b6b7220ffc6e83fa0f129b9d5149 0x9c84be7ba23a5034c56d0289eefb6c083e96dd94 0xd2e7d58850d058668ee67fad262760e5b05ed2a4 0xb265ac5bc12a97bc359b0ca0870f8b1cec6369e9 0xba2ef5189b762bd4c9e7f0b50fbbab65193935e8 0xe095de809090531d343d046b2fd3abf28419d3d0 0x99265b66461539efd0334901dbb5a2d7f082687a 0x86bbc49a00bde4d64cde650f6ca8cc0f138fd344 0x87279585d52f534a2d2e453518cd7890c5762d19 0x2ecdc1191514b7e1ed44587822dffaf7c670d6ae 0x138f85de34ec8057ec206788a064f842cd64ce9e 0xc63fc0ae83555e2553762edd887433573f77cfc2 0x2b3b15cb2304223d1a8ca28c17258775bd5b0826 0x8c1a4c98c470900567fb9e764243c89cda79400c 0xf8d9ecfb5ddd99a6e0ccabc54a440205cd40e448 0x728e7f512e01e7811037985ddfb15f9bfef517a8 0x6e13be05021e83318fae9f29f2f57cacaccb62a3 0x124e1fafcadc2c017a17b4bbbbfff3867b7dee35 0x0006e4548aed4502ec8c844567840ce6ef1013f5 0x82a726178ab68d446e079901f2ca95f83dde37d4 0x339b00277f32265b5a46599ad30495b0e921eb6f 0xebe5c14f6ac0ce53640cebfe6d213674dc08d440 0x0730fd7d15fa9a40a6c7b2bbb4b8ce9ee6e6d08b 0xde122ae193f46d67c239ae0c7dae644f9931a772] [70024581827215461300286636 99434542520051820798713 91168628321892518528194 65253893519524513427603 37504914534703867310656 29991222921414803034064 29664092163099163866723 22995425435193061317525 18977306140567618322762 16153770461869763337554 14995552017332537907240 11518530074563941561647 9499196713099819935841 7212224879583644596449 7038803948830987770903 4465995783400342603801 3476860522368145404076 2999525712631519714571 2976977462986329769345 1881718446191311189927 1699235799386422007751 1577018231157018115140 1499788428567608763699 1278642977639309919583 1247907251007203364606 998601466881096599093 791579317801755286963 773933487859775608904 762430378814137892973 505305506641181113258 499866820508711159523 491351929276724469475 187011763377256292965 95880194615183341505 35906565779719826718 34940732225857751281 25099485956367649889 19778101924102624863 19505161319578397635 2968804004067920724 432423944715881797 100905201500492779 99856604811161355 49962015092674176 9951593329323840 6757459496349902 5597019815253533 476759772220656 200024507662316 33277774577726 14611468777911 5014905724070 4997677706137 4989881308103 2419923659650 1486146270087 496946680063 349870854800 152196995332 147008249887 104317366337 99993707875 47972588242 44234730265 12031544568 10541282903 8594826060 5000000000 1617031777 1324963912 751720862 293454410 171168761 1549831]]]) -PrintNumber LastGas - --- Fast forward, vote, queue, execute -MineBlock -AdvanceBlocks 14000 -From CompHolder (GovernorBravo GovernorBravo Proposal LastProposal Vote For) -AdvanceBlocks 20000 -GovernorBravo GovernorBravo Proposal LastProposal Queue -IncreaseTime 604910 -GovernorBravo GovernorBravo Proposal LastProposal Execute -PrintNumber LastGas -MineBlock - --- Merge ABIs so that we can call the newly compReceivable without an error -ComptrollerImpl NewComptroller MergeABI - --- Inflection points to test: --- compOverAccrued < compAccrued -- AffectedUser1, AffectedUser2, AffectedUser74 --- compOverAccrued > compAccrued -- AffectedUser3, AffectedUser4 --- compAccrued == 0 -- AffectedUser4 --- compAccrued == compOverAccrued -- AffectedUser54 --- first affected user -- AffectedUser1 --- last affected user -- AffectedUser74 - -Assert Equal (Comptroller CompAccrued AffectedUser1) (1653772666598537943133) -- 70026235599882059838229769 - 70024581827215461300286636 -Assert Equal (Comptroller CompReceivable AffectedUser1) (0) -- compAccrued > compOverAccrued => compReceivable = 0 - -Assert Equal (Comptroller CompAccrued AffectedUser2) (1744403539509603152) -- 99436286923591330401865 - 99434542520051820798713 -Assert Equal (Comptroller CompReceivable AffectedUser2) (0) -- compAccrued > compOverAccrued => compReceivable = 0 - -Assert Equal (Comptroller CompAccrued AffectedUser3) (0) -- compOverAccrued > compAccrued => compAccrued = 0 -Assert Equal (Comptroller CompReceivable AffectedUser3) (91168284984981027180025) -- 91168628321892518528194 - 343336911491348169 - -Assert Equal (Comptroller CompAccrued AffectedUser4) (0) -- compOverAccrued > compAccrued => compAccrued = 0 -Assert Equal (Comptroller CompReceivable AffectedUser4) (65253893519524513427603) -- 65253893519524513427603 - 0 - -Assert Equal (Comptroller CompAccrued AffectedUser54) (0) -- compOverAccrued == compAccrued => compAccrued = 0 -Assert Equal (Comptroller CompReceivable AffectedUser54) (0) -- compOverAccrued == compAccrued => compReceivable = 0 - -Assert Equal (Comptroller CompAccrued AffectedUser74) (934955697487847555) -- 934955697489397386 - 1549831 -Assert Equal (Comptroller CompReceivable AffectedUser74) (0) -- compAccrued > compOverAccrued => compReceivable = 0 - --- Ensure that claimComp functionality has been restored and works as expected --- From 70M COMP accrued to 1955 - looks good -Expect Changes (Erc20 Comp TokenBalance AffectedUser1) +1955396565201585496359 -- 1653772666598537943133 + newly accrued COMP -Comptroller ClaimComp AffectedUser1 -Assert Equal (Comptroller CompAccrued AffectedUser1) (0) - --- Ensure calling fixBadAccruals again reverts -From CompHolder (GovernorBravo GovernorBravo Propose "Call fixBadAccruals for a second time" [(Address Unitroller)] [0] ["fixBadAccruals(address[],uint256[])"] [[[0xb3bd459e0598dde1fe84b1d0a1430be175b5d5be 0xc5119db28adde44a8e1453e733381025a2910f7d 0x309d413391e975b553b7b8d19bc11f8a6c2eb889 0x261fe0fc430c4ce4158ebe9258e7f9c646fea448 0xdf6fada48f5963a8977ec2bcd7b264434ce294f6 0x2e4ae4d3bd0af45040b4f17e0bb7e6dc548626b1 0x3af015f6e3ac79d217198f00ef36af099d223e29 0xab5a193a11f779fe105e8edf9815a0b514b013ca 0xf3f5c252e8acd60671f92c7f72cf33661221ef42 0x01b037084eba7e4519dbfc9ba026ae696746e033 0x9657bd100802434797d0fb21c356b0871c24485b 0x712d0f306956a6a4b4f9319ad9b9de48c5345996 0x98d105874052ddef7150afb661190df5f8c3a719 0xf946cdaecf5a15440e500e61a0c1d179a93652ad 0x8e9c0ea7e72531ba2f7014f3b39783ac4a26e34a 0xa7b95d2a2d10028cc4450e453151181cbcac74fc 0x3b3f3ea865293f004e01c35b9e8ba80daabc8a72 0x0246c1e74ee54af89c50bfeffdddbad0f0d63da2 0xe68176a9d8a4323ea3fab649b30e00d0a6a87d15 0xfa24de5410581625ca749d615191bd33e0366a8f 0x75e4c0ffb05c07798e22605b607e2c8717a1e885 0x26a6dc267e276fded7b40251c8fc08b1b40df367 0x621ec0b18317049583ac828461cdb4031ad2a76a 0x8f4138b15a1eb898380d29b677b417dcafd2bbfe 0x34bbc9a46b09283698ba7aa1c273e8b4e9f7bcc3 0x25b651a210f0cd42d1540f885489cae8c9ff0fcc 0xff628b747c4e70825af24e3d59748bac477dcbf6 0x5d6dc617d38655254ea718044d37451e75144357 0x10bf1dcb5ab7860bab1c3320163c6dddf8dcc0e4 0x60a71287353f3ac632f3e75fd1be532850aa5f4d 0x53f79a391c638d03e9ed0823df82e1e72e5f616a 0x90f7fe74192f18e0020eb04de550cb2bdbc7cd4f 0x093599e111a14aaefef98573f26a7aa2cc58ebff 0xa5d223c176daab154a3134369d1c0478c5e6fecf 0x6c9eda0c8ce90ccaf6f88c0fb7511447fb92b3fe 0x7f9d39de53a3036463146e91e921cc9fbfcb2de4 0x8fd2515a5b29e61220ee080d484d1f2ea4c46e6b 0xb35e71b6a5aebb07dfc3aa705968411ebdbc003f 0x107e78d87005a76b1dc787c2e3dd7986bb47568b 0x94aaf5ceb457057ac4d1588257988d487272984f 0x3ddfa8ec3052539b6c9549f12cea2c295cff5296 0xe03ffe4cce71b39ae1a8580aa94aa40ba611c820 0x11690b00fef3091f37dd0f88e36c838cd344547f 0x7d6149ad9a573a6e2ca6ebf7d4897c1b766841b4 0xf6c3c3621f42ec1f1cd1207bb1571d93646ab29a 0xd19b7946621fe75ba15ce23ed90d0af8c962e6d8 0x8de962fdc6521a426389aad89e1c067c8f816004 0x212d3c9ad48926ed3e7ef538caaddb5d10e8eb9e 0xa92766340b0742d4af8c065443640efdfd18a9a3 0x6ddca709e0d29fdd03be35553c77c08f81a3f9e1 0x83b8987b2f48b6b7220ffc6e83fa0f129b9d5149 0x9c84be7ba23a5034c56d0289eefb6c083e96dd94 0xd2e7d58850d058668ee67fad262760e5b05ed2a4 0xb265ac5bc12a97bc359b0ca0870f8b1cec6369e9 0xba2ef5189b762bd4c9e7f0b50fbbab65193935e8 0xe095de809090531d343d046b2fd3abf28419d3d0 0x99265b66461539efd0334901dbb5a2d7f082687a 0x86bbc49a00bde4d64cde650f6ca8cc0f138fd344 0x87279585d52f534a2d2e453518cd7890c5762d19 0x2ecdc1191514b7e1ed44587822dffaf7c670d6ae 0x138f85de34ec8057ec206788a064f842cd64ce9e 0xc63fc0ae83555e2553762edd887433573f77cfc2 0x2b3b15cb2304223d1a8ca28c17258775bd5b0826 0x8c1a4c98c470900567fb9e764243c89cda79400c 0xf8d9ecfb5ddd99a6e0ccabc54a440205cd40e448 0x728e7f512e01e7811037985ddfb15f9bfef517a8 0x6e13be05021e83318fae9f29f2f57cacaccb62a3 0x124e1fafcadc2c017a17b4bbbbfff3867b7dee35 0x0006e4548aed4502ec8c844567840ce6ef1013f5 0x82a726178ab68d446e079901f2ca95f83dde37d4 0x339b00277f32265b5a46599ad30495b0e921eb6f 0xebe5c14f6ac0ce53640cebfe6d213674dc08d440 0x0730fd7d15fa9a40a6c7b2bbb4b8ce9ee6e6d08b 0xde122ae193f46d67c239ae0c7dae644f9931a772] [70024581827215461300286636 99434542520051820798713 91168628321892518528194 65253893519524513427603 37504914534703867310656 29991222921414803034064 29664092163099163866723 22995425435193061317525 18977306140567618322762 16153770461869763337554 14995552017332537907240 11518530074563941561647 9499196713099819935841 7212224879583644596449 7038803948830987770903 4465995783400342603801 3476860522368145404076 2999525712631519714571 2976977462986329769345 1881718446191311189927 1699235799386422007751 1577018231157018115140 1499788428567608763699 1278642977639309919583 1247907251007203364606 998601466881096599093 791579317801755286963 773933487859775608904 762430378814137892973 505305506641181113258 499866820508711159523 491351929276724469475 187011763377256292965 95880194615183341505 35906565779719826718 34940732225857751281 25099485956367649889 19778101924102624863 19505161319578397635 2968804004067920724 432423944715881797 100905201500492779 99856604811161355 49962015092674176 9951593329323840 6757459496349902 5597019815253533 476759772220656 200024507662316 33277774577726 14611468777911 5014905724070 4997677706137 4989881308103 2419923659650 1486146270087 496946680063 349870854800 152196995332 147008249887 104317366337 99993707875 47972588242 44234730265 12031544568 10541282903 8594826060 5000000000 1617031777 1324963912 751720862 293454410 171168761 1549831]]]) -MineBlock -AdvanceBlocks 14000 -From CompHolder (GovernorBravo GovernorBravo Proposal LastProposal Vote For) -AdvanceBlocks 20000 -GovernorBravo GovernorBravo Proposal LastProposal Queue -IncreaseTime 604910 -AllowFailures -GovernorBravo GovernorBravo Proposal LastProposal Execute -Assert Revert -Successfully - -Print "Done" \ No newline at end of file diff --git a/spec/sim/0065-correct-bad-comp-accruals/mainnet_upgrade.scen b/spec/sim/0065-correct-bad-comp-accruals/mainnet_upgrade.scen deleted file mode 100755 index 65908f3eb..000000000 --- a/spec/sim/0065-correct-bad-comp-accruals/mainnet_upgrade.scen +++ /dev/null @@ -1,89 +0,0 @@ -#!/usr/bin/env -S yarn repl -s - -PrintTransactionLogs - --- Token holder addresses for mocking -Alias CompHolder "0x7587caefc8096f5f40acb83a09df031a018c66ec" - -Alias AffectedUser1 "0xb3bd459e0598dde1fe84b1d0a1430be175b5d5be" -Alias AffectedUser2 "0xc5119db28adde44a8e1453e733381025a2910f7d" -Alias AffectedUser3 "0x309d413391e975b553b7b8d19bc11f8a6c2eb889" -Alias AffectedUser4 "0x261fe0fc430c4ce4158ebe9258e7f9c646fea448" -Alias AffectedUser54 "0xb265ac5bc12a97bc359b0ca0870f8b1cec6369e9" -Alias AffectedUser74 "0xde122ae193f46d67c239ae0c7dae644f9931a772" -- The last affected user - -Web3Fork "https://mainnet-eth.compound.finance/@13400300" (CompHolder) -UseConfigs mainnet - --- Deploy latest Comptroller (needed for ABI merge) -ComptrollerImpl Deploy Standard NewComptroller - --- Merge ABIs so that we can call the newly compReceivable without an error -ComptrollerImpl NewComptroller MergeABI - --- Verify compAccrued for select affected users -Assert Equal (Comptroller CompAccrued AffectedUser1) (70026235599882059838229769) -Assert Equal (Comptroller CompAccrued AffectedUser2) (99436286923591330401865) -Assert Equal (Comptroller CompAccrued AffectedUser3) (0343336911491348169) -Assert Equal (Comptroller CompAccrued AffectedUser4) (0) -Assert Equal (Comptroller CompAccrued AffectedUser54) (4989881308103) -Assert Equal (Comptroller CompAccrued AffectedUser74) (934955697489397386) - --- Delegate and execute proposal 65 -From CompHolder (Comp Delegate CompHolder) -MineBlock -AdvanceBlocks 14000 -From CompHolder (GovernorBravo GovernorBravo Proposal LastProposal Vote For) -AdvanceBlocks 20000 -GovernorBravo GovernorBravo Proposal LastProposal Queue -IncreaseTime 604910 -GovernorBravo GovernorBravo Proposal LastProposal Execute -PrintNumber LastGas -MineBlock - --- Inflection points to test: --- compOverAccrued < compAccrued -- AffectedUser1, AffectedUser2, AffectedUser74 --- compOverAccrued > compAccrued -- AffectedUser3, AffectedUser4 --- compAccrued == 0 -- AffectedUser4 --- compAccrued == compOverAccrued -- AffectedUser54 --- first affected user -- AffectedUser1 --- last affected user -- AffectedUser74 - -Assert Equal (Comptroller CompAccrued AffectedUser1) (1653772666598537943133) -- 70026235599882059838229769 - 70024581827215461300286636 -Assert Equal (Comptroller CompReceivable AffectedUser1) (0) -- compAccrued > compOverAccrued => compReceivable = 0 - -Assert Equal (Comptroller CompAccrued AffectedUser2) (1744403539509603152) -- 99436286923591330401865 - 99434542520051820798713 -Assert Equal (Comptroller CompReceivable AffectedUser2) (0) -- compAccrued > compOverAccrued => compReceivable = 0 - -Assert Equal (Comptroller CompAccrued AffectedUser3) (0) -- compOverAccrued > compAccrued => compAccrued = 0 -Assert Equal (Comptroller CompReceivable AffectedUser3) (91168284984981027180025) -- 91168628321892518528194 - 343336911491348169 - -Assert Equal (Comptroller CompAccrued AffectedUser4) (0) -- compOverAccrued > compAccrued => compAccrued = 0 -Assert Equal (Comptroller CompReceivable AffectedUser4) (65253893519524513427603) -- 65253893519524513427603 - 0 - -Assert Equal (Comptroller CompAccrued AffectedUser54) (0) -- compOverAccrued == compAccrued => compAccrued = 0 -Assert Equal (Comptroller CompReceivable AffectedUser54) (0) -- compOverAccrued == compAccrued => compReceivable = 0 - -Assert Equal (Comptroller CompAccrued AffectedUser74) (934955697487847555) -- 934955697489397386 - 1549831 -Assert Equal (Comptroller CompReceivable AffectedUser74) (0) -- compAccrued > compOverAccrued => compReceivable = 0 - --- Ensure that claimComp functionality has been restored and works as expected --- From 70M COMP accrued to 2055 - looks good -Expect Changes (Erc20 Comp TokenBalance AffectedUser1) +2055078988438040858099 -- 1653772666598537943133 + newly accrued COMP -Comptroller ClaimComp AffectedUser1 -Assert Equal (Comptroller CompAccrued AffectedUser1) (0) - --- Ensure calling fixBadAccruals again reverts -From CompHolder (GovernorBravo GovernorBravo Propose "Call fixBadAccruals for a second time" [(Address Unitroller)] [0] ["fixBadAccruals(address[],uint256[])"] [[[0xb3bd459e0598dde1fe84b1d0a1430be175b5d5be 0xc5119db28adde44a8e1453e733381025a2910f7d 0x309d413391e975b553b7b8d19bc11f8a6c2eb889 0x261fe0fc430c4ce4158ebe9258e7f9c646fea448 0xdf6fada48f5963a8977ec2bcd7b264434ce294f6 0x2e4ae4d3bd0af45040b4f17e0bb7e6dc548626b1 0x3af015f6e3ac79d217198f00ef36af099d223e29 0xab5a193a11f779fe105e8edf9815a0b514b013ca 0xf3f5c252e8acd60671f92c7f72cf33661221ef42 0x01b037084eba7e4519dbfc9ba026ae696746e033 0x9657bd100802434797d0fb21c356b0871c24485b 0x712d0f306956a6a4b4f9319ad9b9de48c5345996 0x98d105874052ddef7150afb661190df5f8c3a719 0xf946cdaecf5a15440e500e61a0c1d179a93652ad 0x8e9c0ea7e72531ba2f7014f3b39783ac4a26e34a 0xa7b95d2a2d10028cc4450e453151181cbcac74fc 0x3b3f3ea865293f004e01c35b9e8ba80daabc8a72 0x0246c1e74ee54af89c50bfeffdddbad0f0d63da2 0xe68176a9d8a4323ea3fab649b30e00d0a6a87d15 0xfa24de5410581625ca749d615191bd33e0366a8f 0x75e4c0ffb05c07798e22605b607e2c8717a1e885 0x26a6dc267e276fded7b40251c8fc08b1b40df367 0x621ec0b18317049583ac828461cdb4031ad2a76a 0x8f4138b15a1eb898380d29b677b417dcafd2bbfe 0x34bbc9a46b09283698ba7aa1c273e8b4e9f7bcc3 0x25b651a210f0cd42d1540f885489cae8c9ff0fcc 0xff628b747c4e70825af24e3d59748bac477dcbf6 0x5d6dc617d38655254ea718044d37451e75144357 0x10bf1dcb5ab7860bab1c3320163c6dddf8dcc0e4 0x60a71287353f3ac632f3e75fd1be532850aa5f4d 0x53f79a391c638d03e9ed0823df82e1e72e5f616a 0x90f7fe74192f18e0020eb04de550cb2bdbc7cd4f 0x093599e111a14aaefef98573f26a7aa2cc58ebff 0xa5d223c176daab154a3134369d1c0478c5e6fecf 0x6c9eda0c8ce90ccaf6f88c0fb7511447fb92b3fe 0x7f9d39de53a3036463146e91e921cc9fbfcb2de4 0x8fd2515a5b29e61220ee080d484d1f2ea4c46e6b 0xb35e71b6a5aebb07dfc3aa705968411ebdbc003f 0x107e78d87005a76b1dc787c2e3dd7986bb47568b 0x94aaf5ceb457057ac4d1588257988d487272984f 0x3ddfa8ec3052539b6c9549f12cea2c295cff5296 0xe03ffe4cce71b39ae1a8580aa94aa40ba611c820 0x11690b00fef3091f37dd0f88e36c838cd344547f 0x7d6149ad9a573a6e2ca6ebf7d4897c1b766841b4 0xf6c3c3621f42ec1f1cd1207bb1571d93646ab29a 0xd19b7946621fe75ba15ce23ed90d0af8c962e6d8 0x8de962fdc6521a426389aad89e1c067c8f816004 0x212d3c9ad48926ed3e7ef538caaddb5d10e8eb9e 0xa92766340b0742d4af8c065443640efdfd18a9a3 0x6ddca709e0d29fdd03be35553c77c08f81a3f9e1 0x83b8987b2f48b6b7220ffc6e83fa0f129b9d5149 0x9c84be7ba23a5034c56d0289eefb6c083e96dd94 0xd2e7d58850d058668ee67fad262760e5b05ed2a4 0xb265ac5bc12a97bc359b0ca0870f8b1cec6369e9 0xba2ef5189b762bd4c9e7f0b50fbbab65193935e8 0xe095de809090531d343d046b2fd3abf28419d3d0 0x99265b66461539efd0334901dbb5a2d7f082687a 0x86bbc49a00bde4d64cde650f6ca8cc0f138fd344 0x87279585d52f534a2d2e453518cd7890c5762d19 0x2ecdc1191514b7e1ed44587822dffaf7c670d6ae 0x138f85de34ec8057ec206788a064f842cd64ce9e 0xc63fc0ae83555e2553762edd887433573f77cfc2 0x2b3b15cb2304223d1a8ca28c17258775bd5b0826 0x8c1a4c98c470900567fb9e764243c89cda79400c 0xf8d9ecfb5ddd99a6e0ccabc54a440205cd40e448 0x728e7f512e01e7811037985ddfb15f9bfef517a8 0x6e13be05021e83318fae9f29f2f57cacaccb62a3 0x124e1fafcadc2c017a17b4bbbbfff3867b7dee35 0x0006e4548aed4502ec8c844567840ce6ef1013f5 0x82a726178ab68d446e079901f2ca95f83dde37d4 0x339b00277f32265b5a46599ad30495b0e921eb6f 0xebe5c14f6ac0ce53640cebfe6d213674dc08d440 0x0730fd7d15fa9a40a6c7b2bbb4b8ce9ee6e6d08b 0xde122ae193f46d67c239ae0c7dae644f9931a772] [70024581827215461300286636 99434542520051820798713 91168628321892518528194 65253893519524513427603 37504914534703867310656 29991222921414803034064 29664092163099163866723 22995425435193061317525 18977306140567618322762 16153770461869763337554 14995552017332537907240 11518530074563941561647 9499196713099819935841 7212224879583644596449 7038803948830987770903 4465995783400342603801 3476860522368145404076 2999525712631519714571 2976977462986329769345 1881718446191311189927 1699235799386422007751 1577018231157018115140 1499788428567608763699 1278642977639309919583 1247907251007203364606 998601466881096599093 791579317801755286963 773933487859775608904 762430378814137892973 505305506641181113258 499866820508711159523 491351929276724469475 187011763377256292965 95880194615183341505 35906565779719826718 34940732225857751281 25099485956367649889 19778101924102624863 19505161319578397635 2968804004067920724 432423944715881797 100905201500492779 99856604811161355 49962015092674176 9951593329323840 6757459496349902 5597019815253533 476759772220656 200024507662316 33277774577726 14611468777911 5014905724070 4997677706137 4989881308103 2419923659650 1486146270087 496946680063 349870854800 152196995332 147008249887 104317366337 99993707875 47972588242 44234730265 12031544568 10541282903 8594826060 5000000000 1617031777 1324963912 751720862 293454410 171168761 1549831]]]) -MineBlock -AdvanceBlocks 14000 -From CompHolder (GovernorBravo GovernorBravo Proposal LastProposal Vote For) -AdvanceBlocks 20000 -GovernorBravo GovernorBravo Proposal LastProposal Queue -IncreaseTime 604910 -AllowFailures -GovernorBravo GovernorBravo Proposal LastProposal Execute -Assert Revert -Successfully - -Print "Done" \ No newline at end of file diff --git a/spec/sim/0089-lower-proposal-threshold-v2/post_deploy.scen b/spec/sim/0089-lower-proposal-threshold-v2/post_deploy.scen deleted file mode 100755 index 1db68d32c..000000000 --- a/spec/sim/0089-lower-proposal-threshold-v2/post_deploy.scen +++ /dev/null @@ -1,52 +0,0 @@ -#!/usr/bin/env yarn repl -s - -PrintTransactionLogs - -Alias CompHolder "0x7587caefc8096f5f40acb83a09df031a018c66ec" -- Compound Team 2 -Alias CompHolder2 "0x5608169973d639649196A84EE4085a708bcBf397" -- Compound Team 3 -Alias CompProposer "0x18c8f1222083997405f2e482338a4650ac02e1d6" -- Compound Holder ~27K -Alias NewBravoDelegate "0x30065B703DE5d473975A2db5bBB790A23FD6EFbD" -- New Bravo Delegate Contract -Alias Ratan "0xcf0Ef02C51438C821246f2e6ADe50e0F1CB0f385" -- Ratan Kaliani ETH address - - -Web3Fork "https://mainnet-eth.compound.finance/@14261479" (CompHolder CompHolder2 CompProposer NewBravoDelegate) -UseConfigs mainnet - -GovernorBravo Deploy BravoDelegate BravoDelegate2 - -From CompHolder (Comp Delegate CompHolder) -From CompHolder2 (Comp Delegate CompHolder) -From CompProposer (Comp Delegate CompProposer) - --- Test that CompProposer proposing fails -AllowFailures -From CompProposer (GovernorBravo GovernorBravoDelegator Propose "Test Proposal" [(Address GovernorBravoDelegator)] [0] ["_setProposalThreshold(uint256)"] [[25000000000000000000000]]) -Successfully -Assert Revert "revert GovernorBravo::propose: proposer votes below proposal threshold" - --- Update Delegate Impl, Reduce Threshold & Allocate 5 COMP to Ratan for completing proposal -From CompHolder (GovernorBravo GovernorBravoDelegator Propose "Reduce Proposal Threshold" [(Address GovernorBravoDelegator) (Address GovernorBravoDelegator) (Address Comptroller)] [0 0 0] ["_setImplementation(address)" "_setProposalThreshold(uint256)" "_grantComp(address,uint256)"] [[(Address NewBravoDelegate)] [25000000000000000000000] [(Address Ratan) 5000000000000000000]]) --- Vote for, queue, and execute the proposal -MineBlock -AdvanceBlocks 13140 -From CompHolder (GovernorBravo GovernorBravoDelegator Proposal LastProposal Vote For) -AdvanceBlocks 20000 -GovernorBravo GovernorBravoDelegator Proposal LastProposal Queue -IncreaseTime 604910 -GovernorBravo GovernorBravoDelegator Proposal LastProposal Execute - --- Check if grant to Ratan was successful -Assert Equal (6977000000000000000) (Erc20 Comp TokenBalance (Address Ratan)) - --- Testing a proposer 10K < x < 65K -From CompProposer (GovernorBravo GovernorBravoDelegator Propose "Test Proposal" [(Address GovernorBravoDelegator)] [0] ["_setProposalThreshold(uint256)"] [[25000000000000000000000]]) --- Vote for, queue, and execute the proposal -MineBlock -AdvanceBlocks 13140 -From CompHolder (GovernorBravo GovernorBravoDelegator Proposal LastProposal Vote For) -AdvanceBlocks 20000 -GovernorBravo GovernorBravoDelegator Proposal LastProposal Queue -IncreaseTime 604910 -GovernorBravo GovernorBravoDelegator Proposal LastProposal Execute - -Print "Lower proposal threshold v2 ok!" diff --git a/spec/sim/0089-lower-proposal-threshold-v2/pre_deploy.scen b/spec/sim/0089-lower-proposal-threshold-v2/pre_deploy.scen deleted file mode 100755 index 076591c9b..000000000 --- a/spec/sim/0089-lower-proposal-threshold-v2/pre_deploy.scen +++ /dev/null @@ -1,51 +0,0 @@ -#!/usr/bin/env yarn repl -s - -PrintTransactionLogs - -Alias CompHolder "0x7587caefc8096f5f40acb83a09df031a018c66ec" -- Compound Team 2 -Alias CompHolder2 "0x5608169973d639649196A84EE4085a708bcBf397" -- Compound Team 3 -Alias CompProposer "0xb326843982c5872768ea8E24dCe34D18b73f0B44" -- Compound Holder ~15K -Alias CalBlockchain "0x7AE109A63ff4DC852e063a673b40BED85D22E585" -Alias Ratan "0xcf0Ef02C51438C821246f2e6ADe50e0F1CB0f385" -- Ratan Kaliani ETH address - -Web3Fork "https://mainnet-eth.compound.finance/@14251015" (CompHolder CompHolder2 CompProposer CalBlockchain) -UseConfigs mainnet - -GovernorBravo Deploy BravoDelegate BravoDelegate2 - -From CompHolder (Comp Delegate CompHolder) -From CompHolder2 (Comp Delegate CompHolder) -From CompProposer (Comp Delegate CompProposer) - --- Test that CompProposer proposing fails -AllowFailures -From CompProposer (GovernorBravo GovernorBravoDelegator Propose "Test Proposal" [(Address GovernorBravoDelegator)] [0] ["_setProposalThreshold(uint256)"] [[10000000000000000000000]]) -Successfully -Assert Revert "revert GovernorBravo::propose: proposer votes below proposal threshold" - --- Allocate 5 COMP to Ratan for completing proposal -From CompHolder (GovernorBravo GovernorBravoDelegator Propose "Reduce Proposal Threshold" [(Address GovernorBravoDelegator) (Address GovernorBravoDelegator) (Address Comptroller)] [0 0 0] ["_setImplementation(address)" "_setProposalThreshold(uint256)" "_grantComp(address,uint256)"] [[(Address BravoDelegate2)] [10000000000000000000000] [(Address Ratan) 5000000000000000000]]) --- Vote for, queue, and execute the proposal -MineBlock -AdvanceBlocks 13140 -From CompHolder (GovernorBravo GovernorBravoDelegator Proposal LastProposal Vote For) -AdvanceBlocks 20000 -GovernorBravo GovernorBravoDelegator Proposal LastProposal Queue -IncreaseTime 604910 -GovernorBravo GovernorBravoDelegator Proposal LastProposal Execute - --- Check if grant to Ratan was successful -Assert Equal (6977000000000000000) (Erc20 Comp TokenBalance (Address Ratan)) - --- Testing a proposer 10K < x < 65K -From CompProposer (GovernorBravo GovernorBravoDelegator Propose "Test Proposal" [(Address GovernorBravoDelegator)] [0] ["_setProposalThreshold(uint256)"] [[10000000000000000000000]]) --- Vote for, queue, and execute the proposal -MineBlock -AdvanceBlocks 13140 -From CompHolder (GovernorBravo GovernorBravoDelegator Proposal LastProposal Vote For) -AdvanceBlocks 20000 -GovernorBravo GovernorBravoDelegator Proposal LastProposal Queue -IncreaseTime 604910 -GovernorBravo GovernorBravoDelegator Proposal LastProposal Execute - -Print "Lower proposal threshold v2 ok!"