Check out our new Visual Studio Code extension
With our powerful machine learning model, you can now generate
production-ready smart
contract code from a natural
language prompt
//Prompt: write a smart contract to mint rockstar NFTs to reward loyal fans
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
contract NFT is ERC721URIStorage {
using Counters for Counters.Counter;
Counters.Counter private _tokenIds;
constructor() ERC721("Rockstar NFT", "RNFT") {}
function rewardLoyalFans(address fan_address, string memory tokenURI)
public
returns (uint256)
{
uint256 newItemId = _tokenIds.current();
_mint(fan_address, newItemId);
_setTokenURI(newItemId, tokenURI);
_tokenIds.increment();
return newItemId;
}
}
// Prompt: Implement a multi-sig wallet
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.17;
contract MultiSig {
address[] public owners;
mapping(address => bool) public isOwner;
uint public numOwners;
constructor(address[] _owners) {
owners = _owners;
numOwners = len(_owners);
}
}
//Prompt: Generate ERC20 tokens for Rockstar Developers
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
contract RockstarToken is ERC20 {
constructor(uint256 initialSupply) ERC20("Rockstar", "RCK") {
_mint(msg.sender, initialSupply);
}
}
Enterprise clients should fill out this form
Trusted by industry pioneers
Sign up today and get 5 free prompts!
We want to be sure you know everything you need to know about
our product,
so here’s our guide to some of the most
common questions and their answers