Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
blockchain-develop committed Aug 28, 2022
1 parent 53ce8cb commit 3ae9a65
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 11 deletions.
34 changes: 25 additions & 9 deletions token-in-native/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,27 +9,44 @@
## Build Module

```
aptos move compile --package-dir . --named-addresses NamedAddr=0x697c173eeb917c95a382b60f546eb73a4c6a2a7b2d79e6c56c87104f9c04345f
aptos move compile --package-dir . --named-addresses NamedAddr=0x1685cdc9a83c3da34c59208f34bddb3217f63bfbe0c393f04462d1ba06465d08
```

```
{
"Result": [
"697C173EEB917C95A382B60F546EB73A4C6A2A7B2D79E6C56C87104F9C04345F::usdt"
"1685cdc9a83c3da34c59208f34bddb3217f63bfbe0c393f04462d1ba06465d08::usdt"
]
}
```

## Publish Module

```
aptos move publish --package-dir . --named-addresses NamedAddr=0x697c173eeb917c95a382b60f546eb73a4c6a2a7b2d79e6c56c87104f9c04345f
aptos move publish --package-dir . --named-addresses NamedAddr=0x1685cdc9a83c3da34c59208f34bddb3217f63bfbe0c393f04462d1ba06465d08
```

```
package size 494 bytes
{
"Result": {
"transaction_hash": "0x46bfa491acd2deaaf0a46554e04e57e979ca6c7d4cfda74c2efa8f2409dc686a",
"gas_used": 62,
"gas_unit_price": 1,
"sender": "1685cdc9a83c3da34c59208f34bddb3217f63bfbe0c393f04462d1ba06465d08",
"sequence_number": 0,
"success": true,
"timestamp_us": 1661656715311642,
"version": 11307262,
"vm_status": "Executed successfully"
}
}
```

check publish successful.

```
aptos account list --query modules --account 0x697c173eeb917c95a382b60f546eb73a4c6a2a7b2d79e6c56c87104f9c04345f
aptos account list --query modules --account 0x1685cdc9a83c3da34c59208f34bddb3217f63bfbe0c393f04462d1ba06465d08
```

we can see account modules.
Expand All @@ -38,15 +55,15 @@ we can see account modules.
{
"Result": [
{
"bytecode": "0xa11ceb0b050000000501000202020407061a0820200a400500000001000004757364740855534454436f696e0b64756d6d795f6669656c64697c173eeb917c95a382b60f546eb73a4c6a2a7b2d79e6c56c87104f9c04345f000201020100",
"bytecode": "0xa11ceb0b0500000005010002020204070616081c200a3c05000000010000047573647404555344540b64756d6d795f6669656c641685cdc9a83c3da34c59208f34bddb3217f63bfbe0c393f04462d1ba06465d08000201020100",
"abi": {
"address": "0x697c173eeb917c95a382b60f546eb73a4c6a2a7b2d79e6c56c87104f9c04345f",
"address": "0x1685cdc9a83c3da34c59208f34bddb3217f63bfbe0c393f04462d1ba06465d08",
"name": "usdt",
"friends": [],
"exposed_functions": [],
"structs": [
{
"name": "USDTCoin",
"name": "USDT",
"is_native": false,
"abilities": [],
"generic_type_params": [],
Expand All @@ -64,10 +81,9 @@ we can see account modules.
}
```

## initilize usdt
## initilize

```
aptos move run --function-id 0x1::managed_coin::initialize --type-args 0x697c173eeb917c95a382b60f546eb73a4c6a2a7b2d79e6c56c87104f9c04345f::usdt::USDTCoin --args string:usdt string:USDT u64:6 bool:false
```

## register recipient
Expand Down
3 changes: 1 addition & 2 deletions token-in-native/contract/Move.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ name = "usdt"
version = "0.0.0"

[dependencies]
MoveStdlib = { git = "https://github.com/move-language/move.git", subdir = "language/move-stdlib", rev = "devnet" }
AptosFramework = { git = "https://github.com/aptos-labs/aptos-core.git", subdir = "aptos-move/framework/aptos-framework", rev = "devnet" }

[addresses]
std = "0x1"
NamedAddr = "_"
1 change: 1 addition & 0 deletions token/contract/Move.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
[package]
name = "usdc"
version = "0.0.0"
upgrade_policy = "compatible"

[dependencies]
AptosFramework = { git = "https://github.com/aptos-labs/aptos-core.git", subdir = "aptos-move/framework/aptos-framework", rev = "devnet" }
Expand Down

0 comments on commit 3ae9a65

Please sign in to comment.