Skip to content

Commit e658252

Browse files
authored
Merge pull request #5 from oraichain/single-step
Single step
2 parents ce96419 + 38f0213 commit e658252

File tree

9 files changed

+409
-140
lines changed

9 files changed

+409
-140
lines changed

.gitignore

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
1-
.earth
2-
.mars
31
node_modules
42
data
53
build
64
target
75
libwasmvm_muslc.a
86
tests/test-data.json
9-
artifacts
7+
artifacts
8+
.env

Cargo.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
[workspace]
22
members = ["contracts/*"]
33

4+
resolver = "2"
5+
46
[profile.release]
57
opt-level = 3
68
debug = false
11.3 KB
Binary file not shown.

contracts/cw-ics20-latest/src/contract.rs

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -443,13 +443,14 @@ pub fn execute_delete_mapping_pair(
443443
#[entry_point]
444444
pub fn migrate(deps: DepsMut, _env: Env, msg: MigrateMsg) -> Result<Response, ContractError> {
445445
// we don't need to save anything if migrating from the same version
446+
let config: Config = CONFIG.load(deps.storage)?;
446447
CONFIG.save(
447448
deps.storage,
448449
&Config {
449-
default_timeout: msg.default_timeout,
450+
default_timeout: config.default_timeout,
450451
default_gas_limit: msg.default_gas_limit,
451-
fee_denom: msg.fee_denom,
452-
swap_router_contract: msg.swap_router_contract,
452+
fee_denom: config.fee_denom,
453+
swap_router_contract: config.swap_router_contract,
453454
},
454455
)?;
455456
set_contract_version(deps.storage, CONTRACT_NAME, CONTRACT_VERSION)?;
@@ -1089,9 +1090,9 @@ mod test {
10891090
mock_env(),
10901091
MigrateMsg {
10911092
default_gas_limit: Some(123456),
1092-
default_timeout: 100u64,
1093-
fee_denom: "orai".to_string(),
1094-
swap_router_contract: "foobar".to_string(),
1093+
// default_timeout: 100u64,
1094+
// fee_denom: "orai".to_string(),
1095+
// swap_router_contract: "foobar".to_string(),
10951096
},
10961097
)
10971098
.unwrap();

0 commit comments

Comments
 (0)