Skip to content

Commit 2b471d9

Browse files
committed
build(ci): publishes on npm
1 parent fdadc6c commit 2b471d9

File tree

9 files changed

+13
-33
lines changed

9 files changed

+13
-33
lines changed

.github/workflows/ci.yaml

-17
Original file line numberDiff line numberDiff line change
@@ -20,23 +20,10 @@ jobs:
2020
uses: actions/setup-node@v2-beta
2121
with:
2222
node-version: '14.x'
23-
registry-url: 'https://npm.pkg.github.com'
24-
scope: '@primitivefinance'
25-
always-auth: true
26-
27-
- name: Authenticate with GitHub package registry
28-
env:
29-
github_token: ${{ secrets.github_token }}
30-
run: echo "//npm.pkg.github.com:_authToken=${{ secrets.github_token }}" >
31-
~/.npmrc
3223

3324
- run: yarn install --ignore-scripts
34-
env:
35-
github_token: ${{ secrets.github_token }}
3625

3726
- name: Lint
38-
env:
39-
github_token: ${{ secrets.github_token }}
4027
uses: wearerequired/lint-action@v1
4128
with:
4229
github_token: ${{ secrets.github_token }}
@@ -45,11 +32,7 @@ jobs:
4532
prettier_extensions: 'css,html,js,json,jsx,md,sass,scss,ts,tsx,vue,yaml,yml,sol'
4633

4734
- name: Typechain
48-
env:
49-
github_token: ${{ secrets.github_token }}
5035
run: yarn typechain
5136

5237
- name: Test
53-
env:
54-
github_token: ${{ secrets.github_token }}
5538
run: yarn test:fast

package.json

+2-5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"name": "@primitivefinance/rmm-core",
2+
"name": "@primitivefi/rmm-core",
33
"version": "2.0.0-beta.1",
44
"description": "Primitive Replicating Market Maker smart contracts",
55
"main": "index.js",
@@ -39,7 +39,7 @@
3939
"@commitlint/config-conventional": "^12.1.4",
4040
"@nomiclabs/hardhat-ethers": "^2.0.2",
4141
"@nomiclabs/hardhat-waffle": "^2.0.1",
42-
"@primitivefinance/rmm-math": "2.0.0-beta.1",
42+
"@primitivefi/rmm-math": "2.0.0-beta.1",
4343
"@typechain/ethers-v5": "^7.0.1",
4444
"@typechain/hardhat": "^2.2.0",
4545
"@types/chai": "^4.2.21",
@@ -64,9 +64,6 @@
6464
"web3-units": "^1.0.0"
6565
},
6666
"postinstall": "typechain",
67-
"publishConfig": {
68-
"registry": "https://npm.pkg.github.com"
69-
},
7067
"release": {
7168
"branches": [
7269
"main"

test/shared/calibration.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { parseWei, Percentage, Time, Wei, toBN, parsePercentage } from 'web3-units'
2-
import { callDelta, callPremium } from '@primitivefinance/rmm-math'
2+
import { callDelta, callPremium } from '@primitivefi/rmm-math'
33
import { computePoolId } from './utils'
44

55
/**

test/shared/matchers/supportSwap.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { BigNumber } from 'ethers'
22
import { EngineTypes } from '../../../types'
3-
import { getSpotPrice } from '@primitivefinance/rmm-math'
3+
import { getSpotPrice } from '@primitivefi/rmm-math'
44
import { parseWei, Wei } from 'web3-units'
55
import { Calibration } from '..'
66
import { SwapTestCase } from '../../unit/primitiveEngine/effect/swap.test'

test/shared/swapUtils.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { Wei, Percentage, Time, FixedPointX64, parseFixedPointX64, parseWei, toBN } from 'web3-units'
2-
import { quantilePrime, std_n_pdf, std_n_cdf, inverse_std_n_cdf, nonNegative } from '@primitivefinance/rmm-math'
3-
import { getStableGivenRisky, getRiskyGivenStable, calcInvariant } from '@primitivefinance/rmm-math'
2+
import { quantilePrime, std_n_pdf, std_n_cdf, inverse_std_n_cdf, nonNegative } from '@primitivefi/rmm-math'
3+
import { getStableGivenRisky, getRiskyGivenStable, calcInvariant } from '@primitivefi/rmm-math'
44
import { scaleUp } from '.'
55
import { BigNumber } from 'ethers'
66

test/shared/virtualPool.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { Wei, Time, FixedPointX64, parseFixedPointX64, parseWei, toBN, Percentage } from 'web3-units'
2-
import { quantilePrime, std_n_pdf, inverse_std_n_cdf, nonNegative } from '@primitivefinance/rmm-math'
3-
import { getStableGivenRisky, getRiskyGivenStable, calcInvariant } from '@primitivefinance/rmm-math'
2+
import { quantilePrime, std_n_pdf, inverse_std_n_cdf, nonNegative } from '@primitivefi/rmm-math'
3+
import { getStableGivenRisky, getRiskyGivenStable, calcInvariant } from '@primitivefi/rmm-math'
44
import { Calibration } from './calibration'
55
import { scaleUp } from './utils'
66

test/unit/libraries/replicationMath.test.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import {
77
calcInvariant,
88
inverse_std_n_cdf,
99
std_n_cdf,
10-
} from '@primitivefinance/rmm-math'
10+
} from '@primitivefi/rmm-math'
1111

1212
import { testContext } from '../../shared/testContext'
1313
import { maxError, scaleUp } from '../../shared/utils'

test/unit/primitiveEngine/effect/create.test.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { parseWei } from 'web3-units'
22
import { constants, BigNumber, Wallet } from 'ethers'
3-
import { getStableGivenRisky } from '@primitivefinance/rmm-math'
3+
import { getStableGivenRisky } from '@primitivefi/rmm-math'
44

55
import expect from '../../../shared/expect'
66
import { Calibration } from '../../../shared'

yarn.lock

+3-3
Original file line numberDiff line numberDiff line change
@@ -666,10 +666,10 @@
666666
"@types/sinon-chai" "^3.2.3"
667667
"@types/web3" "1.0.19"
668668

669-
"@primitivefinance/rmm-math@2.0.0-beta.1":
669+
"@primitivefi/rmm-math@2.0.0-beta.1":
670670
version "2.0.0-beta.1"
671-
resolved "https://npm.pkg.github.com/download/@primitivefinance/rmm-math/2.0.0-beta.1/809d0e6f1ee61941e7198c11932cd7ea1d75bf0bbde6302fb926fdc85b30dfa7#b6465d13684738b6bfa3ce944f0ec19e391b31ff"
672-
integrity sha512-JKnGiHe9mXQtk3Zmfr0ecJgGKTIiRwKhaR+gO8ki1+lBJRwmCyp26lrCwPitLtx1yvysZscV+pudc4LXpNexMg==
671+
resolved "https://registry.yarnpkg.com/@primitivefi/rmm-math/-/rmm-math-2.0.0-beta.1.tgz#11c5f26e3cf05c31fa2c3470f36b54d31228c67e"
672+
integrity sha512-yWy5ndaZYj2TjFBT4PFUG6ojzFinx2xsqB666biumW/1OIElkmVJiaMiEjCAhg6pxyBpBWsroKo7lf/oUwcZCA==
673673
dependencies:
674674
gaussian "^1.2.0"
675675
numeric "^1.2.6"

0 commit comments

Comments
 (0)