Uvicorn & Gunicorn
Uvicorn and GunicornUvicorn and Gunicorn are important concepts when developing applications in Python. However, there are many concepts to be aware of in order to fully understand Uvicorn and Gunicorn. The following is a brief summary of the necessary concepts, and the details will be dealt with separately later.Necessary ConceptsStarletteStarlette is a Web application server that can run asynchronously. Starlette runs on top of Uvicorn.FastAPIFastAPI provides many features on top of Starlet...
Gas optimization in Solidity, Ethereum
Iβm sorry but my English is terrible. I hope you understand that generously.Recently, I was developing a toy project named Blind Market. Itβs a simple P2P trading application using smart contract. I was making a contract using Solidity, and the trade stage proceeded in the order of pending, shipping, and done. The problem was appeared in done phase. The problem was that when I tried to close the transaction by paying the price raised by the seller in msg.value, the following error occurred.Pe...
P2WPKH
P2WPKHP2WPKHλ λΉνΈμ½μΈ λ΄μμ κ°μ₯ μΌλ°μ μΈ μ€ν¬λ¦½νΈ νμμΌλ‘ λΉνΈμ½μΈ νλ‘ν μ½μ λν μ§λΆ κ±°λ μ νμ΄λ€. μ£Όμλ 1λ‘ μμνλλ°, μΈκ·Έμμ μ§μνλ μλ‘μ΄ μ£Όμ 3 λλ bc1λ‘ μμνλ μ£Όμλ³΄λ€ ν¨μ¬ λΉμΈλ€. https://mirror.xyz/0xA1d9f681B25C14C1eE7B87f1CF102E73cA3ad4d9/egjhNVklgy_LgZmcTXXAOTBa6ePBqO3Ja9ZSoDIad-8 μ¦, λΉνΈμ½μΈ μ£Όμκ° 1λ‘ μμνλ©΄ P2PKH μ£Όμλ₯Ό μ¬μ©νκ³ μλ κ²μ΄λ€. 곡κ°ν€μ κ°λ¨ν ν΄μμ΄λ©°, μ΄ ν΄μλ₯Ό μ£Όμλ‘ μ¬μ©νλ κ²μ΄λ€. μ΄κ²μ μλ λΉνΈμ½μΈ μ£Όμ νμμ΄μμΌλ©° μ€λκΉμ§λ μΆ©μ€ν μλνλ€. λ κ±°μ μ£Όμλ μΈκ·Έμκ³Ό νΈνλμ§ μμ§λ§, μ¬μ ν λ¬Έμ μμ΄ P2PKH μ£Όμμμ μΈκ·Έμ μ£Όμλ‘ BTCλ₯Ό λ³΄λΌ μ μλ€. κ·Έλ¬λ λ κ±°μ μ£Όμ νΈλμμ μ΄ λ ν¬κΈ° λλ¬Έμ P2PKH μ£Όμμμ μ μ‘νλ νκ· μλλ μΈκ·Έμ μ£Όμμμ μ μ‘ν λλ³΄λ€ λ λμ μκΈμ΄ λ°μν μ μλ€....
<100 subscribers
Uvicorn & Gunicorn
Uvicorn and GunicornUvicorn and Gunicorn are important concepts when developing applications in Python. However, there are many concepts to be aware of in order to fully understand Uvicorn and Gunicorn. The following is a brief summary of the necessary concepts, and the details will be dealt with separately later.Necessary ConceptsStarletteStarlette is a Web application server that can run asynchronously. Starlette runs on top of Uvicorn.FastAPIFastAPI provides many features on top of Starlet...
Gas optimization in Solidity, Ethereum
Iβm sorry but my English is terrible. I hope you understand that generously.Recently, I was developing a toy project named Blind Market. Itβs a simple P2P trading application using smart contract. I was making a contract using Solidity, and the trade stage proceeded in the order of pending, shipping, and done. The problem was appeared in done phase. The problem was that when I tried to close the transaction by paying the price raised by the seller in msg.value, the following error occurred.Pe...
P2WPKH
P2WPKHP2WPKHλ λΉνΈμ½μΈ λ΄μμ κ°μ₯ μΌλ°μ μΈ μ€ν¬λ¦½νΈ νμμΌλ‘ λΉνΈμ½μΈ νλ‘ν μ½μ λν μ§λΆ κ±°λ μ νμ΄λ€. μ£Όμλ 1λ‘ μμνλλ°, μΈκ·Έμμ μ§μνλ μλ‘μ΄ μ£Όμ 3 λλ bc1λ‘ μμνλ μ£Όμλ³΄λ€ ν¨μ¬ λΉμΈλ€. https://mirror.xyz/0xA1d9f681B25C14C1eE7B87f1CF102E73cA3ad4d9/egjhNVklgy_LgZmcTXXAOTBa6ePBqO3Ja9ZSoDIad-8 μ¦, λΉνΈμ½μΈ μ£Όμκ° 1λ‘ μμνλ©΄ P2PKH μ£Όμλ₯Ό μ¬μ©νκ³ μλ κ²μ΄λ€. 곡κ°ν€μ κ°λ¨ν ν΄μμ΄λ©°, μ΄ ν΄μλ₯Ό μ£Όμλ‘ μ¬μ©νλ κ²μ΄λ€. μ΄κ²μ μλ λΉνΈμ½μΈ μ£Όμ νμμ΄μμΌλ©° μ€λκΉμ§λ μΆ©μ€ν μλνλ€. λ κ±°μ μ£Όμλ μΈκ·Έμκ³Ό νΈνλμ§ μμ§λ§, μ¬μ ν λ¬Έμ μμ΄ P2PKH μ£Όμμμ μΈκ·Έμ μ£Όμλ‘ BTCλ₯Ό λ³΄λΌ μ μλ€. κ·Έλ¬λ λ κ±°μ μ£Όμ νΈλμμ μ΄ λ ν¬κΈ° λλ¬Έμ P2PKH μ£Όμμμ μ μ‘νλ νκ· μλλ μΈκ·Έμ μ£Όμμμ μ μ‘ν λλ³΄λ€ λ λμ μκΈμ΄ λ°μν μ μλ€....
Share Dialog
Share Dialog
NFT μμ₯μμλ Royalty λΌλ κ°λ μ΄ μλ€.
μ½κ² μ€λͺ νλ©΄, λ΄κ° λ§λ NFT(λμ μ°½μλ¬Ό)μ λν΄μ, λͺ¨λ 2μ°¨νλ§€κ° μΌμ΄λλ κ²½μ° μ μ°½μμ(λ)μκ² μΌμ κΈμ‘μ μ§λΆνλ κ²μ΄λ€.
μ μκΆλ£λΌκ³ μκ°νλ©΄ μ΄ν΄κ° μ½λ€.
κΈ°μ‘΄ NFTλ₯Ό λ°ννκΈ° μν΄μ μλ§μ μ¬λλ€μ΄ ERC-721 컨νΈλνΈλ₯Ό λ°°ν¬ν΄ μ¬μ©νκ³ μμλλ°, Royalty μμ€ν
μ ꡬνν κ²μ κ° λ§μΌνλ μ΄μ€λ νλ‘μ νΈ λ³λ‘ λ¬λλ€.
κ·Έ νμ€μ μ 립ν κ²μ΄ λ°λ‘ μ€λ μκ°ν ERC-2981 컨νΈλνΈμ΄λ€.
/// @notice Called with the sale price to determine how much royalty
// is owed and to whom.
/// @param _tokenId - the NFT asset queried for royalty information
/// @param _salePrice - the sale price of the NFT asset specified by _tokenId
/// @return receiver - address of who should be sent the royalty payment
/// @return royaltyAmount - the royalty payment amount for _salePrice
function royaltyInfo(
uint256 _tokenId,
uint256 _salePrice
) external view returns (
address receiver,
uint256 royaltyAmount
);
EIP λ¬Έμμμ μ΄ν΄λ³΄λ©΄, μμ κ°μ΄ Royalty Infoλ₯Ό μ‘°ννλ ν¨μκ° μλ€.
receiverκ° μ μ°½μμκ° λ κ²μ΄κ³ , royaltyAmountλ salePriceλ₯Ό κΈ°λ°μΌλ‘ κ³μ°λ κ°κ²©μ 리ν΄νκ² λ κ²μ΄λ€.
EIP λ§ν¬
https://eips.ethereum.org/EIPS/eip-2981
Openzeppelinμμ λ΄λμ ERC 2981 컨νΈλνΈμ΄λ μ°Έκ³ νλ©΄ μ’μ κ² κ°λ€.
NFT μμ₯μμλ Royalty λΌλ κ°λ μ΄ μλ€.
μ½κ² μ€λͺ νλ©΄, λ΄κ° λ§λ NFT(λμ μ°½μλ¬Ό)μ λν΄μ, λͺ¨λ 2μ°¨νλ§€κ° μΌμ΄λλ κ²½μ° μ μ°½μμ(λ)μκ² μΌμ κΈμ‘μ μ§λΆνλ κ²μ΄λ€.
μ μκΆλ£λΌκ³ μκ°νλ©΄ μ΄ν΄κ° μ½λ€.
κΈ°μ‘΄ NFTλ₯Ό λ°ννκΈ° μν΄μ μλ§μ μ¬λλ€μ΄ ERC-721 컨νΈλνΈλ₯Ό λ°°ν¬ν΄ μ¬μ©νκ³ μμλλ°, Royalty μμ€ν
μ ꡬνν κ²μ κ° λ§μΌνλ μ΄μ€λ νλ‘μ νΈ λ³λ‘ λ¬λλ€.
κ·Έ νμ€μ μ 립ν κ²μ΄ λ°λ‘ μ€λ μκ°ν ERC-2981 컨νΈλνΈμ΄λ€.
/// @notice Called with the sale price to determine how much royalty
// is owed and to whom.
/// @param _tokenId - the NFT asset queried for royalty information
/// @param _salePrice - the sale price of the NFT asset specified by _tokenId
/// @return receiver - address of who should be sent the royalty payment
/// @return royaltyAmount - the royalty payment amount for _salePrice
function royaltyInfo(
uint256 _tokenId,
uint256 _salePrice
) external view returns (
address receiver,
uint256 royaltyAmount
);
EIP λ¬Έμμμ μ΄ν΄λ³΄λ©΄, μμ κ°μ΄ Royalty Infoλ₯Ό μ‘°ννλ ν¨μκ° μλ€.
receiverκ° μ μ°½μμκ° λ κ²μ΄κ³ , royaltyAmountλ salePriceλ₯Ό κΈ°λ°μΌλ‘ κ³μ°λ κ°κ²©μ 리ν΄νκ² λ κ²μ΄λ€.
EIP λ§ν¬
https://eips.ethereum.org/EIPS/eip-2981
Openzeppelinμμ λ΄λμ ERC 2981 컨νΈλνΈμ΄λ μ°Έκ³ νλ©΄ μ’μ κ² κ°λ€.
No comments yet