0

Hi I am very new in Ethereum and smart contract development and trying to make a smart contract where a token can be divided or we can say can be spliced into two parts for e.g,

we have 1ETH, we sliced it and make two parts of 0.5 ETH. and send both parts to different smart contracts or functions.

I am looking for some code snippets as well but didn't found any on the web yet if anyone knows how to code this please help me with the code also.

1 Answer 1

1

Yes, it is possible to split a token up.

It's all dependent on the number of decimal places that token has.(This is a property of the token and not an amount value)

For Example: Ethereum has a property: Decimal Places = 18; thus you can get as little as 0.000000000000000001 ETH

However, if the token has 0 decimal places, then it can't be split.

11
  • Are you trying to say we can't slice 1Eth but 1.1ETH can be sliced?
    – Mohit
    Commented Aug 12, 2021 at 15:12
  • 1
    No, Ethereum has 18 Decimal places. So you can go as little as 0.000000000000000001 ETH. This is a property of the Coin itself. So think about property and not amount. Commented Aug 12, 2021 at 15:14
  • ok now I got your point but can you show me a simple code so I can try to build this to reality?
    – Mohit
    Commented Aug 12, 2021 at 15:17
  • You'll have to ask that in a separate question. Please accept this one and ask another Commented Aug 12, 2021 at 15:22
  • your answer is correct, so I edited my question now you can share the code.
    – Mohit
    Commented Aug 12, 2021 at 15:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.