-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.js
82 lines (80 loc) · 2.26 KB
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
export const DoubleMintABI = [
{
inputs: [
{ internalType: "address", name: "friend_key", type: "address" },
{ internalType: "string", name: "name", type: "string" },
],
name: "addFriend",
outputs: [],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [{ internalType: "address", name: "pubkey", type: "address" }],
name: "checkUserExists",
outputs: [{ internalType: "bool", name: "", type: "bool" }],
stateMutability: "view",
type: "function",
},
{
inputs: [{ internalType: "string", name: "name", type: "string" }],
name: "createAccount",
outputs: [],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [],
name: "getMyFriendList",
outputs: [
{
components: [
{ internalType: "address", name: "pubkey", type: "address" },
{ internalType: "string", name: "name", type: "string" },
],
internalType: "struct DoubleMint.friend[]",
name: "",
type: "tuple[]",
},
],
stateMutability: "view",
type: "function",
},
{
inputs: [{ internalType: "address", name: "pubkey", type: "address" }],
name: "getUsername",
outputs: [{ internalType: "string", name: "", type: "string" }],
stateMutability: "view",
type: "function",
},
{
inputs: [{ internalType: "address", name: "friend_key", type: "address" }],
name: "readMessage",
outputs: [
{
components: [
{ internalType: "address", name: "sender", type: "address" },
{ internalType: "uint256", name: "timestamp", type: "uint256" },
{ internalType: "string", name: "msg", type: "string" },
],
internalType: "struct DoubleMint.message[]",
name: "",
type: "tuple[]",
},
],
stateMutability: "view",
type: "function",
},
{
inputs: [
{ internalType: "address", name: "friend_key", type: "address" },
{ internalType: "string", name: "_msg", type: "string" },
],
name: "sendMessage",
outputs: [],
stateMutability: "nonpayable",
type: "function",
},
];
export const contractAddress = "0x8D6D12Fe0462Eaf888265091585402f7D0Ed0959";
export const contractRPC = "https://data-seed-prebsc-1-s1.binance.org:8545";