
Klaytn 클레이튼 블록체인 소스 어디서 받는지요?
11일 전
Klaytn 클레이튼 블록체인 소스 어디서 받을 수 있나요?
zip파일 코드로 재현을 해도 로그인에서 password 오류가 계속해서 발생합니다.
4달 전
로그인이 안되고 있습니다.
강의를 보고 첨부하신 코드를 통해서도 password를 입력하면 일치하지 않는다고 합니다.
password는 몇번씩 klaytn wallet를 통해서 오류가 없는 것을 확인하였습니다.
추가적으로 입력해야하는 부분이 있을까요?
not a program account 에러
7달 전
not a program account 에러는 어떤 상황에서 생기는 오류인가요...!
에러메세지와 error.js 화면 적어놓겠습니다.
해결법에 대해서도 조언 가능하시다면 부탁드립니다.
<에러메세지>
errors.js:74 Uncaught (in promise) Error: Returned error: not a program account (e.g., an account having code and storage)
at Object.ErrorResponse (errors.js:74)
at eval (index.js:155)
at XMLHttpRequest.request.onreadystatechange (index.js:112)
at XMLHttpRequestEventTarget.dispatchEvent (xml-http-request-event-target.js:34)
at XMLHttpRequest._setReadyState (xml-http-request.js:208)
at XMLHttpRequest._onHttpResponseEnd (xml-http-request.js:318)
at exports.IncomingMessage.eval (xml-http-request.js:289)
at exports.IncomingMessage.emit (events.js:157)
at endReadableNT (_stream_readable.js:1010)
at afterTickTwo (index.js:28)
<errors.js>
onst constants = __webpack_require__(/*! ./constants */ "./node_modules/caver-js/packages/caver-core-helpers/src/constants.js")
const hasErrorMessage = result => !!result && !!result.error && !!result.error.message
const txErrorTable = {
'0x2': 'VM error occurs while running smart contract',
'0x3': 'max call depth exceeded',
'0x4': 'contract address collision',
'0x5': 'contract creation code storage out of gas',
'0x6': 'evm: max code size exceeded',
'0x7': 'out of gas',
'0x8': 'evm: write protection',
'0x9': 'evm: execution reverted',
'0xa': 'reached the opcode count limit',
'0xb': 'account already exists',
'0xc': 'not a program account (e.g., an account having code and storage)',
'0xd': 'Human-readable address is not supported now',
'0xe': 'fee ratio is out of range [1, 99]',
'0xf': 'AccountKeyFail is not updatable',
'0x10': 'different account key type',
'0x11': 'AccountKeyNil cannot be initialized to an account',
'0x12': 'public key is not on curve',
'0x13': 'key weight is zero',
'0x14': 'key is not serializable',
'0x15': 'duplicated key',
'0x16': 'weighted sum overflow',
'0x17': 'unsatisfiable threshold. Weighted sum of keys is less than the threshold.',
'0x18': 'length is zero',
'0x19': 'length too long',
'0x1a': 'nested role-based key',
'0x1b': 'a legacy transaction must be with a legacy account key',
'0x1c': 'deprecated feature',
'0x1d': 'not supported',
'0x1e': 'smart contract code format is invalid',
}
module.exports = {
InvalidConnection: host => new Error(`CONNECTION ERROR: Couldn't connect to node ${host}.`),
ConnectionTimeout: ms => new Error(`CONNECTION TIMEOUT: timeout of ${ms}ms achived`),
InvalidProvider: () => new Error('Provider not set or invalid'),
InvalidNumberOfParams: (got, expected, method) =>
new Error(`
Invalid number of parameters for "${method}". Got ${got} expected ${expected}!
`),
ErrorResponse: result => {
const message = hasErrorMessage(result) ? result.error.message : JSON.stringify(result)
return new Error(`Returned error: ${message}`)
},
InvalidResponse: result => {
if (result === null) return new Error('Invalid response: null')
const message = hasErrorMessage(result) ? result.error.message : `Invalid JSON RPC response: ${JSON.stringify(result)}`
return new Error(message)
},
needNameCallPropertyToCreateMethod: new Error('When creating a method you need to provide at least the "name" and "call" property.'),
blockHashNull: new Error('blockHash null'),
contractCouldntBeStored: new Error("The contract code couldn't be stored, please check your gas limit."),
receiptDidntContainContractAddress: new Error("The transaction receipt didn't contain a contract address."),
transactionReverted: receiptJSON => new Error(`Transaction has been reverted by the EVM:\n${receiptJSON}`),
transactionRanOutOfGas: receiptJSON => new Error(`Transaction ran out of gas. Please provide more gas:\n${receiptJSON}`),
invalidGasPrice: () => new Error(`Invalid gas price. Please provide valid gas price: ${constants.VALID_GAS_PRICE}`),
invalidGasLimit: () => new Error('Invalid gas limit. Please provide valid gas.'),
invalidData: () => new Error('Invalid data. Please provide valid hex-strict data.'),
notAllowedZeroGas: () => new Error("gas can't be 0. Please provide more gas."),
txErrorTable,
}
safeTransferFrom 함수요
2019.12.19
코드번호 56번째 줄을
60번째 밑에다가 넣어야하는 것 같은데..
맨 처음부터 바로 tranferFrom으로 보내면 contract가 토큰을 받을 수 있는지 확인하기도 전에 이미 보내버리는거 아닌가요?
코딩쪽에 완전 처음이고... 잘 모르겠어서 질문 올립니다.
2019.12.19
막 공부 시작한 학생인데요.
contract에 함수 다 구현했는데
interfact에 있는건 의미라고 해야하나요? 쓸모가 없지 않나요?
복붙
2019.12.18
// Klaytn IDE uses solidity 0.4.24, 0.5.6 versions.
pragma solidity >=0.4.24 <=0.5.6;
interface ERC721 /* is ERC165 */ {
event Transfer(address indexed _from, address indexed _to, uint256 indexed _tokenId);
event Approval(address indexed _owner, address indexed _approved, uint256 indexed _tokenId);
event ApprovalForAll(address indexed _owner, address indexed _operator, bool _approved);
function balanceOf(address _owner) external view returns (uint256);
function ownerOf(uint256 _tokenId) external view returns (address);
function safeTransferFrom(address _from, address _to, uint256 _tokenId, bytes data) external payable;
function safeTransferFrom(address _from, address _to, uint256 _tokenId) external payable;
function transferFrom(address _from, address _to, uint256 _tokenId) external payable;
function approve(address _approved, uint256 _tokenId) external payable;
function setApprovalForAll(address _operator, bool _approved) external;
function getApproved(uint256 _tokenId) external view returns (address);
function isApprovedForAll(address _owner, address _operator) external view returns (bool);
}
npm install 시 에러가 납니다.
2019.12.17
안녕하세요 기초 강의에 이어 이번 강좌까지 듣게 되었습니다. 다름이 아니라 의존성 설치를 위해서 npm install 하였는데 에러가 나서 이렇게 질문을 드립니다. 아래는 해당 에러의 내용입니다.
guddn@DESKTOP-R6RIL7Q MINGW64 ~/OneDrive/바탕 화면/youtube_klay/crypto-ytt-starter (master)
$ npm install
npm WARN deprecated fs-promise@2.0.3: Use mz or fs-extra^3.0 with Promise Support
npm WARN deprecated tar.gz@1.0.7: ⚠️ WARNING ⚠️ tar.gz module has been deprecated and your application is vulnerable. Please use tar module instead: https://npmjs.
com/tar
> scrypt@6.0.3 preinstall C:\Users\guddn\OneDrive\바탕 화면\youtube_klay\crypto-ytt-starter\node_modules\scrypt
> node node-scrypt-preinstall.js
> keccak@1.4.0 install C:\Users\guddn\OneDrive\바탕 화면\youtube_klay\crypto-ytt-starter\node_modules\keccak
> npm run rebuild || echo "Keccak bindings compilation fail. Pure JS implementation will be used."
> keccak@1.4.0 rebuild C:\Users\guddn\OneDrive\바탕 화면\youtube_klay\crypto-ytt-starter\node_modules\keccak
> node-gyp rebuild
C:\Users\guddn\OneDrive\바탕 화면\youtube_klay\crypto-ytt-starter\node_modules\keccak>if not defined npm_config_node_gyp (node "C:\Users\guddn\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild ) else (node "C:\Users\guddn\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" rebuild )
이 솔루션의 프로젝트를 한 번에 하나씩 빌드합니다. 병렬 빌드를 사용하려면 "/m" 스위치를 추가하세요.
addon.cc
win_delay_load_hook.cc
C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Tools\MSVC\14.16.27023\bin\HostX64\x64\CL.exe에 내부 컴파일러 오류가 있습니다. 나중에 Microsoft로
오류 보고를 보낼 것인지 묻는
메시지가 나타납니다.
cl : 명령줄 error D8040: 자식 프로세스를 만들거나 통신하는 동안 오류가 발생했습니다. [C:\Users\guddn\OneDrive\바탕 화면\youtube_klay\crypto-ytt-starter\node_modules\keccak\build\keccak.vcxproj]
?[37;40mgyp?[0m ?[0m?[31;40mERR!?[0m ?[0m?[35mbuild error?[0m
?[0m?[37;40mgyp?[0m ?[0m?[31;40mERR!?[0m ?[0m?[35mstack?[0m Error: `C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\Bin\MSBuild.exe` failed with exit code: 1
?[0m?[37;40mgyp?[0m ?[0m?[31;40mERR!?[0m ?[0m?[35mstack?[0m at ChildProcess.onExit (C:\Users\guddn\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\build.js:194:23)
?[0m?[37;40mgyp?[0m ?[0m?[31;40mERR!?[0m ?[0m?[35mstack?[0m at ChildProcess.emit (events.js:189:13)
?[0m?[37;40mgyp?[0m ?[0m?[31;40mERR!?[0m ?[0m?[35mstack?[0m at Process.ChildProcess._handle.onexit (internal/child_process.js:248:12)
?[0m?[37;40mgyp?[0m ?[0m?[31;40mERR!?[0m ?[0m?[35mSystem?[0m Windows_NT 10.0.17763
?[0m?[37;40mgyp?[0m ?[0m?[31;40mERR!?[0m ?[0m?[35mcommand?[0m "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\guddn\\AppData\\Roaming\\npm\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
?[0m?[37;40mgyp?[0m ?[0m?[31;40mERR!?[0m ?[0m?[35mcwd?[0m C:\Users\guddn\OneDrive\바탕 화면\youtube_klay\crypto-ytt-starter\node_modules\keccak
?[0m?[37;40mgyp?[0m ?[0m?[31;40mERR!?[0m ?[0m?[35mnode -v?[0m v10.15.3
?[0m?[37;40mgyp?[0m ?[0m?[31;40mERR!?[0m ?[0m?[35mnode-gyp -v?[0m v5.0.5
?[0m?[37;40mgyp?[0m ?[0m?[31;40mERR!?[0m ?[0m?[35mnot ok?[0m
?[0mnpm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! keccak@1.4.0 rebuild: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the keccak@1.4.0 rebuild script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm WARN Local package.json exists, but node_modules missing, did you mean to install?
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\guddn\AppData\Roaming\npm-cache\_logs\2019-12-17T05_02_55_428Z-debug.log
"Keccak bindings compilation fail. Pure JS implementation will be used."
> scrypt@6.0.3 install C:\Users\guddn\OneDrive\바탕 화면\youtube_klay\crypto-ytt-starter\node_modules\scrypt
> node-gyp rebuild
C:\Users\guddn\OneDrive\바탕 화면\youtube_klay\crypto-ytt-starter\node_modules\scrypt>if not defined npm_config_node_gyp (node "C:\Users\guddn\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild ) else (node "C:\Users\guddn\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" rebuild )
Warning: Missing input files:
C:\Users\guddn\OneDrive\바탕 화면\youtube_klay\crypto-ytt-starter\node_modules\scrypt\build\..\scrypt\win\include\config.h
이 솔루션의 프로젝트를 한 번에 하나씩 빌드합니다. 병렬 빌드를 사용하려면 "/m" 스위치를 추가하세요.
Copying scrypt/win/include/config.h to scrypt/scrypt-1.2.0/config.h
지정된 파일을 찾을 수 없습니다.
win_delay_load_hook.cc
코드를 생성하고 있습니다.
All 1 functions were compiled because no usable IPDB/IOBJ from previous compilation was found.
코드를 생성했습니다.
copied_files.vcxproj -> C:\Users\guddn\OneDrive\바탕 화면\youtube_klay\crypto-ytt-starter\node_modules\scrypt\build\Release\\copied_files.node
memlimit.c
keyderivation.c
pickparams.c
hash.c
win_delay_load_hook.cc
scrypt_wrapper.vcxproj -> C:\Users\guddn\OneDrive\바탕 화면\youtube_klay\crypto-ytt-starter\node_modules\scrypt\build\Release\\scrypt_wrapper.lib
crypto_scrypt.c
crypto_scrypt_smix.c
warnp.c
sha256.c
insecure_memzero.c
scryptenc_cpuperf.c
mman.c
gettimeofday.c
win_delay_load_hook.cc
scrypt_lib.vcxproj -> C:\Users\guddn\OneDrive\바탕 화면\youtube_klay\crypto-ytt-starter\node_modules\scrypt\build\Release\\scrypt_lib.lib
scrypt_common.cc
scrypt_params_async.cc
scrypt_params_sync.cc
scrypt_kdf_async.cc
C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Tools\MSVC\14.16.27023\bin\HostX64\x64\CL.exe에 내부 컴파일러 오류가 있습니다. 나중에 Microsoft로
오류 보고를 보낼 것인지 묻는
메시지가 나타납니다.
C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Tools\MSVC\14.16.27023\bin\HostX64\x64\CL.exe에 내부 컴파일러 오류가 있습니다. 나중에 Microsoft로
오류 보고를 보낼 것인지 묻는
메시지가 나타납니다.
C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Tools\MSVC\14.16.27023\bin\HostX64\x64\CL.exe에 내부 컴파일러 오류가 있습니다. 나중에 Microsoft로
오류 보고를 보낼 것인지 묻는
메시지가 나타납니다.
cl : 명령줄 error D8040: 자식 프로세스를 만들거나 통신하는 동안 오류가 발생했습니다. [C:\Users\guddn\OneDrive\바탕 화면\youtube_klay\crypto-ytt-starter\node_modules\scrypt\build\scrypt.vcxproj]
?[37;40mgyp?[0m ?[0m?[31;40mERR!?[0m ?[0m?[35mbuild error?[0m
?[0m?[37;40mgyp?[0m ?[0m?[31;40mERR!?[0m ?[0m?[35mstack?[0m Error: `C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\Bin\MSBuild.exe` failed with exit code: 1
?[0m?[37;40mgyp?[0m ?[0m?[31;40mERR!?[0m ?[0m?[35mstack?[0m at ChildProcess.onExit (C:\Users\guddn\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\build.js:194:23)
?[0m?[37;40mgyp?[0m ?[0m?[31;40mERR!?[0m ?[0m?[35mstack?[0m at ChildProcess.emit (events.js:189:13)
?[0m?[37;40mgyp?[0m ?[0m?[31;40mERR!?[0m ?[0m?[35mstack?[0m at Process.ChildProcess._handle.onexit (internal/child_process.js:248:12)
?[0m?[37;40mgyp?[0m ?[0m?[31;40mERR!?[0m ?[0m?[35mSystem?[0m Windows_NT 10.0.17763
?[0m?[37;40mgyp?[0m ?[0m?[31;40mERR!?[0m ?[0m?[35mcommand?[0m "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\guddn\\AppData\\Roaming\\npm\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
?[0m?[37;40mgyp?[0m ?[0m?[31;40mERR!?[0m ?[0m?[35mcwd?[0m C:\Users\guddn\OneDrive\바탕 화면\youtube_klay\crypto-ytt-starter\node_modules\scrypt
?[0m?[37;40mgyp?[0m ?[0m?[31;40mERR!?[0m ?[0m?[35mnode -v?[0m v10.15.3
?[0m?[37;40mgyp?[0m ?[0m?[31;40mERR!?[0m ?[0m?[35mnode-gyp -v?[0m v5.0.5
?[0m?[37;40mgyp?[0m ?[0m?[31;40mERR!?[0m ?[0m?[35mnot ok?[0m
npm WARN acorn-dynamic-import@4.0.0 requires a peer of acorn@^6.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN requestretry@2.0.2 requires a peer of request@~2.87.0 but none is installed. You must install peer dependencies yourself.
npm WARN crypto-youtube-thumbnail-starter@0.0.1 No repository field.
npm WARN crypto-youtube-thumbnail-starter@0.0.1 No license field.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.7 (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.7: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! scrypt@6.0.3 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the scrypt@6.0.3 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\guddn\AppData\Roaming\npm-cache\_logs\2019-12-17T05_04_00_389Z-debug.log
에러 내용중 'node-gyp rebuild'를 설치하라는 에러가 있는 것 같아 설치하였는데 똑같은 에러가 반복됩니다. 혹시 어떻게 해결할 지 도움을 주실 수 있을까요? 감사합니다
npm run dev 오류
2019.11.27
동영상 강의를 재청강하면서 복습하고 있는데요
어제까지 정상적으로 되던 부분이 오류가 발생해 질문 드립니다.
[ 오류 ]
SmartContract 정상 배포 후 npm run dev 를 통해 web server 를 로딩했습니다. 이후 로그인을 시도하면
콘솔에 다음과 같은 에러가 출력됩니다.
오전에 npm 을 업데이트해서 발생한 것으로 생각했는데 다시 6.4.1로 다운그레이드 후 실행해도 같은 에러가 발생하고 있습니다.
확인 부탁 드립니다.
렌더링 이슈
2019.11.25
* 우선 이전 토큰 생성 이슈는 아직 해결하지 못해 Section 5.7 소스를 기준으로 강의를 진행하고 있습니다. (https://www.inflearn.com/questions/16980)[ 이슈 1]
SmartContract 배포는 "배포및대납" 계정 (계정2) 로 진행 후 웹 사이트는 판매자 계정 (계정1) 으로 로그인했습니다.
이후 판매자 계정으로 로그인한 상태에서 토큰 발행시 화면 새로고침 발생 후 다음과 같이 출력되고 있습니다.
계정이 토큰을 정상생성해 생성된 Token 개수 "1"개를 가져오지만 화면은 출력되지 않고 있습니다.
Async( )를 제거하면 Promise( ) 오류가 발생하는 것으로 보아 Async( ) 이슈는 아닌 것으로 보이는데 단순히 IPFS에서 데이터를 불러들이는 시간이 오래걸리는 것인지 다른 문제가 있는 것인지 궁금합니다.
확인 부탁 드립니다.
토큰생성 이슈
2019.11.25
토큰 생성을 테스트하던 중 다음과 같은 "중복" 이슈가 있어 문의드립니다.
[ 이슈 1 ]
1. 토큰 생성을 위해 "비디오 아이디" 를 "1234" 입력한다. (이미 생성된 비디오 아이디)
-> "이미 토큰화된 썸네일입니다." 출력됨
2. 이후 "비디오 아이디"를 지워도, 닫기 후 다시 열어도 "이미 토큰화된 썸네일입니다." 라는 문구가 계속 활성화되어 있습니다.
현재 위의 상태로 인해 신규 토큰 생성이 어려운 상태입니다.
[ 이슈 2 ]
1. SmartContract 재컴파일 후 배포 및 npm run dev 실행
2. 토큰 생성을 위해 "비디오 아이디"를 임의의 유튜브 ID 입력
-> "이미 토큰화된 썸네일입니다." 출력됨
항상 "이미 토큰화된 썸네일입니다." 가 출력되고 있습니다.
위 두가지 상황에 대해 어떻게 처리하면 되는지 문의드립니다.