After you’ve finished developing your new smart contract, you will want to test, and finally upload the code to the Lamden blockchain so that others can submit transactions onto it.
A smart contract can only be submitted to the blackchain if no errors are detected. The wallet will lint the contract before you submit, but you can always click the CHECK CONTRACT button at the bottom of the IDE to manually check.
Errors that are found will show up in the error box below the IDE window. If no errors are detected this box will contain the message Contract is Okay.
Contract is Okay
SUBMIT TO NETWORK
Submit Contract to Lamden...
You Contract Name
This is an advanced feature and should only be used by developers that understand its purpose. Most smartcontracts do not need to be submitted with an Owner.
Specifying the OWNER of a smartcontract will prevent anyone except the owner from executing methods on that smartcontract.
The owner can be a wallet address or another smart contract. Once set it cannot be removed and the blockchain will reject all transactions not from the specified owner.
The owner is separate and has nothing to do with developer rewards.
This is an advanced feature and should only be used by developers that understand its purpose.
If your smart contract uses the @construct decorator to create a constructor method then it’s possible you will need to provide that method some inital arguments.
The Constructor Args property takes an object (in JSON format) that will be provided to the submission contract as part of the transaction. The submission contract will map these values to the arguments in your constructor method.
Imagine we have a token contract that we want to add to the network. We want this contract to mint an initial supply to some wallet address that we control. We COULD hardcode these values, but to allow this contract to be reuseable we will instead provide these values using Constructor Args
token_balances = Hash(default_value=0)
def seed(wallet_address: str, inital_supply: int):
token_balances[wallet_address] = inital_supply
To supply the above arguments for the seed method I would enter the following object (in JSON format) to the Constructor Args property.
If you want to recieve your developer rewards into a different wallet or smart contract, you can send a transaction to the submission smart contract.
Telegram: t.me/lamdenchatDiscord: discord.gg/xjBgcAAUpSReddit: reddit.com/r/lamden