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

Hardening overrule proposals with additional checks #NTRN-325 #32

Merged
merged 59 commits into from
Apr 14, 2023
Merged
Changes from 1 commit
Commits
Show all changes
59 commits
Select commit Hold shift + click to select a range
92ba326
wip
oldremez Jan 11, 2023
6413f49
wip
oldremez Jan 12, 2023
7d40f0c
wip
oldremez Jan 12, 2023
ee32d0a
messages refactoring
oldremez Jan 12, 2023
b73035f
temp commit
oldremez Jan 13, 2023
99603e3
query and config fixes
oldremez Jan 16, 2023
3257032
Merge branch 'neutron_audit_informal_17_01_2023' into feat/subdao-reg…
oldremez Mar 13, 2023
959bd60
wip
oldremez Mar 13, 2023
0570481
Merge branch 'neutron_audit_informal_17_01_2023' into feat/subdao-reg…
oldremez Mar 14, 2023
fb4ba65
most of the code is written
oldremez Mar 14, 2023
09f4917
positive test scenario pass
oldremez Mar 14, 2023
779bb0b
refactoring
oldremez Mar 14, 2023
794ac50
wip
oldremez Mar 14, 2023
7b66d5f
huge refactoring, overrule creation added, more tests
oldremez Mar 15, 2023
d3bb5c1
massive unit tests refactoring
oldremez Mar 16, 2023
8433023
overrule pre propose tests pass
oldremez Mar 16, 2023
06e1082
cleaning up some stuff
oldremez Mar 16, 2023
eb2388f
queries tests
oldremez Mar 16, 2023
8857a2c
QueryBase -> QueryExt
oldremez Mar 16, 2023
2c810b4
overrule proposal id query test
oldremez Mar 16, 2023
aab8ff0
fixing timelock tests wip
oldremez Mar 16, 2023
78159ae
timelock fixes and tests
oldremez Mar 17, 2023
a881fcb
schema fixes
oldremez Mar 17, 2023
ff6776f
clippy fixes
oldremez Mar 17, 2023
598b609
schema regen
oldremez Mar 17, 2023
51d7ef6
refactoring
oldremez Mar 21, 2023
c0def32
fix imports to make release build pass
oldremez Mar 22, 2023
2c69309
clippy fixes
oldremez Mar 23, 2023
b21d9d4
init msg fix
oldremez Mar 28, 2023
53df446
Merge branch 'main' into feat/subdao-registry
oldremez Mar 28, 2023
3192ee0
fix
oldremez Apr 3, 2023
cc5e3ec
removing redundant deps
oldremez Apr 3, 2023
f55bf39
timelock proposal tracks the overrule proposal status now
oldremez Apr 4, 2023
8f15c55
rustfmt
oldremez Apr 4, 2023
ad531cb
return commented tests
oldremez Apr 4, 2023
501cbea
clippy
oldremez Apr 4, 2023
ff3f197
fmt
oldremez Apr 4, 2023
ba6ad37
redundant deps
oldremez Apr 4, 2023
bb4cbb3
fixed proposalresponse
oldremez Apr 5, 2023
4b8b946
fixed preproposal hooks
oldremez Apr 6, 2023
82147dd
fmt
oldremez Apr 6, 2023
2dc5f6e
clippy
oldremez Apr 6, 2023
4076475
Merge branch 'main' into feat/subdao-registry
oldremez Apr 6, 2023
3036155
Merge branch 'main' into feat/subdao-registry
oldremez Apr 7, 2023
7d8dd6f
housekeeping
oldremez Apr 9, 2023
1a56936
error descriptions
oldremez Apr 9, 2023
8dd178e
more error descriptions
oldremez Apr 9, 2023
430ffe0
fmt
oldremez Apr 9, 2023
3ee3cab
refactoring+comments
oldremez Apr 10, 2023
9841bb0
format fix
oldremez Apr 10, 2023
d2a1fd6
tests fix
oldremez Apr 10, 2023
2b825b4
Merge branch 'main' into feat/subdao-registry
oldremez Apr 12, 2023
c63fad0
post-review error descriptions fixes
oldremez Apr 13, 2023
9fd4d73
post-review refactoring
oldremez Apr 13, 2023
0675ea3
post-review fmt
oldremez Apr 13, 2023
6f8dcfd
post-review refactoring
oldremez Apr 13, 2023
2d08e28
post-review get subdao query
oldremez Apr 13, 2023
d3b0160
post-review fmt
oldremez Apr 13, 2023
03421cc
post-review clippy
oldremez Apr 13, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
post-review refactoring
  • Loading branch information
oldremez committed Apr 13, 2023
commit 6f8dcfdd34eed7849e507b85b5873d04c676cc0d
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ pub fn execute(
return Err(PreProposeOverruleError::AlreadyExists { id });
}

let subdao_address = get_subdao_from_timelock(&deps, &timelock_contract)?;
let subdao_address = get_subdao_from_timelock(&deps, &timelock_contract_addr)?;

// We need this check since the timelock contract might be an impostor
// E.g. the timelock contract might be a malicious contract that is not a part of
Expand Down Expand Up @@ -168,7 +168,7 @@ overrule the proposal #{} of '{}' subdao (address {})",

fn get_subdao_from_timelock(
deps: &DepsMut,
timelock_contract: &String,
timelock_contract: &Addr,
) -> Result<Addr, PreProposeOverruleError> {
let timelock_config: TimelockTypes::Config = deps.querier.query_wasm_smart(
timelock_contract.to_string(),
Copy link
Contributor

Choose a reason for hiding this comment

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

already &String

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Changed the argument type to Addr for consistency reasons

Expand Down