mintIntegration.gif

Proxy Bot’s delegation model is maintained entirely by our end users performing standard NFT transfer mechanisms. We’re just an ERC721 at the end of the day.

While it’s possible to detect if a wallet is a delegate for a vault by inspecting the on-chain metadata for every Proxy Token in their wallet, we provide some convenience accessor methods.

On-Chain Integration

You can easily query a wallet’s address to determine if it’s a vault delegate directly from your contract. All our delegate data is on-chain.

Integrate our IProxyBotChecker.sol interface, and use this convenience method:

IProxyBotChecker proxyBot = IProxyBotChecker('0x50CdB28907a0522f5dD41f4A0c4b69afe7E4723b');

address vaultAddress = getVaultAddressForDelegate(msg.sender);
if(vaultAddress == address(0x0){ // Returns zero address if not an active delegate.
  // No delegate exists for this hot wallet
} else {
  // We have the vault! Let's mint something cool to it.
  mint(vaultAddress, 1);
}

You might notice that we’re interrogating a proxy, not the core ProxyBot contract. You can also call the same method directly on the ProxyBot contract, but decoupling the core logic from the checker allows us more flexibility down the road.

Off-Chain Integration

You can access this off-chain was well. Using ethers.js, for example, include our ABI and then call the getVaultAddressForDelegate like so:

// Setup the ProxyBotChecker contract:
const proxyBotCheckerAddress = '0x50CdB28907a0522f5dD41f4A0c4b69afe7E4723b';
const proxyBot = new ethers.Contract(proxyBotCheckerAddress, abi, signer);

proxyBot.methods.getVaultAddressForDelegate(hotWalletAddress)
	.call( (error, vaultAddress) => {

		if(vaultAddress == '0x0000000000000000000000000000000000000000'){
		  // No delegate exists for this hot wallet.
			// We return zero address if no delegation is active.
		} else {
			// We have a vault at `vaultAddress`.
			// Proceed to load its NFTs for selection, or whatever else you require.
		}
})

Coming Soon: HTTP API

As developers, we know sometimes you’re not able (or don’t want to) load in all the systems needed for querying the blockchain. That’s why we’re developing a simple HTTP API, callable from anywhere, that wraps up the on-chain inspection for you with much less code.

Delegation by Turf ProxyBot - Graphic (optional)

If you choose to integrate ProxyBOT we urge you to consider placing a “delegation by…” graphic somewhere on your site. We offer our delegation tool for free so any opportunity for spreading the word is beneficial to both us and anyone else who might choose to delegate!