davisshaver / wp-rainbow

WordPress Plugin to Enable Sign-In With Ethereum using RainbowKit
https://wp-rainbow.davisshaver.com/
8 stars 5 forks source link

Add block to interact with contracts #50

Open davisshaver opened 1 year ago

davisshaver commented 1 year ago

Suggested by bingobook on WordPress.org forum.

Do you have or are you planning to set up an ABI connection to interact with contracts from a simple WordPress button? Currently, no one has yet implemented this type of plugin that would drastically improve the setup of Dapps with WordPress.

the idea would be to use any contract, indicating the contract and the ABIs, and then calling a button by shortcode or HTML code.

Example: Contract: 0x0000 Function: BalanceOf ABI: [“name”:”balanceOf”,”outputs”:[{“internalType”:”uint256″,”name”:””,”type”:”uint256″}] Call: BalanceOf > Button [Check wallet] or Call: safemint > Button [Mint your NFT]

An integration of rainbowkit in the header would be necessary so that we can interact everywhere on the site.

To start, maybe we can assume the contract is on the same network as RainbowKit Login settings. we could start with manually entering contract, function, and ABI. Having this work with functions that require input will require some thought. Maybe it needs to evolve into a simple form interface in the future?

Once this is shipped, reminder to let bingobook know.

davisshaver commented 1 year ago

Possible inspiration here mentioned by bingobook on WordPress.org forum: https://static.wixstatic.com/media/e8a1b0_0f3f5a0fcf984a20ae9de12f3627a58a~mv2.gif