Skip to content

terramirum/terramirum-contracts

Repository files navigation

truffle is a tool to create flatten file having openzeppelin libs contract.

Summary

This github project contract files are automatically generated by token fab blockchain-client application. To do this there are two simple contract.

  1. templates Any contract template can be created and added. This file name will be parameter of the deploy api. If you want to create a new contract, first create and commit its template folder and add these parameters to api call.
  2. contracts Contracts are automatically generated and push this github repo via blockchain-client app To verify the contract, use file ends with Verify.sol
  3. migrations Truffle template generated folder. Not use for our case
  4. test Truffle template generated folder. Not use for our case

Creating and deploying contract

Call the below sample api. Then you can see the new contract at etherscan.

curl -X POST http://localhost:7070/wallet/deploy -d '{"txKey":"1","chainId":"sepolia","tokenName":"TTNF","contractOwner":"0x2a2089e50CB2F0354fD8018C8fcC7538644e3673","contractTemplate":"FNFT1","manageType":"3","contractName":"TurnTurbine","precision":0,"contractPatameters":[{"name":"#NAME","value":"Turn Turbine"},{"name":"#URI","value":"https://nft.turnturbine.io/api/v1/tokens/"},{"name":"#MAXSUPPLY","value":"1000"},{"name":"#FNFT","value":"TurnTurbine"},{"name":"#TOKEN","value":"TTNF"}]}'

Verify the contract.

Call the below api and see its verify.sol file at contracts folder. Commit message has contract address and solidity version.

curl -X POST http://localhost:7070/wallet/verify -d '{"chainId":"sepolia","currency":"TTNF"}'

truffle prerequirities

sudo apt install npm
npm install truffle -g
npm install truffle-flattener -g

Creating flatten file

npm install truffle
npm install @openzeppelin/[email protected]
truffle-flattener contracts/TurnEstate/TurnEstate.sol > contracts/TurnEstate/TurnEstateFlat.sol

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published