Skip to content

Instantly share code, notes, and snippets.

View kn1g's full-sized avatar
👓
whoopwhoooop

kn1g kn1g

👓
whoopwhoooop
View GitHub Profile
0x5Be0E52bbe27e08F29467c712d7ff4cda8E75842
0x5Be0E52bbe27e08F29467c712d7ff4cda8E75842
pragma solidity ^0.4.18;
import './MyToken.sol';
contract Crowdsale{
using SafeMath for uint256;
// The token being sold
MintableToken public token = new MyToken();
var Smartbox = artifacts.require("./smalobox.sol");
contract('Smartbox', (accounts) => {
it("should have the first account as owner", async () => {
const smartbox = await Smartbox.deployed();
const owner = await smartbox.owner();
assert.equal(owner, accounts[0], "the owner of the smartbox is not the first account");
});
it("should rent the smart box, set authorized user and emit events, and a second rent should fail.", async () => {
// SPDX-License-Identifier: AGPL-3.0-only
pragma solidity 0.8.11;
interface IRegistry {
function register(uint8 _decimals) external;
}
// https://raw.githubusercontent.com/Rari-Capital/solmate/main/src/tokens/ERC20.sol
contract ERC20 {
/*///////////////////////////////////////////////////////////////
EVENTS
//////////////////////////////////////////////////////////////*/