Skip to content

Commit

Permalink
Merge pull request #133 from corpus-io/update-docs-and-package
Browse files Browse the repository at this point in the history
release npm
  • Loading branch information
CJentzsch authored Mar 22, 2023
2 parents a40672c + c1a5eef commit 8090faa
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 14 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,4 @@ broadcast/
.env*
!.env.example
.npmignore
.VSCodeCounter/
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,11 @@ If you are missing dependencies:
- yarn: `npm install yarn`
- foundry: [install guide](https://book.getfoundry.sh/getting-started/installation)

For information regarding:
More dev information can be found here:

- testing, please go to [testing](docs/testing.md).
- deployment, please go to [deployment](docs/deployment.md).
- npm publishing, please go to [npm publishing](docs/npm_publishing.md).

For
- [testing](docs/testing.md).
- [deployment](docs/deployment.md).
- [npm publishing](docs/npm_publishing.md).

# Main Concept

Expand Down Expand Up @@ -81,7 +79,7 @@ Two contracts implement [EIP-2771](https://eips.ethereum.org/EIPS/eip-2771), and

The platform will maintain a hot wallet (EOA) in order to send transactions to the forwarder contract. This results in the following flow:

- contract A supports EIP-2771 and uses `forwarder` as its (one and only immutable) trusted forwarder
- contract A supports EIP-2771 and uses `forwarder` as its (one and only, immutable) trusted forwarder
- user (investor or founder) wants to use function `a(...)` of contract `A` and uses the platform for this
- platform (tokenize.it) prepares meta transaction payload and asks user for signature
- user signs the payload with their own key (using metamask or similar)
Expand Down Expand Up @@ -131,4 +129,6 @@ The following resources are available regarding the contracts:
- [Price format explainer](docs/price.md)
- [Fee Collection](./docs/fees.md)
- [Deployment](./docs/deployment.md)
- [Testing](docs/testing.md).
- [npm publishing](docs/npm_publishing.md).
- Remaining questions: please get in touch at [[email protected]](mailto:[email protected])
2 changes: 1 addition & 1 deletion docs/deployment.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Deploy these contracts like this:

```bash
source .env
forge script scripts/DeployPlatform.s.sol:DeployPlatform --rpc-url $GOERLI_RPC_URL --broadcast --verify --private-key $PRIVATE_KEY
forge script script/DeployPlatform.s.sol:DeployPlatform --rpc-url $GOERLI_RPC_URL --broadcast --verify --private-key $PRIVATE_KEY
```

Note:
Expand Down
5 changes: 2 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@tokenize.it/contracts",
"version": "4.0.0",
"version": "4.0.1",
"description": "Tokenize.it smart contracts for company tokenization, public fundraising, private offers and employee participation",
"keywords": [
"evm",
Expand All @@ -27,7 +27,7 @@
"files": [
"/contracts/**/*.sol",
"/artifacts/contracts/**/*[!.dbg].json",
"/types/**/*",
"/dist/**/*",
"/docs/**/*",
"hardhat.config.ts",
"tsconfig.json"
Expand All @@ -43,7 +43,6 @@
},
"publishConfig": {
"ignore": [
"!build/",
"src/",
"test/"
]
Expand Down
11 changes: 8 additions & 3 deletions script/DeployPlatform.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,20 @@ contract DeployPlatform is Script {
uint256 deployerPrivateKey = vm.envUint("PRIVATE_KEY");
address deployerAddress = vm.addr(deployerPrivateKey);

address platformColdWallet = 0x1695F52e342f3554eC8BC06621B7f5d1644cCE39;
address platformAdminWallet = 0x1695F52e342f3554eC8BC06621B7f5d1644cCE39;
// Goerli
//address platformColdWallet = 0x1695F52e342f3554eC8BC06621B7f5d1644cCE39;
//address platformAdminWallet = 0x1695F52e342f3554eC8BC06621B7f5d1644cCE39;

// Mainnet
address platformColdWallet = 0x9E23f8AA17B2721cf69D157b8a15bd7b64ac881C;
address platformAdminWallet = platformColdWallet;

console.log("Deployer address: ", deployerAddress);

vm.startBroadcast(deployerPrivateKey);

console.log("Deploying FeeSettings contract...");
Fees memory fees = Fees(20, 20, 20, 0);
Fees memory fees = Fees(100, 100, 100, 0);
FeeSettings feeSettings = new FeeSettings(fees, platformColdWallet);
console.log("FeeSettings deployed at: ", address(feeSettings));
feeSettings.transferOwnership(platformColdWallet);
Expand Down

0 comments on commit 8090faa

Please sign in to comment.