MultiversX Tracker is Live!

Chainlink VRF Abstraction ?

Etherum Reddit

More / Etherum Reddit 122 Views

Hi!

I'm learning solidity, and had a huge struggle for random numbers (with Chainlink VRF).

Maybe it's just me but I don't understand why the oracles need to be set by us necessarily.

Why didn't chainlink provide their own?

The only reason coming to my mind is that there are a lot of networks so it wouldn't be scalable for them.

But why doesn't the community create shareable VRF Oracles?

So for learning purposes I made my own implementation of an abstraction which doesn't require for the end-user to setup an oracle himself.

It works like this:

- I created a subscription on chainlink

- I deployed a contract implementing Chainlink VRF contracts

- I added to it a system to fund the subscription for a given contract to consume

Result for the end-user is:

- Import my candy functions to retrieve the instance of my deployed "shared oracle"

- Deploy his own contract with the instance of my candy attached (via constructor)

- Fund the shared oracle when necessary via a candy function

Steps skipped:

- Read chainlink documentation

- Create a subscription

- Fund the subscription manually or writing a script

- Manage linkToken Address, vrfCoordinator address, keyHash, subscriptionID…

You just imported a library that allows you to populate secured random numbers.

Check the code: https://github.com/TwistedMinda/random-contract-candy

I suppose that I've missed something, but I don't know what...

Can anybody enlighten me?

Thank you

EDIT: I think I realize now that it's not like with JS and candy libraries everywhere. In blockchain, if your SDK or library is not audited, no one is going to use it anyway

Security first!

submitted by /u/TwistedMinda
[link] [comments]
Get BONUS $200 for FREE!

You can get bonuses upto $100 FREE BONUS when you:
πŸ’° Install these recommended apps:
πŸ’² SocialGood - 100% Crypto Back on Everyday Shopping
πŸ’² xPortal - The DeFi For The Next Billion
πŸ’² CryptoTab Browser - Lightweight, fast, and ready to mine!
πŸ’° Register on these recommended exchanges:
🟑 Binance🟑 Bitfinex🟑 Bitmart🟑 Bittrex🟑 Bitget
🟑 CoinEx🟑 Crypto.com🟑 Gate.io🟑 Huobi🟑 Kucoin.



Comments