FahimDev / TrustChain-Blockchain-Enabled-SupplyChain-Audit-MVP

A hybrid blockchain solution for auditing supply chain lifecycle. This is a Web3.0 solution where Product's Global identity can be found in Public Blockchain in the form of NFT as Digital Twin. And the product's large volume of Supply Chain data from different business organozation will be securly stored at Private-Permissioned blockchain.
https://app.diagrams.net/#G1_s_-s1ZuUr85BUdyLhwJ-us3zmwrssB3
0 stars 0 forks source link

FireFly to Launch an NFT Collection #32

Open FahimDev opened 10 months ago

FahimDev commented 10 months ago

Using Hyperledger FireFly to Launch an NFT Collection on Public Chains

Key Points:

FireFly keeps its own SQL Database which keeps all Evens of Blockchain operations.

Prerequsites

Alpha Wallet is an open-source project. Easy to connect with Test Nets and can show Media Data for ERC721 Tokens.

In this card we will cover:

Extract the binary of FireFly and move it to /usr/bin/local:

sudo tar -zxf ~/Downloads/firefly-cli_*.tar.gz -C /usr/local/bin ff && rm ~/Downloads/firefly-cli_*.tar.gz

ff init ethereum polygon 1 \

--multiparty=false \

--ipfs-mode public \

-n remote-rpc \

--remote-node-url "https://polygon-mumbai.g.alchemy.com/v2/PROTECTED" \

--chain-id 80001  \

--connector-config evmconnect.yml \

--node-name "TrustChain-Node" \

--org-name "TrustChain-Org"

Make sure to add your Remote DB Connection string

Hyperledger Fabric by default holds a Crypto Wallet Address. To get the wallet address the command is given below: ff accounts list project_name | grep address

FireFly also runs a IPFS node locally.

Reference: https://hyperledger.github.io/firefly/gettingstarted/firefly_cli.html#extract-the-binary-and-move-it-to-usrbinlocal

FireFly Important API EndPoints:

Sample Request: { "contract": "PASTE_BYTECODE_HERE", "definition": PASTE_ABI_HERE, "input": [] } Sample Response: { ... "output": { "contractLocation": { "address": "0xfd403b063ecf959867973a4cf383c48b9a06e19e" }, }, ... }

Sample Input Structure: { "input": {"abi": PASTE_ABI_HERE}} This API Endpoint is basically for generating the Request Body for (POST) BASE_URL/contracts/interfaces API

MAKE SURE YOU COPY THE RESPONSE THAT YOU WILL SEND AS A REQUEST IN THE NEXT STEP AS REQUEST BODY

Create Custom API for Custom Smart Contracts

POST http://127.0.0.1:5000/api/v1/apis?confirm=true Sample Request Body:

{
  "interface": {
    "id": "3d9d4d16-b548-4f5c-957e-db44e75f6354"
  },
  "location": {
    "address": "0x3431d051d29fbe4884c6ebc1105f7bd606f0ccab"
  },
  "name": "product-twin"
}

Sample Response Body:

{
  "id": "bd4be993-c009-4068-bfbc-02eb12f1611c",
  "namespace": "default",
  "interface": {
    "id": "3d9d4d16-b548-4f5c-957e-db44e75f6354"
  },
  "location": {
    "address": "0x3431d051d29fbe4884c6ebc1105f7bd606f0ccab"
  },
  "name": "product-twin",
  "urls": {
    "openapi": "http://127.0.0.1:5000/api/v1/namespaces/default/apis/product-twin/api/swagger.json",
    "ui": "http://127.0.0.1:5000/api/v1/namespaces/default/apis/product-twin/api"
  }
}

This is how can can call the methods of our Smart Contract form the FireFly API Endpoints.

Mint Token with IPFS MetaData:

FahimDev commented 10 months ago

Learning Link:

FahimDev commented 10 months ago
  --prometheus-enabled            Enables Prometheus metrics exposition and aggregation to a shared Prometheus server
  --prometheus-port int           Port for the shared Prometheus server (default 9090)
  --prompt-names                  Prompt for org and node names instead of using the defaults
  -d, --database string               Database type to use. Options are: [sqlite3 postgres] (default "sqlite3")
FahimDev commented 10 months ago

https://hyperledger.github.io/firefly/tutorials/chains/polygon_testnet.html

FahimDev commented 10 months ago

https://hyperledger.github.io/firefly/tutorials/basic_auth.html

FahimDev commented 10 months ago

https://polygon.technology/blog/polygon-partners-with-kaleido-to-bring-the-power-of-custom-blockchains-to-enterprises

FahimDev commented 10 months ago

First FireFly Contract Deploy Response:

