Skip to content

Commit

Permalink
[gas_market] Fix AdminCap and release gas_market v1 (#2717)
Browse files Browse the repository at this point in the history
* [gas_market] Fix AdminCap and release gas_market v1

* fixup
  • Loading branch information
jolestar authored Sep 30, 2024
1 parent a167ff1 commit 52689b3
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 3 deletions.
4 changes: 3 additions & 1 deletion infra/rooch-portal-v2/contract/gas_market/Move.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "gas_market"
version = "0.0.1"
version = "1.0.0"

[dependencies]
MoveStdlib = { local = "../../../../frameworks/move-stdlib" }
Expand All @@ -10,6 +10,8 @@ BitcoinMove = { local = "../../../../frameworks/bitcoin-move" }


[addresses]
#bc1prcajaj9n7e29u4dfp33x3hcf52yqeegspdpcd79pqu4fpr6llx4sugkfjt
#0x701c21bf1c8cd5af8c42983890d8ca55e7a820171b8e744c13f2d9998bf76cc3
gas_market = "_"
std = "0x1"
moveos_std = "0x2"
Expand Down
16 changes: 16 additions & 0 deletions infra/rooch-portal-v2/contract/gas_market/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# GasMarket and GasFaucet

1. build package

```bash
rooch move build -p infra/rooch-portal-v2/contract/gas_market --named-addresses gas_market=bc1prcajaj9n7e29u4dfp33x3hcf52yqeegspdpcd79pqu4fpr6llx4sugkfjt
```

2. build tx

```bash
rooch tx build --sender bc1prcajaj9n7e29u4dfp33x3hcf52yqeegspdpcd79pqu4fpr6llx4sugkfjt --function 0x2::module_store::publish_package_entry --args file:infra/rooch-portal-v2/contract/gas_market/build/gas_market/package.rpd
```

3. sign tx
4. submit tx
Binary file not shown.
8 changes: 6 additions & 2 deletions infra/rooch-portal-v2/contract/gas_market/sources/admin.move
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
module gas_market::admin {

use moveos_std::object::{Self,to_shared};
use moveos_std::object::{Self,transfer};

struct AdminCap has store, key {}

fun init() {
let admin_cap = object::new_named_object(AdminCap {});
to_shared(admin_cap)
transfer(admin_cap, @gas_market)
}

#[deprecated]
public entry fun fix_admin_cap() {
}

#[test_only]
Expand Down

0 comments on commit 52689b3

Please sign in to comment.