Git Product home page Git Product logo

pablock-smart-contracts's Introduction

Pablock Smart Contract

Implementations of Pablock Suite smazrt contracts, includes:

  • PablockToken: ERC20 Utility Token to use Pablock services.
  • PablockNFT: ERC721 token to generate custom NFT
  • PablockNotarization: Notarization contract to save file hash on blockchain
  • PablockMultiSign: Facotry to deploy multi sign contract.
  • EIP712 compatible meta transaction.

Overview

Installation

npm install git+https://github.com/bcode-tech/Pablock-Smart-Contracts

or

yarn add git+https://github.com/bcode-tech/Pablock-Smart-Contracts

Development

Trying to improve the contracts? Test? Deploy? Run scripts?

Use a .env file based on .env.example to store private keys and other variables, if you plan to deploy or test outside the local environment.

For testing meta transaction the test will need private keys of hardhat generated wallet. Run:

npx hardhat node

Take a bunch of keys and store them in privateKeys.json as an array, the keys will not need of 0x prefix.

Install all the dependencies:

yarn install

Run all test:

npx hardhat test

Run specific test:

npx hardhat test test/PablockNotarization.test.ts

Deploy:

npx hardhat run scripts/deploy.ts --network <network_name>

Usage

Once installed, use PablockMetaTranasactionReceiver to enable Pablock meta transaction on your contract.

pragma solidity 0.8.9;
import "pablock-smart-contract/contract/PablockMetaTxReceiver.sol";

contract MyContract is PablockMetaTxReceiver {
  constructor(address metaTxAddress)
    PablockMetaTxReceiver("MyContract", "0.0.1")
  {
    setMetaTransaction(metaTxAddress);
  }
}

metaTxAddress rappresents the deployment address of EIP712MetaTransaction deployed by BCode from the Pablock ecosystem.

Integration

Contract addresses of currently deployed contracts are shown below.

MUBAI

Currently deployed contract on Mumbai Testnet refers to v1.1.3

{
  "PABLOCK_TOKEN_ADDRESS": "0x4453cfB250e3a81197D331C86A9B1C8778bb0246",
  "PABLOCK_META_TRANSACTION": "0x4419AF074BC3a6C7D90f242dfdC1a163Bc710091",
  "PABLOCK_NOTARIZATION": "0x8344F05f33AE80f1c03C8dc8f619719AcDe8cE49",
  "PABLOCK_NFT": "0x1cDED0caD17a03f410e6Cf3C3db003331B9341ec",
  "PABLOCK_MULTISIGN_FACTORY": "0x7296EE0F1036eC74eCF111E676e70eE97597A7d1"
}

POLYGON MAINNET

Currently deployed contract on Mumbai Testnet refers to v1.1.2

{
  "PABLOCK_TOKEN_ADDRESS_POLYGON": "0x284a7eF2ADD52890980E0173469FDE45d172bABD",
  "PABLOCK_META_TRANSACTION_POLYGON": "0x5Dc63336bA6d4c1688E51e91fD7B002FC58C2dc9",
  "PABLOCK_NOTARIZATION_POLYGON": "0xa347328B5b71eCFFcA8Da951AE2bDDa42F32066D",
  "PABLOCK_NFT_POLYGON": "0x5979b9697C7ff4AD8925680a0998C449F070E962",
  "PABLOCK_MULTISIGN_FACTORY_POLYGON": "0xDF4FEC568B4975AE4E39AAC576143d0E86dd2e1A"
}

pablock-smart-contracts's People

Contributors

iltumio avatar

Watchers

Riccardo Grespan avatar Bcode s.r.l. avatar

Forkers

peterattardi

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.