SASEUL Smart Contract
The SASEUL engine provides one system contract and one base method (Genesis) by default. Methods included in the system contract can only be executed by the Genesis address.
Create the system contract by using the “Register” method in the “Genesis” method and creating other system methods with the “Register” method. Then, create a “Publish” method to allow network participants to deploy custom contracts and methods. Participants can then register and use the methods they need in the blockchain network using the “Publish” method.
However, this approach is too complex and difficult to understand. We anticipate that someone will fork the network and build a new network after the SASEUL main network is made public. Therefore, we have created six base execution methods and 15 base query methods for the SASEUL main network.
Each method is as follows:
Base execution methods
- Genesis: Method for generating the first block
- Register: Method for registering contracts and methods
- Grant: Method for creating network operators. Accepting this transaction will hard fork the network.
- Revoke: Method for deleting network operators. If you want to modify the network again, you must hard fork it.
- Oracle: Method for verifying the first mining and contribution ratio of Resource Chain.
- Fee: Method for executing fees
Base query methods
- GetBlock: Method for querying a block
- ListBlock: Method for listing blocks
- BlockCount: Method for counting blocks
- GetTransaction: Method for querying a transaction
- ListTransaction: Method for listing transactions
- TransactionCount: Method for counting transactions
- GetCode: Method for querying methods
- GetResourceBlock: Method for querying a Resource block
- ListResourceBlock: Method for listing Resource blocks
- ResourceBlockCount: Method for counting Resource blocks
- GetResource: Method for querying contributions(resource)
Rules
- Each contract can only modify the Status data allocated to the contract address.
- Contracts cannot access the same Status data as other contracts.
- Contracts can be modified by changing the version, but cannot be modified if the version is set to 0.
- The maximum length of a Status key is 64 characters and the maximum length of Status data is 65,536 characters.
- Large data is stored in the block data by being sent in a transaction, and the transaction hash is stored in the Status data for reference.