Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

draft smart contract #24

Merged
merged 17 commits into from
Jul 18, 2024
Merged

draft smart contract #24

merged 17 commits into from
Jul 18, 2024

Conversation

Thykof
Copy link
Collaborator

@Thykof Thykof commented Jul 8, 2024

No description provided.

smart-contract/assembly/contracts/main.ts Outdated Show resolved Hide resolved
tolerance = 10;
}
// @ts-ignore
// TODO: check overflow ? (or use safeMath)
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TODO

smart-contract/assembly/internal.ts Show resolved Hide resolved
Context.currentThread(),
40000000, // TODO: calibrate max gas
0,
0, // TODO: calibrate coins depending on the presence of the recipient balance in the token storage
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TODO

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we will do it with massalabs/massa-standards#162

@peterjah
Copy link
Collaborator

peterjah commented Jul 12, 2024

I think one missing thing is to get schedueles by recipient (will be usefull for admin dashboard).
It is also doable outside of the contract but we will need to fetch all scheduels.. lets discuss about it

@Thykof Thykof marked this pull request as ready for review July 15, 2024 22:26
amount,
interval,
occurrences,
occurrences,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remaining

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

at the creation, it's the same value for remaining

// Autonomous smart contract feature

// The function asyncSendFT will be trigger by autonomous smart contract feature.
export function asyncSendFT(schedule: Schedule): void {
Copy link
Collaborator

@Ben-Rey Ben-Rey Jul 18, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we check that only this contract can call this function? It is exported in main so it callable by anyone.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, I'll push in another PR

@Thykof Thykof merged commit ae45cf8 into main Jul 18, 2024
1 check passed
@Thykof Thykof deleted the smart-contract branch July 18, 2024 22:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants