MINI Sh3ll
<?
function x($val){
print '<pre>';
print_r($val);
print '</pre>';
die;
}
function y($val){
print '<pre>';
print_r($val);
print '</pre>';
}
function getMintedTokens(){
$curl = curl_init();
curl_setopt_array($curl, array(
//CURLOPT_URL => 'https://token.api.qila.io/tokens/?cc=2023080364cb65ba2bc08',
CURLOPT_URL => 'https://api.qila.io/read?cc=202309136501a2fdba111',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_POSTFIELDS =>'{}',
CURLOPT_HTTPHEADER => array(
'Content-Type: application/json',
//'api_key: 23080264ca01ef07d96',
'api_key: 2309136501a12bd7709',
),
));
$json_response = curl_exec($curl);
curl_close($curl);
$response = json_decode($json_response, true);
//x($response);
return $response['tokens'];
}
function mintToken($jsondata){
$curl = curl_init();
curl_setopt_array($curl, array(
//CURLOPT_URL => 'https://token.api.qila.io/tokens/mint?cc=2023080364cb65ba2bc08',
CURLOPT_URL => 'https://api.qila.io/bc/write?cc=202309136501a2fdba111',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_POSTFIELDS => $jsondata,
CURLOPT_HTTPHEADER => array(
'api_key: 2309136501a12bd7709',
'Content-Type: application/json'
),
));
$mint_response = curl_exec($curl);
curl_close($curl);
$mint_response = json_decode($mint_response, true);
$curl = curl_init();
curl_setopt_array($curl, array(
//CURLOPT_URL => 'https://token.api.qila.io/tokens/mint?cc=2023080364cb65ba2bc08',
CURLOPT_URL => 'https://api.qila.io/write?cc=202309136501a2fdba111',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_POSTFIELDS =>$jsondata, /*'{
"image": "http://10.0.0.81:8080/ipfs/http://10.0.0.81:8080/ipfs/QmcT7K94EruKWmXfUMVDZY5gK8yQK4u2uvUbURr3RK8qJF",
"animation_url": "http://10.0.0.81:8080/ipfs/QmegGsU2Dq86kRXAA2Bpuzgcw9Yaz6rm2j8JtuhZ99ZBwU",
"name": "Appleton Estate 17 Year Old Legend Limited Edition NFT: #1",
"description": "This once-in-a-lifetime limited release of Appleton Estate 17 Year Old Legend honours the legacy of one of the most iconic rums ever produced on the Appleton Estate – The J. Wray & Nephew 17 Year Old. Using original recipes and four very rare distillates, our Master Blender Joy Spence has faithfully re-created the legendary Rum that inspired the first ever Mai Tai in the 1940’s. Of the only 1,500 bottles to ever be produced globally, 36 will be offered as individual NFT’s, exclusively available on BlockBar.com",
"attributes": [
{
"trait_type": "Rel3ease1234",
"value": "Appleton Estate 17 Year Old Legend Limited Edition NFT"
},
{
"trait_type": "Brand",
"value": "Appleton Estate"
},
{
"trait_type": "Spiritd",
"value": "Rum"
},
{
"trait_type": "Regiond",
"value": "Jamaica"
},
{
"trait_type": "Size",
"value": "750ml"
},
{
"trait_type": "ABV",
"value": "49%"
},
{
"trait_type": "Year",
"value": "17 Years Old"
}
],
"external_url": "https://blockbar.com/brands/appleton-estate/appleton-estate-17-year-old-legend-limited-edition"
}',*/
CURLOPT_HTTPHEADER => array(
'Content-Type: application/json',
//'api_key: 23080264ca01ef07d96',
'api_key: 2309136501a12bd7709',
),
));
$mint_response = curl_exec($curl);
curl_close($curl);
$mint_response = json_decode($mint_response, true);
return $mint_response;
}
function getTokenHistory($tokenId){
$curl = curl_init();
curl_setopt_array($curl, array(
//CURLOPT_URL => 'https://token.api.qila.io/tokens/history?cc=2023080364cb65ba2bc08',
CURLOPT_URL => 'https://api.qila.io/history?cc=202309136501a2fdba111',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_POSTFIELDS =>'{
"tokenId" : "'.$tokenId.'"
}',
CURLOPT_HTTPHEADER => array(
'Content-Type: application/json',
'api_key: 23080264ca01ef07d96',
),
));
$response = curl_exec($curl);
curl_close($curl);
$response = json_decode($response, true);
return $response;
}
function transferToken($tokenId, $toUser, $owner_id){
$curl = curl_init();
curl_setopt_array($curl, array(
//CURLOPT_URL => 'https://token.api.qila.io/tokens/transfer?cc=2023080364cb65ba2bc08',
CURLOPT_URL => 'https://api.qila.io/transfer?cc=202309136501a2fdba111',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_POSTFIELDS =>'{
"tokenId":"'.$tokenId.'",
"toUser":"'.$toUser.'",
"owner": "'.$owner_id.'"
}',
CURLOPT_HTTPHEADER => array(
'Content-Type: application/json',
'api_key: 23080264ca01ef07d96',
),
));
$response = curl_exec($curl);
curl_close($curl);
$response = json_decode($response, true);
return $response;
}
function burnToken($tokenId, $owner){
$curl = curl_init();
curl_setopt_array($curl, array(
//CURLOPT_URL => 'https://token.api.qila.io/tokens/burn?cc=2023080364cb65ba2bc08',
CURLOPT_URL => 'https://api.qila.io/burn?cc=202309136501a2fdba111',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_POSTFIELDS =>'{
"tokenId":"'.$tokenId.'",
"owner": "'.$owner.'"
}',
CURLOPT_HTTPHEADER => array(
'Content-Type: application/json',
//'api_key: 23080264ca01ef07d96',
'api_key: 2309136501a12bd7709',
),
));
$response = curl_exec($curl);
curl_close($curl);
$response = json_decode($response, true);
return $response;
}
$tokenUsers = [
"Rajesh" => "x509::/OU=org1/OU=client/CN=Rajesh::/C=US/ST=North Carolina/O=Hyperledger/OU=Fabric/CN=fabric-ca-server",
"Nilesh" => "x509::/OU=org1/OU=client/CN=Nilesh::/C=US/ST=North Carolina/O=Hyperledger/OU=Fabric/CN=fabric-ca-server",
"Raju" => "x509::/OU=org1/OU=client/CN=Raju::/C=US/ST=North Carolina/O=Hyperledger/OU=Fabric/CN=fabric-ca-server",
"kiran" => "x509::/OU=org1/OU=client/CN=kiran::/C=US/ST=North Carolina/O=Hyperledger/OU=Fabric/CN=fabric-ca-server",
];
$tokenColors = [
"Rajesh" => "primary",
"Nilesh" => "success",
"Raju" => "warning",
"kiran" => "danger",
];
?>
OHA YOOOO