Skip to content

TP 1: Tezos Blockchain Interface for forwarding Assets, Policies and Contracts from EDC interactions.

License

Notifications You must be signed in to change notification settings

GAIA-X4PLC-AAD/EDC-Blockchain-Interface

Repository files navigation

EDC Interface

IPFS Setup

In order to pin content to the IPFS you must include your Pinata API credentials in the form of environment parameters:

  1. Create a file in root directory called ".env"
  2. Add your Pinata key as a variable (the JWT key):
    PINATA_KEY="<JWT key>"
    
  3. Optionally: Add your own smart contract addresses as env variables
    • ASSET_ADDRESS
    • POLICY_ADDRESS
    • CONTRACT_ADDRESS
    • TRANSFER_ADDRESS
    • AGREEMENT_ADDRESS

Run the Tezos Client

First, make sure all dependencies are installed:

npm install

Run the server locally:

npm run serve

Swagger Documentation

The documentation can be viewed on http://localhost:3000/docs when server runs.

Contract Information

Metadata of FA2 contracts is generated with the support of @taqueria/plugin-metadata feature to comply with TZIP-16 standard.

Following smart contracts were originated and can be used for minting by default:

Tezos Account

Feel free to use the current tezos account included in ./.taq/config.json for testing.

You can easily create your own account and change it in the config file.

When originating new contracts, make sure to update the new addresses in ./contractConfig.js.

Contract Origination

Compile Asset Contract:

npm run compileAssetContract

Deploy Asset Contract:

npm run deployAssetContract
  1. Alternative:
~/smartpy-cli/SmartPy.sh originate-contract --code ./artifacts/contractContract/step_000_cont_0_contract.tz --storage ./artifacts/contractContract/step_000_cont_0_storage.tz --rpc https://rpc.ghostnet.teztnets.com/

  1. Alternative(Scripts):

Generate a new address tz1... and load tez on to it:

./newAccount.sh 

Copy the hash and visit the tezos faucet page to fund your account at:

https://faucet.ghostnet.teztnets.xyz 

Generate new asset, policy, contract and/or whitelist contracts with:

./newContracts.sh 

If you wish to create and replace a new whitelist, update the hard coded default address (KT1FmkBCmA1TEVPWfyVN7GvMumvasnTtmbMr). The default whitelist address for asset, policy and contract contracts is hardcoded in the corresponding artifacts...\step_000_cont_0_contract.tz and artifacts...\step_000_cont_0_storage.tz files.

About

TP 1: Tezos Blockchain Interface for forwarding Assets, Policies and Contracts from EDC interactions.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •