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

Notification service uses Contract Kit #225

Closed
jmrossy opened this issue Jul 30, 2019 · 1 comment
Closed

Notification service uses Contract Kit #225

jmrossy opened this issue Jul 30, 2019 · 1 comment

Comments

@jmrossy
Copy link
Contributor

jmrossy commented Jul 30, 2019

Expected Behavior

  1. Remove the config files
  2. Make service get all addresses it needs from the contract kit
  3. Move the remaining configs to the yaml files like blockchain api has

Current Behavior

Addresses are specified statically in the env configs

@sallyjyl
Copy link
Contributor

sallyjyl commented Aug 9, 2019

Made some changes to the contract kit such that addresses for gold token and stable tokens and etc, can be accessed without having to get the contracts from web3 just for that purpose.
Notification services use those addresses, and without those changes notification service would need to dip into the mobile package (where web3 resides currently) to use the addresses in notification services.

Facing the following issue in trying to test by deploying:
Couldn't get npm to install @celo/contractkit from git+https://github.com/sallyjyl/contractKit-test.git due to no such file or directory, chmod '/Users/sally/celo/celo-monorepo/packages/notification-service/node_modules/@celo/contractkit/bin/build-sdk.js.
The error is reproduceable by running: npm install or npm install git+https://github.com/sallyjyl/contractKit-test.git
Work branch: sallyjyl/notif-contract-kit

Here are some of the things I've tried:

  • npm install "git+https://github.com/sallyjyl/contractKit-test.git” fails with the same missing build-sdk.js error.
  • Checked the acceptable GitHub links, and it is accepted (still did try the different git url types).
  • npm install —no-bin-links - doesn’t work (error in postinstall about missing bin/build-sdk.js). So tried removing postinstall in contractKit-test/package.json` => creates node_modules/@celo/contract-kit/, but missing bin/build-sdk.js.
  • Created an empty .npmignore -> no diff
  • npm cache clear -> no diff
  • Updated npm version -> no diff
  • Added “file: [“bin”]” in my notification-services/package.json -> no diff
  • npm deploy -n integration or yarn deploy -n integration both do not work.
  • Tried changing the notification-service/package.json to

Observations:

  • Seems that all the other dependencies are installed except for @celo/contractkit???
  • notification-service/dist/contractkit/contracts is semi-populated with GoldToken.js and StableToken.js (exactly the two that I'm importing in my notification-services changes)
  • I've checked out packages/contractkit from origin/master to revert the changes that I made locally on this branch (package.json in notification-services still points to my contractKit-test) repo. When running yarn, it's running my local package/contractkit from sallyjyl/notif-contract-kit. Can't say much about npm as it's still returning the same error as always (missing build-sdk.js).
  • Error now when running yarn because my notification-service package is using the changes in contractKit-test, but yarn is pulling the local copy of package/contractkit

Because it's always returning the same error about build-sdk.js, not sure where the bug is coming from.

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

No branches or pull requests

3 participants