Skip to content
Closed
Show file tree
Hide file tree
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
Original file line number Diff line number Diff line change
Expand Up @@ -23,23 +23,18 @@ def __init__(self, web3: Web3):
self.contract = self.web3.eth.contract(address=contract_address, abi=abi)

def setAllPermissions(self, ipAccount, signer, permission):

return self.contract.functions.setAllPermissions(ipAccount, signer, permission).transact()

def build_setAllPermissions_transaction(self, ipAccount, signer, permission, tx_params):
return self.contract.functions.setAllPermissions(ipAccount, signer, permission).build_transaction(tx_params)


def setTransientBatchPermissions(self, permissions):

return self.contract.functions.setTransientBatchPermissions(permissions).transact()

def build_setTransientBatchPermissions_transaction(self, permissions, tx_params):
return self.contract.functions.setTransientBatchPermissions(permissions).build_transaction(tx_params)


def setTransientPermission(self, ipAccount, signer, to, func, permission):

return self.contract.functions.setTransientPermission(ipAccount, signer, to, func, permission).transact()

def build_setTransientPermission_transaction(self, ipAccount, signer, to, func, permission, tx_params):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,17 +23,12 @@ def __init__(self, web3: Web3):
self.contract = self.web3.eth.contract(address=contract_address, abi=abi)

def maxBonds(self, token):

return self.contract.functions.maxBonds(token).call()


def maxLiveness(self, ):

def maxLiveness(self):
return self.contract.functions.maxLiveness().call()


def minLiveness(self, ):

def minLiveness(self):
return self.contract.functions.minLiveness().call()


Original file line number Diff line number Diff line change
Expand Up @@ -23,39 +23,30 @@ def __init__(self, web3: Web3):
self.contract = self.web3.eth.contract(address=contract_address, abi=abi)

def mintAndRegisterIpAndMakeDerivative(self, spgNftContract, derivData, ipMetadata, recipient, allowDuplicates):

return self.contract.functions.mintAndRegisterIpAndMakeDerivative(spgNftContract, derivData, ipMetadata, recipient, allowDuplicates).transact()

def build_mintAndRegisterIpAndMakeDerivative_transaction(self, spgNftContract, derivData, ipMetadata, recipient, allowDuplicates, tx_params):
return self.contract.functions.mintAndRegisterIpAndMakeDerivative(spgNftContract, derivData, ipMetadata, recipient, allowDuplicates).build_transaction(tx_params)


def mintAndRegisterIpAndMakeDerivativeWithLicenseTokens(self, spgNftContract, licenseTokenIds, royaltyContext, maxRts, ipMetadata, recipient, allowDuplicates):

return self.contract.functions.mintAndRegisterIpAndMakeDerivativeWithLicenseTokens(spgNftContract, licenseTokenIds, royaltyContext, maxRts, ipMetadata, recipient, allowDuplicates).transact()

def build_mintAndRegisterIpAndMakeDerivativeWithLicenseTokens_transaction(self, spgNftContract, licenseTokenIds, royaltyContext, maxRts, ipMetadata, recipient, allowDuplicates, tx_params):
return self.contract.functions.mintAndRegisterIpAndMakeDerivativeWithLicenseTokens(spgNftContract, licenseTokenIds, royaltyContext, maxRts, ipMetadata, recipient, allowDuplicates).build_transaction(tx_params)


def multicall(self, data):

return self.contract.functions.multicall(data).transact()

def build_multicall_transaction(self, data, tx_params):
return self.contract.functions.multicall(data).build_transaction(tx_params)


def registerIpAndMakeDerivative(self, nftContract, tokenId, derivData, ipMetadata, sigMetadataAndRegister):

return self.contract.functions.registerIpAndMakeDerivative(nftContract, tokenId, derivData, ipMetadata, sigMetadataAndRegister).transact()

def build_registerIpAndMakeDerivative_transaction(self, nftContract, tokenId, derivData, ipMetadata, sigMetadataAndRegister, tx_params):
return self.contract.functions.registerIpAndMakeDerivative(nftContract, tokenId, derivData, ipMetadata, sigMetadataAndRegister).build_transaction(tx_params)


def registerIpAndMakeDerivativeWithLicenseTokens(self, nftContract, tokenId, licenseTokenIds, royaltyContext, maxRts, ipMetadata, sigMetadataAndRegister):

return self.contract.functions.registerIpAndMakeDerivativeWithLicenseTokens(nftContract, tokenId, licenseTokenIds, royaltyContext, maxRts, ipMetadata, sigMetadataAndRegister).transact()

