diff --git a/crates/rooch-open-rpc-spec/schemas/openrpc.json b/crates/rooch-open-rpc-spec/schemas/openrpc.json index da81054d53..f0f4b28ea8 100644 --- a/crates/rooch-open-rpc-spec/schemas/openrpc.json +++ b/crates/rooch-open-rpc-spec/schemas/openrpc.json @@ -885,6 +885,12 @@ "format": "uint8", "minimum": 0.0 }, + "icon_url": { + "type": [ + "string", + "null" + ] + }, "name": { "type": "string" }, diff --git a/crates/rooch-rpc-api/src/jsonrpc_types/rooch_types.rs b/crates/rooch-rpc-api/src/jsonrpc_types/rooch_types.rs index 4a358ab691..4ac106d4b7 100644 --- a/crates/rooch-rpc-api/src/jsonrpc_types/rooch_types.rs +++ b/crates/rooch-rpc-api/src/jsonrpc_types/rooch_types.rs @@ -96,6 +96,7 @@ pub struct CoinInfoView { pub coin_type: StructTagView, pub name: String, pub symbol: String, + pub icon_url: Option, pub decimals: u8, pub supply: StrView, } @@ -109,6 +110,7 @@ impl From> for CoinInfoView { coin_type: coin_info.coin_type_tag().into(), name: coin_info.name(), symbol: coin_info.symbol(), + icon_url: coin_info.icon_url(), decimals: coin_info.decimals(), supply: StrView(coin_info.supply()), } diff --git a/frameworks/rooch-framework/sources/gas_coin.move b/frameworks/rooch-framework/sources/gas_coin.move index 633f816ca7..d6f2f54b41 100644 --- a/frameworks/rooch-framework/sources/gas_coin.move +++ b/frameworks/rooch-framework/sources/gas_coin.move @@ -76,10 +76,11 @@ module rooch_framework::gas_coin { /// Can only be called during genesis to initialize the Rooch coin. public(friend) fun genesis_init(_genesis_account: &signer){ + let rgas_image = b"\n\n \n \n \n \n \n"; let coin_info_obj = coin::register_extend( string::utf8(b"Rooch Gas Coin"), string::utf8(b"RGAS"), - option::none(), + option::some(string::utf8(rgas_image)), DECIMALS, // decimals ); object::transfer(coin_info_obj, @rooch_framework);