function to mint tokens?
function receiveFromChain(uint256 srcChain, uint256 nonce, address sender, uint256 amount, bytes memory signature) external {
address recipient = _msgSender();
_verifySignature(abi.encode(address(this), srcChain, block.chainid, nonce, sender, recipient, amount), signature);
require(!usedNonces[srcChain][nonce], "GreenMoveToken: nonce already used");
usedNonces[srcChain][nonce] = true;
_totalSupply += amount;
_updateBalance(recipient, amount, true);
emit Transfer(address(0), recipient, amount);
emit ChainTransfer(srcChain, block.chainid, nonce, sender, recipient, amount);
}
It seems like some kind of complicated mint to me, am i right about it?
Обсуждают сегодня