Skip to content

Commit 6bab913

Browse files
committed
feat(plugin-conflux): support confiPump
1 parent d049425 commit 6bab913

12 files changed

+2389
-8
lines changed

.env.example

+2
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,7 @@ CONFLUX_CORE_PRIVATE_KEY=
9696
CONFLUX_CORE_SPACE_RPC_URL=
9797
CONFLUX_ESPACE_PRIVATE_KEY=
9898
CONFLUX_ESPACE_RPC_URL=
99+
CONFLUX_MEME_CONTRACT_ADDRESS=
99100

100101
# Coinbase
101102
COINBASE_COMMERCE_KEY= # from coinbase developer portal
@@ -104,3 +105,4 @@ COINBASE_PRIVATE_KEY= # from coinbase developer portal
104105
# if not configured it will be generated and written to runtime.character.settings.secrets.COINBASE_GENERATED_WALLET_ID and runtime.character.settings.secrets.COINBASE_GENERATED_WALLET_HEX_SEED
105106
COINBASE_GENERATED_WALLET_ID= # not your address but the wallet id from generating a wallet through the plugin
106107
COINBASE_GENERATED_WALLET_HEX_SEED= # not your address but the wallet hex seed from generating a wallet through the plugin and calling export
108+

packages/plugin-conflux/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@ Transfer tokens from one address to another within Conflux core space.
1616

1717
Transfer tokens from one address to Conflux eSpace.
1818

19-
### Sponsor
19+
### Sponsor (TBD)
2020

2121
Provide gas for Conflux core space contracts so they can be called without the need to have Conflux in user's wallet.
2222

23-
### Swap
23+
### Swap (TBD)
2424

2525
Swap tokens on Conflux DEXs.

packages/plugin-conflux/src/abi/crossSpaceCall.json

