Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

some update on packages version #2

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

xmzheng
Copy link

@xmzheng xmzheng commented Jun 13, 2023

No description provided.

@@ -1,5 +1,5 @@
import { GsnDomainSeparatorType, GsnRequestType } from './TypedRequestData'
import { IForwarderInstance } from '@opengsn/contracts/types/truffle-contracts'
import { IForwarderInstance } from '@oasislabs/opengsn-contracts/types/truffle-contracts'
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought @opengsn/contracts should be resolved to @oasislabs/opengsn-contracts automatically.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ideally, this change should not be neccessary.

@CedarMist
Copy link

CedarMist commented Jun 13, 2023

From a fresh checkout I get an error with yarn. Removing yarn.lock fixes this. Retrying with npm install

$ yarn
yarn install v1.22.19
[1/4] Resolving packages...
warning Lockfile has incorrect entry for "bn.js@^4.11.0". Ignoring it.
[2/4] Fetching packages...
warning Pattern ["ethereumjs-abi@git+https://github.com/ethereumjs/ethereumjs-abi.git"] is trying to unpack in the same destination "/src/.cache/yarn/v6/npm-ethereumjs-abi-0.6.8-integrity/node_modules/ethereumjs-abi" as pattern ["ethereumjs-abi@^0.6.8","ethereumjs-abi@^0.6.8","ethereumjs-abi@^0.6.8","ethereumjs-abi@^0.6.8","ethereumjs-abi@^0.6.8"]. This could result in non-deterministic behavior, skipping.
warning Pattern ["hardhat@npm:@oasislabs/hardhat@^2.12.4"] is trying to unpack in the same destination "/src/.cache/yarn/v6/npm-hardhat-2.13.0-integrity/node_modules/hardhat" as pattern ["hardhat@^2.13.0","hardhat@^2.6.8"]. This could result in non-deterministic behavior, skipping.
error An unexpected error occurred: "Commit hash required".
info If you think this is a bug, please open a bug report with the information provided in "/src/yarn-error.log".
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.

node:events:491
      throw er; // Unhandled 'error' event
      ^

Error: EISDIR: illegal operation on a directory, read
Emitted 'error' event on ReadStream instance at:
    at emitErrorNT (node:internal/streams/destroy:151:8)
    at emitErrorCloseNT (node:internal/streams/destroy:116:3)
    at process.processTicksAndRejections (node:internal/process/task_queues:82:21) {
  errno: -21,
  code: 'EISDIR',
  syscall: 'read'
}

Node.js v18.16.0

@CedarMist
Copy link

The main problem I'm having is I'm unable to run tsc in the oasislabs branch, but can with 3.0.0-beta8 of opengsn/gsn

$ npm run  tsc

> tsc
> yarn lerna-tsc

yarn run v1.22.19
$ lerna run tsc --ignore @opengsn/paymasters
lerna notice cli v5.6.2
lerna notice filter excluding "@opengsn/paymasters"
lerna info filter [ '!@opengsn/paymasters' ]
lerna info Executing command in 7 packages: "yarn run tsc"
lerna ERR! yarn run tsc exited 2 in '@oasislabs/opengsn-cli'
lerna ERR! yarn run tsc stdout:
$ tsc
src/CommandLineStatisticsPresenter.ts(138,19): error TS2322: Type 'string' is not assignable to type 'string[]'.
src/CommandLineStatisticsPresenter.ts(138,39): error TS2322: Type 'string' is not assignable to type 'string[]'.
src/CommandLineStatisticsPresenter.ts(138,47): error TS2322: Type 'string' is not assignable to type 'string[]'.
src/CommandLineStatisticsPresenter.ts(138,58): error TS2322: Type 'string' is not assignable to type 'string[]'.
src/CommandLineStatisticsPresenter.ts(138,68): error TS2322: Type 'number' is not assignable to type 'string[]'.
src/CommandLineStatisticsPresenter.ts(230,19): error TS2322: Type 'string' is not assignable to type 'string[]'.
src/CommandLineStatisticsPresenter.ts(230,25): error TS2322: Type 'number' is not assignable to type 'string[]'.
src/CommandLineStatisticsPresenter.ts(230,37): error TS2322: Type 'string' is not assignable to type 'string[]'.
src/CommandLineStatisticsPresenter.ts(245,19): error TS2322: Type 'string' is not assignable to type 'string[]'.
src/CommandLineStatisticsPresenter.ts(245,28): error TS2322: Type 'string' is not assignable to type 'string[]'.
src/CommandLineStatisticsPresenter.ts(245,37): error TS2322: Type 'number' is not assignable to type 'string[]'.
src/CommandLineStatisticsPresenter.ts(245,74): error TS2322: Type 'number' is not assignable to type 'string[]'.
src/CommandsLogic.ts(31,26): error TS2307: Cannot find module './compiled/StakeManager.json' or its corresponding type declarations.
src/CommandsLogic.ts(32,22): error TS2307: Cannot find module './compiled/RelayHub.json' or its corresponding type declarations.
src/CommandsLogic.ts(33,28): error TS2307: Cannot find module './compiled/RelayRegistrar.json' or its corresponding type declarations.
src/CommandsLogic.ts(34,23): error TS2307: Cannot find module './compiled/Penalizer.json' or its corresponding type declarations.
src/CommandsLogic.ts(35,23): error TS2307: Cannot find module './compiled/TestPaymasterEverythingAccepted.json' or its corresponding type declarations.
src/CommandsLogic.ts(36,23): error TS2307: Cannot find module './compiled/Forwarder.json' or its corresponding type declarations.
src/CommandsLogic.ts(37,36): error TS2307: Cannot find module './compiled/TestWrappedNativeToken.json' or its corresponding type declarations.
src/CommandsLogic.ts(38,27): error TS2307: Cannot find module './compiled/TestRecipient.json' or its corresponding type declarations.
src/CommandsLogic.ts(376,98): error TS2339: Property 'address' does not exist on type 'IStakeManagerInstance'.
src/CommandsLogic.ts(380,77): error TS2339: Property 'address' does not exist on type 'IStakeManagerInstance'.
src/CommandsLogic.ts(498,33): error TS2339: Property 'contract' does not exist on type 'IRelayHubInstance'.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
lerna ERR! yarn run tsc stderr:
error Command failed with exit code 2.
lerna ERR! yarn run tsc exited 2 in '@oasislabs/opengsn-cli'
lerna WARN complete Waiting for 5 child processes to exit. CTRL-C to exit immediately.
error Command failed with exit code 2.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

@CedarMist
Copy link

CedarMist commented Jun 13, 2023

Ok, successful commands were:

rm yarn.lock
npm install
npm run preprocess

Then to launch commands instead of a gsn command, the individual commands in packages/cli/dist/commands can be invoked.

node packages/cli/dist/commands/gsn.js

node  dist/commands/gsn-relayer-run.js --relayHubAddress 0xc4423AB6133B06e4e60D594Ac49abE53374124b3 --managerStakeTokenAddress 0x6Ed21672c0c26Daa32943F7b1cA1f1d0ABdbac66 --ownerAddress '0xfA3AC9f65C9D75EE3978ab76c6a1105f03156204' --ethereumNodeUrl 'https://testnet.sapphire.oasis.dev/' --workdir .

etc.

Then for development, run the tsc compiler in background

npm run lerna-watch-tsc

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants