(hex: string)
| 87 | } |
| 88 | |
| 89 | export function methodHashFromEncodedHex(hex: string): string { |
| 90 | if (hex.startsWith('0x')) { |
| 91 | hex = hex.slice(2); |
| 92 | } |
| 93 | return toHex(hex.slice(0, 8)); |
| 94 | } |
| 95 | |
| 96 | export function encodeMethodSignature(methodSignature: string): string { |
| 97 | return crypto.keccak256(ByteArray.fromUTF8(methodSignature)).toHex().slice(0, 10); |
no test coverage detected