Skip to content

Commit ad2fa27

Browse files
authored
Merge pull request #103 from valory-xyz/mm_deployment
chore: MM deployment
2 parents 4273fa3 + 0abd038 commit ad2fa27

8 files changed

+54
-29
lines changed

.gitleaksignore

+6
Original file line numberDiff line numberDiff line change
@@ -51,3 +51,9 @@ c96219648ec4b71159e083f109625a0596aac4fd:scripts/deployment/globals_gnosis_mainn
5151
38c4ea30fb979b699150086b6e96c62cc5a1c9f2:scripts/deployment/globals_gnosis_mainnet.json:generic-api-key:1
5252
5fce3bcb7ac7a77d3b99bdf6da0638cdc32e6f4c:scripts/deployment/globals_gnosis_mainnet_test.json:generic-api-key:1
5353
8153228dd03897af4cb65e88a61488fd2be724e4:scripts/deployment/globals_gnosis_mainnet_test.json:generic-api-key:1
54+
6a12f9c818a828b6e706c13f254ca2c6659ff529:scripts/deployment/globals_base_mainnet.json:generic-api-key:1
55+
6a12f9c818a828b6e706c13f254ca2c6659ff529:scripts/deployment/globals_gnosis_mainnet.json:generic-api-key:1
56+
982c45c8eff353104e2a1764a3371484fb31b7ee:scripts/deployment/globals_gnosis_mainnet.json:generic-api-key:1
57+
a74f51de3c65492928c92cb53389edfd0a666e01:scripts/deployment/globals_gnosis_mainnet.json:generic-api-key:1
58+
cbde72de44bf6395c29a49ae64a0bfc4c6dbd8bf:scripts/deployment/globals_gnosis_mainnet.json:generic-api-key:1
59+
d8cf59c8262265059500c2ed2790c19aee1d16f0:scripts/deployment/globals_gnosis_mainnet.json:generic-api-key:1

audit/README.md

+5-1
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,14 @@
11
## Audits
22
This section contains audit-related materials.
33

