From eb7db3ddaddf34d5cda4008b2b6661a10273997b Mon Sep 17 00:00:00 2001 From: anandrgitnirman Date: Wed, 28 Apr 2021 13:44:46 +0530 Subject: [PATCH] #538 Point to the latest contract --- blockchain/ethereum_test_util.go | 4 ++-- resources/blockchain/package-lock.json | 32 +++++++++++--------------- resources/blockchain/package.json | 4 ++-- 3 files changed, 17 insertions(+), 23 deletions(-) diff --git a/blockchain/ethereum_test_util.go b/blockchain/ethereum_test_util.go index e22f06cd..dc8c51d5 100644 --- a/blockchain/ethereum_test_util.go +++ b/blockchain/ethereum_test_util.go @@ -28,7 +28,7 @@ type SimulatedEthereumEnvironment struct { } func (env *SimulatedEthereumEnvironment) SnetTransferTokens(to *bind.TransactOpts, amount int64) *SimulatedEthereumEnvironment { - _, err := env.SingularityNetToken.TransferTokens(EstimateGas(env.SingnetWallet), to.From, big.NewInt(amount)) + _, err := env.SingularityNetToken.Transfer(EstimateGas(env.SingnetWallet), to.From, big.NewInt(amount)) if err != nil { panic(fmt.Sprintf("Unable to transfer tokens: %v", err)) } @@ -91,7 +91,7 @@ func getTestWallet() (privateKey *ecdsa.PrivateKey, wallet *bind.TransactOpts) { } func deployContracts(env *SimulatedEthereumEnvironment) { - tokenAddress, _, token, err := DeploySingularityNetToken(EstimateGas(env.SingnetWallet), env.Backend) + tokenAddress, _, token, err := DeploySingularityNetToken(EstimateGas(env.SingnetWallet), env.Backend, "SingularityNet Token", "AGI") if err != nil { panic(fmt.Sprintf("Unable to deploy SingularityNetToken contract, error: %v", err)) } diff --git a/resources/blockchain/package-lock.json b/resources/blockchain/package-lock.json index a668f055..f2b36963 100644 --- a/resources/blockchain/package-lock.json +++ b/resources/blockchain/package-lock.json @@ -2,6 +2,11 @@ "requires": true, "lockfileVersion": 1, "dependencies": { + "@openzeppelin/contracts": { + "version": "3.4.1", + "resolved": "https://registry.npmjs.org/@openzeppelin/contracts/-/contracts-3.4.1.tgz", + "integrity": "sha512-cUriqMauq1ylzP2TxePNdPqkwI7Le3Annh4K9rrpvKfSBB/bdW+Iu1ihBaTIABTAAJ85LmKL5SSPPL9ry8d1gQ==" + }, "ajv": { "version": "5.5.2", "resolved": "https://registry.npmjs.org/ajv/-/ajv-5.5.2.tgz", @@ -507,11 +512,6 @@ "wrappy": "1" } }, - "openzeppelin-solidity": { - "version": "1.11.0", - "resolved": "https://registry.npmjs.org/openzeppelin-solidity/-/openzeppelin-solidity-1.11.0.tgz", - "integrity": "sha512-s4hFpQ9nMvFQBUuY0OJ7PfvSEprPcUph/YGvlgqJYQc6rNjsreRSj9Iq6ftTFI2anlECvWg/wWnNdPq4Tih1FA==" - }, "original-require": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/original-require/-/original-require-1.0.1.tgz", @@ -670,20 +670,19 @@ } }, "singularitynet-platform-contracts": { - "version": "0.3.4", - "resolved": "https://registry.npmjs.org/singularitynet-platform-contracts/-/singularitynet-platform-contracts-0.3.4.tgz", - "integrity": "sha512-ZvmyA2NjpNsDfbZcOtmlPF/WakPqKDboV+38pTpjmCfV4H0SN4NZNGRxYbEIEGPxa6HsMl8Vg57W+FCVYfm5IQ==", + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/singularitynet-platform-contracts/-/singularitynet-platform-contracts-1.0.0.tgz", + "integrity": "sha512-M5kRMICpWB/fqoHN4WXsQKeK3Zlo7LESNE96FCKkmOYG7FA0KV5SlxX5PWuwqkb5+P96noad1Vcoa6v/6aiJ2A==", "requires": { - "openzeppelin-solidity": "1.11.0", - "singularitynet-token-contracts": "^2.0.1" + "singularitynet-token-contracts": "^3.0.0" } }, "singularitynet-token-contracts": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/singularitynet-token-contracts/-/singularitynet-token-contracts-2.0.1.tgz", - "integrity": "sha512-kdzRIdy90En51WKwI2Mq4a0EwVMGXOWdfIqsuwCjSFij6FM2k6Jc4JwREczJS+GAXP0ARi8ItH/Vl/ara76PKQ==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/singularitynet-token-contracts/-/singularitynet-token-contracts-3.0.0.tgz", + "integrity": "sha512-f2auof9gSN8TQNPZkdN8GvKFqY6rQTgmIrPzRgKR3H5xZ9OO5RGAWxFDsaCmBFjQqL+9ba7AaPgEMdRJ6OHs9g==", "requires": { - "zeppelin-solidity": "1.4.0" + "@openzeppelin/contracts": "^3.2.0" } }, "solc": { @@ -975,11 +974,6 @@ "camelcase": "^3.0.0", "lodash.assign": "^4.0.6" } - }, - "zeppelin-solidity": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/zeppelin-solidity/-/zeppelin-solidity-1.4.0.tgz", - "integrity": "sha512-eJfD1Zf0ZP2m0oYnB/HM7JPJ81MNjs3qt+c/TRd5kvCSOU3EfYNHz5YfFgzkJzvPUGs0Zg8spzGROlqXShvisg==" } } } diff --git a/resources/blockchain/package.json b/resources/blockchain/package.json index ebab33f2..f27ef677 100644 --- a/resources/blockchain/package.json +++ b/resources/blockchain/package.json @@ -3,8 +3,8 @@ "bip39": "2.5.0", "fs-extra": "5.0.0", "ganache-cli": "6.1.6", - "singularitynet-platform-contracts": "0.3.4", - "singularitynet-token-contracts": "2.0.1", + "singularitynet-platform-contracts": "1.0.0", + "singularitynet-token-contracts": "3.0.0", "truffle": "4.1.13", "truffle-contract": "3.0.6", "command-line-args": "5.0.2"