Consensys / Tokens

Ethereum Token Contracts
MIT License
2.06k stars 1.19k forks source link

Test the factory #125

Open maurelian opened 6 years ago

maurelian commented 6 years ago

Things we need:

  1. A contract of exactly the same length as the compiled EIP20 contracts and with a matching first byte, but non-matching trailing bytes.

  2. A way to deploy that contract (theoretically easy, but if the test contract has to be hand built as bytecode, I think we’ll need to hack Truffle’s deployment pipeline a bit or otherwise do something non-standard to get it in the tests.)

kangarang commented 6 years ago

A contract of exactly the same length as the compiled EIP20 contracts and with a matching first byte, but non-matching trailing bytes.

any insight/advice on how to obtain this?

maurelian commented 6 years ago

Thinking it through, in the test suite, you can get the bytecode from the EIP20 artifact as a string.

Then you can do a simple string modification to change that bytecode slightly. Then you can deploy is using web3.eth.sendTransaction({data: modified_bytecode}).

CryptoMan21 commented 6 years ago

sorry that i ask, i am totaly new in coding and try to understand all this... i created a coin already with 5mio. of it.... how do i get the value of money inside..... do i need to send the ethereum directly on the contract adress?? i dont want to try it cause i fear that i lose it

maurelian commented 6 years ago

@CryptoMan21 Sorry to hear you're having trouble, but this isn't really the proper forum for support, and I don't really understand what you're asking. Perhaps start at https://ethereum.stackexchange.com/, and a few other tutorials.