{ "id": "3d3bc2dd-ae7e-4ecc-95b2-42e9af5c788f", "namespace": "default", "tx": "f0dd643f-3246-492a-a910-1e56b02ab240", "type": "blockchain_deploy", "status": "Succeeded", "plugin": "ethereum", "input": { "contract": "0x60806040523480156200001157600080fd5b506040518060400160405280600f81526020016e5472757374436861696e2d4253323360881b8152506040518060400160405280600781526020016654432d4253323360c81b81525081600090816200006b919062000128565b5060016200007a828262000128565b505050620001f4565b634e487b7160e01b600052604160045260246000fd5b600181811c90821680620000ae57607f821691505b602082108103620000cf57634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156200012357600081815260208120601f850160051c81016020861015620000fe5750805b601f850160051c820191505b818110156200011f578281556001016200010a565b5050505b505050565b81516001600160401b0381111562000144576200014462000083565b6200015c8162000155845462000099565b84620000d5565b602080601f8311600181146200019457600084156200017b5750858301515b600019600386901b1c1916600185901b1785556200011f565b600085815260208120601f198616915b82811015620001c557888601518255948401946001909101908401620001a4565b5085821015620001e45787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b6118b180620002046000396000f3fe608060405234801561001057600080fd5b50600436106100ea5760003560e01c806370a082311161008c578063b88d4fde11610066578063b88d4fde146101e1578063c87b56dd146101f4578063cb7c0f0214610207578063e985e9c51461021a57600080fd5b806370a08231146101a557806395d89b41146101c6578063a22cb465146101ce57600080fd5b8063095ea7b3116100c8578063095ea7b31461015757806323b872dd1461016c57806342842e0e1461017f5780636352211e1461019257600080fd5b806301ffc9a7146100ef57806306fdde0314610117578063081812fc1461012c575b600080fd5b6101026100fd366004611393565b610256565b60405190151581526020015b60405180910390f35b61011f61029a565b60405161010e9190611400565b61013f61013a366004611413565b61032c565b6040516001600160a01b03909116815260200161010e565b61016a610165366004611448565b610353565b005b61016a61017a366004611472565b610489565b61016a61018d366004611472565b610500565b61013f6101a0366004611413565b61051b565b6101b86101b33660046114ae565b610580565b60405190815260200161010e565b61011f61061a565b61016a6101dc3660046114c9565b610629565b61016a6101ef366004611591565b610638565b61011f610202366004611413565b6106b6565b6101b861021536600461160d565b6107c6565b610102610228366004611678565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b60006001600160e01b031982167f490649060000000000000000000000000000000000000000000000000000000014806102945750610294826107e4565b92915050565b6060600080546102a9906116ab565b80601f01602080910402602001604051908101604052809291908181526020018280546102d5906116ab565b80156103225780601f106102f757610100808354040283529160200191610322565b820191906000526020600020905b81548152906001019060200180831161030557829003601f168201915b5050505050905090565b60006103378261087f565b506000908152600460205260409020546001600160a01b031690565b600061035e8261051b565b9050806001600160a01b0316836001600160a01b0316036103ec5760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e6560448201527f720000000000000000000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b336001600160a01b038216148061040857506104088133610228565b61047a5760405162461bcd60e51b815260206004820152603d60248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f7420746f60448201527f6b656e206f776e6572206f7220617070726f76656420666f7220616c6c00000060648201526084016103e3565b61048483836108e6565b505050565b6104933382610961565b6104f55760405162461bcd60e51b815260206004820152602d60248201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560448201526c1c881bdc88185c1c1c9bdd9959609a1b60648201526084016103e3565b6104848383836109df565b61048483838360405180602001604052806000815250610638565b6000818152600260205260408120546001600160a01b0316806102945760405162461bcd60e51b815260206004820152601860248201527f4552433732313a20696e76616c696420746f6b656e204944000000000000000060448201526064016103e3565b60006001600160a01b0382166105fe5760405162461bcd60e51b815260206004820152602960248201527f4552433732313a2061646472657373207a65726f206973206e6f74206120766160448201527f6c6964206f776e6572000000000000000000000000000000000000000000000060648201526084016103e3565b506001600160a01b031660009081526003602052604090205490565b6060600180546102a9906116ab565b610634338383610be5565b5050565b6106423383610961565b6106a45760405162461bcd60e51b815260206004820152602d60248201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560448201526c1c881bdc88185c1c1c9bdd9959609a1b60648201526084016103e3565b6106b084848484610cb3565b50505050565b60606106c18261087f565b600082815260066020526040812080546106da906116ab565b80601f0160208091040260200160405190810160405280929190818152602001828054610706906116ab565b80156107535780601f1061072857610100808354040283529160200191610753565b820191906000526020600020905b81548152906001019060200180831161073657829003601f168201915b50505050509050600061077160408051602081019091526000815290565b90508051600003610783575092915050565b8151156107b557808260405160200161079d9291906116e5565b60405160208183030381529060405292505050919050565b6107be84610d31565b949350505050565b60006107d28385610da5565b6107dc8483610dbf565b509192915050565b60006001600160e01b031982167f80ac58cd00000000000000000000000000000000000000000000000000000000148061084757506001600160e01b031982167f5b5e139f00000000000000000000000000000000000000000000000000000000145b8061029457507f01ffc9a7000000000000000000000000000000000000000000000000000000006001600160e01b0319831614610294565b6000818152600260205260409020546001600160a01b03166108e35760405162461bcd60e51b815260206004820152601860248201527f4552433732313a20696e76616c696420746f6b656e204944000000000000000060448201526064016103e3565b50565b6000818152600460205260409020805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b03841690811790915581906109288261051b565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b60008061096d8361051b565b9050806001600160a01b0316846001600160a01b031614806109b457506001600160a01b0380821660009081526005602090815260408083209388168352929052205460ff165b806107be5750836001600160a01b03166109cd8461032c565b6001600160a01b031614949350505050565b826001600160a01b03166109f28261051b565b6001600160a01b031614610a565760405162461bcd60e51b815260206004820152602560248201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060448201526437bbb732b960d91b60648201526084016103e3565b6001600160a01b038216610ad15760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f2061646460448201527f726573730000000000000000000000000000000000000000000000000000000060648201526084016103e3565b826001600160a01b0316610ae48261051b565b6001600160a01b031614610b485760405162461bcd60e51b815260206004820152602560248201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060448201526437bbb732b960d91b60648201526084016103e3565b6000818152600460209081526040808320805473ffffffffffffffffffffffffffffffffffffffff199081169091556001600160a01b0387811680865260038552838620805460001901905590871680865283862080546001019055868652600290945282852080549092168417909155905184937fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b816001600160a01b0316836001600160a01b031603610c465760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c65720000000000000060448201526064016103e3565b6001600160a01b03838116600081815260056020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b610cbe8484846109df565b610cca84848484610e99565b6106b05760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b60648201526084016103e3565b6060610d3c8261087f565b6000610d5360408051602081019091526000815290565b90506000815111610d735760405180602001604052806000815250610d9e565b80610d7d84610fe5565b604051602001610d8e9291906116e5565b6040516020818303038152906040525b9392505050565b610634828260405180602001604052806000815250611085565b6000828152600260205260409020546001600160a01b0316610e495760405162461bcd60e51b815260206004820152602e60248201527f45524337323155524953746f726167653a2055524920736574206f66206e6f6e60448201527f6578697374656e7420746f6b656e00000000000000000000000000000000000060648201526084016103e3565b6000828152600660205260409020610e618282611762565b506040518281527ff8e1a15aba9398e019f0b49df1a4fde98ee17ae345cb5f6b5e2c27f5033e8ce79060200160405180910390a15050565b60006001600160a01b0384163b15610fda57604051630a85bd0160e11b81526001600160a01b0385169063150b7a0290610edd903390899088908890600401611822565b6020604051808303816000875af1925050508015610f18575060408051601f3d908101601f19168201909252610f159181019061185e565b60015b610fc0573d808015610f46576040519150601f19603f3d011682016040523d82523d6000602084013e610f4b565b606091505b508051600003610fb85760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b60648201526084016103e3565b805181602001fd5b6001600160e01b031916630a85bd0160e11b1490506107be565b506001949350505050565b60606000610ff283611103565b600101905060008167ffffffffffffffff81111561101257611012611505565b6040519080825280601f01601f19166020018201604052801561103c576020820181803683370190505b5090508181016020015b600019017f3031323334353637383961626364656600000000000000000000000000000000600a86061a8153600a850494508461104657509392505050565b61108f83836111e5565b61109c6000848484610e99565b6104845760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b60648201526084016103e3565b6000807a184f03e93ff9f4daa797ed6e38ed64bf6a1f010000000000000000831061114c577a184f03e93ff9f4daa797ed6e38ed64bf6a1f010000000000000000830492506040015b6d04ee2d6d415b85acef81000000008310611178576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc10000831061119657662386f26fc10000830492506010015b6305f5e10083106111ae576305f5e100830492506008015b61271083106111c257612710830492506004015b606483106111d4576064830492506002015b600a83106102945760010192915050565b6001600160a01b03821661123b5760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f206164647265737360448201526064016103e3565b6000818152600260205260409020546001600160a01b0316156112a05760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e7465640000000060448201526064016103e3565b6000818152600260205260409020546001600160a01b0316156113055760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e7465640000000060448201526064016103e3565b6001600160a01b0382166000818152600360209081526040808320805460010190558483526002909152808220805473ffffffffffffffffffffffffffffffffffffffff19168417905551839291907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b6001600160e01b0319811681146108e357600080fd5b6000602082840312156113a557600080fd5b8135610d9e8161137d565b60005b838110156113cb5781810151838201526020016113b3565b50506000910152565b600081518084526113ec8160208601602086016113b0565b601f01601f19169290920160200192915050565b602081526000610d9e60208301846113d4565b60006020828403121561142557600080fd5b5035919050565b80356001600160a01b038116811461144357600080fd5b919050565b6000806040838503121561145b57600080fd5b6114648361142c565b946020939093013593505050565b60008060006060848603121561148757600080fd5b6114908461142c565b925061149e6020850161142c565b9150604084013590509250925092565b6000602082840312156114c057600080fd5b610d9e8261142c565b600080604083850312156114dc57600080fd5b6114e58361142c565b9150602083013580151581146114fa57600080fd5b809150509250929050565b634e487b7160e01b600052604160045260246000fd5b600067ffffffffffffffff8084111561153657611536611505565b604051601f8501601f19908116603f0116810190828211818310171561155e5761155e611505565b8160405280935085815286868601111561157757600080fd5b858560208301376000602087830101525050509392505050565b600080600080608085870312156115a757600080fd5b6115b08561142c565b93506115be6020860161142c565b925060408501359150606085013567ffffffffffffffff8111156115e157600080fd5b8501601f810187136115f257600080fd5b6116018782356020840161151b565b91505092959194509250565b60008060006060848603121561162257600080fd5b833592506116326020850161142c565b9150604084013567ffffffffffffffff81111561164e57600080fd5b8401601f8101861361165f57600080fd5b61166e8682356020840161151b565b9150509250925092565b6000806040838503121561168b57600080fd5b6116948361142c565b91506116a26020840161142c565b90509250929050565b600181811c908216806116bf57607f821691505b6020821081036116df57634e487b7160e01b600052602260045260246000fd5b50919050565b600083516116f78184602088016113b0565b83519083019061170b8183602088016113b0565b01949350505050565b601f82111561048457600081815260208120601f850160051c8101602086101561173b5750805b601f850160051c820191505b8181101561175a57828155600101611747565b505050505050565b815167ffffffffffffffff81111561177c5761177c611505565b6117908161178a84546116ab565b84611714565b602080601f8311600181146117c557600084156117ad5750858301515b600019600386901b1c1916600185901b17855561175a565b600085815260208120601f198616915b828110156117f4578886015182559484019460019091019084016117d5565b50858210156118125787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b60006001600160a01b0380871683528086166020840152508360408301526080606083015261185460808301846113d4565b9695505050505050565b60006020828403121561187057600080fd5b8151610d9e8161137d56fea2646970667358221220ab5e66ca02c01e9440c30beeb0608cb2cb0020db56d245041b048ec855f8049864736f6c63430008120033", "definition": [ { "inputs": [], "stateMutability": "nonpayable", "type": "constructor" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "address", "name": "owner", "type": "address" }, { "indexed": true, "internalType": "address", "name": "approved", "type": "address" }, { "indexed": true, "internalType": "uint256", "name": "tokenId", "type": "uint256" } ], "name": "Approval", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "address", "name": "owner", "type": "address" }, { "indexed": true, "internalType": "address", "name": "operator", "type": "address" }, { "indexed": false, "internalType": "bool", "name": "approved", "type": "bool" } ], "name": "ApprovalForAll", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "uint256", "name": "_fromTokenId", "type": "uint256" }, { "indexed": false, "internalType": "uint256", "name": "_toTokenId", "type": "uint256" } ], "name": "BatchMetadataUpdate", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "uint256", "name": "_tokenId", "type": "uint256" } ], "name": "MetadataUpdate", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "address", "name": "from", "type": "address" }, { "indexed": true, "internalType": "address", "name": "to", "type": "address" }, { "indexed": true, "internalType": "uint256", "name": "tokenId", "type": "uint256" } ], "name": "Transfer", "type": "event" }, { "inputs": [ { "internalType": "address", "name": "to", "type": "address" }, { "internalType": "uint256", "name": "tokenId", "type": "uint256" } ], "name": "approve", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "owner", "type": "address" } ], "name": "balanceOf", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "mfgID", "type": "uint256" }, { "internalType": "address", "name": "owner", "type": "address" }, { "internalType": "string", "name": "tokenURI", "type": "string" } ], "name": "createTwin", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "tokenId", "type": "uint256" } ], "name": "getApproved", "outputs": [ { "internalType": "address", "name": "", "type": "address" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "owner", "type": "address" }, { "internalType": "address", "name": "operator", "type": "address" } ], "name": "isApprovedForAll", "outputs": [ { "internalType": "bool", "name": "", "type": "bool" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "name", "outputs": [ { "internalType": "string", "name": "", "type": "string" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "tokenId", "type": "uint256" } ], "name": "ownerOf", "outputs": [ { "internalType": "address", "name": "", "type": "address" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "from", "type": "address" }, { "internalType": "address", "name": "to", "type": "address" }, { "internalType": "uint256", "name": "tokenId", "type": "uint256" } ], "name": "safeTransferFrom", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "from", "type": "address" }, { "internalType": "address", "name": "to", "type": "address" }, { "internalType": "uint256", "name": "tokenId", "type": "uint256" }, { "internalType": "bytes", "name": "data", "type": "bytes" } ], "name": "safeTransferFrom", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "operator", "type": "address" }, { "internalType": "bool", "name": "approved", "type": "bool" } ], "name": "setApprovalForAll", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "bytes4", "name": "interfaceId", "type": "bytes4" } ], "name": "supportsInterface", "outputs": [ { "internalType": "bool", "name": "", "type": "bool" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "symbol", "outputs": [ { "internalType": "string", "name": "", "type": "string" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "tokenId", "type": "uint256" } ], "name": "tokenURI", "outputs": [ { "internalType": "string", "name": "", "type": "string" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "from", "type": "address" }, { "internalType": "address", "name": "to", "type": "address" }, { "internalType": "uint256", "name": "tokenId", "type": "uint256" } ], "name": "transferFrom", "outputs": [], "stateMutability": "nonpayable", "type": "function" } ], "input": [], "key": "0xe8aeae56d995c8f87001d076e9e900434576ba40", "options": null }, "output": { "contractLocation": { "address": "0x3431d051d29fbe4884c6ebc1105f7bd606f0ccab" }, "headers": { "requestId": "default:3d3bc2dd-ae7e-4ecc-95b2-42e9af5c788f", "type": "TransactionSuccess" }, "protocolId": "000040278446/000004", "transactionHash": "0xa4b1208e364796f1df4a9aae7f454df548380f230cbb3c8320f35c59f2786e57" }, "created": "2023-09-19T11:43:24.505143441Z", "updated": "2023-09-19T11:43:24.505143441Z" }

