Skip to content

Commit

Permalink
contract engine: pin contract code in block parser (#22)
Browse files Browse the repository at this point in the history
  • Loading branch information
Geo25rey authored Mar 26, 2024
1 parent e7f10d5 commit 6e3f6b3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions src/services/new/contractEngineV2.ts
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,9 @@ export class ContractEngineV2 {
})).cid

const bech32Addr = bech32.encode('vs4', bech32.toWords(contractIdHash.bytes));

console.log('pinning contract CID', json.code);
await this.self.ipfs.pin.add(json.code)

console.log('smart contract addr', bech32Addr)
await this.contractDb.findOneAndUpdate({
Expand Down
2 changes: 1 addition & 1 deletion src/services/new/witness/versionManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { Collection } from "mongodb";


export const VersionConfig = {
index_reset_id: 8,
index_reset_id: 9,
//Match with package.json and tag
version_id: 'v0.1.2'
}
Expand Down

0 comments on commit 6e3f6b3

Please sign in to comment.