Skip to content

Commit

Permalink
fix: typo
Browse files Browse the repository at this point in the history
  • Loading branch information
liyukun committed Jul 4, 2024
1 parent 0917b37 commit 746a355
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 18 deletions.
8 changes: 1 addition & 7 deletions packages/core/src/api/joints/spore/injectLiveSporeCell.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,14 +76,8 @@ export async function injectLiveSporeCell(props: {
// Add Spore script as cellDep
let sporeCelldep = sporeScript.cellDep;
if (sporeScript.behaviors?.dynamicCelldep) {
const args = sporeScript.behaviors?.dynamicCelldep;
const typeIdScript: Script = {
codeHash: '0x00000000000000000000000000000000000000000000000000545950455f4944',
hashType: 'type',
args,
};
const scriptCell = await getCellByType({
type: typeIdScript,
type: sporeScript.behaviors?.dynamicCelldep,
indexer: new Indexer(config.ckbIndexerUrl, config.ckbNodeUrl),
});
if (scriptCell) {
Expand Down
8 changes: 1 addition & 7 deletions packages/core/src/api/joints/spore/injectNewSporeOutput.ts
Original file line number Diff line number Diff line change
Expand Up @@ -225,14 +225,8 @@ export async function injectNewSporeOutput(props: {
// Add Spore relevant cellDeps
let sporeCelldep = sporeScript.cellDep;
if (sporeScript.behaviors?.dynamicCelldep) {
const args = sporeScript.behaviors?.dynamicCelldep;
const typeIdScript: Script = {
codeHash: '0x00000000000000000000000000000000000000000000000000545950455f4944',
hashType: 'type',
args,
};
const scriptCell = await getCellByType({
type: typeIdScript,
type: sporeScript.behaviors?.dynamicCelldep,
indexer: new Indexer(config.ckbIndexerUrl, config.ckbNodeUrl),
});
if (scriptCell) {
Expand Down
12 changes: 10 additions & 2 deletions packages/core/src/config/predefined.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,11 @@ const TESTNET_SPORE_CONFIG: SporeConfig<PredefinedTestnetSporeScriptName> = {
},
behaviors: {
lockProxy: true,
dynamicCelldep: '0x80f0d4bf6b3951911aa6b98cc609d477a8a10b903b35cfd528d098e95c36f680',
dynamicCelldep: {
codeHash: '0x00000000000000000000000000000000000000000000000000545950455f4944',
hashType: 'type',
args: '0x80f0d4bf6b3951911aa6b98cc609d477a8a10b903b35cfd528d098e95c36f680',
},
},
},
{
Expand Down Expand Up @@ -215,7 +219,11 @@ const MAINNET_SPORE_CONFIG: SporeConfig<PredefinedMainnetSporeScriptName> = {
},
behaviors: {
lockProxy: true,
dynamicCelldep: '0x62312cd846659e188b05da11dc3f080b083c27371ea701d6026e11e713e0e3de',
dynamicCelldep: {
codeHash: '0x00000000000000000000000000000000000000000000000000545950455f4944',
hashType: 'type',
args: '0x62312cd846659e188b05da11dc3f080b083c27371ea701d6026e11e713e0e3de',
},
},
},
{
Expand Down
4 changes: 2 additions & 2 deletions packages/core/src/config/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { Config } from '@ckb-lumos/config-manager';
import { CellDep } from '@ckb-lumos/base';
import { ScriptId } from '../types';
import { ClusterDataVersion } from '../codec';
import { HexString } from '@ckb-lumos/lumos';
import { HexString, Script } from '@ckb-lumos/lumos';

export interface SporeConfig<T extends string = string> {
lumos: Config;
Expand Down Expand Up @@ -36,5 +36,5 @@ export interface SporeScriptBehaviors {
lockProxy?: boolean;
cobuild?: boolean;
clusterDataVersion?: ClusterDataVersion;
dynamicCelldep?: HexString;
dynamicCelldep?: Script;
}

0 comments on commit 746a355

Please sign in to comment.