You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Movescriptions protocol is designed for autonomous worlds, where users in on-chain games or autonomous worlds require different roles and accounts. MovescriptionAccount is created for such scenarios.
Through Sui's "Transfer to Object" functionality, an Object can be simulated as an account. It also binds internally to the NAME movescription(#17), mapping the name to the MovescriptionAccount ObjectID for displaying account names and enabling transfers via names.
Additionally, it supports binding a movescription with metadata as an image to serve as the character's avatar.
Moreover, this account can store the user's Coin assets, Movescription, and other Object items in the game.
Solution
/// Name resolver is a shared object, record name <-> address mapping
struct NameResolver has key{
name_to_account: Table<String, ID>,
account_to_name: Table<ID, String>,
}
struct MovescriptionAccount has key{
id: UID,
create_time: u64,
// $MOVE Movescription
name: Movescription,
}
public fun new_account(resolver: &mut NameResolver, name: &Movescription, ctx: &mut TxContext) : MovescriptionAccount{
//store the name Movescription to the entity
//resolve the name to the account object id.
}
public fun accept_payment<T>(account: &mut Account, sent: Receiving<Coin<T>>);
public fun withdraw<T>(account: &mut MovescriptionAccount, amount: u64, ctx: &mut TxContext): Coin<T>;
public fun accept_movescription(account: &mut Account, sent: Receiving<Movescription>);
public fun withdraw_movescription(account: &mut MovescriptionAccount, tick: String, amount: u64, ctx: &mut TxContext): Movescription;
public fun transfer(self: MovescriptionAccount, to: address){
//other update and check
transfer::transfer(self, to);
}
Motivation
The Movescriptions protocol is designed for autonomous worlds, where users in on-chain games or autonomous worlds require different roles and accounts. MovescriptionAccount is created for such scenarios.
Through Sui's "Transfer to Object" functionality, an Object can be simulated as an account. It also binds internally to the NAME movescription(#17), mapping the name to the MovescriptionAccount ObjectID for displaying account names and enabling transfers via names.
Additionally, it supports binding a movescription with metadata as an image to serve as the character's avatar.
Moreover, this account can store the user's Coin assets, Movescription, and other Object items in the game.
Solution
动机
Movescriptions 协议是一个自主世界的协议,用户在全链游戏或者自主世界中,需要有不同的角色和账户。MovescriptionAccount 为这种场景设计。
通过 Sui 的 Transfer to Object 功能,可以把 Object 模拟成一个账户。同时它内部绑定了 NAME 铭文,将 name 和 MovescriptionAccount ObjectID 做映射。用于展示角色名称以及转账时通过名称进行转账。
另外,也可以支持绑定一个 metadata 为 image 的铭文来做角色的头像。
同时,这个账户可以存储用户的 Coin 资产,Movescription,以及游戏中的其他 Object 道具。
The text was updated successfully, but these errors were encountered: