# Engineering Deploying Time

By [DamoMiner](https://paragraph.com/@damominer-2) · 2023-06-09

---

1.Q:I was updating my language plug in for real, but I realize that currently at strokes or immutable, right? So is it intended behavior?

A:Yeah, right now, the the reason why strikes are immutable is that, in the underlying layer, basically fundamentally right, you don’t have mutability in the circuit. Now, we can give the illusion of mutability, but that requires some changes to the language, or just mainly changes to the language internals, so that we track which variables are mutated and then reassign them. This is something that’s certainly interesting, for the compiler team to, like, implement, I’d say over the other features that we have planned, this one kind of takes a lower priority. Mainly, you know, like stuff like a raise, like internal like, pass optimizations, those kind of things struck packing, this kind of falls beneath those. But this is certainly interesting. And you can do this by, you know, beefing up your compiler to track these sort of changes. But for now, to answer your question, it is immutable.

2.Q:When are programs with imports going to be deployable ?

A:As far as I know, when I run, like local beacon notes, I’m able to deploy programs with imports in them.

The one copy out is that you have to, like, deploy it so that you have one program that, so, like, you have to deploy it in the inverse order of your dependency graph. So let’s say, of a program A that inputs program B, you have to, deploy program B before deploying program A, if that makes sense.

Q: The program that imported 1st. It’s registry, the program ID does show up on my beacon note. But when I try to add the program that imports that program, what happens is that it just throws an error that has not been added yet. I believe Haruka did answer that. I have to sort of change the start was a code to 1st grab that from the note into, you know, before I use that. So I was wondering if that code needed to pull requests on our side.

A: That’s a great point. I do use my own sort of internal tools to deploy it. I think at the time being, you’ll have to do that. There is some work being done by our SDK team to just, like, make all this stuff super easy. So in this SDK, I’m not sure the extent of the support, but there might be all support already in there that will, you know, look at, you know, what programs that you’re trying to deploy, and then go use them directly. CLI, to, like, just grab that program or add it in, isn’t I don’t believe it’s a two it’s that involved. Or you can check Aleo tools here, or, like ALU decay and see if that CLI functionality there has, um, I support it. [https://github.com/AleoHQ/sdk](https://github.com/AleoHQ/sdk)

3.Q: The recent announcement is a bit confusing. > there are no rewards for provers participating in Testnet 3 Phase III (which we are currently in). 1. Does that mean, it is incentivized only for validators but not provers? 2. I thought phase 3 will start once the validators selection has been done. Is there any update on that?

A:I really recommend just asking Aleo community channels for this stuff.

4.Q:Is it possible to deploy a smart contract via another smart contract? If yes, is it possible to calculate the address of the contract that hasn’t been deployed yet?

A:NO. I think deeper thought needs to go into how you make something like this.

5.Q:Is it possible to call a function of an another contract?

A:Yes, it is possible. Let me link you to some code that shows an example of how to do that, so you can find these examples in the LEO repository. [https://github.com/AleoHQ/leo/tree/testnet3/examples/battleship](https://github.com/AleoHQ/leo/tree/testnet3/examples/battleship) The specific example that I’m linking is the battleship example. Then you click on the example subdirectory, and then you click on battleship. If you look through this program, and I’m linking it here in the chat, uh, it shows you how to make external calls to other, uh, to other programs, essentially.

6.Q：Is it possible to pack data and get it’s hash (like abi.encodePacked(…))

A：So right now, the current, up codes and implements like, you know, underlying support we have for like [https://developer.aleo.org/leo/operators/#bhp256commit](https://developer.aleo.org/leo/operators/#bhp256commit) If you look at the LEO section in operators, you can see what we have for, like, B-H-P, peterson all these sorts of, you know, hash operations. What you’ll find is that we, and I think this is what the question is getting at, is that we don’t currently have the ability to take in, like, an arbitrary pack construct and put that in through the hash function. but this is certainly like features that we can work on.

7.Q: Is there a token standard in Aleo (Like ERC-20 on eth)?

A: There is not a token standard just yet. You can find some on github: [https://github.com/AleoHQ/ARCs.](https://github.com/AleoHQ/ARCs.) There’s also another token program that’s used. [https://github.com/AleoHQ/snarkVM/blob/testnet3/synthesizer/src/program/resources/credits.aleo](https://github.com/AleoHQ/snarkVM/blob/testnet3/synthesizer/src/program/resources/credits.aleo) you can look at a sample token program that’s used for credits dot Aleo. So this is the credits program, essentially, if I can find it.

8.Q:Is it possible to create a library which would be used in a smart contract?

A: This is certainly possible.What you could do is create a program that essentially, there are two sorts of functions that we have in leo. Essentially, you have transitions, which essentially um are composed of like a state transition. These are things that are externally callable that modify the state of your contract. There’s essentially like your atomic units of execution. Under there’s also, uh in Leo, the concept of functions, which are essentially like helper functions that you can define that just implement logic, that are then invoked by other transitions. And if you like to create, like a library, a contract, you would essentially define one program with a bunch of helper functions, and then define another program that use that imports the 1st program and just makes external codes to that 1st program.

9.Q:Hello, this is about the ambassador question. I see someone ask on Aleo community call. So for the selected ambassador, why not release their resume on discord? That may give direction to someone who are interested. And I think this may be very important for transparent.

A: this is the engineering office hour, so questions not related to engineering is best left to discord

10.Q:I have a question about escrow. So I was working on a program, which, I think most of the things that we have on block chains nowadays, like swaps, anything in defi, usually require a smart contract, or, in this case, a program, to own value in any way. So right now, the only way for us to own value is an Aleo, is that a program holds something in its storage, and it can be access or updated or transitioned through finalize. But the problem here that I’ve faced is that when, eg. we have a token program which issues tokens either a record, either through record or even as just holding a mapping on his storage, if another program wishes to sort of capture that value or sort of hold that value, that’s not really possible, because there are two options. So for records, it could consume it as in just input its input record and not output any other records? And for a storage, it could sort of import that program and cause function to decrease the amount of value that the person is holding in the stores of that program, the token program, but the program itself cannot actually hold value. And this uh makes it sort of impossible to create any sort of traditional like swaps on escrow or liquidity pools, which completely locks the defy a creation of the defi platform. I was thinking, we are, you know, we’re thinking about going maintenance on Aleo, and I was thinking, if anybody has come with something along those lines to solve this problem.

A: I’ll address the 1st. I’ll address programs owning records. So records are fundamentally, like a private construct. So the idea of programs owning records starts to create conceptual issues. So if a program owns a record, right? Who can spend it? How do you make sure that that spend is done privately? So the I’d say, in terms of programs owning records, there’s a bunch of questions that need to be answered, even more like, I’d say, theoretical questions that, we need to answer 1st, such that we’d be able to preserve the privacy properties of the chain now, with programs owning records, interacting with other programs on chain, mapping state, this is certainly something that needs to be improved. And the idea is that one thing that we are working on, or is like on our list, to finish out um to help facilitate this is essentially allowing support, like what we call, like, self dot parent and, it’s essentially what it’s going to be, is an opera that you can use to figure out who um to who invoked the call to another program. So thing on adding this opcode, you then now have programs that can be able to interact with each other and then own,or have or hold in other programs as well.

Q: So that’s only on the context of finalizer transitions.

A: This is only in the context of finalize.

Q: So for example, on my final and program, the other program is token. I can sort of in book that program transition and that program final. When that program final is triggered in that program self, that paren’t is my program?

A: It is your program.

Q: Through this, we could potentially give programs values in, e.g. that token program could say, okay, this uh, swap program holds a value ten, and that program is the only one that could possibly change that state.

A: There’s some a little bit of engineering work that needs to go into this. So just to make sure that, essentially your finalize ordering is done correctly.

11.Q: What’s the use case for running aleo client node?

A: the use cases, I think, is like, essentially like if you’re an application user, right, and you kind of want to run a full node, if you’re one of those people who like, feels that, like, you know, some people like, you know, when they have wallets, they run full nodes on their laptops. Certainly, like, if you’re more on the application side, if you’re actually, like, you know, running it back and for an application, you’d probably be running a prover. usually, like most people are okay with light clients. that being said, uh, we don’t really have, UH, or, you know, light clients is something that we are aim to support in the future. So it might be the case that in the beginning, for the very privacy centric that don’t want to use, um, 3rd party services, they would run the client note on their own.

Q: So is there anything that your client note can do right now or why can’t?

A: The answer on the top of my head is no. I think the provers functionalities of assumes the client notes functionality. But this is also a little bit out of my wheel house.

12.Q：So it’s the cast, a cast of cold, you know, not not that cats not cast into structure or record. Form you 16 to you 32, it doesn’t it is a plan?

A：So, personally, like, this is a, this is something that people have been asking for a lot. I have a couple of tickets and stuff that are and, you know, features that I’m resolving early on this week. the idea is to hopefully get casting between types, at the very least, upcasting, because that should be pretty easy.

---

*Originally published on [DamoMiner](https://paragraph.com/@damominer-2/engineering-deploying-time)*