FahimDev commented 10 months ago

API ENDPOINT: BASE_URL/contracts/interfaces/generate

RESPONSE:

{ "namespace": "default", "name": "", "description": "", "version": "", "methods": [ { "name": "isApprovedForAll", "pathname": "", "description": "", "params": [ { "name": "owner", "schema": { "type": "string", "details": { "type": "address", "internalType": "address" }, "description": "A hex encoded set of bytes, with an optional '0x' prefix" } }, { "name": "operator", "schema": { "type": "string", "details": { "type": "address", "internalType": "address" }, "description": "A hex encoded set of bytes, with an optional '0x' prefix" } } ], "returns": [ { "name": "", "schema": { "oneOf": [ { "type": "string" }, { "type": "boolean" } ], "details": { "type": "bool", "internalType": "bool" }, "description": "A boolean. You can use a boolean or a string true/false as input" } } ], "details": { "stateMutability": "view" } }, { "name": "ownerOf", "pathname": "", "description": "", "params": [ { "name": "tokenId", "schema": { "oneOf": [ { "type": "string" }, { "type": "integer" } ], "details": { "type": "uint256", "internalType": "uint256" }, "description": "An integer. You are recommended to use a JSON string. A JSON number can be used for values up to the safe maximum." } } ], "returns": [ { "name": "", "schema": { "type": "string", "details": { "type": "address", "internalType": "address" }, "description": "A hex encoded set of bytes, with an optional '0x' prefix" } } ], "details": { "stateMutability": "view" } }, { "name": "setApprovalForAll", "pathname": "", "description": "", "params": [ { "name": "operator", "schema": { "type": "string", "details": { "type": "address", "internalType": "address" }, "description": "A hex encoded set of bytes, with an optional '0x' prefix" } }, { "name": "approved", "schema": { "oneOf": [ { "type": "string" }, { "type": "boolean" } ], "details": { "type": "bool", "internalType": "bool" }, "description": "A boolean. You can use a boolean or a string true/false as input" } } ], "returns": [], "details": { "stateMutability": "nonpayable" } }, { "name": "supportsInterface", "pathname": "", "description": "", "params": [ { "name": "interfaceId", "schema": { "type": "string", "details": { "type": "bytes4", "internalType": "bytes4" }, "description": "A hex encoded set of bytes, with an optional '0x' prefix" } } ], "returns": [ { "name": "", "schema": { "oneOf": [ { "type": "string" }, { "type": "boolean" } ], "details": { "type": "bool", "internalType": "bool" }, "description": "A boolean. You can use a boolean or a string true/false as input" } } ], "details": { "stateMutability": "view" } }, { "name": "transferFrom", "pathname": "", "description": "", "params": [ { "name": "from", "schema": { "type": "string", "details": { "type": "address", "internalType": "address" }, "description": "A hex encoded set of bytes, with an optional '0x' prefix" } }, { "name": "to", "schema": { "type": "string", "details": { "type": "address", "internalType": "address" }, "description": "A hex encoded set of bytes, with an optional '0x' prefix" } }, { "name": "tokenId", "schema": { "oneOf": [ { "type": "string" }, { "type": "integer" } ], "details": { "type": "uint256", "internalType": "uint256" }, "description": "An integer. You are recommended to use a JSON string. A JSON number can be used for values up to the safe maximum." } } ], "returns": [], "details": { "stateMutability": "nonpayable" } }, { "name": "approve", "pathname": "", "description": "", "params": [ { "name": "to", "schema": { "type": "string", "details": { "type": "address", "internalType": "address" }, "description": "A hex encoded set of bytes, with an optional '0x' prefix" } }, { "name": "tokenId", "schema": { "oneOf": [ { "type": "string" }, { "type": "integer" } ], "details": { "type": "uint256", "internalType": "uint256" }, "description": "An integer. You are recommended to use a JSON string. A JSON number can be used for values up to the safe maximum." } } ], "returns": [], "details": { "stateMutability": "nonpayable" } }, { "name": "createTwin", "pathname": "", "description": "", "params": [ { "name": "mfgID", "schema": { "oneOf": [ { "type": "string" }, { "type": "integer" } ], "details": { "type": "uint256", "internalType": "uint256" }, "description": "An integer. You are recommended to use a JSON string. A JSON number can be used for values up to the safe maximum." } }, { "name": "owner", "schema": { "type": "string", "details": { "type": "address", "internalType": "address" }, "description": "A hex encoded set of bytes, with an optional '0x' prefix" } }, { "name": "tokenURI", "schema": { "type": "string", "details": { "type": "string", "internalType": "string" } } } ], "returns": [ { "name": "", "schema": { "oneOf": [ { "type": "string" }, { "type": "integer" } ], "details": { "type": "uint256", "internalType": "uint256" }, "description": "An integer. You are recommended to use a JSON string. A JSON number can be used for values up to the safe maximum." } } ], "details": { "stateMutability": "nonpayable" } }, { "name": "name", "pathname": "", "description": "", "params": [], "returns": [ { "name": "", "schema": { "type": "string", "details": { "type": "string", "internalType": "string" } } } ], "details": { "stateMutability": "view" } }, { "name": "safeTransferFrom", "pathname": "", "description": "", "params": [ { "name": "from", "schema": { "type": "string", "details": { "type": "address", "internalType": "address" }, "description": "A hex encoded set of bytes, with an optional '0x' prefix" } }, { "name": "to", "schema": { "type": "string", "details": { "type": "address", "internalType": "address" }, "description": "A hex encoded set of bytes, with an optional '0x' prefix" } }, { "name": "tokenId", "schema": { "oneOf": [ { "type": "string" }, { "type": "integer" } ], "details": { "type": "uint256", "internalType": "uint256" }, "description": "An integer. You are recommended to use a JSON string. A JSON number can be used for values up to the safe maximum." } }, { "name": "data", "schema": { "type": "string", "details": { "type": "bytes", "internalType": "bytes" }, "description": "A hex encoded set of bytes, with an optional '0x' prefix" } } ], "returns": [], "details": { "stateMutability": "nonpayable" } }, { "name": "symbol", "pathname": "", "description": "", "params": [], "returns": [ { "name": "", "schema": { "type": "string", "details": { "type": "string", "internalType": "string" } } } ], "details": { "stateMutability": "view" } }, { "name": "tokenURI", "pathname": "", "description": "", "params": [ { "name": "tokenId", "schema": { "oneOf": [ { "type": "string" }, { "type": "integer" } ], "details": { "type": "uint256", "internalType": "uint256" }, "description": "An integer. You are recommended to use a JSON string. A JSON number can be used for values up to the safe maximum." } } ], "returns": [ { "name": "", "schema": { "type": "string", "details": { "type": "string", "internalType": "string" } } } ], "details": { "stateMutability": "view" } }, { "name": "balanceOf", "pathname": "", "description": "", "params": [ { "name": "owner", "schema": { "type": "string", "details": { "type": "address", "internalType": "address" }, "description": "A hex encoded set of bytes, with an optional '0x' prefix" } } ], "returns": [ { "name": "", "schema": { "oneOf": [ { "type": "string" }, { "type": "integer" } ], "details": { "type": "uint256", "internalType": "uint256" }, "description": "An integer. You are recommended to use a JSON string. A JSON number can be used for values up to the safe maximum." } } ], "details": { "stateMutability": "view" } }, { "name": "getApproved", "pathname": "", "description": "", "params": [ { "name": "tokenId", "schema": { "oneOf": [ { "type": "string" }, { "type": "integer" } ], "details": { "type": "uint256", "internalType": "uint256" }, "description": "An integer. You are recommended to use a JSON string. A JSON number can be used for values up to the safe maximum." } } ], "returns": [ { "name": "", "schema": { "type": "string", "details": { "type": "address", "internalType": "address" }, "description": "A hex encoded set of bytes, with an optional '0x' prefix" } } ], "details": { "stateMutability": "view" } } ], "events": [ { "signature": "", "name": "Approval", "description": "", "params": [ { "name": "owner", "schema": { "type": "string", "details": { "type": "address", "internalType": "address", "indexed": true }, "description": "A hex encoded set of bytes, with an optional '0x' prefix" } }, { "name": "approved", "schema": { "type": "string", "details": { "type": "address", "internalType": "address", "indexed": true }, "description": "A hex encoded set of bytes, with an optional '0x' prefix" } }, { "name": "tokenId", "schema": { "oneOf": [ { "type": "string" }, { "type": "integer" } ], "details": { "type": "uint256", "internalType": "uint256", "indexed": true }, "description": "An integer. You are recommended to use a JSON string. A JSON number can be used for values up to the safe maximum." } } ] }, { "signature": "", "name": "ApprovalForAll", "description": "", "params": [ { "name": "owner", "schema": { "type": "string", "details": { "type": "address", "internalType": "address", "indexed": true }, "description": "A hex encoded set of bytes, with an optional '0x' prefix" } }, { "name": "operator", "schema": { "type": "string", "details": { "type": "address", "internalType": "address", "indexed": true }, "description": "A hex encoded set of bytes, with an optional '0x' prefix" } }, { "name": "approved", "schema": { "oneOf": [ { "type": "string" }, { "type": "boolean" } ], "details": { "type": "bool", "internalType": "bool" }, "description": "A boolean. You can use a boolean or a string true/false as input" } } ] }, { "signature": "", "name": "BatchMetadataUpdate", "description": "", "params": [ { "name": "_fromTokenId", "schema": { "oneOf": [ { "type": "string" }, { "type": "integer" } ], "details": { "type": "uint256", "internalType": "uint256" }, "description": "An integer. You are recommended to use a JSON string. A JSON number can be used for values up to the safe maximum." } }, { "name": "_toTokenId", "schema": { "oneOf": [ { "type": "string" }, { "type": "integer" } ], "details": { "type": "uint256", "internalType": "uint256" }, "description": "An integer. You are recommended to use a JSON string. A JSON number can be used for values up to the safe maximum." } } ] }, { "signature": "", "name": "MetadataUpdate", "description": "", "params": [ { "name": "_tokenId", "schema": { "oneOf": [ { "type": "string" }, { "type": "integer" } ], "details": { "type": "uint256", "internalType": "uint256" }, "description": "An integer. You are recommended to use a JSON string. A JSON number can be used for values up to the safe maximum." } } ] }, { "signature": "", "name": "Transfer", "description": "", "params": [ { "name": "from", "schema": { "type": "string", "details": { "type": "address", "internalType": "address", "indexed": true }, "description": "A hex encoded set of bytes, with an optional '0x' prefix" } }, { "name": "to", "schema": { "type": "string", "details": { "type": "address", "internalType": "address", "indexed": true }, "description": "A hex encoded set of bytes, with an optional '0x' prefix" } }, { "name": "tokenId", "schema": { "oneOf": [ { "type": "string" }, { "type": "integer" } ], "details": { "type": "uint256", "internalType": "uint256", "indexed": true }, "description": "An integer. You are recommended to use a JSON string. A JSON number can be used for values up to the safe maximum." } } ] } ] }

