Skip to content

Commit

Permalink
🚨 fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
Aboudjem committed Nov 22, 2023
1 parent a40c92a commit 0d9f506
Show file tree
Hide file tree
Showing 8 changed files with 126 additions and 106 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/publish-prerelease.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:

jobs:
build:
if: 'github.event.release.prerelease'
if: "github.event.release.prerelease"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
Expand Down Expand Up @@ -49,7 +49,7 @@ jobs:
with:
node-version: 16
registry-url: https://npm.pkg.github.com/
scope: '@tokenysolutions'
scope: "@tokenysolutions"
- run: npm ci
- run: npm run build
- run: npm publish --tag beta
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/publish-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:

jobs:
build:
if: '!github.event.release.prerelease'
if: "!github.event.release.prerelease"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
Expand Down Expand Up @@ -49,7 +49,7 @@ jobs:
with:
node-version: 16
registry-url: https://npm.pkg.github.com/
scope: '@tokenysolutions'
scope: "@tokenysolutions"
- run: npm ci
- run: npm run build
- run: npm publish
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/push_checking.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:

steps:
- name: Checkout
uses: 'actions/checkout@master'
uses: "actions/checkout@master"

- name: Set Node.js
uses: actions/setup-node@v3
Expand All @@ -30,7 +30,7 @@ jobs:

steps:
- name: Checkout
uses: 'actions/checkout@master'
uses: "actions/checkout@master"

- name: Set Node.js
uses: actions/setup-node@v3
Expand Down
12 changes: 6 additions & 6 deletions .solcover.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
module.exports = {
skipFiles: [
"compliance/legacy",
"_testContracts",
"roles/permissioning/owner/",
"roles/permissioning/agent/",
],
skipFiles: [
"compliance/legacy",
"_testContracts",
"roles/permissioning/owner/",
"roles/permissioning/agent/",
],
};
12 changes: 7 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
# ERC-3643:

## RAPTOR: An Educational Approach to the T-REX Standard

