-2

I'm working on a new project that I'm launching soon. The dapp is almost ok, I'm writing the contracts. But I'm not sure I understood everything, if someone can help me :(

I would like to create a token contract with a supply fix (like 1 million), then make two pre-sales (one with and without whitelist), then a contract to sell on DEX with rewards, staking system, etc.

What is the best way to do this?

Is it possible to :

  • create the tokens with the first contract
  • transfer them to the pre sale whitelist contract
  • make the pre-sale
  • transfer the remaining tokens to the pre-sale contract without withelist
  • make the pre-sale
  • transfer the remaining tokens on the last contract, which will manage all the features of my token + put on a dex

am I right in the way I do it or am I completely wrong ?

If I'm wrong, do I have to do everything in one contract, with specific functions and flags like for the beginning and the end of a pre-dirty ?

if I do everything in one, will some smart guy be able to put the contract on a DEX and add liquidity?

I looked for several ohm/nodes project contracts, I saw the pre-sale contracts but I didn't understand when they create the token because their pre-sale contracts are just sell contracts

and I didn't understand how after the pre sale the main contract takes over

i would like a final contract like that, once the sales are finish https://snowtrace.io/address/0xf2cfc11093edb5a2dc7f49e70a3a3a9cd4f4fee4#code

if someone can help me, thanks :)

ps : last question, in the contract i dont understand what are payees, shares, addresses and balances variables

Adr
  • 1
  • 1
  • Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. – Community Dec 28 '21 at 13:53

1 Answers1

1

This question covers a few different things so I'm going to split my answer up.

Answers:

I looked for several ohm/nodes project contracts, I saw the pre-sale contracts but I didn't understand when they create the token because their pre-sale contracts are just sell contracts


Presale contracts by nature are selling contracts the token contract and the presale contract are generally not the same but there are a thousand ways to do that. They receive x amount of tokens and take payment in say ETH for x tokens.

if I do everything in one, will some smart guy be able to put the contract on a DEX and add liquidity?


Anybody will pretty much always be able to add liquidity for a token because that is external to the token but there are certain ways you can prevent adding liquidity until a certain condition is met say a certain timestamp you just need to detect operations that are swaps/adding liquidity and throw an error.

ps: last question, in the contract I don't understand what are payees, shares, addresses, and balances variables


I am not entirely sure what the purpose of these are for because I am not very familiar with the BRIG protocol.

and I didn't understand how after the pre-sale the main contract takes over


The main contract does not need to take over from the presale contract because the presale contract just runs until all of the tokens are sold and then it just becomes an empty husk.

Other stuff:

In the future please split up your questions across multiple StackOverflow posts.

Max Campbell
  • 595
  • 9
  • 22