FahimDev commented 10 months ago

API ENDPOINT: http://127.0.0.1:5000/api/v1/contracts/interfaces?confirm=true

Response Body:

{ "id": "3d9d4d16-b548-4f5c-957e-db44e75f6354", "namespace": "default", "name": "ProductTwin-FF", "description": "", "version": "1.0.0", "methods": [ { "id": "66f0b012-32c0-425b-b432-28766ff8aa2a", "interface": "3d9d4d16-b548-4f5c-957e-db44e75f6354", "name": "isApprovedForAll", "namespace": "default", "pathname": "isApprovedForAll", "description": "", "params": [ { "name": "owner", "schema": { "type": "string", "details": { "type": "address", "internalType": "address" }, "description": "A hex encoded set of bytes, with an optional '0x' prefix" } }, { "name": "operator", "schema": { "type": "string", "details": { "type": "address", "internalType": "address" }, "description": "A hex encoded set of bytes, with an optional '0x' prefix" } } ], "returns": [ { "name": "", "schema": { "oneOf": [ { "type": "string" }, { "type": "boolean" } ], "details": { "type": "bool", "internalType": "bool" }, "description": "A boolean. You can use a boolean or a string true/false as input" } } ], "details": { "stateMutability": "view" } }, { "id": "e10aee31-46f0-4945-9b6e-a9d4d337da9d", "interface": "3d9d4d16-b548-4f5c-957e-db44e75f6354", "name": "ownerOf", "namespace": "default", "pathname": "ownerOf", "description": "", "params": [ { "name": "tokenId", "schema": { "oneOf": [ { "type": "string" }, { "type": "integer" } ], "details": { "type": "uint256", "internalType": "uint256" }, "description": "An integer. You are recommended to use a JSON string. A JSON number can be used for values up to the safe maximum." } } ], "returns": [ { "name": "", "schema": { "type": "string", "details": { "type": "address", "internalType": "address" }, "description": "A hex encoded set of bytes, with an optional '0x' prefix" } } ], "details": { "stateMutability": "view" } }, { "id": "4b6120f0-481f-4078-ba5e-176098eee42e", "interface": "3d9d4d16-b548-4f5c-957e-db44e75f6354", "name": "setApprovalForAll", "namespace": "default", "pathname": "setApprovalForAll", "description": "", "params": [ { "name": "operator", "schema": { "type": "string", "details": { "type": "address", "internalType": "address" }, "description": "A hex encoded set of bytes, with an optional '0x' prefix" } }, { "name": "approved", "schema": { "oneOf": [ { "type": "string" }, { "type": "boolean" } ], "details": { "type": "bool", "internalType": "bool" }, "description": "A boolean. You can use a boolean or a string true/false as input" } } ], "returns": [], "details": { "stateMutability": "nonpayable" } }, { "id": "ecaa2933-90c1-4b8e-b564-003d368a110d", "interface": "3d9d4d16-b548-4f5c-957e-db44e75f6354", "name": "supportsInterface", "namespace": "default", "pathname": "supportsInterface", "description": "", "params": [ { "name": "interfaceId", "schema": { "type": "string", "details": { "type": "bytes4", "internalType": "bytes4" }, "description": "A hex encoded set of bytes, with an optional '0x' prefix" } } ], "returns": [ { "name": "", "schema": { "oneOf": [ { "type": "string" }, { "type": "boolean" } ], "details": { "type": "bool", "internalType": "bool" }, "description": "A boolean. You can use a boolean or a string true/false as input" } } ], "details": { "stateMutability": "view" } }, { "id": "db0fccf3-5d1e-472e-84f2-42e8b5acd013", "interface": "3d9d4d16-b548-4f5c-957e-db44e75f6354", "name": "transferFrom", "namespace": "default", "pathname": "transferFrom", "description": "", "params": [ { "name": "from", "schema": { "type": "string", "details": { "type": "address", "internalType": "address" }, "description": "A hex encoded set of bytes, with an optional '0x' prefix" } }, { "name": "to", "schema": { "type": "string", "details": { "type": "address", "internalType": "address" }, "description": "A hex encoded set of bytes, with an optional '0x' prefix" } }, { "name": "tokenId", "schema": { "oneOf": [ { "type": "string" }, { "type": "integer" } ], "details": { "type": "uint256", "internalType": "uint256" }, "description": "An integer. You are recommended to use a JSON string. A JSON number can be used for values up to the safe maximum." } } ], "returns": [], "details": { "stateMutability": "nonpayable" } }, { "id": "dfa27aab-3f08-4083-83e8-b5877ad294c6", "interface": "3d9d4d16-b548-4f5c-957e-db44e75f6354", "name": "approve", "namespace": "default", "pathname": "approve", "description": "", "params": [ { "name": "to", "schema": { "type": "string", "details": { "type": "address", "internalType": "address" }, "description": "A hex encoded set of bytes, with an optional '0x' prefix" } }, { "name": "tokenId", "schema": { "oneOf": [ { "type": "string" }, { "type": "integer" } ], "details": { "type": "uint256", "internalType": "uint256" }, "description": "An integer. You are recommended to use a JSON string. A JSON number can be used for values up to the safe maximum." } } ], "returns": [], "details": { "stateMutability": "nonpayable" } }, { "id": "12364267-e16d-45f9-997b-7cf9f92ec3e9", "interface": "3d9d4d16-b548-4f5c-957e-db44e75f6354", "name": "createTwin", "namespace": "default", "pathname": "createTwin", "description": "", "params": [ { "name": "mfgID", "schema": { "oneOf": [ { "type": "string" }, { "type": "integer" } ], "details": { "type": "uint256", "internalType": "uint256" }, "description": "An integer. You are recommended to use a JSON string. A JSON number can be used for values up to the safe maximum." } }, { "name": "owner", "schema": { "type": "string", "details": { "type": "address", "internalType": "address" }, "description": "A hex encoded set of bytes, with an optional '0x' prefix" } }, { "name": "tokenURI", "schema": { "type": "string", "details": { "type": "string", "internalType": "string" } } } ], "returns": [ { "name": "", "schema": { "oneOf": [ { "type": "string" }, { "type": "integer" } ], "details": { "type": "uint256", "internalType": "uint256" }, "description": "An integer. You are recommended to use a JSON string. A JSON number can be used for values up to the safe maximum." } } ], "details": { "stateMutability": "nonpayable" } }, { "id": "1cbcb571-fc47-4033-9d69-f76d547cbbe0", "interface": "3d9d4d16-b548-4f5c-957e-db44e75f6354", "name": "name", "namespace": "default", "pathname": "name", "description": "", "params": [], "returns": [ { "name": "", "schema": { "type": "string", "details": { "type": "string", "internalType": "string" } } } ], "details": { "stateMutability": "view" } }, { "id": "1372d0c9-53ea-411b-aa98-f5bcd0c3cb96", "interface": "3d9d4d16-b548-4f5c-957e-db44e75f6354", "name": "safeTransferFrom", "namespace": "default", "pathname": "safeTransferFrom", "description": "", "params": [ { "name": "from", "schema": { "type": "string", "details": { "type": "address", "internalType": "address" }, "description": "A hex encoded set of bytes, with an optional '0x' prefix" } }, { "name": "to", "schema": { "type": "string", "details": { "type": "address", "internalType": "address" }, "description": "A hex encoded set of bytes, with an optional '0x' prefix" } }, { "name": "tokenId", "schema": { "oneOf": [ { "type": "string" }, { "type": "integer" } ], "details": { "type": "uint256", "internalType": "uint256" }, "description": "An integer. You are recommended to use a JSON string. A JSON number can be used for values up to the safe maximum." } }, { "name": "data", "schema": { "type": "string", "details": { "type": "bytes", "internalType": "bytes" }, "description": "A hex encoded set of bytes, with an optional '0x' prefix" } } ], "returns": [], "details": { "stateMutability": "nonpayable" } }, { "id": "7068fcfa-cc84-44d8-910c-629e71634e40", "interface": "3d9d4d16-b548-4f5c-957e-db44e75f6354", "name": "symbol", "namespace": "default", "pathname": "symbol", "description": "", "params": [], "returns": [ { "name": "", "schema": { "type": "string", "details": { "type": "string", "internalType": "string" } } } ], "details": { "stateMutability": "view" } }, { "id": "12130821-d2b9-46bc-9b4e-68d52cab5558", "interface": "3d9d4d16-b548-4f5c-957e-db44e75f6354", "name": "tokenURI", "namespace": "default", "pathname": "tokenURI", "description": "", "params": [ { "name": "tokenId", "schema": { "oneOf": [ { "type": "string" }, { "type": "integer" } ], "details": { "type": "uint256", "internalType": "uint256" }, "description": "An integer. You are recommended to use a JSON string. A JSON number can be used for values up to the safe maximum." } } ], "returns": [ { "name": "", "schema": { "type": "string", "details": { "type": "string", "internalType": "string" } } } ], "details": { "stateMutability": "view" } }, { "id": "fa327760-a92d-4164-8345-b04ed425cf60", "interface": "3d9d4d16-b548-4f5c-957e-db44e75f6354", "name": "balanceOf", "namespace": "default", "pathname": "balanceOf", "description": "", "params": [ { "name": "owner", "schema": { "type": "string", "details": { "type": "address", "internalType": "address" }, "description": "A hex encoded set of bytes, with an optional '0x' prefix" } } ], "returns": [ { "name": "", "schema": { "oneOf": [ { "type": "string" }, { "type": "integer" } ], "details": { "type": "uint256", "internalType": "uint256" }, "description": "An integer. You are recommended to use a JSON string. A JSON number can be used for values up to the safe maximum." } } ], "details": { "stateMutability": "view" } }, { "id": "f63eb860-df78-4fbd-829e-7ee85991e803", "interface": "3d9d4d16-b548-4f5c-957e-db44e75f6354", "name": "getApproved", "namespace": "default", "pathname": "getApproved", "description": "", "params": [ { "name": "tokenId", "schema": { "oneOf": [ { "type": "string" }, { "type": "integer" } ], "details": { "type": "uint256", "internalType": "uint256" }, "description": "An integer. You are recommended to use a JSON string. A JSON number can be used for values up to the safe maximum." } } ], "returns": [ { "name": "", "schema": { "type": "string", "details": { "type": "address", "internalType": "address" }, "description": "A hex encoded set of bytes, with an optional '0x' prefix" } } ], "details": { "stateMutability": "view" } } ], "events": [ { "id": "a20faaa2-03f1-4835-ac77-5446aad29720", "interface": "3d9d4d16-b548-4f5c-957e-db44e75f6354", "namespace": "default", "pathname": "Approval", "signature": "", "name": "Approval", "description": "", "params": [ { "name": "owner", "schema": { "type": "string", "details": { "type": "address", "internalType": "address", "indexed": true }, "description": "A hex encoded set of bytes, with an optional '0x' prefix" } }, { "name": "approved", "schema": { "type": "string", "details": { "type": "address", "internalType": "address", "indexed": true }, "description": "A hex encoded set of bytes, with an optional '0x' prefix" } }, { "name": "tokenId", "schema": { "oneOf": [ { "type": "string" }, { "type": "integer" } ], "details": { "type": "uint256", "internalType": "uint256", "indexed": true }, "description": "An integer. You are recommended to use a JSON string. A JSON number can be used for values up to the safe maximum." } } ] }, { "id": "4884fce2-9769-4d73-9a48-d57a7db89e7f", "interface": "3d9d4d16-b548-4f5c-957e-db44e75f6354", "namespace": "default", "pathname": "ApprovalForAll", "signature": "", "name": "ApprovalForAll", "description": "", "params": [ { "name": "owner", "schema": { "type": "string", "details": { "type": "address", "internalType": "address", "indexed": true }, "description": "A hex encoded set of bytes, with an optional '0x' prefix" } }, { "name": "operator", "schema": { "type": "string", "details": { "type": "address", "internalType": "address", "indexed": true }, "description": "A hex encoded set of bytes, with an optional '0x' prefix" } }, { "name": "approved", "schema": { "oneOf": [ { "type": "string" }, { "type": "boolean" } ], "details": { "type": "bool", "internalType": "bool" }, "description": "A boolean. You can use a boolean or a string true/false as input" } } ] }, { "id": "94acfbbe-b904-4337-bd8e-1acab2ffdf46", "interface": "3d9d4d16-b548-4f5c-957e-db44e75f6354", "namespace": "default", "pathname": "BatchMetadataUpdate", "signature": "", "name": "BatchMetadataUpdate", "description": "", "params": [ { "name": "_fromTokenId", "schema": { "oneOf": [ { "type": "string" }, { "type": "integer" } ], "details": { "type": "uint256", "internalType": "uint256" }, "description": "An integer. You are recommended to use a JSON string. A JSON number can be used for values up to the safe maximum." } }, { "name": "_toTokenId", "schema": { "oneOf": [ { "type": "string" }, { "type": "integer" } ], "details": { "type": "uint256", "internalType": "uint256" }, "description": "An integer. You are recommended to use a JSON string. A JSON number can be used for values up to the safe maximum." } } ] }, { "id": "a37b4f08-eee8-48a4-a5d8-5307f5a74356", "interface": "3d9d4d16-b548-4f5c-957e-db44e75f6354", "namespace": "default", "pathname": "MetadataUpdate", "signature": "", "name": "MetadataUpdate", "description": "", "params": [ { "name": "_tokenId", "schema": { "oneOf": [ { "type": "string" }, { "type": "integer" } ], "details": { "type": "uint256", "internalType": "uint256" }, "description": "An integer. You are recommended to use a JSON string. A JSON number can be used for values up to the safe maximum." } } ] }, { "id": "1c53cc31-49e5-4e29-b5ae-ed1aacbd6b81", "interface": "3d9d4d16-b548-4f5c-957e-db44e75f6354", "namespace": "default", "pathname": "Transfer", "signature": "", "name": "Transfer", "description": "", "params": [ { "name": "from", "schema": { "type": "string", "details": { "type": "address", "internalType": "address", "indexed": true }, "description": "A hex encoded set of bytes, with an optional '0x' prefix" } }, { "name": "to", "schema": { "type": "string", "details": { "type": "address", "internalType": "address", "indexed": true }, "description": "A hex encoded set of bytes, with an optional '0x' prefix" } }, { "name": "tokenId", "schema": { "oneOf": [ { "type": "string" }, { "type": "integer" } ], "details": { "type": "uint256", "internalType": "uint256", "indexed": true }, "description": "An integer. You are recommended to use a JSON string. A JSON number can be used for values up to the safe maximum." } } ] } ] }

