Skip to content

Commit 94af58d

Browse files
authored
Merge pull request #236 from devbugging/patch-1
2 parents f29fc6c + 3dc50c7 commit 94af58d

1 file changed

Lines changed: 6 additions & 15 deletions

File tree

docs/testing-framework.mdx

Lines changed: 6 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -708,14 +708,12 @@ struct Blockchain {
708708
access(all)
709709
fun deployContract(
710710
name: String,
711-
code: String,
712-
account: Account,
711+
path: String,
713712
arguments: [AnyStruct]
714713
): Error? {
715714
return self.backend.deployContract(
716715
name: name,
717-
code: code,
718-
account: account,
716+
path: path,
719717
arguments: arguments
720718
)
721719
}
@@ -801,8 +799,7 @@ struct interface BlockchainBackend {
801799
access(all)
802800
fun deployContract(
803801
name: String,
804-
code: String,
805-
account: Account,
802+
path: String,
806803
arguments: [AnyStruct]
807804
): Error?
808805
@@ -1113,11 +1110,9 @@ let account = blockchain.createAccount()
11131110
11141111
access(all)
11151112
fun testExample() {
1116-
let contractCode = Test.readFile("Foo.cdc")
11171113
let err = blockchain.deployContract(
11181114
name: "Foo",
1119-
code: contractCode,
1120-
account: account,
1115+
path: "./Foo.cdc",
11211116
arguments: ["hello from args"],
11221117
)
11231118
@@ -1196,11 +1191,9 @@ fun setup() {
11961191
"Foo": account.address
11971192
}))
11981193
1199-
let contractCode = Test.readFile("Foo.cdc")
12001194
let err = blockchain.deployContract(
12011195
name: "Foo",
1202-
code: contractCode,
1203-
account: account,
1196+
path: "./Foo.cdc",
12041197
arguments: ["hello from args"],
12051198
)
12061199
@@ -1323,11 +1316,9 @@ fun setup() {
13231316
"Foo": account.address
13241317
}))
13251318
1326-
let contractCode = Test.readFile("Foo.cdc")
13271319
let err = blockchain.deployContract(
13281320
name: "Foo",
1329-
code: contractCode,
1330-
account: account,
1321+
path: "./Foo.cdc",
13311322
arguments: ["hello from args"],
13321323
)
13331324

0 commit comments

Comments
 (0)