/
githubmirror
/
sway
Обзор
Документация
Войти
/
githubmirror
/
sway
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
examples/upgradeable_proxy/implementation/src/main.sw
22 строки
442 B
Sarah Schwartz
docs: add external code doc (#5840)
08 май 2024, 22:23
Не верифицирован
08 май 2024, 22:23
474d654
Код
Авторство
О чём код?
contract; abi Implementation { #[storage(write)] fn double_input(value: u64) -> u64; } // ANCHOR: target storage { value: u64 = 0, // to stay compatible, this has to stay the same in the next version } impl Implementation for Contract { #[storage(write)] fn double_input(value: u64) -> u64 { let new_value = value * 2; storage.value.write(new_value); new_value } } // ANCHOR_END: target