Edinburgh Agreement (2012)
The Edinburgh Agreement (full title: Agreement between the United Kingdom Government and the Scottish Government on a referendum on independence for Scotland) is the agreement between the Scottish Government and the United Kingdom Government, signed on 15 October 2012 at St Andrew's House, Edinburgh, on the terms for the 2014 Scottish independence referendum.Both governments agreed that the referendum should:

have a clear legal base
be legislated for by the Scottish Parliament
be conducted so as to command the confidence of parliaments, government and people
deliver a fair test and decisive expression of the views of people in Scotland and a result that everyone will respectThe governments agreed to promote an Order in Council under Section 30 of the Scotland Act 1998 to allow a single-question referendum on Scottish independence to be held before the end of 2014 so to put beyond doubt that the Scottish Parliament can legislate for the referendum. The legislation that the Scottish Parliament set to work on was;

the date of the referendum
the vote itself
the wording of the question voters would be asked
rules surrounding campaign financing
various other rules for the conduction of the referendumBoth governments agreed that the referendum should be overseen by an impartial electoral commission. The commission would comment on the wording of the question, register campaigners, designate lead campaigners, regulate campaign spending and finances, give grants to campaign organizations, create guidelines for participants in the referendum, report on the referendum process, conduct the poll, and announce the result.The agreement was signed by David Cameron, Prime Minister; Michael Moore, Secretary of State for Scotland; Alex Salmond, First Minister; and Nicola Sturgeon, Deputy First Minister. Whether the document was legally binding in theory is a matter of academic discussion. In practice, an Order in Council was in fact approved on 12 February 2013, granting constitutional legitimacy to the referendum held on 18 September 2014.