Airdrop

function airdrop(
    address _nftAddress, 
    bytes memory _airdrops
) external onlyAllowed

μ§€μ •λœ 토큰을 μ§€μ •λœ μ‚¬μš©μžμ—κ²Œ μ „μ†‘ν•˜λŠ” Airdrop ν•¨μˆ˜ (사전에 airdrops Parameter 에 λ“€μ–΄κ°ˆ encodingν•„μš”)

Parameters

TypeValueDescription

address

_nftAddress

전솑할 NFT Contract μ£Όμ†Œ

bytes

_airdrops

전솑할 토큰λͺ©λ‘ Encoded

Encode

function encoding = () => {

    const airdropInformation = [
      ["0x4B0897b0513fdC7C541B6d9D7E929C4e5364D2dB", 5],
      ["0x583031D1113aD414F02576BD6afaBfb302140225", 6],
      ["0xdD870fA1b7C4700F2BD7f44238821C26f7392148", 7]
    ]
  
    const abiCoder = ethers.AbiCoder.defaultAbiCoder();
    const result = abiCoder.encode(["tuple(address, uint256)[]"], [airdropInformation]);
  
}

Example

await CarrieverseNFTTransmitter.airdrop(
    nftAddress
    0x000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000030000000000000000000000004b0897b0513fdc7c541b6d9d7e929c4e5364d2db0000000000000000000000000000000000000000000000000000000000000005000000000000000000000000583031d1113ad414f02576bd6afabfb3021402250000000000000000000000000000000000000000000000000000000000000006000000000000000000000000dd870fa1b7c4700f2bd7f44238821c26f73921480000000000000000000000000000000000000000000000000000000000000007
);

Last updated