Skip to content

[Docs] deploy contract API fix #236

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 6 additions & 13 deletions docs/testing-framework.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -708,14 +708,12 @@ struct Blockchain {
access(all)
fun deployContract(
name: String,
code: String,
account: Account,
path: String,
arguments: [AnyStruct]
): Error? {
return self.backend.deployContract(
name: name,
code: code,
account: account,
path: path,
arguments: arguments
)
}
Expand Down Expand Up @@ -801,8 +799,7 @@ struct interface BlockchainBackend {
access(all)
fun deployContract(
name: String,
code: String,
account: Account,
path: String,
arguments: [AnyStruct]
): Error?

Expand Down Expand Up @@ -1113,11 +1110,9 @@ let account = blockchain.createAccount()

access(all)
fun testExample() {
let contractCode = Test.readFile("Foo.cdc")
let err = blockchain.deployContract(
name: "Foo",
code: contractCode,
account: account,
path: "./Foo.cdc",
arguments: ["hello from args"],
)

Expand Down Expand Up @@ -1199,8 +1194,7 @@ fun setup() {
let contractCode = Test.readFile("Foo.cdc")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
let contractCode = Test.readFile("Foo.cdc")

let err = blockchain.deployContract(
name: "Foo",
code: contractCode,
account: account,
path: "./Foo.cdc",
arguments: ["hello from args"],
)

Expand Down Expand Up @@ -1326,8 +1320,7 @@ fun setup() {
let contractCode = Test.readFile("Foo.cdc")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
let contractCode = Test.readFile("Foo.cdc")

let err = blockchain.deployContract(
name: "Foo",
code: contractCode,
account: account,
path: "./Foo.cdc",
arguments: ["hello from args"],
)

Expand Down