Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion blockchain_integration/pi_network/smart_contract.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
import web3


class SmartContract:
def __init__(self, contract_address, abi):
self.web3 = web3.Web3(web3.providers.HttpProvider("https://mainnet.infura.io/v3/YOUR_PROJECT_ID"))
self.web3 = web3.Web3(
web3.providers.HttpProvider("https://mainnet.infura.io/v3/YOUR_PROJECT_ID")
)
self.contract = self.web3.eth.contract(address=contract_address, abi=abi)

def execute_transaction(self, from_address, to_address, value):
Expand Down