Skip to content

Commit

Permalink
csp batch 6. (#155)
Browse files Browse the repository at this point in the history
  • Loading branch information
mr13tech authored Oct 19, 2023
1 parent 9e2e4a1 commit bd3d560
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion hardhat.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ const config = {
accounts: {
mnemonic: secret?.POLYGON_SEED
},
gasPrice: 200000000000
gasPrice: 10000000000
},
mumbai: {
url: `https://polygon-mumbai.g.alchemy.com/v2/${secret?.MUMBAI_ALCHEMY_API}`,
Expand Down
5 changes: 5 additions & 0 deletions utils/scripts/data/csp-batch-6.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
email,passport,address,hash
[email protected],1 Ambassador,0x19DAA4282bAD0d8A79527a4bAD47FFf9B52A48Ff,0x55fd051ef50f408c3344fcd53388389fe6de744fa063fde5865ea28451d081d5
[email protected],2 Ambassador + 3 Citizen,0x5160d05f1BCEf410E869978dD9eC0588a6E9a268,0x96829e18e5699ecf551bff7c5dd66bad2d7d1571561c6827ba1f93febc38ef44
[email protected],10 Ambassador + 1 Citizen,0xA1bC8E79cA4e0a84471f72aEAF311CC1178209ed,0xbe2a346a4945ac41ff82a5c07084e45fa9602e4cb8019d60c1f6ab2ed612e7bb
[email protected],2 Citizen,0x914E4F7e40a92520F1D3529FB3254936f03aE6Dc,0x9df9a7fa09791ddc954e6b7aedacdb228f5ab03d7a7b18122cfc08ab1a377460
9 changes: 2 additions & 7 deletions utils/scripts/spaceibles/spacepass.distribute.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,7 @@ async function main() {
const address = hre.network.name === 'mumbai' ? addressMumbai : addressPolygon
const contract = await ethers.getContractAt(name, address, deployer)


const csvIn = 'utils/scripts/data/csp-batch-5.csv'
const csvIn = 'utils/scripts/data/csp-batch-6.csv'

const csvData = fs.readFileSync(csvIn, 'utf8')

Expand All @@ -57,16 +56,12 @@ async function main() {
skip_empty_lines: true
})

const txs = []
for (const record of records.data) {
const from = deployer.address
const to = record.address
const { ids, amounts } = TransactionBuilder.buildFromPassport(record.passport)
const data = '0x'
await contract.safeBatchTransferFrom(from, to, ids, amounts, data).then(tx => {
record.hash = tx.hash
txs.push(tx)
})
await contract.safeBatchTransferFrom(from, to, ids, amounts, data).then(tx => (record.hash = tx.hash))
}

const updatedCsvData = Papa.unparse(records.data)
Expand Down

0 comments on commit bd3d560

Please sign in to comment.