Prepare for deploying the contracts and build artifacts to npmjs

This commit is contained in:
moody salem
2020-04-14 21:37:28 -04:00
parent 843d02bad0
commit 6cf43db3e1
5 changed files with 297 additions and 580 deletions

View File

@ -1,5 +1,5 @@
{
"solcVersion": "./node_modules/solc",
"compilerVersion": "./node_modules/solc",
"outputType": "all",
"compilerOptions": {
"outputSelection": {

View File

@ -1,4 +1,10 @@
{
"name": "@uniswap/v2-core",
"version": "1.0.0-beta.0",
"files": [
"contracts",
"build"
],
"engines": {
"node": ">=10"
},
@ -6,7 +12,7 @@
"@types/chai": "^4.2.6",
"@types/mocha": "^5.2.7",
"chai": "^4.2.0",
"ethereum-waffle": "^2.3.1",
"ethereum-waffle": "^2.4.1",
"ethereumjs-util": "^6.2.0",
"mocha": "^6.2.2",
"prettier": "^1.19.1",
@ -22,7 +28,8 @@
"compile": "waffle .waffle.json",
"pretest": "yarn compile",
"test": "mocha",
"check-compile-output": "./scripts/check-compile-output.sh"
"check-compile-output": "./scripts/check-compile-output.sh",
"prepare": "yarn compile"
},
"license": "GPL-3.0-or-later"
}

View File

@ -67,19 +67,19 @@ describe('UniswapV2Factory', () => {
it('createPair:gas', async () => {
const gasCost = await factory.estimate.createPair(...TEST_ADDRESSES)
expect(gasCost).to.eq(2513232)
expect(gasCost).to.eq(2512920)
})
it('setFeeTo', async () => {
await expect(factory.connect(other).setFeeTo(other.address)).to.be.reverted // UniswapV2: FORBIDDEN
await expect(factory.connect(other).setFeeTo(other.address)).to.be.revertedWith('UniswapV2: FORBIDDEN')
await factory.setFeeTo(wallet.address)
expect(await factory.feeTo()).to.eq(wallet.address)
})
it('setFeeToSetter', async () => {
await expect(factory.connect(other).setFeeToSetter(other.address)).to.be.reverted // UniswapV2: FORBIDDEN
await expect(factory.connect(other).setFeeToSetter(other.address)).to.be.revertedWith('UniswapV2: FORBIDDEN')
await factory.setFeeToSetter(other.address)
expect(await factory.feeToSetter()).to.eq(other.address)
await expect(factory.setFeeToSetter(wallet.address)).to.be.reverted // UniswapV2: FORBIDDEN
await expect(factory.setFeeToSetter(wallet.address)).to.be.revertedWith('UniswapV2: FORBIDDEN')
})
})

View File

@ -177,7 +177,7 @@ describe('UniswapV2Pair', () => {
await token1.transfer(pair.address, swapAmount)
await mineBlock(provider, (await provider.getBlock('latest')).timestamp + 1)
const gasCost = await pair.estimate.swap(expectedOutputAmount, 0, wallet.address, '0x', overrides)
expect(gasCost).to.eq(79378)
expect(gasCost).to.eq(79136)
})
it('burn', async () => {

854
yarn.lock

File diff suppressed because it is too large Load Diff