4-
### Internal audit
4+
### Internal audits
55
An internal audit with a focus on contracts is located in this folder: [internal audit](https://github.com/valory-xyz/ai-registry-mech/blob/main/audits/internal). <br>
66
An internal audit with a focus on marketplace contracts is located in this folder: [internal audit 1](https://github.com/valory-xyz/ai-registry-mech/blob/main/audits/internal1). <br>
77
An internal audit with a focus on updated marketplace contracts is located in this folder: [internal audit 2](https://github.com/valory-xyz/ai-registry-mech/blob/main/audits/internal2). <br>
88
An internal audit with a focus on re-design marketplace contracts is located in this folder: [internal audit 3](https://github.com/valory-xyz/ai-registry-mech/blob/main/audits/internal3). <br>
99
An internal audit with a focus on latest re-design marketplace contracts is located in this folder: [internal audit 4](https://github.com/valory-xyz/ai-registry-mech/blob/main/audits/internal4). <br>
1010
An internal audit with a focus on latest re-design ref:nmv marketplace contracts is located in this folder: [internal audit 5](https://github.com/valory-xyz/ai-registry-mech/blob/main/audits/internal5). <br>
11+
12+
13+
### External audits
14+
- 19.02.2025 by [Cantina](https://cantina.xyz/portfolio/ff3a291b-4cdd-4ebb-9828-c0ebc7f21edf)

docs/configuration.json

+20-20
Original file line numberDiff line numberDiff line change
@@ -6,52 +6,52 @@
66
{
77
"name": "Karma",
88
"artifact": "abis/0.8.28/Karma.json",
9-
"address": "0x7a9470bE221B757f7cB99a60fca3e3Bc12189F24"
9+
"address": "0xe3fd2799DBe6847b9161229e7F346F73b270E6A4"
1010
},
1111
{
1212
"name": "KarmaProxy",
1313
"artifact": "abis/0.8.28/KarmaProxy.json",
14-
"address": "0x55Ad542156322fED963926CF249591C88081E33a"
14+
"address": "0x2C602C7B590ABFc148d8c7c5e4d58c56Be1d304a"
1515
},
1616
{
1717
"name": "MechMarketplace",
1818
"artifact": "abis/0.8.28/MechMarketplace.json",
19-
"address": "0xC3f79197319Da2a795FC9e0E33b1371ba5FBbDd8"
19+
"address": "0x2b6fF14b63859ef8740eCA6A3dA01F95E19F0480"
2020
},
2121
{
2222
"name": "MechMarketplaceProxy",
2323
"artifact": "abis/0.8.28/MechMarketplaceProxy.json",
24-
"address": "0x85dCa9b0E27DDECdB7c657616e34967d2711Db55"
24+
"address": "0x735FAAb1c4Ec41128c367AFb5c3baC73509f70bB"
2525
},
2626
{
2727
"name": "MechFactoryFixedPriceNative",
2828
"artifact": "abis/0.8.28/MechFactoryFixedPriceNative.json",
29-
"address": "0xEC55995981980F326279fEC74C0Cc8bE7a9Be9aA"
29+
"address": "0x8b299c20F87e3fcBfF0e1B86dC0acC06AB6993EF"
3030
},
3131
{
3232
"name": "MechFactoryFixedPriceToken",
3333
"artifact": "abis/0.8.28/MechFactoryFixedPriceToken.json",
34-
"address": "0x71CD6941f7dC438e22B97c2C4f7DE6ac9c79c742"
34+
"address": "0x31ffDC795FDF36696B8eDF7583A3D115995a45FA"
3535
},
3636
{
3737
"name": "MechFactoryNvmSubscriptionNative",
3838
"artifact": "abis/0.8.28/MechFactoryNvmSubscriptionNative.json",
39-
"address": "0x6A46b34aa3D25EFF524830C1c1DBd5783946F28D"
39+
"address": "0x65fd74C29463afe08c879a3020323DD7DF02DA57"
4040
},
4141
{
4242
"name": "BalanceTrackerFixedPriceNative",
4343
"artifact": "abis/0.8.28/BalanceTrackerFixedPriceNative.json",
44-
"address": "0xB29117aF8438b4bcc0807Ea18b42fAF3F8C11713"
44+
"address": "0x21cE6799A22A3Da84B7c44a814a9c79ab1d2A50D"
4545
},
4646
{
4747
"name": "BalanceTrackerFixedPriceToken",
4848
"artifact": "abis/0.8.28/BalanceTrackerFixedPriceToken.json",
49-
"address": "0x07f5E31513af5a2E8Bd4A3E53C6aF980B9Dd83f2"
49+
"address": "0x53Bd432516707a5212A70216284a99A563aAC1D1"
5050
},
5151
{
5252
"name": "BalanceTrackerNvmSubscriptionNative",
5353
"artifact": "abis/0.8.28/BalanceTrackerNvmSubscriptionNative.json",
54-
"address": "0x1fb4002A41CdC621e8d9878Dcf543e55Ebb396FB"
54+
"address": "0x7D686bD1fD3CFF6E45a40165154D61043af7D67c"
5555
}
5656
]
5757
},
@@ -62,52 +62,52 @@
6262
{
6363
"name": "Karma",
6464
"artifact": "abis/0.8.28/Karma.json",
65-
"address": "0x94676070018ff7D09BC32DAc6bb01Ae67282b8E8"
65+
"address": "0x1f84F8F70dE0651C2d51Bf8850FE9D0289Ba3B3A"
6666
},
6767
{
6868
"name": "KarmaProxy",
6969
"artifact": "abis/0.8.28/KarmaProxy.json",
70-
"address": "0x6f7661F52fE1919996d0A4F68D09B344093a349d"
70+
"address": "0x7F69B6783855772d10A4bc2AFAaE650599F040DB"
7171
},
7272
{
7373
"name": "MechMarketplace",
7474
"artifact": "abis/0.8.28/MechMarketplace.json",
75-
"address": "0xd6AA4Ec948d84f6Db8EEf25104CeE0Ecd280C74e"
75+
"address": "0x0e998DaAedaCD59ba2F65558a29417b69f05D972"
7676
},
7777
{
7878
"name": "MechMarketplaceProxy",
7979
"artifact": "abis/0.8.28/MechMarketplaceProxy.json",
80-
"address": "0x95dA0F8C3eC5D40209f0EF1ED5E61deD28307d8d"
80+
"address": "0xf24eE42edA0fc9b33B7D41B06Ee8ccD2Ef7C5020"
8181
},
8282
{
8383
"name": "MechFactoryFixedPriceNative",
8484
"artifact": "abis/0.8.28/MechFactoryFixedPriceNative.json",
85-
"address": "0x0338893fB1A1D9Df03F72CC53D8f786487d3D03E"
85+
"address": "0x2E008211f34b25A7d7c102403c6C2C3B665a1abe"
8686
},
8787
{
8888
"name": "MechFactoryFixedPriceToken",
8989
"artifact": "abis/0.8.28/MechFactoryFixedPriceToken.json",
90-
"address": "0x1d333b46dB6e8FFd271b6C2D2B254868BD9A2dbd"
90+
"address": "0x97371B1C0cDA1D04dFc43DFb50a04645b7Bc9BEe"
9191
},
9292
{
9393
"name": "MechFactoryNvmSubscriptionNative",
9494
"artifact": "abis/0.8.28/MechFactoryNvmSubscriptionNative.json",
95-
"address": "0x4cEB52802ef86edF8796632546d89e55c87a0901"
95+
"address": "0x847bBE8b474e0820215f818858e23F5f5591855A"
9696
},
9797
{
9898
"name": "BalanceTrackerFixedPriceNative",
9999
"artifact": "abis/0.8.28/BalanceTrackerFixedPriceNative.json",
100-
"address": "0x6d9b08701Af43D68D991c074A27E4d90Af7f2276"
100+
"address": "0xB3921F8D8215603f0Bd521341Ac45eA8f2d274c1"
101101
},
102102
{
103103
"name": "BalanceTrackerFixedPriceToken",
104104
"artifact": "abis/0.8.28/BalanceTrackerFixedPriceToken.json",
105-
"address": "0x3c3007a2e4ba7f73C764F69f6D6C1983D9EB6B26"
105+
"address": "0x43fB32f25dce34EB76c78C7A42C8F40F84BCD237"
106106
},
107107
{
108108
"name": "BalanceTrackerNvmSubscriptionNative",
109109
"artifact": "abis/0.8.28/BalanceTrackerNvmSubscriptionNative.json",
110-
"address": "0xaC26774616bbeD41b0CB69EA2ae7de366F430b23"
110+
"address": "0x3d79737f05966c5925a04d1b04110006F5a072bE"
111111
}
112112
]
113113
},

scripts/audit_chains/audit_contracts_setup.js

+17-2
Original file line numberDiff line numberDiff line change
@@ -173,13 +173,28 @@ async function checkBalanceTracker(chainId, provider, globalsInstance, configCon
173173
const drainer = await balanceTracker.drainer();
174174
customExpect(drainer, globalsInstance["drainerAddress"], log + ", function: drainer()");
175175

176+
// Additionally check fixed native token
177+
if (contractName === "BalanceTrackerFixedPriceNative") {
178+
const wrappedNativeToken = await balanceTracker.wrappedNativeToken();
179+
customExpect(wrappedNativeToken, globalsInstance["wrappedNativeTokenAddress"], log + ", function: wrappedNativeToken()");
180+
}
181+
182+
// Additionally check fixed token
183+
if (contractName === "BalanceTrackerFixedPriceToken") {
184+
const token = await balanceTracker.token();
185+
customExpect(token, globalsInstance["olasAddress"], log + ", function: token()");
186+
}
187+
176188
// Additionally check NVM subscription
177189
if (contractName === "BalanceTrackerNvmSubscriptionNative") {
178190
const subscriptionNFT = await balanceTracker.subscriptionNFT();
179191
customExpect(subscriptionNFT, globalsInstance["subscriptionNFTAddress"], log + ", function: subscriptionNFT()");
180192

181193
const subscriptionTokenId = await balanceTracker.subscriptionTokenId();
182194
customExpect(subscriptionTokenId.toString(), ethers.BigNumber.from(globalsInstance["subscriptionTokenId"]).toString(), log + ", function: subscriptionTokenId()");
195+
196+
const tokenCreditRatio = await balanceTracker.tokenCreditRatio();
197+
customExpect(tokenCreditRatio.toString(), ethers.BigNumber.from(globalsInstance["tokenCreditRatio"]).toString(), log + ", function: tokenCreditRatio()");
183198
}
184199
}
185200

@@ -229,8 +244,8 @@ async function main() {
229244
// ################################# VERIFY CONTRACTS SETUP #################################
230245
if (verifySetup) {
231246
const globalNames = {
232-
"gnosis": "scripts/deployment/globals_gnosis_mainnet_test.json",
233-
"base": "scripts/deployment/globals_base_mainnet_test.json"
247+
"gnosis": "scripts/deployment/globals_gnosis_mainnet.json",
248+
"base": "scripts/deployment/globals_base_mainnet.json"
234249
};
235250

236251
const providerLinks = {

scripts/deployment/deploy_10_balance_tracker_fixed_price_token.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ async function main() {
1414
const gasPriceInGwei = parsedData.gasPriceInGwei;
1515
const mechMarketplaceProxyAddress = parsedData.mechMarketplaceProxyAddress;
1616
const drainerAddress = parsedData.drainerAddress;
17-
const wrappedNativeTokenAddress = parsedData.wrappedNativeTokenAddress;
17+
const olasAddress = parsedData.olasAddress;
1818

1919
let networkURL = parsedData.networkURL;
2020
if (providerName === "polygon") {
@@ -49,7 +49,7 @@ async function main() {
4949
const gasPrice = ethers.utils.parseUnits(gasPriceInGwei, "gwei");
5050
const BalanceTrackerFixedPriceToken = await ethers.getContractFactory("BalanceTrackerFixedPriceToken");
5151
const balanceTrackerFixedPriceToken = await BalanceTrackerFixedPriceToken.connect(EOA).deploy(mechMarketplaceProxyAddress,
52-
drainerAddress, wrappedNativeTokenAddress, { gasPrice });
52+
drainerAddress, olasAddress, { gasPrice });
5353
// In case when gas calculation is not working correctly on Arbitrum
5454
//const gasLimit = 60000000;
5555
const result = await balanceTrackerFixedPriceToken.deployed();
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"contractVerification":true,"useLedger":true,"derivationPath":"m/44'/60'/2'/0/0","providerName":"base","networkURL":"https://mainnet.base.org","gasPriceInGwei":"2","bridgeMediatorAddress":"0xE49CB081e8d96920C38aA7AB90cb0294ab4Bc8EA","serviceRegistryAddress":"0x3C1fF68f5aa342D296d4DEe4Bb1cACCA912D95fE","karmaAddress":"","karmaProxyAddress":"","fee":"0","minResponseTimeout":"60","maxResponseTimeout":"300","drainerAddress":"0x3FD8C757dE190bcc82cF69Df3Cd9Ab15bCec1426","wrappedNativeTokenAddress":"0x4200000000000000000000000000000000000006","tokenCreditRatio":"","subscriptionNFTAddress":"","subscriptionTokenId":""}
1+
{"contractVerification":true,"useLedger":true,"derivationPath":"m/44'/60'/2'/0/0","providerName":"base","networkURL":"https://mainnet.base.org","gasPriceInGwei":"0.005","olasAddress":"0x54330d28ca3357F294334BDC454a032e7f353416","bridgeMediatorAddress":"0xE49CB081e8d96920C38aA7AB90cb0294ab4Bc8EA","serviceRegistryAddress":"0x3C1fF68f5aa342D296d4DEe4Bb1cACCA912D95fE","karmaAddress":"0x1f84F8F70dE0651C2d51Bf8850FE9D0289Ba3B3A","karmaProxyAddress":"0x7F69B6783855772d10A4bc2AFAaE650599F040DB","fee":"0","minResponseTimeout":"60","maxResponseTimeout":"300","drainerAddress":"0x3FD8C757dE190bcc82cF69Df3Cd9Ab15bCec1426","wrappedNativeTokenAddress":"0x4200000000000000000000000000000000000006","tokenCreditRatio":"","subscriptionNFTAddress":"","subscriptionTokenId":"","mechMarketplaceAddress":"0x0e998DaAedaCD59ba2F65558a29417b69f05D972","mechMarketplaceProxyAddress":"0xf24eE42edA0fc9b33B7D41B06Ee8ccD2Ef7C5020","mechFactoryNvmSubscriptionNativeAddress":"0x847bBE8b474e0820215f818858e23F5f5591855A","balanceTrackerNvmSubscriptionNativeAddress":"0x3d79737f05966c5925a04d1b04110006F5a072bE","mechFactoryFixedPriceNativeAddress":"0x2E008211f34b25A7d7c102403c6C2C3B665a1abe","balanceTrackerFixedPriceNativeAddress":"0xB3921F8D8215603f0Bd521341Ac45eA8f2d274c1","mechFactoryFixedPriceTokenAddress":"0x97371B1C0cDA1D04dFc43DFb50a04645b7Bc9BEe","balanceTrackerFixedPriceTokenAddress":"0x43fB32f25dce34EB76c78C7A42C8F40F84BCD237"}
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"contractVerification":true,"useLedger":true,"derivationPath":"m/44'/60'/2'/0/0","providerName":"gnosis","networkURL":"https://rpc.gnosischain.com","gasPriceInGwei":"3","bridgeMediatorAddress":"0x15bd56669F57192a97dF41A2aa8f4403e9491776","serviceRegistryAddress":"0x9338b5153AE39BB89f50468E608eD9d764B755fD","karmaAddress":"0x4039B809E0C0Ad04F6Fc880193366b251dDf4B40","karmaProxyAddress":"0x4E3e48bA826b15214FDe72a50BFd17aB286B584E","fee":"0","minResponseTimeout":"60","maxResponseTimeout":"300","drainerAddress":"","wrappedNativeTokenAddress":"0xe91D153E0b41518A2Ce8Dd3D7944Fa863463a97d","tokenCreditRatio":"","subscriptionNFTAddress":"","subscriptionTokenId":"","mechMarketplaceAddress":""}
1+
{"contractVerification":true,"useLedger":true,"derivationPath":"m/44'/60'/2'/0/0","providerName":"gnosis","networkURL":"https://rpc.gnosischain.com","gasPriceInGwei":"1","olasAddress":"0xcE11e14225575945b8E6Dc0D4F2dD4C570f79d9f","bridgeMediatorAddress":"0x15bd56669F57192a97dF41A2aa8f4403e9491776","serviceRegistryAddress":"0x9338b5153AE39BB89f50468E608eD9d764B755fD","karmaAddress":"0xe3fd2799DBe6847b9161229e7F346F73b270E6A4","karmaProxyAddress":"0x2C602C7B590ABFc148d8c7c5e4d58c56Be1d304a","fee":"0","minResponseTimeout":"60","maxResponseTimeout":"300","drainerAddress":"0x153196110040A0c729227C603Db3A6c6D91851B2","wrappedNativeTokenAddress":"0xe91D153E0b41518A2Ce8Dd3D7944Fa863463a97d","tokenCreditRatio":"","subscriptionNFTAddress":"","subscriptionTokenId":"","mechMarketplaceAddress":"0x2b6fF14b63859ef8740eCA6A3dA01F95E19F0480","mechMarketplaceProxyAddress":"0x735FAAb1c4Ec41128c367AFb5c3baC73509f70bB","mechFactoryNvmSubscriptionNativeAddress":"0x65fd74C29463afe08c879a3020323DD7DF02DA57","balanceTrackerNvmSubscriptionNativeAddress":"0x7D686bD1fD3CFF6E45a40165154D61043af7D67c","mechFactoryFixedPriceNativeAddress":"0x8b299c20F87e3fcBfF0e1B86dC0acC06AB6993EF","balanceTrackerFixedPriceNativeAddress":"0x21cE6799A22A3Da84B7c44a814a9c79ab1d2A50D","mechFactoryFixedPriceTokenAddress":"0x31ffDC795FDF36696B8eDF7583A3D115995a45FA","balanceTrackerFixedPriceTokenAddress":"0x53Bd432516707a5212A70216284a99A563aAC1D1"}

scripts/deployment/verify_10_balance_tracker_fixed_price_token.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@ const dataFromJSON = fs.readFileSync(globalsFile, "utf8");
44
const parsedData = JSON.parse(dataFromJSON);
55
const mechMarketplaceProxyAddress = parsedData.mechMarketplaceProxyAddress;
66
const drainerAddress = parsedData.drainerAddress;
7-
const wrappedNativeTokenAddress = parsedData.wrappedNativeTokenAddress;
7+
const olasAddress = parsedData.olasAddress;
88

99
module.exports = [
1010
mechMarketplaceProxyAddress,
1111
drainerAddress,
12-
wrappedNativeTokenAddress
12+
olasAddress
1313
];

0 commit comments

Comments
 (0)