defuse_controller/lib.rs
1use near_sdk::{Gas, Promise, ext_contract};
2
3#[ext_contract(ext_controller_upgradable)]
4pub trait ControllerUpgradable {
5 /// Requires 1yN attached for security purposes
6 fn upgrade(
7 &mut self,
8 #[serializer(borsh)] code: Vec<u8>,
9 #[serializer(borsh)] state_migration_gas: Option<Gas>,
10 ) -> Promise;
11
12 /// MUST be `#[private]`
13 fn state_migrate(&mut self);
14}