inflearn logo
강의

강의

N
챌린지

챌린지

멘토링

멘토링

N
클립

클립

로드맵

로드맵

지식공유

Ethereum 실전! 초보자를 위한 Lottery Dapp 개발

Lottery isMatch 함수 구현 및 테스트

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

490

쫑화

작성한 질문수 3

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

답변 1

0

쫑화

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

0

양민규

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

truffle project 세팅관련

0

302

1

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

0

325

1

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

1

598

3

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

0

343

0

address payable error

0

361

1

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

1

320

0

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

0

224

0

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

1

252

0

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

0

303

1

bootstrap library 설치 error

0

300

0

web3.eth.sendTransaction()

0

367

0

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

0

266

0

React js 환경설정 강의 질문

0

287

1

web3오류

0

380

2

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

0

352

2

ganache-cli 명령어 질문

0

351

1

recent mode 질문

0

267

1

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

0

301

2

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

0

294

2

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

0

316

2

truffle migrate

0

277

1

질문입니다

0

307

2

8:22 에러

0

290

2

콘솔창에서 에러..

0

1054

5