Discourse 잠금 해제

안녕하세요,

우리는 Discourse용 Unlock 프로토콜 플러그인을 개발했습니다. 이 플러그인을 사용하면 토픽을 ‘암호화폐’ 페이월 뒤로 잠글 수 있습니다.

사용자는 자신의 암호화폐 지갑(Metamask, Wallet connect)으로 NFT를 구매해야 토픽에 접근할 수 있습니다. Ethereum, xDai, Polygon 등 모든 ERC20으로 설정할 수 있습니다. 지난 주부터 신용카드 결제로도 잠금을 해제할 수 있게 되었습니다.

ezgif-3-eda9d8c4547d

unlock 프로토콜 커뮤니티 포럼에서 테스트해 볼 수 있습니다: https://unlock.community, 예를 들어 이 토픽은 잠겨 있습니다: https://unlock.community/t/introducing-the-dao/68 (xDai 네트워크).

https://swordybot.com/를 사용하여 동일한 잠금 기능을 통해 사용자에게 Discord 비공개 채널 접근 권한을 부여할 수도 있습니다.

플러그인 저장소: GitHub - discourse/discourse-unlock · GitHub
문서: https://unlock.community/t/unlock-discourse-plugin/64

궁금한 점이 있으시면 주저하지 마시고 문의해 주세요.

32개의 좋아요

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.

9개의 좋아요

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?

1개의 좋아요

Hello @sam,

It is possible with unlock protcol : Recurring Memberships

But for the moment it’s not implanted in the plugin. Will add it in the next version.

7개의 좋아요

Not sure to understand that part.

Yes, it’s also possible to pay with credit card : Credit Card Support

2개의 좋아요

Mean Unlock comment but topic unstill display

2개의 좋아요

Hi Sam! I am Julien, the founder of Unlock Protocol!

Indeed, it is possible like @kam44 said.

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!

3개의 좋아요

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 Plugin so perhaps a PR to allow for a “Unlock” mode vs “Stripe” may be an interesting path to take.

8개의 좋아요

@kam44
any news about “unlock comments” ?

3개의 좋아요

Any Update
This plugin seems interesting

Great Job Man !

1개의 좋아요

I created 2 lock contracts on unlock dashboard
A. lock for the users who have tokens (1000 < amount < 5000)
B. lock for the users who have more than 5000 tokens

For A, I’d like to add them to group A on discourse
For B, I’d like to add them to group B on discourse

Currently Unlock plugin supports only one lock contract on discourse. Is there any trick to achieve the goal?

2개의 좋아요

Did you ever figure out a solution to use more than one contract?

I’m trying to download the Unlock Protocol plugin. I’m getting the following pages/errors. Please let me know how I can resolve this:


1개의 좋아요

Hello and welcome @thesidsridhar :slightly_smiling_face:

As it’s a non-official plugin, I’ve moved your post over to the Unlock plugin topic as I think that would be a better place to get support from people who know more about it. :+1:

1개의 좋아요

In fact, the plugin is now managed by the Discourse team, as you can see there: https://github.com/discourse/discourse-unlock

cc @zogstrip

5개의 좋아요

Oh, my apologies. :pray: I missed that swop over. Thanks for pointing it out. :+1:

4개의 좋아요

Oh no, no worries, we didn’t mention it anywhere.

2개의 좋아요

Hi @zogstrip I wanted to check in again about the above. How do I resolve the HasCustomFields:NotPreloadedError?

3개의 좋아요

I’m afraid support for this plugin is a little thin on the ground due to the holiday season, but (FWIW) I’ve just installed it on my test site and am also getting locked out with an ‘Oops - Error 500’ with the same error logged:

Message

HasCustomFields::NotPreloadedError (Attempted to access the non preloaded custom field 'unlock-lock' on the 'Category' class. This is disallowed to prevent N+1 queries.)
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/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'

I think there’s a conflict with the Chat plugin somehow. If I disable Chat through the rails console I can access my site as normal (including the /admin/plugins/discourse-unlock page).

6개의 좋아요

Awesome! How would I disable chat via the rails console?

2개의 좋아요