FahimDev commented 10 months ago

Image

FahimDev commented 10 months ago

RESPONSE FROM : http://127.0.0.1:5000/api/v1/tokens/pools { "id": "5f5edab7-cb2a-4d47-9b38-31d89ee16afa", "type": "nonfungible", "namespace": "default", "name": "TrustChain-BS23", "key": "0xe8aeae56d995c8f87001d076e9e900434576ba40", "symbol": "TC-BS23", "connector": "erc20_erc721", "config": { "address": "0x3431d051d29fbe4884c6ebc1105f7bd606f0ccab", "blockNumber": "40278446" }, "tx": { "type": "token_pool", "id": "8226d53e-7234-4f16-a24e-fbd24da69aa8" }, "interface": { "id": "3d9d4d16-b548-4f5c-957e-db44e75f6354" } }

FahimDev commented 10 months ago

ENDPOINT: http://127.0.0.1:5000/api/v1/data

{
  "id": "bcb3a398-02b3-494e-bd84-c620a1f8c0d8",
  "validator": "json",
  "namespace": "default",
  "hash": "91319bf913cd1a7556fef56021c5628789a3b80c06e23480b4cedb2a23a10083",
  "created": "2023-09-20T07:04:13.241275377Z",
  "value": null,
  "blob": {
    "hash": "91319bf913cd1a7556fef56021c5628789a3b80c06e23480b4cedb2a23a10083",
    "size": 111790,
    "name": ""
  }
}