Skip to content

Commit

Permalink
Merge pull request #14 from ckb-cell/mainnet-deployment
Browse files Browse the repository at this point in the history
Update mainnet deployment info
  • Loading branch information
duanyytop authored Apr 3, 2024
2 parents 652d85e + db8483e commit 694bd43
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 111 deletions.
3 changes: 1 addition & 2 deletions contracts/unique-type/src/entry.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@ fn check_type_id() -> Result<(), Error> {
let unique_type = load_script()?;

// Only one queue cell is allowed in the outputs
let queue_cell_count = QueryIter::new(load_cell_type, Source::GroupOutput).count();
if queue_cell_count > 1 {
if QueryIter::new(load_cell_type, Source::GroupOutput).count() > 1 {
return Err(Error::OnlyOneUniqueOutputCellAllowed);
}

Expand Down
2 changes: 1 addition & 1 deletion contracts/unique-type/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ pub enum Error {
ItemMissing,
LengthNotEnough,
Encoding,
UniqueTypeIdInvalid = 5,
UniqueTypeIdInvalid = 6,
InputUniqueCellForbidden,
OnlyOneUniqueOutputCellAllowed,
}
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
"cell_recipes": [
{
"name": "unique-type",
"tx_hash": "0x9c344c947fc7c31221774c3cc03af3ef5a0e472497305f7da796216696bee4c8",
"tx_hash": "0x67524c01c0cb5492e499c7c7e406f2f9d823e162d6b0cf432eacde0c9808c2ad",
"index": 0,
"occupied_capacity": 2958900000000,
"data_hash": "0xcc2518c2c1384f2473c96f63c4e74074984296f358512ee7f54c848d4c135040",
"data_hash": "0x2c8c11c985da60b0a330c61a85507416d6382c130ba67f0c47ab071e00aec628",
"type_id": null
}
],
Expand Down
4 changes: 2 additions & 2 deletions generator-example/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,14 @@ const TESTNET_UNIQUE_TYPE_SCRIPT = {
// Unique type script Mainnet deployment
const MAINNET_UNIQUE_TYPE_CELL_DEP = {
outPoint: {
txHash: "0x9c344c947fc7c31221774c3cc03af3ef5a0e472497305f7da796216696bee4c8",
txHash: "0x67524c01c0cb5492e499c7c7e406f2f9d823e162d6b0cf432eacde0c9808c2ad",
index: "0x0",
},
depType: "code",
} as CKBComponents.CellDep;

const MAINNET_UNIQUE_TYPE_SCRIPT = {
codeHash: "0xcc2518c2c1384f2473c96f63c4e74074984296f358512ee7f54c848d4c135040",
codeHash: "0x2c8c11c985da60b0a330c61a85507416d6382c130ba67f0c47ab071e00aec628",
hashType: "data1",
args: "",
} as CKBComponents.Script;
Expand Down
6 changes: 3 additions & 3 deletions tests/src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ use ckb_testtool::{builtin::ALWAYS_SUCCESS, context::Context};
const MAX_CYCLES: u64 = 10_000_000;

// error numbers
const UNIQUE_TYPE_ID_INVALID: i8 = 5;
const INPUT_UNIQUE_CELL_FORBIDDEN: i8 = 6;
const ONLY_ONE_UNIQUE_OUTPUT_CELL_ALLOWED: i8 = 7;
const UNIQUE_TYPE_ID_INVALID: i8 = 6;
const INPUT_UNIQUE_CELL_FORBIDDEN: i8 = 7;
const ONLY_ONE_UNIQUE_OUTPUT_CELL_ALLOWED: i8 = 8;

#[derive(PartialEq)]
enum UniqueError {
Expand Down

0 comments on commit 694bd43

Please sign in to comment.