![T-REX](https://repository-images.githubusercontent.com/639089118/95a268d6-0902-40e8-9e61-f46133e6d9ee)

## Introduction

Welcome to the **Raptor Version of ERC-3643** 🦖! This project is a respectful nod to the [**T-Rex (ERC-3643) standard**](https://github.com/TokenySolutions/T-REX/), developed by [@TokenySolutions](https://github.com/TokenySolutions).
Expand Down Expand Up @@ -51,11 +53,11 @@ For a detailed look at the changes, check out the project's [Change Log](./CHANG

###### Steps

* Navigate to the root project directory
* Ensure Hardhat is installed in the local project directory >> `npm install --save-dev hardhat`
* Run a local Hardhat node (If wanting to deploy locally) >> `npx hardhat node`
* Deploy ERC-3643 Raptor to your local node >> `npx hardhat run --network localhost scripts/deploy.js`
* The deployment script will run and the ERC-3643 Raptor contracts will be deployed
- Navigate to the root project directory
- Ensure Hardhat is installed in the local project directory >> `npm install --save-dev hardhat`
- Run a local Hardhat node (If wanting to deploy locally) >> `npx hardhat node`
- Deploy ERC-3643 Raptor to your local node >> `npx hardhat run --network localhost scripts/deploy.js`
- The deployment script will run and the ERC-3643 Raptor contracts will be deployed

## Thanks

Expand Down
94 changes: 47 additions & 47 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,62 +1,62 @@
// Token
const IToken = require('./artifacts/contracts/token/IToken.sol/IToken.json');
const Token = require('./artifacts/contracts/token/Token.sol/Token.json');
const TokenStorage = require('./artifacts/contracts/token/TokenStorage.sol/TokenStorage.json');
const IToken = require("./artifacts/contracts/token/IToken.sol/IToken.json");
const Token = require("./artifacts/contracts/token/Token.sol/Token.json");
const TokenStorage = require("./artifacts/contracts/token/TokenStorage.sol/TokenStorage.json");
// Roles
const AgentRole = require('./artifacts/contracts/roles/AgentRole.sol/AgentRole.json');
const AgentRoleUpgradeable = require('./artifacts/contracts/roles/AgentRoleUpgradeable.sol/AgentRoleUpgradeable.json');
const Roles = require('./artifacts/contracts/roles/Roles.sol/Roles.json');
const AgentRole = require("./artifacts/contracts/roles/AgentRole.sol/AgentRole.json");
const AgentRoleUpgradeable = require("./artifacts/contracts/roles/AgentRoleUpgradeable.sol/AgentRoleUpgradeable.json");
const Roles = require("./artifacts/contracts/roles/Roles.sol/Roles.json");
// Roles/permissioning/agent
const AgentManager = require('./artifacts/contracts/roles/permissioning/agent/AgentManager.sol/AgentManager.json');
const AgentRoles = require('./artifacts/contracts/roles/permissioning/agent/AgentRoles.sol/AgentRoles.json');
const AgentRolesUpgradeable = require('./artifacts/contracts/roles/permissioning/agent/AgentRolesUpgradeable.sol/AgentRolesUpgradeable.json');
const AgentManager = require("./artifacts/contracts/roles/permissioning/agent/AgentManager.sol/AgentManager.json");
const AgentRoles = require("./artifacts/contracts/roles/permissioning/agent/AgentRoles.sol/AgentRoles.json");
const AgentRolesUpgradeable = require("./artifacts/contracts/roles/permissioning/agent/AgentRolesUpgradeable.sol/AgentRolesUpgradeable.json");
// Roles/owner
const OwnerManager = require('./artifacts/contracts/roles/permissioning/owner/OwnerManager.sol/OwnerManager.json');
const OwnerRoles = require('./artifacts/contracts/roles/permissioning/owner/OwnerRoles.sol/OwnerRoles.json');
const OwnerRolesUpgradeable = require('./artifacts/contracts/roles/permissioning/owner/OwnerRolesUpgradeable.sol/OwnerRolesUpgradeable.json');
const OwnerManager = require("./artifacts/contracts/roles/permissioning/owner/OwnerManager.sol/OwnerManager.json");
const OwnerRoles = require("./artifacts/contracts/roles/permissioning/owner/OwnerRoles.sol/OwnerRoles.json");
const OwnerRolesUpgradeable = require("./artifacts/contracts/roles/permissioning/owner/OwnerRolesUpgradeable.sol/OwnerRolesUpgradeable.json");
// registry
const IClaimTopicsRegistry = require('./artifacts/contracts/registry/interface/IClaimTopicsRegistry.sol/IClaimTopicsRegistry.json');
const ClaimTopicsRegistry = require('./artifacts/contracts/registry/implementation/ClaimTopicsRegistry.sol/ClaimTopicsRegistry.json');
const IIdentityRegistry = require('./artifacts/contracts/registry/interface/IIdentityRegistry.sol/IIdentityRegistry.json');
const IdentityRegistry = require('./artifacts/contracts/registry/implementation/IdentityRegistry.sol/IdentityRegistry.json');
const IIdentityRegistryStorage = require('./artifacts/contracts/registry/interface/IIdentityRegistryStorage.sol/IIdentityRegistryStorage.json');
const IdentityRegistryStorage = require('./artifacts/contracts/registry/implementation/IdentityRegistryStorage.sol/IdentityRegistryStorage.json');
const ITrustedIssuersRegistry = require('./artifacts/contracts/registry/interface/ITrustedIssuersRegistry.sol/ITrustedIssuersRegistry.json');
const TrustedIssuersRegistry = require('./artifacts/contracts/registry/implementation/TrustedIssuersRegistry.sol/TrustedIssuersRegistry.json');
const IClaimTopicsRegistry = require("./artifacts/contracts/registry/interface/IClaimTopicsRegistry.sol/IClaimTopicsRegistry.json");
const ClaimTopicsRegistry = require("./artifacts/contracts/registry/implementation/ClaimTopicsRegistry.sol/ClaimTopicsRegistry.json");
const IIdentityRegistry = require("./artifacts/contracts/registry/interface/IIdentityRegistry.sol/IIdentityRegistry.json");
const IdentityRegistry = require("./artifacts/contracts/registry/implementation/IdentityRegistry.sol/IdentityRegistry.json");
const IIdentityRegistryStorage = require("./artifacts/contracts/registry/interface/IIdentityRegistryStorage.sol/IIdentityRegistryStorage.json");
const IdentityRegistryStorage = require("./artifacts/contracts/registry/implementation/IdentityRegistryStorage.sol/IdentityRegistryStorage.json");
const ITrustedIssuersRegistry = require("./artifacts/contracts/registry/interface/ITrustedIssuersRegistry.sol/ITrustedIssuersRegistry.json");
const TrustedIssuersRegistry = require("./artifacts/contracts/registry/implementation/TrustedIssuersRegistry.sol/TrustedIssuersRegistry.json");
// registry/Storage
const CTRStorage = require('./artifacts/contracts/registry/storage/CTRStorage.sol/CTRStorage.json');
const IRSStorage = require('./artifacts/contracts/registry/storage/IRSStorage.sol/IRSStorage.json');
const IRStorage = require('./artifacts/contracts/registry/storage/IRStorage.sol/IRStorage.json');
const TIRStorage = require('./artifacts/contracts/registry/storage/TIRStorage.sol/TIRStorage.json');
const CTRStorage = require("./artifacts/contracts/registry/storage/CTRStorage.sol/CTRStorage.json");
const IRSStorage = require("./artifacts/contracts/registry/storage/IRSStorage.sol/IRSStorage.json");
const IRStorage = require("./artifacts/contracts/registry/storage/IRStorage.sol/IRStorage.json");
const TIRStorage = require("./artifacts/contracts/registry/storage/TIRStorage.sol/TIRStorage.json");
// proxy
const IProxy = require('./artifacts/contracts/proxy/interface/IProxy.sol/IProxy.json');
const AbstractProxy = require('./artifacts/contracts/proxy/AbstractProxy.sol/AbstractProxy.json');
const ClaimTopicsRegistryProxy = require('./artifacts/contracts/proxy/ClaimTopicsRegistryProxy.sol/ClaimTopicsRegistryProxy.json');
const IdentityRegistryProxy = require('./artifacts/contracts/proxy/IdentityRegistryProxy.sol/IdentityRegistryProxy.json');
const IdentityRegistryStorageProxy = require('./artifacts/contracts/proxy/IdentityRegistryStorageProxy.sol/IdentityRegistryStorageProxy.json');
const ModularComplianceProxy = require('./artifacts/contracts/proxy/ModularComplianceProxy.sol/ModularComplianceProxy.json');
const TokenProxy = require('./artifacts/contracts/proxy/TokenProxy.sol/TokenProxy.json');
const TrustedIssuersRegistryProxy = require('./artifacts/contracts/proxy/TrustedIssuersRegistryProxy.sol/TrustedIssuersRegistryProxy.json');
const IProxy = require("./artifacts/contracts/proxy/interface/IProxy.sol/IProxy.json");
const AbstractProxy = require("./artifacts/contracts/proxy/AbstractProxy.sol/AbstractProxy.json");
const ClaimTopicsRegistryProxy = require("./artifacts/contracts/proxy/ClaimTopicsRegistryProxy.sol/ClaimTopicsRegistryProxy.json");
const IdentityRegistryProxy = require("./artifacts/contracts/proxy/IdentityRegistryProxy.sol/IdentityRegistryProxy.json");
const IdentityRegistryStorageProxy = require("./artifacts/contracts/proxy/IdentityRegistryStorageProxy.sol/IdentityRegistryStorageProxy.json");
const ModularComplianceProxy = require("./artifacts/contracts/proxy/ModularComplianceProxy.sol/ModularComplianceProxy.json");
const TokenProxy = require("./artifacts/contracts/proxy/TokenProxy.sol/TokenProxy.json");
const TrustedIssuersRegistryProxy = require("./artifacts/contracts/proxy/TrustedIssuersRegistryProxy.sol/TrustedIssuersRegistryProxy.json");
// proxy/authority
const IAFactory = require('./artifacts/contracts/proxy/authority/IAFactory.sol/IAFactory.json');
const IIAFactory = require('./artifacts/contracts/proxy/authority/IIAFactory.sol/IIAFactory.json');
const ITREXImplementationAuthority = require('./artifacts/contracts/proxy/authority/ITREXImplementationAuthority.sol/ITREXImplementationAuthority.json');
const TREXImplementationAuthority = require('./artifacts/contracts/proxy/authority/TREXImplementationAuthority.sol/TREXImplementationAuthority.json');
const IAFactory = require("./artifacts/contracts/proxy/authority/IAFactory.sol/IAFactory.json");
const IIAFactory = require("./artifacts/contracts/proxy/authority/IIAFactory.sol/IIAFactory.json");
const ITREXImplementationAuthority = require("./artifacts/contracts/proxy/authority/ITREXImplementationAuthority.sol/ITREXImplementationAuthority.json");
const TREXImplementationAuthority = require("./artifacts/contracts/proxy/authority/TREXImplementationAuthority.sol/TREXImplementationAuthority.json");
// factory
const ITREXFactory = require('./artifacts/contracts/factory/ITREXFactory.sol/ITREXFactory.json');
const TREXFactory = require('./artifacts/contracts/factory/TREXFactory.sol/TREXFactory.json');
const ITREXFactory = require("./artifacts/contracts/factory/ITREXFactory.sol/ITREXFactory.json");
const TREXFactory = require("./artifacts/contracts/factory/TREXFactory.sol/TREXFactory.json");
// DVD
const DVDTransferManager = require('./artifacts/contracts/DVD/DVDTransferManager.sol/DVDTransferManager.json');
const DVDTransferManager = require("./artifacts/contracts/DVD/DVDTransferManager.sol/DVDTransferManager.json");
// compliance
const IModularCompliance = require('./artifacts/contracts/compliance/modular/IModularCompliance.sol/IModularCompliance.json');
const MCStorage = require('./artifacts/contracts/compliance/modular/MCStorage.sol/MCStorage.json');
const ModularCompliance = require('./artifacts/contracts/compliance/modular/ModularCompliance.sol/ModularCompliance.json');
const IModularCompliance = require("./artifacts/contracts/compliance/modular/IModularCompliance.sol/IModularCompliance.json");
const MCStorage = require("./artifacts/contracts/compliance/modular/MCStorage.sol/MCStorage.json");
const ModularCompliance = require("./artifacts/contracts/compliance/modular/ModularCompliance.sol/ModularCompliance.json");
// compliance/modular/modules
const IModule = require('./artifacts/contracts/compliance/modular/modules/IModule.sol/IModule.json');
const AbstractModule = require('./artifacts/contracts/compliance/modular/modules/AbstractModule.sol/AbstractModule.json');
const ConditionalTransferModule = require('./artifacts/contracts/compliance/modular/modules/ConditionalTransferModule.sol/ConditionalTransferModule.json');
const CountryAllowModule = require('./artifacts/contracts/compliance/modular/modules/CountryAllowModule.sol/CountryAllowModule.json');
const CountryRestrictModule = require('./artifacts/contracts/compliance/modular/modules/CountryRestrictModule.sol/CountryRestrictModule.json');
const IModule = require("./artifacts/contracts/compliance/modular/modules/IModule.sol/IModule.json");
const AbstractModule = require("./artifacts/contracts/compliance/modular/modules/AbstractModule.sol/AbstractModule.json");
const ConditionalTransferModule = require("./artifacts/contracts/compliance/modular/modules/ConditionalTransferModule.sol/ConditionalTransferModule.json");
const CountryAllowModule = require("./artifacts/contracts/compliance/modular/modules/CountryAllowModule.sol/CountryAllowModule.json");
const CountryRestrictModule = require("./artifacts/contracts/compliance/modular/modules/CountryRestrictModule.sol/CountryRestrictModule.json");

module.exports = {
contracts: {
Expand Down
11 changes: 7 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,18 @@
"ERC-3643",
"ERC3643",
"Tokenization",
"Real World Assets",
"RWA",
"Security Tokens",
"Web3",
"Smart Contracts",
"Blockchain",
"Solidity",
"T-REX",
"Raptor",
"EIP3643",
"EIP-3643",
"Real World Asset",
"T-Rex Standard",
"Tokeny Solutions"
],
Expand Down Expand Up @@ -46,10 +52,7 @@
"type": "git",
"url": "git+https://github.com/aboudjem/ERC-3643.git"
},
"author": "Tokeny Solutions",
"contributors": [
"Adam BOUDJEMAA (@Aboudjem)"
],
"author": "Adam BOUDJEMAA (@aboudjem)",
"license": "SEE LICENSE IN LICENSE.md",
"bugs": {
"url": "https://github.com/aboudjem/ERC-3643/issues"
Expand Down
91 changes: 53 additions & 38 deletions scripts/deploy.js
Original file line number Diff line number Diff line change
@@ -1,43 +1,58 @@
const {deployFullSuiteFixture} = require('../test/fixtures/deploy-full-suite.fixture.ts');
const {
deployFullSuiteFixture,
} = require("../test/fixtures/deploy-full-suite.fixture.ts");

async function main(){
const deployment = await deployFullSuiteFixture();
async function main() {
const deployment = await deployFullSuiteFixture();


console.log(deployment);
console.log("\n~~ Accounts ~~");
console.log("Deployer: ", deployment.accounts.deployer.address);
console.log("Token Issuer: ", deployment.accounts.tokenIssuer.address);
console.log("Token Agent: ", deployment.accounts.tokenAgent.address);
console.log("Token Admin: ", deployment.accounts.tokenAdmin.address);
console.log("Claim Issuer: ", deployment.accounts.claimIssuer.address);
console.log("Claim Issuer Signing Key: ", deployment.accounts.claimIssuerSigningKey.address);
console.log("Alice Action Key: ", deployment.accounts.aliceActionKey.address);
console.log("Alice Wallet: ", deployment.accounts.aliceWallet.address);
console.log("Bob WAllet: ", deployment.accounts.bobWallet.address);
console.log("Charlie Wallet: ", deployment.accounts.charlieWallet.address);
console.log("David Wallet: ", deployment.accounts.davidWallet.address);
console.log("Another Wallet: ", deployment.accounts.anotherWallet.address);
console.log("\n~~ Identities ~~");
console.log("Alice Identity: ", deployment.identities.aliceIdentity.address);
console.log("Bob Identity: ", deployment.identities.bobIdentity.address);
console.log("Charlie Identity: ", deployment.identities.charlieIdentity.address);
console.log("\n~~ Suite ~~");
console.log("Claim Issuer Contract: ", deployment.suite.claimIssuerContract.address);
console.log("Claim Topics Registry: ", deployment.suite.claimTopicsRegistry.address);
console.log("Identity Registry Storage: ", deployment.suite.identityRegistryStorage.address);
console.log("Basic Compliance: ", deployment.suite.basicCompliance.address);
console.log("Identity Registry: ", deployment.suite.identityRegistry.address);
console.log("TokenOID: ", deployment.suite.tokenOID.address);
console.log("Token: ", deployment.suite.token.address);
console.log("\n--- --- --- --- ---");
console.log('Deployment completed!');

console.log(deployment);
console.log("\n~~ Accounts ~~");
console.log("Deployer: ", deployment.accounts.deployer.address);
console.log("Token Issuer: ", deployment.accounts.tokenIssuer.address);
console.log("Token Agent: ", deployment.accounts.tokenAgent.address);
console.log("Token Admin: ", deployment.accounts.tokenAdmin.address);
console.log("Claim Issuer: ", deployment.accounts.claimIssuer.address);
console.log(
"Claim Issuer Signing Key: ",
deployment.accounts.claimIssuerSigningKey.address
);
console.log("Alice Action Key: ", deployment.accounts.aliceActionKey.address);
console.log("Alice Wallet: ", deployment.accounts.aliceWallet.address);
console.log("Bob WAllet: ", deployment.accounts.bobWallet.address);
console.log("Charlie Wallet: ", deployment.accounts.charlieWallet.address);
console.log("David Wallet: ", deployment.accounts.davidWallet.address);
console.log("Another Wallet: ", deployment.accounts.anotherWallet.address);
console.log("\n~~ Identities ~~");
console.log("Alice Identity: ", deployment.identities.aliceIdentity.address);
console.log("Bob Identity: ", deployment.identities.bobIdentity.address);
console.log(
"Charlie Identity: ",
deployment.identities.charlieIdentity.address
);
console.log("\n~~ Suite ~~");
console.log(
"Claim Issuer Contract: ",
deployment.suite.claimIssuerContract.address
);
console.log(
"Claim Topics Registry: ",
deployment.suite.claimTopicsRegistry.address
);
console.log(
"Identity Registry Storage: ",
deployment.suite.identityRegistryStorage.address
);
console.log("Basic Compliance: ", deployment.suite.basicCompliance.address);
console.log("Identity Registry: ", deployment.suite.identityRegistry.address);
console.log("TokenOID: ", deployment.suite.tokenOID.address);
console.log("Token: ", deployment.suite.token.address);
console.log("\n--- --- --- --- ---");
console.log("Deployment completed!");
}

main()
.then(() => process.exit(0))
.catch(error => {
console.error(error);
process.exit(1);
});
.then(() => process.exit(0))
.catch((error) => {
console.error(error);
process.exit(1);
});

0 comments on commit 0d9f506

Please sign in to comment.