Author | ieigen-max, weber |
---|---|
Status | Developing |
Type | Private Smart Contract |
Category | Core |
Created | 2021-05-20 |
[toc]
To provide external call from Solidity and AVM
By adding a new built-in function in Solidity and AVM to support different privacy computing protocol on Layer2
Enhance the privacy of smart contract by EigenCC or EigenFL.
-
Function signature
function eigenCall(bytes calldata) external pure returns (bytes memory);
-
Input
rlp_bytes
: The RLP encoded of a list which contains 4 string elements just like[operator, arg1, arg2, arg3]
.operator
,arg1
,arg2
,arg3
are all strings.operator
can be "add_cipher_cipher", "add_cipher_plain", "sub_cipher_cipher", "sub_cipher_plian", "encrypt", and "descrypt"arg1
,arg2
,arg3
should be operand. According to the kind of operator, they represent different meanings, e.g., ifoperator
is "add_cipher_cipher",arg1
andarg2
should be ciphers which are base64 encoding ECIES cipher; ifoperator
is "add_cipher_plian",arg1
should be ciphers which is base64 encoding ECIES cipher, butarg2
should be plain number- The list must contain 4 elements, so if
argn
is not used, it should be set to empty sting (that is "")
-
Returns
- results: The RLP encoded of a string
The eigenCall is executed off the chain as a kind of secure out-soured computing. While outsouring, the computing power provider, namely prover, will generate a signature in TEE or a ZKP in Non-TEE, as the OneStepProof.