diff --git a/README.md b/README.md index 1c7f5be..11dff79 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,18 @@ -# proposal -ChainCoin Governance Proposal Generator +Chaincoin Proposal Generator +================= + +http://www.chaincoin.org + +## How to install +`composer require chaincoin/proposal` + +## Start +1. Use the command `composer install`, to install chaincoin/php-api; +2. Update the file vendor/chaincoin/php-api/settings.php with the ip, port, user e password of your rpc-wallet; +3. Done! + +## Notes +You'll need some web server (apache/nginx), or you can use php buil-in server + + +If you would like to contribute feel free to do so! If you have any questions you can find us on the Chaincoin Discord at https://discord.gg/NabdcJ7 diff --git a/function/getConfirmations.php b/function/getConfirmations.php new file mode 100644 index 0000000..91db2ed --- /dev/null +++ b/function/getConfirmations.php @@ -0,0 +1,11 @@ +callMethod('gettransaction', array(0 => $_GET['txid'])); + +if ($chaincoin->getError() == NULL) + echo ($info['confirmations']); +else + echo $chaincoin->getError(); diff --git a/function/paymentDate.php b/function/paymentDate.php index 4c1b435..8551dc9 100644 --- a/function/paymentDate.php +++ b/function/paymentDate.php @@ -25,7 +25,7 @@ for ($count = 0; $count < $max; $count++) { $value = (($nextSuper + ($cycle * $count)) - $blocks) * $blockTime; if ($network == "test") - $miss = date("Y/m/d h:i", strtotime("+" . $value . " Seconds")); + $miss = date("Y/m/d H:i", strtotime("+" . $value . " Seconds")); else $miss = date("Y/m/d", strtotime("+" . $value . " Seconds")); array_push($data, $miss); diff --git a/function/submit.php b/function/submit.php new file mode 100644 index 0000000..876f7b1 --- /dev/null +++ b/function/submit.php @@ -0,0 +1,21 @@ +callMethod($command[0], + array( + 0 => $command[1], + 1 => $command[2], + 2 => $command[3], + 3 => $command[4], + 4 => $command[5], + 5 => $command[6] + )); + +if ($chaincoin->getError() == NULL) + echo "1"; +else + echo $chaincoin->getError(); diff --git a/index.php b/index.php index 14fd6b9..83b1fef 100644 --- a/index.php +++ b/index.php @@ -1,3 +1,4 @@ + @@ -19,34 +20,37 @@
-
+

Create a Proposal

-

Enter details for your Proposal and click 'Create Proposal'. This will generate a command you can run in your local wallet to prepare the Proposal at a cost of 5 CHC.

+

Enter details for your Proposal and click 'Create Proposal'. This will generate a command you can run in your local wallet to prepare the Proposal at a cost of CHC.


-
+
- + + + +
- +
-
@@ -54,7 +58,7 @@
-
@@ -62,14 +66,14 @@
- +
- +
+

ChainCoin Budget Proposal

-

Generate budget proposal commands you can copy/paste into your Dash wallet to prepare a budget proposal and submit it to the network.

+

Generate budget proposal commands you can copy/paste into your wallet to prepare a budget proposal and submit it to the network.

diff --git a/layouts/functions.php b/layouts/functions.php index 85937eb..35ab110 100644 --- a/layouts/functions.php +++ b/layouts/functions.php @@ -1,4 +1,9 @@ diff --git a/settings.php b/settings.php index 8b47bd7..7ca3450 100644 --- a/settings.php +++ b/settings.php @@ -1,3 +1,14 @@