This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { config } from 'dotenv'; | |
import { ethers } from 'ethers'; | |
import axios from 'axios'; | |
config(); | |
// Goerli XAP resolver contract address | |
const contractAddr = "0x520497595f742426708dfbDcaB9D0D7D8555D937" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// SPDX-License-Identifier: MIT | |
pragma solidity ^0.8.17; | |
contract FunctionSelector { | |
/* | |
"transfer(address,uint256)" | |
0xa9059cbb | |
"transferFrom(address,address,uint256)" | |
0x23b872dd |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// SPDX-License-Identifier: MIT | |
pragma solidity ^0.8.13; | |
contract NameEncoder { | |
using BytesUtils for bytes; | |
function dnsEncodeName( | |
string memory name | |
) public pure returns (bytes memory dnsName, bytes32 node) { | |
uint8 labelLength = 0; |