Skip to content

Commit 206e18e

Browse files
committed
Update UCS Contracts Lib
1 parent de4ac20 commit 206e18e

File tree

9 files changed

+19
-22
lines changed

9 files changed

+19
-22
lines changed

devkit/core/Dictionary.sol

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ import {TypeGuard, TypeStatus} from "devkit/types/TypeGuard.sol";
1919
import {DictionaryMock} from "devkit/mocks/DictionaryMock.sol";
2020
// External Libs
2121
import {IDictionary} from "@ucs.mc/dictionary/IDictionary.sol";
22-
import {DictionaryEtherscan} from "@ucs.mc/dictionary/DictionaryEtherscan.sol";
22+
import {Dictionary as UCSDictionary} from "@ucs.mc/dictionary/Dictionary.sol";
2323

2424
// Core Types
2525
import {Function} from "devkit/core/Function.sol";
@@ -52,7 +52,7 @@ library DictionaryLib {
5252
Validate.MUST_AddressIsNotZero(owner);
5353
/// @dev Until Etherscan supports UCS, we are deploying contracts with additional features for Etherscan compatibility by default.
5454
return Dictionary({
55-
addr: address(new DictionaryEtherscan(owner)),
55+
addr: address(new UCSDictionary(owner)),
5656
kind: DictionaryKind.Verifiable,
5757
status: TypeStatus.Building
5858
}).finishProcess(pid);
@@ -124,7 +124,7 @@ library DictionaryLib {
124124
uint pid = ProcessLib.startDictionaryLibProcess("upgradeFacade");
125125
Validate.MUST_AddressIsContract(newFacade);
126126
Validate.MUST_Verifiable(dictionary);
127-
DictionaryEtherscan(dictionary.addr).upgradeFacade(newFacade);
127+
IDictionary(dictionary.addr).upgradeFacade(newFacade);
128128
return dictionary.finishProcess(pid);
129129
}
130130

devkit/core/Proxy.sol

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import {TypeGuard, TypeStatus} from "devkit/types/TypeGuard.sol";
1414
using TypeGuard for Proxy global;
1515

1616
// External Lib Contract
17-
import {ERC7546ProxyEtherscan} from "@ucs.mc/proxy/ERC7546ProxyEtherscan.sol";
17+
import {Proxy as UCSProxy} from "@ucs.mc/proxy/Proxy.sol";
1818
// Mock Contract
1919
import {ProxySimpleMock} from "devkit/mocks/ProxySimpleMock.sol";
2020

@@ -41,7 +41,7 @@ library ProxyLib {
4141
uint pid = ProcessLib.startProxyLibProcess("deploy");
4242
Validate.MUST_haveContract(dictionary);
4343
return Proxy({
44-
addr: address(new ERC7546ProxyEtherscan(dictionary.addr, initData)),
44+
addr: address(new UCSProxy(dictionary.addr, initData)),
4545
kind: ProxyKind.Verifiable,
4646
status: TypeStatus.Building
4747
}).finishProcess(pid);

devkit/mocks/DictionaryMock.sol

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@ pragma solidity ^0.8.24;
44
// Core
55
import {Function} from "devkit/core/Function.sol";
66
// External Lib
7-
import {DictionaryEtherscan} from "@ucs.mc/dictionary/DictionaryEtherscan.sol";
7+
import {Dictionary} from "@ucs.mc/dictionary/Dictionary.sol";
88

99
/**
1010
@title Mock Dictionary Contract
1111
*/
12-
contract DictionaryMock is DictionaryEtherscan {
13-
constructor (address owner, Function[] memory functions) DictionaryEtherscan(owner) {
12+
contract DictionaryMock is Dictionary {
13+
constructor (address owner, Function[] memory functions) Dictionary(owner) {
1414
for (uint i; i < functions.length; ++i) {
1515
setImplementation(functions[i].selector, functions[i].implementation);
1616
}

src/std/functions/Clone.sol

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
// SPDX-License-Identifier: MIT
22
pragma solidity ^0.8.22;
33

4-
import {ERC7546ProxyEtherscan} from "@ucs.mc/proxy/ERC7546ProxyEtherscan.sol";
5-
import {ERC7546Utils} from "@ucs.mc/proxy/ERC7546Utils.sol";
4+
import {Proxy} from "@ucs.mc/proxy/Proxy.sol";
5+
import {ProxyUtils} from "@ucs.mc/proxy/ProxyUtils.sol";
66

77
/**
88
< MC Standard Function >
@@ -15,7 +15,7 @@ contract Clone {
1515
event ProxyCloned(address proxy);
1616

1717
function clone(bytes calldata initData) external returns (address proxy) {
18-
proxy = address(new ERC7546ProxyEtherscan(ERC7546Utils.getDictionary(), initData));
18+
proxy = address(new Proxy(ProxyUtils.getDictionary(), initData));
1919
emit ProxyCloned(proxy);
2020
}
2121

src/std/functions/GetDeps.sol

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ pragma solidity ^0.8.22;
33

44
import {Dep} from "../storage/Schema.sol";
55

6-
import {ERC7546Utils} from "@ucs.mc/proxy/ERC7546Utils.sol";
7-
import {DictionaryBase} from "@ucs.mc/dictionary/DictionaryBase.sol";
6+
import {ProxyUtils} from "@ucs.mc/proxy/ProxyUtils.sol";
7+
import {IDictionary} from "@ucs.mc/dictionary/IDictionary.sol";
88

99
/**
1010
< MC Standard Function >
@@ -16,7 +16,7 @@ contract GetDeps {
1616
/// DO NOT USE STORAGE DIRECTLY !!!
1717

1818
function getDeps() external view returns(Dep[] memory) {
19-
DictionaryBase dictionary = DictionaryBase(ERC7546Utils.getDictionary()); // TODO IDictionary
19+
IDictionary dictionary = IDictionary(ProxyUtils.getDictionary());
2020
bytes4[] memory selectors = dictionary.supportsInterfaces();
2121
Dep[] memory deps = new Dep[](selectors.length);
2222
for (uint i; i < selectors.length; ++i) {

src/std/functions/Receive.sol

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
// SPDX-License-Identifier: MIT
22
pragma solidity ^0.8.22;
33

4-
import {ERC7546ProxyEtherscan} from "@ucs.mc/proxy/ERC7546ProxyEtherscan.sol";
5-
import {ERC7546Utils} from "@ucs.mc/proxy/ERC7546Utils.sol";
6-
74
/**
85
< MC Standard Function >
96
@title Receive

src/std/functions/protected/UpgradeDictionary.sol

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// SPDX-License-Identifier: MIT
22
pragma solidity ^0.8.24;
33

4-
import {ERC7546Utils} from "@ucs.mc/proxy/ERC7546Utils.sol";
4+
import {ProxyUtils} from "@ucs.mc/proxy/ProxyUtils.sol";
55
import {ProtectionBase} from "./utils/ProtectionBase.sol";
66

77
/**
@@ -14,7 +14,7 @@ contract UpgradeDictionary is ProtectionBase {
1414
/// DO NOT USE STORAGE DIRECTLY !!!
1515

1616
function upgradeDictionary(address newDictionary) external onlyAdmin {
17-
ERC7546Utils.upgradeDictionaryToAndCall({
17+
ProxyUtils.upgradeDictionaryToAndCall({
1818
newDictionary: newDictionary,
1919
data: ""
2020
});

src/std/interfaces/IStd.sol

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
// SPDX-License-Identifier: MIT
22
pragma solidity ^0.8.24;
33

4-
import {ERC7546ProxyEvents} from "@ucs.mc/proxy/ERC7546ProxyEvents.sol";
4+
import {IProxy} from "@ucs.mc/proxy/IProxy.sol";
55
import {Dep} from "../storage/Schema.sol";
66

7-
interface IStd is ERC7546ProxyEvents {
7+
interface IStd is IProxy {
88
function clone(bytes calldata initData) external returns (address proxy);
99
function getDeps() external view returns(Dep[] memory);
1010
function featureToggle(bytes4 selector) external;

0 commit comments

Comments
 (0)