Skip to content

Commit

Permalink
qr drops for 3 event
Browse files Browse the repository at this point in the history
1. QR drops for Melbourne, Lisbon+Istanbul, Community distribution
2. Script fixes
3. Deploy script upgrade
  • Loading branch information
galekseev committed Nov 1, 2023
1 parent fb64ddf commit 081a754
Show file tree
Hide file tree
Showing 10 changed files with 1,287 additions and 3 deletions.
29 changes: 29 additions & 0 deletions deploy/qr/deploy_qr_30.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
// const { assert } = require('chai');
const { deployAndGetContract } = require('@1inch/solidity-utils');
const hre = require('hardhat');
const { getChainId } = hre;

// change number
const VERSION = 30;

module.exports = async ({ deployments, getNamedAccounts }) => {
console.log('running deploy script: deploy script ' + VERSION.toString());
console.log('network id ', await getChainId());

const { deploy } = deployments;

Check failure on line 13 in deploy/qr/deploy_qr_30.js

View workflow job for this annotation

GitHub Actions / lint

'deploy' is assigned a value but never used
const { deployer } = await getNamedAccounts();

// 1inch address, merkle root, tree height
const args = ['0x111111111117dC0aa78b770fA6A738034120C302', '0xda1ca6d8cacfb49efbcc261127e6b884', 9];

const deployScriptName = 'MerkleDrop128-' + VERSION.toString();
await deployAndGetContract({
contractName: 'SignatureMerkleDrop128',
constructorArgs: args,
deployments,
deployer,
deploymentName: deployScriptName,
});
};

module.exports.skip = async () => true;
29 changes: 29 additions & 0 deletions deploy/qr/deploy_qr_31.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
// const { assert } = require('chai');
const { deployAndGetContract } = require('@1inch/solidity-utils');
const hre = require('hardhat');
const { getChainId } = hre;

// change number
const VERSION = 31;

module.exports = async ({ deployments, getNamedAccounts }) => {
console.log('running deploy script: deploy script ' + VERSION.toString());
console.log('network id ', await getChainId());

const { deploy } = deployments;

Check failure on line 13 in deploy/qr/deploy_qr_31.js

View workflow job for this annotation

GitHub Actions / lint

'deploy' is assigned a value but never used
const { deployer } = await getNamedAccounts();

// 1inch address, merkle root, tree height
const args = ['0x111111111117dC0aa78b770fA6A738034120C302', '0x31f7c27ee4bb56915c674c4d386027ce', 10];

const deployScriptName = 'MerkleDrop128-' + VERSION.toString();
await deployAndGetContract({
contractName: 'SignatureMerkleDrop128',
constructorArgs: args,
deployments,
deployer,
deploymentName: deployScriptName,
});
};

module.exports.skip = async () => true;
29 changes: 29 additions & 0 deletions deploy/qr/deploy_qr_32.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
// const { assert } = require('chai');
const { deployAndGetContract } = require('@1inch/solidity-utils');
const hre = require('hardhat');
const { getChainId } = hre;

// change number
const VERSION = 32;

module.exports = async ({ deployments, getNamedAccounts }) => {
console.log('running deploy script: deploy script ' + VERSION.toString());
console.log('network id ', await getChainId());

const { deploy } = deployments;

Check failure on line 13 in deploy/qr/deploy_qr_32.js

View workflow job for this annotation

GitHub Actions / lint

'deploy' is assigned a value but never used
const { deployer } = await getNamedAccounts();

// 1inch address, merkle root, tree height
const args = ['0x111111111117dC0aa78b770fA6A738034120C302', '0x5eb75cc30626dc3f940842c5bf49f60b', 7];

const deployScriptName = 'MerkleDrop128-' + VERSION.toString();
await deployAndGetContract({
contractName: 'SignatureMerkleDrop128',
constructorArgs: args,
deployments,
deployer,
deploymentName: deployScriptName,
});
};

module.exports.skip = async () => true;
364 changes: 364 additions & 0 deletions deployments/mainnet/MerkleDrop128-30.json

Large diffs are not rendered by default.

364 changes: 364 additions & 0 deletions deployments/mainnet/MerkleDrop128-31.json

Large diffs are not rendered by default.

364 changes: 364 additions & 0 deletions deployments/mainnet/MerkleDrop128-32.json

Large diffs are not rendered by default.

104 changes: 104 additions & 0 deletions deployments/mainnet/solcInputs/47fea3388df766f91a2a4fe8b98baa6b.json

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@
"lint:js:fix": "eslint . --fix",
"lint:sol": "solhint --max-warnings 0 \"contracts/**/*.sol\"",
"lint:sol:fix": "solhint --max-warnings 0 \"contracts/**/*.sol\" --fix",
"test": "hardhat test"
"test": "hardhat test",
"genqr": "node ./src/qrdrop.js"
}
}
2 changes: 1 addition & 1 deletion src/.latest
Original file line number Diff line number Diff line change
@@ -1 +1 @@
29
32
2 changes: 1 addition & 1 deletion src/qrdrop.js
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ function validateArgs () {
}

function isNotIntegerAboveZero (value) {
return !(Number.isInteger(value) && value > 0);
return !(value > 0);
}

function validateVersion (version, latestFile) {
Expand Down

0 comments on commit 081a754

Please sign in to comment.