Compare commits
6 Commits
feat/accou
...
fix/hook-o
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2c3cfebe3a | ||
|
|
6265a9cdbf | ||
|
|
1321b498cf | ||
|
|
801d9778cb | ||
|
|
2cf18ef61c | ||
|
|
4d2dc16ce5 |
@@ -287,6 +287,10 @@
|
||||
},
|
||||
{
|
||||
"TransactionType": "Invoke",
|
||||
"Destination": {
|
||||
"$type": "account",
|
||||
"$value": ""
|
||||
},
|
||||
"Fee": "12"
|
||||
},
|
||||
{
|
||||
|
||||
@@ -30,7 +30,7 @@ export const tts = {
|
||||
export type TTS = typeof tts
|
||||
|
||||
const calculateHookOn = (arr: (keyof TTS)[]) => {
|
||||
let s = '0x3e3ff5bf'
|
||||
let s = '0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffbfffff'
|
||||
arr.forEach(n => {
|
||||
let v = BigInt(s)
|
||||
v ^= BigInt(1) << BigInt(tts[n])
|
||||
|
||||
@@ -85,7 +85,8 @@ export const getInvokeOptions = (content?: string) => {
|
||||
export function toHex(str: string) {
|
||||
var result = ''
|
||||
for (var i = 0; i < str.length; i++) {
|
||||
result += str.charCodeAt(i).toString(16)
|
||||
const hex = str.charCodeAt(i).toString(16)
|
||||
result += hex.padStart(2, '0')
|
||||
}
|
||||
return result.toUpperCase()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user