Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
addresses.map((address: Address) => {
const transferTx = TransferTransaction.create(
Deadline.create(),
address,
[new Mosaic(mosaicId, UInt64.fromUint(amount))],
PlainMessage.create('nem2-sandbox initial coin distribution'),
this.networkType,
UInt64.fromUint(1000000), // 1 XEM fee
)
transferTxes.push(transferTx.toAggregate(publicAccount))
})
addresses.map((address: Address) => {
const transferTx = TransferTransaction.create(
Deadline.create(),
address,
[new Mosaic(mosaicId, UInt64.fromUint(amount))],
PlainMessage.create('nem2-sandbox initial coin distribution'),
this.networkType,
UInt64.fromUint(1000000), // 1 XEM fee
)
transferTxes.push(transferTx.toAggregate(publicAccount))
})
public static createLockFundsTransaction(signedAggregateBondedTransaction: SignedTransaction): LockFundsTransaction {
const lockFundsTransaction = LockFundsTransaction.create(
Deadline.create(),
new Mosaic(new NamespaceId('nem.xem'), UInt64.fromUint(10)),
UInt64.fromUint(480),
signedAggregateBondedTransaction,
signedAggregateBondedTransaction.networkType);
return lockFundsTransaction;
}
public update(fileContent: string, hashFunction: HashFunction): TransferTransaction {
this.hash = hashFunction.nonSignedHashing(fileContent);
const creationTransaction = TransferTransaction.create(
Deadline.create(),
this.sinkAddress,
[
new Mosaic(new NamespaceId('nem.xem'), UInt64.fromUint(10)),
],
PlainMessage.create(this.hash),
this.sinkAddress.networkType,
);
return creationTransaction;
}