def build_registerIpAndMakeDerivativeWithLicenseTokens_transaction(self, nftContract, tokenId, licenseTokenIds, royaltyContext, maxRts, ipMetadata, sigMetadataAndRegister, tx_params):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,31 +23,24 @@ def __init__(self, web3: Web3):
self.contract = self.web3.eth.contract(address=contract_address, abi=abi)

def cancelDispute(self, disputeId, data):

return self.contract.functions.cancelDispute(disputeId, data).transact()

def build_cancelDispute_transaction(self, disputeId, data, tx_params):
return self.contract.functions.cancelDispute(disputeId, data).build_transaction(tx_params)


def raiseDispute(self, targetIpId, disputeEvidenceHash, targetTag, data):

return self.contract.functions.raiseDispute(targetIpId, disputeEvidenceHash, targetTag, data).transact()

def build_raiseDispute_transaction(self, targetIpId, disputeEvidenceHash, targetTag, data, tx_params):
return self.contract.functions.raiseDispute(targetIpId, disputeEvidenceHash, targetTag, data).build_transaction(tx_params)


def resolveDispute(self, disputeId, data):

return self.contract.functions.resolveDispute(disputeId, data).transact()

def build_resolveDispute_transaction(self, disputeId, data, tx_params):
return self.contract.functions.resolveDispute(disputeId, data).build_transaction(tx_params)


def isWhitelistedDisputeTag(self, tag):

return self.contract.functions.isWhitelistedDisputeTag(tag).call()


Original file line number Diff line number Diff line change
Expand Up @@ -23,31 +23,24 @@ def __init__(self, web3: Web3):
self.contract = self.web3.eth.contract(address=contract_address, abi=abi)

def mintAndRegisterIpAndAttachLicenseAndAddToGroup(self, spgNftContract, groupId, recipient, licensesData, ipMetadata, sigAddToGroup, allowDuplicates):

return self.contract.functions.mintAndRegisterIpAndAttachLicenseAndAddToGroup(spgNftContract, groupId, recipient, licensesData, ipMetadata, sigAddToGroup, allowDuplicates).transact()

def build_mintAndRegisterIpAndAttachLicenseAndAddToGroup_transaction(self, spgNftContract, groupId, recipient, licensesData, ipMetadata, sigAddToGroup, allowDuplicates, tx_params):
return self.contract.functions.mintAndRegisterIpAndAttachLicenseAndAddToGroup(spgNftContract, groupId, recipient, licensesData, ipMetadata, sigAddToGroup, allowDuplicates).build_transaction(tx_params)


def registerGroupAndAttachLicense(self, groupPool, licenseData):

return self.contract.functions.registerGroupAndAttachLicense(groupPool, licenseData).transact()

def build_registerGroupAndAttachLicense_transaction(self, groupPool, licenseData, tx_params):
return self.contract.functions.registerGroupAndAttachLicense(groupPool, licenseData).build_transaction(tx_params)


def registerGroupAndAttachLicenseAndAddIps(self, groupPool, ipIds, licenseData):

return self.contract.functions.registerGroupAndAttachLicenseAndAddIps(groupPool, ipIds, licenseData).transact()

def build_registerGroupAndAttachLicenseAndAddIps_transaction(self, groupPool, ipIds, licenseData, tx_params):
return self.contract.functions.registerGroupAndAttachLicenseAndAddIps(groupPool, ipIds, licenseData).build_transaction(tx_params)


def registerIpAndAttachLicenseAndAddToGroup(self, nftContract, tokenId, groupId, licensesData, ipMetadata, sigMetadataAndAttachAndConfig, sigAddToGroup):

return self.contract.functions.registerIpAndAttachLicenseAndAddToGroup(nftContract, tokenId, groupId, licensesData, ipMetadata, sigMetadataAndAttachAndConfig, sigAddToGroup).transact()

def build_registerIpAndAttachLicenseAndAddToGroup_transaction(self, nftContract, tokenId, groupId, licensesData, ipMetadata, sigMetadataAndAttachAndConfig, sigAddToGroup, tx_params):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,49 +12,36 @@ def __init__(self, web3: Web3, contract_address=None):
self.contract = self.web3.eth.contract(address=contract_address, abi=abi)

def execute(self, to, value, data, operation):

return self.contract.functions.execute(to, value, data, operation).transact()

def build_execute_transaction(self, to, value, data, operation, tx_params):
return self.contract.functions.execute(to, value, data, operation).build_transaction(tx_params)


# def execute(self, to, value, data):
def execute2(self, to, value, data):
return self.contract.functions.execute(to, value, data).transact()

# return self.contract.functions.execute(to, value, data).transact()

# def build_execute_transaction(self, to, value, data, tx_params):
# return self.contract.functions.execute(to, value, data).build_transaction(tx_params)

