đ Investors Wanted! đ
Join us in our journey to innovate blockchain technologies. Let's shape the future together.
To send or receive ERC-20 tokens, you need an address that is compatible with the Ethereum blockchain. Of course, most people use their wallets to send ERC20 tokens. But what if you need to make hundreds of thousands of transactions? In this case, you need a better way to send ERC20 tokens in an automated way. We have written a detailed tutorial for this purpose. Read more.
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
<?php
// Replace with your values
$apikey = "YOURAPIKEY";
$contractaddress = "CONTRACTADDRESS";
$from = "SENDERADDRESS";
$to = "RECEIVERADDRESS";
$password = "PASSWORD";
$amount = 55.89;
$url = "https://api.chaingateway.io/v2/ethereum/transactions/erc20";
$data = array(
"contractaddress" => $contractaddress,
"from" => $from,
"to" => $to,
"password" => $password,
"amount" => $amount
);
$headers = array(
'Accept: application/json',
'Authorization: ' . $apikey
);
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($data));
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
?>
Replace âYOURAPIKEYâ in line 3 of above code with the API Key in your Chaingateway.io Account Panel. Replace âPASSWORDâ in line 4 of above code with a very secure password (at least 12 characters alphanumeric of different case). Donât lose this password as you canât recover it!
Upload the code above to your local or remote machine Call the script by navigating to your favorite browser and entering the URL
Congratulations! You should now see a new generated address which you can use to send and receive ERC-20 Tokens.