-
-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
18 additions
and
0 deletions.
There are no files selected for viewing
18 changes: 18 additions & 0 deletions
18
blockchain_integration/pi_network/PiShield/pi-network/index.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
const Web3 = require('web3'); | ||
|
||
class PiNetwork { | ||
async connect() { | ||
this.web3 = new Web3(new Web3.providers.HttpProvider('https://pi-node.com')); | ||
console.log('Connected to Pi Network'); | ||
} | ||
|
||
async getContractAddress(contractName) { | ||
// Return the contract address from the Pi Network | ||
} | ||
|
||
async executeContract(contractAddress, data) { | ||
// Execute the contract on the Pi Network | ||
} | ||
} | ||
|
||
module.exports = PiNetwork; |