def build_execute2_transaction(self, to, value, data, tx_params):
return self.contract.functions.execute(to, value, data).build_transaction(tx_params)

def executeBatch(self, calls, operation):

return self.contract.functions.executeBatch(calls, operation).transact()

def build_executeBatch_transaction(self, calls, operation, tx_params):
return self.contract.functions.executeBatch(calls, operation).build_transaction(tx_params)


def executeWithSig(self, to, value, data, signer, deadline, signature):

return self.contract.functions.executeWithSig(to, value, data, signer, deadline, signature).transact()

def build_executeWithSig_transaction(self, to, value, data, signer, deadline, signature, tx_params):
return self.contract.functions.executeWithSig(to, value, data, signer, deadline, signature).build_transaction(tx_params)


def owner(self, ):

def owner(self):
return self.contract.functions.owner().call()


def state(self, ):

def state(self):
return self.contract.functions.state().call()


def token(self, ):

def token(self):
return self.contract.functions.token().call()


Original file line number Diff line number Diff line change
Expand Up @@ -23,20 +23,15 @@ def __init__(self, web3: Web3):
self.contract = self.web3.eth.contract(address=contract_address, abi=abi)

def register(self, chainid, tokenContract, tokenId):

return self.contract.functions.register(chainid, tokenContract, tokenId).transact()

def build_register_transaction(self, chainid, tokenContract, tokenId, tx_params):
return self.contract.functions.register(chainid, tokenContract, tokenId).build_transaction(tx_params)


def ipId(self, chainId, tokenContract, tokenId):

return self.contract.functions.ipId(chainId, tokenContract, tokenId).call()


def isRegistered(self, id):

return self.contract.functions.isRegistered(id).call()


Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,12 @@ def __init__(self, web3: Web3, contract_address=None):
self.contract = self.web3.eth.contract(address=contract_address, abi=abi)

def balanceOf(self, account):

return self.contract.functions.balanceOf(account).call()


def claimableRevenue(self, claimer, token):

return self.contract.functions.claimableRevenue(claimer, token).call()


def ipId(self, ):

def ipId(self):
return self.contract.functions.ipId().call()


Original file line number Diff line number Diff line change
Expand Up @@ -23,31 +23,24 @@ def __init__(self, web3: Web3):
self.contract = self.web3.eth.contract(address=contract_address, abi=abi)

def mintAndRegisterIpAndAttachPILTerms(self, spgNftContract, recipient, ipMetadata, licenseTermsData, allowDuplicates):

return self.contract.functions.mintAndRegisterIpAndAttachPILTerms(spgNftContract, recipient, ipMetadata, licenseTermsData, allowDuplicates).transact()

def build_mintAndRegisterIpAndAttachPILTerms_transaction(self, spgNftContract, recipient, ipMetadata, licenseTermsData, allowDuplicates, tx_params):
return self.contract.functions.mintAndRegisterIpAndAttachPILTerms(spgNftContract, recipient, ipMetadata, licenseTermsData, allowDuplicates).build_transaction(tx_params)


def multicall(self, data):

return self.contract.functions.multicall(data).transact()

def build_multicall_transaction(self, data, tx_params):
return self.contract.functions.multicall(data).build_transaction(tx_params)


def registerIpAndAttachPILTerms(self, nftContract, tokenId, ipMetadata, licenseTermsData, sigMetadataAndAttachAndConfig):

return self.contract.functions.registerIpAndAttachPILTerms(nftContract, tokenId, ipMetadata, licenseTermsData, sigMetadataAndAttachAndConfig).transact()

def build_registerIpAndAttachPILTerms_transaction(self, nftContract, tokenId, ipMetadata, licenseTermsData, sigMetadataAndAttachAndConfig, tx_params):
return self.contract.functions.registerIpAndAttachPILTerms(nftContract, tokenId, ipMetadata, licenseTermsData, sigMetadataAndAttachAndConfig).build_transaction(tx_params)


def registerPILTermsAndAttach(self, ipId, licenseTermsData, sigAttachAndConfig):

return self.contract.functions.registerPILTermsAndAttach(ipId, licenseTermsData, sigAttachAndConfig).transact()

def build_registerPILTermsAndAttach_transaction(self, ipId, licenseTermsData, sigAttachAndConfig, tx_params):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,17 +23,12 @@ def __init__(self, web3: Web3):
self.contract = self.web3.eth.contract(address=contract_address, abi=abi)

def exists(self, licenseTemplate, licenseTermsId):

return self.contract.functions.exists(licenseTemplate, licenseTermsId).call()


def getRoyaltyPercent(self, ipId, licenseTemplate, licenseTermsId):

return self.contract.functions.getRoyaltyPercent(ipId, licenseTemplate, licenseTermsId).call()


