Skip to content

transaction to burn ~50M tokens#436

Open
vishalchangrani wants to merge 7 commits into
mainfrom
vishal/feb_23_burn
Open

transaction to burn ~50M tokens#436
vishalchangrani wants to merge 7 commits into
mainfrom
vishal/feb_23_burn

Conversation

@vishalchangrani

Copy link
Copy Markdown
Collaborator

No description provided.

Comment on lines +18 to +24
// Store a new FlowToken Vault at a non-standard storage path to hold fraudulent tokens
let emptyVault <- FlowToken.createEmptyVault(vaultType: Type<@FlowToken.Vault>())
serviceAccount.storage.save(<-emptyVault, to: fraudulentFlowTokenVaultPath)

// Load the fraudulent token vault from storage
let fraudulentTokenVault <- serviceAccount.storage.load<@{FungibleToken.Vault}>(from: fraudulentFlowTokenVaultPath)
?? panic("The serviceAccount does not store a FungibleToken.Vault object at the path ".concat(" \(fraudulentFlowTokenVaultPath.toString())."))

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't need to store and then load, we can just use the vault that we withdraw from the main vault.

Comment on lines +37 to +38
// Deposit the tokens into the service account's fraudulent vault
fraudulentTokenVault.deposit(from: <-vault)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This can be deleted

vishalchangrani and others added 3 commits February 19, 2026 17:57
…ent-cadence-tokens.cdc

Co-authored-by: Joshua Hannan <joshua.hannan@dapperlabs.com>
…ent-cadence-tokens.cdc

Co-authored-by: Joshua Hannan <joshua.hannan@dapperlabs.com>
@vishalchangrani

Copy link
Copy Markdown
Collaborator Author

Tested on a forked emulator setup with 200.0 as the amount to burn

$ flow transactions send cadence/transactions/destroy-fraudulent-cadence-tokens.cdc --signer mainnet-service 
Transaction ID: 971a999485c8ffc5bf1bb3a70ba5a28faf3183b786d8620c6fc2805d27bea1e9

Block ID	4f91369262cca67ba3f2864d7c12103936fe9042c839e5a80922e6ca1bce3831
Block Height	142779134
Status		✅ SEALED
ID		971a999485c8ffc5bf1bb3a70ba5a28faf3183b786d8620c6fc2805d27bea1e9
Payer		e467b9dd11fa00df
Authorizers	[e467b9dd11fa00df]

Proposal Key:	
    Address	e467b9dd11fa00df
    Index	0
    Sequence	16

No Payload Signatures

Envelope Signature 0: e467b9dd11fa00df
Signatures (minimized, use --include signatures)

Events:	 
    Index		0
    Type		A.1654653399040a61.FlowToken.TokensWithdrawn
    Tx ID		971a999485c8ffc5bf1bb3a70ba5a28faf3183b786d8620c6fc2805d27bea1e9
    Values
		- amount (UFix64): 200.00000000 
		- from ((Address)?): 0xe467b9dd11fa00df 

    Index	1
    Type	A.f233dcee88fe0abe.FungibleToken.Withdrawn
    Tx ID	971a999485c8ffc5bf1bb3a70ba5a28faf3183b786d8620c6fc2805d27bea1e9
    Values
		- amount (UFix64): 200.00000000 
		- balanceAfter (UFix64): 1721.00887814 
		- from ((Address)?): 0xe467b9dd11fa00df 
		- fromUUID (UInt64): 0 
		- type (String): "A.1654653399040a61.FlowToken.Vault" 
		- withdrawnUUID (UInt64): 152832118783165 

    Index	2
    Type	A.e467b9dd11fa00df.RetrieveFraudulentTokensEvents.FraudulentTokensRetrieved
    Tx ID	971a999485c8ffc5bf1bb3a70ba5a28faf3183b786d8620c6fc2805d27bea1e9
    Values
		- amount (UFix64): 200.00000000 
		- fromAddress (String): "0xe467b9dd11fa00df" 
		- typeIdentifier (String): "A.1654653399040a61.FlowToken.Vault" 

    Index	3
    Type	A.e467b9dd11fa00df.RetrieveFraudulentTokensEvents.FraudulentTokensDestroyed
    Tx ID	971a999485c8ffc5bf1bb3a70ba5a28faf3183b786d8620c6fc2805d27bea1e9
    Values
		- amount (UFix64): 200.00000000 
		- typeIdentifier (String): "A.1654653399040a61.FlowToken.Vault" 



Code (hidden, use --include code)

Payload (hidden, use --include payload)

Fee Events (hidden, use --include fee-events)

vishalchangrani and others added 3 commits February 22, 2026 21:42
…ent-cadence-tokens.cdc

Co-authored-by: Peter Argue <89119817+peterargue@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants