We developed an Unlock protocol plugin for Discourse. It let you lock topics behind a “crypto” paywall.
People have to buy your NFT with their crypto wallet (Mestamask, Wallet connect) to access topics. You can configure it with any ERC20 on Ethereum, xDai, Polygon…Since last week, you can also unlock with credit card payment.
Interesting, I wonder if there is a financial vehicle that could be engineered in the Ethereum (or other crypto engines) for repeat transactions. Would be kind of cool to offer a subscription service where you opt to pay X every month.
Can we setup unlock for comment? Only comment first or comment second not topic title and content main?
And, can we add charge by dollar via Visa or paypal not Crypto?
The core mechanism is to use the “approval” mechanism that the ERC20 contracts provide.
The core idea is to approve a 3rd party contract, called the “purchaser” whose single job is to purchase memberships on behalf of users when they are either expired (or soon to be expired). So basically a membership can only be “renewed” when it is either nearly expired, or fully expired.
One of the challenges that we’re trying to solve is to find who will trigger the transaction on that purchaser contract. Rigth now, the approach is to make the purchase “pay back” the person triggering the transaction so that this covers the gas fees. I think we can leverage the “flashbots” who have been doing arbitrage to do that!
It is definitely one of the things we’re trying to work on!
Amazing, I find some of the financial vehicles smart contracts have on offer to be fascinating. I think this could be extremely powerful as a way of funding the right community.
In particular we already have Discourse Subscriptions so perhaps a PR to allow for a “Unlock” mode vs “Stripe” may be an interesting path to take.
Ich habe 2 Sperrverträge im Unlock-Dashboard erstellt
A. Sperre für Benutzer, die Tokens haben (1000 < Menge < 5000)
B. Sperre für Benutzer, die mehr als 5000 Tokens haben
Für A möchte ich sie zu Gruppe A auf Discourse hinzufügen
Für B möchte ich sie zu Gruppe B auf Discourse hinzufügen
Derzeit unterstützt das Unlock-Plugin nur einen Sperrvertrag auf Discourse. Gibt es einen Trick, um das Ziel zu erreichen?
Ich versuche, das Unlock Protocol Plugin herunterzuladen. Ich erhalte die folgenden Seiten/Fehler. Bitte lassen Sie mich wissen, wie ich dies beheben kann:
Da es sich um ein inoffizielles Plugin handelt, habe ich deinen Beitrag zum Thema „Unlock Plugin“ verschoben, da ich denke, dass dies ein besserer Ort ist, um Unterstützung von Leuten zu erhalten, die mehr darüber wissen.
Hallo @zogstrip, ich wollte mich noch einmal wegen des oben genannten Themas erkundigen. Wie kann ich den Fehler HasCustomFields:NotPreloadedError beheben?
Ich fürchte, die Unterstützung für dieses Plugin ist aufgrund der Feiertage etwas dünn, aber (nur zur Information) ich habe es gerade auf meiner Testseite installiert und werde ebenfalls mit einem ‘Ups - Fehler 500’ ausgesperrt, mit demselben Fehlerprotokoll:
Message
HasCustomFields::NotPreloadedError (Versuch, auf das nicht vorab geladene benutzerdefinierte Feld 'unlock-lock' der Klasse 'Category' zuzugreifen. Dies ist verboten, um N+1-Abfragen zu verhindern.)
app/models/concerns/has_custom_fields.rb:175:in `[]'
(eval):37:in `_fast_attributes'
(eval):6:in `_fast_attributes'
app/controllers/application_controller.rb:637:in `preload_current_user_data'
app/controllers/application_controller.rb:437:in `preload_json'
app/controllers/application_controller.rb:413:in `block in with_resolved_locale'
app/controllers/application_controller.rb:413:in `with_resolved_locale'
lib/middleware/omniauth_bypass_middleware.rb:71:in `call'
lib/middleware/content_security_policy/middleware.rb:12:in `call'
lib/middleware/anonymous_cache.rb:368:in `call'
config/initializers/100-quiet_logger.rb:23:in `call'
config/initializers/100-silence_logger.rb:31:in `call'
lib/middleware/enforce_hostname.rb:23:in `call'
lib/middleware/request_tracker.rb:209:in `call'
Backtrace
app/models/concerns/has_custom_fields.rb:175:in `[]'
plugins/discourse-unlock/plugin.rb:63:in `block (2 levels) in activate!'
active_model_serializers (0.8.4) lib/active_model/serializer.rb:375:in `include?'
(eval):37:in `_fast_attributes'
active_model_serializers (0.8.4) lib/active_model/serializer.rb:456:in `attributes'
active_model_serializers (0.8.4) lib/active_model/serializer.rb:480:in `_serializable_hash'
active_model_serializers (0.8.4) lib/active_model/serializer.rb:359:in `serializable_hash'
active_model_serializers (0.8.4) lib/active_model/serializer.rb:347:in `as_json'
plugins/chat/app/serializers/chat_channel_serializer.rb:51:in `chatable'
(eval):6:in `_fast_attributes'
Ich glaube, es gibt einen Konflikt mit dem Chat-Plugin. Wenn ich Chat über die Rails-Konsole deaktiviere, kann ich normal auf meine Seite zugreifen (einschließlich der Seite /admin/plugins/discourse-unlock).