Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature(template) Add new Certificate of Incorporation #299

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 12 additions & 12 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@
"all": true
},
"dependencies": {
"@accordproject/cicero-core": "0.20.0-beta.3",
"@accordproject/cicero-engine": "0.20.0-beta.3",
"@accordproject/cicero-test": "0.20.0-beta.3",
"@accordproject/cicero-core": "0.20.0-20191030200006",
"@accordproject/cicero-engine": "0.20.0-20191030200006",
"@accordproject/cicero-test": "0.20.0-20191030200006",
"@accordproject/concerto-core": "0.82.4",
"@accordproject/concerto-tools": "0.82.4",
"adm-zip": "^0.4.11",
Expand Down
1 change: 1 addition & 0 deletions src/certificate-of-incorporation/.cucumber.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
require('@accordproject/cicero-test').Steps;
4 changes: 4 additions & 0 deletions src/certificate-of-incorporation/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Certificate of Incorporation

This is a sample Certificate of Incorporation.

37 changes: 37 additions & 0 deletions src/certificate-of-incorporation/logic/logic.ergo
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
/*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

namespace org.accordproject.incorporation

import org.accordproject.cicero.runtime.*
import org.accordproject.signature.ContractSigned


/**
* This smart clause emits the contract data when the contract is signed
*/
contract CertificateOfIncorporation over IncorporationCertificate {
/**
* When the contract is signed a payment obligation is emitted
*/
clause contractSigned(request : ContractSigned) : Response {
emit ContractData{
companyName: contract.companyName,
incorporationDate: contract.incorporationDate,
authorizedShareCapital: contract.authorizedShareCapital,
parValue: contract.parValue
};
return Response{}
}
}
29 changes: 29 additions & 0 deletions src/certificate-of-incorporation/model/model.cto
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
namespace org.accordproject.incorporation

import org.accordproject.cicero.contract.* from https://models.accordproject.org/cicero/contract.cto
import org.accordproject.signature.ContractSigned from https://models.accordproject.org/signature/signature.cto

asset IncorporationCertificate extends AccordContract {
o String companyName
o String incorporationState
o String streetAddress
o String addressRegion
o String addressLocality
o String postalCode
o String registeredAgentName
o DateTime incorporationDate
o Long authorizedShareCapital
o Double parValue
o String incorporatorName
o String incorporatorAddress
o String incorporatorCity
o String incorporatorState
o String incorporatorZip
}

event ContractData {
o String companyName
o DateTime incorporationDate
o Long authorizedShareCapital
o Double parValue
}
18 changes: 18 additions & 0 deletions src/certificate-of-incorporation/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"name": "certificate-of-incorporation",
"version": "0.3.0",
"description": "This is a sample Certificate of Incorporation.",
"author": "Accord Project",
"license": "Apache-2.0",
"accordproject": {
"template": "contract",
"ergo": "0.19.0",
"cicero": "^0.19.0"
},
"devDependencies": {
"cucumber": "^5.1.0"
},
"scripts": {
"test": "cucumber-js test -r .cucumber.js"
}
}
4 changes: 4 additions & 0 deletions src/certificate-of-incorporation/request.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"$class": "org.accordproject.signature.ContractSigned",
"contract": "MY_CONTRACT"
}
33 changes: 33 additions & 0 deletions src/certificate-of-incorporation/test/logic.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
Feature: Certificate of Incorporation
This describe the expected behavior for the Accord Project's certificate of incorporation contract

Background:
Given the default contract

Scenario: The contract can be signed and emit information about the incorporation
When the current time is "2019-01-31T16:34:00-05:00"
And it receives the request
"""
{
"$class": "org.accordproject.signature.ContractSigned",
"contract": "MY_CONTRACT"
}
"""
Then it should respond with
"""
{
"$class": "org.accordproject.cicero.runtime.Response"
}
"""
And the following obligations should have been emitted
"""
[
{
"$class": "org.accordproject.incorporation.ContractData",
"companyName": "ACME",
"incorporationDate": "2019-04-01T00:00:00.000Z",
"authorizedShareCapital": 400,
"parValue": 0.1
}
]
"""
40 changes: 40 additions & 0 deletions src/certificate-of-incorporation/text/grammar.tem.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
Certificate OF INCORPORATION
OF
{{companyName}}

## Section I.
The name of the corporation is {{companyName}} (the “Corporation”).

## Section II.
The address of the Corporation’s registered office in the state of {{incorporationState}} is {{streetAddress}}, in the city of {{addressLocality}}, county of {{addressRegion}}, Zip Code {{postalCode}}. The name of its registered agent at such address is {{registeredAgentName}}.

## Section III.
The purpose of the Corporation is to engage in any lawful act or activity for which corporations may be organized under the Delaware General Corporation Law.

## Section IV.
The aggregate number of shares which the Corporation shall have authority to issue is {{authorizedShareCapital}} shares of capital stock all of which shall be designated “Common Stock” and have a par value of {{parValue}} per share.

## Section V.
The business and affairs of the Corporation shall be managed by or under the direction of the Board of Directors. Elections of directors need not be by written ballot unless otherwise provided in the Bylaws of the Corporation. In furtherance of and not in limitation of the powers conferred by the laws of the state of Delaware, the Board of Directors of the Corporation is expressly authorized to make, amend or repeal Bylaws of the Corporation.
Distributions by the Corporation may be made without regard to “preferential dividends arrears amount” or any “preferential rights,” as such terms may be used in Section 500 of the California Corporations Code.

