You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have basically copied the code and changed the variables to be token tickers and entry prices. If each function is written in the same order, then why are the buttons displayed in a different order on his screen?
His buttons are create new contract, store new number, return saved number, return address from array.
My buttons are create new contract, store new number, return address from array, return saved number.
Changing the order of the functions does not seems to make a difference in their display. Is that true? Does the order of functions only matter for logic and defining variables?
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "./TokenEntry.sol";
contract TokenGenerator {
TokenEntry[] public TokenEntryArray;
function createTokenGenerator() public {
TokenEntry TokenEntryCopy = new TokenEntry();
TokenEntryArray.push(TokenEntryCopy);
}
// To interact with a contract, you need address and ABI
function TokenGenStore(uint256 _TokenEntryIndex, uint256 _TokenEntryNumber) public {
TokenEntryArray[_TokenEntryIndex].store(_TokenEntryNumber);
}
function TokenGenGet(uint256 _TokenEntryIndex) public view returns(uint256) {
return TokenEntryArray[_TokenEntryIndex].retrieveBuyPrice();
}
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I have basically copied the code and changed the variables to be token tickers and entry prices. If each function is written in the same order, then why are the buttons displayed in a different order on his screen?
His buttons are create new contract, store new number, return saved number, return address from array.
My buttons are create new contract, store new number, return address from array, return saved number.
Changing the order of the functions does not seems to make a difference in their display. Is that true? Does the order of functions only matter for logic and defining variables?
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "./TokenEntry.sol";
contract TokenGenerator {
}
Beta Was this translation helpful? Give feedback.
All reactions