aptos-core
aptos-core copied to clipboard
[Feature Request] Interface Pattern
🚀 Feature Request
Interface Pattern for Wallet
Motivation
current wallet use 0x1::coin::transfer to transfer tokens, but how about a token with custom transfer
maybe we need some interface like ERC20
account::module::balance_of(address)
account::module::transfer
No interface, import module source
@dulumao I mean for client side.
wallet app. token interface.
@dulumao I want a coin with custom transfer, but I can not override 0x1::coin::transfer,
and wallet only call 0x1::coin::transfer to transfer, so my coin not work.
interface just a convention that a module should has some functions.
for example.
module Token::erc20 {
public entry fun transfer(){
// interface override.
// your logic or just call 0x::coin::transfer
}
}
maybe move should have some primitive like trait
someone get in touch in upstream https://github.com/move-language/move/issues/449
Yeah, this is a Move feature, not an Aptos, it'd be better to have that conversation upstream for now :).