def hasIpAttachedLicenseTerms(self, ipId, licenseTemplate, licenseTermsId):

return self.contract.functions.hasIpAttachedLicenseTerms(ipId, licenseTemplate, licenseTermsId).call()


Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ def __init__(self, web3: Web3):
self.contract = self.web3.eth.contract(address=contract_address, abi=abi)

def ownerOf(self, tokenId):

return self.contract.functions.ownerOf(tokenId).call()


Original file line number Diff line number Diff line change
Expand Up @@ -23,47 +23,36 @@ def __init__(self, web3: Web3):
self.contract = self.web3.eth.contract(address=contract_address, abi=abi)

def attachLicenseTerms(self, ipId, licenseTemplate, licenseTermsId):

return self.contract.functions.attachLicenseTerms(ipId, licenseTemplate, licenseTermsId).transact()

def build_attachLicenseTerms_transaction(self, ipId, licenseTemplate, licenseTermsId, tx_params):
return self.contract.functions.attachLicenseTerms(ipId, licenseTemplate, licenseTermsId).build_transaction(tx_params)


def mintLicenseTokens(self, licensorIpId, licenseTemplate, licenseTermsId, amount, receiver, royaltyContext, maxMintingFee, maxRevenueShare):

return self.contract.functions.mintLicenseTokens(licensorIpId, licenseTemplate, licenseTermsId, amount, receiver, royaltyContext, maxMintingFee, maxRevenueShare).transact()

def build_mintLicenseTokens_transaction(self, licensorIpId, licenseTemplate, licenseTermsId, amount, receiver, royaltyContext, maxMintingFee, maxRevenueShare, tx_params):
return self.contract.functions.mintLicenseTokens(licensorIpId, licenseTemplate, licenseTermsId, amount, receiver, royaltyContext, maxMintingFee, maxRevenueShare).build_transaction(tx_params)


def registerDerivative(self, childIpId, parentIpIds, licenseTermsIds, licenseTemplate, royaltyContext, maxMintingFee, maxRts, maxRevenueShare):

return self.contract.functions.registerDerivative(childIpId, parentIpIds, licenseTermsIds, licenseTemplate, royaltyContext, maxMintingFee, maxRts, maxRevenueShare).transact()

def build_registerDerivative_transaction(self, childIpId, parentIpIds, licenseTermsIds, licenseTemplate, royaltyContext, maxMintingFee, maxRts, maxRevenueShare, tx_params):
return self.contract.functions.registerDerivative(childIpId, parentIpIds, licenseTermsIds, licenseTemplate, royaltyContext, maxMintingFee, maxRts, maxRevenueShare).build_transaction(tx_params)


def registerDerivativeWithLicenseTokens(self, childIpId, licenseTokenIds, royaltyContext, maxRts):

return self.contract.functions.registerDerivativeWithLicenseTokens(childIpId, licenseTokenIds, royaltyContext, maxRts).transact()

def build_registerDerivativeWithLicenseTokens_transaction(self, childIpId, licenseTokenIds, royaltyContext, maxRts, tx_params):
return self.contract.functions.registerDerivativeWithLicenseTokens(childIpId, licenseTokenIds, royaltyContext, maxRts).build_transaction(tx_params)


def setLicensingConfig(self, ipId, licenseTemplate, licenseTermsId, licensingConfig):

return self.contract.functions.setLicensingConfig(ipId, licenseTemplate, licenseTermsId, licensingConfig).transact()

def build_setLicensingConfig_transaction(self, ipId, licenseTemplate, licenseTermsId, licensingConfig, tx_params):
return self.contract.functions.setLicensingConfig(ipId, licenseTemplate, licenseTermsId, licensingConfig).build_transaction(tx_params)


def predictMintingLicenseFee(self, licensorIpId, licenseTemplate, licenseTermsId, amount, receiver, royaltyContext):

return self.contract.functions.predictMintingLicenseFee(licensorIpId, licenseTemplate, licenseTermsId, amount, receiver, royaltyContext).call()


Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,12 @@ def __init__(self, web3: Web3):
self.contract = self.web3.eth.contract(address=contract_address, abi=abi)

def transfer(self, to, value):

return self.contract.functions.transfer(to, value).transact()

def build_transfer_transaction(self, to, value, tx_params):
return self.contract.functions.transfer(to, value).build_transaction(tx_params)


def balanceOf(self, account):

return self.contract.functions.balanceOf(account).call()


Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ def __init__(self, web3: Web3):
self.contract = self.web3.eth.contract(address=contract_address, abi=abi)

def isRegistered(self, moduleAddress):

return self.contract.functions.isRegistered(moduleAddress).call()


Loading