cryppadotta / dotta-license Goto Github PK
View Code? Open in Web Editor NEWERC721-based Software Licensing Framework
ERC721-based Software Licensing Framework
See here: ethereum/EIPs#841
I would like to accept other ERC-20 tokens for payment instead of ETH. How would I be able to do that with dotta-license?
I think Dotlicense could be used in a web context for SaaS apps. If you used a Metamask/signing-based login then you could use that proof of ownership to verify an active subscription.
For example, see meta-auth for a Metamask-based login with Node middleware. (Note: I haven't tried meta-auth
and I can't vouch for it's security, but I think it's an interesting idea.)
This could work with Dotlicense like this:
As of writing, I haven't built any of the supporting Web UI libraries nor the Node middleware, but once we have Dotlicense working, it should be straightforward to do this.
If I want to give a bulk discount for say 10 licenses how would I do that. Additionally, how can I restrict a license to a particular "node". Is there a way to pass a machine uuid during the validate process and verify license validity? Are machine uuids stored in the contract?
Two features I'd like to add in a v2:
setInventory
- set the inventory of a product to a specific level, subject to supply constraintssetExpiration
- manually set the expiration of any subscription token - currently even admins can only renew in cycle-chunks.I've tried getting it running with Node 14 and 16 and not had any luck. I was able to compile the contracts at least, thanks to help from this web3/web3.js#3079 but I was unable to get any further than that. The CLI gives me a lot of node-gyp
errors and doesn't seem to install properly.
EIP 1337 is standard for recurring payments / subscriptions and it is probably a good idea for the next version of dotta-license.
See:
Ive poked at most of the function calls (that dont require gas) and they seem valid, but this one errors on me:
bash-3.2$ node cryptokitties-cli.js tokensOfOwnerByIndex 0xa6c366D97cb64708211f24310dFAd5363BC96a04 0
cryptokitties-cli.js tokensOfOwnerByIndex <owner> <index>
Returns the nth Kitty assigned to an address, with n specified by the _index argument.
Positionals:
owner, _owner [required]
index, _index [required]
Options:
--web3 web3 provider url [default: "https://mainnet.infura.io/remix"]
--from from address
--gasPrice gas price in wei to use for this transaction [default: "1000000010"]
--gasLimit maximum gas provided for this transaction [default: "4700000"]
--value The value transferred for the transaction in wei
--contract-address address to contract [required] [default: "0x06012c8cf97BEaD5deAe237070F9587f8E7A266d"]
--network-id The network ID [default: "1"]
--ledger use a ledger [boolean]
--hd-path hd-path (used for hardware wallets) [default: "44'/60'/0'/0"]
--help Show help [boolean]
--version Show version number [boolean]
--provider [default: (provider)]
Error: Couldn't decode uint256 from ABI: 0x
at SolidityTypeUInt.formatOutputUInt [as _outputFormatter] (/Users/jacobrosenthal/Downloads/dotta-license/dot-abi-cli/node_modules/web3-eth-abi/src/formatters.js:174:15)
at SolidityTypeUInt.SolidityType.decode (/Users/jacobrosenthal/Downloads/dotta-license/dot-abi-cli/node_modules/web3-eth-abi/src/type.js:252:17)
at /Users/jacobrosenthal/Downloads/dotta-license/dot-abi-cli/node_modules/web3-eth-abi/src/index.js:327:49
at Array.forEach (<anonymous>)
at ABICoder.decodeParameters (/Users/jacobrosenthal/Downloads/dotta-license/dot-abi-cli/node_modules/web3-eth-abi/src/index.js:326:13)
at Contract._decodeMethodReturn (/Users/jacobrosenthal/Downloads/dotta-license/dot-abi-cli/node_modules/web3-eth-contract/src/index.js:459:22)
at Method.outputFormatter (/Users/jacobrosenthal/Downloads/dotta-license/dot-abi-cli/node_modules/web3-eth-contract/src/index.js:811:46)
at Method.formatOutput (/Users/jacobrosenthal/Downloads/dotta-license/dot-abi-cli/node_modules/web3-core-method/src/index.js:162:54)
at sendTxCallback (/Users/jacobrosenthal/Downloads/dotta-license/dot-abi-cli/node_modules/web3-core-method/src/index.js:453:33)
at /Users/jacobrosenthal/Downloads/dotta-license/dot-abi-cli/node_modules/web3-core-requestmanager/src/index.js:144:9
at Web3ProviderEngine._inspectResponseForNewBlock (/Users/jacobrosenthal/Downloads/dotta-license/dot-abi-cli/examples/cryptokitties-cli/node_modules/truffle-hdwallet-provider/node_modules/web3-provider-engine/index.js:231:12)
at /Users/jacobrosenthal/Downloads/dotta-license/dot-abi-cli/examples/cryptokitties-cli/node_modules/truffle-hdwallet-provider/node_modules/web3-provider-engine/index.js:131:14
at /Users/jacobrosenthal/Downloads/dotta-license/dot-abi-cli/examples/cryptokitties-cli/node_modules/async/dist/async.js:473:16
at replenish (/Users/jacobrosenthal/Downloads/dotta-license/dot-abi-cli/examples/cryptokitties-cli/node_modules/async/dist/async.js:993:25)
at iterateeCallback (/Users/jacobrosenthal/Downloads/dotta-license/dot-abi-cli/examples/cryptokitties-cli/node_modules/async/dist/async.js:983:17)
at /Users/jacobrosenthal/Downloads/dotta-license/dot-abi-cli/examples/cryptokitties-cli/node_modules/async/dist/async.js:958:16
at async.eachSeries.resultObj.id (/Users/jacobrosenthal/Downloads/dotta-license/dot-abi-cli/examples/cryptokitties-cli/node_modules/truffle-hdwallet-provider/node_modules/web3-provider-engine/index.js:111:9)
at /Users/jacobrosenthal/Downloads/dotta-license/dot-abi-cli/examples/cryptokitties-cli/node_modules/async/dist/async.js:3096:16
at replenish (/Users/jacobrosenthal/Downloads/dotta-license/dot-abi-cli/examples/cryptokitties-cli/node_modules/async/dist/async.js:998:17)
at iterateeCallback (/Users/jacobrosenthal/Downloads/dotta-license/dot-abi-cli/examples/cryptokitties-cli/node_modules/async/dist/async.js:983:17)
at /Users/jacobrosenthal/Downloads/dotta-license/dot-abi-cli/examples/cryptokitties-cli/node_modules/async/dist/async.js:958:16
at async.eachSeries.resultObj.id (/Users/jacobrosenthal/Downloads/dotta-license/dot-abi-cli/examples/cryptokitties-cli/node_modules/truffle-hdwallet-provider/node_modules/web3-provider-engine/index.js:111:9)
at /Users/jacobrosenthal/Downloads/dotta-license/dot-abi-cli/examples/cryptokitties-cli/node_modules/async/dist/async.js:3096:16
at replenish (/Users/jacobrosenthal/Downloads/dotta-license/dot-abi-cli/examples/cryptokitties-cli/node_modules/async/dist/async.js:998:17)
at iterateeCallback (/Users/jacobrosenthal/Downloads/dotta-license/dot-abi-cli/examples/cryptokitties-cli/node_modules/async/dist/async.js:983:17)
at /Users/jacobrosenthal/Downloads/dotta-license/dot-abi-cli/examples/cryptokitties-cli/node_modules/async/dist/async.js:958:16
at async.eachSeries.resultObj.id (/Users/jacobrosenthal/Downloads/dotta-license/dot-abi-cli/examples/cryptokitties-cli/node_modules/truffle-hdwallet-provider/node_modules/web3-provider-engine/index.js:111:9)
at /Users/jacobrosenthal/Downloads/dotta-license/dot-abi-cli/examples/cryptokitties-cli/node_modules/async/dist/async.js:3096:16
at replenish (/Users/jacobrosenthal/Downloads/dotta-license/dot-abi-cli/examples/cryptokitties-cli/node_modules/async/dist/async.js:998:17)
at /Users/jacobrosenthal/Downloads/dotta-license/dot-abi-cli/examples/cryptokitties-cli/node_modules/async/dist/async.js:1002:9
at eachLimit$1 (/Users/jacobrosenthal/Downloads/dotta-license/dot-abi-cli/examples/cryptokitties-cli/node_modules/async/dist/async.js:3182:24)
at Object.<anonymous> (/Users/jacobrosenthal/Downloads/dotta-license/dot-abi-cli/examples/cryptokitties-cli/node_modules/async/dist/async.js:1032:16)
at end (/Users/jacobrosenthal/Downloads/dotta-license/dot-abi-cli/examples/cryptokitties-cli/node_modules/truffle-hdwallet-provider/node_modules/web3-provider-engine/index.js:106:11)
at /Users/jacobrosenthal/Downloads/dotta-license/dot-abi-cli/examples/cryptokitties-cli/node_modules/truffle-hdwallet-provider/node_modules/web3-provider-engine/subproviders/web3.js:16:5
bash-3.2$
Maybe it's there and I just don't see it but would be cool to be able to issue trial periods to users
Hello,
Any plan to developing the license upgrade?
-Jack
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.