mirror of
https://github.com/logos-storage/logos-storage-contracts-eth.git
synced 2026-01-08 08:13:08 +00:00
vault: burn designated/fund allowed when flowing
This commit is contained in:
parent
ad6df66768
commit
0a539fb017
@ -488,18 +488,24 @@ describe("Vault", function () {
|
||||
)
|
||||
})
|
||||
|
||||
it("cannot burn more than all designated tokens", async function () {
|
||||
await expect(
|
||||
vault.burnDesignated(fund, account.address, designated + 1)
|
||||
).to.be.revertedWith("InsufficientBalance")
|
||||
})
|
||||
|
||||
it("moves burned tokens to address 0xdead", async function () {
|
||||
const before = await token.balanceOf(dead)
|
||||
await vault.burnDesignated(fund, account.address, 10)
|
||||
const after = await token.balanceOf(dead)
|
||||
expect(after - before).to.equal(10)
|
||||
})
|
||||
|
||||
it("can burn designated when tokens are flowing", async function () {
|
||||
await vault.flow(fund, account.address, account2.address, 5)
|
||||
await expect(vault.burnDesignated(fund, account.address, designated))
|
||||
.not.to.be.reverted
|
||||
})
|
||||
|
||||
it("cannot burn more than all designated tokens", async function () {
|
||||
await expect(
|
||||
vault.burnDesignated(fund, account.address, designated + 1)
|
||||
).to.be.revertedWith("InsufficientBalance")
|
||||
})
|
||||
})
|
||||
|
||||
describe("burn account", function () {
|
||||
@ -559,6 +565,11 @@ describe("Vault", function () {
|
||||
const after = await token.balanceOf(dead)
|
||||
expect(after - before).to.equal(amount)
|
||||
})
|
||||
|
||||
it("can burn fund when tokens are flowing", async function () {
|
||||
await vault.flow(fund, account.address, account2.address, 5)
|
||||
await expect(vault.burnFund(fund)).not.to.be.reverted
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user