172만명의 커뮤니티!! 함께 토론해봐요.
미해결
누구나 할 수 있는 NFT 만들기
npm error code 1 npm error path C:\Users\sonji\Desktop\hashlips_art_engine-main\node_modules\canvas npm error command failed npm error command C:\WINDOWS\system32\cmd.exe /d /s /c node-pre-gyp install --fallback-to-build npm error Failed to execute 'C:\Program Files\nodejs\node.exe C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js configure --fallback-to-build --module=C:\Users\sonji\Desktop\hashlips_art_engine-main\node_modules\canvas\build\Release\canvas.node --module_name=canvas --module_path=C:\Users\sonji\Desktop\hashlips_art_engine-main\node_modules\canvas\build\Release --napi_version=9 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v108' (1) npm error node-pre-gyp info it worked if it ends with ok npm error node-pre-gyp info using node-pre-gyp@1.0.6 npm error node-pre-gyp info using node@18.20.5 | win32 | x64 npm error node-pre-gyp info check checked for "C:\Users\sonji\Desktop\hashlips_art_engine-main\node_modules\canvas\build\Release\canvas.node" (not found) npm error gyp ERR! find Python ********************************************************** npm error gyp ERR! find Python npm error gyp ERR! configure error npm error gyp ERR! stack Error: Could not find any Python installation to use npm error gyp ERR! stack at PythonFinder.fail (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-python.js:306:11) npm error gyp ERR! stack at PythonFinder.findPython (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-python.js:164:17) npm error gyp ERR! stack at process.processTicksAndRejections (node:internal/process/task_queues:95:5) npm error gyp ERR! stack at async configure (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:27:18) npm error gyp ERR! stack at async run (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js:81:18) npm error gyp ERR! System Windows_NT 10.0.22631 npm error gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "configure" "--fallback-to-build" "--module=C:\\Users\\sonji\\Desktop\\hashlips_art_engine-main\\node_modules\\canvas\\build\\Release\\canvas.node" "--module_name=canvas" "--module_path=C:\\Users\\sonji\\Desktop\\hashlips_art_engine-main\\node_modules\\canvas\\build\\Release" "--napi_version=9" "--node_abi_napi=napi" "--napi_build_version=0" "--node_napi_label=node-v108" npm error gyp ERR! cwd C:\Users\sonji\Desktop\hashlips_art_engine-main\node_modules\canvas npm error gyp ERR! node -v v18.20.5 npm error gyp ERR! node-gyp -v v10.1.0 npm error gyp ERR! not ok npm error node-pre-gyp ERR! build error npm error node-pre-gyp ERR! stack Error: Failed to execute 'C:\Program Files\nodejs\node.exe C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js configure --fallback-to-build --module=C:\Users\sonji\Desktop\hashlips_art_engine-main\node_modules\canvas\build\Release\canvas.node --module_name=canvas --module_path=C:\Users\sonji\Desktop\hashlips_art_engine-main\node_modules\canvas\build\Release --napi_version=9 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v108' (1) npm error node-pre-gyp ERR! stack at ChildProcess.<anonymous> (C:\Users\sonji\Desktop\hashlips_art_engine-main\node_modules\@mapbox\node-pre-gyp\lib\util\compile.js:89:23) npm error node-pre-gyp ERR! stack at ChildProcess.emit (node:events:517:28) npm error node-pre-gyp ERR! stack at maybeClose (node:internal/child_process:1098:16) npm error node-pre-gyp ERR! stack at ChildProcess._handle.onexit (node:internal/child_process:303:5) npm error node-pre-gyp ERR! System Windows_NT 10.0.22631 npm error node-pre-gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\sonji\\Desktop\\hashlips_art_engine-main\\node_modules\\@mapbox\\node-pre-gyp\\bin\\node-pre-gyp" "install" "--fallback-to-build" npm error node-pre-gyp ERR! cwd C:\Users\sonji\Desktop\hashlips_art_engine-main\node_modules\canvas npm error node-pre-gyp ERR! node -v v18.20.5 npm error node-pre-gyp ERR! node-pre-gyp -v v1.0.6 npm error node-pre-gyp ERR! not ok npm error A complete log of this run can be found in: C:\Users\sonji\AppData\Local\npm-cache\_logs\2024-11-26T14_30_27_324Z-debug-0.log
손진주
2024-11-26T14:33:00.101Z
댓글 1
좋아요 0
조회수 324
미해결
누구나 할 수 있는 NFT 만들기
Error: Cannot find module 'C:\Users\sonji\Desktop\hashlips_art_engine-main/node_modules/sha1' Require stack: - C:\Users\sonji\Desktop\hashlips_art_engine-main\src\main.js - C:\Users\sonji\Desktop\hashlips_art_engine-main\index.js at Function._resolveFilename (node:internal/modules/cjs/loader:1249:15) at Function._load (node:internal/modules/cjs/loader:1075:27) at TracingChannel.traceSync (node:diagnostics_channel:315:14) at wrapModuleLoad (node:internal/modules/cjs/loader:218:24) at Module.require (node:internal/modules/cjs/loader:1340:12) at require (node:internal/modules/helpers:141:16) at Object.<anonymous> (C:\Users\sonji\Desktop\hashlips_art_engine-main\src\main.js:4:14) at Module._compile (node:internal/modules/cjs/loader:1546:14) at Object..js (node:internal/modules/cjs/loader:1689:10) at Module.load (node:internal/modules/cjs/loader:1318:32) { code: 'MODULE_NOT_FOUND ', requireStack: [ 'C:\\Users\\sonji\\Desktop\\hashlips_art_engine-main\\src\\main.js', 'C:\\Users\\sonji\\Desktop\\hashlips_art_engine-main\\index.js' ] } Node.js v22.11.0
손진주
2024-11-24T12:38:19.455Z
댓글 1
좋아요 0
조회수 208
미해결
[D.P.(DappProject)] 디앱 프로젝트(NFT 생성, NFT 구매 및 판매)
터미널보면 문제 없는 것 같은데 이 오류가 나면서 localhost 로 접근이 안됩니다. 원래 됐었는데 갑자기 안돼서 어떻게 해결해야하는지 모르겠습니다. 개발자 도구보면 이런식으로 나옵니다 웹소켓 문제라고 하는데 캐시삭제해보고 remixd 삭제했다가 다시 설치해보고 브라우저를 바꿔봐도 여전히 안됩니다..
bourgeois
2024-08-13T11:01:57.690Z
댓글 1
좋아요 0
조회수 189
미해결
[D.P.2(DappProject2)] 디앱 프로젝트2(Klaytn 네트워크를 활용한 NFT 생성 및 판매)
- 학습 관련 10강 듣는중 opensea에 등록한 nft를 판매 등록 하려는데 이미지와 같은 에러가 나타나면서 판매등록이 되지 않습니다. opensea testnet - baobab을 사용중입니다. Seaport order validation failed: ['Conduit key invalid'], [] 어떻게 해결해야 할까요? ㅠ
이경수
2024-07-10T04:36:41.082Z
댓글 1
좋아요 0
조회수 278
미해결
[D.P.2(DappProject2)] 디앱 프로젝트2(Klaytn 네트워크를 활용한 NFT 생성 및 판매)
refersh metadata를 몇번이고 해보고 캐시 지우고 해봐도 이미지와 name, description이 업데이트 되지 않습니다. ㅠ mint 해서 tokenURI실행하면 아래와 같이 나옵니다. 해당 url로 접근하면 json이 잘 나오고 imgaeurl접속해도 이미지가 잘 나오는데 opensea testnet에는 아무 정보도 업데이트 되지 않아요 ㅠ 아래는 ㄴ소스 코드입니다. // SPDX-License-Identifier: MIT pragma solidity ^0.8.20; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; contract MintGemToken is ERC721Enumerable{ //메타 data json폴더 경로 string public metadataURI; constructor(string memory _name, string memory _symbol, string memory _metadataURI) ERC721(_name,_symbol){ metadataURI = _metadataURI; } struct GemTokenData{ uint gemTokenRank; uint gemTokenType; } // 토큰 id => 랭크,타입 mapping(uint => GemTokenData) public gemTokenData; //* ERC721에 구현되어있는 메서드를 override //tokenURI -> metadata가 저장되어있는 json의 주소를 던져줌. function tokenURI(uint _tokenId)override public view returns(string memory){ string memory gemTokenRank = Strings.toString(gemTokenData[_tokenId].gemTokenRank); string memory gemTokenType = Strings.toString(gemTokenData[_tokenId].gemTokenType); //argument들을 하나로 합쳐줘서 문자열 리턴 -> metadata json uri return string(abi.encodePacked(metadataURI,'/',gemTokenRank,'/',gemTokenType,".json")); } function mintGemToken() public { uint tokenId = totalSupply()+1; // 발행자에게 tokenId의 토큰 발행 -> 일단 현재는 하드코딩 gemTokenData[tokenId] = GemTokenData(1,1); _mint(msg.sender,tokenId); } }
이경수
2024-06-25T07:00:22.353Z
댓글 1
좋아요 0
조회수 275
해결됨
모두를 위한 모두의 EVM 블록체인 BApp 개발 - 입문
npx hardhat test ./test/Greeter.test 실행시 에러가 납니다. import { expect } from 'chai'; import { ethers, waffle } from 'hardhat'; import GreeterArtifact from '../artifacts/contracts/Greeter.sol/Greeter.json'; import { Greeter } from '../typechain'; // import { BigNumber } from 'ethers'; // import '@nomiclabs/hardhat-waffle'; //* Greeter.sol과 비교하면서 보자!! describe('Greeter', () => { let greeter: Greeter; const initMsg = 'hello blockchain!!!'; //* hardHat에서 만들어진 10개 계정부터 앞에 5개 가져옴. const [admin, other0, other1, other2, receiver] = waffle.provider.getWallets(); before(async () => {}); beforeEach(async () => { //admin계정이 Greeter 배포 greeter = (await waffle.deployContract(admin, GreeterArtifact, [ initMsg, ])) as Greeter; //* Greeter로 형변환 해서 넣어주라는 뜻 }); it('constructor', async () => { const greetMsg = await greeter.getGreet(); expect(greetMsg).to.be.equal(initMsg); }); it('setGreeting', async () => { const secondMsg = 'second greeting msg'; await greeter.setGreeting(secondMsg); //* 이렇게 unit 테스트인 경우에만 hardhat이 transaction.wait()을 사용하지 않아도 결과를 기다림. const recvMsg = await greeter.getGreet(); expect(recvMsg).to.be.equal(secondMsg); }); it('setGreeting with event', async () => { const secondMsg = 'second greeting msg'; /* * setGreeting -> non-view함수 -> 채굴할 때까지 기다려야함. * transaction.wait()을 호출하여 채굴이 끝날 때까지 기다린다. */ const transaction = await greeter.setGreeting(secondMsg); //* transaction을통해 채굴이 끝난 후 영수증을 가져옴. const receipt = await transaction.wait(); //영수증 안의 이벤트에서 SetGreeting이라는 event만 가져온다. const event = receipt.events?.filter(x => { return x.event == 'SetGreeting'; })[0]; //* contract배포자가 admin이라서 자동으로 admin으로 설정됨. //* ? : undefined가 될수도 있다. ~> 실제로는 예외처리 필요 expect(event?.args?.sender).to.be.equal(admin.address); expect(event?.args?.oldGreeting).to.be.equal(initMsg); expect(event?.args?.newGreeting).to.be.equal(secondMsg); const thirdMsg = 'third greeting msg'; await expect(greeter.setGreeting(thirdMsg)) .to.emit(greeter, 'SetGreeting') .withArgs(admin.address, secondMsg, thirdMsg); }); it('getGreetingHistory', async () => { const secondMsg = 'second greeting msg'; const transaction = await greeter.setGreeting(secondMsg); const receipt = await transaction.wait(); const thirdMsg = 'third greeting msg'; await expect(greeter.setGreeting(thirdMsg)) .to.emit(greeter, 'SetGreeting') .withArgs(admin.address, secondMsg, thirdMsg); const count = await greeter.getGreetingHistoryCount(); expect(count).to.be.equal(3); const historyAll = await greeter.getGreetingHistoryAll(); expect(historyAll.length).to.be.equal(3); expect(historyAll[0]).to.be.equal(''); expect(historyAll[1]).to.be.equal(initMsg); expect(historyAll[2]).to.be.equal(secondMsg); const secondHistory = await greeter.getGreetingHistoryOne(1); expect(secondHistory).to.be.equal(initMsg); //* 없는 인덱스 예상 했을 때 revert메시지 나오는지 await expect(greeter.getGreetingHistoryOne(3)).to.reverted; }); it('setGreetingPayable', async () => { const secondMsg = 'second greeting msg'; await expect(greeter.setGreetingPayable(secondMsg)).to.reverted; //* revert문 예상 await expect(greeter.setGreetingPayable(secondMsg)).to.revertedWith( 'msg.value is not 0.1 ether', ); await expect( greeter.setGreetingPayable(secondMsg, { value: ethers.utils.parseUnits('0.09', 'ether'), }), ).to.revertedWith('msg.value is not 0.1 ether'); await expect( greeter.setGreetingPayable(secondMsg, { value: ethers.utils.parseUnits('0.11', 'ether'), }), ).to.revertedWith('msg.value is not 0.1 ether'); await greeter.setGreetingPayable(secondMsg, { //* value를 wei로 바꿔줌.(ehter단위) value: ethers.utils.parseUnits('0.1', 'ether'), //~> 이렇게도 가능 // value: BigNumber.from(10).pow(17), }); const recvMsg = await greeter.getGreet(); expect(recvMsg).to.be.equal(secondMsg); }); it('withdraw', async () => { const secondMsg = 'second greeting msg'; //* setGreetingPayable을 실행하기 전에 Ether가 얼마나 들었는지 확인하기 위함. const oldContractEther = await waffle.provider.getBalance(greeter.address); expect(oldContractEther).to.be.equal(ethers.utils.parseUnits('0', 'ether')); //*admin 호출 // await greeter.connect(admin).setGreetingPayable(secondMsg, { // await greeter.setGreetingPayable(){} //*admin이 아닌 다른 계정이 호출 await greeter.connect(other0).setGreetingPayable(secondMsg, { value: ethers.utils.parseUnits('0.1', 'ether'), }); await greeter.connect(other0).setGreetingPayable(secondMsg, { value: ethers.utils.parseUnits('0.1', 'ether'), }); await greeter.connect(other1).setGreetingPayable(secondMsg, { value: ethers.utils.parseUnits('0.1', 'ether'), }); await greeter.connect(other2).setGreetingPayable(secondMsg, { value: ethers.utils.parseUnits('0.1', 'ether'), }); //위에서 0.1씩 4번 호출 -> 0.4 ether const newContractEther = await waffle.provider.getBalance(greeter.address); expect(newContractEther).to.be.equal( ethers.utils.parseUnits('0.4', 'ether'), ); const other0Balance = await greeter.balances(other0.address); const other1Balance = await greeter.balances(other1.address); const other2Balance = await greeter.balances(other2.address); expect(other0Balance).to.be.equal(ethers.utils.parseUnits('0.2', 'ether')); expect(other1Balance).to.be.equal(ethers.utils.parseUnits('0.1', 'ether')); expect(other2Balance).to.be.equal(ethers.utils.parseUnits('0.1', 'ether')); //* 얼마나 ether를 들고 있었는지 확인 const oldReceiverEther = await waffle.provider.getBalance(receiver.address); console.log('oldReceiverEther', oldReceiverEther); await expect( greeter.connect(other0).withdraw(receiver.address), ).to.revertedWith('only owner'); //*connect 생략 -> admin await greeter.withdraw(receiver.address); const newReceiverEther = await waffle.provider.getBalance(receiver.address); expect(newReceiverEther.sub(oldReceiverEther)).to.be.equal( ethers.utils.parseUnits('0.4', 'ether'), ); const lastContractEther = await waffle.provider.getBalance(greeter.address); expect(lastContractEther).to.be.equal( ethers.utils.parseUnits('0', 'ether'), ); }); }); import { HardhatUserConfig } from 'hardhat/types'; import 'hardhat-typechain'; import '@nomiclabs/hardhat-waffle'; // import 'dotenv/config'; const config: HardhatUserConfig = { solidity: { compilers: [ { version: '0.8.17', settings: { optimizer: { enabled: true, runs: 200, }, }, }, ], }, defaultNetwork: 'hardhat', networks: { hardhat: { accounts: { count: 10, }, }, }, mocha: { timeout: 400000, }, }; export default config; 아래와 같은 문구가 나타납니다. Creating Typechain artifacts in directory typechain for target ethers-v5 Successfully generated Typechain artifacts! Greeter 1) "before each" hook for "constructor" 0 passing (99ms) 1 failing 1) Greeter "before each" hook for "constructor": Error: Cannot find module 'ethereum-waffle/dist/cjs/src/deployContract' Require stack: - /Users/nareun130/study/nft/basic/node_modules/@nomiclabs/hardhat-waffle/dist/src/deploy.js - /Users/nareun130/study/nft/basic/node_modules/@nomiclabs/hardhat-waffle/dist/src/index.js - /Users/nareun130/study/nft/basic/hardhat.config.ts - /Users/nareun130/study/nft/basic/node_modules/hardhat/internal/core/config/config-loading.js - /Users/nareun130/study/nft/basic/node_modules/hardhat/internal/cli/cli.js - /Users/nareun130/study/nft/basic/node_modules/hardhat/internal/cli/bootstrap.js at Function.Module._resolveFilename (node:internal/modules/cjs/loader:1140:15) at Function.Module._resolveFilename.sharedData.moduleResolveFilenameHook.installedValue [as resolveFilename] (node modules/@cspotcode/source-map-support/source-map-support.js:811:30) at Function.Module._load (node:internal/modules/cjs/loader:981:27) at Module.require (node:internal/modules/cjs/loader:1231:19) at require (node:internal/modules/helpers:177:18) at hardhatDeployContract (node_modules/@nomiclabs/hardhat-waffle/src/deploy.ts:26:7) at Context.<anonymous> (test/Greeter.test.ts:21:29) deploy.ts의 26라인을 가봤는데 이렇게 나오는데 node_modules의 경로를 찾아가보니 ethereum-waffle/cjs폴더 안에 src폴더가 없이 바로 아래 deployContract가 있어서 그런건지 해결방법을 잘 모르겠습니다. 도와주세요 ㅠ
이경수
2024-06-20T00:50:49.136Z
댓글 2
좋아요 1
조회수 300
해결됨
모두를 위한 모두의 EVM 블록체인 BApp 개발 - 입문
TypeError: Function needs to specify overridden contract "ERC721URIStorage". --> contracts/Monkey.sol:93:27: | 93 | ) public view virtual override(ERC721, ERC721Enumerable) returns (bool) { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Note: This contract: --> @openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.sol:12:1: | 12 | abstract contract ERC721URIStorage is IERC4906, ERC721 { | ^ (Relevant source part starts here and spans across multiple lines). TypeError: Invalid contract specified in override list: "ERC721". --> contracts/Monkey.sol:93:27: | 93 | ) public view virtual override(ERC721, ERC721Enumerable) returns (bool) { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Note: This contract: --> @openzeppelin/contracts/token/ERC721/ERC721.sol:19:1: | 19 | contract ERC721 is Context, ERC165, IERC721, IERC721Metadata { | ^ (Relevant source part starts here and spans across multiple lines). Error HH600: Compilation failed For more info go to https://hardhat.org/HH600 or run Hardhat with --show-stack-traces 에러메세지인데 어떤 에러인지 잘모르겠습니다 앞에서도 에러가 많이 났는데 다 해결하면서 진행했는데 여기서 막혀버리네요 typechain 만드는 과정에서 에러가 납니다
하루끝
2024-02-22T00:59:22.045Z
댓글 1
좋아요 1
조회수 383
미해결
[D.P.(DappProject)] 디앱 프로젝트(NFT 생성, NFT 구매 및 판매)
리팩토링 1 강의 13:25초에 setSaleNft(contract_address) 를 실행시켜야 getAnimalTokens() 함수를 사용한다고 하셨는데 왜 실행시켜야 하는지 모르겠습니다..! import 해오고 SaleAnimalToken public saleAnimalToken; 시점에 사용 할 수있는게 아닌건가요? saleAnimalToken.sol deploy 할 때도 이미 contract_address 가 등록된 줄 알았는데 setSaleNft(contract_address); 를 한번 실행시켜야 한다는게 잘 이해가 되지 않습니다ㅠ
이용규
2024-02-17T03:18:25.668Z
댓글 1
좋아요 0
조회수 277
해결됨
모두를 위한 모두의 EVM 블록체인 BApp 개발 - 입문
전에 했을때는 민팅되서 오픈시에서 nft를 확인할 수 있었는데 지금은 민팅했을때 nft를 클릭해보면 이미지도 들어오지않고 description의 내용도 추가되지않고있습니다. 어떤게 문제일까요 ?
송우석
2024-01-30T19:15:30.550Z
댓글 2
좋아요 0
조회수 435
해결됨
모두를 위한 모두의 EVM 블록체인 BApp 개발 - 입문
import "hardhat/console.sol"; 위 hardhat 폴더 생성 및 console.sol 파일 생성에 대한 내용이 없는 것 같습니다. 확인 부탁드립니다.
safecoin365
2024-01-15T01:02:04.716Z
댓글 2
좋아요 0
조회수 428
미해결
GameFi - 블록체인 Web3 게임 만들기
https://drive.google.com/drive/u/0/folders/1yz72VEbnprMVFEnJrwVfWGUKDEBr9qU1
SEJONG IT EDU
2024-01-13T18:02:03.807Z
댓글 1
좋아요 0
조회수 337
미해결
GameFi - 블록체인 Web3 게임 만들기
들어가보니깐 이렇게 나오네요
web3dkwkdkwk
2023-12-30T06:59:14.152Z
댓글 2
좋아요 0
조회수 559
미해결
[D.P.(DappProject)] 디앱 프로젝트(NFT 생성, NFT 구매 및 판매)
npm start를 해도 계속 이렇게 뜹니다..ㅠㅠ
찌움
2023-12-05T18:14:18.001Z
댓글 1
좋아요 0
조회수 380
미해결
누구나 할 수 있는 NFT 만들기
올려주신 컨트랙트가 컴파일 되지 않습니다. 버전을 최신으로 맞춰보고 MIT로 변경해보고 전부 해봤는데 오류가 있는 것 같습니다!
복순이
2023-10-25T07:16:00.737Z
댓글 1
좋아요 0
조회수 355
미해결
Klaytn 클레이튼 블록체인 어플리케이션 만들기 - NFT
docs 링크가 바뀜 https://docs.klaytn.foundation/content/dapp/sdk/caver-js/v1.4.1/api-references/caver.klay/transaction/sendtx_smart_contract_execution https://ipfs.infura.io/ipfs/"+ hash 값 넣는 부분에 " https://ipfs.infura.io/ipfs/ " 대신에 앞에서 만든 자신의 infura api 링크를 같이 넣어줘야함 예시 "https://님이만든거이름.infura-ipfs.io/ipfs/" 그럼 잘됨
Mr. Tai
2023-06-15T07:40:27.942Z
댓글 1
좋아요 0
조회수 507
미해결
Klaytn 클레이튼 블록체인 어플리케이션 만들기 - NFT
문제 : ipfs.infura.io를 사용할 경우 post timeout이 발생함 다른것도 ipfs.io 로 갈아 끼워서 해봐도 안됨 빠른포기 해결방법 : 1. 검색 2. infura.io 공용 오픈api? 가 만료된것을 알아냄 3. 회원가입한다 4. 개인 ipfs용 apikey를 생성한다. 5. API key 값과 API Key Secret 값을 확인한다. 6. 아래의 코드가 infura api 사용하는 방식이다 강의에 나온것에서 headers 부분만 추가해주면 된다 그리고 그곳에 auth 값이 필요한것이다. const projectId = 'API key'; const projectSecret = 'API Key Secret '; const auth = 'Basic' + Buffer.from(projectId + ':' + projectSecret).toString('base64'); const client = ipfsClient.create({ host: 'ipfs.infura.io', port: 5001, protocol: 'https', headers: { authorization: auth, }, }); 해당 강의에서는 node에서 작업을 하기때문에 node_modules에 포함되어있는 Buffer 함수가 정상 동작 하지만 일반 비 node 로컬 환경에서 개발할경우 별도로 노드 js 파일을 만들어서 auth 값만 뽑아낸다음에 하드코딩으로 갈겨넣어도 정상동작한다. 그렇게 넣고나서 강의를 따라 실행하고 infura 사이트에 로그인한뒤 자신의 ipfs 목록을 보면 alert 창에 적힌 저 Qm..............어쩌고저쩌고의 값이 잘 올라와있는것을 확인할수 있을것이다. 예전에 삽질한 흔적들이 남아있는 커뮤니티다 . 해결책은 안적었지만 공식 커뮤니티이니 돌아다니다보면 또 주워 얻는게 있는듯하다. https://community.infura.io/t/how-can-i-get-ipfs-url-image-by-dedicated-gateway/5759
Mr. Tai
2023-06-15T06:57:17.791Z
댓글 1
좋아요 0
조회수 1078
미해결
Klaytn 클레이튼 블록체인 어플리케이션 만들기 - NFT
setting.json 파일을 변경해도 되지 않을경우 1. git ignore에 node_modules가 적혀있으면 검색이 안되는것을 확인 2. git_ignore에 에서 node_modules를 주석처리 한다 3. 컨트롤 p를 누르고 ERC721FULL을 작성한뒤 엔터를 갈긴다 4. 잘된다.
Mr. Tai
2023-06-15T02:58:38.728Z
댓글 1
좋아요 0
조회수 491
미해결
누구나 할 수 있는 NFT 만들기
ㅈㄱㄴ
강수빈
2023-06-05T22:14:03.944Z
댓글 0
좋아요 0
조회수 385
해결됨
GameFi - 블록체인 Web3 게임 만들기
token 을 transfer 할 때, address(this) 와 owner() 의 개념이 혼란스럽습니다. buyer 가 amount 를 지불 할 때 owner() 를 쓴 것은 이해가 됩니다만, snowmenToken.safeTransferFrom(buyer, owner(), amount); 아래처럼 snowmenGame 에서 token 을 transfer 할 때는 address(this) 를 사용하는 이유는 무엇인가요? snowmenGame.safeTransferFrom(address(this), buyer, tokenId, quantity, ""); owner() 와 address(this) 가 각각 주소값이 다른데, snowmenGame.safeTransferFrom 을 할 때, address(this) 대신에 owner() 를 하면 안되는 걸까요?
안영수
2023-05-29T06:52:13.965Z
댓글 2
좋아요 0
조회수 541
미해결
GameFi - 블록체인 Web3 게임 만들기
4:50의 Unauthorized까지는 잘 따라왔는데 이후 2번째 지갑 주소를 복사, 붙여넣고 진행하니 이런 에러가 발생합니다. 뭐가 원인인지 알 수 있을까요? "error": "network does not support ENS (operation=\"getResolver\", network=\"maticmum\", code=UNSUPPORTED_OPERATION, version=providers/5.7.2)"
강수빈
2023-05-21T05:47:58.053Z
댓글 2
좋아요 0
조회수 757