Skip to content

Instantly share code, notes, and snippets.

@feuGeneA
Created May 21, 2018 13:35
Show Gist options
  • Save feuGeneA/30204a623c6e3970984559e47c01c0c7 to your computer and use it in GitHub Desktop.
Save feuGeneA/30204a623c6e3970984559e47c01c0c7 to your computer and use it in GitHub Desktop.
warnings and errors from `yarn test`
gene@precision5510:~/feuGeneA_assignment$ yarn test
yarn run v1.6.0
$ npm run compile; npm run generate-typings; npm run transpile; npm run migrate; truffle test transpiled/test/ts/cdo.js
> @dharmaprotocol/contracts@0.0.40 compile /home/gene/feuGeneA_assignment
> truffle compile --all
Compiling ./contracts/CDO.sol...
Compiling ./contracts/Collateralizer.sol...
Compiling ./contracts/ContractRegistry.sol...
Compiling ./contracts/DebtKernel.sol...
Compiling ./contracts/DebtRegistry.sol...
Compiling ./contracts/DebtToken.sol...
Compiling ./contracts/ERC165.sol...
Compiling ./contracts/Migrations.sol...
Compiling ./contracts/RepaymentRouter.sol...
Compiling ./contracts/TermsContract.sol...
Compiling ./contracts/TokenRegistry.sol...
Compiling ./contracts/TokenTransferProxy.sol...
Compiling ./contracts/examples/CollateralizedSimpleInterestTermsContract.sol...
Compiling ./contracts/examples/SimpleInterestTermsContract.sol...
Compiling ./contracts/libraries/PermissionsLib.sol...
Compiling ./contracts/test/DummyContract.sol...
Compiling ./contracts/test/dummy_tokens/DummyToken.sol...
Compiling ./contracts/test/dummy_tokens/DummyTokenRegistry.sol...
Compiling ./contracts/test/mocks/MockCollateralizedTermsContract.sol...
Compiling ./contracts/test/mocks/MockContract.sol...
Compiling ./contracts/test/mocks/MockDebtRegistry.sol...
Compiling ./contracts/test/mocks/MockDebtRegsitry.sol...
Compiling ./contracts/test/mocks/MockDebtToken.sol...
Compiling ./contracts/test/mocks/MockERC20Token.sol...
Compiling ./contracts/test/mocks/MockERC721Receiver.sol...
Compiling ./contracts/test/mocks/MockERC721Token.sol...
Compiling ./contracts/test/mocks/MockTermsContract.sol...
Compiling ./contracts/test/mocks/MockTokenRegistry.sol...
Compiling ./contracts/test/mocks/MockTokenTransferProxy.sol...
Compiling ./contracts/test/mocks/MockZeroExExchange.sol...
Compiling ./contracts/test/terms_contracts/IncompatibleTermsContract.sol...
Compiling ./contracts/wallet/DharmaMultiSigWallet.sol...
Compiling ./contracts/wallet/MultiSigWallet.sol...
Compiling zeppelin-solidity/contracts/AddressUtils.sol...
Compiling zeppelin-solidity/contracts/lifecycle/Pausable.sol...
Compiling zeppelin-solidity/contracts/math/SafeMath.sol...
Compiling zeppelin-solidity/contracts/ownership/Ownable.sol...
Compiling zeppelin-solidity/contracts/token/ERC20/BasicToken.sol...
Compiling zeppelin-solidity/contracts/token/ERC20/ERC20.sol...
Compiling zeppelin-solidity/contracts/token/ERC20/ERC20Basic.sol...
Compiling zeppelin-solidity/contracts/token/ERC20/MintableToken.sol...
Compiling zeppelin-solidity/contracts/token/ERC20/StandardToken.sol...
Compiling zeppelin-solidity/contracts/token/ERC721/DeprecatedERC721.sol...
Compiling zeppelin-solidity/contracts/token/ERC721/ERC721.sol...
Compiling zeppelin-solidity/contracts/token/ERC721/ERC721Basic.sol...
Compiling zeppelin-solidity/contracts/token/ERC721/ERC721BasicToken.sol...
Compiling zeppelin-solidity/contracts/token/ERC721/ERC721Receiver.sol...
Compiling zeppelin-solidity/contracts/token/ERC721/ERC721Token.sol...
Compilation warnings encountered:
/home/gene/feuGeneA_assignment/contracts/test/mocks/MockDebtToken.sol:145:51: Warning: The type of "int_const 0" was inferred as uint8. This is probably not desired. Use an explicit type to silence this warning.
functionCalledWithArgs("pause", keccak256(0));
^
,/home/gene/feuGeneA_assignment/contracts/test/mocks/MockDebtToken.sol:153:61: Warning: The type of "int_const 0" was inferred as uint8. This is probably not desired. Use an explicit type to silence this warning.
return wasFunctionCalledWithArgs("pause", keccak256(0));
^
,/home/gene/feuGeneA_assignment/contracts/examples/SimpleInterestTermsContract.sol:116:9: Warning: Unused function parameter. Remove or comment out the variable name to silence this warning.
address debtor
^------------^
,/home/gene/feuGeneA_assignment/contracts/test/terms_contracts/IncompatibleTermsContract.sol:40:9: Warning: Unused function parameter. Remove or comment out the variable name to silence this warning.
bytes32 agreementId,
^-----------------^
,/home/gene/feuGeneA_assignment/contracts/test/terms_contracts/IncompatibleTermsContract.sol:41:9: Warning: Unused function parameter. Remove or comment out the variable name to silence this warning.
address debtor
^------------^
,/home/gene/feuGeneA_assignment/contracts/test/terms_contracts/IncompatibleTermsContract.sol:59:9: Warning: Unused function parameter. Remove or comment out the variable name to silence this warning.
bytes32 agreementId,
^-----------------^
,/home/gene/feuGeneA_assignment/contracts/test/terms_contracts/IncompatibleTermsContract.sol:60:9: Warning: Unused function parameter. Remove or comment out the variable name to silence this warning.
address payer,
^-----------^
,/home/gene/feuGeneA_assignment/contracts/test/terms_contracts/IncompatibleTermsContract.sol:61:9: Warning: Unused function parameter. Remove or comment out the variable name to silence this warning.
address beneficiary,
^-----------------^
,/home/gene/feuGeneA_assignment/contracts/test/terms_contracts/IncompatibleTermsContract.sol:62:9: Warning: Unused function parameter. Remove or comment out the variable name to silence this warning.
uint256 unitsOfRepayment,
^----------------------^
,/home/gene/feuGeneA_assignment/contracts/test/terms_contracts/IncompatibleTermsContract.sol:63:9: Warning: Unused function parameter. Remove or comment out the variable name to silence this warning.
address tokenAddress
^------------------^
,/home/gene/feuGeneA_assignment/contracts/test/terms_contracts/IncompatibleTermsContract.sol:78:9: Warning: Unused function parameter. Remove or comment out the variable name to silence this warning.
bytes32 agreementId,
^-----------------^
,/home/gene/feuGeneA_assignment/contracts/test/terms_contracts/IncompatibleTermsContract.sol:79:9: Warning: Unused function parameter. Remove or comment out the variable name to silence this warning.
uint256 timestamp
^---------------^
,/home/gene/feuGeneA_assignment/contracts/test/terms_contracts/IncompatibleTermsContract.sol:91:35: Warning: Unused function parameter. Remove or comment out the variable name to silence this warning.
function getValueRepaidToDate(bytes32 agreementId)
^-----------------^
,/home/gene/feuGeneA_assignment/contracts/test/terms_contracts/IncompatibleTermsContract.sol:100:9: Warning: Unused function parameter. Remove or comment out the variable name to silence this warning.
bytes32 _agreementId
^------------------^
,/home/gene/feuGeneA_assignment/contracts/DebtKernel.sol:666:16: Warning: Function declared as view, but this expression (potentially) modifies the state and thus requires non-payable (the default) or payable.
return ERC20(token).balanceOf.gas(EXTERNAL_QUERY_GAS_LIMIT)(owner);
^--------------------------------------------------^
,/home/gene/feuGeneA_assignment/contracts/DebtKernel.sol:681:16: Warning: Function declared as view, but this expression (potentially) modifies the state and thus requires non-payable (the default) or payable.
return ERC20(token).allowance.gas(EXTERNAL_QUERY_GAS_LIMIT)(owner, TOKEN_TRANSFER_PROXY);
^--------------------------------------------------^
,/home/gene/feuGeneA_assignment/contracts/examples/CollateralizedSimpleInterestTermsContract.sol:57:46: Warning: Function declared as view, but this expression (potentially) modifies the state and thus requires non-payable (the default) or payable.
SimpleInterestParams memory params = unpackParamsForAgreementID(_agreementId);
^--------------------------------------^
,/home/gene/feuGeneA_assignment/contracts/examples/SimpleInterestTermsContract.sol:216:46: Warning: Function declared as view, but this expression (potentially) modifies the state and thus requires non-payable (the default) or payable.
SimpleInterestParams memory params = unpackParamsForAgreementID(agreementId);
^-------------------------------------^
,/home/gene/feuGeneA_assignment/contracts/examples/SimpleInterestTermsContract.sol:217:38: Warning: Function declared as view, but this expression (potentially) modifies the state and thus requires non-payable (the default) or payable.
uint principalPlusInterest = calculateTotalPrincipalPlusInterest(params);
^-----------------------------------------^
,/home/gene/feuGeneA_assignment/contracts/examples/SimpleInterestTermsContract.sol:228:29: Warning: Function declared as view, but this expression (potentially) modifies the state and thus requires non-payable (the default) or payable.
uint numUnits = numAmortizationUnitsForTimestamp(timestamp, params);
^-------------------------------------------------^
,/home/gene/feuGeneA_assignment/contracts/examples/SimpleInterestTermsContract.sol:306:46: Warning: Function declared as view, but this expression (potentially) modifies the state and thus requires non-payable (the default) or payable.
SimpleInterestParams memory params = unpackParamsForAgreementID(_agreementId);
^--------------------------------------^
,/home/gene/feuGeneA_assignment/contracts/examples/SimpleInterestTermsContract.sol:319:5: Warning: Function state mutability can be restricted to pure
function numAmortizationUnitsForTimestamp(
^
Spanning multiple lines.
,/home/gene/feuGeneA_assignment/contracts/examples/SimpleInterestTermsContract.sol:339:5: Warning: Function state mutability can be restricted to pure
function calculateTotalPrincipalPlusInterest(
^
Spanning multiple lines.
,/home/gene/feuGeneA_assignment/contracts/examples/SimpleInterestTermsContract.sol:356:5: Warning: Function state mutability can be restricted to view
function unpackParamsForAgreementID(
^
Spanning multiple lines.
,/home/gene/feuGeneA_assignment/contracts/wallet/DharmaMultiSigWallet.sol:184:5: Warning: Function state mutability can be restricted to pure
function _isPauseFunctionTransaction(bytes data)
^
Spanning multiple lines.
Writing artifacts to ./build/contracts
> @dharmaprotocol/contracts@0.0.40 generate-typings /home/gene/feuGeneA_assignment
> abi-gen --abis './build/contracts/*.json' --out './types/generated' --template './types/contract_templates/contract.mustache' --partials './types/contract_templates/partials/*.mustache'
Found 5 partial templates
Found 52 ABI files
Processing: AddressUtils...
Created: types/generated/address_utils.ts
Processing: BasicToken...
Created: types/generated/basic_token.ts
Processing: CDO...
Created: types/generated/cdo.ts
Processing: CDOFactory...
Created: types/generated/c_d_o_factory.ts
Processing: CollateralizedSimpleInterestTermsContract...
Created: types/generated/collateralized_simple_interest_terms_contract.ts
Processing: Collateralizer...
Created: types/generated/collateralizer.ts
Processing: ContractRegistry...
Created: types/generated/contract_registry.ts
Processing: DebtKernel...
Created: types/generated/debt_kernel.ts
Processing: DebtRegistry...
Created: types/generated/debt_registry.ts
Processing: DebtToken...
Created: types/generated/debt_token.ts
Processing: DeprecatedERC721...
Created: types/generated/deprecated_e_r_c721.ts
Processing: DharmaMultiSigWallet...
Created: types/generated/dharma_multi_sig_wallet.ts
Processing: DummyContract...
Created: types/generated/dummy_contract.ts
Processing: DummyToken...
Created: types/generated/dummy_token.ts
Processing: DummyTokenRegistry...
Created: types/generated/dummy_token_registry.ts
Processing: ERC165...
Created: types/generated/erc165.ts
Processing: ERC20...
Created: types/generated/erc20.ts
Processing: ERC20Basic...
Created: types/generated/e_r_c20_basic.ts
Processing: ERC721...
Created: types/generated/erc721.ts
Processing: ERC721Basic...
Created: types/generated/e_r_c721_basic.ts
Processing: ERC721BasicToken...
Created: types/generated/e_r_c721_basic_token.ts
Processing: ERC721Enumerable...
Created: types/generated/e_r_c721_enumerable.ts
Processing: ERC721Metadata...
Created: types/generated/e_r_c721_metadata.ts
Processing: ERC721Receiver...
Created: types/generated/e_r_c721_receiver.ts
Processing: ERC721Token...
Created: types/generated/e_r_c721_token.ts
Processing: IncompatibleTermsContract...
Created: types/generated/incompatible_terms_contract.ts
Processing: Migrations...
Created: types/generated/migrations.ts
Processing: MintableToken...
Created: types/generated/mintable_token.ts
Processing: MockCollateralizedTermsContract...
Created: types/generated/mock_collateralized_terms_contract.ts
Processing: MockContract...
Created: types/generated/mock_contract.ts
Processing: MockDebtRegistry...
Created: types/generated/mock_debt_registry.ts
Processing: MockDebtToken...
Created: types/generated/mock_debt_token.ts
Processing: MockERC20Token...
Created: types/generated/mock_e_r_c20_token.ts
Processing: MockERC721Receiver...
Created: types/generated/mock_e_r_c721_receiver.ts
Processing: MockERC721Token...
Created: types/generated/mock_e_r_c721_token.ts
Processing: MockTermsContract...
Created: types/generated/mock_terms_contract.ts
Processing: MockTokenRegistry...
Created: types/generated/mock_token_registry.ts
Processing: MockTokenTransferProxy...
Created: types/generated/mock_token_transfer_proxy.ts
Processing: MockZeroExExchange...
Created: types/generated/mock_zero_ex_exchange.ts
Processing: MultiSigWallet...
Created: types/generated/multi_sig_wallet.ts
Processing: Ownable...
Created: types/generated/ownable.ts
Processing: Pausable...
Created: types/generated/pausable.ts
Processing: PermissionEvents...
Created: types/generated/permission_events.ts
Processing: PermissionsLib...
Created: types/generated/permissions_lib.ts
Processing: RepaymentRouter...
Created: types/generated/repayment_router.ts
Processing: SafeMath...
Created: types/generated/safe_math.ts
Processing: SimpleInterestTermsContract...
Created: types/generated/simple_interest_terms_contract.ts
Processing: StandardToken...
Created: types/generated/standard_token.ts
Processing: TermsContract...
Created: types/generated/terms_contract.ts
Processing: TokenRegistry...
Created: types/generated/token_registry.ts
Processing: TokenTransferProxy...
Created: types/generated/token_transfer_proxy.ts
Processing: TrancheToken...
Created: types/generated/tranche_token.ts
> @dharmaprotocol/contracts@0.0.40 transpile /home/gene/feuGeneA_assignment
> rm -rf ./transpiled; copyfiles ./build/**/* ./transpiled; tsc
test/ts/unit/collateralized_simple_interest_terms_contract.ts(626,44): error TS2339: Property 'mockGetTermsContractParameters' does not exist on type 'MockDebtRegistryContract'.
test/ts/unit/collateralized_simple_interest_terms_contract.ts(694,40): error TS2339: Property 'mockGetTermsContractParameters' does not exist on type 'MockDebtRegistryContract'.
test/ts/unit/collateralized_simple_interest_terms_contract.ts(699,40): error TS2339: Property 'mockGetIssuanceBlockTimestamp' does not exist on type 'MockDebtRegistryContract'.
test/ts/unit/simple_interest_terms_contract.ts(583,40): error TS2339: Property 'mockGetTermsContractParameters' does not exist on type 'MockDebtRegistryContract'.
test/ts/unit/simple_interest_terms_contract.ts(651,36): error TS2339: Property 'mockGetTermsContractParameters' does not exist on type 'MockDebtRegistryContract'.
test/ts/unit/simple_interest_terms_contract.ts(656,36): error TS2339: Property 'mockGetIssuanceBlockTimestamp' does not exist on type 'MockDebtRegistryContract'.
types/generated/debt_token.ts(1080,12): error TS2300: Duplicate identifier 'safeTransferFrom'.
types/generated/debt_token.ts(1080,12): error TS2403: Subsequent variable declarations must have the same type. Variable 'safeTransferFrom' must be of type '{ sendTransactionAsync(_from: string, _to: string, _tokenId: BigNumber, txData?: TxData): Promise...', but here has type '{ sendTransactionAsync(_from: string, _to: string, _tokenId: BigNumber, _data: string, txData?: T...'.
types/generated/mock_collateralized_terms_contract.ts(702,12): error TS2300: Duplicate identifier 'reset'.
types/generated/mock_collateralized_terms_contract.ts(702,12): error TS2403: Subsequent variable declarations must have the same type. Variable 'reset' must be of type '{ sendTransactionAsync(txData?: TxData): Promise<string>; estimateGasAsync(txData?: TxData): Prom...', but here has type '{ sendTransactionAsync(agreementId: string, txData?: TxData): Promise<string>; estimateGasAsync(a...'.
utils/web3_utils.ts(56,17): error TS7017: Element implicitly has an 'any' type because type 'JSONRPCResponsePayload' has no index signature.
utils/web3_utils.ts(56,51): error TS7017: Element implicitly has an 'any' type because type 'JSONRPCResponsePayload' has no index signature.
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! @dharmaprotocol/contracts@0.0.40 transpile: `rm -rf ./transpiled; copyfiles ./build/**/* ./transpiled; tsc`
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the @dharmaprotocol/contracts@0.0.40 transpile script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/gene/.npm/_logs/2018-05-21T13_34_04_010Z-debug.log
> @dharmaprotocol/contracts@0.0.40 migrate /home/gene/feuGeneA_assignment
> truffle migrate
Compiling ./contracts/test/mocks/MockContract.sol...
Compiling ./contracts/test/mocks/MockDebtRegistry.sol...
Writing artifacts to ./build/contracts
Could not connect to your Ethereum client. Please check that your Ethereum client:
- is running
- is accepting RPC connections (i.e., "--rpc" option is used in geth)
- is accessible over the network
- is properly configured in your Truffle configuration file (truffle.js)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @dharmaprotocol/contracts@0.0.40 migrate: `truffle migrate`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the @dharmaprotocol/contracts@0.0.40 migrate script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/gene/.npm/_logs/2018-05-21T13_34_10_530Z-debug.log
Could not connect to your Ethereum client. Please check that your Ethereum client:
- is running
- is accepting RPC connections (i.e., "--rpc" option is used in geth)
- is accessible over the network
- is properly configured in your Truffle configuration file (truffle.js)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment