Unilock: Create your campaign token from within

  1. No mint function. Your total supply is fixed during the token’s creation. You will not be able to create more after.
  2. No authority over the token’s smart contract. No one, including the Unilock team, will have control over the token’s protocol.
  3. Public smart contract. Since all tokens created in the platform follow a certain model, that means your token smart contract is open source.

How can I create a token during a campaign launch?

CREATE TOKEN.
TOKEN INFO
  • Token name
  • Token symbol
  • Decimals
  • Total Supply

Technicalities:

tokenDeployer.sol : Line 22:function createTokenWithCampaign(string memory _name, string memory  _symbol, uint8 _decimals,uint _totalSupply,uint[] memory _data,uint _pool_rate,uint _lock_duration,uint _uniswap_rate) public returns(address token_address){    
bytes memory bytecode = type(ERC20).creationCode;
bytes32 salt = keccak256(abi.encodePacked(_name, msg.sender));
assembly {
token_address := create2(0, add(bytecode, 32), mload(bytecode), salt)
} ERC20(token_address).initialize(_name,_symbol,_decimals,_totalSupply); IERC20(token_address).approve(campaignFactory,IERC20(token_address).balanceOf(address(this))); IFactory(campaignFactory).createCampaign(_data,token_address,_pool_rate,_lock_duration,_uniswap_rate); IERC20(token_address).transfer(msg.sender,IERC20(token_address).balanceOf(address(this))); Tokens.push(token_address);
return token_address;
}

Sources:

--

--

--

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

TryHackMe — Vulnversity

Hackers Shut Down a Major Pipeline

Announcing our Official Active Converger Program!

IoT Trends 2022 — LPWA IoT goes Hyperscale

December 2, 2020: Idena vulnerability report

Wish-you.co Analysis

{UPDATE} The Eyes of Ara Hack Free Resources Generator

{UPDATE} Little Girl First Spa Hack Free Resources Generator

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
unilock

unilock

More from Medium

8/1/2022 — Daily Crypto Newsletter by Zia — Issue #2

What is the Difference Between Meme Coins and Use Case Coins?

Why should I care about web3? From someone who started about five minutes ago.

The LastChance Token: An Introduction and All You Need To Know