inflearn logo
강의

Khóa học

Chia sẻ kiến thức

Ethereum đang hoạt động! Phát triển Dapp xổ số cho người mới bắt đầu

Triển khai và thử nghiệm hàm isMatch của Lottery

안녕하세요 강의 정말 잘듣고있습니다.

491

cccx44835

3 câu hỏi đã được viết

1

잘 따라오고 있다가 오늘 이벤트가 발생하지 않은 오류가 나왔습니다.

Contract: Lottery

    isMatch

      1) should be BettingResult.Win when two characters match

    > No events were emitted

      2) should be BettingResult.Fail when two characters match

    > No events were emitted

      3) should be BettingResult.Draw when two characters match

    > No events were emitted

 

 

  0 passing (229ms)

  3 failing

 

  1) Contract: Lottery

       isMatch

         should be BettingResult.Win when two characters match:

     AssertionError: expected <BN: 0> to equal 1

      at Context.<anonymous> (test/Lottery.test.js:60:14)

      at processTicksAndRejections (node:internal/process/task_queues:96:5)

 

  2) Contract: Lottery

       isMatch

         should be BettingResult.Fail when two characters match:

     AssertionError: expected <BN: 2> to equal 0

      at Context.<anonymous> (test/Lottery.test.js:65:14)

      at processTicksAndRejections (node:internal/process/task_queues:96:5)

 

  3) Contract: Lottery

       isMatch

         should be BettingResult.Draw when two characters match:

     AssertionError: expected <BN: 0> to equal 2

      at Context.<anonymous> (test/Lottery.test.js:70:14)

      at processTicksAndRejections (node:internal/process/task_queues:96:5)

 

무슨 문제인지 찾을수가 없네요 ㅠㅠ

 

Ethereum dapp

Câu trả lời 1

0

cccx44835

고쳤습니다.. let blockHash 값을 제가 가지고 온 해쉬값을 넣었다가 난 오류인거같습니다..

0

ysk46262939

저도 같은 이유로 테스트 통과가 되지 않네요.. 어떻게 해결하셨나요?

truffle project 세팅관련

0

302

1

gas 계산하는 부분이 이해가 되지 않습니다.

0

330

1

Lottery Bet 함수 테스트 강의 중 4:36에서 'from' 관련 오류가 발생합니다.

1

602

3

폴더 안에 파일이 없습니다.

0

347

0

address payable error

0

365

1

migrations 내의 js파일에서 artifacts 객체를 불러올 수 없습니다

1

320

0

안녕하세요 강의 잘 따라와서 끝까지 잘 해냈습니다!!

0

225

0

안녕하세요. Visibility for constructor is ignored. If you want the contract to be non-deployable, making it "abstract" is sufficient.

1

255

0

setState 사용에 대해서 질문입니다.

0

308

1

bootstrap library 설치 error

0

301

0

web3.eth.sendTransaction()

0

367

0

잘 쫓아가고 있습니다만 왜 저는 빨간선이 나올까요?

0

266

0

React js 환경설정 강의 질문

0

294

1

web3오류

0

384

2

코드 원본을 받을 수 있을까요?

0

362

2

ganache-cli 명령어 질문

0

356

1

recent mode 질문

0

272

1

Gas 부족 에 대한 질문입니다.

0

308

2

geth 채굴시 unlock 이외의 방법이 있을까요?

0

299

2

테스트 코드 작성 중 오류가 발생합니다.

0

321

2

truffle migrate

0

285

1

질문입니다

0

313

2

8:22 에러

0

294

2

콘솔창에서 에러..

0

1062

5