Skip to content

Commit

Permalink
Merge branch 'develop' into feat/admin-scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
Leonard-Pat authored Jul 1, 2024
2 parents 10eeca5 + 13c82b0 commit 84887c0
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Scarb.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,5 @@ start-devnet = "docker build -t devnet . && docker run -d -p 127.0.0.1:5050:5050
kill-devnet = "docker ps -q --filter 'ancestor=devnet' | xargs docker stop"
test-ts = "scarb --profile release build && yarn tsc && yarn mocha tests-integration/*.test.ts"
profile = "scarb --profile release build && node --loader ts-node/esm scripts/profile.ts"
format = "scarb fmt && yarn prettier --write ."
format = "scarb fmt && yarn prettier --write ."
deploy = "scarb --profile release build && node --loader ts-node/esm scripts/deploy.ts"
7 changes: 7 additions & 0 deletions deployments.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@

# Sepolia Deployment

GiftFactory classhash: 0x6240992fd28e14bf2757a2b7320831220ffa7816cf962403b13f94aec95d7da
GiftFactory address: 0x7e0f5a5364e197200461a18d695082848b3d4d1e90d3349492263f4c913ae3c
EscrowAccount class hash: 0x4e2ac27f56cf97077cf43788c831acdc8734e447a5ec676e93101b9dd22eace
EscrowLibrary class hash: 0x4ee1fc3650c515e0c30705c326dbda34a07ebe32bddf39be43b5110dd4ead16
15 changes: 15 additions & 0 deletions scripts/deploy.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import { num } from "starknet";
import { manager, protocolCache, setupGiftProtocol } from "../lib";

const { factory, escrowAccountClassHash, escrowLibraryClassHash } = await setupGiftProtocol();

console.log("GiftFactory classhash:", await manager.getClassHashAt(factory.address));
console.log("GiftFactory address:", factory.address);
console.log("GiftFactory owner:", num.toHex(await factory.owner()));
console.log("EscrowAccount class hash:", escrowAccountClassHash);
console.log("EscrowLibrary class hash:", escrowLibraryClassHash);

// clear from cache just in case
delete protocolCache["GiftFactory"];
delete protocolCache["EscrowLibrary"];
delete protocolCache["EscrowAccount"];

0 comments on commit 84887c0

Please sign in to comment.