Skip to main content

E0054: Token has multiple impl Token blocks

A token definition may contain only one impl Token { ... } block. The built-in Token interface must be implemented exactly once.

Example (error)

token MyToken {
mint fn mint() {}
impl Token {
fn attach(to: Utxo) {}
fn detach(source: Utxo) {}
}
impl Token {
fn attach(to: Utxo) {}
fn detach(source: Utxo) {}
}
}

Fix

Keep a single impl Token block:

token MyToken {
mint fn mint() {}
impl Token {
fn attach(to: Utxo) {}
fn detach(source: Utxo) {}
}
}