mirror of
https://github.com/logos-storage/logos-storage-contracts-eth.git
synced 2026-01-03 22:03:08 +00:00
vault: transfer tokens to 0xdead when fund is burned
This commit is contained in:
parent
bbdd614579
commit
6877078f4c
@ -190,6 +190,8 @@ abstract contract VaultBase {
|
||||
require(lock.status() == LockStatus.Locked, LockRequired());
|
||||
|
||||
lock.burned = true;
|
||||
|
||||
_token.safeTransfer(address(0xdead), lock.value);
|
||||
}
|
||||
|
||||
function _withdraw(
|
||||
|
||||
@ -510,6 +510,16 @@ describe("Vault", function () {
|
||||
await expect(await vault.getBalance(fund, account2.address)).to.equal(0)
|
||||
await expect(await vault.getBalance(fund, account3.address)).to.equal(0)
|
||||
})
|
||||
|
||||
it("moves all tokens in the fund to address 0xdead", async function () {
|
||||
const dead = "0x000000000000000000000000000000000000dead"
|
||||
await vault.transfer(fund, account.address, account2.address, 10)
|
||||
await vault.transfer(fund, account.address, account3.address, 10)
|
||||
const before = await token.balanceOf(dead)
|
||||
await vault.burnAll(fund)
|
||||
const after = await token.balanceOf(dead)
|
||||
expect(after - before).to.equal(amount)
|
||||
})
|
||||
})
|
||||
|
||||
describe("withdrawing", function () {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user