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

feat(node+server): query proposals #963

Merged
merged 39 commits into from
Nov 14, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
1970063
feat(node+server): query proposals
frdomovic Nov 12, 2024
1a92e92
feat(node+server): fetch specific proposal
frdomovic Nov 12, 2024
9088ac4
fix: cleanup
frdomovic Nov 12, 2024
32dc09e
feat: update missing query logic
frdomovic Nov 13, 2024
92cf542
fix: lint
frdomovic Nov 13, 2024
e756e8c
fix: build + todo comments
frdomovic Nov 13, 2024
c18c4dc
fix: return of create proposal
frdomovic Nov 13, 2024
cd22e6c
feat: update return type for proposal approvals + create proposal
frdomovic Nov 13, 2024
64beb02
fix: build
frdomovic Nov 13, 2024
357d9fc
Merge branch 'master' into feat-proxy-query-methods
frdomovic Nov 13, 2024
3404ae4
fix: empty struct
frdomovic Nov 13, 2024
58438fb
Fix proxy contract proposal (#965)
alenmestrov Nov 13, 2024
b323ce0
fix: lint
alenmestrov Nov 13, 2024
09661f0
fix: response return
frdomovic Nov 13, 2024
37f86f8
fix: nit order
frdomovic Nov 13, 2024
64421e1
fix: change context id handler type
frdomovic Nov 13, 2024
b2016e4
fix: offset + limits type to usize
frdomovic Nov 13, 2024
677efb2
fix: updated tests
alenmestrov Nov 13, 2024
486b318
fix: linter
alenmestrov Nov 13, 2024
7af1fa5
fix: report err return type
frdomovic Nov 13, 2024
f7a8b44
feat: implemented ProposalId instead of String
alenmestrov Nov 13, 2024
d1c1438
fix: linter
alenmestrov Nov 13, 2024
cdaf40a
fix: removed Repr where not needed
alenmestrov Nov 13, 2024
e7901a8
fix: fixed tests
alenmestrov Nov 13, 2024
9ddaed2
fix: linter
alenmestrov Nov 13, 2024
bb336e9
fix: imported parse_api_error
alenmestrov Nov 13, 2024
53bf13d
fix: fixed decoding of bs58
alenmestrov Nov 13, 2024
5b1187c
fix: linter
alenmestrov Nov 13, 2024
979c325
feat: implemented method for getting proposal approvers, adjusted tests
alenmestrov Nov 14, 2024
4c29423
fix: linter
alenmestrov Nov 14, 2024
0f97421
fix: changed transfer from NEAR to yoctoNear
alenmestrov Nov 14, 2024
093cf00
fix: resolved comments for proxy contract
alenmestrov Nov 14, 2024
05b8f51
fix: resolved comments from PR
alenmestrov Nov 14, 2024
eeef984
fix: removed unkown value
alenmestrov Nov 14, 2024
3e76e39
fix: resolved comments
alenmestrov Nov 14, 2024
8030f45
fix: linter
alenmestrov Nov 14, 2024
b4bb499
fix: resolved comments2
alenmestrov Nov 14, 2024
d9f018b
fix: merged master
alenmestrov Nov 14, 2024
c02695f
fix: linter
alenmestrov Nov 14, 2024
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
2 changes: 1 addition & 1 deletion apps/blockchain/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ impl AppState {

println!("Call in wasm create new proposal {:?}", receiver);
let account_id = env::ext::AccountId("vuki.testnet".to_string());
let amount = 1;
let amount = 1_000_000_000_000_000_000_000;
let proposal_id = Self::external()
.propose()
.transfer(account_id, amount)
Expand Down
2 changes: 1 addition & 1 deletion contracts/proxy-lib/src/mutate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ impl ProxyContract {
} => {
let account_id: AccountId =
AccountId::from_str(receiver_id.as_str()).expect("Invalid account ID");
Promise::new(account_id).transfer(NearToken::from_near(amount))
Promise::new(account_id).transfer(NearToken::from_yoctonear(amount))
}
_ => continue,
};
Expand Down
2 changes: 1 addition & 1 deletion contracts/proxy-lib/tests/sandbox.rs
Original file line number Diff line number Diff line change
Expand Up @@ -474,7 +474,7 @@ async fn test_transfer() -> Result<()> {

let actions = vec![ProposalAction::Transfer {
receiver_id: recipient.id().to_string(),
amount: 5,
amount: 5_000_000_000_000_000_000_000_000, // 5 NEAR
}];

create_and_approve_proposal(&proxy_helper, &relayer_account, &actions, members).await?;
Expand Down