Skip to content

Commit 6942bac

Browse files
authored
Merge pull request #439 from alephium/fix-circular-reference
Fix the circular dependency in the generated code
2 parents 5c311c9 + 4dba3d1 commit 6942bac

29 files changed

+74
-96
lines changed

artifacts/ts/Add.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ import {
3434
Narrow,
3535
} from "@alephium/web3";
3636
import { default as AddContractJson } from "../add/Add.ral.json";
37-
import { getContractByCodeHash } from "./contracts";
37+
import { getContractByCodeHash, registerContract } from "./contracts";
3838
import {
3939
AddStruct1,
4040
AddStruct2,
@@ -256,6 +256,7 @@ export const Add = new Factory(
256256
AllStructs
257257
)
258258
);
259+
registerContract(Add);
259260

260261
// Use this class to interact with the blockchain
261262
export class AddInstance extends ContractInstance {

artifacts/ts/Assert.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ import {
3434
Narrow,
3535
} from "@alephium/web3";
3636
import { default as AssertContractJson } from "../test/Assert.ral.json";
37-
import { getContractByCodeHash } from "./contracts";
37+
import { getContractByCodeHash, registerContract } from "./contracts";
3838
import {
3939
AddStruct1,
4040
AddStruct2,
@@ -121,6 +121,7 @@ export const Assert = new Factory(
121121
AllStructs
122122
)
123123
);
124+
registerContract(Assert);
124125

125126
// Use this class to interact with the blockchain
126127
export class AssertInstance extends ContractInstance {

artifacts/ts/Debug.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ import {
3434
Narrow,
3535
} from "@alephium/web3";
3636
import { default as DebugContractJson } from "../test/Debug.ral.json";
37-
import { getContractByCodeHash } from "./contracts";
37+
import { getContractByCodeHash, registerContract } from "./contracts";
3838
import {
3939
AddStruct1,
4040
AddStruct2,
@@ -121,6 +121,7 @@ export const Debug = new Factory(
121121
AllStructs
122122
)
123123
);
124+
registerContract(Debug);
124125

125126
// Use this class to interact with the blockchain
126127
export class DebugInstance extends ContractInstance {

artifacts/ts/DeprecatedNFTTest1.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ import {
3434
Narrow,
3535
} from "@alephium/web3";
3636
import { default as DeprecatedNFTTest1ContractJson } from "../nft/DeprecatedNFTTest1.ral.json";
37-
import { getContractByCodeHash } from "./contracts";
37+
import { getContractByCodeHash, registerContract } from "./contracts";
3838
import {
3939
AddStruct1,
4040
AddStruct2,
@@ -132,6 +132,7 @@ export const DeprecatedNFTTest1 = new Factory(
132132
AllStructs
133133
)
134134
);
135+
registerContract(DeprecatedNFTTest1);
135136

136137
// Use this class to interact with the blockchain
137138
export class DeprecatedNFTTest1Instance extends ContractInstance {

artifacts/ts/DeprecatedNFTTest2.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ import {
3434
Narrow,
3535
} from "@alephium/web3";
3636
import { default as DeprecatedNFTTest2ContractJson } from "../nft/DeprecatedNFTTest2.ral.json";
37-
import { getContractByCodeHash } from "./contracts";
37+
import { getContractByCodeHash, registerContract } from "./contracts";
3838
import {
3939
AddStruct1,
4040
AddStruct2,
@@ -148,6 +148,7 @@ export const DeprecatedNFTTest2 = new Factory(
148148
AllStructs
149149
)
150150
);
151+
registerContract(DeprecatedNFTTest2);
151152

152153
// Use this class to interact with the blockchain
153154
export class DeprecatedNFTTest2Instance extends ContractInstance {

artifacts/ts/DeprecatedNFTTest3.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ import {
3434
Narrow,
3535
} from "@alephium/web3";
3636
import { default as DeprecatedNFTTest3ContractJson } from "../nft/DeprecatedNFTTest3.ral.json";
37-
import { getContractByCodeHash } from "./contracts";
37+
import { getContractByCodeHash, registerContract } from "./contracts";
3838
import {
3939
AddStruct1,
4040
AddStruct2,
@@ -148,6 +148,7 @@ export const DeprecatedNFTTest3 = new Factory(
148148
AllStructs
149149
)
150150
);
151+
registerContract(DeprecatedNFTTest3);
151152

152153
// Use this class to interact with the blockchain
153154
export class DeprecatedNFTTest3Instance extends ContractInstance {

artifacts/ts/DeprecatedNFTTest4.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ import {
3434
Narrow,
3535
} from "@alephium/web3";
3636
import { default as DeprecatedNFTTest4ContractJson } from "../nft/DeprecatedNFTTest4.ral.json";
37-
import { getContractByCodeHash } from "./contracts";
37+
import { getContractByCodeHash, registerContract } from "./contracts";
3838
import {
3939
AddStruct1,
4040
AddStruct2,
@@ -148,6 +148,7 @@ export const DeprecatedNFTTest4 = new Factory(
148148
AllStructs
149149
)
150150
);
151+
registerContract(DeprecatedNFTTest4);
151152

152153
// Use this class to interact with the blockchain
153154
export class DeprecatedNFTTest4Instance extends ContractInstance {

artifacts/ts/DeprecatedNFTTest5.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ import {
3434
Narrow,
3535
} from "@alephium/web3";
3636
import { default as DeprecatedNFTTest5ContractJson } from "../nft/DeprecatedNFTTest5.ral.json";
37-
import { getContractByCodeHash } from "./contracts";
37+
import { getContractByCodeHash, registerContract } from "./contracts";
3838
import {
3939
AddStruct1,
4040
AddStruct2,
@@ -153,6 +153,7 @@ export const DeprecatedNFTTest5 = new Factory(
153153
AllStructs
154154
)
155155
);
156+
registerContract(DeprecatedNFTTest5);
156157

157158
// Use this class to interact with the blockchain
158159
export class DeprecatedNFTTest5Instance extends ContractInstance {

artifacts/ts/DeprecatedNFTTest6.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ import {
3434
Narrow,
3535
} from "@alephium/web3";
3636
import { default as DeprecatedNFTTest6ContractJson } from "../nft/DeprecatedNFTTest6.ral.json";
37-
import { getContractByCodeHash } from "./contracts";
37+
import { getContractByCodeHash, registerContract } from "./contracts";
3838
import {
3939
AddStruct1,
4040
AddStruct2,
@@ -148,6 +148,7 @@ export const DeprecatedNFTTest6 = new Factory(
148148
AllStructs
149149
)
150150
);
151+
registerContract(DeprecatedNFTTest6);
151152

152153
// Use this class to interact with the blockchain
153154
export class DeprecatedNFTTest6Instance extends ContractInstance {

artifacts/ts/DeprecatedNFTTest7.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ import {
3434
Narrow,
3535
} from "@alephium/web3";
3636
import { default as DeprecatedNFTTest7ContractJson } from "../nft/DeprecatedNFTTest7.ral.json";
37-
import { getContractByCodeHash } from "./contracts";
37+
import { getContractByCodeHash, registerContract } from "./contracts";
3838
import {
3939
AddStruct1,
4040
AddStruct2,
@@ -153,6 +153,7 @@ export const DeprecatedNFTTest7 = new Factory(
153153
AllStructs
154154
)
155155
);
156+
registerContract(DeprecatedNFTTest7);
156157

157158
// Use this class to interact with the blockchain
158159
export class DeprecatedNFTTest7Instance extends ContractInstance {

0 commit comments

Comments
 (0)