Skip to content

Commit 4dba3d1

Browse files
committed
Address comments
1 parent 3eaa02d commit 4dba3d1

29 files changed

+328
-400
lines changed

artifacts/ts/Add.ts

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,8 @@ import {
3333
encodeContractFields,
3434
Narrow,
3535
} from "@alephium/web3";
36-
import { AddContractArtifact, getContractByCodeHash } from "./contracts";
36+
import { default as AddContractJson } from "../add/Add.ral.json";
37+
import { getContractByCodeHash, registerContract } from "./contracts";
3738
import {
3839
AddStruct1,
3940
AddStruct2,
@@ -247,7 +248,15 @@ class Factory extends ContractFactory<AddInstance, AddTypes.Fields> {
247248
}
248249

249250
// Use this object to test and deploy the contract
250-
export const Add = new Factory(AddContractArtifact);
251+
export const Add = new Factory(
252+
Contract.fromJson(
253+
AddContractJson,
254+
"=12-2+5c=2-2+81=3-1+e=2-2+bc=83-1+97e010a61646450726976617465=266",
255+
"c46db1ae7bae8b332c115869126eb1402bc71574925608a2adcea3cf7b9f8e7e",
256+
AllStructs
257+
)
258+
);
259+
registerContract(Add);
251260

252261
// Use this class to interact with the blockchain
253262
export class AddInstance extends ContractInstance {

artifacts/ts/Assert.ts

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,8 @@ import {
3333
encodeContractFields,
3434
Narrow,
3535
} from "@alephium/web3";
36-
import { AssertContractArtifact, getContractByCodeHash } from "./contracts";
36+
import { default as AssertContractJson } from "../test/Assert.ral.json";
37+
import { getContractByCodeHash, registerContract } from "./contracts";
3738
import {
3839
AddStruct1,
3940
AddStruct2,
@@ -112,7 +113,15 @@ class Factory extends ContractFactory<AssertInstance, {}> {
112113
}
113114

114115
// Use this object to test and deploy the contract
115-
export const Assert = new Factory(AssertContractArtifact);
116+
export const Assert = new Factory(
117+
Contract.fromJson(
118+
AssertContractJson,
119+
"",
120+
"46dc5e3835be6551dacbf81565912ec67575aa77522312ceed88472817735d6b",
121+
AllStructs
122+
)
123+
);
124+
registerContract(Assert);
116125

117126
// Use this class to interact with the blockchain
118127
export class AssertInstance extends ContractInstance {

artifacts/ts/Debug.ts

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,8 @@ import {
3333
encodeContractFields,
3434
Narrow,
3535
} from "@alephium/web3";
36-
import { DebugContractArtifact, getContractByCodeHash } from "./contracts";
36+
import { default as DebugContractJson } from "../test/Debug.ral.json";
37+
import { getContractByCodeHash, registerContract } from "./contracts";
3738
import {
3839
AddStruct1,
3940
AddStruct2,
@@ -112,7 +113,15 @@ class Factory extends ContractFactory<DebugInstance, {}> {
112113
}
113114

114115
// Use this object to test and deploy the contract
115-
export const Debug = new Factory(DebugContractArtifact);
116+
export const Debug = new Factory(
117+
Contract.fromJson(
118+
DebugContractJson,
119+
"=4-2+18=11-1+3=10+ca7e020748656c6c6f2c200121",
120+
"eb4209d8f543d9f623d72578f7ed9b271d62cf396dcce42d10f5e68dba3cecd3",
121+
AllStructs
122+
)
123+
);
124+
registerContract(Debug);
116125

117126
// Use this class to interact with the blockchain
118127
export class DebugInstance extends ContractInstance {

artifacts/ts/DeprecatedNFTTest1.ts

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,8 @@ import {
3333
encodeContractFields,
3434
Narrow,
3535
} from "@alephium/web3";
36-
import {
37-
DeprecatedNFTTest1ContractArtifact,
38-
getContractByCodeHash,
39-
} from "./contracts";
36+
import { default as DeprecatedNFTTest1ContractJson } from "../nft/DeprecatedNFTTest1.ral.json";
37+
import { getContractByCodeHash, registerContract } from "./contracts";
4038
import {
4139
AddStruct1,
4240
AddStruct2,
@@ -127,8 +125,14 @@ class Factory extends ContractFactory<
127125

128126
// Use this object to test and deploy the contract
129127
export const DeprecatedNFTTest1 = new Factory(
130-
DeprecatedNFTTest1ContractArtifact
128+
Contract.fromJson(
129+
DeprecatedNFTTest1ContractJson,
130+
"",
131+
"cc6928c9c6777077abcb5b9c4f7c5d620d6cae07ec6f00f5e8b0efe6a7b913c4",
132+
AllStructs
133+
)
131134
);
135+
registerContract(DeprecatedNFTTest1);
132136

133137
// Use this class to interact with the blockchain
134138
export class DeprecatedNFTTest1Instance extends ContractInstance {

artifacts/ts/DeprecatedNFTTest2.ts

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,8 @@ import {
3333
encodeContractFields,
3434
Narrow,
3535
} from "@alephium/web3";
36-
import {
37-
DeprecatedNFTTest2ContractArtifact,
38-
getContractByCodeHash,
39-
} from "./contracts";
36+
import { default as DeprecatedNFTTest2ContractJson } from "../nft/DeprecatedNFTTest2.ral.json";
37+
import { getContractByCodeHash, registerContract } from "./contracts";
4038
import {
4139
AddStruct1,
4240
AddStruct2,
@@ -143,8 +141,14 @@ class Factory extends ContractFactory<
143141

144142
// Use this object to test and deploy the contract
145143
export const DeprecatedNFTTest2 = new Factory(
146-
DeprecatedNFTTest2ContractArtifact
144+
Contract.fromJson(
145+
DeprecatedNFTTest2ContractJson,
146+
"",
147+
"ade9aee476ee752050a1e9e1b19039f05261cb3f53941152617174faf9eae572",
148+
AllStructs
149+
)
147150
);
151+
registerContract(DeprecatedNFTTest2);
148152

149153
// Use this class to interact with the blockchain
150154
export class DeprecatedNFTTest2Instance extends ContractInstance {

artifacts/ts/DeprecatedNFTTest3.ts

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,8 @@ import {
3333
encodeContractFields,
3434
Narrow,
3535
} from "@alephium/web3";
36-
import {
37-
DeprecatedNFTTest3ContractArtifact,
38-
getContractByCodeHash,
39-
} from "./contracts";
36+
import { default as DeprecatedNFTTest3ContractJson } from "../nft/DeprecatedNFTTest3.ral.json";
37+
import { getContractByCodeHash, registerContract } from "./contracts";
4038
import {
4139
AddStruct1,
4240
AddStruct2,
@@ -143,8 +141,14 @@ class Factory extends ContractFactory<
143141

144142
// Use this object to test and deploy the contract
145143
export const DeprecatedNFTTest3 = new Factory(
146-
DeprecatedNFTTest3ContractArtifact
144+
Contract.fromJson(
145+
DeprecatedNFTTest3ContractJson,
146+
"",
147+
"465bc3739cd1649e58e0470971bd2fabf21363ab9fc2c15052fb2440dd06ada5",
148+
AllStructs
149+
)
147150
);
151+
registerContract(DeprecatedNFTTest3);
148152

149153
// Use this class to interact with the blockchain
150154
export class DeprecatedNFTTest3Instance extends ContractInstance {

artifacts/ts/DeprecatedNFTTest4.ts

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,8 @@ import {
3333
encodeContractFields,
3434
Narrow,
3535
} from "@alephium/web3";
36-
import {
37-
DeprecatedNFTTest4ContractArtifact,
38-
getContractByCodeHash,
39-
} from "./contracts";
36+
import { default as DeprecatedNFTTest4ContractJson } from "../nft/DeprecatedNFTTest4.ral.json";
37+
import { getContractByCodeHash, registerContract } from "./contracts";
4038
import {
4139
AddStruct1,
4240
AddStruct2,
@@ -143,8 +141,14 @@ class Factory extends ContractFactory<
143141

144142
// Use this object to test and deploy the contract
145143
export const DeprecatedNFTTest4 = new Factory(
146-
DeprecatedNFTTest4ContractArtifact
144+
Contract.fromJson(
145+
DeprecatedNFTTest4ContractJson,
146+
"",
147+
"a5de0fa0b3580303ac63423f09ce5ed95fccbf789679b32130a53c26fef182e9",
148+
AllStructs
149+
)
147150
);
151+
registerContract(DeprecatedNFTTest4);
148152

149153
// Use this class to interact with the blockchain
150154
export class DeprecatedNFTTest4Instance extends ContractInstance {

artifacts/ts/DeprecatedNFTTest5.ts

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,8 @@ import {
3333
encodeContractFields,
3434
Narrow,
3535
} from "@alephium/web3";
36-
import {
37-
DeprecatedNFTTest5ContractArtifact,
38-
getContractByCodeHash,
39-
} from "./contracts";
36+
import { default as DeprecatedNFTTest5ContractJson } from "../nft/DeprecatedNFTTest5.ral.json";
37+
import { getContractByCodeHash, registerContract } from "./contracts";
4038
import {
4139
AddStruct1,
4240
AddStruct2,
@@ -148,8 +146,14 @@ class Factory extends ContractFactory<
148146

149147
// Use this object to test and deploy the contract
150148
export const DeprecatedNFTTest5 = new Factory(
151-
DeprecatedNFTTest5ContractArtifact
149+
Contract.fromJson(
150+
DeprecatedNFTTest5ContractJson,
151+
"",
152+
"8b1374f39db98c485af3dd05d0b0ce861e9528f290ca9dc0d7108e8b48b50161",
153+
AllStructs
154+
)
152155
);
156+
registerContract(DeprecatedNFTTest5);
153157

154158
// Use this class to interact with the blockchain
155159
export class DeprecatedNFTTest5Instance extends ContractInstance {

artifacts/ts/DeprecatedNFTTest6.ts

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,8 @@ import {
3333
encodeContractFields,
3434
Narrow,
3535
} from "@alephium/web3";
36-
import {
37-
DeprecatedNFTTest6ContractArtifact,
38-
getContractByCodeHash,
39-
} from "./contracts";
36+
import { default as DeprecatedNFTTest6ContractJson } from "../nft/DeprecatedNFTTest6.ral.json";
37+
import { getContractByCodeHash, registerContract } from "./contracts";
4038
import {
4139
AddStruct1,
4240
AddStruct2,
@@ -143,8 +141,14 @@ class Factory extends ContractFactory<
143141

144142
// Use this object to test and deploy the contract
145143
export const DeprecatedNFTTest6 = new Factory(
146-
DeprecatedNFTTest6ContractArtifact
144+
Contract.fromJson(
145+
DeprecatedNFTTest6ContractJson,
146+
"",
147+
"8bc0d39f0607d4a771ec70ae1057b71dbcde404177cb3b25fd7d93d553a2b8cd",
148+
AllStructs
149+
)
147150
);
151+
registerContract(DeprecatedNFTTest6);
148152

149153
// Use this class to interact with the blockchain
150154
export class DeprecatedNFTTest6Instance extends ContractInstance {

artifacts/ts/DeprecatedNFTTest7.ts

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,8 @@ import {
3333
encodeContractFields,
3434
Narrow,
3535
} from "@alephium/web3";
36-
import {
37-
DeprecatedNFTTest7ContractArtifact,
38-
getContractByCodeHash,
39-
} from "./contracts";
36+
import { default as DeprecatedNFTTest7ContractJson } from "../nft/DeprecatedNFTTest7.ral.json";
37+
import { getContractByCodeHash, registerContract } from "./contracts";
4038
import {
4139
AddStruct1,
4240
AddStruct2,
@@ -148,8 +146,14 @@ class Factory extends ContractFactory<
148146

149147
// Use this object to test and deploy the contract
150148
export const DeprecatedNFTTest7 = new Factory(
151-
DeprecatedNFTTest7ContractArtifact
149+
Contract.fromJson(
150+
DeprecatedNFTTest7ContractJson,
151+
"",
152+
"b95c9acf088b090f5d9d34f28ab079cf22b9e53af8ae6864113c71172231ef4c",
153+
AllStructs
154+
)
152155
);
156+
registerContract(DeprecatedNFTTest7);
153157

154158
// Use this class to interact with the blockchain
155159
export class DeprecatedNFTTest7Instance extends ContractInstance {

0 commit comments

Comments
 (0)