From 668260589cb566a948543ebf9194cafcb81365b5 Mon Sep 17 00:00:00 2001 From: Keith Date: Mon, 23 Sep 2024 23:55:11 +0900 Subject: [PATCH 1/3] feat[wip]: add script info of ickb ickb script: https://github.com/ickb/proposal#non-upgradable-deployment ref: https://github.com/nervosnetwork/ckb-explorer-frontend/issues/1784 --- src/constants/scripts.ts | 42 ++++++++++++++++++++++++++++++++++ src/pages/ScriptList/index.tsx | 24 +++++++++++++++++++ 2 files changed, 66 insertions(+) diff --git a/src/constants/scripts.ts b/src/constants/scripts.ts index d2f38c539..7fc7ff247 100644 --- a/src/constants/scripts.ts +++ b/src/constants/scripts.ts @@ -338,6 +338,27 @@ export const MainnetContractHashTags: ContractHashTag[] = [ tag: 'Single Use Lock', category: 'lock', }, + { + codeHashes: ['0x2a8100ab5990fa055ab1b50891702e1e895c7bd1df6322cd725c1a6115873bd3'], + txHashes: ['0x621a6f38de3b9f453016780edac3b26bfcbfa3e2ecb47c2da275471a5d3ed165-0'], + depType: 'dep_group', + hashType: 'data1', + tag: 'iCKB Logic', + }, + { + codeHashes: ['0x49dfb6afee5cc8ac4225aeea8cb8928b150caf3cd92fea33750683c74b13254a'], + txHashes: ['0x621a6f38de3b9f453016780edac3b26bfcbfa3e2ecb47c2da275471a5d3ed165-0'], + depType: 'dep_group', + hashType: 'data1', + tag: 'iCKB Limit Order', + }, + { + codeHashes: ['0xacc79e07d107831feef4c70c9e683dac5644d5993b9cb106dca6e74baa381bd0'], + txHashes: ['0x621a6f38de3b9f453016780edac3b26bfcbfa3e2ecb47c2da275471a5d3ed165-0'], + depType: 'dep_group', + hashType: 'data1', + tag: 'iCKB Owned-Owner', + }, ] export const TestnetContractHashTags: ContractHashTag[] = [ @@ -728,6 +749,27 @@ export const TestnetContractHashTags: ContractHashTag[] = [ tag: 'Single Use Lock', category: 'lock', }, + { + codeHashes: ['0x2a8100ab5990fa055ab1b50891702e1e895c7bd1df6322cd725c1a6115873bd3'], + txHashes: ['0xf7ece4fb33d8378344cab11fcd6a4c6f382fd4207ac921cf5821f30712dcd311-0'], + depType: 'dep_group', + hashType: 'data1', + tag: 'iCKB Logic', + }, + { + codeHashes: ['0x49dfb6afee5cc8ac4225aeea8cb8928b150caf3cd92fea33750683c74b13254a'], + txHashes: ['0xf7ece4fb33d8378344cab11fcd6a4c6f382fd4207ac921cf5821f30712dcd311-0'], + depType: 'dep_group', + hashType: 'data1', + tag: 'iCKB Limit Order', + }, + { + codeHashes: ['0xacc79e07d107831feef4c70c9e683dac5644d5993b9cb106dca6e74baa381bd0'], + txHashes: ['0xf7ece4fb33d8378344cab11fcd6a4c6f382fd4207ac921cf5821f30712dcd311-0'], + depType: 'dep_group', + hashType: 'data1', + tag: 'iCKB Owned-Owner', + }, ] const getLumosScripts = (scripts: ContractHashTag[]): ScriptConfigs => diff --git a/src/pages/ScriptList/index.tsx b/src/pages/ScriptList/index.tsx index 4bbdc6a5d..a435d290e 100644 --- a/src/pages/ScriptList/index.tsx +++ b/src/pages/ScriptList/index.tsx @@ -277,6 +277,30 @@ export const scripts = new Map([ code: 'https://github.com/ckb-ecofund/ckb-proxy-locks', }, ], + [ + 'iCKB Logic', + { + name: 'iCKB Logic', + description: '// TODO', + code: '// TODO', + }, + ], + [ + 'iCKB Limit Order', + { + name: 'iCKB Limit Order', + description: '// TODO', + code: '// TODO', + }, + ], + [ + 'iCKB Owned-Owner', + { + name: 'iCKB Owned-Owner', + description: '// TODO', + code: '// TODO', + }, + ], ]) const keysWithLinkValueInScript: (keyof ScriptAttributes)[] = ['rfc', 'code', 'doc', 'deprecated', 'website'] From 0d3fd7e85959dc8b7c365f62a5763b51737997d6 Mon Sep 17 00:00:00 2001 From: phroi <90913182+phroi@users.noreply.github.com> Date: Sat, 28 Sep 2024 23:08:37 +0700 Subject: [PATCH 2/3] Add iCKB Scripts info --- src/constants/scripts.ts | 16 ++++++++-------- src/pages/ScriptList/index.tsx | 24 ++++++++++++++---------- 2 files changed, 22 insertions(+), 18 deletions(-) diff --git a/src/constants/scripts.ts b/src/constants/scripts.ts index 7fc7ff247..0c1fc1d3a 100644 --- a/src/constants/scripts.ts +++ b/src/constants/scripts.ts @@ -346,18 +346,18 @@ export const MainnetContractHashTags: ContractHashTag[] = [ tag: 'iCKB Logic', }, { - codeHashes: ['0x49dfb6afee5cc8ac4225aeea8cb8928b150caf3cd92fea33750683c74b13254a'], + codeHashes: ['0xacc79e07d107831feef4c70c9e683dac5644d5993b9cb106dca6e74baa381bd0'], txHashes: ['0x621a6f38de3b9f453016780edac3b26bfcbfa3e2ecb47c2da275471a5d3ed165-0'], depType: 'dep_group', hashType: 'data1', - tag: 'iCKB Limit Order', + tag: 'WR Owned-Owner', }, { - codeHashes: ['0xacc79e07d107831feef4c70c9e683dac5644d5993b9cb106dca6e74baa381bd0'], + codeHashes: ['0x49dfb6afee5cc8ac4225aeea8cb8928b150caf3cd92fea33750683c74b13254a'], txHashes: ['0x621a6f38de3b9f453016780edac3b26bfcbfa3e2ecb47c2da275471a5d3ed165-0'], depType: 'dep_group', hashType: 'data1', - tag: 'iCKB Owned-Owner', + tag: 'UDT Limit Order', }, ] @@ -757,18 +757,18 @@ export const TestnetContractHashTags: ContractHashTag[] = [ tag: 'iCKB Logic', }, { - codeHashes: ['0x49dfb6afee5cc8ac4225aeea8cb8928b150caf3cd92fea33750683c74b13254a'], + codeHashes: ['0xacc79e07d107831feef4c70c9e683dac5644d5993b9cb106dca6e74baa381bd0'], txHashes: ['0xf7ece4fb33d8378344cab11fcd6a4c6f382fd4207ac921cf5821f30712dcd311-0'], depType: 'dep_group', hashType: 'data1', - tag: 'iCKB Limit Order', + tag: 'WR Owned-Owner', }, { - codeHashes: ['0xacc79e07d107831feef4c70c9e683dac5644d5993b9cb106dca6e74baa381bd0'], + codeHashes: ['0x49dfb6afee5cc8ac4225aeea8cb8928b150caf3cd92fea33750683c74b13254a'], txHashes: ['0xf7ece4fb33d8378344cab11fcd6a4c6f382fd4207ac921cf5821f30712dcd311-0'], depType: 'dep_group', hashType: 'data1', - tag: 'iCKB Owned-Owner', + tag: 'UDT Limit Order', }, ] diff --git a/src/pages/ScriptList/index.tsx b/src/pages/ScriptList/index.tsx index a435d290e..6dd33bb4f 100644 --- a/src/pages/ScriptList/index.tsx +++ b/src/pages/ScriptList/index.tsx @@ -281,24 +281,28 @@ export const scripts = new Map([ 'iCKB Logic', { name: 'iCKB Logic', - description: '// TODO', - code: '// TODO', + description: 'iCKB Logic tokenizes NervosDAO deposits into the iCKB xUDT token.', + rfc: 'https://github.com/ickb/proposal', + code: 'https://github.com/ickb/v1-core/tree/454cfa966052a621c4e8b67001718c29ee8191a2/scripts/contracts/ickb_logic', + website: 'https://ickb.org/', }, ], [ - 'iCKB Limit Order', + 'WR Owned-Owner', { - name: 'iCKB Limit Order', - description: '// TODO', - code: '// TODO', + name: 'WR Owned-Owner', + description: 'WR Owned-Owner enable to create Withdrawals Request from NervosDAO deposits locked with zero length args locks, developed as part of iCKB.', + rfc: 'https://github.com/ickb/proposal#owned-owner-script', + code: 'https://github.com/ickb/v1-core/tree/454cfa966052a621c4e8b67001718c29ee8191a2/scripts/contracts/owned_owner', }, ], [ - 'iCKB Owned-Owner', + 'UDT Limit Order', { - name: 'iCKB Owned-Owner', - description: '// TODO', - code: '// TODO', + name: 'UDT Limit Order', + description: 'UDT Limit Order is a general purpose UDT based Limit Order, developed as part of iCKB.', + rfc: 'https://github.com/ickb/proposal#limit-order-script', + code: 'https://github.com/ickb/v1-core/tree/454cfa966052a621c4e8b67001718c29ee8191a2/scripts/contracts/limit_order', }, ], ]) From 0dc52914e19259671e07f29fbaf5ed16ce60ff04 Mon Sep 17 00:00:00 2001 From: phroi <90913182+phroi@users.noreply.github.com> Date: Sat, 28 Sep 2024 23:58:31 +0700 Subject: [PATCH 3/3] Format as per ESLint --- src/pages/ScriptList/index.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/pages/ScriptList/index.tsx b/src/pages/ScriptList/index.tsx index 6dd33bb4f..7dd4a3f6f 100644 --- a/src/pages/ScriptList/index.tsx +++ b/src/pages/ScriptList/index.tsx @@ -291,7 +291,8 @@ export const scripts = new Map([ 'WR Owned-Owner', { name: 'WR Owned-Owner', - description: 'WR Owned-Owner enable to create Withdrawals Request from NervosDAO deposits locked with zero length args locks, developed as part of iCKB.', + description: + 'WR Owned-Owner enable to create Withdrawals Request from NervosDAO deposits locked with zero length args locks, developed as part of iCKB.', rfc: 'https://github.com/ickb/proposal#owned-owner-script', code: 'https://github.com/ickb/v1-core/tree/454cfa966052a621c4e8b67001718c29ee8191a2/scripts/contracts/owned_owner', },