@axelar-network/axelar-cgp-solidity
Advanced tools
Comparing version 4.3.0 to 4.3.1
{ | ||
"_format": "hh-sol-dbg-1", | ||
"buildInfo": "../../../build-info/315821eb839ee33a4c93b18a261ba82a.json" | ||
"buildInfo": "../../../build-info/8993ef220c11c8b6d02ae62ffa83d05c.json" | ||
} |
{ | ||
"_format": "hh-sol-dbg-1", | ||
"buildInfo": "../../../build-info/315821eb839ee33a4c93b18a261ba82a.json" | ||
"buildInfo": "../../../build-info/8993ef220c11c8b6d02ae62ffa83d05c.json" | ||
} |
{ | ||
"_format": "hh-sol-dbg-1", | ||
"buildInfo": "../../../build-info/315821eb839ee33a4c93b18a261ba82a.json" | ||
"buildInfo": "../../../build-info/8993ef220c11c8b6d02ae62ffa83d05c.json" | ||
} |
{ | ||
"_format": "hh-sol-dbg-1", | ||
"buildInfo": "../../../build-info/315821eb839ee33a4c93b18a261ba82a.json" | ||
"buildInfo": "../../../build-info/8993ef220c11c8b6d02ae62ffa83d05c.json" | ||
} |
{ | ||
"_format": "hh-sol-dbg-1", | ||
"buildInfo": "../../../build-info/315821eb839ee33a4c93b18a261ba82a.json" | ||
"buildInfo": "../../../build-info/8993ef220c11c8b6d02ae62ffa83d05c.json" | ||
} |
{ | ||
"_format": "hh-sol-dbg-1", | ||
"buildInfo": "../../../build-info/315821eb839ee33a4c93b18a261ba82a.json" | ||
"buildInfo": "../../../build-info/8993ef220c11c8b6d02ae62ffa83d05c.json" | ||
} |
{ | ||
"_format": "hh-sol-dbg-1", | ||
"buildInfo": "../../../build-info/315821eb839ee33a4c93b18a261ba82a.json" | ||
"buildInfo": "../../../build-info/8993ef220c11c8b6d02ae62ffa83d05c.json" | ||
} |
{ | ||
"_format": "hh-sol-dbg-1", | ||
"buildInfo": "../../../build-info/315821eb839ee33a4c93b18a261ba82a.json" | ||
"buildInfo": "../../../build-info/8993ef220c11c8b6d02ae62ffa83d05c.json" | ||
} |
{ | ||
"_format": "hh-sol-dbg-1", | ||
"buildInfo": "../../../build-info/315821eb839ee33a4c93b18a261ba82a.json" | ||
"buildInfo": "../../../build-info/8993ef220c11c8b6d02ae62ffa83d05c.json" | ||
} |
{ | ||
"_format": "hh-sol-dbg-1", | ||
"buildInfo": "../../../build-info/315821eb839ee33a4c93b18a261ba82a.json" | ||
"buildInfo": "../../../build-info/8993ef220c11c8b6d02ae62ffa83d05c.json" | ||
} |
{ | ||
"_format": "hh-sol-dbg-1", | ||
"buildInfo": "../../../build-info/315821eb839ee33a4c93b18a261ba82a.json" | ||
"buildInfo": "../../../build-info/8993ef220c11c8b6d02ae62ffa83d05c.json" | ||
} |
{ | ||
"_format": "hh-sol-dbg-1", | ||
"buildInfo": "../../../build-info/315821eb839ee33a4c93b18a261ba82a.json" | ||
"buildInfo": "../../../build-info/8993ef220c11c8b6d02ae62ffa83d05c.json" | ||
} |
{ | ||
"_format": "hh-sol-dbg-1", | ||
"buildInfo": "../../../build-info/315821eb839ee33a4c93b18a261ba82a.json" | ||
"buildInfo": "../../../build-info/8993ef220c11c8b6d02ae62ffa83d05c.json" | ||
} |
{ | ||
"_format": "hh-sol-dbg-1", | ||
"buildInfo": "../../../build-info/315821eb839ee33a4c93b18a261ba82a.json" | ||
"buildInfo": "../../../build-info/8993ef220c11c8b6d02ae62ffa83d05c.json" | ||
} |
{ | ||
"_format": "hh-sol-dbg-1", | ||
"buildInfo": "../../../build-info/315821eb839ee33a4c93b18a261ba82a.json" | ||
"buildInfo": "../../../build-info/8993ef220c11c8b6d02ae62ffa83d05c.json" | ||
} |
{ | ||
"_format": "hh-sol-dbg-1", | ||
"buildInfo": "../../../build-info/315821eb839ee33a4c93b18a261ba82a.json" | ||
"buildInfo": "../../../build-info/8993ef220c11c8b6d02ae62ffa83d05c.json" | ||
} |
{ | ||
"_format": "hh-sol-dbg-1", | ||
"buildInfo": "../../../build-info/315821eb839ee33a4c93b18a261ba82a.json" | ||
"buildInfo": "../../../build-info/8993ef220c11c8b6d02ae62ffa83d05c.json" | ||
} |
{ | ||
"_format": "hh-sol-dbg-1", | ||
"buildInfo": "../../../build-info/315821eb839ee33a4c93b18a261ba82a.json" | ||
"buildInfo": "../../../build-info/8993ef220c11c8b6d02ae62ffa83d05c.json" | ||
} |
{ | ||
"name": "@axelar-network/axelar-cgp-solidity", | ||
"version": "4.3.0", | ||
"version": "4.3.1", | ||
"description": "Ethereum Smart Contracts for Axelar Network", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -628,2 +628,60 @@ const { sortBy } = require('lodash'); | ||
}); | ||
it('should allow the operators to burn the external token multiple times from the same address', async () => { | ||
const destinationBtcAddress = '1KDeqnsTRzFeXRaENA6XLN1EwdTujchr4L'; | ||
const salt = id(`${destinationBtcAddress}-${owner.address}-${Date.now()}`); | ||
const depositHandlerAddress = getCreate2Address(gateway.address, salt, keccak256(depositHandlerFactory.bytecode)); | ||
const commandIDs = [getRandomID(), getRandomID()]; | ||
const burnAmount = amount / 2; | ||
await externalToken.transfer(depositHandlerAddress, burnAmount); | ||
const command = getBurnCommand(externalSymbol, salt); | ||
const input = await getSignedWeightedExecuteInput( | ||
buildCommandBatch(CHAIN_ID, commandIDs, ['burnToken', 'burnToken'], [command, command]), | ||
operators, | ||
getWeights(operators), | ||
threshold, | ||
operators.slice(0, threshold), | ||
); | ||
const tx = await gateway.execute(input); | ||
await expect(tx) | ||
.to.emit(gateway, 'Executed') | ||
.withArgs(commandIDs[0]) | ||
.and.to.emit(gateway, 'Executed') | ||
.withArgs(commandIDs[1]) | ||
.and.to.emit(externalToken, 'Transfer') | ||
.withArgs(depositHandlerAddress, gateway.address, burnAmount); | ||
return externalToken | ||
.balanceOf(depositHandlerAddress) | ||
.then(bigNumberToNumber) | ||
.then((balance) => { | ||
expect(balance).to.eq(0); | ||
}) | ||
.then(() => externalToken.transfer(depositHandlerAddress, burnAmount)) | ||
.then(async () => { | ||
const commandID = getRandomID(); | ||
const input = await getSignedWeightedExecuteInput( | ||
buildCommandBatch(CHAIN_ID, [commandID], ['burnToken'], [getBurnCommand(externalSymbol, salt)]), | ||
operators, | ||
getWeights(operators), | ||
threshold, | ||
operators.slice(0, threshold), | ||
); | ||
const tx = await gateway.execute(input); | ||
await expect(tx) | ||
.to.emit(gateway, 'Executed') | ||
.withArgs(commandID) | ||
.and.to.emit(externalToken, 'Transfer') | ||
.withArgs(depositHandlerAddress, gateway.address, burnAmount); | ||
return externalToken.balanceOf(depositHandlerAddress); | ||
}) | ||
.then(bigNumberToNumber) | ||
.then((balance) => { | ||
expect(balance).to.eq(0); | ||
}); | ||
}); | ||
}); | ||
@@ -630,0 +688,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
402908
7965