Skip to content

Commit

Permalink
Create contractRoutes.js
Browse files Browse the repository at this point in the history
  • Loading branch information
KOSASIH authored Oct 31, 2024
1 parent 6a446b4 commit ded79aa
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions blockchain_integration/pi_network/api/routes/contractRoutes.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
// api/routes/contractRoutes.js

const express = require('express');
const contractController = require('../controllers/contractController');

const router = express.Router();

// Get contract details
router.get('/:contractAddress', contractController.getContractDetails);

// Interact with contract (e.g., call a function)
router.post('/:contractAddress/interact', contractController.interactWithContract);

module.exports = router;

0 comments on commit ded79aa

Please sign in to comment.