File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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
11141111access(all)
11151112fun 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
You can’t perform that action at this time.
0 commit comments