## Section VI.
To the fullest extent permitted by the _Delaware General Corporation Law_, as the same exists or as may hereafter be amended, a director of the Corporation shall not be personally liable to the Corporation or its stockholders for monetary damages for breach of fiduciary duty as a director.
The Corporation shall indemnify to the fullest extent permitted by law any person made or threatened to be made a party to an action or proceeding, whether criminal, civil, administrative or investigative, by reason of the fact that he, his testator or intestate is or was a director or officer of the Corporation or any predecessor of the Corporation, or serves or served at any other enterprise as a director or officer at the request of the Corporation or any predecessor to the Corporation.

Neither any amendment nor repeal of this Article VI, nor the adoption of any provision of the Corporation’s Certificate of Incorporation inconsistent with this Article VI, shall eliminate or reduce the effect of this Article VI in respect of any matter occurring, or any action or proceeding accruing or arising or that, but for this Article VI, would accrue or arise, prior to such amendment, repeal or adoption of an inconsistent provision.

## Section VII.
Unless the Corporation consents in writing to the selection of an alternative forum, the Court of Chancery of the State of Delaware shall be the sole and exclusive forum for (A) any derivative action or proceeding asserting a claim on behalf of the Corporation, (B) any action or proceeding asserting a claim of breach of a fiduciary duty owed by any current or former director, officer, employee or agent of the Corporation to the Corporation or the Corporation’s stockholders, (C) any action or proceeding asserting a claim against the Corporation arising pursuant to any provision of the Delaware General Corporation Law or the Corporation’s Certificate of Incorporation or Bylaws, (D) any action or proceeding asserting a claim as to which the Delaware General Corporation Law confers jurisdiction upon the Court of Chancery of the State of Delaware, or (E) any action or proceeding asserting a claim governed by the internal affairs doctrine, in each case subject to said Court of Chancery having personal jurisdiction over the indispensable parties named as defendants therein.

## Section VIII.
The name and mailing address of the incorporator are as follows:

{{incorporatorName}}
{{incorporatorAddress}}
{{incorporatorCity}}, {{incorporatorState}} {{incorporatorZip}}

Executed on {{incorporationDate}}.
/s/
{{incorporatorName}}, Incorporator

40 changes: 40 additions & 0 deletions src/certificate-of-incorporation/text/sample.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
Certificate OF INCORPORATION
OF
"ACME"

## Section I.
The name of the corporation is "ACME" (the “Corporation”).

## Section II.
The address of the Corporation’s registered office in the state of "NY" is "555 main street", in the city of "New York", county of "Manhattan", Zip Code "10001". The name of its registered agent at such address is "Andie Agent".

## Section III.
The purpose of the Corporation is to engage in any lawful act or activity for which corporations may be organized under the Delaware General Corporation Law.

## Section IV.
The aggregate number of shares which the Corporation shall have authority to issue is 400 shares of capital stock all of which shall be designated “Common Stock” and have a par value of 0.10 per share.

## Section V.
The business and affairs of the Corporation shall be managed by or under the direction of the Board of Directors. Elections of directors need not be by written ballot unless otherwise provided in the Bylaws of the Corporation. In furtherance of and not in limitation of the powers conferred by the laws of the state of Delaware, the Board of Directors of the Corporation is expressly authorized to make, amend or repeal Bylaws of the Corporation.
Distributions by the Corporation may be made without regard to “preferential dividends arrears amount” or any “preferential rights,” as such terms may be used in Section 500 of the California Corporations Code.

## Section VI.
To the fullest extent permitted by the _Delaware General Corporation Law_, as the same exists or as may hereafter be amended, a director of the Corporation shall not be personally liable to the Corporation or its stockholders for monetary damages for breach of fiduciary duty as a director.
The Corporation shall indemnify to the fullest extent permitted by law any person made or threatened to be made a party to an action or proceeding, whether criminal, civil, administrative or investigative, by reason of the fact that he, his testator or intestate is or was a director or officer of the Corporation or any predecessor of the Corporation, or serves or served at any other enterprise as a director or officer at the request of the Corporation or any predecessor to the Corporation.

Neither any amendment nor repeal of this Article VI, nor the adoption of any provision of the Corporation’s Certificate of Incorporation inconsistent with this Article VI, shall eliminate or reduce the effect of this Article VI in respect of any matter occurring, or any action or proceeding accruing or arising or that, but for this Article VI, would accrue or arise, prior to such amendment, repeal or adoption of an inconsistent provision.

## Section VII.
Unless the Corporation consents in writing to the selection of an alternative forum, the Court of Chancery of the State of Delaware shall be the sole and exclusive forum for (A) any derivative action or proceeding asserting a claim on behalf of the Corporation, (B) any action or proceeding asserting a claim of breach of a fiduciary duty owed by any current or former director, officer, employee or agent of the Corporation to the Corporation or the Corporation’s stockholders, (C) any action or proceeding asserting a claim against the Corporation arising pursuant to any provision of the Delaware General Corporation Law or the Corporation’s Certificate of Incorporation or Bylaws, (D) any action or proceeding asserting a claim as to which the Delaware General Corporation Law confers jurisdiction upon the Court of Chancery of the State of Delaware, or (E) any action or proceeding asserting a claim governed by the internal affairs doctrine, in each case subject to said Court of Chancery having personal jurisdiction over the indispensable parties named as defendants therein.

## Section VIII.
The name and mailing address of the incorporator are as follows:

"FooBarAtor"
"555 oak street"
"Baltimore", "MD" "21201"

Executed on 04/01/2019.
/s/
"FooBarAtor", Incorporator