diff --git a/public/images/cap-table-issuer.png b/public/images/cap-table-issuer.png new file mode 100644 index 0000000..b21bbff Binary files /dev/null and b/public/images/cap-table-issuer.png differ diff --git a/src/pages/development/_meta.json b/src/pages/development/_meta.json index e426cb7..e265fa5 100644 --- a/src/pages/development/_meta.json +++ b/src/pages/development/_meta.json @@ -1,5 +1,6 @@ { "install": "Install", "setup": "Setup", - "factory-deployment": "Factory Deployment" + "factory-deploy": "Deploy Factory", + "cap-table-deploy": "Deploy Cap Table" } diff --git a/src/pages/development/cap-table-deploy.mdx b/src/pages/development/cap-table-deploy.mdx new file mode 100644 index 0000000..53894f5 --- /dev/null +++ b/src/pages/development/cap-table-deploy.mdx @@ -0,0 +1,60 @@ +import { Steps } from 'nextra/components'; + +# Cap table smart contract + +The cap table smart contract is responsible for minting the inital cap table onchain can be found in our repo under [CapTable.sol](https://github.com/transfer-agent-protocol/tap-cap-table/blob/main/chain/src/CapTable.sol). + +## Deploy cap table smart contract + + +### Run the server + +In the root folder, run the development server: + +```bash +yarn dev +``` + +### Open Postman, and create a new POST request + +Create a new request in Postman, and set the request type to `POST`. In the URL field, enter `http://localhost:{{PORT}}/issuer/create` - your port should be `8293` if you haven't changed it. + +### Set the request body + +In the request body, use this example JSON. You can change anything you like here. Every field is required and will first run through validation against the OCF schema using our [validateInputAgainstSchema](https://github.com/transfer-agent-protocol/tap-cap-table/blob/main/src/utils/validateInputAgainstSchema.js) script. + +```json +{ + "legal_name": "Transfer Agent Protocol", + "formation_date": "2022-08-23", + "country_of_formation": "US", + "country_subdivision_of_formation": "DE", + "initial_shares_authorized": "10000000", + "tax_ids": [ + { + "tax_id": "88-3977591", + "country": "US" + } + ], + "email": { + "email_address": "dev@transferagentprotocol.xyz", + "email_type": "BUSINESS" + }, + "address": { + "address_type": "LEGAL", + "street_suite": "447 Broadway\n2nd Fl #713", + "city": "New York", + "country_subdivision": "NY", + "country": "US", + "postal_code": "10013" + }, + "comments": [] +} +``` + +### Send the request + +Your request should look like this. Notice that in the response, you get the `capTableAddress` which is the address of the cap table smart contract. Congratulations, you've deployed your first cap table smart contract! +![Factories](../../../public/images/cap-table-issuer.png) + + diff --git a/src/pages/development/factory-deployment.mdx b/src/pages/development/factory-deploy.mdx similarity index 100% rename from src/pages/development/factory-deployment.mdx rename to src/pages/development/factory-deploy.mdx diff --git a/src/pages/protocol/tap-cap-table.mdx b/src/pages/protocol/tap-cap-table.mdx index 5d20ce1..634cf61 100644 --- a/src/pages/protocol/tap-cap-table.mdx +++ b/src/pages/protocol/tap-cap-table.mdx @@ -6,7 +6,7 @@ import { Card, Cards, Callout } from 'nextra/components' Let's go over smart contract and what it does. We're going to start with the Cap Table Factory. -## Cap Table Factory +## Factory The [CapTableFactory](https://github.com/transfer-agent-protocol/tap-cap-table/blob/main/chain/src/CapTableFactory.sol) smart contract uses OpenZeppelin's upgradeable beacon pattern to create and manage upgradeable instances of cap tables for tokenized assets, leveraging proxy contracts for modularity and upgradability. @@ -14,9 +14,17 @@ It lets the contract owner to create new cap table instances with specific initi The contract tracks each cap table proxy created, offering a function to count the total number of cap tables managed. The contract also provides a function to retrieve the address of a cap table proxy by its index. +## Cap Table + +The [CapTable](https://github.com/transfer-agent-protocol/tap-cap-table/blob/main/chain/src/CapTable.sol) contract manages tokenized stock with role-based access for secure operations. It tracks stakeholders, stock classes, and transactions, supporting stock issuance, repurchase, and adjustments. It uses OpenZeppelin's upgradeable contracts for enhanced functionality and security. + + \ No newline at end of file