change ipfs endpoint

pull/5370/head
yann300 3 years ago
parent b361d9da60
commit 148cb246ee
  1. 4
      apps/remix-ide/ci/publishIpfs
  2. 4
      apps/remix-ide/src/app/files/dgitProvider.js
  3. 2
      apps/remix-ide/src/lib/publishOnIpfs.js
  4. 17
      libs/remix-lib/src/init.ts
  5. 2
      libs/remix-url-resolver/src/resolve.ts
  6. 3
      libs/remixd/src/origins.json

@ -6,13 +6,13 @@ console.log('current folder', process.cwd())
const folder = process.cwd() + '/temp_publish_docker'; const folder = process.cwd() + '/temp_publish_docker';
(async () => { (async () => {
const host = 'ipfs.komputing.org' // ethdev berlin ipfs node const host = 'ipfs.remixproject.org'
const ipfs = IpfsHttpClient({ host, port: 443, protocol: 'https' }) const ipfs = IpfsHttpClient({ host, port: 443, protocol: 'https' })
try { try {
let result = await ipfs.add(globSource(folder, { recursive: true}), { pin: false }) let result = await ipfs.add(globSource(folder, { recursive: true}), { pin: false })
const hash = result.cid.toString() const hash = result.cid.toString()
console.log('ipfs://' + hash) console.log('ipfs://' + hash)
console.log('https://ipfsgw.komputing.org/ipfs/' + hash) console.log('https://ipfs.remixproject.org/ipfs/' + hash)
console.log('https://gateway.ipfs.io/ipfs/' + hash) console.log('https://gateway.ipfs.io/ipfs/' + hash)
} catch (e) { } catch (e) {
console.log(e) console.log(e)

@ -27,10 +27,10 @@ class DGitProvider extends Plugin {
constructor () { constructor () {
super(profile) super(profile)
this.ipfsconfig = { this.ipfsconfig = {
host: 'ipfs.komputing.org', host: 'ipfs.remixproject.org',
port: 443, port: 443,
protocol: 'https', protocol: 'https',
ipfsurl: 'https://ipfsgw.komputing.org/ipfs/' ipfsurl: 'https://ipfs.remixproject.org/ipfs/'
} }
this.globalIPFSConfig = { this.globalIPFSConfig = {
host: 'ipfs.io', host: 'ipfs.io',

@ -4,7 +4,7 @@ const async = require('async')
const IpfsClient = require('ipfs-mini') const IpfsClient = require('ipfs-mini')
const ipfsNodes = [ const ipfsNodes = [
new IpfsClient({ host: 'ipfs.komputing.org', port: 443, protocol: 'https' }), new IpfsClient({ host: 'ipfs.remixproject.org', port: 443, protocol: 'https' }),
new IpfsClient({ host: 'ipfs.infura.io', port: 5001, protocol: 'https' }), new IpfsClient({ host: 'ipfs.infura.io', port: 5001, protocol: 'https' }),
new IpfsClient({ host: '127.0.0.1', port: 5001, protocol: 'http' }) new IpfsClient({ host: '127.0.0.1', port: 5001, protocol: 'http' })
] ]

@ -12,23 +12,6 @@ export function extendWeb3 (web3) {
this.extend(web3) this.extend(web3)
} }
export function setProvider (web3, url) {
web3.setProvider(new web3.providers.HttpProvider(url))
}
export function web3DebugNode (network) {
const web3DebugNodes = {
Main: 'https://gethmainnet.komputing.org',
Rinkeby: 'https://remix-rinkeby.ethdevops.io',
Ropsten: 'https://remix-ropsten.ethdevops.io',
Goerli: 'https://remix-goerli.ethdevops.io'
}
if (web3DebugNodes[network]) {
return this.loadWeb3(web3DebugNodes[network])
}
return null
}
export function extend (web3) { export function extend (web3) {
if (!web3.extend) { if (!web3.extend) {
return return

@ -113,7 +113,7 @@ export class RemixURLResolver {
url = url.replace(/^ipfs:\/\/?/, 'ipfs/') url = url.replace(/^ipfs:\/\/?/, 'ipfs/')
// eslint-disable-next-line no-useless-catch // eslint-disable-next-line no-useless-catch
try { try {
const req = 'https://ipfsgw.komputing.org/' + url const req = 'https://ipfs.remixproject.org/' + url
// If you don't find greeter.sol on ipfs gateway use local // If you don't find greeter.sol on ipfs gateway use local
// const req = 'http://localhost:8080/' + url // const req = 'http://localhost:8080/' + url
const response: AxiosResponse = await axios.get(req) const response: AxiosResponse = await axios.get(req)

@ -6,6 +6,7 @@
"https://remix.ethereum.org", "https://remix.ethereum.org",
"package://a7df6d3c223593f3550b35e90d7b0b1f.mod", "package://a7df6d3c223593f3550b35e90d7b0b1f.mod",
"package://6fd22d6fe5549ad4c4d8fd3ca0b7816b.mod", "package://6fd22d6fe5549ad4c4d8fd3ca0b7816b.mod",
"https://ipfsgw.komputing.org" "https://ipfsgw.komputing.org",
"https://ipfs.remixproject.org"
] ]
} }
Loading…
Cancel
Save