Fee Delegation 이벤트 사용 가이드에 따라 Baobab 에서 테스트 중입니다.
caver-js 1.5.0 으로 Contract 전송 코드를 작성하였습니다.
기존 방식으로 전송이 성공하는 것을 확인한 다음, 가이드 지침에 따라 수령한 feePayer address 를 keystore 파일에서 기존 주소를 변경하고 테스트 전송을 하면 다음 오류가 발생합니다.
(node:3121) UnhandledPromiseRejectionWarning: Error: Returned error: invalid fee payer
at Object.ErrorResponse (/Users/leesangwon/Documents/projects/blockpet/examples/klaytn-1.5.x/node_modules/caver-js/packages/caver-core-helpers/src/errors.js:74:16)
at /Users/leesangwon/Documents/projects/blockpet/examples/klaytn-1.5.x/node_modules/caver-js/packages/caver-core-requestmanager/src/index.js:155:44
at XMLHttpRequest.request.onreadystatechange (/Users/leesangwon/Documents/projects/blockpet/examples/klaytn-1.5.x/node_modules/caver-js/packages/caver-core-requestmanager/caver-providers-http/src/index.js:112:13)
at XMLHttpRequestEventTarget.dispatchEvent (/Users/leesangwon/Documents/projects/blockpet/examples/klaytn-1.5.x/node_modules/xhr2-cookies/xml-http-request-event-target.ts:44:13)
at XMLHttpRequest._setReadyState (/Users/leesangwon/Documents/projects/blockpet/examples/klaytn-1.5.x/node_modules/xhr2-cookies/xml-http-request.ts:219:8)
at XMLHttpRequest._onHttpResponseEnd (/Users/leesangwon/Documents/projects/blockpet/examples/klaytn-1.5.x/node_modules/xhr2-cookies/xml-http-request.ts:345:8)
at IncomingMessage.<anonymous> (/Users/leesangwon/Documents/projects/blockpet/examples/klaytn-1.5.x/node_modules/xhr2-cookies/xml-http-request.ts:311:39)
at IncomingMessage.emit (events.js:203:15)
at IncomingMessage.EventEmitter.emit (domain.js:448:20)
at endReadableNT (_stream_readable.js:1129:12)
(node:3121) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:3121) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
그리고 Cypress 에서도 돌려봤는데… 여기서는 다음 오류가 발생합니다.
send error Error: Returned error: not a program account (e.g., an account having code and storage)
at Object.ErrorResponse (/Users/leesangwon/Documents/projects/blockpet/examples/klaytn-1.5.x/node_modules/caver-js/packages/caver-core-helpers/src/errors.js:74:16)
at /Users/leesangwon/Documents/projects/blockpet/examples/klaytn-1.5.x/node_modules/caver-js/packages/caver-core-requestmanager/src/index.js:155:44
at XMLHttpRequest.request.onreadystatechange (/Users/leesangwon/Documents/projects/blockpet/examples/klaytn-1.5.x/node_modules/caver-js/packages/caver-core-requestmanager/caver-providers-http/src/index.js:112:13)
at XMLHttpRequestEventTarget.dispatchEvent (/Users/leesangwon/Documents/projects/blockpet/examples/klaytn-1.5.x/node_modules/xhr2-cookies/xml-http-request-event-target.ts:44:13)
at XMLHttpRequest._setReadyState (/Users/leesangwon/Documents/projects/blockpet/examples/klaytn-1.5.x/node_modules/xhr2-cookies/xml-http-request.ts:219:8)
at XMLHttpRequest._onHttpResponseEnd (/Users/leesangwon/Documents/projects/blockpet/examples/klaytn-1.5.x/node_modules/xhr2-cookies/xml-http-request.ts:345:8)
at IncomingMessage.<anonymous> (/Users/leesangwon/Documents/projects/blockpet/examples/klaytn-1.5.x/node_modules/xhr2-cookies/xml-http-request.ts:311:39)
at IncomingMessage.emit (events.js:203:15)
at IncomingMessage.EventEmitter.emit (domain.js:448:20)
at endReadableNT (_stream_readable.js:1129:12)
무슨 이유일까요?