-1
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,184 @@
1+
const CrossSpaceCallAbi = [
2+
{
3+
anonymous: false,
4+
inputs: [
5+
{
6+
indexed: true,
7+
internalType: "bytes20",
8+
name: "sender",
9+
type: "bytes20",
10+
},
11+
{
12+
indexed: true,
13+
internalType: "bytes20",
14+
name: "receiver",
15+
type: "bytes20",
16+
},
17+
{
18+
indexed: false,
19+
internalType: "uint256",
20+
name: "value",
21+
type: "uint256",
22+
},
23+
{
24+
indexed: false,
25+
internalType: "uint256",
26+
name: "nonce",
27+
type: "uint256",
28+
},
29+
{
30+
indexed: false,
31+
internalType: "bytes",
32+
name: "data",
33+
type: "bytes",
34+
},
35+
],
36+
name: "Call",
37+
type: "event",
38+
},
39+
{
40+
anonymous: false,
41+
inputs: [
42+
{
43+
indexed: true,
44+
internalType: "bytes20",
45+
name: "sender",
46+
type: "bytes20",
47+
},
48+
{
49+
indexed: true,
50+
internalType: "bytes20",
51+
name: "contract_address",
52+
type: "bytes20",
53+
},
54+
{
55+
indexed: false,
56+
internalType: "uint256",
57+
name: "value",
58+
type: "uint256",
59+
},
60+
{
61+
indexed: false,
62+
internalType: "uint256",
63+
name: "nonce",
64+
type: "uint256",
65+
},
66+
{
67+
indexed: false,
68+
internalType: "bytes",
69+
name: "init",
70+
type: "bytes",
71+
},
72+
],
73+
name: "Create",
74+
type: "event",
75+
},
76+
{
77+
anonymous: false,
78+
inputs: [
79+
{
80+
indexed: false,
81+
internalType: "bool",
82+
name: "success",
83+
type: "bool",
84+
},
85+
],
86+
name: "Outcome",
87+
type: "event",
88+
},
89+
{
90+
anonymous: false,
91+
inputs: [
92+
{
93+
indexed: true,
94+
internalType: "bytes20",
95+
name: "sender",
96+
type: "bytes20",
97+
},
98+
{
99+
indexed: true,
100+
internalType: "address",
101+
name: "receiver",
102+
type: "address",
103+
},
104+
{
105+
indexed: false,
106+
internalType: "uint256",
107+
name: "value",
108+
type: "uint256",
109+
},
110+
{
111+
indexed: false,
112+
internalType: "uint256",
113+
name: "nonce",
114+
type: "uint256",
115+
},
116+
],
117+
name: "Withdraw",
118+
type: "event",
119+
},
120+
{
121+
inputs: [{ internalType: "bytes", name: "init", type: "bytes" }],
122+
name: "createEVM",
123+
outputs: [{ internalType: "bytes20", name: "", type: "bytes20" }],
124+
stateMutability: "payable",
125+
type: "function",
126+
},
127+
{
128+
inputs: [{ internalType: "bytes20", name: "to", type: "bytes20" }],
129+
name: "transferEVM",
130+
outputs: [{ internalType: "bytes", name: "output", type: "bytes" }],
131+
stateMutability: "payable",
132+
type: "function",
133+
},
134+
{
135+
inputs: [
136+
{ internalType: "bytes20", name: "to", type: "bytes20" },
137+
{ internalType: "bytes", name: "data", type: "bytes" },
138+
],
139+
name: "callEVM",
140+
outputs: [{ internalType: "bytes", name: "output", type: "bytes" }],
141+
stateMutability: "payable",
142+
type: "function",
143+
},
144+
{
145+
inputs: [
146+
{ internalType: "bytes20", name: "to", type: "bytes20" },
147+
{ internalType: "bytes", name: "data", type: "bytes" },
148+
],
149+
name: "staticCallEVM",
150+
outputs: [{ internalType: "bytes", name: "output", type: "bytes" }],
151+
stateMutability: "view",
152+
type: "function",
153+
},
154+
{
155+
inputs: [],
156+
name: "deployEip1820",
157+
outputs: [],
158+
stateMutability: "nonpayable",
159+
type: "function",
160+
},
161+
{
162+
inputs: [{ internalType: "uint256", name: "value", type: "uint256" }],
163+
name: "withdrawFromMapped",
164+
outputs: [],
165+
stateMutability: "nonpayable",
166+
type: "function",
167+
},
168+
{
169+
inputs: [{ internalType: "address", name: "addr", type: "address" }],
170+
name: "mappedBalance",
171+
outputs: [{ internalType: "uint256", name: "", type: "uint256" }],
172+
stateMutability: "view",
173+
type: "function",
174+
},
175+
{
176+
inputs: [{ internalType: "address", name: "addr", type: "address" }],
177+
name: "mappedNonce",
178+
outputs: [{ internalType: "uint256", name: "", type: "uint256" }],
179+
stateMutability: "view",
180+
type: "function",
181+
},
182+
];
183+
184+
export default CrossSpaceCallAbi;
+119
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,119 @@
1+
const ERC20ABI = [
2+
{
3+
constant: true,
4+
inputs: [],
5+
name: 'name',
6+
outputs: [{ name: '', type: 'string' }],
7+
payable: false,
8+
stateMutability: 'view',
9+
type: 'function',
10+
},
11+
{
12+
constant: false,
13+
inputs: [
14+
{ name: '_spender', type: 'address' },
15+
{ name: '_value', type: 'uint256' },
16+
],
17+
name: 'approve',
18+
outputs: [{ name: '', type: 'bool' }],
19+
payable: false,
20+
stateMutability: 'view',
21+
type: 'function',
22+
},
23+
{
24+
constant: true,
25+
inputs: [],
26+
name: 'totalSupply',
27+
outputs: [{ name: '', type: 'uint256' }],
28+
payable: false,
29+
stateMutability: 'view',
30+
type: 'function',
31+
},
32+
{
33+
constant: false,
34+
inputs: [
35+
{ name: '_from', type: 'address' },
36+
{ name: '_to', type: 'address' },
37+
{ name: '_value', type: 'uint256' },
38+
],
39+
name: 'transferFrom',
40+
outputs: [{ name: '', type: 'bool' }],
41+
payable: false,
42+
stateMutability: 'nonpayable',
43+
type: 'function',
44+
},
45+
{
46+
constant: true,
47+
inputs: [],
48+
name: 'decimals',
49+
outputs: [{ name: '', type: 'uint8' }],
50+
payable: false,
51+
stateMutability: 'view',
52+
type: 'function',
53+
},
54+
{
55+
constant: true,
56+
inputs: [{ name: '_owner', type: 'address' }],
57+
name: 'balanceOf',
58+
outputs: [{ name: 'balance', type: 'uint256' }],
59+
payable: false,
60+
stateMutability: 'view',
61+
type: 'function',
62+
},
63+
{
64+
constant: true,
65+
inputs: [],
66+
name: 'symbol',
67+
outputs: [{ name: '', type: 'string' }],
68+
payable: false,
69+
stateMutability: 'view',
70+
type: 'function',
71+
},
72+
{
73+
constant: false,
74+
inputs: [
75+
{ name: '_to', type: 'address' },
76+
{ name: '_value', type: 'uint256' },
77+
],
78+
name: 'transfer',
79+
outputs: [{ name: '', type: 'bool' }],
80+
payable: false,
81+
stateMutability: 'nonpayable',
82+
type: 'function',
83+
},
84+
{
85+
constant: true,
86+
inputs: [
87+
{ name: '_owner', type: 'address' },
88+
{ name: '_spender', type: 'address' },
89+
],
90+
name: 'allowance',
91+
outputs: [{ name: '', type: 'uint256' }],
92+
payable: false,
93+
stateMutability: 'view',
94+
type: 'function',
95+
},
96+
{ payable: true, stateMutability: 'payable', type: 'fallback' },
97+
{
98+
anonymous: false,
99+
inputs: [
100+
{ indexed: true, name: 'owner', type: 'address' },
101+
{ indexed: true, name: 'spender', type: 'address' },
102+
{ indexed: false, name: 'value', type: 'uint256' },
103+
],
104+
name: 'Approval',
105+
type: 'event',
106+
},
107+
{
108+
anonymous: false,
109+
inputs: [
110+
{ indexed: true, name: 'from', type: 'address' },
111+
{ indexed: true, name: 'to', type: 'address' },
112+
{ indexed: false, name: 'value', type: 'uint256' },
113+
],
114+
name: 'Transfer',
115+
type: 'event',
116+
},
117+
] as const;
118+
119+
export default ERC20ABI;

0 commit comments

Comments
 (0)