본문 바로가기

분류 전체보기

(143)
[axios] 서버로 데이터 전송 사용자가 화면에서 정보를 등록하면 그 정보를 recoilstate을 통해 저장 -> 마지막 단계에서 recoil에 저장된 정보를 axios를 통해 서버로 보냄 정보를 서버로 넘겨줄 때 헤더에 access token도 함께 넣어서 보내줘야 했다. import { styled } from "styled-components"; import { useRouter } from "next/router"; import { useState, useEffect } from "react"; import axios from "axios"; import { useRecoilValue } from "recoil"; import { registerHomeUpLoadFileState, registerHomeWholeInfoStat..
[Hardhat] .deploy VS .deployed contract 배포할 때 어떤 코드는 .deploy 까지만 하고 어떤 코드는 .deploy 이후에 .deployed 까지 해줘서 뭐가 다른걸까 궁금했다. 내 테스트코드의 일부다. GachaCard = await ethers.getContractFactory("GachaCard"); gachaCard = await GachaCard.deploy( FIRST_MINT_PRICE, MINT_PRICE, FIRST_MINT_AMOUNT ); await gachaCard.deployed(); .deploy()는 이 컨트랙트 배포를 트리거하고 .deployed()는 컨트랙트가 이미 블록체인에서 사용 가능한지 확인하고 배포가 아직 진행 중이면 배포 트랜잭션이 채굴될 때까지 기다린다. .deployed()는 컨트랙트..
[Hardhat] 명함 NFT 만들 때 보았던 링크들 모음 https://dev.to/jacobedawson/import-test-a-popular-nft-smart-contract-with-hardhat-ethers-12i5 Import & Test a Popular NFT Smart Contract with Hardhat & Ethers Today we're going to learn how to use the very cool smart-contract development framework Hardhat to... dev.to https://ethereum.org/en/developers/tutorials/how-to-mint-an-nft/ Home | ethereum.org Ethereum is a global, decentralized platform..
[Hardhat, javascript] test code에서 beforeEach 프로젝트폴더/test/MYNFT.js 테스트코드에서 beforeEach는 어떻게 쓰이는가. const { expect } = require("chai"); describe("MyTinaCard", function () { let sharedValue = 0; beforeEach(function () { sharedValue++; }); it("Test Case 1", function () { expect(sharedValue).to.equal(1); }); it("Test Case 2", function () { expect(sharedValue).to.equal(2); }); }); 여기서 npx hardhat test 을 하면 MyTinaCard ✔ Test Case 1 (64ms) ✔ Test Ca..
[Javascript] async, await async, await 만 보면 회피하는 습관이 있었는데 이 기회에 두려움을 없애보고자 한다. 캡틴 판교님을 예전에 프론트엔드 컨퍼런스에서 뵌 적이 있는데 완전 유명하신 분이라고 들었다. 근데 왜 유명하신지 알 것 같다. 글이 완전 이해가 쏙쏙~~ https://joshua1988.github.io/web-development/javascript/javascript-asynchronous-operation/ 자바스크립트 비동기 처리와 콜백 함수 (중급) 중급 자바스크립트 개발자가 되기 위한 자바스크립트 비동기 처리와 콜백 함수 이해하기. 콜백 지옥과 해결 방법 등 joshua1988.github.io https://joshua1988.github.io/web-development/javascript/pr..
[Javascript] Testing code Describe, it, expect 구문을 알기 위해서 찾아봤다. https://velog.io/@velopert/%EC%9E%90%EB%B0%94%EC%8A%A4%ED%81%AC%EB%A6%BD%ED%8A%B8-%ED%85%8C%EC%8A%A4%ED%8C%85%EC%9D%98-%EA%B8%B0%EC%B4%88 자바스크립트 테스팅의 기초 자바스크립트로 작성된 프로젝트에 테스트 자동화를 사용 할 때 사용 할 수 있는 도구는 다양합니다. 리스팅을 해보자면 다음과 같습니다. - Karma - Jasmine - Jest - Chai - Mocha 종류가 정말 다양하지 velog.io 위에 나온 개념들 https://medium.com/@chullino/require-exports-module-exports-%..
[Solidity] Storage VS Memory https://www.geeksforgeeks.org/storage-vs-memory-in-solidity/ Storage vs Memory in Solidity - GeeksforGeeks A Computer Science portal for geeks. It contains well written, well thought and well explained computer science and programming articles, quizzes and practice/competitive programming/company interview Questions. www.geeksforgeeks.org Memory Storage 영구적 vs 일시적 컨트랙트의 사용이 중지되면 데이터를 지워버림(일시적 공간..
[Solidity] by value VS by reference 크립토 좀비 풀어보다가 헷갈려서 찾아봤다. 파이썬 공부하면서도 나오는 개념이었던 거 같은데.. 맨날 까먹는다..🥲 괜찮다. 까먹을 때마다 와서 보면 된다. A(initial value)로 B를 만든다고 하자. By Value - B는 A의 새로운 복사본이다. - B를 수정한다고 해서 초깃값 A가 변하지는 않는다. ex) Assigning storage to memory uint[] storage A = [1, 2, 3]; uint[] memory B = A; // value of A is copied over to B // modifying B will not change A By Reference - B는 단순히 A가 저장된 곳을 가리킨다.(포인터 역할) - A의 새로운 복사본은 생성되지 않는다. - ..
[개발 환경 설정] Next.js + Typescript + Styled-components https://mniyunsu.github.io/nextjs-styled-component-setting/ Next.js + Typescript + Styled-components 개발 환경 설정 | YUNSU BAE Next.js + Typescript + Styled-components 개발 환경 설정를 기록해두자. mniyunsu.github.io https://nextjs.org/docs/getting-started/project-structure Getting Started: Project Structure | Next.js Using App Router Features available in /app nextjs.org next는 auto-routing을 해주기 때문에 그 폴더 구조와 컨벤션들..
[Next.js] 230703 학습일기 https://nextjs.org/learn/basics/create-nextjs-app/ Learn | Next.js Production grade React applications that scale. The world’s leading companies use Next.js by Vercel to build pre-rendered applications, static websites, and more. nextjs.org 1. You should keep the development server running, but if you want to restart it, hit Ctrl + c to stop the server. Navigate between Pages 2. Pages in Next.js..