`flow test` should deploy smart contracts defined in flow.json
@jribbink đang làm issue này rồi.
Từ ngày 8/2/2024.
Đánh giá
Issue này chưa được đánh giá.
Mô tả
Instructions
Issue To Be Solved
Currently we need to explicitly deploy a smart contract in the cadence unit or integration tests, e.g.:
import "FLIXRegistry"
...
...
access(all)
fun setup() {
let flixRegistryErr = Test.deployContract(
name: "FLIXRegistry",
path: "../contracts/flix_registry.cdc",
arguments: []
)
...
In the above example FLIXRegistry cannot be referenced in the code before it was deployed with Test.deployContract, even if it is imported on the the top, and defined in the flow.json as follows:
{
"contracts": {
"FLIXRegistry": {
"source": "cadence/contracts/flix_registry.cdc",
"aliases": {
"emulator": "0xf8d6e0586b0a20c7",
"testing": "0x0000000000000007"
}
},
...
(Optional): Suggest A Solution
It could increase developer experience if smart contracts defined in the flow.json are readily available in the unit tests, so the developers only have to import those as dependencies.
Also it could keep the unit tests code more concise and clean.
(Optional): Context
- Ngôn ngữ chính
- Go
- Star
- 209
- Fork
- 88
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của onflow/flow-cli
-
Simplify MCP contract sorting with slices helpersCó thể đã có người làm @luangucun đã nhận 46 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
-
`flow cadence lint` lints importsCó thể đã có người làm @holyfuchs đã nhận 185 ngày trước. Đang mởBug Improvement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
-
Bug
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 48/100
-
flow test prints unreadable outputCó thể đã có người làm @holyfuchs đã nhận 183 ngày trước. Đang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 55/100
-
Feature
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 48/100
Tất cả issue của onflow/flow-cli
Issue tương tự
-
ViewData can pair the in-flight proposal with the prepared flag of another proposalCó thể đã có người làm @HagarMeir đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
hyperledger/SmartBFT#710 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
agent-butler-finding chore
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 90/100
jordansmall/spindrift#5575 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
open-telemetry/opentelemetry-go-compile-instrumentation#1512 ·
Maintainer thường phản hồi trong vòng 3 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 85/100
slavakurilyak/awesome-ai-agents#805 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
JakeChampion/lang#12684 ·
Maintainer thường phản hồi trong vòng 1 ngày