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
Support for global variables to make programs more diverse
Motivation
program global.aleo {
let global_address: address;
let is_set = bool;
transition deploy(addr: address) -> bool {
if is_set {
return false;
}
global_address = addr;
is_set = true;
}
transition change_deploy(addr: address, new_addr: address) -> bool {
if addr != global_address {
return false;
}
global_address = new_addr;
}
//some other features.
}
As you can see, if global variables are implemented, then when writing a game-like contract, players send their game pledges to the contract deployer, so that no player can raise the pledge privately, and the contract deployer can use zero-knowledge proofs to control the access to the game funds through the application made by the player, which greatly ensures the financial security and fairness of the contract.
Implementation
As it stands now, it may be necessary to modify variable declarations, as well as the internal constructs of the program and the corresponding compiler. This will be a lot of work, but it will be a huge boost to the programming effort.
The text was updated successfully, but these errors were encountered:
Thank you for the proposal!
We are definitely open to introducing this into the language.
We will need to iron out details of the design and programming model in an ARC.
Here are some relevant links:
Thank you for the proposal! We are definitely open to introducing this into the language. We will need to iron out details of the design and programming model in an ARC. Here are some relevant links:
🚀 Feature
Support for global variables to make programs more diverse
Motivation
As you can see, if global variables are implemented, then when writing a game-like contract, players send their game pledges to the contract deployer, so that no player can raise the pledge privately, and the contract deployer can use zero-knowledge proofs to control the access to the game funds through the application made by the player, which greatly ensures the financial security and fairness of the contract.
Implementation
As it stands now, it may be necessary to modify variable declarations, as well as the internal constructs of the program and the corresponding compiler. This will be a lot of work, but it will be a huge boost to the programming effort.
The text was updated successfully, but these errors were encountered: