getFund单元测试金额不对
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 3/5
- Temps estimé
- 1-2 jours
- Accessibilité débutants
- 25/100
- Type d'issue
- Bug
- Clarté
- Plutôt claire
- Activité
- À l'abandon
- Stack technique
- solidity
- Domaine
- blockchain, testing-qa
Piste de recherche
Start by repeatedly running the two getFund unit tests shown in the issue, including the time increase and mining steps, and compare their state between runs. Trace the fund amount and contract state across these tests; done means the tests run consistently and the successful withdrawal emits the expected 1 ether amount.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
我的本地运行getFund函数测试时,时不时提示金额不对,按照金额推断应该是上个场景测试影响到了,但是找不到原因,有谁知道大概是哪方面的问题
` it("window close,target not reached, getFund faild",
async function () {
await fundMe.fund({ value: ethers.parseEther("0.1") })
//make sure the window is closed
await helpers.time.increase(200)
await helpers.mine()
await expect(fundMe.getFund())
.to.be.revertedWith("target not reached")
}
)
//提示金额不对
it("window close,target reached, getFund success",
async function () {
await fundMe.fund({ value: ethers.parseEther("1") })
//make sure the window is closed
await helpers.time.increase(200)
await helpers.mine()
await expect(fundMe.getFund())
.to.emit(fundMe, "FundWithdrawByOwner")
.withArgs(ethers.parseEther("1"))
}
)`
- Langage dominant
- Solidity
- Étoiles
- 1.5k
- Forks
- 383
- Métriques de merge des PR
- Aucune PR mergée en 30 j
Préparer son environnement
Ce projet ne fournit ni conteneur de développement, ni Dockerfile, ni guide de contribution : l'installation est à votre charge. Commencez par son README, et consultez notre guide de la première contribution pour les étapes générales.
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de smartcontractkit/Web3_tutorial_Chinese
-
第三节问题 Mapping 问题Ouverte
Difficulté 1/5 Moins d'une heure Accessibilité débutants 25/100
-
Difficulté 3/5 1-2 jours Accessibilité débutants 15/100
-
hardhat 部署问题Ouverte
Difficulté 4/5 3-5 jours Accessibilité débutants 10/100
smartcontractkit/Web3_tutorial_Chinese#96 · 2 commentaires ·
-
Difficulté 4/5 3-5 jours Accessibilité débutants 20/100
smartcontractkit/Web3_tutorial_Chinese#94 · 1 commentaire ·
-
我在第六课中进行编译时总是提示我未安装open zeppelin/[email protected],但实际上我已经安装,并且缺少一个名为ccipReceive.sol的文件,具体问题如下图Ouverte
Difficulté 3/5 1-2 jours Accessibilité débutants 20/100
smartcontractkit/Web3_tutorial_Chinese#93 · 6 commentaires ·
Toutes les issues de smartcontractkit/Web3_tutorial_Chinese
Issues similaires
-
bug
Difficulté 2/5 1-3 heures Accessibilité débutants 75/100
icon-project/sodax-sdks#696 ·
-
bug good first issue
Difficulté 2/5 1-3 heures Accessibilité débutants 76/100
th30d4y/OpenLearnX#737 · 1 commentaire ·
Les mainteneurs répondent en général sous 1 jour
-
good first issue
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
btclib-org/btclib-node#2656 ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 72/100
hiero-ledger/hiero-sdk-js#4832 ·
Les mainteneurs répondent en général sous 1 jour
-
Bigint RPC params are sent as strings when the application defines BigInt.prototype.toJSONPeut-être pris @andreisilviudragnea l’a pris aujourd’hui. Ouverte
Difficulté 2/5 1-3 heures Accessibilité débutants 74/100
Les mainteneurs répondent en général sous 1 jour