NEAR-DevHub / neardevhub-contract

DevHub Portal Product Contract (Hosted on NEAR Blockchain) – Includes other instances (e.g. Infrastructure, Events)
https://neardevhub.org
19 stars 15 forks source link

Upgrade to near-sdk-rs 4.1 and test functionality #23

Closed ailisp closed 1 year ago

ailisp commented 1 year ago

Problem Currently DevHub contract is using near-sdk-rs 3.x. Several API enhancements have been introduced in 4.0 and security updates will also only update for 4.x so we should update to use near-sdk-rs 4.1.

User Story

As a developer, I want to use near-sdk-rs 4.x APIs in develop DevHub contract. Particularly I would like to use require! macro and new cross contract API.

Acceptance Criteria

gautamprikshit1 commented 1 year ago

I would like to work on this one

frol commented 1 year ago

I had to revert #26 (see https://github.com/near/neardevhub-contract/commit/8fc1fdd54237c646d16b25cbf5bbd7d84a7a4a49) due to https://github.com/near/neardevhub-contract/pull/26#issuecomment-1581018921.

ori-near commented 1 year ago

Hi @frol – Can you please provide an update on this ticket? What's the next step here? Do we need to reassign or change the status?

frol commented 1 year ago

It seems that @gautamprikshit1 did not have time to proceed with this issue, so I unassigned him, and if someone is ready to jump on it, learn more in https://github.com/near/neardevhub-contract/pull/26#issuecomment-1581018921

jaswinder6991 commented 1 year ago

Hi @frol, what is pending in this issue atm? The list of tasks mentioned here - https://github.com/near/neardevhub-contract/pull/26#issuecomment-1581018921 and the migrations you have mentioned? (which might be just the Sponsorship token according to you guess?)

frol commented 1 year ago

@jaswinder6991 well, by this time it will be easier to start the PR from scratch (just manually port the changes) as rebasing will probably just make things unnecessarily complicated.

frol commented 1 year ago

With #46 merged, this issue is unblocked, though I think that instead of trying to rebase #26, it would be easier to re-apply the changes manually. cc @jaswinder6991

PiVortex commented 1 year ago

I'm going to take a look at this.

PiVortex commented 1 year ago

Please help with this See src/respost.rs The test is failing as the two are not equal in the assert_eq! Which way should it be structured? Should I reformat to be the same as the expected? image

frol commented 1 year ago

@PiVortex The expected value is correct, the "post" value has to be a JSON-encoded string, not a JSON object.

image
frol commented 1 year ago

Resolved in #63.